@brumaombra/ui-vintage 0.6.8 → 0.7.1
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 +61 -51
- package/module.mjs +75 -0
- package/package.json +81 -272
- package/src/components/background-grid/BackgroundGrid.vue +5 -0
- package/src/components/background-grid/index.ts +2 -0
- package/src/components/blog/AllPostsSection.vue +46 -0
- package/src/components/blog/BlogFAQSection.vue +71 -0
- package/src/components/blog/BlogHeaderSection.vue +35 -0
- package/src/components/blog/BlogInfoSection.vue +70 -0
- package/src/components/blog/BlogSectionTitle.vue +12 -0
- package/src/components/blog/CategoriesList.vue +17 -0
- package/src/components/blog/CategoriesSection.vue +14 -0
- package/src/components/blog/CategoryCard.vue +34 -0
- package/src/components/blog/HeaderCarousel.vue +194 -0
- package/src/components/blog/PostCard.vue +56 -0
- package/src/components/blog/PostsList.vue +16 -0
- package/src/components/blog/SocialShareSidebar.vue +94 -0
- package/src/components/blog/TableOfContents.vue +114 -0
- package/{dist/components/blog/index.d.ts → src/components/blog/index.ts} +1 -1
- package/src/components/busy-indicator/BusyIndicator.vue +14 -0
- package/src/components/busy-indicator/busy-indicator-state.ts +88 -0
- package/src/components/busy-indicator/index.ts +3 -0
- package/src/components/card-grid/CardGrid.vue +47 -0
- package/src/components/card-grid/index.ts +2 -0
- package/src/components/chip/Chip.vue +40 -0
- package/src/components/chip/index.ts +2 -0
- package/src/components/confirm-dialog/ConfirmDialog.vue +60 -0
- package/src/components/confirm-dialog/confirm-dialog-state.ts +200 -0
- package/src/components/confirm-dialog/index.ts +12 -0
- package/src/components/content/BlogList.vue +60 -0
- package/src/components/content/BlogTable.vue +56 -0
- package/src/components/content/ProseHr.vue +26 -0
- package/{dist/components/content/index.d.ts → src/components/content/index.ts} +1 -1
- package/src/components/dashboard-shell/DashboardShell.vue +205 -0
- package/src/components/dashboard-shell/index.ts +2 -0
- package/src/components/data-list/DataList.vue +19 -0
- package/src/components/data-list/DataListItem.vue +17 -0
- package/src/components/data-list/DataListLabel.vue +17 -0
- package/src/components/data-list/DataListText.vue +17 -0
- package/src/components/data-list/DataListValue.vue +17 -0
- package/src/components/data-list/index.ts +5 -0
- package/src/components/empty-state-card/EmptyStateCard.vue +54 -0
- package/{dist/components/empty-state-card/index.d.ts → src/components/empty-state-card/index.ts} +1 -1
- package/src/components/error-page/ErrorPage.vue +118 -0
- package/src/components/error-page/index.ts +2 -0
- package/src/components/info-card/InfoCard.vue +42 -0
- package/src/components/info-card/index.ts +2 -0
- package/src/components/landing/index.ts +6 -0
- package/src/components/landing/landing-content/LandingContent.vue +17 -0
- package/src/components/landing/landing-content/index.ts +2 -0
- package/src/components/landing/landing-footer/LandingFooter.vue +151 -0
- package/src/components/landing/landing-footer/index.ts +3 -0
- package/src/components/landing/landing-navbar/LandingNavbar.vue +48 -0
- package/src/components/landing/landing-navbar/index.ts +2 -0
- package/src/components/landing/landing-shell/LandingShell.vue +58 -0
- package/src/components/landing/landing-shell/index.ts +2 -0
- package/src/components/language-flag/LanguageFlag.vue +54 -0
- package/src/components/language-flag/flags/ChineseFlag.vue +10 -0
- package/src/components/language-flag/flags/EnglishFlag.vue +9 -0
- package/src/components/language-flag/flags/FrenchFlag.vue +7 -0
- package/src/components/language-flag/flags/GermanFlag.vue +7 -0
- package/src/components/language-flag/flags/ItalianFlag.vue +9 -0
- package/src/components/language-flag/flags/JapaneseFlag.vue +6 -0
- package/src/components/language-flag/flags/PortugueseFlag.vue +59 -0
- package/src/components/language-flag/flags/RussianFlag.vue +7 -0
- package/src/components/language-flag/flags/SpanishFlag.vue +6 -0
- package/{dist/components/language-flag/index.d.ts → src/components/language-flag/index.ts} +1 -1
- package/src/components/language-selector/LanguageSelector.vue +154 -0
- package/{dist/components/language-selector/index.d.ts → src/components/language-selector/index.ts} +1 -1
- package/src/components/load-more-button/LoadMoreButton.vue +44 -0
- package/{dist/components/load-more-button/index.d.ts → src/components/load-more-button/index.ts} +1 -1
- package/src/components/loading-state-card/LoadingStateCard.vue +43 -0
- package/{dist/components/loading-state-card/index.d.ts → src/components/loading-state-card/index.ts} +1 -1
- package/src/components/message-dialog/MessageDialog.vue +101 -0
- package/src/components/message-dialog/index.ts +11 -0
- package/src/components/message-dialog/message-dialog-state.ts +168 -0
- package/src/components/message-toast/MessageToast.vue +75 -0
- package/src/components/message-toast/index.ts +9 -0
- package/src/components/message-toast/message-toast-state.ts +167 -0
- package/src/components/page-header/PageHeader.vue +52 -0
- package/src/components/page-header/index.ts +2 -0
- package/src/components/progress-component/ProgressComponent.vue +45 -0
- package/{dist/components/progress-component/index.d.ts → src/components/progress-component/index.ts} +1 -1
- package/src/components/single-value-card/SingleValueCard.vue +51 -0
- package/{dist/components/single-value-card/index.d.ts → src/components/single-value-card/index.ts} +1 -1
- package/src/components/slider-form-component/SliderFormComponent.vue +71 -0
- package/src/components/slider-form-component/index.ts +2 -0
- package/src/components/switch-form-component/SwitchFormComponent.vue +39 -0
- package/src/components/switch-form-component/index.ts +2 -0
- package/src/components/text-link/TextLink.vue +33 -0
- package/src/components/text-link/index.ts +2 -0
- package/src/components/theme-selector/ThemeSelector.vue +129 -0
- package/src/components/theme-selector/index.ts +2 -0
- package/src/components/ui/alert/Alert.vue +17 -0
- package/src/components/ui/alert/AlertDescription.vue +14 -0
- package/src/components/ui/alert/AlertTitle.vue +14 -0
- package/src/components/ui/alert/index.ts +15 -0
- package/src/components/ui/alert-dialog/AlertDialog.vue +15 -0
- package/src/components/ui/alert-dialog/AlertDialogAction.vue +18 -0
- package/src/components/ui/alert-dialog/AlertDialogCancel.vue +22 -0
- package/src/components/ui/alert-dialog/AlertDialogContent.vue +36 -0
- package/src/components/ui/alert-dialog/AlertDialogDescription.vue +19 -0
- package/src/components/ui/alert-dialog/AlertDialogFooter.vue +18 -0
- package/src/components/ui/alert-dialog/AlertDialogHeader.vue +14 -0
- package/src/components/ui/alert-dialog/AlertDialogTitle.vue +17 -0
- package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +12 -0
- package/src/components/ui/alert-dialog/index.ts +9 -0
- package/src/components/ui/badge/Badge.vue +26 -0
- package/src/components/ui/badge/index.ts +1 -0
- package/src/components/ui/breadcrumb/Breadcrumb.vue +17 -0
- package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +24 -0
- package/src/components/ui/breadcrumb/BreadcrumbItem.vue +17 -0
- package/src/components/ui/breadcrumb/BreadcrumbLink.vue +21 -0
- package/src/components/ui/breadcrumb/BreadcrumbList.vue +17 -0
- package/src/components/ui/breadcrumb/BreadcrumbPage.vue +20 -0
- package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
- package/src/components/ui/breadcrumb/index.ts +7 -0
- package/src/components/ui/busy/Busy.vue +45 -0
- package/src/components/ui/busy/index.ts +1 -0
- package/src/components/ui/button/Button.vue +24 -0
- package/src/components/ui/button/index.ts +41 -0
- package/src/components/ui/calendar/Calendar.vue +139 -0
- package/src/components/ui/calendar/CalendarCell.vue +23 -0
- package/src/components/ui/calendar/CalendarCellTrigger.vue +39 -0
- package/src/components/ui/calendar/CalendarGrid.vue +23 -0
- package/src/components/ui/calendar/CalendarGridBody.vue +15 -0
- package/src/components/ui/calendar/CalendarGridHead.vue +16 -0
- package/src/components/ui/calendar/CalendarGridRow.vue +22 -0
- package/src/components/ui/calendar/CalendarHeadCell.vue +23 -0
- package/src/components/ui/calendar/CalendarHeader.vue +23 -0
- package/src/components/ui/calendar/CalendarHeading.vue +30 -0
- package/src/components/ui/calendar/CalendarNextButton.vue +32 -0
- package/src/components/ui/calendar/CalendarPrevButton.vue +32 -0
- package/src/components/ui/calendar/index.ts +14 -0
- package/src/components/ui/card/Card.vue +31 -0
- package/src/components/ui/card/CardAction.vue +14 -0
- package/src/components/ui/card/CardContent.vue +14 -0
- package/src/components/ui/card/CardDescription.vue +14 -0
- package/src/components/ui/card/CardFooter.vue +14 -0
- package/src/components/ui/card/CardHeader.vue +14 -0
- package/src/components/ui/card/CardText.vue +14 -0
- package/src/components/ui/card/CardTitle.vue +14 -0
- package/src/components/ui/card/index.ts +8 -0
- package/src/components/ui/command/Command.vue +83 -0
- package/src/components/ui/command/CommandDialog.vue +31 -0
- package/src/components/ui/command/CommandEmpty.vue +27 -0
- package/src/components/ui/command/CommandGroup.vue +47 -0
- package/src/components/ui/command/CommandInput.vue +31 -0
- package/src/components/ui/command/CommandItem.vue +76 -0
- package/src/components/ui/command/CommandList.vue +25 -0
- package/src/components/ui/command/CommandSeparator.vue +17 -0
- package/src/components/ui/command/CommandShortcut.vue +14 -0
- package/src/components/ui/command/index.ts +25 -0
- package/src/components/ui/date-picker/DatePicker.vue +67 -0
- package/src/components/ui/date-picker/index.ts +2 -0
- package/src/components/ui/date-time-picker/DateTimePicker.vue +170 -0
- package/{dist/components/ui/date-time-picker/index.d.ts → src/components/ui/date-time-picker/index.ts} +2 -2
- package/src/components/ui/dialog/Dialog.vue +15 -0
- package/src/components/ui/dialog/DialogClose.vue +15 -0
- package/src/components/ui/dialog/DialogContent.vue +54 -0
- package/src/components/ui/dialog/DialogDescription.vue +19 -0
- package/src/components/ui/dialog/DialogFooter.vue +18 -0
- package/src/components/ui/dialog/DialogHeader.vue +14 -0
- package/src/components/ui/dialog/DialogOverlay.vue +17 -0
- package/src/components/ui/dialog/DialogScrollContent.vue +57 -0
- package/src/components/ui/dialog/DialogTitle.vue +19 -0
- package/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/src/components/ui/dialog/index.ts +10 -0
- package/src/components/ui/field/Field.vue +20 -0
- package/src/components/ui/field/FieldContent.vue +17 -0
- package/src/components/ui/field/FieldDescription.vue +19 -0
- package/src/components/ui/field/FieldError.vue +48 -0
- package/src/components/ui/field/FieldGroup.vue +17 -0
- package/src/components/ui/field/FieldLabel.vue +20 -0
- package/src/components/ui/field/FieldLegend.vue +20 -0
- package/src/components/ui/field/FieldSeparator.vue +21 -0
- package/src/components/ui/field/FieldSet.vue +18 -0
- package/src/components/ui/field/FieldTitle.vue +17 -0
- package/src/components/ui/field/index.ts +41 -0
- package/src/components/ui/input/Input.vue +29 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/label/Label.vue +21 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/native-select/NativeSelect.vue +52 -0
- package/src/components/ui/native-select/NativeSelectOptGroup.vue +12 -0
- package/src/components/ui/native-select/NativeSelectOption.vue +12 -0
- package/src/components/ui/native-select/index.ts +3 -0
- package/src/components/ui/popover/Popover.vue +15 -0
- package/src/components/ui/popover/PopoverAnchor.vue +12 -0
- package/src/components/ui/popover/PopoverContent.vue +40 -0
- package/src/components/ui/popover/PopoverTrigger.vue +12 -0
- package/src/components/ui/popover/index.ts +4 -0
- package/src/components/ui/progress/Progress.vue +38 -0
- package/src/components/ui/progress/index.ts +1 -0
- package/src/components/ui/scroll-area/ScrollArea.vue +33 -0
- package/src/components/ui/scroll-area/ScrollBar.vue +32 -0
- package/src/components/ui/scroll-area/index.ts +2 -0
- package/src/components/ui/select/Select.vue +15 -0
- package/src/components/ui/select/SelectContent.vue +50 -0
- package/src/components/ui/select/SelectGroup.vue +12 -0
- package/src/components/ui/select/SelectItem.vue +50 -0
- package/src/components/ui/select/SelectItemContent.vue +40 -0
- package/src/components/ui/select/SelectItemText.vue +12 -0
- package/src/components/ui/select/SelectLabel.vue +14 -0
- package/src/components/ui/select/SelectScrollDownButton.vue +23 -0
- package/src/components/ui/select/SelectScrollUpButton.vue +23 -0
- package/src/components/ui/select/SelectSeparator.vue +15 -0
- package/src/components/ui/select/SelectTrigger.vue +31 -0
- package/src/components/ui/select/SelectValue.vue +12 -0
- package/src/components/ui/select/SelectValueContent.vue +44 -0
- package/src/components/ui/select/index.ts +13 -0
- package/src/components/ui/separator/Separator.vue +24 -0
- package/src/components/ui/separator/index.ts +1 -0
- package/src/components/ui/sheet/Sheet.vue +15 -0
- package/src/components/ui/sheet/SheetClose.vue +12 -0
- package/src/components/ui/sheet/SheetContent.vue +49 -0
- package/src/components/ui/sheet/SheetDescription.vue +17 -0
- package/src/components/ui/sheet/SheetFooter.vue +12 -0
- package/src/components/ui/sheet/SheetHeader.vue +12 -0
- package/src/components/ui/sheet/SheetOverlay.vue +17 -0
- package/src/components/ui/sheet/SheetTitle.vue +17 -0
- package/src/components/ui/sheet/SheetTrigger.vue +12 -0
- package/src/components/ui/sheet/index.ts +8 -0
- package/src/components/ui/sidebar/Sidebar.vue +77 -0
- package/src/components/ui/sidebar/SidebarContent.vue +14 -0
- package/src/components/ui/sidebar/SidebarFooter.vue +14 -0
- package/src/components/ui/sidebar/SidebarGroup.vue +14 -0
- package/src/components/ui/sidebar/SidebarGroupAction.vue +21 -0
- package/src/components/ui/sidebar/SidebarGroupContent.vue +14 -0
- package/src/components/ui/sidebar/SidebarGroupLabel.vue +19 -0
- package/src/components/ui/sidebar/SidebarHeader.vue +14 -0
- package/src/components/ui/sidebar/SidebarInput.vue +18 -0
- package/src/components/ui/sidebar/SidebarInset.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenu.vue +14 -0
- package/src/components/ui/sidebar/SidebarMenuAction.vue +30 -0
- package/src/components/ui/sidebar/SidebarMenuBadge.vue +23 -0
- package/src/components/ui/sidebar/SidebarMenuButton.vue +44 -0
- package/src/components/ui/sidebar/SidebarMenuButtonChild.vue +27 -0
- package/src/components/ui/sidebar/SidebarMenuItem.vue +14 -0
- package/src/components/ui/sidebar/SidebarMenuSkeleton.vue +20 -0
- package/src/components/ui/sidebar/SidebarMenuSub.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuSubButton.vue +28 -0
- package/src/components/ui/sidebar/SidebarMenuSubItem.vue +14 -0
- package/src/components/ui/sidebar/SidebarProvider.vue +79 -0
- package/src/components/ui/sidebar/SidebarRail.vue +25 -0
- package/src/components/ui/sidebar/SidebarSeparator.vue +15 -0
- package/src/components/ui/sidebar/SidebarTrigger.vue +21 -0
- package/src/components/ui/sidebar/index.ts +64 -0
- package/src/components/ui/sidebar/utils.ts +19 -0
- package/src/components/ui/skeleton/Skeleton.vue +14 -0
- package/src/components/ui/skeleton/index.ts +1 -0
- package/src/components/ui/slider/Slider.vue +27 -0
- package/src/components/ui/slider/index.ts +1 -0
- package/src/components/ui/switch/Switch.vue +30 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/table/Table.vue +16 -0
- package/src/components/ui/table/TableBody.vue +17 -0
- package/src/components/ui/table/TableCaption.vue +17 -0
- package/src/components/ui/table/TableCell.vue +22 -0
- package/src/components/ui/table/TableEmpty.vue +34 -0
- package/src/components/ui/table/TableFooter.vue +17 -0
- package/src/components/ui/table/TableHead.vue +17 -0
- package/src/components/ui/table/TableHeader.vue +17 -0
- package/src/components/ui/table/TableRow.vue +17 -0
- package/src/components/ui/table/index.ts +9 -0
- package/src/components/ui/tabs/Tabs.vue +24 -0
- package/src/components/ui/tabs/TabsContent.vue +21 -0
- package/src/components/ui/tabs/TabsList.vue +24 -0
- package/src/components/ui/tabs/TabsTrigger.vue +26 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/textarea/Textarea.vue +29 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/components/ui/time-picker/TimePicker.vue +56 -0
- package/src/components/ui/time-picker/index.ts +2 -0
- package/src/components/ui/tooltip/Tooltip.vue +15 -0
- package/src/components/ui/tooltip/TooltipContent.vue +30 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +12 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/{dist/i18n/de.json.d.ts → src/i18n/de.json} +2 -4
- package/{dist/i18n/en.json.d.ts → src/i18n/en.json} +2 -4
- package/{dist/i18n/es.json.d.ts → src/i18n/es.json} +2 -4
- package/{dist/i18n/fr.json.d.ts → src/i18n/fr.json} +2 -4
- package/{dist/i18n/it.json.d.ts → src/i18n/it.json} +2 -4
- package/{dist/i18n/ja.json.d.ts → src/i18n/ja.json} +2 -4
- package/{dist/i18n/pt.json.d.ts → src/i18n/pt.json} +2 -4
- package/{dist/i18n/ru.json.d.ts → src/i18n/ru.json} +2 -4
- package/{dist/i18n/zh.json.d.ts → src/i18n/zh.json} +2 -4
- package/src/lib/color-tokens.ts +51 -0
- package/src/lib/i18n.ts +85 -0
- package/src/lib/utils.ts +29 -0
- package/src/nuxt-components.d.ts +5 -0
- package/src/runtime/ui-vintage-i18n-plugin.js +48 -0
- package/src/shims-vue.d.ts +5 -0
- package/src/styles.css +224 -0
- package/dist/AlertDialogTitle.vue_vue_type_script_setup_true_lang-DhRDOi2d.js +0 -361
- package/dist/BackgroundGrid-BJDDcLzF.js +0 -13
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DH_klSVA.js +0 -33
- package/dist/Busy-BOXgYrox.js +0 -55
- package/dist/BusyIndicator-D-4YHN2L.js +0 -4
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-C6OtvF0h.js +0 -3800
- package/dist/Card.vue_vue_type_script_setup_true_lang-CZhFtxSD.js +0 -30
- package/dist/CardContent.vue_vue_type_script_setup_true_lang-BxI0-dse.js +0 -22
- package/dist/CardFooter.vue_vue_type_script_setup_true_lang-LFjBZHcl.js +0 -22
- package/dist/CardText.vue_vue_type_script_setup_true_lang-zUPNe9HY.js +0 -22
- package/dist/ChineseFlag-CVrOCbRz.js +0 -18
- package/dist/Collection-4P3HQ4uU.js +0 -76
- package/dist/ConfigProvider-DYO65bNW.js +0 -6
- package/dist/ConfirmDialog-Zu4m9TY-.js +0 -4
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-CzMhKnrj.js +0 -88
- package/dist/DialogClose-DxCTEp0d.js +0 -36
- package/dist/DialogPortal-BiMJAKLg.js +0 -36
- package/dist/DialogTitle-jKgSCoXM.js +0 -526
- package/dist/DialogTitle.vue_vue_type_script_setup_true_lang-D0Ephm9c.js +0 -184
- package/dist/DialogTrigger-Cb3rLcid.js +0 -52
- package/dist/EmptyStateCard.vue_vue_type_script_setup_true_lang-CH3ODMDF.js +0 -59
- package/dist/EnglishFlag-BrpG8XMW.js +0 -18
- package/dist/FocusScope-mzbqk6Y_.js +0 -448
- package/dist/FrenchFlag-CUdQacS3.js +0 -35
- package/dist/GermanFlag-Bc1CeEHw.js +0 -35
- package/dist/HugeiconsIcon.vue-By2RXWWz.js +0 -111
- package/dist/Input.vue_vue_type_script_setup_true_lang-BGGOqKHs.js +0 -37
- package/dist/ItalianFlag-BAdg13z7.js +0 -34
- package/dist/JapaneseFlag-Dnd2ITzZ.js +0 -27
- package/dist/Label.vue_vue_type_script_setup_true_lang-BzD7wUHQ.js +0 -65
- package/dist/LandingContent.vue_vue_type_script_setup_true_lang-BySDoKff.js +0 -21
- package/dist/LandingFooter.vue_vue_type_script_setup_true_lang-D1_ZjIFj.js +0 -159
- package/dist/LandingNavbar.vue_vue_type_script_setup_true_lang-Cu_ksJtE.js +0 -63
- package/dist/LandingShell.vue_vue_type_script_setup_true_lang-D6n-hLum.js +0 -49
- package/dist/LoadMoreButton.vue_vue_type_script_setup_true_lang-Be0obsa3.js +0 -61
- package/dist/LoadingStateCard.vue_vue_type_script_setup_true_lang-CwCrRir_.js +0 -53
- package/dist/MessageDialog-ChS4d2qN.js +0 -4
- package/dist/MessageToast-CMvpwf2m.js +0 -79
- package/dist/NativeSelectOption.vue_vue_type_script_setup_true_lang-CcnlTqUN.js +0 -75
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-Bu5YDhSO.js +0 -801
- package/dist/PopperContent-DUJ8a4i0.js +0 -2144
- package/dist/PortugueseFlag-DU2jEbaQ.js +0 -19
- package/dist/Presence-CTmUEdMR.js +0 -168
- package/dist/Primitive-D3IcFg81.js +0 -61
- package/dist/Progress.vue_vue_type_script_setup_true_lang-ZKUFAYop.js +0 -188
- package/dist/RussianFlag-Cnc4PHmq.js +0 -29
- package/dist/Separator-CFm_M4pb.js +0 -87
- package/dist/Separator.vue_vue_type_script_setup_true_lang-BDH2gelV.js +0 -29
- package/dist/SheetTitle.vue_vue_type_script_setup_true_lang-DZ-80X9J.js +0 -167
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CK-Q0Oxk.js +0 -20
- package/dist/Slider.vue_vue_type_script_setup_true_lang-Cz1oQX11.js +0 -803
- package/dist/SpanishFlag-Dy-C9kGk.js +0 -28
- package/dist/Switch.vue_vue_type_script_setup_true_lang-BzUQzI2p.js +0 -227
- package/dist/TableHeader.vue_vue_type_script_setup_true_lang-BMHYThM4.js +0 -123
- package/dist/Teleport-DTOwRCqx.js +0 -315
- package/dist/TimePicker.vue_vue_type_script_setup_true_lang-C3Ww9XT5.js +0 -51
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CIBac9lA.js +0 -1120
- package/dist/VisuallyHidden-udQT2Fmo.js +0 -60
- package/dist/VisuallyHiddenInput-D5eipDQU.js +0 -142
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +0 -10
- package/dist/alert-dialog.js +0 -165
- package/dist/alert.js +0 -66
- package/dist/background-grid.js +0 -5
- package/dist/badge.js +0 -4
- package/dist/blog.js +0 -938
- package/dist/breadcrumb.js +0 -159
- package/dist/busy-indicator.js +0 -66
- package/dist/busy.js +0 -4
- package/dist/button.js +0 -67
- package/dist/calendar.js +0 -15
- package/dist/card-grid.js +0 -58
- package/dist/card.js +0 -84
- package/dist/chip.js +0 -47
- package/dist/clamp-D5Ye0kJT.js +0 -6
- package/dist/color-tokens-D9BviGPK.js +0 -40
- package/dist/command.js +0 -1099
- package/dist/components/background-grid/BackgroundGrid.vue.d.ts +0 -2
- package/dist/components/background-grid/index.d.ts +0 -2
- package/dist/components/busy-indicator/BusyIndicator.vue.d.ts +0 -2
- package/dist/components/busy-indicator/busy-indicator-state.d.ts +0 -15
- package/dist/components/busy-indicator/index.d.ts +0 -3
- package/dist/components/card-grid/CardGrid.vue.d.ts +0 -88
- package/dist/components/card-grid/index.d.ts +0 -2
- package/dist/components/chip/Chip.vue.d.ts +0 -17
- package/dist/components/chip/index.d.ts +0 -2
- package/dist/components/confirm-dialog/ConfirmDialog.vue.d.ts +0 -2
- package/dist/components/confirm-dialog/confirm-dialog-state.d.ts +0 -40
- package/dist/components/confirm-dialog/index.d.ts +0 -3
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +0 -67
- package/dist/components/dashboard-shell/index.d.ts +0 -2
- package/dist/components/data-list/DataList.vue.d.ts +0 -21
- package/dist/components/data-list/DataListItem.vue.d.ts +0 -21
- package/dist/components/data-list/DataListLabel.vue.d.ts +0 -21
- package/dist/components/data-list/DataListText.vue.d.ts +0 -21
- package/dist/components/data-list/DataListValue.vue.d.ts +0 -21
- package/dist/components/data-list/index.d.ts +0 -5
- package/dist/components/empty-state-card/EmptyStateCard.vue.d.ts +0 -73
- package/dist/components/error-page/ErrorPage.vue.d.ts +0 -51
- package/dist/components/error-page/index.d.ts +0 -2
- package/dist/components/info-card/InfoCard.vue.d.ts +0 -46
- package/dist/components/info-card/index.d.ts +0 -2
- package/dist/components/landing/index.d.ts +0 -6
- package/dist/components/landing/landing-content/LandingContent.vue.d.ts +0 -21
- package/dist/components/landing/landing-content/index.d.ts +0 -2
- package/dist/components/landing/landing-footer/LandingFooter.vue.d.ts +0 -39
- package/dist/components/landing/landing-footer/index.d.ts +0 -3
- package/dist/components/landing/landing-navbar/LandingNavbar.vue.d.ts +0 -32
- package/dist/components/landing/landing-navbar/index.d.ts +0 -2
- package/dist/components/landing/landing-shell/LandingShell.vue.d.ts +0 -31
- package/dist/components/landing/landing-shell/index.d.ts +0 -2
- package/dist/components/language-flag/LanguageFlag.vue.d.ts +0 -14
- package/dist/components/language-flag/flags/ChineseFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/EnglishFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/FrenchFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/GermanFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/ItalianFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/JapaneseFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/PortugueseFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/RussianFlag.vue.d.ts +0 -2
- package/dist/components/language-flag/flags/SpanishFlag.vue.d.ts +0 -2
- package/dist/components/language-selector/LanguageSelector.vue.d.ts +0 -31
- package/dist/components/load-more-button/LoadMoreButton.vue.d.ts +0 -36
- package/dist/components/loading-state-card/LoadingStateCard.vue.d.ts +0 -55
- package/dist/components/message-dialog/MessageDialog.vue.d.ts +0 -2
- package/dist/components/message-dialog/index.d.ts +0 -3
- package/dist/components/message-dialog/message-dialog-state.d.ts +0 -30
- package/dist/components/message-toast/MessageToast.vue.d.ts +0 -2
- package/dist/components/message-toast/index.d.ts +0 -2
- package/dist/components/message-toast/message-toast-state.d.ts +0 -18
- package/dist/components/page-header/PageHeader.vue.d.ts +0 -48
- package/dist/components/page-header/index.d.ts +0 -2
- package/dist/components/progress-component/ProgressComponent.vue.d.ts +0 -47
- package/dist/components/single-value-card/SingleValueCard.vue.d.ts +0 -40
- package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +0 -23
- package/dist/components/slider-form-component/index.d.ts +0 -2
- package/dist/components/switch-form-component/SwitchFormComponent.vue.d.ts +0 -12
- package/dist/components/switch-form-component/index.d.ts +0 -2
- package/dist/components/text-link/TextLink.vue.d.ts +0 -35
- package/dist/components/text-link/index.d.ts +0 -2
- package/dist/components/theme-selector/ThemeSelector.vue.d.ts +0 -2
- package/dist/components/theme-selector/index.d.ts +0 -2
- package/dist/components/ui/alert/Alert.vue.d.ts +0 -23
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +0 -21
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +0 -21
- package/dist/components/ui/alert/index.d.ts +0 -9
- package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +0 -25
- package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +0 -22
- package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +0 -22
- package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +0 -36
- package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +0 -22
- package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +0 -21
- package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +0 -21
- package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +0 -22
- package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +0 -18
- package/dist/components/ui/alert-dialog/index.d.ts +0 -9
- package/dist/components/ui/badge/Badge.vue.d.ts +0 -16
- package/dist/components/ui/badge/index.d.ts +0 -1
- package/dist/components/ui/breadcrumb/Breadcrumb.vue.d.ts +0 -21
- package/dist/components/ui/breadcrumb/BreadcrumbEllipsis.vue.d.ts +0 -21
- package/dist/components/ui/breadcrumb/BreadcrumbItem.vue.d.ts +0 -21
- package/dist/components/ui/breadcrumb/BreadcrumbLink.vue.d.ts +0 -24
- package/dist/components/ui/breadcrumb/BreadcrumbList.vue.d.ts +0 -21
- package/dist/components/ui/breadcrumb/BreadcrumbPage.vue.d.ts +0 -21
- package/dist/components/ui/breadcrumb/BreadcrumbSeparator.vue.d.ts +0 -21
- package/dist/components/ui/breadcrumb/index.d.ts +0 -7
- package/dist/components/ui/busy/Busy.vue.d.ts +0 -27
- package/dist/components/ui/busy/index.d.ts +0 -1
- package/dist/components/ui/button/Button.vue.d.ts +0 -27
- package/dist/components/ui/button/index.d.ts +0 -7
- package/dist/components/ui/calendar/Calendar.vue.d.ts +0 -44
- package/dist/components/ui/calendar/CalendarCell.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarCellTrigger.vue.d.ts +0 -24
- package/dist/components/ui/calendar/CalendarGrid.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarGridBody.vue.d.ts +0 -18
- package/dist/components/ui/calendar/CalendarGridHead.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarGridRow.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarHeadCell.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarHeader.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarHeading.vue.d.ts +0 -28
- package/dist/components/ui/calendar/CalendarNextButton.vue.d.ts +0 -22
- package/dist/components/ui/calendar/CalendarPrevButton.vue.d.ts +0 -22
- package/dist/components/ui/calendar/index.d.ts +0 -13
- package/dist/components/ui/card/Card.vue.d.ts +0 -24
- package/dist/components/ui/card/CardAction.vue.d.ts +0 -21
- package/dist/components/ui/card/CardContent.vue.d.ts +0 -21
- package/dist/components/ui/card/CardDescription.vue.d.ts +0 -21
- package/dist/components/ui/card/CardFooter.vue.d.ts +0 -21
- package/dist/components/ui/card/CardHeader.vue.d.ts +0 -21
- package/dist/components/ui/card/CardText.vue.d.ts +0 -21
- package/dist/components/ui/card/CardTitle.vue.d.ts +0 -21
- package/dist/components/ui/card/index.d.ts +0 -8
- package/dist/components/ui/command/Command.vue.d.ts +0 -40
- package/dist/components/ui/command/CommandDialog.vue.d.ts +0 -32
- package/dist/components/ui/command/CommandEmpty.vue.d.ts +0 -22
- package/dist/components/ui/command/CommandGroup.vue.d.ts +0 -23
- package/dist/components/ui/command/CommandInput.vue.d.ts +0 -7
- package/dist/components/ui/command/CommandItem.vue.d.ts +0 -30
- package/dist/components/ui/command/CommandList.vue.d.ts +0 -22
- package/dist/components/ui/command/CommandSeparator.vue.d.ts +0 -22
- package/dist/components/ui/command/CommandShortcut.vue.d.ts +0 -21
- package/dist/components/ui/command/index.d.ts +0 -90
- package/dist/components/ui/date-picker/DatePicker.vue.d.ts +0 -21
- package/dist/components/ui/date-picker/index.d.ts +0 -2
- package/dist/components/ui/date-time-picker/DateTimePicker.vue.d.ts +0 -27
- package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -25
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -18
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -39
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +0 -22
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -21
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -21
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +0 -22
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +0 -39
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -22
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -18
- package/dist/components/ui/dialog/index.d.ts +0 -10
- package/dist/components/ui/field/Field.vue.d.ts +0 -23
- package/dist/components/ui/field/FieldContent.vue.d.ts +0 -21
- package/dist/components/ui/field/FieldDescription.vue.d.ts +0 -21
- package/dist/components/ui/field/FieldError.vue.d.ts +0 -24
- package/dist/components/ui/field/FieldGroup.vue.d.ts +0 -21
- package/dist/components/ui/field/FieldLabel.vue.d.ts +0 -21
- package/dist/components/ui/field/FieldLegend.vue.d.ts +0 -22
- package/dist/components/ui/field/FieldSeparator.vue.d.ts +0 -21
- package/dist/components/ui/field/FieldSet.vue.d.ts +0 -21
- package/dist/components/ui/field/FieldTitle.vue.d.ts +0 -21
- package/dist/components/ui/field/index.d.ts +0 -15
- package/dist/components/ui/input/Input.vue.d.ts +0 -12
- package/dist/components/ui/input/index.d.ts +0 -1
- package/dist/components/ui/label/Label.vue.d.ts +0 -22
- package/dist/components/ui/label/index.d.ts +0 -1
- package/dist/components/ui/native-select/NativeSelect.vue.d.ts +0 -27
- package/dist/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +0 -21
- package/dist/components/ui/native-select/NativeSelectOption.vue.d.ts +0 -21
- package/dist/components/ui/native-select/index.d.ts +0 -3
- package/dist/components/ui/popover/Popover.vue.d.ts +0 -25
- package/dist/components/ui/popover/PopoverAnchor.vue.d.ts +0 -18
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -39
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -18
- package/dist/components/ui/popover/index.d.ts +0 -4
- package/dist/components/ui/progress/Progress.vue.d.ts +0 -9
- package/dist/components/ui/progress/index.d.ts +0 -1
- package/dist/components/ui/scroll-area/ScrollArea.vue.d.ts +0 -22
- package/dist/components/ui/scroll-area/ScrollBar.vue.d.ts +0 -9
- package/dist/components/ui/scroll-area/index.d.ts +0 -2
- package/dist/components/ui/select/Select.vue.d.ts +0 -28
- package/dist/components/ui/select/SelectContent.vue.d.ts +0 -35
- package/dist/components/ui/select/SelectGroup.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectItem.vue.d.ts +0 -24
- package/dist/components/ui/select/SelectItemContent.vue.d.ts +0 -15
- package/dist/components/ui/select/SelectItemText.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectLabel.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +0 -7
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +0 -25
- package/dist/components/ui/select/SelectValue.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectValueContent.vue.d.ts +0 -16
- package/dist/components/ui/select/index.d.ts +0 -13
- package/dist/components/ui/separator/Separator.vue.d.ts +0 -10
- package/dist/components/ui/separator/index.d.ts +0 -1
- package/dist/components/ui/sheet/Sheet.vue.d.ts +0 -25
- package/dist/components/ui/sheet/SheetClose.vue.d.ts +0 -18
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +0 -39
- package/dist/components/ui/sheet/SheetDescription.vue.d.ts +0 -22
- package/dist/components/ui/sheet/SheetFooter.vue.d.ts +0 -21
- package/dist/components/ui/sheet/SheetHeader.vue.d.ts +0 -21
- package/dist/components/ui/sheet/SheetOverlay.vue.d.ts +0 -22
- package/dist/components/ui/sheet/SheetTitle.vue.d.ts +0 -22
- package/dist/components/ui/sheet/SheetTrigger.vue.d.ts +0 -18
- package/dist/components/ui/sheet/index.d.ts +0 -8
- package/dist/components/ui/sidebar/Sidebar.vue.d.ts +0 -25
- package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +0 -22
- package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +0 -22
- package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +0 -25
- package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +0 -27
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +0 -30
- package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +0 -7
- package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +0 -27
- package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +0 -32
- package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +0 -21
- package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +0 -6
- package/dist/components/ui/sidebar/index.d.ts +0 -38
- package/dist/components/ui/sidebar/utils.d.ts +0 -56
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +0 -6
- package/dist/components/ui/skeleton/index.d.ts +0 -1
- package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
- package/dist/components/ui/slider/index.d.ts +0 -1
- package/dist/components/ui/switch/Switch.vue.d.ts +0 -29
- package/dist/components/ui/switch/index.d.ts +0 -1
- package/dist/components/ui/table/Table.vue.d.ts +0 -21
- package/dist/components/ui/table/TableBody.vue.d.ts +0 -21
- package/dist/components/ui/table/TableCaption.vue.d.ts +0 -21
- package/dist/components/ui/table/TableCell.vue.d.ts +0 -21
- package/dist/components/ui/table/TableEmpty.vue.d.ts +0 -24
- package/dist/components/ui/table/TableFooter.vue.d.ts +0 -21
- package/dist/components/ui/table/TableHead.vue.d.ts +0 -21
- package/dist/components/ui/table/TableHeader.vue.d.ts +0 -21
- package/dist/components/ui/table/TableRow.vue.d.ts +0 -21
- package/dist/components/ui/table/index.d.ts +0 -9
- package/dist/components/ui/tabs/Tabs.vue.d.ts +0 -28
- package/dist/components/ui/tabs/TabsContent.vue.d.ts +0 -22
- package/dist/components/ui/tabs/TabsList.vue.d.ts +0 -22
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +0 -22
- package/dist/components/ui/tabs/index.d.ts +0 -4
- package/dist/components/ui/textarea/Textarea.vue.d.ts +0 -12
- package/dist/components/ui/textarea/index.d.ts +0 -1
- package/dist/components/ui/time-picker/TimePicker.vue.d.ts +0 -21
- package/dist/components/ui/time-picker/index.d.ts +0 -2
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +0 -24
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +0 -30
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +0 -20
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +0 -18
- package/dist/components/ui/tooltip/index.d.ts +0 -4
- package/dist/confirm-dialog.js +0 -228
- package/dist/content.js +0 -210
- package/dist/createContext-BabAT1K8.js +0 -19
- package/dist/dashboard-shell.js +0 -231
- package/dist/data-list.js +0 -97
- package/dist/date-picker.js +0 -5
- package/dist/date-time-picker.js +0 -140
- package/dist/dialog.js +0 -147
- package/dist/empty-state-card.js +0 -5
- package/dist/error-page.js +0 -115
- package/dist/field.js +0 -294
- package/dist/getActiveElement-Bmy6QsUb.js +0 -9
- package/dist/i18n.js +0 -778
- package/dist/index-DDJjWaIl.js +0 -363
- package/dist/index-DDurQzrB.js +0 -44
- package/dist/index-Dw56kNV0.js +0 -251
- package/dist/index.min-CUZWqaEQ.js +0 -32
- package/dist/info-card.js +0 -65
- package/dist/input.js +0 -4
- package/dist/label.js +0 -4
- package/dist/landing-content.js +0 -5
- package/dist/landing-footer.js +0 -5
- package/dist/landing-navbar.js +0 -5
- package/dist/landing-shell.js +0 -5
- package/dist/landing.js +0 -11
- package/dist/language-flag.js +0 -61
- package/dist/language-selector.js +0 -169
- package/dist/lib/color-tokens.d.ts +0 -6
- package/dist/lib/i18n.d.ts +0 -1417
- package/dist/lib/utils.d.ts +0 -3
- package/dist/load-more-button.js +0 -5
- package/dist/loading-state-card.js +0 -5
- package/dist/message-dialog.js +0 -226
- package/dist/message-toast.js +0 -103
- package/dist/native-select.js +0 -25
- package/dist/nullish-D3tMkl6i.js +0 -6
- package/dist/page-header.js +0 -57
- package/dist/popover.js +0 -65
- package/dist/progress-component.js +0 -51
- package/dist/progress.js +0 -4
- package/dist/scroll-area.js +0 -1080
- package/dist/select.js +0 -2222
- package/dist/separator.js +0 -4
- package/dist/sheet.js +0 -68
- package/dist/sidebar.js +0 -807
- package/dist/single-value-card.js +0 -64
- package/dist/skeleton.js +0 -4
- package/dist/slider-form-component.js +0 -60
- package/dist/slider.js +0 -4
- package/dist/style.css +0 -5705
- package/dist/style.d.ts +0 -0
- package/dist/style.js +0 -1
- package/dist/switch-form-component.js +0 -40
- package/dist/switch.js +0 -4
- package/dist/table.js +0 -82
- package/dist/tabs.js +0 -658
- package/dist/text-link.js +0 -39
- package/dist/textarea.js +0 -37
- package/dist/theme-selector.js +0 -159
- package/dist/time-picker.js +0 -5
- package/dist/tooltip.js +0 -32
- package/dist/useDirection-B2bMgzzV.js +0 -12
- package/dist/useFocusGuards-2C1jyYW5.js +0 -29
- package/dist/useFormControl-DZ4LnB9F.js +0 -11
- package/dist/useForwardExpose-BcX3VRdS.js +0 -58
- package/dist/useForwardPropsEmits-GlUGKcIz.js +0 -47
- package/dist/useId-CF6wz41D.js +0 -16
- package/dist/useKbd-JjFOu4f7.js +0 -41
- package/dist/useNonce-CWj1JlPB.js +0 -12
- package/dist/usePrimitiveElement-BCpwlakH.js +0 -16
- package/dist/useSize-DUgGY9t1.js +0 -51
- package/dist/useTypeahead-4RK0Emcv.js +0 -159
- package/dist/utils-DbR1EZn-.js +0 -16
- package/dist/utils-DbYZ4xaD.js +0 -3204
- package/dist/utils-hdwtyAF3.js +0 -44
- package/dist/utils.js +0 -5
package/dist/select.js
DELETED
|
@@ -1,2222 +0,0 @@
|
|
|
1
|
-
import { defineComponent, toRefs, ref, computed, openBlock, createBlock, unref, withCtx, renderSlot, createElementBlock, createCommentVNode, Fragment, renderList, mergeProps, watch, createElementVNode, watchEffect, createVNode, withModifiers, resolveDynamicComponent, onMounted, nextTick, normalizeStyle, normalizeProps, guardReactiveProps, Teleport, createTextVNode, onUnmounted, onBeforeUnmount, toDisplayString, normalizeClass } from "vue";
|
|
2
|
-
import { a as useForwardProps, u as useForwardPropsEmits } from "./useForwardPropsEmits-GlUGKcIz.js";
|
|
3
|
-
import { c as createContext } from "./createContext-BabAT1K8.js";
|
|
4
|
-
import { i as isNullish } from "./nullish-D3tMkl6i.js";
|
|
5
|
-
import { u as useDirection } from "./useDirection-B2bMgzzV.js";
|
|
6
|
-
import { u as useFormControl } from "./useFormControl-DZ4LnB9F.js";
|
|
7
|
-
import { u as useCollection } from "./Collection-4P3HQ4uU.js";
|
|
8
|
-
import { a as PopperRoot_default, b as PopperContent_default, P as PopperAnchor_default } from "./PopperContent-DUJ8a4i0.js";
|
|
9
|
-
import { V as VisuallyHidden_default } from "./VisuallyHidden-udQT2Fmo.js";
|
|
10
|
-
import { i as isEqual, u as useTypeahead } from "./useTypeahead-4RK0Emcv.js";
|
|
11
|
-
import { a as useVModel, u as unrefElement, e as useResizeObserver } from "./index-Dw56kNV0.js";
|
|
12
|
-
import { P as Presence_default } from "./Presence-CTmUEdMR.js";
|
|
13
|
-
import { a as useBodyScrollLock, u as useHideOthers, F as FocusScope_default } from "./FocusScope-mzbqk6Y_.js";
|
|
14
|
-
import { u as useFocusGuards } from "./useFocusGuards-2C1jyYW5.js";
|
|
15
|
-
import { D as DismissableLayer_default, h as handleAndDispatchCustomEvent, T as Teleport_default } from "./Teleport-DTOwRCqx.js";
|
|
16
|
-
import { f as focusFirst } from "./utils-DbR1EZn-.js";
|
|
17
|
-
import { c as clamp } from "./clamp-D5Ye0kJT.js";
|
|
18
|
-
import { u as useForwardExpose } from "./useForwardExpose-BcX3VRdS.js";
|
|
19
|
-
import { P as Primitive } from "./Primitive-D3IcFg81.js";
|
|
20
|
-
import { u as useNonce } from "./useNonce-CWj1JlPB.js";
|
|
21
|
-
import { c as cn } from "./utils-DbYZ4xaD.js";
|
|
22
|
-
import { T as TWr, a as dn, C as CC } from "./index.min-CUZWqaEQ.js";
|
|
23
|
-
import { H as HugeiconsIcon } from "./HugeiconsIcon.vue-By2RXWWz.js";
|
|
24
|
-
import { g as getActiveElement } from "./getActiveElement-Bmy6QsUb.js";
|
|
25
|
-
import { r as reactiveOmit } from "./index-DDJjWaIl.js";
|
|
26
|
-
import { u as useId } from "./useId-CF6wz41D.js";
|
|
27
|
-
const OPEN_KEYS = [
|
|
28
|
-
" ",
|
|
29
|
-
"Enter",
|
|
30
|
-
"ArrowUp",
|
|
31
|
-
"ArrowDown"
|
|
32
|
-
];
|
|
33
|
-
const SELECTION_KEYS = [" ", "Enter"];
|
|
34
|
-
const CONTENT_MARGIN = 10;
|
|
35
|
-
function valueComparator(value, currentValue, comparator) {
|
|
36
|
-
if (value === void 0) return false;
|
|
37
|
-
else if (Array.isArray(value)) return value.some((val) => compare(val, currentValue, comparator));
|
|
38
|
-
else return compare(value, currentValue, comparator);
|
|
39
|
-
}
|
|
40
|
-
function compare(value, currentValue, comparator) {
|
|
41
|
-
if (value === void 0 || currentValue === void 0) return false;
|
|
42
|
-
if (typeof value === "string") return value === currentValue;
|
|
43
|
-
if (typeof comparator === "function") return comparator(value, currentValue);
|
|
44
|
-
if (typeof comparator === "string") return (value == null ? void 0 : value[comparator]) === (currentValue == null ? void 0 : currentValue[comparator]);
|
|
45
|
-
return isEqual(value, currentValue);
|
|
46
|
-
}
|
|
47
|
-
function shouldShowPlaceholder(value) {
|
|
48
|
-
return value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0;
|
|
49
|
-
}
|
|
50
|
-
const _hoisted_1$4 = {
|
|
51
|
-
key: 0,
|
|
52
|
-
value: ""
|
|
53
|
-
};
|
|
54
|
-
const [injectSelectRootContext, provideSelectRootContext] = createContext("SelectRoot");
|
|
55
|
-
var SelectRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
56
|
-
inheritAttrs: false,
|
|
57
|
-
__name: "SelectRoot",
|
|
58
|
-
props: {
|
|
59
|
-
open: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
required: false,
|
|
62
|
-
default: void 0
|
|
63
|
-
},
|
|
64
|
-
defaultOpen: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
required: false
|
|
67
|
-
},
|
|
68
|
-
defaultValue: {
|
|
69
|
-
type: null,
|
|
70
|
-
required: false
|
|
71
|
-
},
|
|
72
|
-
modelValue: {
|
|
73
|
-
type: null,
|
|
74
|
-
required: false,
|
|
75
|
-
default: void 0
|
|
76
|
-
},
|
|
77
|
-
by: {
|
|
78
|
-
type: [String, Function],
|
|
79
|
-
required: false
|
|
80
|
-
},
|
|
81
|
-
dir: {
|
|
82
|
-
type: String,
|
|
83
|
-
required: false
|
|
84
|
-
},
|
|
85
|
-
multiple: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
required: false
|
|
88
|
-
},
|
|
89
|
-
autocomplete: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: false
|
|
92
|
-
},
|
|
93
|
-
disabled: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
required: false
|
|
96
|
-
},
|
|
97
|
-
name: {
|
|
98
|
-
type: String,
|
|
99
|
-
required: false
|
|
100
|
-
},
|
|
101
|
-
required: {
|
|
102
|
-
type: Boolean,
|
|
103
|
-
required: false
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
emits: ["update:modelValue", "update:open"],
|
|
107
|
-
setup(__props, { emit: __emit }) {
|
|
108
|
-
const props = __props;
|
|
109
|
-
const emits = __emit;
|
|
110
|
-
const { required, disabled, multiple, dir: propDir } = toRefs(props);
|
|
111
|
-
const modelValue = useVModel(props, "modelValue", emits, {
|
|
112
|
-
defaultValue: props.defaultValue ?? (multiple.value ? [] : void 0),
|
|
113
|
-
passive: props.modelValue === void 0,
|
|
114
|
-
deep: true
|
|
115
|
-
});
|
|
116
|
-
const open = useVModel(props, "open", emits, {
|
|
117
|
-
defaultValue: props.defaultOpen,
|
|
118
|
-
passive: props.open === void 0
|
|
119
|
-
});
|
|
120
|
-
const triggerElement = ref();
|
|
121
|
-
const valueElement = ref();
|
|
122
|
-
const triggerPointerDownPosRef = ref({
|
|
123
|
-
x: 0,
|
|
124
|
-
y: 0
|
|
125
|
-
});
|
|
126
|
-
const isEmptyModelValue = computed(() => {
|
|
127
|
-
var _a;
|
|
128
|
-
if (multiple.value && Array.isArray(modelValue.value)) return ((_a = modelValue.value) == null ? void 0 : _a.length) === 0;
|
|
129
|
-
else return isNullish(modelValue.value);
|
|
130
|
-
});
|
|
131
|
-
useCollection({ isProvider: true });
|
|
132
|
-
const dir = useDirection(propDir);
|
|
133
|
-
const isFormControl = useFormControl(triggerElement);
|
|
134
|
-
const optionsSet = ref(/* @__PURE__ */ new Set());
|
|
135
|
-
const nativeSelectKey = computed(() => {
|
|
136
|
-
return Array.from(optionsSet.value).map((option) => option.value).join(";");
|
|
137
|
-
});
|
|
138
|
-
function handleValueChange(value) {
|
|
139
|
-
if (multiple.value) {
|
|
140
|
-
const array = Array.isArray(modelValue.value) ? [...modelValue.value] : [];
|
|
141
|
-
const index = array.findIndex((i) => compare(i, value, props.by));
|
|
142
|
-
index === -1 ? array.push(value) : array.splice(index, 1);
|
|
143
|
-
modelValue.value = [...array];
|
|
144
|
-
} else modelValue.value = value;
|
|
145
|
-
}
|
|
146
|
-
function getOption(value) {
|
|
147
|
-
return Array.from(optionsSet.value).find((option) => valueComparator(value, option.value, props.by));
|
|
148
|
-
}
|
|
149
|
-
provideSelectRootContext({
|
|
150
|
-
triggerElement,
|
|
151
|
-
onTriggerChange: (node) => {
|
|
152
|
-
triggerElement.value = node;
|
|
153
|
-
},
|
|
154
|
-
valueElement,
|
|
155
|
-
onValueElementChange: (node) => {
|
|
156
|
-
valueElement.value = node;
|
|
157
|
-
},
|
|
158
|
-
contentId: "",
|
|
159
|
-
modelValue,
|
|
160
|
-
onValueChange: handleValueChange,
|
|
161
|
-
by: props.by,
|
|
162
|
-
open,
|
|
163
|
-
multiple,
|
|
164
|
-
required,
|
|
165
|
-
onOpenChange: (value) => {
|
|
166
|
-
open.value = value;
|
|
167
|
-
},
|
|
168
|
-
dir,
|
|
169
|
-
triggerPointerDownPosRef,
|
|
170
|
-
disabled,
|
|
171
|
-
isEmptyModelValue,
|
|
172
|
-
optionsSet,
|
|
173
|
-
onOptionAdd: (option) => {
|
|
174
|
-
const existingOption = getOption(option.value);
|
|
175
|
-
if (existingOption) optionsSet.value.delete(existingOption);
|
|
176
|
-
optionsSet.value.add(option);
|
|
177
|
-
},
|
|
178
|
-
onOptionRemove: (option) => {
|
|
179
|
-
const existingOption = getOption(option.value);
|
|
180
|
-
if (existingOption) optionsSet.value.delete(existingOption);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
return (_ctx, _cache) => {
|
|
184
|
-
return openBlock(), createBlock(unref(PopperRoot_default), null, {
|
|
185
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
186
|
-
modelValue: unref(modelValue),
|
|
187
|
-
open: unref(open)
|
|
188
|
-
}), unref(isFormControl) ? (openBlock(), createBlock(BubbleSelect_default, {
|
|
189
|
-
key: nativeSelectKey.value,
|
|
190
|
-
"aria-hidden": "true",
|
|
191
|
-
tabindex: "-1",
|
|
192
|
-
multiple: unref(multiple),
|
|
193
|
-
required: unref(required),
|
|
194
|
-
name: _ctx.name,
|
|
195
|
-
autocomplete: _ctx.autocomplete,
|
|
196
|
-
disabled: unref(disabled),
|
|
197
|
-
value: unref(modelValue)
|
|
198
|
-
}, {
|
|
199
|
-
default: withCtx(() => [unref(isNullish)(unref(modelValue)) ? (openBlock(), createElementBlock("option", _hoisted_1$4)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(Array.from(optionsSet.value), (option) => {
|
|
200
|
-
return openBlock(), createElementBlock("option", mergeProps({ key: option.value ?? "" }, { ref_for: true }, option), null, 16);
|
|
201
|
-
}), 128))]),
|
|
202
|
-
_: 1
|
|
203
|
-
}, 8, [
|
|
204
|
-
"multiple",
|
|
205
|
-
"required",
|
|
206
|
-
"name",
|
|
207
|
-
"autocomplete",
|
|
208
|
-
"disabled",
|
|
209
|
-
"value"
|
|
210
|
-
])) : createCommentVNode("v-if", true)]),
|
|
211
|
-
_: 3
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
var SelectRoot_default = SelectRoot_vue_vue_type_script_setup_true_lang_default;
|
|
217
|
-
var BubbleSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
218
|
-
__name: "BubbleSelect",
|
|
219
|
-
props: {
|
|
220
|
-
autocomplete: {
|
|
221
|
-
type: String,
|
|
222
|
-
required: false
|
|
223
|
-
},
|
|
224
|
-
autofocus: {
|
|
225
|
-
type: Boolean,
|
|
226
|
-
required: false
|
|
227
|
-
},
|
|
228
|
-
disabled: {
|
|
229
|
-
type: Boolean,
|
|
230
|
-
required: false
|
|
231
|
-
},
|
|
232
|
-
form: {
|
|
233
|
-
type: String,
|
|
234
|
-
required: false
|
|
235
|
-
},
|
|
236
|
-
multiple: {
|
|
237
|
-
type: Boolean,
|
|
238
|
-
required: false
|
|
239
|
-
},
|
|
240
|
-
name: {
|
|
241
|
-
type: String,
|
|
242
|
-
required: false
|
|
243
|
-
},
|
|
244
|
-
required: {
|
|
245
|
-
type: Boolean,
|
|
246
|
-
required: false
|
|
247
|
-
},
|
|
248
|
-
size: {
|
|
249
|
-
type: Number,
|
|
250
|
-
required: false
|
|
251
|
-
},
|
|
252
|
-
value: {
|
|
253
|
-
type: null,
|
|
254
|
-
required: false
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
setup(__props) {
|
|
258
|
-
const props = __props;
|
|
259
|
-
const selectElement = ref();
|
|
260
|
-
const rootContext = injectSelectRootContext();
|
|
261
|
-
watch(() => props.value, (cur, prev) => {
|
|
262
|
-
const selectProto = window.HTMLSelectElement.prototype;
|
|
263
|
-
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
264
|
-
const setValue = descriptor.set;
|
|
265
|
-
if (cur !== prev && setValue && selectElement.value) {
|
|
266
|
-
const event = new Event("change", { bubbles: true });
|
|
267
|
-
setValue.call(selectElement.value, cur);
|
|
268
|
-
selectElement.value.dispatchEvent(event);
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
function handleInput(event) {
|
|
272
|
-
rootContext.onValueChange(event.target.value);
|
|
273
|
-
}
|
|
274
|
-
return (_ctx, _cache) => {
|
|
275
|
-
return openBlock(), createBlock(unref(VisuallyHidden_default), { "as-child": "" }, {
|
|
276
|
-
default: withCtx(() => [createElementVNode("select", mergeProps({
|
|
277
|
-
ref_key: "selectElement",
|
|
278
|
-
ref: selectElement
|
|
279
|
-
}, props, { onInput: handleInput }), [renderSlot(_ctx.$slots, "default")], 16)]),
|
|
280
|
-
_: 3
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
var BubbleSelect_default = BubbleSelect_vue_vue_type_script_setup_true_lang_default;
|
|
286
|
-
var SelectPopperPosition_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
287
|
-
__name: "SelectPopperPosition",
|
|
288
|
-
props: {
|
|
289
|
-
side: {
|
|
290
|
-
type: null,
|
|
291
|
-
required: false
|
|
292
|
-
},
|
|
293
|
-
sideOffset: {
|
|
294
|
-
type: Number,
|
|
295
|
-
required: false
|
|
296
|
-
},
|
|
297
|
-
sideFlip: {
|
|
298
|
-
type: Boolean,
|
|
299
|
-
required: false
|
|
300
|
-
},
|
|
301
|
-
align: {
|
|
302
|
-
type: null,
|
|
303
|
-
required: false,
|
|
304
|
-
default: "start"
|
|
305
|
-
},
|
|
306
|
-
alignOffset: {
|
|
307
|
-
type: Number,
|
|
308
|
-
required: false
|
|
309
|
-
},
|
|
310
|
-
alignFlip: {
|
|
311
|
-
type: Boolean,
|
|
312
|
-
required: false
|
|
313
|
-
},
|
|
314
|
-
avoidCollisions: {
|
|
315
|
-
type: Boolean,
|
|
316
|
-
required: false
|
|
317
|
-
},
|
|
318
|
-
collisionBoundary: {
|
|
319
|
-
type: null,
|
|
320
|
-
required: false
|
|
321
|
-
},
|
|
322
|
-
collisionPadding: {
|
|
323
|
-
type: [Number, Object],
|
|
324
|
-
required: false,
|
|
325
|
-
default: CONTENT_MARGIN
|
|
326
|
-
},
|
|
327
|
-
arrowPadding: {
|
|
328
|
-
type: Number,
|
|
329
|
-
required: false
|
|
330
|
-
},
|
|
331
|
-
hideShiftedArrow: {
|
|
332
|
-
type: Boolean,
|
|
333
|
-
required: false
|
|
334
|
-
},
|
|
335
|
-
sticky: {
|
|
336
|
-
type: String,
|
|
337
|
-
required: false
|
|
338
|
-
},
|
|
339
|
-
hideWhenDetached: {
|
|
340
|
-
type: Boolean,
|
|
341
|
-
required: false
|
|
342
|
-
},
|
|
343
|
-
positionStrategy: {
|
|
344
|
-
type: String,
|
|
345
|
-
required: false
|
|
346
|
-
},
|
|
347
|
-
updatePositionStrategy: {
|
|
348
|
-
type: String,
|
|
349
|
-
required: false
|
|
350
|
-
},
|
|
351
|
-
disableUpdateOnLayoutShift: {
|
|
352
|
-
type: Boolean,
|
|
353
|
-
required: false
|
|
354
|
-
},
|
|
355
|
-
prioritizePosition: {
|
|
356
|
-
type: Boolean,
|
|
357
|
-
required: false
|
|
358
|
-
},
|
|
359
|
-
reference: {
|
|
360
|
-
type: null,
|
|
361
|
-
required: false
|
|
362
|
-
},
|
|
363
|
-
asChild: {
|
|
364
|
-
type: Boolean,
|
|
365
|
-
required: false
|
|
366
|
-
},
|
|
367
|
-
as: {
|
|
368
|
-
type: null,
|
|
369
|
-
required: false
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
setup(__props) {
|
|
373
|
-
const props = __props;
|
|
374
|
-
const forwarded = useForwardProps(props);
|
|
375
|
-
return (_ctx, _cache) => {
|
|
376
|
-
return openBlock(), createBlock(unref(PopperContent_default), mergeProps(unref(forwarded), { style: {
|
|
377
|
-
"boxSizing": "border-box",
|
|
378
|
-
"--reka-select-content-transform-origin": "var(--reka-popper-transform-origin)",
|
|
379
|
-
"--reka-select-content-available-width": "var(--reka-popper-available-width)",
|
|
380
|
-
"--reka-select-content-available-height": "var(--reka-popper-available-height)",
|
|
381
|
-
"--reka-select-trigger-width": "var(--reka-popper-anchor-width)",
|
|
382
|
-
"--reka-select-trigger-height": "var(--reka-popper-anchor-height)"
|
|
383
|
-
} }), {
|
|
384
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
385
|
-
_: 3
|
|
386
|
-
}, 16);
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
var SelectPopperPosition_default = SelectPopperPosition_vue_vue_type_script_setup_true_lang_default;
|
|
391
|
-
const SelectContentDefaultContextValue = {
|
|
392
|
-
onViewportChange: () => {
|
|
393
|
-
},
|
|
394
|
-
itemTextRefCallback: () => {
|
|
395
|
-
},
|
|
396
|
-
itemRefCallback: () => {
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
const [injectSelectContentContext, provideSelectContentContext] = createContext("SelectContent");
|
|
400
|
-
var SelectContentImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
401
|
-
__name: "SelectContentImpl",
|
|
402
|
-
props: {
|
|
403
|
-
position: {
|
|
404
|
-
type: String,
|
|
405
|
-
required: false,
|
|
406
|
-
default: "item-aligned"
|
|
407
|
-
},
|
|
408
|
-
bodyLock: {
|
|
409
|
-
type: Boolean,
|
|
410
|
-
required: false,
|
|
411
|
-
default: true
|
|
412
|
-
},
|
|
413
|
-
side: {
|
|
414
|
-
type: null,
|
|
415
|
-
required: false
|
|
416
|
-
},
|
|
417
|
-
sideOffset: {
|
|
418
|
-
type: Number,
|
|
419
|
-
required: false
|
|
420
|
-
},
|
|
421
|
-
sideFlip: {
|
|
422
|
-
type: Boolean,
|
|
423
|
-
required: false
|
|
424
|
-
},
|
|
425
|
-
align: {
|
|
426
|
-
type: null,
|
|
427
|
-
required: false,
|
|
428
|
-
default: "start"
|
|
429
|
-
},
|
|
430
|
-
alignOffset: {
|
|
431
|
-
type: Number,
|
|
432
|
-
required: false
|
|
433
|
-
},
|
|
434
|
-
alignFlip: {
|
|
435
|
-
type: Boolean,
|
|
436
|
-
required: false
|
|
437
|
-
},
|
|
438
|
-
avoidCollisions: {
|
|
439
|
-
type: Boolean,
|
|
440
|
-
required: false
|
|
441
|
-
},
|
|
442
|
-
collisionBoundary: {
|
|
443
|
-
type: null,
|
|
444
|
-
required: false
|
|
445
|
-
},
|
|
446
|
-
collisionPadding: {
|
|
447
|
-
type: [Number, Object],
|
|
448
|
-
required: false
|
|
449
|
-
},
|
|
450
|
-
arrowPadding: {
|
|
451
|
-
type: Number,
|
|
452
|
-
required: false
|
|
453
|
-
},
|
|
454
|
-
hideShiftedArrow: {
|
|
455
|
-
type: Boolean,
|
|
456
|
-
required: false
|
|
457
|
-
},
|
|
458
|
-
sticky: {
|
|
459
|
-
type: String,
|
|
460
|
-
required: false
|
|
461
|
-
},
|
|
462
|
-
hideWhenDetached: {
|
|
463
|
-
type: Boolean,
|
|
464
|
-
required: false
|
|
465
|
-
},
|
|
466
|
-
positionStrategy: {
|
|
467
|
-
type: String,
|
|
468
|
-
required: false
|
|
469
|
-
},
|
|
470
|
-
updatePositionStrategy: {
|
|
471
|
-
type: String,
|
|
472
|
-
required: false
|
|
473
|
-
},
|
|
474
|
-
disableUpdateOnLayoutShift: {
|
|
475
|
-
type: Boolean,
|
|
476
|
-
required: false
|
|
477
|
-
},
|
|
478
|
-
prioritizePosition: {
|
|
479
|
-
type: Boolean,
|
|
480
|
-
required: false
|
|
481
|
-
},
|
|
482
|
-
reference: {
|
|
483
|
-
type: null,
|
|
484
|
-
required: false
|
|
485
|
-
},
|
|
486
|
-
asChild: {
|
|
487
|
-
type: Boolean,
|
|
488
|
-
required: false
|
|
489
|
-
},
|
|
490
|
-
as: {
|
|
491
|
-
type: null,
|
|
492
|
-
required: false
|
|
493
|
-
},
|
|
494
|
-
disableOutsidePointerEvents: {
|
|
495
|
-
type: Boolean,
|
|
496
|
-
required: false,
|
|
497
|
-
default: true
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
emits: [
|
|
501
|
-
"closeAutoFocus",
|
|
502
|
-
"escapeKeyDown",
|
|
503
|
-
"pointerDownOutside"
|
|
504
|
-
],
|
|
505
|
-
setup(__props, { emit: __emit }) {
|
|
506
|
-
const props = __props;
|
|
507
|
-
const emits = __emit;
|
|
508
|
-
const rootContext = injectSelectRootContext();
|
|
509
|
-
useFocusGuards();
|
|
510
|
-
useBodyScrollLock(props.bodyLock);
|
|
511
|
-
const { CollectionSlot, getItems } = useCollection();
|
|
512
|
-
const content = ref();
|
|
513
|
-
useHideOthers(content);
|
|
514
|
-
const { search, handleTypeaheadSearch } = useTypeahead();
|
|
515
|
-
const viewport = ref();
|
|
516
|
-
const selectedItem = ref();
|
|
517
|
-
const selectedItemText = ref();
|
|
518
|
-
const isPositioned = ref(false);
|
|
519
|
-
const firstValidItemFoundRef = ref(false);
|
|
520
|
-
const firstSelectedItemInArrayFoundRef = ref(false);
|
|
521
|
-
function focusSelectedItem() {
|
|
522
|
-
if (selectedItem.value && content.value) focusFirst([selectedItem.value, content.value]);
|
|
523
|
-
}
|
|
524
|
-
watch(isPositioned, () => {
|
|
525
|
-
focusSelectedItem();
|
|
526
|
-
});
|
|
527
|
-
const { onOpenChange, triggerPointerDownPosRef } = rootContext;
|
|
528
|
-
watchEffect((cleanupFn) => {
|
|
529
|
-
if (!content.value) return;
|
|
530
|
-
let pointerMoveDelta = {
|
|
531
|
-
x: 0,
|
|
532
|
-
y: 0
|
|
533
|
-
};
|
|
534
|
-
const handlePointerMove = (event) => {
|
|
535
|
-
var _a, _b;
|
|
536
|
-
pointerMoveDelta = {
|
|
537
|
-
x: Math.abs(Math.round(event.pageX) - (((_a = triggerPointerDownPosRef.value) == null ? void 0 : _a.x) ?? 0)),
|
|
538
|
-
y: Math.abs(Math.round(event.pageY) - (((_b = triggerPointerDownPosRef.value) == null ? void 0 : _b.y) ?? 0))
|
|
539
|
-
};
|
|
540
|
-
};
|
|
541
|
-
const handlePointerUp = (event) => {
|
|
542
|
-
var _a;
|
|
543
|
-
if (event.pointerType === "touch") return;
|
|
544
|
-
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) event.preventDefault();
|
|
545
|
-
else if (!((_a = content.value) == null ? void 0 : _a.contains(event.target))) onOpenChange(false);
|
|
546
|
-
document.removeEventListener("pointermove", handlePointerMove);
|
|
547
|
-
triggerPointerDownPosRef.value = null;
|
|
548
|
-
};
|
|
549
|
-
if (triggerPointerDownPosRef.value !== null) {
|
|
550
|
-
document.addEventListener("pointermove", handlePointerMove);
|
|
551
|
-
document.addEventListener("pointerup", handlePointerUp, {
|
|
552
|
-
capture: true,
|
|
553
|
-
once: true
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
cleanupFn(() => {
|
|
557
|
-
document.removeEventListener("pointermove", handlePointerMove);
|
|
558
|
-
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
559
|
-
});
|
|
560
|
-
});
|
|
561
|
-
function handleKeyDown(event) {
|
|
562
|
-
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
563
|
-
if (event.key === "Tab") event.preventDefault();
|
|
564
|
-
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key, getItems());
|
|
565
|
-
if ([
|
|
566
|
-
"ArrowUp",
|
|
567
|
-
"ArrowDown",
|
|
568
|
-
"Home",
|
|
569
|
-
"End"
|
|
570
|
-
].includes(event.key)) {
|
|
571
|
-
const collectionItems = getItems().map((i) => i.ref);
|
|
572
|
-
let candidateNodes = [...collectionItems];
|
|
573
|
-
if (["ArrowUp", "End"].includes(event.key)) candidateNodes = candidateNodes.slice().reverse();
|
|
574
|
-
if (["ArrowUp", "ArrowDown"].includes(event.key)) {
|
|
575
|
-
const currentElement = event.target;
|
|
576
|
-
const currentIndex = candidateNodes.indexOf(currentElement);
|
|
577
|
-
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
|
578
|
-
}
|
|
579
|
-
setTimeout(() => focusFirst(candidateNodes));
|
|
580
|
-
event.preventDefault();
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
const pickedProps = computed(() => {
|
|
584
|
-
if (props.position === "popper") return props;
|
|
585
|
-
else return {};
|
|
586
|
-
});
|
|
587
|
-
const forwardedProps = useForwardProps(pickedProps.value);
|
|
588
|
-
provideSelectContentContext({
|
|
589
|
-
content,
|
|
590
|
-
viewport,
|
|
591
|
-
onViewportChange: (node) => {
|
|
592
|
-
viewport.value = node;
|
|
593
|
-
},
|
|
594
|
-
itemRefCallback: (node, value, disabled) => {
|
|
595
|
-
const isFirstValidItem = !firstValidItemFoundRef.value && !disabled;
|
|
596
|
-
const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by);
|
|
597
|
-
if (rootContext.multiple.value) {
|
|
598
|
-
if (firstSelectedItemInArrayFoundRef.value) return;
|
|
599
|
-
if (isSelectedItem || isFirstValidItem) {
|
|
600
|
-
selectedItem.value = node;
|
|
601
|
-
if (isSelectedItem) firstSelectedItemInArrayFoundRef.value = true;
|
|
602
|
-
}
|
|
603
|
-
} else if (isSelectedItem || isFirstValidItem) selectedItem.value = node;
|
|
604
|
-
if (isFirstValidItem) firstValidItemFoundRef.value = true;
|
|
605
|
-
},
|
|
606
|
-
selectedItem,
|
|
607
|
-
selectedItemText,
|
|
608
|
-
onItemLeave: () => {
|
|
609
|
-
var _a;
|
|
610
|
-
(_a = content.value) == null ? void 0 : _a.focus();
|
|
611
|
-
},
|
|
612
|
-
itemTextRefCallback: (node, value, disabled) => {
|
|
613
|
-
const isFirstValidItem = !firstValidItemFoundRef.value && !disabled;
|
|
614
|
-
const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by);
|
|
615
|
-
if (isSelectedItem || isFirstValidItem) selectedItemText.value = node;
|
|
616
|
-
},
|
|
617
|
-
focusSelectedItem,
|
|
618
|
-
position: props.position,
|
|
619
|
-
isPositioned,
|
|
620
|
-
searchRef: search
|
|
621
|
-
});
|
|
622
|
-
return (_ctx, _cache) => {
|
|
623
|
-
return openBlock(), createBlock(unref(CollectionSlot), null, {
|
|
624
|
-
default: withCtx(() => [createVNode(unref(FocusScope_default), {
|
|
625
|
-
"as-child": "",
|
|
626
|
-
onMountAutoFocus: _cache[6] || (_cache[6] = withModifiers(() => {
|
|
627
|
-
}, ["prevent"])),
|
|
628
|
-
onUnmountAutoFocus: _cache[7] || (_cache[7] = (event) => {
|
|
629
|
-
var _a;
|
|
630
|
-
emits("closeAutoFocus", event);
|
|
631
|
-
if (event.defaultPrevented) return;
|
|
632
|
-
(_a = unref(rootContext).triggerElement.value) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
633
|
-
event.preventDefault();
|
|
634
|
-
})
|
|
635
|
-
}, {
|
|
636
|
-
default: withCtx(() => [createVNode(unref(DismissableLayer_default), {
|
|
637
|
-
"as-child": "",
|
|
638
|
-
"disable-outside-pointer-events": _ctx.disableOutsidePointerEvents,
|
|
639
|
-
onFocusOutside: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
640
|
-
}, ["prevent"])),
|
|
641
|
-
onDismiss: _cache[3] || (_cache[3] = ($event) => unref(rootContext).onOpenChange(false)),
|
|
642
|
-
onEscapeKeyDown: _cache[4] || (_cache[4] = ($event) => emits("escapeKeyDown", $event)),
|
|
643
|
-
onPointerDownOutside: _cache[5] || (_cache[5] = ($event) => emits("pointerDownOutside", $event))
|
|
644
|
-
}, {
|
|
645
|
-
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.position === "popper" ? SelectPopperPosition_default : SelectItemAlignedPosition_default), mergeProps({
|
|
646
|
-
..._ctx.$attrs,
|
|
647
|
-
...unref(forwardedProps)
|
|
648
|
-
}, {
|
|
649
|
-
id: unref(rootContext).contentId,
|
|
650
|
-
ref: (vnode) => {
|
|
651
|
-
const el = unref(unrefElement)(vnode);
|
|
652
|
-
if (el == null ? void 0 : el.hasAttribute("data-reka-popper-content-wrapper")) content.value = el.firstElementChild;
|
|
653
|
-
else content.value = el;
|
|
654
|
-
return void 0;
|
|
655
|
-
},
|
|
656
|
-
role: "listbox",
|
|
657
|
-
"data-state": unref(rootContext).open.value ? "open" : "closed",
|
|
658
|
-
dir: unref(rootContext).dir.value,
|
|
659
|
-
style: {
|
|
660
|
-
display: "flex",
|
|
661
|
-
flexDirection: "column",
|
|
662
|
-
outline: "none"
|
|
663
|
-
},
|
|
664
|
-
onContextmenu: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
665
|
-
}, ["prevent"])),
|
|
666
|
-
onPlaced: _cache[1] || (_cache[1] = ($event) => isPositioned.value = true),
|
|
667
|
-
onKeydown: handleKeyDown
|
|
668
|
-
}), {
|
|
669
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
670
|
-
_: 3
|
|
671
|
-
}, 16, [
|
|
672
|
-
"id",
|
|
673
|
-
"data-state",
|
|
674
|
-
"dir",
|
|
675
|
-
"onKeydown"
|
|
676
|
-
]))]),
|
|
677
|
-
_: 3
|
|
678
|
-
}, 8, ["disable-outside-pointer-events"])]),
|
|
679
|
-
_: 3
|
|
680
|
-
})]),
|
|
681
|
-
_: 3
|
|
682
|
-
});
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
});
|
|
686
|
-
var SelectContentImpl_default = SelectContentImpl_vue_vue_type_script_setup_true_lang_default;
|
|
687
|
-
const [injectSelectItemAlignedPositionContext, provideSelectItemAlignedPositionContext] = createContext("SelectItemAlignedPosition");
|
|
688
|
-
var SelectItemAlignedPosition_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
689
|
-
inheritAttrs: false,
|
|
690
|
-
__name: "SelectItemAlignedPosition",
|
|
691
|
-
props: {
|
|
692
|
-
asChild: {
|
|
693
|
-
type: Boolean,
|
|
694
|
-
required: false
|
|
695
|
-
},
|
|
696
|
-
as: {
|
|
697
|
-
type: null,
|
|
698
|
-
required: false
|
|
699
|
-
}
|
|
700
|
-
},
|
|
701
|
-
emits: ["placed"],
|
|
702
|
-
setup(__props, { emit: __emit }) {
|
|
703
|
-
const props = __props;
|
|
704
|
-
const emits = __emit;
|
|
705
|
-
const { getItems } = useCollection();
|
|
706
|
-
const rootContext = injectSelectRootContext();
|
|
707
|
-
const contentContext = injectSelectContentContext();
|
|
708
|
-
const shouldExpandOnScrollRef = ref(false);
|
|
709
|
-
const shouldRepositionRef = ref(true);
|
|
710
|
-
const contentWrapperElement = ref();
|
|
711
|
-
const { forwardRef, currentElement: contentElement } = useForwardExpose();
|
|
712
|
-
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
713
|
-
function position() {
|
|
714
|
-
if (rootContext.triggerElement.value && rootContext.valueElement.value && contentWrapperElement.value && contentElement.value && (viewport == null ? void 0 : viewport.value) && (selectedItem == null ? void 0 : selectedItem.value) && (selectedItemText == null ? void 0 : selectedItemText.value)) {
|
|
715
|
-
const triggerRect = rootContext.triggerElement.value.getBoundingClientRect();
|
|
716
|
-
const contentRect = contentElement.value.getBoundingClientRect();
|
|
717
|
-
const valueNodeRect = rootContext.valueElement.value.getBoundingClientRect();
|
|
718
|
-
const itemTextRect = selectedItemText.value.getBoundingClientRect();
|
|
719
|
-
if (rootContext.dir.value !== "rtl") {
|
|
720
|
-
const itemTextOffset = itemTextRect.left - contentRect.left;
|
|
721
|
-
const left = valueNodeRect.left - itemTextOffset;
|
|
722
|
-
const leftDelta = triggerRect.left - left;
|
|
723
|
-
const minContentWidth = triggerRect.width + leftDelta;
|
|
724
|
-
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
|
725
|
-
const rightEdge = window.innerWidth - CONTENT_MARGIN;
|
|
726
|
-
const clampedLeft = clamp(left, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, rightEdge - contentWidth));
|
|
727
|
-
contentWrapperElement.value.style.minWidth = `${minContentWidth}px`;
|
|
728
|
-
contentWrapperElement.value.style.left = `${clampedLeft}px`;
|
|
729
|
-
} else {
|
|
730
|
-
const itemTextOffset = contentRect.right - itemTextRect.right;
|
|
731
|
-
const right = window.innerWidth - valueNodeRect.right - itemTextOffset;
|
|
732
|
-
const rightDelta = window.innerWidth - triggerRect.right - right;
|
|
733
|
-
const minContentWidth = triggerRect.width + rightDelta;
|
|
734
|
-
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
|
735
|
-
const leftEdge = window.innerWidth - CONTENT_MARGIN;
|
|
736
|
-
const clampedRight = clamp(right, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, leftEdge - contentWidth));
|
|
737
|
-
contentWrapperElement.value.style.minWidth = `${minContentWidth}px`;
|
|
738
|
-
contentWrapperElement.value.style.right = `${clampedRight}px`;
|
|
739
|
-
}
|
|
740
|
-
const items = getItems().map((i) => i.ref);
|
|
741
|
-
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
742
|
-
const itemsHeight = viewport.value.scrollHeight;
|
|
743
|
-
const contentStyles = window.getComputedStyle(contentElement.value);
|
|
744
|
-
const contentBorderTopWidth = Number.parseInt(contentStyles.borderTopWidth, 10);
|
|
745
|
-
const contentPaddingTop = Number.parseInt(contentStyles.paddingTop, 10);
|
|
746
|
-
const contentBorderBottomWidth = Number.parseInt(contentStyles.borderBottomWidth, 10);
|
|
747
|
-
const contentPaddingBottom = Number.parseInt(contentStyles.paddingBottom, 10);
|
|
748
|
-
const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;
|
|
749
|
-
const minContentHeight = Math.min(selectedItem.value.offsetHeight * 5, fullContentHeight);
|
|
750
|
-
const viewportStyles = window.getComputedStyle(viewport.value);
|
|
751
|
-
const viewportPaddingTop = Number.parseInt(viewportStyles.paddingTop, 10);
|
|
752
|
-
const viewportPaddingBottom = Number.parseInt(viewportStyles.paddingBottom, 10);
|
|
753
|
-
const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;
|
|
754
|
-
const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;
|
|
755
|
-
const selectedItemHalfHeight = selectedItem.value.offsetHeight / 2;
|
|
756
|
-
const itemOffsetMiddle = selectedItem.value.offsetTop + selectedItemHalfHeight;
|
|
757
|
-
const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;
|
|
758
|
-
const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;
|
|
759
|
-
const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;
|
|
760
|
-
if (willAlignWithoutTopOverflow) {
|
|
761
|
-
const isLastItem = selectedItem.value === items[items.length - 1];
|
|
762
|
-
contentWrapperElement.value.style.bottom = `0px`;
|
|
763
|
-
const viewportOffsetBottom = contentElement.value.clientHeight - viewport.value.offsetTop - viewport.value.offsetHeight;
|
|
764
|
-
const clampedTriggerMiddleToBottomEdge = Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);
|
|
765
|
-
const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;
|
|
766
|
-
contentWrapperElement.value.style.height = `${height}px`;
|
|
767
|
-
} else {
|
|
768
|
-
const isFirstItem = selectedItem.value === items[0];
|
|
769
|
-
contentWrapperElement.value.style.top = `0px`;
|
|
770
|
-
const clampedTopEdgeToTriggerMiddle = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.value.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight);
|
|
771
|
-
const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;
|
|
772
|
-
contentWrapperElement.value.style.height = `${height}px`;
|
|
773
|
-
viewport.value.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.value.offsetTop;
|
|
774
|
-
}
|
|
775
|
-
contentWrapperElement.value.style.margin = `${CONTENT_MARGIN}px 0`;
|
|
776
|
-
contentWrapperElement.value.style.minHeight = `${minContentHeight}px`;
|
|
777
|
-
contentWrapperElement.value.style.maxHeight = `${availableHeight}px`;
|
|
778
|
-
emits("placed");
|
|
779
|
-
requestAnimationFrame(() => shouldExpandOnScrollRef.value = true);
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
const contentZIndex = ref("");
|
|
783
|
-
onMounted(async () => {
|
|
784
|
-
await nextTick();
|
|
785
|
-
position();
|
|
786
|
-
if (contentElement.value) contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;
|
|
787
|
-
});
|
|
788
|
-
function handleScrollButtonChange(node) {
|
|
789
|
-
if (node && shouldRepositionRef.value === true) {
|
|
790
|
-
position();
|
|
791
|
-
focusSelectedItem == null ? void 0 : focusSelectedItem();
|
|
792
|
-
shouldRepositionRef.value = false;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
useResizeObserver(rootContext.triggerElement, () => {
|
|
796
|
-
position();
|
|
797
|
-
});
|
|
798
|
-
provideSelectItemAlignedPositionContext({
|
|
799
|
-
contentWrapper: contentWrapperElement,
|
|
800
|
-
shouldExpandOnScrollRef,
|
|
801
|
-
onScrollButtonChange: handleScrollButtonChange
|
|
802
|
-
});
|
|
803
|
-
return (_ctx, _cache) => {
|
|
804
|
-
return openBlock(), createElementBlock("div", {
|
|
805
|
-
ref_key: "contentWrapperElement",
|
|
806
|
-
ref: contentWrapperElement,
|
|
807
|
-
style: normalizeStyle({
|
|
808
|
-
display: "flex",
|
|
809
|
-
flexDirection: "column",
|
|
810
|
-
position: "fixed",
|
|
811
|
-
zIndex: contentZIndex.value
|
|
812
|
-
})
|
|
813
|
-
}, [createVNode(unref(Primitive), mergeProps({
|
|
814
|
-
ref: unref(forwardRef),
|
|
815
|
-
style: {
|
|
816
|
-
boxSizing: "border-box",
|
|
817
|
-
maxHeight: "100%"
|
|
818
|
-
}
|
|
819
|
-
}, {
|
|
820
|
-
..._ctx.$attrs,
|
|
821
|
-
...props
|
|
822
|
-
}), {
|
|
823
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
824
|
-
_: 3
|
|
825
|
-
}, 16)], 4);
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
});
|
|
829
|
-
var SelectItemAlignedPosition_default = SelectItemAlignedPosition_vue_vue_type_script_setup_true_lang_default;
|
|
830
|
-
var SelectProvider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
831
|
-
inheritAttrs: false,
|
|
832
|
-
__name: "SelectProvider",
|
|
833
|
-
props: { context: {
|
|
834
|
-
type: Object,
|
|
835
|
-
required: true
|
|
836
|
-
} },
|
|
837
|
-
setup(__props) {
|
|
838
|
-
const props = __props;
|
|
839
|
-
provideSelectRootContext(props.context);
|
|
840
|
-
provideSelectContentContext(SelectContentDefaultContextValue);
|
|
841
|
-
return (_ctx, _cache) => {
|
|
842
|
-
return renderSlot(_ctx.$slots, "default");
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
});
|
|
846
|
-
var SelectProvider_default = SelectProvider_vue_vue_type_script_setup_true_lang_default;
|
|
847
|
-
const _hoisted_1$3 = { key: 1 };
|
|
848
|
-
var SelectContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
849
|
-
inheritAttrs: false,
|
|
850
|
-
__name: "SelectContent",
|
|
851
|
-
props: {
|
|
852
|
-
forceMount: {
|
|
853
|
-
type: Boolean,
|
|
854
|
-
required: false
|
|
855
|
-
},
|
|
856
|
-
position: {
|
|
857
|
-
type: String,
|
|
858
|
-
required: false
|
|
859
|
-
},
|
|
860
|
-
bodyLock: {
|
|
861
|
-
type: Boolean,
|
|
862
|
-
required: false
|
|
863
|
-
},
|
|
864
|
-
side: {
|
|
865
|
-
type: null,
|
|
866
|
-
required: false
|
|
867
|
-
},
|
|
868
|
-
sideOffset: {
|
|
869
|
-
type: Number,
|
|
870
|
-
required: false
|
|
871
|
-
},
|
|
872
|
-
sideFlip: {
|
|
873
|
-
type: Boolean,
|
|
874
|
-
required: false
|
|
875
|
-
},
|
|
876
|
-
align: {
|
|
877
|
-
type: null,
|
|
878
|
-
required: false
|
|
879
|
-
},
|
|
880
|
-
alignOffset: {
|
|
881
|
-
type: Number,
|
|
882
|
-
required: false
|
|
883
|
-
},
|
|
884
|
-
alignFlip: {
|
|
885
|
-
type: Boolean,
|
|
886
|
-
required: false
|
|
887
|
-
},
|
|
888
|
-
avoidCollisions: {
|
|
889
|
-
type: Boolean,
|
|
890
|
-
required: false
|
|
891
|
-
},
|
|
892
|
-
collisionBoundary: {
|
|
893
|
-
type: null,
|
|
894
|
-
required: false
|
|
895
|
-
},
|
|
896
|
-
collisionPadding: {
|
|
897
|
-
type: [Number, Object],
|
|
898
|
-
required: false
|
|
899
|
-
},
|
|
900
|
-
arrowPadding: {
|
|
901
|
-
type: Number,
|
|
902
|
-
required: false
|
|
903
|
-
},
|
|
904
|
-
hideShiftedArrow: {
|
|
905
|
-
type: Boolean,
|
|
906
|
-
required: false
|
|
907
|
-
},
|
|
908
|
-
sticky: {
|
|
909
|
-
type: String,
|
|
910
|
-
required: false
|
|
911
|
-
},
|
|
912
|
-
hideWhenDetached: {
|
|
913
|
-
type: Boolean,
|
|
914
|
-
required: false
|
|
915
|
-
},
|
|
916
|
-
positionStrategy: {
|
|
917
|
-
type: String,
|
|
918
|
-
required: false
|
|
919
|
-
},
|
|
920
|
-
updatePositionStrategy: {
|
|
921
|
-
type: String,
|
|
922
|
-
required: false
|
|
923
|
-
},
|
|
924
|
-
disableUpdateOnLayoutShift: {
|
|
925
|
-
type: Boolean,
|
|
926
|
-
required: false
|
|
927
|
-
},
|
|
928
|
-
prioritizePosition: {
|
|
929
|
-
type: Boolean,
|
|
930
|
-
required: false
|
|
931
|
-
},
|
|
932
|
-
reference: {
|
|
933
|
-
type: null,
|
|
934
|
-
required: false
|
|
935
|
-
},
|
|
936
|
-
asChild: {
|
|
937
|
-
type: Boolean,
|
|
938
|
-
required: false
|
|
939
|
-
},
|
|
940
|
-
as: {
|
|
941
|
-
type: null,
|
|
942
|
-
required: false
|
|
943
|
-
},
|
|
944
|
-
disableOutsidePointerEvents: {
|
|
945
|
-
type: Boolean,
|
|
946
|
-
required: false
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
emits: [
|
|
950
|
-
"closeAutoFocus",
|
|
951
|
-
"escapeKeyDown",
|
|
952
|
-
"pointerDownOutside"
|
|
953
|
-
],
|
|
954
|
-
setup(__props, { emit: __emit }) {
|
|
955
|
-
const props = __props;
|
|
956
|
-
const emits = __emit;
|
|
957
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
958
|
-
const rootContext = injectSelectRootContext();
|
|
959
|
-
const fragment = ref();
|
|
960
|
-
onMounted(() => {
|
|
961
|
-
fragment.value = new DocumentFragment();
|
|
962
|
-
});
|
|
963
|
-
const presenceRef = ref();
|
|
964
|
-
const present = computed(() => props.forceMount || rootContext.open.value);
|
|
965
|
-
const renderPresence = ref(present.value);
|
|
966
|
-
watch(present, () => {
|
|
967
|
-
setTimeout(() => renderPresence.value = present.value);
|
|
968
|
-
});
|
|
969
|
-
return (_ctx, _cache) => {
|
|
970
|
-
var _a;
|
|
971
|
-
return present.value || renderPresence.value || ((_a = presenceRef.value) == null ? void 0 : _a.present) ? (openBlock(), createBlock(unref(Presence_default), {
|
|
972
|
-
key: 0,
|
|
973
|
-
ref_key: "presenceRef",
|
|
974
|
-
ref: presenceRef,
|
|
975
|
-
present: present.value
|
|
976
|
-
}, {
|
|
977
|
-
default: withCtx(() => [createVNode(SelectContentImpl_default, normalizeProps(guardReactiveProps({
|
|
978
|
-
...unref(forwarded),
|
|
979
|
-
..._ctx.$attrs
|
|
980
|
-
})), {
|
|
981
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
982
|
-
_: 3
|
|
983
|
-
}, 16)]),
|
|
984
|
-
_: 3
|
|
985
|
-
}, 8, ["present"])) : fragment.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [(openBlock(), createBlock(Teleport, { to: fragment.value }, [createVNode(SelectProvider_default, { context: unref(rootContext) }, {
|
|
986
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
987
|
-
_: 3
|
|
988
|
-
}, 8, ["context"])], 8, ["to"]))])) : createCommentVNode("v-if", true);
|
|
989
|
-
};
|
|
990
|
-
}
|
|
991
|
-
});
|
|
992
|
-
var SelectContent_default = SelectContent_vue_vue_type_script_setup_true_lang_default;
|
|
993
|
-
const [injectSelectGroupContext, provideSelectGroupContext] = createContext("SelectGroup");
|
|
994
|
-
var SelectGroup_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
995
|
-
__name: "SelectGroup",
|
|
996
|
-
props: {
|
|
997
|
-
asChild: {
|
|
998
|
-
type: Boolean,
|
|
999
|
-
required: false
|
|
1000
|
-
},
|
|
1001
|
-
as: {
|
|
1002
|
-
type: null,
|
|
1003
|
-
required: false
|
|
1004
|
-
}
|
|
1005
|
-
},
|
|
1006
|
-
setup(__props) {
|
|
1007
|
-
const props = __props;
|
|
1008
|
-
const id = useId(void 0, "reka-select-group");
|
|
1009
|
-
provideSelectGroupContext({ id });
|
|
1010
|
-
return (_ctx, _cache) => {
|
|
1011
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps({ role: "group" }, props, { "aria-labelledby": unref(id) }), {
|
|
1012
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1013
|
-
_: 3
|
|
1014
|
-
}, 16, ["aria-labelledby"]);
|
|
1015
|
-
};
|
|
1016
|
-
}
|
|
1017
|
-
});
|
|
1018
|
-
var SelectGroup_default = SelectGroup_vue_vue_type_script_setup_true_lang_default;
|
|
1019
|
-
var SelectIcon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1020
|
-
__name: "SelectIcon",
|
|
1021
|
-
props: {
|
|
1022
|
-
asChild: {
|
|
1023
|
-
type: Boolean,
|
|
1024
|
-
required: false
|
|
1025
|
-
},
|
|
1026
|
-
as: {
|
|
1027
|
-
type: null,
|
|
1028
|
-
required: false,
|
|
1029
|
-
default: "span"
|
|
1030
|
-
}
|
|
1031
|
-
},
|
|
1032
|
-
setup(__props) {
|
|
1033
|
-
return (_ctx, _cache) => {
|
|
1034
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1035
|
-
"aria-hidden": "true",
|
|
1036
|
-
as: _ctx.as,
|
|
1037
|
-
"as-child": _ctx.asChild
|
|
1038
|
-
}, {
|
|
1039
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("▼"))])]),
|
|
1040
|
-
_: 3
|
|
1041
|
-
}, 8, ["as", "as-child"]);
|
|
1042
|
-
};
|
|
1043
|
-
}
|
|
1044
|
-
});
|
|
1045
|
-
var SelectIcon_default = SelectIcon_vue_vue_type_script_setup_true_lang_default;
|
|
1046
|
-
const [injectSelectItemContext, provideSelectItemContext] = createContext("SelectItem");
|
|
1047
|
-
var SelectItem_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1048
|
-
__name: "SelectItem",
|
|
1049
|
-
props: {
|
|
1050
|
-
value: {
|
|
1051
|
-
type: null,
|
|
1052
|
-
required: true
|
|
1053
|
-
},
|
|
1054
|
-
disabled: {
|
|
1055
|
-
type: Boolean,
|
|
1056
|
-
required: false
|
|
1057
|
-
},
|
|
1058
|
-
textValue: {
|
|
1059
|
-
type: String,
|
|
1060
|
-
required: false
|
|
1061
|
-
},
|
|
1062
|
-
asChild: {
|
|
1063
|
-
type: Boolean,
|
|
1064
|
-
required: false
|
|
1065
|
-
},
|
|
1066
|
-
as: {
|
|
1067
|
-
type: null,
|
|
1068
|
-
required: false
|
|
1069
|
-
}
|
|
1070
|
-
},
|
|
1071
|
-
emits: ["select"],
|
|
1072
|
-
setup(__props, { emit: __emit }) {
|
|
1073
|
-
const props = __props;
|
|
1074
|
-
const emits = __emit;
|
|
1075
|
-
const { disabled } = toRefs(props);
|
|
1076
|
-
const rootContext = injectSelectRootContext();
|
|
1077
|
-
const contentContext = injectSelectContentContext();
|
|
1078
|
-
const { forwardRef, currentElement } = useForwardExpose();
|
|
1079
|
-
const { CollectionItem } = useCollection();
|
|
1080
|
-
const isSelected = computed(() => {
|
|
1081
|
-
var _a;
|
|
1082
|
-
return valueComparator((_a = rootContext.modelValue) == null ? void 0 : _a.value, props.value, rootContext.by);
|
|
1083
|
-
});
|
|
1084
|
-
const isFocused = ref(false);
|
|
1085
|
-
const textValue = ref(props.textValue ?? "");
|
|
1086
|
-
const textId = useId(void 0, "reka-select-item-text");
|
|
1087
|
-
const SELECT_SELECT = "select.select";
|
|
1088
|
-
async function handleSelectCustomEvent(ev) {
|
|
1089
|
-
if (ev.defaultPrevented) return;
|
|
1090
|
-
const eventDetail = {
|
|
1091
|
-
originalEvent: ev,
|
|
1092
|
-
value: props.value
|
|
1093
|
-
};
|
|
1094
|
-
handleAndDispatchCustomEvent(SELECT_SELECT, handleSelect, eventDetail);
|
|
1095
|
-
}
|
|
1096
|
-
async function handleSelect(ev) {
|
|
1097
|
-
await nextTick();
|
|
1098
|
-
emits("select", ev);
|
|
1099
|
-
if (ev.defaultPrevented) return;
|
|
1100
|
-
if (!disabled.value) {
|
|
1101
|
-
rootContext.onValueChange(props.value);
|
|
1102
|
-
if (!rootContext.multiple.value) rootContext.onOpenChange(false);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
async function handlePointerMove(event) {
|
|
1106
|
-
var _a, _b;
|
|
1107
|
-
await nextTick();
|
|
1108
|
-
if (event.defaultPrevented) return;
|
|
1109
|
-
if (disabled.value) (_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
|
|
1110
|
-
else (_b = event.currentTarget) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
1111
|
-
}
|
|
1112
|
-
async function handlePointerLeave(event) {
|
|
1113
|
-
var _a;
|
|
1114
|
-
await nextTick();
|
|
1115
|
-
if (event.defaultPrevented) return;
|
|
1116
|
-
if (event.currentTarget === getActiveElement()) (_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
|
|
1117
|
-
}
|
|
1118
|
-
async function handleKeyDown(event) {
|
|
1119
|
-
var _a;
|
|
1120
|
-
await nextTick();
|
|
1121
|
-
if (event.defaultPrevented) return;
|
|
1122
|
-
const isTypingAhead = ((_a = contentContext.searchRef) == null ? void 0 : _a.value) !== "";
|
|
1123
|
-
if (isTypingAhead && event.key === " ") return;
|
|
1124
|
-
if (SELECTION_KEYS.includes(event.key)) handleSelectCustomEvent(event);
|
|
1125
|
-
if (event.key === " ") event.preventDefault();
|
|
1126
|
-
}
|
|
1127
|
-
if (props.value === "") throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
1128
|
-
onMounted(() => {
|
|
1129
|
-
if (!currentElement.value) return;
|
|
1130
|
-
contentContext.itemRefCallback(currentElement.value, props.value, props.disabled);
|
|
1131
|
-
});
|
|
1132
|
-
provideSelectItemContext({
|
|
1133
|
-
value: props.value,
|
|
1134
|
-
disabled,
|
|
1135
|
-
textId,
|
|
1136
|
-
isSelected,
|
|
1137
|
-
onItemTextChange: (node) => {
|
|
1138
|
-
textValue.value = ((textValue.value || (node == null ? void 0 : node.textContent)) ?? "").trim();
|
|
1139
|
-
}
|
|
1140
|
-
});
|
|
1141
|
-
return (_ctx, _cache) => {
|
|
1142
|
-
return openBlock(), createBlock(unref(CollectionItem), { value: { textValue: textValue.value } }, {
|
|
1143
|
-
default: withCtx(() => [createVNode(unref(Primitive), {
|
|
1144
|
-
ref: unref(forwardRef),
|
|
1145
|
-
role: "option",
|
|
1146
|
-
"aria-labelledby": unref(textId),
|
|
1147
|
-
"data-highlighted": isFocused.value ? "" : void 0,
|
|
1148
|
-
"aria-selected": isSelected.value,
|
|
1149
|
-
"data-state": isSelected.value ? "checked" : "unchecked",
|
|
1150
|
-
"aria-disabled": unref(disabled) || void 0,
|
|
1151
|
-
"data-disabled": unref(disabled) ? "" : void 0,
|
|
1152
|
-
tabindex: unref(disabled) ? void 0 : -1,
|
|
1153
|
-
as: _ctx.as,
|
|
1154
|
-
"as-child": _ctx.asChild,
|
|
1155
|
-
onFocus: _cache[0] || (_cache[0] = ($event) => isFocused.value = true),
|
|
1156
|
-
onBlur: _cache[1] || (_cache[1] = ($event) => isFocused.value = false),
|
|
1157
|
-
onPointerup: handleSelectCustomEvent,
|
|
1158
|
-
onPointerdown: _cache[2] || (_cache[2] = (event) => {
|
|
1159
|
-
event.currentTarget.focus({ preventScroll: true });
|
|
1160
|
-
}),
|
|
1161
|
-
onTouchend: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
1162
|
-
}, ["prevent", "stop"])),
|
|
1163
|
-
onPointermove: handlePointerMove,
|
|
1164
|
-
onPointerleave: handlePointerLeave,
|
|
1165
|
-
onKeydown: handleKeyDown
|
|
1166
|
-
}, {
|
|
1167
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1168
|
-
_: 3
|
|
1169
|
-
}, 8, [
|
|
1170
|
-
"aria-labelledby",
|
|
1171
|
-
"data-highlighted",
|
|
1172
|
-
"aria-selected",
|
|
1173
|
-
"data-state",
|
|
1174
|
-
"aria-disabled",
|
|
1175
|
-
"data-disabled",
|
|
1176
|
-
"tabindex",
|
|
1177
|
-
"as",
|
|
1178
|
-
"as-child"
|
|
1179
|
-
])]),
|
|
1180
|
-
_: 3
|
|
1181
|
-
}, 8, ["value"]);
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
});
|
|
1185
|
-
var SelectItem_default = SelectItem_vue_vue_type_script_setup_true_lang_default;
|
|
1186
|
-
var SelectItemIndicator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1187
|
-
__name: "SelectItemIndicator",
|
|
1188
|
-
props: {
|
|
1189
|
-
asChild: {
|
|
1190
|
-
type: Boolean,
|
|
1191
|
-
required: false
|
|
1192
|
-
},
|
|
1193
|
-
as: {
|
|
1194
|
-
type: null,
|
|
1195
|
-
required: false,
|
|
1196
|
-
default: "span"
|
|
1197
|
-
}
|
|
1198
|
-
},
|
|
1199
|
-
setup(__props) {
|
|
1200
|
-
const props = __props;
|
|
1201
|
-
const itemContext = injectSelectItemContext();
|
|
1202
|
-
return (_ctx, _cache) => {
|
|
1203
|
-
return unref(itemContext).isSelected.value ? (openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
1204
|
-
key: 0,
|
|
1205
|
-
"aria-hidden": "true"
|
|
1206
|
-
}, props), {
|
|
1207
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1208
|
-
_: 3
|
|
1209
|
-
}, 16)) : createCommentVNode("v-if", true);
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
});
|
|
1213
|
-
var SelectItemIndicator_default = SelectItemIndicator_vue_vue_type_script_setup_true_lang_default;
|
|
1214
|
-
var SelectItemText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1215
|
-
inheritAttrs: false,
|
|
1216
|
-
__name: "SelectItemText",
|
|
1217
|
-
props: {
|
|
1218
|
-
asChild: {
|
|
1219
|
-
type: Boolean,
|
|
1220
|
-
required: false
|
|
1221
|
-
},
|
|
1222
|
-
as: {
|
|
1223
|
-
type: null,
|
|
1224
|
-
required: false,
|
|
1225
|
-
default: "span"
|
|
1226
|
-
}
|
|
1227
|
-
},
|
|
1228
|
-
setup(__props) {
|
|
1229
|
-
const props = __props;
|
|
1230
|
-
const rootContext = injectSelectRootContext();
|
|
1231
|
-
const contentContext = injectSelectContentContext();
|
|
1232
|
-
const itemContext = injectSelectItemContext();
|
|
1233
|
-
const { forwardRef, currentElement: itemTextElement } = useForwardExpose();
|
|
1234
|
-
const optionProps = computed(() => {
|
|
1235
|
-
var _a, _b;
|
|
1236
|
-
return {
|
|
1237
|
-
value: itemContext.value,
|
|
1238
|
-
disabled: itemContext.disabled.value,
|
|
1239
|
-
textContent: ((_a = itemTextElement.value) == null ? void 0 : _a.textContent) ?? ((_b = itemContext.value) == null ? void 0 : _b.toString()) ?? ""
|
|
1240
|
-
};
|
|
1241
|
-
});
|
|
1242
|
-
onMounted(() => {
|
|
1243
|
-
if (!itemTextElement.value) return;
|
|
1244
|
-
itemContext.onItemTextChange(itemTextElement.value);
|
|
1245
|
-
contentContext.itemTextRefCallback(itemTextElement.value, itemContext.value, itemContext.disabled.value);
|
|
1246
|
-
rootContext.onOptionAdd(optionProps.value);
|
|
1247
|
-
});
|
|
1248
|
-
onUnmounted(() => {
|
|
1249
|
-
rootContext.onOptionRemove(optionProps.value);
|
|
1250
|
-
});
|
|
1251
|
-
return (_ctx, _cache) => {
|
|
1252
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
1253
|
-
id: unref(itemContext).textId,
|
|
1254
|
-
ref: unref(forwardRef)
|
|
1255
|
-
}, {
|
|
1256
|
-
...props,
|
|
1257
|
-
..._ctx.$attrs
|
|
1258
|
-
}), {
|
|
1259
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1260
|
-
_: 3
|
|
1261
|
-
}, 16, ["id"]);
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
var SelectItemText_default = SelectItemText_vue_vue_type_script_setup_true_lang_default;
|
|
1266
|
-
var SelectLabel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1267
|
-
__name: "SelectLabel",
|
|
1268
|
-
props: {
|
|
1269
|
-
for: {
|
|
1270
|
-
type: String,
|
|
1271
|
-
required: false
|
|
1272
|
-
},
|
|
1273
|
-
asChild: {
|
|
1274
|
-
type: Boolean,
|
|
1275
|
-
required: false
|
|
1276
|
-
},
|
|
1277
|
-
as: {
|
|
1278
|
-
type: null,
|
|
1279
|
-
required: false,
|
|
1280
|
-
default: "div"
|
|
1281
|
-
}
|
|
1282
|
-
},
|
|
1283
|
-
setup(__props) {
|
|
1284
|
-
const props = __props;
|
|
1285
|
-
const groupContext = injectSelectGroupContext({ id: "" });
|
|
1286
|
-
return (_ctx, _cache) => {
|
|
1287
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps(props, { id: unref(groupContext).id }), {
|
|
1288
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1289
|
-
_: 3
|
|
1290
|
-
}, 16, ["id"]);
|
|
1291
|
-
};
|
|
1292
|
-
}
|
|
1293
|
-
});
|
|
1294
|
-
var SelectLabel_default = SelectLabel_vue_vue_type_script_setup_true_lang_default;
|
|
1295
|
-
var SelectPortal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1296
|
-
__name: "SelectPortal",
|
|
1297
|
-
props: {
|
|
1298
|
-
to: {
|
|
1299
|
-
type: null,
|
|
1300
|
-
required: false
|
|
1301
|
-
},
|
|
1302
|
-
disabled: {
|
|
1303
|
-
type: Boolean,
|
|
1304
|
-
required: false
|
|
1305
|
-
},
|
|
1306
|
-
defer: {
|
|
1307
|
-
type: Boolean,
|
|
1308
|
-
required: false
|
|
1309
|
-
},
|
|
1310
|
-
forceMount: {
|
|
1311
|
-
type: Boolean,
|
|
1312
|
-
required: false
|
|
1313
|
-
}
|
|
1314
|
-
},
|
|
1315
|
-
setup(__props) {
|
|
1316
|
-
const props = __props;
|
|
1317
|
-
return (_ctx, _cache) => {
|
|
1318
|
-
return openBlock(), createBlock(unref(Teleport_default), normalizeProps(guardReactiveProps(props)), {
|
|
1319
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1320
|
-
_: 3
|
|
1321
|
-
}, 16);
|
|
1322
|
-
};
|
|
1323
|
-
}
|
|
1324
|
-
});
|
|
1325
|
-
var SelectPortal_default = SelectPortal_vue_vue_type_script_setup_true_lang_default;
|
|
1326
|
-
var SelectScrollButtonImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1327
|
-
__name: "SelectScrollButtonImpl",
|
|
1328
|
-
emits: ["autoScroll"],
|
|
1329
|
-
setup(__props, { emit: __emit }) {
|
|
1330
|
-
const emits = __emit;
|
|
1331
|
-
const { getItems } = useCollection();
|
|
1332
|
-
const contentContext = injectSelectContentContext();
|
|
1333
|
-
const autoScrollTimerRef = ref(null);
|
|
1334
|
-
function clearAutoScrollTimer() {
|
|
1335
|
-
if (autoScrollTimerRef.value !== null) {
|
|
1336
|
-
window.clearInterval(autoScrollTimerRef.value);
|
|
1337
|
-
autoScrollTimerRef.value = null;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
watchEffect(() => {
|
|
1341
|
-
const activeItem = getItems().map((i) => i.ref).find((item) => item === getActiveElement());
|
|
1342
|
-
activeItem == null ? void 0 : activeItem.scrollIntoView({ block: "nearest" });
|
|
1343
|
-
});
|
|
1344
|
-
function handlePointerDown() {
|
|
1345
|
-
if (autoScrollTimerRef.value === null) autoScrollTimerRef.value = window.setInterval(() => {
|
|
1346
|
-
emits("autoScroll");
|
|
1347
|
-
}, 50);
|
|
1348
|
-
}
|
|
1349
|
-
function handlePointerMove() {
|
|
1350
|
-
var _a;
|
|
1351
|
-
(_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
|
|
1352
|
-
if (autoScrollTimerRef.value === null) autoScrollTimerRef.value = window.setInterval(() => {
|
|
1353
|
-
emits("autoScroll");
|
|
1354
|
-
}, 50);
|
|
1355
|
-
}
|
|
1356
|
-
onBeforeUnmount(() => clearAutoScrollTimer());
|
|
1357
|
-
return (_ctx, _cache) => {
|
|
1358
|
-
var _a;
|
|
1359
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
1360
|
-
"aria-hidden": "true",
|
|
1361
|
-
style: { flexShrink: 0 }
|
|
1362
|
-
}, (_a = _ctx.$parent) == null ? void 0 : _a.$props, {
|
|
1363
|
-
onPointerdown: handlePointerDown,
|
|
1364
|
-
onPointermove: handlePointerMove,
|
|
1365
|
-
onPointerleave: _cache[0] || (_cache[0] = () => {
|
|
1366
|
-
clearAutoScrollTimer();
|
|
1367
|
-
})
|
|
1368
|
-
}), {
|
|
1369
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1370
|
-
_: 3
|
|
1371
|
-
}, 16);
|
|
1372
|
-
};
|
|
1373
|
-
}
|
|
1374
|
-
});
|
|
1375
|
-
var SelectScrollButtonImpl_default = SelectScrollButtonImpl_vue_vue_type_script_setup_true_lang_default;
|
|
1376
|
-
var SelectScrollDownButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1377
|
-
__name: "SelectScrollDownButton",
|
|
1378
|
-
props: {
|
|
1379
|
-
asChild: {
|
|
1380
|
-
type: Boolean,
|
|
1381
|
-
required: false
|
|
1382
|
-
},
|
|
1383
|
-
as: {
|
|
1384
|
-
type: null,
|
|
1385
|
-
required: false
|
|
1386
|
-
}
|
|
1387
|
-
},
|
|
1388
|
-
setup(__props) {
|
|
1389
|
-
const contentContext = injectSelectContentContext();
|
|
1390
|
-
const alignedPositionContext = contentContext.position === "item-aligned" ? injectSelectItemAlignedPositionContext() : void 0;
|
|
1391
|
-
const { forwardRef, currentElement } = useForwardExpose();
|
|
1392
|
-
const canScrollDown = ref(false);
|
|
1393
|
-
watchEffect((cleanupFn) => {
|
|
1394
|
-
var _a, _b;
|
|
1395
|
-
if (((_a = contentContext.viewport) == null ? void 0 : _a.value) && ((_b = contentContext.isPositioned) == null ? void 0 : _b.value)) {
|
|
1396
|
-
let handleScroll = function() {
|
|
1397
|
-
const maxScroll = viewport.scrollHeight - viewport.clientHeight;
|
|
1398
|
-
canScrollDown.value = Math.ceil(viewport.scrollTop) < maxScroll;
|
|
1399
|
-
};
|
|
1400
|
-
const viewport = contentContext.viewport.value;
|
|
1401
|
-
handleScroll();
|
|
1402
|
-
viewport.addEventListener("scroll", handleScroll);
|
|
1403
|
-
cleanupFn(() => viewport.removeEventListener("scroll", handleScroll));
|
|
1404
|
-
}
|
|
1405
|
-
});
|
|
1406
|
-
watch(currentElement, () => {
|
|
1407
|
-
if (currentElement.value) alignedPositionContext == null ? void 0 : alignedPositionContext.onScrollButtonChange(currentElement.value);
|
|
1408
|
-
});
|
|
1409
|
-
return (_ctx, _cache) => {
|
|
1410
|
-
return canScrollDown.value ? (openBlock(), createBlock(SelectScrollButtonImpl_default, {
|
|
1411
|
-
key: 0,
|
|
1412
|
-
ref: unref(forwardRef),
|
|
1413
|
-
onAutoScroll: _cache[0] || (_cache[0] = () => {
|
|
1414
|
-
const { viewport, selectedItem } = unref(contentContext);
|
|
1415
|
-
if ((viewport == null ? void 0 : viewport.value) && (selectedItem == null ? void 0 : selectedItem.value)) viewport.value.scrollTop = viewport.value.scrollTop + selectedItem.value.offsetHeight;
|
|
1416
|
-
})
|
|
1417
|
-
}, {
|
|
1418
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1419
|
-
_: 3
|
|
1420
|
-
}, 512)) : createCommentVNode("v-if", true);
|
|
1421
|
-
};
|
|
1422
|
-
}
|
|
1423
|
-
});
|
|
1424
|
-
var SelectScrollDownButton_default = SelectScrollDownButton_vue_vue_type_script_setup_true_lang_default;
|
|
1425
|
-
var SelectScrollUpButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1426
|
-
__name: "SelectScrollUpButton",
|
|
1427
|
-
props: {
|
|
1428
|
-
asChild: {
|
|
1429
|
-
type: Boolean,
|
|
1430
|
-
required: false
|
|
1431
|
-
},
|
|
1432
|
-
as: {
|
|
1433
|
-
type: null,
|
|
1434
|
-
required: false
|
|
1435
|
-
}
|
|
1436
|
-
},
|
|
1437
|
-
setup(__props) {
|
|
1438
|
-
const contentContext = injectSelectContentContext();
|
|
1439
|
-
const alignedPositionContext = contentContext.position === "item-aligned" ? injectSelectItemAlignedPositionContext() : void 0;
|
|
1440
|
-
const { forwardRef, currentElement } = useForwardExpose();
|
|
1441
|
-
const canScrollUp = ref(false);
|
|
1442
|
-
watchEffect((cleanupFn) => {
|
|
1443
|
-
var _a, _b;
|
|
1444
|
-
if (((_a = contentContext.viewport) == null ? void 0 : _a.value) && ((_b = contentContext.isPositioned) == null ? void 0 : _b.value)) {
|
|
1445
|
-
let handleScroll = function() {
|
|
1446
|
-
canScrollUp.value = viewport.scrollTop > 0;
|
|
1447
|
-
};
|
|
1448
|
-
const viewport = contentContext.viewport.value;
|
|
1449
|
-
handleScroll();
|
|
1450
|
-
viewport.addEventListener("scroll", handleScroll);
|
|
1451
|
-
cleanupFn(() => viewport.removeEventListener("scroll", handleScroll));
|
|
1452
|
-
}
|
|
1453
|
-
});
|
|
1454
|
-
watch(currentElement, () => {
|
|
1455
|
-
if (currentElement.value) alignedPositionContext == null ? void 0 : alignedPositionContext.onScrollButtonChange(currentElement.value);
|
|
1456
|
-
});
|
|
1457
|
-
return (_ctx, _cache) => {
|
|
1458
|
-
return canScrollUp.value ? (openBlock(), createBlock(SelectScrollButtonImpl_default, {
|
|
1459
|
-
key: 0,
|
|
1460
|
-
ref: unref(forwardRef),
|
|
1461
|
-
onAutoScroll: _cache[0] || (_cache[0] = () => {
|
|
1462
|
-
const { viewport, selectedItem } = unref(contentContext);
|
|
1463
|
-
if ((viewport == null ? void 0 : viewport.value) && (selectedItem == null ? void 0 : selectedItem.value)) viewport.value.scrollTop = viewport.value.scrollTop - selectedItem.value.offsetHeight;
|
|
1464
|
-
})
|
|
1465
|
-
}, {
|
|
1466
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1467
|
-
_: 3
|
|
1468
|
-
}, 512)) : createCommentVNode("v-if", true);
|
|
1469
|
-
};
|
|
1470
|
-
}
|
|
1471
|
-
});
|
|
1472
|
-
var SelectScrollUpButton_default = SelectScrollUpButton_vue_vue_type_script_setup_true_lang_default;
|
|
1473
|
-
var SelectSeparator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1474
|
-
__name: "SelectSeparator",
|
|
1475
|
-
props: {
|
|
1476
|
-
asChild: {
|
|
1477
|
-
type: Boolean,
|
|
1478
|
-
required: false
|
|
1479
|
-
},
|
|
1480
|
-
as: {
|
|
1481
|
-
type: null,
|
|
1482
|
-
required: false
|
|
1483
|
-
}
|
|
1484
|
-
},
|
|
1485
|
-
setup(__props) {
|
|
1486
|
-
const props = __props;
|
|
1487
|
-
return (_ctx, _cache) => {
|
|
1488
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps({ "aria-hidden": "true" }, props), {
|
|
1489
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1490
|
-
_: 3
|
|
1491
|
-
}, 16);
|
|
1492
|
-
};
|
|
1493
|
-
}
|
|
1494
|
-
});
|
|
1495
|
-
var SelectSeparator_default = SelectSeparator_vue_vue_type_script_setup_true_lang_default;
|
|
1496
|
-
var SelectTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1497
|
-
__name: "SelectTrigger",
|
|
1498
|
-
props: {
|
|
1499
|
-
disabled: {
|
|
1500
|
-
type: Boolean,
|
|
1501
|
-
required: false
|
|
1502
|
-
},
|
|
1503
|
-
reference: {
|
|
1504
|
-
type: null,
|
|
1505
|
-
required: false
|
|
1506
|
-
},
|
|
1507
|
-
asChild: {
|
|
1508
|
-
type: Boolean,
|
|
1509
|
-
required: false
|
|
1510
|
-
},
|
|
1511
|
-
as: {
|
|
1512
|
-
type: null,
|
|
1513
|
-
required: false,
|
|
1514
|
-
default: "button"
|
|
1515
|
-
}
|
|
1516
|
-
},
|
|
1517
|
-
setup(__props) {
|
|
1518
|
-
const props = __props;
|
|
1519
|
-
const rootContext = injectSelectRootContext();
|
|
1520
|
-
const { forwardRef, currentElement: triggerElement } = useForwardExpose();
|
|
1521
|
-
const isDisabled = computed(() => {
|
|
1522
|
-
var _a;
|
|
1523
|
-
return ((_a = rootContext.disabled) == null ? void 0 : _a.value) || props.disabled;
|
|
1524
|
-
});
|
|
1525
|
-
rootContext.contentId || (rootContext.contentId = useId(void 0, "reka-select-content"));
|
|
1526
|
-
onMounted(() => {
|
|
1527
|
-
rootContext.onTriggerChange(triggerElement.value);
|
|
1528
|
-
});
|
|
1529
|
-
const { getItems } = useCollection();
|
|
1530
|
-
const { search, handleTypeaheadSearch, resetTypeahead } = useTypeahead();
|
|
1531
|
-
function handleOpen() {
|
|
1532
|
-
if (!isDisabled.value) {
|
|
1533
|
-
rootContext.onOpenChange(true);
|
|
1534
|
-
resetTypeahead();
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
function handlePointerOpen(event) {
|
|
1538
|
-
handleOpen();
|
|
1539
|
-
rootContext.triggerPointerDownPosRef.value = {
|
|
1540
|
-
x: Math.round(event.pageX),
|
|
1541
|
-
y: Math.round(event.pageY)
|
|
1542
|
-
};
|
|
1543
|
-
}
|
|
1544
|
-
return (_ctx, _cache) => {
|
|
1545
|
-
return openBlock(), createBlock(unref(PopperAnchor_default), {
|
|
1546
|
-
"as-child": "",
|
|
1547
|
-
reference: _ctx.reference
|
|
1548
|
-
}, {
|
|
1549
|
-
default: withCtx(() => {
|
|
1550
|
-
var _a, _b, _c, _d;
|
|
1551
|
-
return [createVNode(unref(Primitive), {
|
|
1552
|
-
ref: unref(forwardRef),
|
|
1553
|
-
role: "combobox",
|
|
1554
|
-
type: _ctx.as === "button" ? "button" : void 0,
|
|
1555
|
-
"aria-controls": unref(rootContext).contentId,
|
|
1556
|
-
"aria-expanded": unref(rootContext).open.value || false,
|
|
1557
|
-
"aria-required": (_a = unref(rootContext).required) == null ? void 0 : _a.value,
|
|
1558
|
-
"aria-autocomplete": "none",
|
|
1559
|
-
disabled: isDisabled.value,
|
|
1560
|
-
dir: (_b = unref(rootContext)) == null ? void 0 : _b.dir.value,
|
|
1561
|
-
"data-state": ((_c = unref(rootContext)) == null ? void 0 : _c.open.value) ? "open" : "closed",
|
|
1562
|
-
"data-disabled": isDisabled.value ? "" : void 0,
|
|
1563
|
-
"data-placeholder": unref(shouldShowPlaceholder)((_d = unref(rootContext).modelValue) == null ? void 0 : _d.value) ? "" : void 0,
|
|
1564
|
-
"as-child": _ctx.asChild,
|
|
1565
|
-
as: _ctx.as,
|
|
1566
|
-
onClick: _cache[0] || (_cache[0] = (event) => {
|
|
1567
|
-
var _a2;
|
|
1568
|
-
(_a2 = event == null ? void 0 : event.currentTarget) == null ? void 0 : _a2.focus();
|
|
1569
|
-
}),
|
|
1570
|
-
onPointerdown: _cache[1] || (_cache[1] = (event) => {
|
|
1571
|
-
if (event.pointerType === "touch") return event.preventDefault();
|
|
1572
|
-
const target = event.target;
|
|
1573
|
-
if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
|
|
1574
|
-
if (event.button === 0 && event.ctrlKey === false) {
|
|
1575
|
-
handlePointerOpen(event);
|
|
1576
|
-
event.preventDefault();
|
|
1577
|
-
}
|
|
1578
|
-
}),
|
|
1579
|
-
onPointerup: _cache[2] || (_cache[2] = withModifiers((event) => {
|
|
1580
|
-
if (event.pointerType === "touch") handlePointerOpen(event);
|
|
1581
|
-
}, ["prevent"])),
|
|
1582
|
-
onKeydown: _cache[3] || (_cache[3] = (event) => {
|
|
1583
|
-
const isTypingAhead = unref(search) !== "";
|
|
1584
|
-
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
1585
|
-
if (!isModifierKey && event.key.length === 1) {
|
|
1586
|
-
if (isTypingAhead && event.key === " ") return;
|
|
1587
|
-
}
|
|
1588
|
-
unref(handleTypeaheadSearch)(event.key, unref(getItems)());
|
|
1589
|
-
if (unref(OPEN_KEYS).includes(event.key)) {
|
|
1590
|
-
handleOpen();
|
|
1591
|
-
event.preventDefault();
|
|
1592
|
-
}
|
|
1593
|
-
})
|
|
1594
|
-
}, {
|
|
1595
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1596
|
-
_: 3
|
|
1597
|
-
}, 8, [
|
|
1598
|
-
"type",
|
|
1599
|
-
"aria-controls",
|
|
1600
|
-
"aria-expanded",
|
|
1601
|
-
"aria-required",
|
|
1602
|
-
"disabled",
|
|
1603
|
-
"dir",
|
|
1604
|
-
"data-state",
|
|
1605
|
-
"data-disabled",
|
|
1606
|
-
"data-placeholder",
|
|
1607
|
-
"as-child",
|
|
1608
|
-
"as"
|
|
1609
|
-
])];
|
|
1610
|
-
}),
|
|
1611
|
-
_: 3
|
|
1612
|
-
}, 8, ["reference"]);
|
|
1613
|
-
};
|
|
1614
|
-
}
|
|
1615
|
-
});
|
|
1616
|
-
var SelectTrigger_default = SelectTrigger_vue_vue_type_script_setup_true_lang_default;
|
|
1617
|
-
var SelectValue_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1618
|
-
__name: "SelectValue",
|
|
1619
|
-
props: {
|
|
1620
|
-
placeholder: {
|
|
1621
|
-
type: String,
|
|
1622
|
-
required: false,
|
|
1623
|
-
default: ""
|
|
1624
|
-
},
|
|
1625
|
-
asChild: {
|
|
1626
|
-
type: Boolean,
|
|
1627
|
-
required: false
|
|
1628
|
-
},
|
|
1629
|
-
as: {
|
|
1630
|
-
type: null,
|
|
1631
|
-
required: false,
|
|
1632
|
-
default: "span"
|
|
1633
|
-
}
|
|
1634
|
-
},
|
|
1635
|
-
setup(__props) {
|
|
1636
|
-
const props = __props;
|
|
1637
|
-
const { forwardRef, currentElement } = useForwardExpose();
|
|
1638
|
-
const rootContext = injectSelectRootContext();
|
|
1639
|
-
onMounted(() => {
|
|
1640
|
-
rootContext.valueElement = currentElement;
|
|
1641
|
-
});
|
|
1642
|
-
const selectedLabel = computed(() => {
|
|
1643
|
-
var _a;
|
|
1644
|
-
let list = [];
|
|
1645
|
-
const options = Array.from(rootContext.optionsSet.value);
|
|
1646
|
-
const getOption = (value) => options.find((option) => valueComparator(value, option.value, rootContext.by));
|
|
1647
|
-
if (Array.isArray(rootContext.modelValue.value)) list = rootContext.modelValue.value.map((value) => {
|
|
1648
|
-
var _a2;
|
|
1649
|
-
return ((_a2 = getOption(value)) == null ? void 0 : _a2.textContent) ?? "";
|
|
1650
|
-
});
|
|
1651
|
-
else list = [((_a = getOption(rootContext.modelValue.value)) == null ? void 0 : _a.textContent) ?? ""];
|
|
1652
|
-
return list.filter(Boolean);
|
|
1653
|
-
});
|
|
1654
|
-
const slotText = computed(() => {
|
|
1655
|
-
return selectedLabel.value.length ? selectedLabel.value.join(", ") : props.placeholder;
|
|
1656
|
-
});
|
|
1657
|
-
return (_ctx, _cache) => {
|
|
1658
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1659
|
-
ref: unref(forwardRef),
|
|
1660
|
-
as: _ctx.as,
|
|
1661
|
-
"as-child": _ctx.asChild,
|
|
1662
|
-
style: { pointerEvents: "none" },
|
|
1663
|
-
"data-placeholder": selectedLabel.value.length ? void 0 : props.placeholder
|
|
1664
|
-
}, {
|
|
1665
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
1666
|
-
selectedLabel: selectedLabel.value,
|
|
1667
|
-
modelValue: unref(rootContext).modelValue.value
|
|
1668
|
-
}, () => [createTextVNode(toDisplayString(slotText.value), 1)])]),
|
|
1669
|
-
_: 3
|
|
1670
|
-
}, 8, [
|
|
1671
|
-
"as",
|
|
1672
|
-
"as-child",
|
|
1673
|
-
"data-placeholder"
|
|
1674
|
-
]);
|
|
1675
|
-
};
|
|
1676
|
-
}
|
|
1677
|
-
});
|
|
1678
|
-
var SelectValue_default = SelectValue_vue_vue_type_script_setup_true_lang_default;
|
|
1679
|
-
var SelectViewport_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1680
|
-
__name: "SelectViewport",
|
|
1681
|
-
props: {
|
|
1682
|
-
nonce: {
|
|
1683
|
-
type: String,
|
|
1684
|
-
required: false
|
|
1685
|
-
},
|
|
1686
|
-
asChild: {
|
|
1687
|
-
type: Boolean,
|
|
1688
|
-
required: false
|
|
1689
|
-
},
|
|
1690
|
-
as: {
|
|
1691
|
-
type: null,
|
|
1692
|
-
required: false
|
|
1693
|
-
}
|
|
1694
|
-
},
|
|
1695
|
-
setup(__props) {
|
|
1696
|
-
const props = __props;
|
|
1697
|
-
const { nonce: propNonce } = toRefs(props);
|
|
1698
|
-
const nonce = useNonce(propNonce);
|
|
1699
|
-
const contentContext = injectSelectContentContext();
|
|
1700
|
-
const alignedPositionContext = contentContext.position === "item-aligned" ? injectSelectItemAlignedPositionContext() : void 0;
|
|
1701
|
-
const { forwardRef, currentElement } = useForwardExpose();
|
|
1702
|
-
onMounted(() => {
|
|
1703
|
-
contentContext == null ? void 0 : contentContext.onViewportChange(currentElement.value);
|
|
1704
|
-
});
|
|
1705
|
-
const prevScrollTopRef = ref(0);
|
|
1706
|
-
function handleScroll(event) {
|
|
1707
|
-
const viewport = event.currentTarget;
|
|
1708
|
-
const { shouldExpandOnScrollRef, contentWrapper } = alignedPositionContext ?? {};
|
|
1709
|
-
if ((shouldExpandOnScrollRef == null ? void 0 : shouldExpandOnScrollRef.value) && (contentWrapper == null ? void 0 : contentWrapper.value)) {
|
|
1710
|
-
const scrolledBy = Math.abs(prevScrollTopRef.value - viewport.scrollTop);
|
|
1711
|
-
if (scrolledBy > 0) {
|
|
1712
|
-
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
1713
|
-
const cssMinHeight = Number.parseFloat(contentWrapper.value.style.minHeight);
|
|
1714
|
-
const cssHeight = Number.parseFloat(contentWrapper.value.style.height);
|
|
1715
|
-
const prevHeight = Math.max(cssMinHeight, cssHeight);
|
|
1716
|
-
if (prevHeight < availableHeight) {
|
|
1717
|
-
const nextHeight = prevHeight + scrolledBy;
|
|
1718
|
-
const clampedNextHeight = Math.min(availableHeight, nextHeight);
|
|
1719
|
-
const heightDiff = nextHeight - clampedNextHeight;
|
|
1720
|
-
contentWrapper.value.style.height = `${clampedNextHeight}px`;
|
|
1721
|
-
if (contentWrapper.value.style.bottom === "0px") {
|
|
1722
|
-
viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;
|
|
1723
|
-
contentWrapper.value.style.justifyContent = "flex-end";
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
prevScrollTopRef.value = viewport.scrollTop;
|
|
1729
|
-
}
|
|
1730
|
-
return (_ctx, _cache) => {
|
|
1731
|
-
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(Primitive), mergeProps({
|
|
1732
|
-
ref: unref(forwardRef),
|
|
1733
|
-
"data-reka-select-viewport": "",
|
|
1734
|
-
role: "presentation"
|
|
1735
|
-
}, {
|
|
1736
|
-
..._ctx.$attrs,
|
|
1737
|
-
...props
|
|
1738
|
-
}, {
|
|
1739
|
-
style: {
|
|
1740
|
-
position: "relative",
|
|
1741
|
-
flex: 1,
|
|
1742
|
-
overflow: "hidden auto"
|
|
1743
|
-
},
|
|
1744
|
-
onScroll: handleScroll
|
|
1745
|
-
}), {
|
|
1746
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1747
|
-
_: 3
|
|
1748
|
-
}, 16), createVNode(unref(Primitive), {
|
|
1749
|
-
as: "style",
|
|
1750
|
-
nonce: unref(nonce)
|
|
1751
|
-
}, {
|
|
1752
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),
|
|
1753
|
-
_: 1,
|
|
1754
|
-
__: [0]
|
|
1755
|
-
}, 8, ["nonce"])], 64);
|
|
1756
|
-
};
|
|
1757
|
-
}
|
|
1758
|
-
});
|
|
1759
|
-
var SelectViewport_default = SelectViewport_vue_vue_type_script_setup_true_lang_default;
|
|
1760
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1761
|
-
__name: "Select",
|
|
1762
|
-
props: {
|
|
1763
|
-
open: { type: Boolean },
|
|
1764
|
-
defaultOpen: { type: Boolean },
|
|
1765
|
-
defaultValue: {},
|
|
1766
|
-
modelValue: {},
|
|
1767
|
-
by: { type: [String, Function] },
|
|
1768
|
-
dir: {},
|
|
1769
|
-
multiple: { type: Boolean },
|
|
1770
|
-
autocomplete: {},
|
|
1771
|
-
disabled: { type: Boolean },
|
|
1772
|
-
name: {},
|
|
1773
|
-
required: { type: Boolean }
|
|
1774
|
-
},
|
|
1775
|
-
emits: ["update:modelValue", "update:open"],
|
|
1776
|
-
setup(__props, { emit: __emit }) {
|
|
1777
|
-
const props = __props;
|
|
1778
|
-
const emits = __emit;
|
|
1779
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
1780
|
-
return (_ctx, _cache) => {
|
|
1781
|
-
return openBlock(), createBlock(unref(SelectRoot_default), mergeProps({ "data-slot": "select" }, unref(forwarded)), {
|
|
1782
|
-
default: withCtx((slotProps) => [
|
|
1783
|
-
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps)))
|
|
1784
|
-
]),
|
|
1785
|
-
_: 3
|
|
1786
|
-
}, 16);
|
|
1787
|
-
};
|
|
1788
|
-
}
|
|
1789
|
-
});
|
|
1790
|
-
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1791
|
-
...{
|
|
1792
|
-
inheritAttrs: false
|
|
1793
|
-
},
|
|
1794
|
-
__name: "SelectContent",
|
|
1795
|
-
props: {
|
|
1796
|
-
forceMount: { type: Boolean },
|
|
1797
|
-
position: { default: "popper" },
|
|
1798
|
-
bodyLock: { type: Boolean },
|
|
1799
|
-
side: {},
|
|
1800
|
-
sideOffset: { default: 4 },
|
|
1801
|
-
sideFlip: { type: Boolean },
|
|
1802
|
-
align: { default: "start" },
|
|
1803
|
-
alignOffset: {},
|
|
1804
|
-
alignFlip: { type: Boolean },
|
|
1805
|
-
avoidCollisions: { type: Boolean },
|
|
1806
|
-
collisionBoundary: {},
|
|
1807
|
-
collisionPadding: { default: 8 },
|
|
1808
|
-
arrowPadding: {},
|
|
1809
|
-
hideShiftedArrow: { type: Boolean },
|
|
1810
|
-
sticky: {},
|
|
1811
|
-
hideWhenDetached: { type: Boolean },
|
|
1812
|
-
positionStrategy: {},
|
|
1813
|
-
updatePositionStrategy: {},
|
|
1814
|
-
disableUpdateOnLayoutShift: { type: Boolean },
|
|
1815
|
-
prioritizePosition: { type: Boolean },
|
|
1816
|
-
reference: {},
|
|
1817
|
-
asChild: { type: Boolean },
|
|
1818
|
-
as: {},
|
|
1819
|
-
disableOutsidePointerEvents: { type: Boolean },
|
|
1820
|
-
class: {}
|
|
1821
|
-
},
|
|
1822
|
-
emits: ["closeAutoFocus", "escapeKeyDown", "pointerDownOutside"],
|
|
1823
|
-
setup(__props, { emit: __emit }) {
|
|
1824
|
-
const props = __props;
|
|
1825
|
-
const emits = __emit;
|
|
1826
|
-
const delegatedProps = reactiveOmit(props, "class");
|
|
1827
|
-
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
1828
|
-
return (_ctx, _cache) => {
|
|
1829
|
-
return openBlock(), createBlock(unref(SelectPortal_default), null, {
|
|
1830
|
-
default: withCtx(() => [
|
|
1831
|
-
createVNode(unref(SelectContent_default), mergeProps({ "data-slot": "select-content" }, { ..._ctx.$attrs, ...unref(forwarded) }, {
|
|
1832
|
-
class: unref(cn)(
|
|
1833
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded border border-border transition-colors duration-300 ease-in-out max-sm:w-[calc(100vw-1rem)] max-sm:max-w-[calc(100vw-1rem)] max-sm:min-w-0",
|
|
1834
|
-
_ctx.position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1835
|
-
props.class
|
|
1836
|
-
)
|
|
1837
|
-
}), {
|
|
1838
|
-
default: withCtx(() => [
|
|
1839
|
-
createVNode(unref(_sfc_main$4)),
|
|
1840
|
-
createVNode(unref(SelectViewport_default), {
|
|
1841
|
-
class: normalizeClass(unref(cn)("p-1", _ctx.position === "popper" && "h-(--reka-select-trigger-height) w-full min-w-(--reka-select-trigger-width) scroll-my-1"))
|
|
1842
|
-
}, {
|
|
1843
|
-
default: withCtx(() => [
|
|
1844
|
-
renderSlot(_ctx.$slots, "default")
|
|
1845
|
-
]),
|
|
1846
|
-
_: 3
|
|
1847
|
-
}, 8, ["class"]),
|
|
1848
|
-
createVNode(unref(_sfc_main$5))
|
|
1849
|
-
]),
|
|
1850
|
-
_: 3
|
|
1851
|
-
}, 16, ["class"])
|
|
1852
|
-
]),
|
|
1853
|
-
_: 3
|
|
1854
|
-
});
|
|
1855
|
-
};
|
|
1856
|
-
}
|
|
1857
|
-
});
|
|
1858
|
-
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1859
|
-
__name: "SelectGroup",
|
|
1860
|
-
props: {
|
|
1861
|
-
asChild: { type: Boolean },
|
|
1862
|
-
as: {}
|
|
1863
|
-
},
|
|
1864
|
-
setup(__props) {
|
|
1865
|
-
const props = __props;
|
|
1866
|
-
return (_ctx, _cache) => {
|
|
1867
|
-
return openBlock(), createBlock(unref(SelectGroup_default), mergeProps({ "data-slot": "select-group" }, props), {
|
|
1868
|
-
default: withCtx(() => [
|
|
1869
|
-
renderSlot(_ctx.$slots, "default")
|
|
1870
|
-
]),
|
|
1871
|
-
_: 3
|
|
1872
|
-
}, 16);
|
|
1873
|
-
};
|
|
1874
|
-
}
|
|
1875
|
-
});
|
|
1876
|
-
const _hoisted_1$2 = { class: "absolute right-2 flex size-3.5 items-center justify-center" };
|
|
1877
|
-
const _hoisted_2 = { class: "sr-only" };
|
|
1878
|
-
const _hoisted_3 = { class: "flex min-w-0 flex-1 flex-col" };
|
|
1879
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1880
|
-
__name: "SelectItem",
|
|
1881
|
-
props: {
|
|
1882
|
-
value: {},
|
|
1883
|
-
disabled: { type: Boolean },
|
|
1884
|
-
textValue: {},
|
|
1885
|
-
asChild: { type: Boolean },
|
|
1886
|
-
as: {},
|
|
1887
|
-
class: {}
|
|
1888
|
-
},
|
|
1889
|
-
setup(__props) {
|
|
1890
|
-
const props = __props;
|
|
1891
|
-
const delegatedProps = reactiveOmit(props, "class");
|
|
1892
|
-
const forwardedProps = useForwardProps(delegatedProps);
|
|
1893
|
-
return (_ctx, _cache) => {
|
|
1894
|
-
return openBlock(), createBlock(unref(SelectItem_default), mergeProps({ "data-slot": "select-item" }, unref(forwardedProps), {
|
|
1895
|
-
class: unref(cn)(
|
|
1896
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-2.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1897
|
-
props.class
|
|
1898
|
-
)
|
|
1899
|
-
}), {
|
|
1900
|
-
default: withCtx(() => [
|
|
1901
|
-
createElementVNode("span", _hoisted_1$2, [
|
|
1902
|
-
createVNode(unref(SelectItemIndicator_default), null, {
|
|
1903
|
-
default: withCtx(() => [
|
|
1904
|
-
renderSlot(_ctx.$slots, "indicator-icon", {}, () => [
|
|
1905
|
-
createVNode(unref(HugeiconsIcon), {
|
|
1906
|
-
icon: unref(TWr),
|
|
1907
|
-
class: "size-4"
|
|
1908
|
-
}, null, 8, ["icon"])
|
|
1909
|
-
])
|
|
1910
|
-
]),
|
|
1911
|
-
_: 3
|
|
1912
|
-
})
|
|
1913
|
-
]),
|
|
1914
|
-
props.textValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1915
|
-
createVNode(unref(SelectItemText_default), null, {
|
|
1916
|
-
default: withCtx(() => [
|
|
1917
|
-
createElementVNode("span", _hoisted_2, toDisplayString(props.textValue), 1)
|
|
1918
|
-
]),
|
|
1919
|
-
_: 1
|
|
1920
|
-
}),
|
|
1921
|
-
createElementVNode("div", _hoisted_3, [
|
|
1922
|
-
renderSlot(_ctx.$slots, "default")
|
|
1923
|
-
])
|
|
1924
|
-
], 64)) : (openBlock(), createBlock(unref(SelectItemText_default), { key: 1 }, {
|
|
1925
|
-
default: withCtx(() => [
|
|
1926
|
-
renderSlot(_ctx.$slots, "default")
|
|
1927
|
-
]),
|
|
1928
|
-
_: 3
|
|
1929
|
-
}))
|
|
1930
|
-
]),
|
|
1931
|
-
_: 3
|
|
1932
|
-
}, 16, ["class"]);
|
|
1933
|
-
};
|
|
1934
|
-
}
|
|
1935
|
-
});
|
|
1936
|
-
const _hoisted_1$1 = { class: "flex min-w-0 flex-1 flex-col gap-0.5" };
|
|
1937
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1938
|
-
__name: "SelectItemContent",
|
|
1939
|
-
props: {
|
|
1940
|
-
class: {},
|
|
1941
|
-
icon: {},
|
|
1942
|
-
label: {},
|
|
1943
|
-
description: {},
|
|
1944
|
-
iconClass: {},
|
|
1945
|
-
textClass: {},
|
|
1946
|
-
descriptionClass: {}
|
|
1947
|
-
},
|
|
1948
|
-
setup(__props) {
|
|
1949
|
-
const props = __props;
|
|
1950
|
-
return (_ctx, _cache) => {
|
|
1951
|
-
return openBlock(), createElementBlock("div", {
|
|
1952
|
-
"data-slot": "select-item-content",
|
|
1953
|
-
class: normalizeClass(unref(cn)("flex min-w-0 flex-1 items-center gap-2", props.class))
|
|
1954
|
-
}, [
|
|
1955
|
-
props.icon ? (openBlock(), createElementBlock("div", {
|
|
1956
|
-
key: 0,
|
|
1957
|
-
"data-slot": "select-item-content-icon",
|
|
1958
|
-
class: normalizeClass(unref(cn)("shrink-0 self-center", props.iconClass))
|
|
1959
|
-
}, [
|
|
1960
|
-
createVNode(unref(HugeiconsIcon), {
|
|
1961
|
-
icon: props.icon,
|
|
1962
|
-
class: "block size-3 sm:size-4"
|
|
1963
|
-
}, null, 8, ["icon"])
|
|
1964
|
-
], 2)) : createCommentVNode("", true),
|
|
1965
|
-
createElementVNode("div", _hoisted_1$1, [
|
|
1966
|
-
createElementVNode("span", {
|
|
1967
|
-
"data-slot": "select-item-content-text",
|
|
1968
|
-
class: normalizeClass(unref(cn)("min-w-0 truncate font-semibold text-xs sm:text-sm leading-5", props.textClass))
|
|
1969
|
-
}, toDisplayString(props.label), 3),
|
|
1970
|
-
props.description ? (openBlock(), createElementBlock("span", {
|
|
1971
|
-
key: 0,
|
|
1972
|
-
"data-slot": "select-item-content-description",
|
|
1973
|
-
class: normalizeClass(unref(cn)("font-regular text-[11px] sm:text-xs leading-4 sm:leading-5 text-(--text-secondary-light) dark:text-(--text-secondary-dark)", props.descriptionClass))
|
|
1974
|
-
}, toDisplayString(props.description), 3)) : createCommentVNode("", true)
|
|
1975
|
-
])
|
|
1976
|
-
], 2);
|
|
1977
|
-
};
|
|
1978
|
-
}
|
|
1979
|
-
});
|
|
1980
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1981
|
-
__name: "SelectItemText",
|
|
1982
|
-
props: {
|
|
1983
|
-
asChild: { type: Boolean },
|
|
1984
|
-
as: {}
|
|
1985
|
-
},
|
|
1986
|
-
setup(__props) {
|
|
1987
|
-
const props = __props;
|
|
1988
|
-
return (_ctx, _cache) => {
|
|
1989
|
-
return openBlock(), createBlock(unref(SelectItemText_default), mergeProps({ "data-slot": "select-item-text" }, props), {
|
|
1990
|
-
default: withCtx(() => [
|
|
1991
|
-
renderSlot(_ctx.$slots, "default")
|
|
1992
|
-
]),
|
|
1993
|
-
_: 3
|
|
1994
|
-
}, 16);
|
|
1995
|
-
};
|
|
1996
|
-
}
|
|
1997
|
-
});
|
|
1998
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1999
|
-
__name: "SelectLabel",
|
|
2000
|
-
props: {
|
|
2001
|
-
for: {},
|
|
2002
|
-
asChild: { type: Boolean },
|
|
2003
|
-
as: {},
|
|
2004
|
-
class: {}
|
|
2005
|
-
},
|
|
2006
|
-
setup(__props) {
|
|
2007
|
-
const props = __props;
|
|
2008
|
-
return (_ctx, _cache) => {
|
|
2009
|
-
return openBlock(), createBlock(unref(SelectLabel_default), {
|
|
2010
|
-
"data-slot": "select-label",
|
|
2011
|
-
class: normalizeClass(unref(cn)("text-muted-foreground px-2 py-1.5 text-xs", props.class))
|
|
2012
|
-
}, {
|
|
2013
|
-
default: withCtx(() => [
|
|
2014
|
-
renderSlot(_ctx.$slots, "default")
|
|
2015
|
-
]),
|
|
2016
|
-
_: 3
|
|
2017
|
-
}, 8, ["class"]);
|
|
2018
|
-
};
|
|
2019
|
-
}
|
|
2020
|
-
});
|
|
2021
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2022
|
-
__name: "SelectScrollDownButton",
|
|
2023
|
-
props: {
|
|
2024
|
-
asChild: { type: Boolean },
|
|
2025
|
-
as: {},
|
|
2026
|
-
class: {}
|
|
2027
|
-
},
|
|
2028
|
-
setup(__props) {
|
|
2029
|
-
const props = __props;
|
|
2030
|
-
const delegatedProps = reactiveOmit(props, "class");
|
|
2031
|
-
const forwardedProps = useForwardProps(delegatedProps);
|
|
2032
|
-
return (_ctx, _cache) => {
|
|
2033
|
-
return openBlock(), createBlock(unref(SelectScrollDownButton_default), mergeProps({ "data-slot": "select-scroll-down-button" }, unref(forwardedProps), {
|
|
2034
|
-
class: unref(cn)("flex cursor-default items-center justify-center py-1", props.class)
|
|
2035
|
-
}), {
|
|
2036
|
-
default: withCtx(() => [
|
|
2037
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2038
|
-
createVNode(unref(HugeiconsIcon), {
|
|
2039
|
-
icon: unref(dn),
|
|
2040
|
-
class: "size-4"
|
|
2041
|
-
}, null, 8, ["icon"])
|
|
2042
|
-
])
|
|
2043
|
-
]),
|
|
2044
|
-
_: 3
|
|
2045
|
-
}, 16, ["class"]);
|
|
2046
|
-
};
|
|
2047
|
-
}
|
|
2048
|
-
});
|
|
2049
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2050
|
-
__name: "SelectScrollUpButton",
|
|
2051
|
-
props: {
|
|
2052
|
-
asChild: { type: Boolean },
|
|
2053
|
-
as: {},
|
|
2054
|
-
class: {}
|
|
2055
|
-
},
|
|
2056
|
-
setup(__props) {
|
|
2057
|
-
const props = __props;
|
|
2058
|
-
const delegatedProps = reactiveOmit(props, "class");
|
|
2059
|
-
const forwardedProps = useForwardProps(delegatedProps);
|
|
2060
|
-
return (_ctx, _cache) => {
|
|
2061
|
-
return openBlock(), createBlock(unref(SelectScrollUpButton_default), mergeProps({ "data-slot": "select-scroll-up-button" }, unref(forwardedProps), {
|
|
2062
|
-
class: unref(cn)("flex cursor-default items-center justify-center py-1", props.class)
|
|
2063
|
-
}), {
|
|
2064
|
-
default: withCtx(() => [
|
|
2065
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2066
|
-
createVNode(unref(HugeiconsIcon), {
|
|
2067
|
-
icon: unref(CC),
|
|
2068
|
-
class: "size-4"
|
|
2069
|
-
}, null, 8, ["icon"])
|
|
2070
|
-
])
|
|
2071
|
-
]),
|
|
2072
|
-
_: 3
|
|
2073
|
-
}, 16, ["class"]);
|
|
2074
|
-
};
|
|
2075
|
-
}
|
|
2076
|
-
});
|
|
2077
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2078
|
-
__name: "SelectSeparator",
|
|
2079
|
-
props: {
|
|
2080
|
-
asChild: { type: Boolean },
|
|
2081
|
-
as: {},
|
|
2082
|
-
class: {}
|
|
2083
|
-
},
|
|
2084
|
-
setup(__props) {
|
|
2085
|
-
const props = __props;
|
|
2086
|
-
const delegatedProps = reactiveOmit(props, "class");
|
|
2087
|
-
return (_ctx, _cache) => {
|
|
2088
|
-
return openBlock(), createBlock(unref(SelectSeparator_default), mergeProps({ "data-slot": "select-separator" }, unref(delegatedProps), {
|
|
2089
|
-
class: unref(cn)("bg-border pointer-events-none -mx-1 my-1 h-px", props.class)
|
|
2090
|
-
}), null, 16, ["class"]);
|
|
2091
|
-
};
|
|
2092
|
-
}
|
|
2093
|
-
});
|
|
2094
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2095
|
-
__name: "SelectTrigger",
|
|
2096
|
-
props: {
|
|
2097
|
-
disabled: { type: Boolean },
|
|
2098
|
-
reference: {},
|
|
2099
|
-
asChild: { type: Boolean },
|
|
2100
|
-
as: {},
|
|
2101
|
-
class: {},
|
|
2102
|
-
size: { default: "default" }
|
|
2103
|
-
},
|
|
2104
|
-
setup(__props) {
|
|
2105
|
-
const props = __props;
|
|
2106
|
-
const delegatedProps = reactiveOmit(props, "class", "size");
|
|
2107
|
-
const forwardedProps = useForwardProps(delegatedProps);
|
|
2108
|
-
return (_ctx, _cache) => {
|
|
2109
|
-
return openBlock(), createBlock(unref(SelectTrigger_default), mergeProps({
|
|
2110
|
-
"data-slot": "select-trigger",
|
|
2111
|
-
"data-size": _ctx.size
|
|
2112
|
-
}, unref(forwardedProps), {
|
|
2113
|
-
class: unref(cn)(
|
|
2114
|
-
"data-[placeholder]:text-(--text-secondary-light) [&_svg:not([class*='text-'])]:text-(--text-secondary-light) flex w-fit cursor-pointer items-center justify-between gap-2 rounded border border-(--border-light) bg-(--button-secondary-light) px-4 py-3 text-xs font-semibold whitespace-nowrap text-(--text-primary-light) transition-all duration-300 ease-in-out outline-none disabled:cursor-not-allowed disabled:opacity-60 data-[size=default]:h-[52px] data-[size=sm]:h-10 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-(--border-dark) dark:bg-(--button-secondary-dark) dark:text-(--text-primary-dark) dark:data-[placeholder]:text-(--text-secondary-dark) dark:[&_svg:not([class*='text-'])]:text-(--text-secondary-dark) sm:text-sm",
|
|
2115
|
-
"focus-visible:border-(--border-hover-light) focus-visible:ring-0 dark:focus-visible:border-(--border-hover-dark)",
|
|
2116
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
2117
|
-
props.class
|
|
2118
|
-
)
|
|
2119
|
-
}), {
|
|
2120
|
-
default: withCtx(() => [
|
|
2121
|
-
renderSlot(_ctx.$slots, "default"),
|
|
2122
|
-
createVNode(unref(SelectIcon_default), { "as-child": "" }, {
|
|
2123
|
-
default: withCtx(() => [
|
|
2124
|
-
createVNode(unref(HugeiconsIcon), {
|
|
2125
|
-
icon: unref(dn),
|
|
2126
|
-
class: "size-4 opacity-50"
|
|
2127
|
-
}, null, 8, ["icon"])
|
|
2128
|
-
]),
|
|
2129
|
-
_: 1
|
|
2130
|
-
})
|
|
2131
|
-
]),
|
|
2132
|
-
_: 3
|
|
2133
|
-
}, 16, ["data-size", "class"]);
|
|
2134
|
-
};
|
|
2135
|
-
}
|
|
2136
|
-
});
|
|
2137
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2138
|
-
__name: "SelectValue",
|
|
2139
|
-
props: {
|
|
2140
|
-
placeholder: {},
|
|
2141
|
-
asChild: { type: Boolean },
|
|
2142
|
-
as: {}
|
|
2143
|
-
},
|
|
2144
|
-
setup(__props) {
|
|
2145
|
-
const props = __props;
|
|
2146
|
-
return (_ctx, _cache) => {
|
|
2147
|
-
return openBlock(), createBlock(unref(SelectValue_default), mergeProps({ "data-slot": "select-value" }, props), {
|
|
2148
|
-
default: withCtx(() => [
|
|
2149
|
-
renderSlot(_ctx.$slots, "default")
|
|
2150
|
-
]),
|
|
2151
|
-
_: 3
|
|
2152
|
-
}, 16);
|
|
2153
|
-
};
|
|
2154
|
-
}
|
|
2155
|
-
});
|
|
2156
|
-
const _hoisted_1 = { class: "flex min-w-0 flex-1 flex-col gap-0.5" };
|
|
2157
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2158
|
-
__name: "SelectValueContent",
|
|
2159
|
-
props: {
|
|
2160
|
-
placeholder: {},
|
|
2161
|
-
asChild: { type: Boolean },
|
|
2162
|
-
as: {},
|
|
2163
|
-
class: {},
|
|
2164
|
-
icon: {},
|
|
2165
|
-
label: {},
|
|
2166
|
-
description: {},
|
|
2167
|
-
iconClass: {},
|
|
2168
|
-
textClass: {},
|
|
2169
|
-
descriptionClass: {}
|
|
2170
|
-
},
|
|
2171
|
-
setup(__props) {
|
|
2172
|
-
const props = __props;
|
|
2173
|
-
return (_ctx, _cache) => {
|
|
2174
|
-
return openBlock(), createBlock(unref(SelectValue_default), {
|
|
2175
|
-
"data-slot": "select-value-content",
|
|
2176
|
-
placeholder: props.placeholder,
|
|
2177
|
-
class: normalizeClass(unref(cn)("flex min-w-0 flex-1 gap-1.5 text-left sm:gap-2", props.description ? "items-start" : "items-center", props.class))
|
|
2178
|
-
}, {
|
|
2179
|
-
default: withCtx(() => [
|
|
2180
|
-
props.label != null || props.description != null ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2181
|
-
props.icon ? (openBlock(), createElementBlock("div", {
|
|
2182
|
-
key: 0,
|
|
2183
|
-
"data-slot": "select-value-content-icon",
|
|
2184
|
-
class: normalizeClass(unref(cn)("shrink-0", props.iconClass))
|
|
2185
|
-
}, [
|
|
2186
|
-
createVNode(unref(HugeiconsIcon), {
|
|
2187
|
-
icon: props.icon
|
|
2188
|
-
}, null, 8, ["icon"])
|
|
2189
|
-
], 2)) : createCommentVNode("", true),
|
|
2190
|
-
createElementVNode("div", _hoisted_1, [
|
|
2191
|
-
createElementVNode("span", {
|
|
2192
|
-
"data-slot": "select-value-content-text",
|
|
2193
|
-
class: normalizeClass(unref(cn)("min-w-0 whitespace-normal break-words text-xs leading-5 sm:truncate sm:text-sm max-sm:[display:-webkit-box] max-sm:[overflow:hidden] max-sm:[-webkit-box-orient:vertical] max-sm:[-webkit-line-clamp:2]", props.textClass))
|
|
2194
|
-
}, toDisplayString(props.label), 3),
|
|
2195
|
-
props.description ? (openBlock(), createElementBlock("span", {
|
|
2196
|
-
key: 0,
|
|
2197
|
-
"data-slot": "select-value-content-description",
|
|
2198
|
-
class: normalizeClass(unref(cn)("min-w-0 whitespace-normal break-words text-[11px] leading-4 text-(--text-secondary-light) dark:text-(--text-secondary-dark) sm:text-xs sm:leading-5 max-sm:[display:-webkit-box] max-sm:[overflow:hidden] max-sm:[-webkit-box-orient:vertical] max-sm:[-webkit-line-clamp:3]", props.descriptionClass))
|
|
2199
|
-
}, toDisplayString(props.description), 3)) : createCommentVNode("", true)
|
|
2200
|
-
])
|
|
2201
|
-
], 64)) : createCommentVNode("", true)
|
|
2202
|
-
]),
|
|
2203
|
-
_: 1
|
|
2204
|
-
}, 8, ["placeholder", "class"]);
|
|
2205
|
-
};
|
|
2206
|
-
}
|
|
2207
|
-
});
|
|
2208
|
-
export {
|
|
2209
|
-
_sfc_main$c as Select,
|
|
2210
|
-
_sfc_main$b as SelectContent,
|
|
2211
|
-
_sfc_main$a as SelectGroup,
|
|
2212
|
-
_sfc_main$9 as SelectItem,
|
|
2213
|
-
_sfc_main$8 as SelectItemContent,
|
|
2214
|
-
_sfc_main$7 as SelectItemText,
|
|
2215
|
-
_sfc_main$6 as SelectLabel,
|
|
2216
|
-
_sfc_main$5 as SelectScrollDownButton,
|
|
2217
|
-
_sfc_main$4 as SelectScrollUpButton,
|
|
2218
|
-
_sfc_main$3 as SelectSeparator,
|
|
2219
|
-
_sfc_main$2 as SelectTrigger,
|
|
2220
|
-
_sfc_main$1 as SelectValue,
|
|
2221
|
-
_sfc_main as SelectValueContent
|
|
2222
|
-
};
|