@personizely/ui 0.0.42
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/LICENSE.md +21 -0
- package/README.md +1 -0
- package/dist/personizely-ui.css +6 -0
- package/dist/personizely-ui.js +26854 -0
- package/dist/personizely-ui.umd.cjs +111 -0
- package/package.json +117 -0
- package/src/assets/index.css +136 -0
- package/src/components/ui/accordion/Accordion.vue +19 -0
- package/src/components/ui/accordion/AccordionContent.vue +24 -0
- package/src/components/ui/accordion/AccordionItem.vue +37 -0
- package/src/components/ui/accordion/AccordionTrigger.vue +39 -0
- package/src/components/ui/accordion/index.ts +2 -0
- package/src/components/ui/alert/Alert.vue +68 -0
- package/src/components/ui/alert/index.ts +22 -0
- package/src/components/ui/alert-dialog/AlertDialog.vue +66 -0
- package/src/components/ui/alert-dialog/AlertDialogContent.vue +44 -0
- package/src/components/ui/alert-dialog/AlertDialogProvider.vue +27 -0
- package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +11 -0
- package/src/components/ui/alert-dialog/index.ts +3 -0
- package/src/components/ui/alert-dialog/useAlertDialog.ts +19 -0
- package/src/components/ui/autocomplete/Autocomplete.vue +170 -0
- package/src/components/ui/autocomplete/AutocompleteContent.vue +27 -0
- package/src/components/ui/autocomplete/AutocompleteEmpty.vue +20 -0
- package/src/components/ui/autocomplete/AutocompleteGroup.vue +29 -0
- package/src/components/ui/autocomplete/AutocompleteItem.vue +26 -0
- package/src/components/ui/autocomplete/AutocompleteRoot.vue +31 -0
- package/src/components/ui/autocomplete/AutocompleteSeparator.vue +23 -0
- package/src/components/ui/autocomplete/index.ts +1 -0
- package/src/components/ui/avatar/Avatar.vue +31 -0
- package/src/components/ui/avatar/AvatarFallback.vue +11 -0
- package/src/components/ui/avatar/AvatarImage.vue +9 -0
- package/src/components/ui/avatar/index.ts +19 -0
- package/src/components/ui/badge/Badge.vue +16 -0
- package/src/components/ui/badge/index.ts +22 -0
- package/src/components/ui/button/Button.vue +123 -0
- package/src/components/ui/button/index.ts +78 -0
- package/src/components/ui/calendar/Calendar.vue +76 -0
- package/src/components/ui/calendar/CalendarCell.vue +24 -0
- package/src/components/ui/calendar/CalendarCellTrigger.vue +38 -0
- package/src/components/ui/calendar/CalendarGrid.vue +24 -0
- package/src/components/ui/calendar/CalendarGridBody.vue +11 -0
- package/src/components/ui/calendar/CalendarGridHead.vue +11 -0
- package/src/components/ui/calendar/CalendarGridRow.vue +21 -0
- package/src/components/ui/calendar/CalendarHeadCell.vue +21 -0
- package/src/components/ui/calendar/CalendarHeader.vue +21 -0
- package/src/components/ui/calendar/CalendarHeading.vue +27 -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 +1 -0
- package/src/components/ui/card/Card.vue +57 -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/CardTitle.vue +18 -0
- package/src/components/ui/card/CardTray.vue +14 -0
- package/src/components/ui/card/index.ts +1 -0
- package/src/components/ui/checkbox/Checkbox.vue +63 -0
- package/src/components/ui/checkbox/CheckboxBase.vue +39 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/checkbox-group/CheckboxGroup.vue +65 -0
- package/src/components/ui/checkbox-group/index.ts +15 -0
- package/src/components/ui/color-picker/Alpha.vue +63 -0
- package/src/components/ui/color-picker/Angle.vue +145 -0
- package/src/components/ui/color-picker/Checkboard.vue +43 -0
- package/src/components/ui/color-picker/Color.vue +255 -0
- package/src/components/ui/color-picker/ColorPicker.vue +25 -0
- package/src/components/ui/color-picker/Gradient.vue +172 -0
- package/src/components/ui/color-picker/Handle.vue +19 -0
- package/src/components/ui/color-picker/Hue.vue +80 -0
- package/src/components/ui/color-picker/LabelInput.vue +16 -0
- package/src/components/ui/color-picker/Rail.vue +100 -0
- package/src/components/ui/color-picker/Saturation.vue +142 -0
- package/src/components/ui/color-picker/index.ts +4 -0
- package/src/components/ui/combobox/Combobox.vue +202 -0
- package/src/components/ui/combobox/ComboboxContent.vue +27 -0
- package/src/components/ui/combobox/ComboboxEmpty.vue +20 -0
- package/src/components/ui/combobox/ComboboxGroup.vue +29 -0
- package/src/components/ui/combobox/ComboboxInput.vue +52 -0
- package/src/components/ui/combobox/ComboboxItem.vue +26 -0
- package/src/components/ui/combobox/ComboboxRoot.vue +31 -0
- package/src/components/ui/combobox/ComboboxSeparator.vue +23 -0
- package/src/components/ui/combobox/index.ts +1 -0
- package/src/components/ui/date-picker/DatePicker.vue +55 -0
- package/src/components/ui/date-picker/index.ts +1 -0
- package/src/components/ui/date-range-picker/DateRangePicker.vue +137 -0
- package/src/components/ui/date-range-picker/index.ts +1 -0
- package/src/components/ui/dialog/Dialog.vue +78 -0
- package/src/components/ui/dialog/DialogContent.vue +46 -0
- package/src/components/ui/dialog/DialogDescription.vue +24 -0
- package/src/components/ui/dialog/DialogFooter.vue +19 -0
- package/src/components/ui/dialog/DialogHeader.vue +16 -0
- package/src/components/ui/dialog/DialogTitle.vue +29 -0
- package/src/components/ui/dialog/DialogTrigger.vue +11 -0
- package/src/components/ui/dialog/index.ts +1 -0
- package/src/components/ui/drawer/Drawer.vue +88 -0
- package/src/components/ui/drawer/DrawerContent.vue +57 -0
- package/src/components/ui/drawer/DrawerDescription.vue +22 -0
- package/src/components/ui/drawer/DrawerFooter.vue +19 -0
- package/src/components/ui/drawer/DrawerHeader.vue +16 -0
- package/src/components/ui/drawer/DrawerTitle.vue +22 -0
- package/src/components/ui/drawer/DrawerTrigger.vue +11 -0
- package/src/components/ui/drawer/index.ts +21 -0
- package/src/components/ui/dropdown-menu/DropdownCheckboxGroupMenu.vue +87 -0
- package/src/components/ui/dropdown-menu/DropdownMenu.vue +72 -0
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +37 -0
- package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
- package/src/components/ui/dropdown-menu/DropdownMenuHelp.vue +14 -0
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +28 -0
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +24 -0
- package/src/components/ui/dropdown-menu/DropdownMenuPart.vue +64 -0
- package/src/components/ui/dropdown-menu/DropdownMenuPartItem.vue +76 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +41 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +22 -0
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +30 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +33 -0
- package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +13 -0
- package/src/components/ui/dropdown-menu/DropdownRadioGroupMenu.vue +75 -0
- package/src/components/ui/dropdown-menu/index.ts +36 -0
- package/src/components/ui/file-upload-button/FileUploadButton.vue +55 -0
- package/src/components/ui/file-upload-button/index.ts +1 -0
- package/src/components/ui/form/Form.vue +13 -0
- package/src/components/ui/form/FormControl.vue +16 -0
- package/src/components/ui/form/FormDescription.vue +20 -0
- package/src/components/ui/form/FormField.vue +61 -0
- package/src/components/ui/form/FormLabel.vue +23 -0
- package/src/components/ui/form/FormMessage.vue +16 -0
- package/src/components/ui/form/index.ts +2 -0
- package/src/components/ui/form/useFormField.ts +30 -0
- package/src/components/ui/icon/Icon.vue +16 -0
- package/src/components/ui/icon/index.ts +1 -0
- package/src/components/ui/input/Input.vue +51 -0
- package/src/components/ui/input/InputBase.vue +18 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/label/Label.vue +27 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/pagination/Pagination.vue +50 -0
- package/src/components/ui/pagination/PaginationContent.vue +21 -0
- package/src/components/ui/pagination/PaginationEllipsis.vue +24 -0
- package/src/components/ui/pagination/PaginationFirst.vue +32 -0
- package/src/components/ui/pagination/PaginationItem.vue +32 -0
- package/src/components/ui/pagination/PaginationLast.vue +32 -0
- package/src/components/ui/pagination/PaginationNext.vue +32 -0
- package/src/components/ui/pagination/PaginationPrevious.vue +32 -0
- package/src/components/ui/pagination/index.ts +1 -0
- package/src/components/ui/popover/Popover.vue +57 -0
- package/src/components/ui/popover/PopoverTrigger.vue +15 -0
- package/src/components/ui/popover/index.ts +1 -0
- package/src/components/ui/progress/Progress.vue +35 -0
- package/src/components/ui/progress/ProgressIndicator.vue +19 -0
- package/src/components/ui/progress/index.ts +2 -0
- package/src/components/ui/progress-circular/ProgressCircular.vue +85 -0
- package/src/components/ui/progress-circular/index.ts +1 -0
- package/src/components/ui/radio-group/RadioGroup.vue +81 -0
- package/src/components/ui/radio-group/RadioGroupItem.vue +39 -0
- package/src/components/ui/radio-group/index.ts +15 -0
- package/src/components/ui/range-calendar/RangeCalendar.vue +71 -0
- package/src/components/ui/range-calendar/RangeCalendarCell.vue +28 -0
- package/src/components/ui/range-calendar/RangeCalendarCellTrigger.vue +40 -0
- package/src/components/ui/range-calendar/RangeCalendarGrid.vue +24 -0
- package/src/components/ui/range-calendar/RangeCalendarGridBody.vue +11 -0
- package/src/components/ui/range-calendar/RangeCalendarGridHead.vue +11 -0
- package/src/components/ui/range-calendar/RangeCalendarGridRow.vue +21 -0
- package/src/components/ui/range-calendar/RangeCalendarHeadCell.vue +21 -0
- package/src/components/ui/range-calendar/RangeCalendarHeader.vue +21 -0
- package/src/components/ui/range-calendar/RangeCalendarHeading.vue +27 -0
- package/src/components/ui/range-calendar/RangeCalendarNextButton.vue +32 -0
- package/src/components/ui/range-calendar/RangeCalendarPrevButton.vue +32 -0
- package/src/components/ui/range-calendar/index.ts +1 -0
- package/src/components/ui/select/Select.vue +120 -0
- package/src/components/ui/select/SelectContent.vue +45 -0
- package/src/components/ui/select/SelectGroup.vue +19 -0
- package/src/components/ui/select/SelectItem.vue +43 -0
- package/src/components/ui/select/SelectLabel.vue +13 -0
- package/src/components/ui/select/SelectSeparator.vue +17 -0
- package/src/components/ui/select/SelectTrigger.vue +31 -0
- package/src/components/ui/select/SelectValue.vue +11 -0
- package/src/components/ui/select/index.ts +1 -0
- package/src/components/ui/slider/Slider.vue +100 -0
- package/src/components/ui/slider/index.ts +1 -0
- package/src/components/ui/switch/Switch.vue +40 -0
- package/src/components/ui/switch/SwitchBase.vue +36 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/tabs/Tabs.vue +63 -0
- package/src/components/ui/tabs/TabsContent.vue +26 -0
- package/src/components/ui/tabs/TabsTrigger.vue +27 -0
- package/src/components/ui/tabs/index.ts +28 -0
- package/src/components/ui/textarea/Textarea.vue +13 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/components/ui/toast/Toast.vue +28 -0
- package/src/components/ui/toast/ToastAction.vue +26 -0
- package/src/components/ui/toast/ToastClose.vue +29 -0
- package/src/components/ui/toast/ToastDescription.vue +19 -0
- package/src/components/ui/toast/ToastProvider.vue +11 -0
- package/src/components/ui/toast/ToastTitle.vue +19 -0
- package/src/components/ui/toast/ToastViewport.vue +17 -0
- package/src/components/ui/toast/Toaster.vue +30 -0
- package/src/components/ui/toast/index.ts +34 -0
- package/src/components/ui/toast/useToast.ts +163 -0
- package/src/components/ui/toggle/Toggle.vue +51 -0
- package/src/components/ui/toggle/index.ts +71 -0
- package/src/components/ui/toggle-group/ToggleGroup.vue +58 -0
- package/src/components/ui/toggle-group/ToggleGroupItem.vue +54 -0
- package/src/components/ui/toggle-group/index.ts +1 -0
- package/src/components/ui/tooltip/Tooltip.vue +42 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +11 -0
- package/src/components/ui/tooltip/index.ts +2 -0
- package/src/composables/delegated-props.ts +6 -0
- package/src/composables/emits-as-props.ts +17 -0
- package/src/composables/forward-props-emits.ts +11 -0
- package/src/directives/autofocus.ts +7 -0
- package/src/index.ts +159 -0
- package/src/options-provider.ts +19 -0
- package/src/utils/gradient.ts +158 -0
- package/src/utils/options.ts +40 -0
- package/src/utils/tailwind.ts +14 -0
- package/web-types.json +10560 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarRoot
|
|
3
|
+
v-slot="{ grid, weekDays }"
|
|
4
|
+
:class="cn('p-3', props.class)"
|
|
5
|
+
v-bind="forwarded"
|
|
6
|
+
>
|
|
7
|
+
<CalendarHeader>
|
|
8
|
+
<CalendarPrevButton />
|
|
9
|
+
<CalendarHeading />
|
|
10
|
+
<CalendarNextButton />
|
|
11
|
+
</CalendarHeader>
|
|
12
|
+
|
|
13
|
+
<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
|
|
14
|
+
<CalendarGrid v-for="month in grid" :key="month.value.toString()">
|
|
15
|
+
<CalendarGridHead>
|
|
16
|
+
<CalendarGridRow>
|
|
17
|
+
<CalendarHeadCell
|
|
18
|
+
v-for="day in weekDays"
|
|
19
|
+
:key="day"
|
|
20
|
+
>
|
|
21
|
+
{{ day }}
|
|
22
|
+
</CalendarHeadCell>
|
|
23
|
+
</CalendarGridRow>
|
|
24
|
+
</CalendarGridHead>
|
|
25
|
+
<CalendarGridBody>
|
|
26
|
+
<CalendarGridRow v-for="(weekDates, index) in month.rows" :key="`weekDate-${index}`" class="mt-2 w-full">
|
|
27
|
+
<CalendarCell
|
|
28
|
+
v-for="weekDate in weekDates"
|
|
29
|
+
:key="weekDate.toString()"
|
|
30
|
+
:date="weekDate"
|
|
31
|
+
>
|
|
32
|
+
<CalendarCellTrigger
|
|
33
|
+
:day="weekDate"
|
|
34
|
+
:month="month.value"
|
|
35
|
+
/>
|
|
36
|
+
</CalendarCell>
|
|
37
|
+
</CalendarGridRow>
|
|
38
|
+
</CalendarGridBody>
|
|
39
|
+
</CalendarGrid>
|
|
40
|
+
</div>
|
|
41
|
+
</CalendarRoot>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script lang="ts" setup>
|
|
45
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
46
|
+
import {
|
|
47
|
+
CalendarRoot,
|
|
48
|
+
type CalendarRootEmits,
|
|
49
|
+
type CalendarRootProps,
|
|
50
|
+
useForwardPropsEmits
|
|
51
|
+
} from 'reka-ui'
|
|
52
|
+
import CalendarCell from './CalendarCell.vue'
|
|
53
|
+
import CalendarCellTrigger from './CalendarCellTrigger.vue'
|
|
54
|
+
import CalendarGrid from './CalendarGrid.vue'
|
|
55
|
+
import CalendarGridBody from './CalendarGridBody.vue'
|
|
56
|
+
import CalendarGridHead from './CalendarGridHead.vue'
|
|
57
|
+
import CalendarGridRow from './CalendarGridRow.vue'
|
|
58
|
+
import CalendarHeadCell from './CalendarHeadCell.vue'
|
|
59
|
+
import CalendarHeader from './CalendarHeader.vue'
|
|
60
|
+
import CalendarHeading from './CalendarHeading.vue'
|
|
61
|
+
import CalendarNextButton from './CalendarNextButton.vue'
|
|
62
|
+
import CalendarPrevButton from './CalendarPrevButton.vue'
|
|
63
|
+
import { cn } from '@/utils/tailwind'
|
|
64
|
+
|
|
65
|
+
const props = defineProps<CalendarRootProps & { class?: HTMLAttributes['class'] }>()
|
|
66
|
+
|
|
67
|
+
const emits = defineEmits<CalendarRootEmits>()
|
|
68
|
+
|
|
69
|
+
const delegatedProps = computed(() => {
|
|
70
|
+
const { class: _, ...delegated } = props
|
|
71
|
+
|
|
72
|
+
return delegated
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
76
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarCell
|
|
3
|
+
:class="cn('relative h-7 w-7 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md [&:has([data-selected])]:bg-accent [&:has([data-selected][data-outside-month])]:bg-accent/50', props.class)"
|
|
4
|
+
v-bind="forwardedProps"
|
|
5
|
+
>
|
|
6
|
+
<slot />
|
|
7
|
+
</CalendarCell>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
12
|
+
import { CalendarCell, type CalendarCellProps, useForwardProps } from 'reka-ui'
|
|
13
|
+
import { cn } from '@/utils/tailwind'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<CalendarCellProps & { class?: HTMLAttributes['class'] }>()
|
|
16
|
+
|
|
17
|
+
const delegatedProps = computed(() => {
|
|
18
|
+
const { class: _, ...delegated } = props
|
|
19
|
+
|
|
20
|
+
return delegated
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
24
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarCellTrigger
|
|
3
|
+
:class="cn(
|
|
4
|
+
buttonVariants({ variant: 'ghost' }),
|
|
5
|
+
'h-7 w-7 p-0 font-normal',
|
|
6
|
+
'[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground',
|
|
7
|
+
// Selected
|
|
8
|
+
'data-selected:bg-primary data-selected:text-primary-foreground data-selected:opacity-100 data-selected:hover:bg-primary data-selected:hover:text-primary-foreground data-selected:focus:bg-primary data-selected:focus:text-primary-foreground',
|
|
9
|
+
// Disabled
|
|
10
|
+
'data-disabled:text-muted-foreground data-disabled:opacity-50',
|
|
11
|
+
// Unavailable
|
|
12
|
+
'data-unavailable:text-destructive-foreground data-unavailable:line-through',
|
|
13
|
+
// Outside months
|
|
14
|
+
'data-outside-month:pointer-events-none data-outside-month:text-muted-foreground data-outside-month:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30',
|
|
15
|
+
props.class,
|
|
16
|
+
)"
|
|
17
|
+
v-bind="forwardedProps"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</CalendarCellTrigger>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
25
|
+
import { CalendarCellTrigger, type CalendarCellTriggerProps, useForwardProps } from 'reka-ui'
|
|
26
|
+
import { buttonVariants } from '@/components/ui/button'
|
|
27
|
+
import { cn } from '@/utils/tailwind'
|
|
28
|
+
|
|
29
|
+
const props = defineProps<CalendarCellTriggerProps & { class?: HTMLAttributes['class'] }>()
|
|
30
|
+
|
|
31
|
+
const delegatedProps = computed(() => {
|
|
32
|
+
const { class: _, ...delegated } = props
|
|
33
|
+
|
|
34
|
+
return delegated
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarGrid
|
|
3
|
+
:class="cn('w-full border-collapse space-y-1', props.class)"
|
|
4
|
+
v-bind="forwardedProps"
|
|
5
|
+
>
|
|
6
|
+
<slot />
|
|
7
|
+
</CalendarGrid>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
12
|
+
import { CalendarGrid, type CalendarGridProps, useForwardProps } from 'reka-ui'
|
|
13
|
+
import { cn } from '@/utils/tailwind'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<CalendarGridProps & { class?: HTMLAttributes['class'] }>()
|
|
16
|
+
|
|
17
|
+
const delegatedProps = computed(() => {
|
|
18
|
+
const { class: _, ...delegated } = props
|
|
19
|
+
|
|
20
|
+
return delegated
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
24
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarGridBody v-bind="props">
|
|
3
|
+
<slot />
|
|
4
|
+
</CalendarGridBody>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { CalendarGridBody, type CalendarGridBodyProps } from 'reka-ui'
|
|
9
|
+
|
|
10
|
+
const props = defineProps<CalendarGridBodyProps>()
|
|
11
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarGridHead v-bind="props">
|
|
3
|
+
<slot />
|
|
4
|
+
</CalendarGridHead>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { CalendarGridHead, type CalendarGridHeadProps } from 'reka-ui'
|
|
9
|
+
|
|
10
|
+
const props = defineProps<CalendarGridHeadProps>()
|
|
11
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarGridRow :class="cn('flex', props.class)" v-bind="forwardedProps">
|
|
3
|
+
<slot />
|
|
4
|
+
</CalendarGridRow>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
9
|
+
import { CalendarGridRow, type CalendarGridRowProps, useForwardProps } from 'reka-ui'
|
|
10
|
+
import { cn } from '@/utils/tailwind'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<CalendarGridRowProps & { class?: HTMLAttributes['class'] }>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarHeadCell :class="cn('w-7 rounded-md text-[0.8rem] font-normal text-muted-foreground', props.class)" v-bind="forwardedProps">
|
|
3
|
+
<slot />
|
|
4
|
+
</CalendarHeadCell>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
9
|
+
import { CalendarHeadCell, type CalendarHeadCellProps, useForwardProps } from 'reka-ui'
|
|
10
|
+
import { cn } from '@/utils/tailwind'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<CalendarHeadCellProps & { class?: HTMLAttributes['class'] }>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarHeader :class="cn('relative flex w-full items-center justify-between', props.class)" v-bind="forwardedProps">
|
|
3
|
+
<slot />
|
|
4
|
+
</CalendarHeader>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
9
|
+
import { CalendarHeader, type CalendarHeaderProps, useForwardProps } from 'reka-ui'
|
|
10
|
+
import { cn } from '@/utils/tailwind'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<CalendarHeaderProps & { class?: HTMLAttributes['class'] }>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarHeading
|
|
3
|
+
v-slot="{ headingValue }"
|
|
4
|
+
:class="cn('text-xs font-medium', props.class)"
|
|
5
|
+
v-bind="forwardedProps"
|
|
6
|
+
>
|
|
7
|
+
<slot>
|
|
8
|
+
{{ headingValue }}
|
|
9
|
+
</slot>
|
|
10
|
+
</CalendarHeading>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
15
|
+
import { CalendarHeading, type CalendarHeadingProps, useForwardProps } from 'reka-ui'
|
|
16
|
+
import { cn } from '@/utils/tailwind'
|
|
17
|
+
|
|
18
|
+
const props = defineProps<CalendarHeadingProps & { class?: HTMLAttributes['class'] }>()
|
|
19
|
+
|
|
20
|
+
const delegatedProps = computed(() => {
|
|
21
|
+
const { class: _, ...delegated } = props
|
|
22
|
+
|
|
23
|
+
return delegated
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarNext
|
|
3
|
+
:class="cn(
|
|
4
|
+
buttonVariants({ variant: 'outline' }),
|
|
5
|
+
'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
|
|
6
|
+
props.class,
|
|
7
|
+
)"
|
|
8
|
+
v-bind="forwardedProps"
|
|
9
|
+
>
|
|
10
|
+
<slot>
|
|
11
|
+
<ChevronRight class="h-4 w-4" />
|
|
12
|
+
</slot>
|
|
13
|
+
</CalendarNext>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
18
|
+
import { CalendarNext, type CalendarNextProps, useForwardProps } from 'reka-ui'
|
|
19
|
+
import { ChevronRight } from 'lucide-vue-next'
|
|
20
|
+
import { cn } from '@/utils/tailwind'
|
|
21
|
+
import { buttonVariants } from '@/components/ui/button'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<CalendarNextProps & { class?: HTMLAttributes['class'] }>()
|
|
24
|
+
|
|
25
|
+
const delegatedProps = computed(() => {
|
|
26
|
+
const { class: _, ...delegated } = props
|
|
27
|
+
|
|
28
|
+
return delegated
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CalendarPrev
|
|
3
|
+
:class="cn(
|
|
4
|
+
buttonVariants({ variant: 'outline' }),
|
|
5
|
+
'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
|
|
6
|
+
props.class,
|
|
7
|
+
)"
|
|
8
|
+
v-bind="forwardedProps"
|
|
9
|
+
>
|
|
10
|
+
<slot>
|
|
11
|
+
<ChevronLeft class="h-4 w-4" />
|
|
12
|
+
</slot>
|
|
13
|
+
</CalendarPrev>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
18
|
+
import { CalendarPrev, type CalendarPrevProps, useForwardProps } from 'reka-ui'
|
|
19
|
+
import { ChevronLeft } from 'lucide-vue-next'
|
|
20
|
+
import { cn } from '@/utils/tailwind'
|
|
21
|
+
import { buttonVariants } from '@/components/ui/button'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<CalendarPrevProps & { class?: HTMLAttributes['class'] }>()
|
|
24
|
+
|
|
25
|
+
const delegatedProps = computed(() => {
|
|
26
|
+
const { class: _, ...delegated } = props
|
|
27
|
+
|
|
28
|
+
return delegated
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
32
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Calendar } from './Calendar.vue'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="
|
|
4
|
+
cn(
|
|
5
|
+
'rounded border bg-card text-card-foreground shadow-xs flex flex-col gap-4 p-8',
|
|
6
|
+
props.class,
|
|
7
|
+
props.disabled && 'opacity-50 cursor-not-allowed pointer-events-none',
|
|
8
|
+
)
|
|
9
|
+
"
|
|
10
|
+
:aria-disabled="props.disabled"
|
|
11
|
+
>
|
|
12
|
+
<CardHeader v-if="$slots.header || $slots.title || $slots.description || title || description">
|
|
13
|
+
<slot name="header">
|
|
14
|
+
<CardTitle v-if="title || $slots.title">
|
|
15
|
+
<slot name="title">
|
|
16
|
+
{{ title }}
|
|
17
|
+
</slot>
|
|
18
|
+
</CardTitle>
|
|
19
|
+
<CardDescription v-if="description || $slots.description">
|
|
20
|
+
<slot name="description">
|
|
21
|
+
{{ description }}
|
|
22
|
+
</slot>
|
|
23
|
+
</CardDescription>
|
|
24
|
+
<CardTray v-if="$slots.tray">
|
|
25
|
+
<slot name="tray" />
|
|
26
|
+
</CardTray>
|
|
27
|
+
</slot>
|
|
28
|
+
</CardHeader>
|
|
29
|
+
<CardContent v-if="$slots.default" :class="loading && 'relative [&>*:not(:last-child)]:opacity-20'">
|
|
30
|
+
<slot />
|
|
31
|
+
<ProgressCircular v-if="loading" class="size-5 top-1/2 left-1/2 absolute -translate-x-1/2 -translate-y-1/2" />
|
|
32
|
+
</CardContent>
|
|
33
|
+
<CardFooter v-if="$slots.footer">
|
|
34
|
+
<slot name="footer" />
|
|
35
|
+
</CardFooter>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import type { HTMLAttributes } from 'vue'
|
|
41
|
+
import { cn } from '@/utils/tailwind'
|
|
42
|
+
import CardDescription from './CardDescription.vue'
|
|
43
|
+
import CardContent from './CardContent.vue'
|
|
44
|
+
import CardFooter from './CardFooter.vue'
|
|
45
|
+
import CardTitle from './CardTitle.vue'
|
|
46
|
+
import CardHeader from './CardHeader.vue'
|
|
47
|
+
import CardTray from './CardTray.vue'
|
|
48
|
+
import ProgressCircular from '@/components/ui/progress-circular/ProgressCircular.vue'
|
|
49
|
+
|
|
50
|
+
const props = defineProps<{
|
|
51
|
+
class?: HTMLAttributes['class']
|
|
52
|
+
title?: string
|
|
53
|
+
description?: string
|
|
54
|
+
loading?: boolean
|
|
55
|
+
disabled?: boolean
|
|
56
|
+
}>()
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="cn(props.class)">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import type { HTMLAttributes } from 'vue'
|
|
9
|
+
import { cn } from '@/utils/tailwind'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
class?: HTMLAttributes['class']
|
|
13
|
+
}>()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<p :class="cn('text-sm text-muted-foreground', props.class)">
|
|
3
|
+
<slot />
|
|
4
|
+
</p>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import type { HTMLAttributes } from 'vue'
|
|
9
|
+
import { cn } from '@/utils/tailwind'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
class?: HTMLAttributes['class']
|
|
13
|
+
}>()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="cn('flex items-center', props.class)">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import type { HTMLAttributes } from 'vue'
|
|
9
|
+
import { cn } from '@/utils/tailwind'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
class?: HTMLAttributes['class']
|
|
13
|
+
}>()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="cn('relative flex flex-col gap-y-1.5', props.class)">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import type { HTMLAttributes } from 'vue'
|
|
9
|
+
import { cn } from '@/utils/tailwind'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
class?: HTMLAttributes['class']
|
|
13
|
+
}>()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<h3
|
|
3
|
+
:class="
|
|
4
|
+
cn('text-base font-medium leading-none tracking-tight', props.class)
|
|
5
|
+
"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</h3>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { HTMLAttributes } from 'vue'
|
|
13
|
+
import { cn } from '@/utils/tailwind'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
class?: HTMLAttributes['class']
|
|
17
|
+
}>()
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="cn('absolute right-0 top-0', props.class)">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import type { HTMLAttributes } from 'vue'
|
|
9
|
+
import { cn } from '@/utils/tailwind'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
class?: HTMLAttributes['class']
|
|
13
|
+
}>()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Card } from './Card.vue'
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="cn('items-top flex gap-x-2', props.class)">
|
|
3
|
+
<CheckboxBase
|
|
4
|
+
:id="id"
|
|
5
|
+
v-model="modelValue"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:required="required"
|
|
8
|
+
:name="name"
|
|
9
|
+
:default-value="defaultValue"
|
|
10
|
+
:value="value"
|
|
11
|
+
@focus="$emit('focus', $event)"
|
|
12
|
+
@blur="$emit('blur', $event)"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<div v-if="help || $slots.help" class="grid gap-1 leading-[1.2] [&>label]:peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
16
|
+
<label
|
|
17
|
+
:for="id"
|
|
18
|
+
class="text-sm font-medium leading-[1.2]"
|
|
19
|
+
>
|
|
20
|
+
<slot>{{ label }}</slot>
|
|
21
|
+
</label>
|
|
22
|
+
<p class="text-sm text-muted-foreground">
|
|
23
|
+
<slot name="help">
|
|
24
|
+
{{ help }}
|
|
25
|
+
</slot>
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<label
|
|
30
|
+
v-else-if="label || $slots.default"
|
|
31
|
+
:for="id || name"
|
|
32
|
+
class="text-sm font-medium leading-[1.2] peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
33
|
+
>
|
|
34
|
+
<slot>{{ label }}</slot>
|
|
35
|
+
</label>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import { type HTMLAttributes, type Events } from 'vue'
|
|
41
|
+
import { useId } from 'reka-ui'
|
|
42
|
+
import { cn } from '@/utils/tailwind'
|
|
43
|
+
import CheckboxBase from './CheckboxBase.vue'
|
|
44
|
+
|
|
45
|
+
const modelValue = defineModel<boolean | 'indeterminate'>()
|
|
46
|
+
const props = withDefaults(defineProps<{
|
|
47
|
+
defaultValue?: boolean
|
|
48
|
+
disabled?: boolean
|
|
49
|
+
required?: boolean
|
|
50
|
+
name?: string
|
|
51
|
+
value?: string
|
|
52
|
+
id?: string
|
|
53
|
+
class?: HTMLAttributes['class']
|
|
54
|
+
label?: string
|
|
55
|
+
help?: string
|
|
56
|
+
}>(), {
|
|
57
|
+
id: () => useId()
|
|
58
|
+
})
|
|
59
|
+
defineEmits<{
|
|
60
|
+
focus: [event: Events['onFocus']]
|
|
61
|
+
blur: [event: Events['onBlur']]
|
|
62
|
+
}>()
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CheckboxRoot
|
|
3
|
+
v-bind="forwarded"
|
|
4
|
+
:class="cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', props.class)"
|
|
5
|
+
@change.stop
|
|
6
|
+
@input.stop
|
|
7
|
+
>
|
|
8
|
+
<CheckboxIndicator class="flex h-full w-full items-center justify-center text-current">
|
|
9
|
+
<slot name="indicator">
|
|
10
|
+
<Check class="h-4 w-4" />
|
|
11
|
+
</slot>
|
|
12
|
+
</CheckboxIndicator>
|
|
13
|
+
</CheckboxRoot>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { type HTMLAttributes } from 'vue'
|
|
18
|
+
import {
|
|
19
|
+
CheckboxIndicator,
|
|
20
|
+
CheckboxRoot,
|
|
21
|
+
type CheckboxRootEmits,
|
|
22
|
+
type CheckboxRootProps,
|
|
23
|
+
useId,
|
|
24
|
+
useForwardPropsEmits
|
|
25
|
+
} from 'reka-ui'
|
|
26
|
+
import { Check } from 'lucide-vue-next'
|
|
27
|
+
import { cn } from '@/utils/tailwind'
|
|
28
|
+
import { useDelegatedProps } from '@/composables/delegated-props'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<CheckboxRootProps & {
|
|
31
|
+
class?: HTMLAttributes['class']
|
|
32
|
+
}>(), {
|
|
33
|
+
id: () => useId()
|
|
34
|
+
})
|
|
35
|
+
const emits = defineEmits<CheckboxRootEmits>()
|
|
36
|
+
|
|
37
|
+
const delegatedProps = useDelegatedProps(props, ['class'])
|
|
38
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
39
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from './Checkbox.vue'
|