@brumaombra/ui-vintage 0.7.8 → 0.7.9
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/BlogFAQSection.vue +8 -3
- package/src/components/blog/BlogHeaderSection.vue +14 -11
- package/src/components/blog/BlogInfoSection.vue +13 -11
- 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 +11 -11
- package/src/components/blog/TableOfContents.vue +29 -13
- 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 +15 -17
- package/src/components/landing/landing-navbar/index.ts +2 -2
- package/src/components/landing/landing-shell/LandingShell.vue +10 -13
- 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,18 +1,20 @@
|
|
|
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
|
+
// Props
|
|
5
6
|
const props = defineProps<{
|
|
6
|
-
|
|
7
|
-
}>()
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
}>();
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<template>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
</
|
|
12
|
+
<fieldset data-slot="field-set" :class="cn(
|
|
13
|
+
'flex flex-col gap-6',
|
|
14
|
+
'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',
|
|
15
|
+
props.class
|
|
16
|
+
)
|
|
17
|
+
">
|
|
18
|
+
<slot />
|
|
19
|
+
</fieldset>
|
|
20
|
+
</template>
|
|
@@ -1,17 +1,19 @@
|
|
|
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
|
+
// Props
|
|
5
6
|
const props = defineProps<{
|
|
6
|
-
|
|
7
|
-
}>()
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
}>();
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<template>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</
|
|
12
|
+
<div data-slot="field-label" :class="cn(
|
|
13
|
+
'flex w-fit items-center gap-2 text-sm leading-snug font-semibold group-data-[disabled=true]/field:opacity-50',
|
|
14
|
+
props.class
|
|
15
|
+
)
|
|
16
|
+
">
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import type { ClassProp } from
|
|
2
|
-
import { cva } from
|
|
1
|
+
import type { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
3
|
|
|
4
4
|
export type FieldVariants = {
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
orientation?: 'vertical' | 'horizontal' | 'responsive' | null | undefined;
|
|
6
|
+
};
|
|
7
7
|
|
|
8
8
|
export const fieldVariants: (props?: FieldVariants & ClassProp) => string = cva(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
9
|
+
'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
orientation: {
|
|
13
|
+
vertical: ['flex-col [&>*]:w-full [&>.sr-only]:w-auto'],
|
|
14
|
+
horizontal: [
|
|
15
|
+
'flex-row items-center',
|
|
16
|
+
'[&>[data-slot=field-label]]:flex-auto',
|
|
17
|
+
'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'
|
|
18
|
+
],
|
|
19
|
+
responsive: [
|
|
20
|
+
'flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto',
|
|
21
|
+
'@md/field-group:[&>[data-slot=field-label]]:flex-auto',
|
|
22
|
+
'@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
orientation: 'vertical'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
31
|
|
|
32
|
-
export { default as Field } from
|
|
33
|
-
export { default as FieldContent } from
|
|
34
|
-
export { default as FieldDescription } from
|
|
35
|
-
export { default as FieldError } from
|
|
36
|
-
export { default as FieldGroup } from
|
|
37
|
-
export { default as FieldLabel } from
|
|
38
|
-
export { default as FieldLegend } from
|
|
39
|
-
export { default as FieldSeparator } from
|
|
40
|
-
export { default as FieldSet } from
|
|
41
|
-
export { default as FieldTitle } from
|
|
32
|
+
export { default as Field } from './Field.vue';
|
|
33
|
+
export { default as FieldContent } from './FieldContent.vue';
|
|
34
|
+
export { default as FieldDescription } from './FieldDescription.vue';
|
|
35
|
+
export { default as FieldError } from './FieldError.vue';
|
|
36
|
+
export { default as FieldGroup } from './FieldGroup.vue';
|
|
37
|
+
export { default as FieldLabel } from './FieldLabel.vue';
|
|
38
|
+
export { default as FieldLegend } from './FieldLegend.vue';
|
|
39
|
+
export { default as FieldSeparator } from './FieldSeparator.vue';
|
|
40
|
+
export { default as FieldSet } from './FieldSet.vue';
|
|
41
|
+
export { default as FieldTitle } from './FieldTitle.vue';
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from
|
|
3
|
-
import { useVModel } from
|
|
4
|
-
import { cn } from
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { useVModel } from '@vueuse/core';
|
|
4
|
+
import { cn } from '../../../lib/utils';
|
|
5
5
|
|
|
6
|
+
// Props
|
|
6
7
|
const props = defineProps<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>()
|
|
8
|
+
defaultValue?: string | number;
|
|
9
|
+
modelValue?: string | number;
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
}>();
|
|
11
12
|
|
|
13
|
+
// Emits
|
|
12
14
|
const emits = defineEmits<{
|
|
13
|
-
|
|
14
|
-
}>()
|
|
15
|
+
(e: 'update:modelValue', payload: string | number): void;
|
|
16
|
+
}>();
|
|
15
17
|
|
|
16
|
-
const modelValue = useVModel(props,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
18
|
+
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
19
|
+
passive: true,
|
|
20
|
+
defaultValue: props.defaultValue
|
|
21
|
+
});
|
|
20
22
|
</script>
|
|
21
23
|
|
|
22
24
|
<template>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
<input v-model="modelValue" data-slot="input" :class="cn(
|
|
26
|
+
'file:text-foreground selection:bg-primary selection:text-primary-foreground h-13 w-full min-w-0 rounded border border-(--border-light) bg-(--button-secondary-light) px-4 py-3 text-xs font-semibold text-(--text-primary-light) outline-none transition-all duration-300 ease-in-out placeholder:text-(--text-secondary-light) placeholder:opacity-60 file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-semibold disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60 dark:border-(--border-dark) dark:bg-(--button-secondary-dark) dark:text-(--text-primary-dark) dark:placeholder:text-(--text-secondary-dark) sm:text-sm',
|
|
27
|
+
'focus-visible:border-(--border-hover-light) focus-visible:ring-0 dark:focus-visible:border-(--border-hover-dark)',
|
|
28
|
+
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
29
|
+
props.class
|
|
30
|
+
)
|
|
31
|
+
" />
|
|
32
|
+
</template>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Input } from
|
|
1
|
+
export { default as Input } from './Input.vue';
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { LabelProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import { Label } from
|
|
6
|
-
import { cn } from
|
|
2
|
+
import type { LabelProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { Label } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Props
|
|
9
|
+
const props = defineProps<LabelProps & { 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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</template>
|
|
15
|
+
<Label data-slot="label" v-bind="delegatedProps" :class="cn(
|
|
16
|
+
'flex items-center gap-2 text-sm leading-none font-semibold select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
17
|
+
props.class
|
|
18
|
+
)
|
|
19
|
+
">
|
|
20
|
+
<slot />
|
|
21
|
+
</Label>
|
|
22
|
+
</template>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Label } from
|
|
1
|
+
export { default as Label } from './Label.vue';
|
|
@@ -1,52 +1,42 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { AcceptableValue } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit, useVModel } from
|
|
5
|
-
import { ArrowDown01Icon } from
|
|
6
|
-
import { HugeiconsIcon } from
|
|
7
|
-
import { cn } from
|
|
2
|
+
import type { AcceptableValue } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit, useVModel } from '@vueuse/core';
|
|
5
|
+
import { ArrowDown01Icon } from '@hugeicons/core-free-icons';
|
|
6
|
+
import { HugeiconsIcon } from '@hugeicons/vue';
|
|
7
|
+
import { cn } from '../../../lib/utils';
|
|
8
8
|
|
|
9
9
|
defineOptions({
|
|
10
|
-
|
|
11
|
-
})
|
|
10
|
+
inheritAttrs: false
|
|
11
|
+
});
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// Props
|
|
14
|
+
const props = defineProps<{ modelValue?: AcceptableValue | AcceptableValue[]; class?: HTMLAttributes['class'] }>();
|
|
14
15
|
|
|
16
|
+
// Emits
|
|
15
17
|
const emit = defineEmits<{
|
|
16
|
-
|
|
17
|
-
}>()
|
|
18
|
+
'update:modelValue': AcceptableValue;
|
|
19
|
+
}>();
|
|
18
20
|
|
|
19
|
-
const modelValue = useVModel(props,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
21
|
+
const modelValue = useVModel(props, 'modelValue', emit, {
|
|
22
|
+
passive: true,
|
|
23
|
+
defaultValue: ''
|
|
24
|
+
});
|
|
23
25
|
|
|
24
|
-
const delegatedProps = reactiveOmit(props,
|
|
26
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
25
27
|
</script>
|
|
26
28
|
|
|
27
29
|
<template>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)"
|
|
42
|
-
>
|
|
43
|
-
<slot />
|
|
44
|
-
</select>
|
|
45
|
-
<HugeiconsIcon
|
|
46
|
-
:icon="ArrowDown01Icon"
|
|
47
|
-
class="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none"
|
|
48
|
-
aria-hidden="true"
|
|
49
|
-
data-slot="native-select-icon"
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
30
|
+
<div class="group/native-select relative w-fit has-[select:disabled]:opacity-50" data-slot="native-select-wrapper">
|
|
31
|
+
<select v-bind="{ ...$attrs, ...delegatedProps }" v-model="modelValue" data-slot="native-select" :class="cn(
|
|
32
|
+
'border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed',
|
|
33
|
+
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
34
|
+
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
35
|
+
props.class
|
|
36
|
+
)
|
|
37
|
+
">
|
|
38
|
+
<slot />
|
|
39
|
+
</select>
|
|
40
|
+
<HugeiconsIcon :icon="ArrowDown01Icon" class="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none" aria-hidden="true" data-slot="native-select-icon" />
|
|
41
|
+
</div>
|
|
42
|
+
</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
|
+
<optgroup data-slot="native-select-optgroup" :class="cn('bg-popover text-popover-foreground', props.class)">
|
|
11
|
+
<slot />
|
|
12
|
+
</optgroup>
|
|
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
|
+
<option data-slot="native-select-option" :class="cn('bg-popover text-popover-foreground', props.class)">
|
|
11
|
+
<slot />
|
|
12
|
+
</option>
|
|
13
|
+
</template>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as NativeSelect } from
|
|
2
|
-
export { default as NativeSelectOptGroup } from
|
|
3
|
-
export { default as NativeSelectOption } from
|
|
1
|
+
export { default as NativeSelect } from './NativeSelect.vue';
|
|
2
|
+
export { default as NativeSelectOptGroup } from './NativeSelectOptGroup.vue';
|
|
3
|
+
export { default as NativeSelectOption } from './NativeSelectOption.vue';
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PopoverRootEmits, PopoverRootProps } from
|
|
3
|
-
import { PopoverRoot, useForwardPropsEmits } from
|
|
2
|
+
import type { PopoverRootEmits, PopoverRootProps } from 'reka-ui';
|
|
3
|
+
import { PopoverRoot, useForwardPropsEmits } from 'reka-ui';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
const
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<PopoverRootProps>();
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Emits
|
|
9
|
+
const emits = defineEmits<PopoverRootEmits>();
|
|
10
|
+
|
|
11
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
14
|
<template>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</template>
|
|
15
|
+
<PopoverRoot v-slot="slotProps" data-slot="popover" v-bind="forwarded">
|
|
16
|
+
<slot v-bind="slotProps" />
|
|
17
|
+
</PopoverRoot>
|
|
18
|
+
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PopoverAnchorProps } from
|
|
3
|
-
import { PopoverAnchor } from
|
|
2
|
+
import type { PopoverAnchorProps } from 'reka-ui';
|
|
3
|
+
import { PopoverAnchor } from 'reka-ui';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<PopoverAnchorProps>();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</template>
|
|
10
|
+
<PopoverAnchor data-slot="popover-anchor" v-bind="props">
|
|
11
|
+
<slot />
|
|
12
|
+
</PopoverAnchor>
|
|
13
|
+
</template>
|
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PopoverContentEmits, PopoverContentProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
PopoverPortal,
|
|
8
|
-
useForwardPropsEmits,
|
|
9
|
-
} from "reka-ui"
|
|
10
|
-
import { cn } from "../../../lib/utils"
|
|
2
|
+
import type { PopoverContentEmits, PopoverContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { PopoverContent, PopoverPortal, useForwardPropsEmits } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
11
7
|
|
|
12
8
|
defineOptions({
|
|
13
|
-
|
|
14
|
-
})
|
|
9
|
+
inheritAttrs: false
|
|
10
|
+
});
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
)
|
|
23
|
-
const emits = defineEmits<PopoverContentEmits>()
|
|
12
|
+
// Props
|
|
13
|
+
const props = withDefaults(defineProps<PopoverContentProps & { class?: HTMLAttributes['class'] }>(), {
|
|
14
|
+
align: 'center',
|
|
15
|
+
sideOffset: 4
|
|
16
|
+
});
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
// Emits
|
|
19
|
+
const emits = defineEmits<PopoverContentEmits>();
|
|
26
20
|
|
|
27
|
-
const
|
|
21
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
22
|
+
|
|
23
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
28
24
|
</script>
|
|
29
25
|
|
|
30
26
|
<template>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</template>
|
|
27
|
+
<PopoverPortal>
|
|
28
|
+
<PopoverContent data-slot="popover-content" v-bind="{ ...$attrs, ...forwarded }" :class="cn(
|
|
29
|
+
'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 z-50 w-72 rounded border border-border p-4 transition-colors duration-300 ease-in-out origin-(--reka-popover-content-transform-origin) outline-hidden',
|
|
30
|
+
props.class
|
|
31
|
+
)
|
|
32
|
+
">
|
|
33
|
+
<slot />
|
|
34
|
+
</PopoverContent>
|
|
35
|
+
</PopoverPortal>
|
|
36
|
+
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { PopoverTriggerProps } from
|
|
3
|
-
import { PopoverTrigger } from
|
|
2
|
+
import type { PopoverTriggerProps } from 'reka-ui';
|
|
3
|
+
import { PopoverTrigger } from 'reka-ui';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Props
|
|
6
|
+
const props = defineProps<PopoverTriggerProps>();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</template>
|
|
10
|
+
<PopoverTrigger data-slot="popover-trigger" v-bind="props">
|
|
11
|
+
<slot />
|
|
12
|
+
</PopoverTrigger>
|
|
13
|
+
</template>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Popover } from
|
|
2
|
-
export { default as PopoverAnchor } from
|
|
3
|
-
export { default as PopoverContent } from
|
|
4
|
-
export { default as PopoverTrigger } from
|
|
1
|
+
export { default as Popover } from './Popover.vue';
|
|
2
|
+
export { default as PopoverAnchor } from './PopoverAnchor.vue';
|
|
3
|
+
export { default as PopoverContent } from './PopoverContent.vue';
|
|
4
|
+
export { default as PopoverTrigger } from './PopoverTrigger.vue';
|
|
@@ -1,38 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { ProgressRootProps } from
|
|
3
|
-
import type { HTMLAttributes } from
|
|
4
|
-
import { reactiveOmit } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
ProgressRoot,
|
|
8
|
-
} from "reka-ui"
|
|
9
|
-
import { cn } from "../../../lib/utils"
|
|
2
|
+
import type { ProgressRootProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { ProgressIndicator, ProgressRoot } from 'reka-ui';
|
|
6
|
+
import { cn } from '../../../lib/utils';
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
)
|
|
8
|
+
// Props
|
|
9
|
+
const props = withDefaults(defineProps<ProgressRootProps & { class?: HTMLAttributes['class'] }>(), {
|
|
10
|
+
modelValue: 0
|
|
11
|
+
});
|
|
17
12
|
|
|
18
|
-
const delegatedProps = reactiveOmit(props,
|
|
13
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
19
14
|
</script>
|
|
20
15
|
|
|
21
16
|
<template>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
>
|
|
32
|
-
<ProgressIndicator
|
|
33
|
-
data-slot="progress-indicator"
|
|
34
|
-
class="bg-primary h-full w-full flex-1 transition-all"
|
|
35
|
-
:style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
|
|
36
|
-
/>
|
|
37
|
-
</ProgressRoot>
|
|
38
|
-
</template>
|
|
17
|
+
<ProgressRoot data-slot="progress" v-bind="delegatedProps" :class="cn(
|
|
18
|
+
'bg-(--bg-selected-light) dark:bg-(--bg-selected-dark) relative h-2 w-full overflow-hidden',
|
|
19
|
+
props.class
|
|
20
|
+
)
|
|
21
|
+
">
|
|
22
|
+
<ProgressIndicator data-slot="progress-indicator" class="bg-primary h-full w-full flex-1 transition-all" :style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`" />
|
|
23
|
+
</ProgressRoot>
|
|
24
|
+
</template>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Progress } from
|
|
1
|
+
export { default as Progress } from './Progress.vue';
|