@brumaombra/ui-vintage 0.7.8 → 0.7.10
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 +308 -48
- package/module.mjs +1 -1
- package/package.json +2 -1
- package/src/components/background-grid/BackgroundGrid.vue +11 -2
- package/src/components/background-grid/index.ts +2 -2
- package/src/components/blog/AllPostsSection.vue +25 -9
- package/src/components/blog/BlogContentRenderer.vue +133 -0
- package/src/components/blog/BlogFAQSection.vue +8 -3
- package/src/components/blog/BlogHeaderSection.vue +14 -11
- package/src/components/blog/BlogInfoSection.vue +13 -11
- package/src/components/blog/BlogProgressBar.vue +77 -0
- package/src/components/blog/BlogSectionTitle.vue +5 -5
- package/src/components/blog/CategoriesList.vue +11 -3
- package/src/components/blog/CategoriesSection.vue +11 -3
- package/src/components/blog/CategoryCard.vue +10 -8
- package/src/components/blog/HeaderCarousel.vue +24 -15
- package/src/components/blog/PostCard.vue +16 -11
- package/src/components/blog/PostsList.vue +12 -3
- package/src/components/blog/SocialShareSidebar.vue +43 -41
- package/src/components/blog/TableOfContents.vue +29 -13
- package/src/components/blog/index.ts +1 -0
- package/src/components/busy-indicator/BusyIndicator.vue +2 -2
- package/src/components/busy-indicator/busy-indicator-state.ts +11 -12
- package/src/components/busy-indicator/index.ts +3 -3
- package/src/components/card-grid/CardGrid.vue +25 -11
- package/src/components/chip/Chip.vue +15 -15
- package/src/components/chip/index.ts +2 -2
- package/src/components/confirm-dialog/ConfirmDialog.vue +9 -9
- package/src/components/confirm-dialog/confirm-dialog-state.ts +15 -14
- package/src/components/confirm-dialog/index.ts +3 -12
- package/src/components/content/BlogList.vue +11 -8
- package/src/components/content/BlogTable.vue +18 -14
- package/src/components/content/ProseHr.vue +10 -7
- package/src/components/content/Terminal.vue +70 -0
- package/src/components/content/index.ts +2 -1
- package/src/components/dashboard-shell/DashboardShell.vue +43 -64
- package/src/components/dashboard-shell/index.ts +2 -2
- package/src/components/data-list/DataList.vue +11 -13
- package/src/components/data-list/DataListItem.vue +9 -11
- package/src/components/data-list/DataListLabel.vue +9 -11
- package/src/components/data-list/DataListText.vue +9 -11
- package/src/components/data-list/DataListValue.vue +9 -11
- package/src/components/data-list/index.ts +5 -5
- package/src/components/empty-state-card/EmptyStateCard.vue +21 -11
- package/src/components/error-page/ErrorPage.vue +24 -27
- package/src/components/error-page/index.ts +2 -2
- package/src/components/info-card/InfoCard.vue +17 -11
- package/src/components/landing/index.ts +6 -6
- package/src/components/landing/landing-content/LandingContent.vue +5 -7
- package/src/components/landing/landing-content/index.ts +2 -2
- package/src/components/landing/landing-footer/LandingFooter.vue +26 -29
- package/src/components/landing/landing-footer/index.ts +3 -3
- package/src/components/landing/landing-navbar/LandingNavbar.vue +51 -19
- package/src/components/landing/landing-navbar/index.ts +2 -2
- package/src/components/landing/landing-shell/LandingShell.vue +12 -15
- package/src/components/landing/landing-shell/index.ts +2 -2
- package/src/components/language-flag/LanguageFlag.vue +6 -5
- package/src/components/language-flag/index.ts +1 -0
- package/src/components/language-selector/LanguageSelector.vue +20 -21
- package/src/components/load-more-button/LoadMoreButton.vue +18 -14
- package/src/components/loading-state-card/LoadingStateCard.vue +13 -9
- package/src/components/message-dialog/MessageDialog.vue +19 -19
- package/src/components/message-dialog/index.ts +3 -11
- package/src/components/message-dialog/message-dialog-state.ts +12 -11
- package/src/components/message-toast/MessageToast.vue +16 -16
- package/src/components/message-toast/index.ts +2 -9
- package/src/components/message-toast/message-toast-state.ts +9 -9
- package/src/components/page-header/PageHeader.vue +8 -5
- package/src/components/progress-component/ProgressComponent.vue +13 -10
- package/src/components/single-value-card/SingleValueCard.vue +22 -19
- package/src/components/slider-form-component/SliderFormComponent.vue +11 -20
- package/src/components/slider-form-component/index.ts +2 -2
- package/src/components/switch-form-component/SwitchFormComponent.vue +7 -9
- package/src/components/switch-form-component/index.ts +2 -2
- package/src/components/text-link/TextLink.vue +11 -7
- package/src/components/ui/accordion/Accordion.vue +10 -13
- package/src/components/ui/accordion/index.ts +1 -1
- package/src/components/ui/alert/Alert.vue +11 -10
- package/src/components/ui/alert/AlertDescription.vue +9 -8
- package/src/components/ui/alert/AlertTitle.vue +9 -8
- package/src/components/ui/alert/index.ts +10 -10
- package/src/components/ui/alert-dialog/AlertDialog.vue +13 -9
- package/src/components/ui/alert-dialog/AlertDialogAction.vue +14 -12
- package/src/components/ui/alert-dialog/AlertDialogCancel.vue +14 -16
- package/src/components/ui/alert-dialog/AlertDialogContent.vue +24 -27
- package/src/components/ui/alert-dialog/AlertDialogDescription.vue +13 -13
- package/src/components/ui/alert-dialog/AlertDialogFooter.vue +9 -12
- package/src/components/ui/alert-dialog/AlertDialogHeader.vue +9 -8
- package/src/components/ui/alert-dialog/AlertDialogTitle.vue +13 -11
- package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +8 -7
- package/src/components/ui/alert-dialog/index.ts +9 -9
- package/src/components/ui/badge/Badge.vue +11 -12
- package/src/components/ui/badge/index.ts +1 -1
- package/src/components/ui/breadcrumb/Breadcrumb.vue +9 -12
- package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +15 -19
- package/src/components/ui/breadcrumb/BreadcrumbItem.vue +10 -12
- package/src/components/ui/breadcrumb/BreadcrumbLink.vue +13 -17
- package/src/components/ui/breadcrumb/BreadcrumbList.vue +10 -12
- package/src/components/ui/breadcrumb/BreadcrumbPage.vue +10 -15
- package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +14 -18
- package/src/components/ui/breadcrumb/index.ts +7 -7
- package/src/components/ui/busy/Busy.vue +36 -29
- package/src/components/ui/busy/index.ts +1 -1
- package/src/components/ui/button/Button.vue +18 -19
- package/src/components/ui/button/index.ts +54 -35
- package/src/components/ui/calendar/Calendar.vue +167 -121
- package/src/components/ui/calendar/CalendarCell.vue +18 -17
- package/src/components/ui/calendar/CalendarCellTrigger.vue +31 -33
- package/src/components/ui/calendar/CalendarGrid.vue +14 -17
- package/src/components/ui/calendar/CalendarGridBody.vue +9 -11
- package/src/components/ui/calendar/CalendarGridHead.vue +10 -12
- package/src/components/ui/calendar/CalendarGridRow.vue +14 -16
- package/src/components/ui/calendar/CalendarHeadCell.vue +18 -17
- package/src/components/ui/calendar/CalendarHeader.vue +18 -17
- package/src/components/ui/calendar/CalendarHeading.vue +18 -22
- package/src/components/ui/calendar/CalendarNextButton.vue +29 -26
- package/src/components/ui/calendar/CalendarPrevButton.vue +29 -26
- package/src/components/ui/calendar/index.ts +17 -13
- package/src/components/ui/card/Card.vue +21 -13
- package/src/components/ui/card/CardAction.vue +12 -7
- package/src/components/ui/card/CardContent.vue +8 -7
- package/src/components/ui/card/CardDescription.vue +16 -7
- package/src/components/ui/card/CardFooter.vue +8 -7
- package/src/components/ui/card/CardHeader.vue +12 -7
- package/src/components/ui/card/CardText.vue +12 -7
- package/src/components/ui/card/CardTitle.vue +9 -7
- package/src/components/ui/card/index.ts +8 -8
- package/src/components/ui/command/Command.vue +71 -61
- package/src/components/ui/command/CommandDialog.vue +33 -23
- package/src/components/ui/command/CommandEmpty.vue +19 -20
- package/src/components/ui/command/CommandGroup.vue +32 -35
- package/src/components/ui/command/CommandInput.vue +25 -21
- package/src/components/ui/command/CommandItem.vue +62 -59
- package/src/components/ui/command/CommandList.vue +21 -18
- package/src/components/ui/command/CommandSeparator.vue +13 -11
- package/src/components/ui/command/CommandShortcut.vue +13 -8
- package/src/components/ui/command/index.ts +24 -20
- package/src/components/ui/date-picker/DatePicker.vue +46 -37
- package/src/components/ui/date-picker/index.ts +2 -2
- package/src/components/ui/date-time-picker/DateTimePicker.vue +99 -95
- package/src/components/ui/date-time-picker/index.ts +2 -2
- package/src/components/ui/dialog/Dialog.vue +12 -9
- package/src/components/ui/dialog/DialogClose.vue +8 -10
- package/src/components/ui/dialog/DialogContent.vue +36 -42
- package/src/components/ui/dialog/DialogDescription.vue +16 -11
- package/src/components/ui/dialog/DialogFooter.vue +13 -12
- package/src/components/ui/dialog/DialogHeader.vue +9 -8
- package/src/components/ui/dialog/DialogOverlay.vue +16 -11
- package/src/components/ui/dialog/DialogScrollContent.vue +47 -45
- package/src/components/ui/dialog/DialogTitle.vue +13 -12
- package/src/components/ui/dialog/DialogTrigger.vue +8 -7
- package/src/components/ui/dialog/index.ts +10 -10
- package/src/components/ui/field/Field.vue +12 -14
- package/src/components/ui/field/FieldContent.vue +13 -11
- package/src/components/ui/field/FieldDescription.vue +15 -13
- package/src/components/ui/field/FieldError.vue +43 -40
- package/src/components/ui/field/FieldGroup.vue +13 -11
- package/src/components/ui/field/FieldLabel.vue +16 -14
- package/src/components/ui/field/FieldLegend.vue +16 -14
- package/src/components/ui/field/FieldSeparator.vue +17 -15
- package/src/components/ui/field/FieldSet.vue +14 -12
- package/src/components/ui/field/FieldTitle.vue +13 -11
- package/src/components/ui/field/index.ts +36 -36
- package/src/components/ui/input/Input.vue +23 -20
- package/src/components/ui/input/index.ts +1 -1
- package/src/components/ui/label/Label.vue +16 -15
- package/src/components/ui/label/index.ts +1 -1
- package/src/components/ui/native-select/NativeSelect.vue +31 -41
- package/src/components/ui/native-select/NativeSelectOptGroup.vue +8 -7
- package/src/components/ui/native-select/NativeSelectOption.vue +8 -7
- package/src/components/ui/native-select/index.ts +3 -3
- package/src/components/ui/popover/Popover.vue +12 -9
- package/src/components/ui/popover/PopoverAnchor.vue +8 -7
- package/src/components/ui/popover/PopoverContent.vue +27 -31
- package/src/components/ui/popover/PopoverTrigger.vue +8 -7
- package/src/components/ui/popover/index.ts +4 -4
- package/src/components/ui/progress/Progress.vue +18 -32
- package/src/components/ui/progress/index.ts +1 -1
- package/src/components/ui/scroll-area/ScrollArea.vue +23 -26
- package/src/components/ui/scroll-area/ScrollBar.vue +22 -26
- package/src/components/ui/scroll-area/index.ts +2 -2
- package/src/components/ui/select/Select.vue +12 -9
- package/src/components/ui/select/SelectContent.vue +39 -40
- package/src/components/ui/select/SelectGroup.vue +8 -7
- package/src/components/ui/select/SelectItem.vue +36 -41
- package/src/components/ui/select/SelectItemContent.vue +22 -15
- package/src/components/ui/select/SelectItemText.vue +8 -7
- package/src/components/ui/select/SelectLabel.vue +10 -9
- package/src/components/ui/select/SelectScrollDownButton.vue +21 -17
- package/src/components/ui/select/SelectScrollUpButton.vue +21 -17
- package/src/components/ui/select/SelectSeparator.vue +11 -9
- package/src/components/ui/select/SelectTrigger.vue +27 -25
- package/src/components/ui/select/SelectValue.vue +8 -7
- package/src/components/ui/select/SelectValueContent.vue +30 -18
- package/src/components/ui/select/index.ts +13 -13
- package/src/components/ui/separator/Separator.vue +17 -18
- package/src/components/ui/separator/index.ts +1 -1
- package/src/components/ui/sheet/Sheet.vue +12 -9
- package/src/components/ui/sheet/SheetClose.vue +8 -7
- package/src/components/ui/sheet/SheetContent.vue +36 -37
- package/src/components/ui/sheet/SheetDescription.vue +12 -11
- package/src/components/ui/sheet/SheetFooter.vue +8 -7
- package/src/components/ui/sheet/SheetHeader.vue +8 -7
- package/src/components/ui/sheet/SheetOverlay.vue +16 -11
- package/src/components/ui/sheet/SheetTitle.vue +12 -11
- package/src/components/ui/sheet/SheetTrigger.vue +8 -7
- package/src/components/ui/sheet/index.ts +8 -8
- package/src/components/ui/sidebar/Sidebar.vue +68 -61
- package/src/components/ui/sidebar/SidebarContent.vue +13 -8
- package/src/components/ui/sidebar/SidebarFooter.vue +13 -8
- package/src/components/ui/sidebar/SidebarGroup.vue +13 -8
- package/src/components/ui/sidebar/SidebarGroupAction.vue +16 -16
- package/src/components/ui/sidebar/SidebarGroupContent.vue +9 -8
- package/src/components/ui/sidebar/SidebarGroupLabel.vue +15 -14
- package/src/components/ui/sidebar/SidebarHeader.vue +13 -8
- package/src/components/ui/sidebar/SidebarInput.vue +14 -12
- package/src/components/ui/sidebar/SidebarInset.vue +14 -12
- package/src/components/ui/sidebar/SidebarMenu.vue +9 -8
- package/src/components/ui/sidebar/SidebarMenuAction.vue +25 -23
- package/src/components/ui/sidebar/SidebarMenuBadge.vue +19 -17
- package/src/components/ui/sidebar/SidebarMenuButton.vue +33 -32
- package/src/components/ui/sidebar/SidebarMenuButtonChild.vue +19 -18
- package/src/components/ui/sidebar/SidebarMenuItem.vue +9 -8
- package/src/components/ui/sidebar/SidebarMenuSkeleton.vue +17 -12
- package/src/components/ui/sidebar/SidebarMenuSub.vue +14 -12
- package/src/components/ui/sidebar/SidebarMenuSubButton.vue +24 -21
- package/src/components/ui/sidebar/SidebarMenuSubItem.vue +9 -8
- package/src/components/ui/sidebar/SidebarProvider.vue +63 -53
- package/src/components/ui/sidebar/SidebarRail.vue +20 -18
- package/src/components/ui/sidebar/SidebarSeparator.vue +10 -9
- package/src/components/ui/sidebar/SidebarTrigger.vue +15 -14
- package/src/components/ui/sidebar/index.ts +62 -58
- package/src/components/ui/sidebar/utils.ts +16 -16
- package/src/components/ui/skeleton/Skeleton.vue +12 -9
- package/src/components/ui/skeleton/index.ts +1 -1
- package/src/components/ui/slider/Slider.vue +24 -19
- package/src/components/ui/slider/index.ts +1 -1
- package/src/components/ui/switch/Switch.vue +26 -23
- package/src/components/ui/switch/index.ts +1 -1
- package/src/components/ui/table/Table.vue +11 -10
- package/src/components/ui/table/TableBody.vue +9 -11
- package/src/components/ui/table/TableCaption.vue +9 -11
- package/src/components/ui/table/TableCell.vue +13 -16
- package/src/components/ui/table/TableEmpty.vue +22 -25
- package/src/components/ui/table/TableFooter.vue +13 -11
- package/src/components/ui/table/TableHead.vue +13 -11
- package/src/components/ui/table/TableHeader.vue +9 -11
- package/src/components/ui/table/TableRow.vue +13 -11
- package/src/components/ui/table/index.ts +9 -9
- package/src/components/ui/tabs/Tabs.vue +18 -18
- package/src/components/ui/tabs/TabsContent.vue +14 -15
- package/src/components/ui/tabs/TabsList.vue +18 -18
- package/src/components/ui/tabs/TabsTrigger.vue +19 -20
- package/src/components/ui/tabs/index.ts +4 -4
- package/src/components/ui/textarea/Textarea.vue +23 -20
- package/src/components/ui/textarea/index.ts +1 -1
- package/src/components/ui/time-picker/TimePicker.vue +33 -38
- package/src/components/ui/time-picker/index.ts +2 -2
- package/src/components/ui/tooltip/Tooltip.vue +12 -9
- package/src/components/ui/tooltip/TooltipContent.vue +28 -20
- package/src/components/ui/tooltip/TooltipProvider.vue +9 -8
- package/src/components/ui/tooltip/TooltipTrigger.vue +8 -7
- package/src/components/ui/tooltip/index.ts +4 -4
- package/src/i18n/de.json +5 -0
- package/src/i18n/en.json +5 -0
- package/src/i18n/es.json +5 -0
- package/src/i18n/fr.json +5 -0
- package/src/i18n/it.json +5 -0
- package/src/i18n/ja.json +5 -0
- package/src/i18n/pt.json +5 -0
- package/src/i18n/ru.json +5 -0
- package/src/i18n/zh.json +5 -0
- package/src/lib/common-types.ts +2 -0
- package/src/lib/i18n.ts +0 -5
- package/src/runtime/{ui-vintage-i18n-plugin.js → ui-vintage-i18n-plugin.ts} +30 -8
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from
|
|
3
|
-
import { HugeiconsIcon } from
|
|
4
|
-
import type { SelectValueProps } from
|
|
5
|
-
import { SelectValue } from
|
|
6
|
-
import { cn } from
|
|
7
|
-
|
|
8
|
-
type HugeiconsIconDefinition = readonly (readonly [string, { readonly [key: string]: string | number }])[]
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { HugeiconsIcon } from '@hugeicons/vue';
|
|
4
|
+
import type { SelectValueProps } from 'reka-ui';
|
|
5
|
+
import { SelectValue } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
|
+
import type { HugeiconsIconDefinition } from '../../../lib/common-types';
|
|
9
8
|
|
|
10
9
|
// Props
|
|
11
10
|
const props = defineProps<SelectValueProps & {
|
|
12
|
-
class?: HTMLAttributes[
|
|
13
|
-
icon?: HugeiconsIconDefinition | null
|
|
14
|
-
label?: string | number | null
|
|
15
|
-
description?: string | number | null
|
|
16
|
-
iconClass?: HTMLAttributes[
|
|
17
|
-
textClass?: HTMLAttributes[
|
|
18
|
-
descriptionClass?: HTMLAttributes[
|
|
19
|
-
}>()
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
icon?: HugeiconsIconDefinition | null;
|
|
13
|
+
label?: string | number | null;
|
|
14
|
+
description?: string | number | null;
|
|
15
|
+
iconClass?: HTMLAttributes['class'];
|
|
16
|
+
textClass?: HTMLAttributes['class'];
|
|
17
|
+
descriptionClass?: HTMLAttributes['class'];
|
|
18
|
+
}>();
|
|
20
19
|
</script>
|
|
21
20
|
|
|
22
21
|
<template>
|
|
23
|
-
<SelectValue data-slot="select-value-content" :placeholder="props.placeholder" :class="cn(
|
|
22
|
+
<SelectValue data-slot="select-value-content" :placeholder="props.placeholder" :class="cn(
|
|
23
|
+
'flex min-w-0 flex-1 gap-1.5 text-left sm:gap-2',
|
|
24
|
+
props.description ? 'items-start' : 'items-center',
|
|
25
|
+
props.class
|
|
26
|
+
)
|
|
27
|
+
">
|
|
24
28
|
<template v-if="props.label != null || props.description != null">
|
|
25
29
|
<!-- Icon -->
|
|
26
30
|
<div v-if="props.icon" data-slot="select-value-content-icon" :class="cn('shrink-0', props.iconClass)">
|
|
@@ -30,12 +34,20 @@ const props = defineProps<SelectValueProps & {
|
|
|
30
34
|
<!-- Text and description -->
|
|
31
35
|
<div class="flex min-w-0 flex-1 flex-col gap-0.5">
|
|
32
36
|
<!-- Text -->
|
|
33
|
-
<span data-slot="select-value-content-text" :class="cn(
|
|
37
|
+
<span data-slot="select-value-content-text" :class="cn(
|
|
38
|
+
'min-w-0 whitespace-normal wrap-break-word 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]',
|
|
39
|
+
props.textClass
|
|
40
|
+
)
|
|
41
|
+
">
|
|
34
42
|
{{ props.label }}
|
|
35
43
|
</span>
|
|
36
44
|
|
|
37
45
|
<!-- Description -->
|
|
38
|
-
<span v-if="props.description" data-slot="select-value-content-description" :class="cn(
|
|
46
|
+
<span v-if="props.description" data-slot="select-value-content-description" :class="cn(
|
|
47
|
+
'min-w-0 whitespace-normal wrap-break-word 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]',
|
|
48
|
+
props.descriptionClass
|
|
49
|
+
)
|
|
50
|
+
">
|
|
39
51
|
{{ props.description }}
|
|
40
52
|
</span>
|
|
41
53
|
</div>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { default as Select } from
|
|
2
|
-
export { default as SelectContent } from
|
|
3
|
-
export { default as SelectGroup } from
|
|
4
|
-
export { default as SelectItem } from
|
|
5
|
-
export { default as SelectItemContent } from
|
|
6
|
-
export { default as SelectItemText } from
|
|
7
|
-
export { default as SelectLabel } from
|
|
8
|
-
export { default as SelectScrollDownButton } from
|
|
9
|
-
export { default as SelectScrollUpButton } from
|
|
10
|
-
export { default as SelectSeparator } from
|
|
11
|
-
export { default as SelectTrigger } from
|
|
12
|
-
export { default as SelectValue } from
|
|
13
|
-
export { default as SelectValueContent } from
|
|
1
|
+
export { default as Select } from './Select.vue';
|
|
2
|
+
export { default as SelectContent } from './SelectContent.vue';
|
|
3
|
+
export { default as SelectGroup } from './SelectGroup.vue';
|
|
4
|
+
export { default as SelectItem } from './SelectItem.vue';
|
|
5
|
+
export { default as SelectItemContent } from './SelectItemContent.vue';
|
|
6
|
+
export { default as SelectItemText } from './SelectItemText.vue';
|
|
7
|
+
export { default as SelectLabel } from './SelectLabel.vue';
|
|
8
|
+
export { default as SelectScrollDownButton } from './SelectScrollDownButton.vue';
|
|
9
|
+
export { default as SelectScrollUpButton } from './SelectScrollUpButton.vue';
|
|
10
|
+
export { default as SelectSeparator } from './SelectSeparator.vue';
|
|
11
|
+
export { default as SelectTrigger } from './SelectTrigger.vue';
|
|
12
|
+
export { default as SelectValue } from './SelectValue.vue';
|
|
13
|
+
export { default as SelectValueContent } from './SelectValueContent.vue';
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { SeparatorProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import { Separator } from
|
|
6
|
-
import { cn } from
|
|
2
|
+
import type { SeparatorProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { Separator } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
8
|
+
// Props
|
|
9
|
+
const props = withDefaults(defineProps<SeparatorProps & { class?: HTMLAttributes['class'] }>(), {
|
|
10
|
+
orientation: 'horizontal',
|
|
11
|
+
decorative: true
|
|
12
|
+
});
|
|
14
13
|
|
|
15
|
-
const delegatedProps = reactiveOmit(props,
|
|
14
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
16
15
|
</script>
|
|
17
16
|
|
|
18
17
|
<template>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</template>
|
|
18
|
+
<Separator data-slot="separator" v-bind="delegatedProps" :class="cn(
|
|
19
|
+
'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
|
|
20
|
+
props.class
|
|
21
|
+
)
|
|
22
|
+
" />
|
|
23
|
+
</template>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Separator } from
|
|
1
|
+
export { default as Separator } from './Separator.vue';
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogRootEmits, DialogRootProps } from
|
|
3
|
-
import { DialogRoot, useForwardPropsEmits } from
|
|
2
|
+
import type { DialogRootEmits, DialogRootProps } from 'reka-ui';
|
|
3
|
+
import { DialogRoot, useForwardPropsEmits } from 'reka-ui';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
const
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<DialogRootProps>();
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Emits
|
|
9
|
+
const emits = defineEmits<DialogRootEmits>();
|
|
10
|
+
|
|
11
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
14
|
<template>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</template>
|
|
15
|
+
<DialogRoot v-slot="slotProps" data-slot="sheet" v-bind="forwarded">
|
|
16
|
+
<slot v-bind="slotProps" />
|
|
17
|
+
</DialogRoot>
|
|
18
|
+
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogCloseProps } from
|
|
3
|
-
import { DialogClose } from
|
|
2
|
+
import type { DialogCloseProps } from 'reka-ui';
|
|
3
|
+
import { DialogClose } from 'reka-ui';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<DialogCloseProps>();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</template>
|
|
10
|
+
<DialogClose data-slot="sheet-close" v-bind="props">
|
|
11
|
+
<slot />
|
|
12
|
+
</DialogClose>
|
|
13
|
+
</template>
|
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogContentEmits, DialogContentProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
useForwardPropsEmits,
|
|
9
|
-
} from "reka-ui"
|
|
10
|
-
import { cn } from "../../../lib/utils"
|
|
11
|
-
import SheetOverlay from "./SheetOverlay.vue"
|
|
2
|
+
import type { DialogContentEmits, DialogContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { DialogContent, DialogPortal, useForwardPropsEmits } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
|
+
import SheetOverlay from './SheetOverlay.vue';
|
|
12
8
|
|
|
13
9
|
interface SheetContentProps extends DialogContentProps {
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
defineOptions({
|
|
19
|
-
|
|
20
|
-
})
|
|
15
|
+
inheritAttrs: false
|
|
16
|
+
});
|
|
21
17
|
|
|
18
|
+
// Props
|
|
22
19
|
const props = withDefaults(defineProps<SheetContentProps>(), {
|
|
23
|
-
|
|
24
|
-
})
|
|
25
|
-
|
|
20
|
+
side: 'right'
|
|
21
|
+
});
|
|
22
|
+
// Emits
|
|
23
|
+
const emits = defineEmits<DialogContentEmits>();
|
|
26
24
|
|
|
27
|
-
const delegatedProps = reactiveOmit(props,
|
|
28
|
-
|
|
29
|
-
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
25
|
+
const delegatedProps = reactiveOmit(props, 'class', 'side');
|
|
26
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
30
27
|
</script>
|
|
31
28
|
|
|
32
29
|
<template>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</
|
|
30
|
+
<DialogPortal>
|
|
31
|
+
<SheetOverlay />
|
|
32
|
+
<DialogContent data-slot="sheet-content" :class="cn(
|
|
33
|
+
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
|
|
34
|
+
side === 'right' &&
|
|
35
|
+
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
36
|
+
side === 'left' &&
|
|
37
|
+
'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
38
|
+
side === 'top' &&
|
|
39
|
+
'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
|
|
40
|
+
side === 'bottom' &&
|
|
41
|
+
'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',
|
|
42
|
+
props.class
|
|
43
|
+
)
|
|
44
|
+
" v-bind="{ ...$attrs, ...forwarded }">
|
|
45
|
+
<slot />
|
|
46
|
+
</DialogContent>
|
|
47
|
+
</DialogPortal>
|
|
48
|
+
</template>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogDescriptionProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import { DialogDescription } from
|
|
6
|
-
import { cn } from
|
|
2
|
+
import type { DialogDescriptionProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { DialogDescription } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Props
|
|
9
|
+
const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes['class'] }>();
|
|
9
10
|
|
|
10
|
-
const delegatedProps = reactiveOmit(props,
|
|
11
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</template>
|
|
15
|
+
<DialogDescription data-slot="sheet-description" :class="cn('text-muted-foreground text-sm', props.class)" v-bind="delegatedProps">
|
|
16
|
+
<slot />
|
|
17
|
+
</DialogDescription>
|
|
18
|
+
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from
|
|
3
|
-
import { cn } from
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '../../../lib/utils';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</template>
|
|
10
|
+
<div data-slot="sheet-footer" :class="cn('mt-auto flex flex-col gap-2 p-4', props.class)">
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from
|
|
3
|
-
import { cn } from
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '../../../lib/utils';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</template>
|
|
10
|
+
<div data-slot="sheet-header" :class="cn('flex flex-col gap-1.5 p-4', props.class)">
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogOverlayProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import { DialogOverlay } from
|
|
6
|
-
import { cn } from
|
|
2
|
+
import type { DialogOverlayProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { DialogOverlay } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Props
|
|
9
|
+
const props = defineProps<DialogOverlayProps & { class?: HTMLAttributes['class'] }>();
|
|
9
10
|
|
|
10
|
-
const delegatedProps = reactiveOmit(props,
|
|
11
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
<DialogOverlay data-slot="sheet-overlay" :class="cn(
|
|
16
|
+
'fixed inset-0 z-50 bg-black/45 backdrop-blur-[2px] transition-[opacity,backdrop-filter] ease-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
17
|
+
props.class
|
|
18
|
+
)
|
|
19
|
+
" v-bind="delegatedProps">
|
|
20
|
+
<slot />
|
|
21
|
+
</DialogOverlay>
|
|
22
|
+
</template>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogTitleProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import { DialogTitle } from
|
|
6
|
-
import { cn } from
|
|
2
|
+
import type { DialogTitleProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { DialogTitle } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Props
|
|
9
|
+
const props = defineProps<DialogTitleProps & { class?: HTMLAttributes['class'] }>();
|
|
9
10
|
|
|
10
|
-
const delegatedProps = reactiveOmit(props,
|
|
11
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</template>
|
|
15
|
+
<DialogTitle data-slot="sheet-title" :class="cn('text-foreground font-semibold', props.class)" v-bind="delegatedProps">
|
|
16
|
+
<slot />
|
|
17
|
+
</DialogTitle>
|
|
18
|
+
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { DialogTriggerProps } from
|
|
3
|
-
import { DialogTrigger } from
|
|
2
|
+
import type { DialogTriggerProps } from 'reka-ui';
|
|
3
|
+
import { DialogTrigger } from 'reka-ui';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<DialogTriggerProps>();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</template>
|
|
10
|
+
<DialogTrigger data-slot="sheet-trigger" v-bind="props">
|
|
11
|
+
<slot />
|
|
12
|
+
</DialogTrigger>
|
|
13
|
+
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { default as Sheet } from
|
|
2
|
-
export { default as SheetClose } from
|
|
3
|
-
export { default as SheetContent } from
|
|
4
|
-
export { default as SheetDescription } from
|
|
5
|
-
export { default as SheetFooter } from
|
|
6
|
-
export { default as SheetHeader } from
|
|
7
|
-
export { default as SheetTitle } from
|
|
8
|
-
export { default as SheetTrigger } from
|
|
1
|
+
export { default as Sheet } from './Sheet.vue';
|
|
2
|
+
export { default as SheetClose } from './SheetClose.vue';
|
|
3
|
+
export { default as SheetContent } from './SheetContent.vue';
|
|
4
|
+
export { default as SheetDescription } from './SheetDescription.vue';
|
|
5
|
+
export { default as SheetFooter } from './SheetFooter.vue';
|
|
6
|
+
export { default as SheetHeader } from './SheetHeader.vue';
|
|
7
|
+
export { default as SheetTitle } from './SheetTitle.vue';
|
|
8
|
+
export { default as SheetTrigger } from './SheetTrigger.vue';
|
|
@@ -1,77 +1,84 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { SidebarProps } from
|
|
3
|
-
import { cn } from
|
|
4
|
-
import { Sheet, SheetContent } from '../sheet'
|
|
5
|
-
import SheetDescription from '../sheet/SheetDescription.vue'
|
|
6
|
-
import SheetHeader from '../sheet/SheetHeader.vue'
|
|
7
|
-
import SheetTitle from '../sheet/SheetTitle.vue'
|
|
8
|
-
import { SIDEBAR_WIDTH_MOBILE, useSidebar } from
|
|
2
|
+
import type { SidebarProps } from '.';
|
|
3
|
+
import { cn } from '../../../lib/utils';
|
|
4
|
+
import { Sheet, SheetContent } from '../sheet';
|
|
5
|
+
import SheetDescription from '../sheet/SheetDescription.vue';
|
|
6
|
+
import SheetHeader from '../sheet/SheetHeader.vue';
|
|
7
|
+
import SheetTitle from '../sheet/SheetTitle.vue';
|
|
8
|
+
import { SIDEBAR_WIDTH_MOBILE, useSidebar } from './utils';
|
|
9
9
|
|
|
10
10
|
defineOptions({
|
|
11
|
-
|
|
12
|
-
})
|
|
11
|
+
inheritAttrs: false
|
|
12
|
+
});
|
|
13
13
|
|
|
14
|
+
// Props
|
|
14
15
|
const props = withDefaults(defineProps<SidebarProps>(), {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
16
|
+
side: 'left',
|
|
17
|
+
variant: 'sidebar',
|
|
18
|
+
collapsible: 'offcanvas',
|
|
19
|
+
compact: false
|
|
20
|
+
});
|
|
20
21
|
|
|
21
|
-
const { isMobile, state, openMobile, setOpenMobile } = useSidebar()
|
|
22
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
22
23
|
|
|
23
24
|
function handleMobileSidebarClick(event: MouseEvent) {
|
|
24
|
-
|
|
25
|
+
const target = event.target as HTMLElement | null;
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if (target?.closest('[data-sidebar="menu-button"]')) {
|
|
28
|
+
setOpenMobile(false);
|
|
29
|
+
}
|
|
29
30
|
}
|
|
30
31
|
</script>
|
|
31
32
|
|
|
32
33
|
<template>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<SheetContent data-sidebar="sidebar" data-slot="sidebar" data-mobile="true" :data-compact="props.compact ? 'true' : 'false'" :side="side" class="group/sidebar-wrapper border-sidebar-border bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden" :style="{
|
|
39
|
-
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
40
|
-
}">
|
|
41
|
-
<SheetHeader class="sr-only">
|
|
42
|
-
<SheetTitle>Sidebar</SheetTitle>
|
|
43
|
-
<SheetDescription>Displays the mobile sidebar.</SheetDescription>
|
|
44
|
-
</SheetHeader>
|
|
45
|
-
<div class="flex h-full w-full flex-col" @click="handleMobileSidebarClick">
|
|
34
|
+
<div v-if="collapsible === 'none'" data-slot="sidebar" :class="cn(
|
|
35
|
+
'group/sidebar-wrapper bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col',
|
|
36
|
+
props.class
|
|
37
|
+
)
|
|
38
|
+
" v-bind="$attrs">
|
|
46
39
|
<slot />
|
|
47
|
-
|
|
48
|
-
</SheetContent>
|
|
49
|
-
</Sheet>
|
|
40
|
+
</div>
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
42
|
+
<Sheet v-else-if="isMobile" :open="openMobile" v-bind="$attrs" @update:open="setOpenMobile">
|
|
43
|
+
<SheetContent data-sidebar="sidebar" data-slot="sidebar" data-mobile="true" :data-compact="props.compact ? 'true' : 'false'" :side="side" class="group/sidebar-wrapper border-sidebar-border bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden" :style="{
|
|
44
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE
|
|
45
|
+
}">
|
|
46
|
+
<SheetHeader class="sr-only">
|
|
47
|
+
<SheetTitle>Sidebar</SheetTitle>
|
|
48
|
+
<SheetDescription>Displays the mobile sidebar.</SheetDescription>
|
|
49
|
+
</SheetHeader>
|
|
50
|
+
<div class="flex h-full w-full flex-col" @click="handleMobileSidebarClick">
|
|
51
|
+
<slot />
|
|
52
|
+
</div>
|
|
53
|
+
</SheetContent>
|
|
54
|
+
</Sheet>
|
|
55
|
+
|
|
56
|
+
<div v-else class="group/sidebar-wrapper group peer text-sidebar-foreground hidden md:block" data-slot="sidebar" :data-state="state" :data-collapsible="state === 'collapsed' ? collapsible : ''" :data-variant="variant" :data-side="side">
|
|
57
|
+
<!-- This is what handles the sidebar gap on desktop -->
|
|
58
|
+
<div :class="cn(
|
|
59
|
+
'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',
|
|
60
|
+
'group-data-[collapsible=offcanvas]:w-0',
|
|
61
|
+
'group-data-[side=right]:rotate-180',
|
|
62
|
+
variant === 'floating' || variant === 'inset'
|
|
63
|
+
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'
|
|
64
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'
|
|
65
|
+
)
|
|
66
|
+
" />
|
|
67
|
+
<div :class="cn(
|
|
68
|
+
'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',
|
|
69
|
+
side === 'left'
|
|
70
|
+
? 'left-0 group-data-[collapsible=offcanvas]:-left-(--sidebar-width)'
|
|
71
|
+
: 'right-0 group-data-[collapsible=offcanvas]:-right-(--sidebar-width)',
|
|
72
|
+
// Adjust the padding for floating and inset variants.
|
|
73
|
+
variant === 'floating' || variant === 'inset'
|
|
74
|
+
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
|
|
75
|
+
: 'border-sidebar-border group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',
|
|
76
|
+
props.class
|
|
77
|
+
)
|
|
78
|
+
" v-bind="$attrs">
|
|
79
|
+
<div data-sidebar="sidebar" class="bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm">
|
|
80
|
+
<slot />
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
75
83
|
</div>
|
|
76
|
-
|
|
77
|
-
</template>
|
|
84
|
+
</template>
|