@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.
Files changed (221) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +1 -0
  3. package/dist/personizely-ui.css +6 -0
  4. package/dist/personizely-ui.js +26854 -0
  5. package/dist/personizely-ui.umd.cjs +111 -0
  6. package/package.json +117 -0
  7. package/src/assets/index.css +136 -0
  8. package/src/components/ui/accordion/Accordion.vue +19 -0
  9. package/src/components/ui/accordion/AccordionContent.vue +24 -0
  10. package/src/components/ui/accordion/AccordionItem.vue +37 -0
  11. package/src/components/ui/accordion/AccordionTrigger.vue +39 -0
  12. package/src/components/ui/accordion/index.ts +2 -0
  13. package/src/components/ui/alert/Alert.vue +68 -0
  14. package/src/components/ui/alert/index.ts +22 -0
  15. package/src/components/ui/alert-dialog/AlertDialog.vue +66 -0
  16. package/src/components/ui/alert-dialog/AlertDialogContent.vue +44 -0
  17. package/src/components/ui/alert-dialog/AlertDialogProvider.vue +27 -0
  18. package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +11 -0
  19. package/src/components/ui/alert-dialog/index.ts +3 -0
  20. package/src/components/ui/alert-dialog/useAlertDialog.ts +19 -0
  21. package/src/components/ui/autocomplete/Autocomplete.vue +170 -0
  22. package/src/components/ui/autocomplete/AutocompleteContent.vue +27 -0
  23. package/src/components/ui/autocomplete/AutocompleteEmpty.vue +20 -0
  24. package/src/components/ui/autocomplete/AutocompleteGroup.vue +29 -0
  25. package/src/components/ui/autocomplete/AutocompleteItem.vue +26 -0
  26. package/src/components/ui/autocomplete/AutocompleteRoot.vue +31 -0
  27. package/src/components/ui/autocomplete/AutocompleteSeparator.vue +23 -0
  28. package/src/components/ui/autocomplete/index.ts +1 -0
  29. package/src/components/ui/avatar/Avatar.vue +31 -0
  30. package/src/components/ui/avatar/AvatarFallback.vue +11 -0
  31. package/src/components/ui/avatar/AvatarImage.vue +9 -0
  32. package/src/components/ui/avatar/index.ts +19 -0
  33. package/src/components/ui/badge/Badge.vue +16 -0
  34. package/src/components/ui/badge/index.ts +22 -0
  35. package/src/components/ui/button/Button.vue +123 -0
  36. package/src/components/ui/button/index.ts +78 -0
  37. package/src/components/ui/calendar/Calendar.vue +76 -0
  38. package/src/components/ui/calendar/CalendarCell.vue +24 -0
  39. package/src/components/ui/calendar/CalendarCellTrigger.vue +38 -0
  40. package/src/components/ui/calendar/CalendarGrid.vue +24 -0
  41. package/src/components/ui/calendar/CalendarGridBody.vue +11 -0
  42. package/src/components/ui/calendar/CalendarGridHead.vue +11 -0
  43. package/src/components/ui/calendar/CalendarGridRow.vue +21 -0
  44. package/src/components/ui/calendar/CalendarHeadCell.vue +21 -0
  45. package/src/components/ui/calendar/CalendarHeader.vue +21 -0
  46. package/src/components/ui/calendar/CalendarHeading.vue +27 -0
  47. package/src/components/ui/calendar/CalendarNextButton.vue +32 -0
  48. package/src/components/ui/calendar/CalendarPrevButton.vue +32 -0
  49. package/src/components/ui/calendar/index.ts +1 -0
  50. package/src/components/ui/card/Card.vue +57 -0
  51. package/src/components/ui/card/CardContent.vue +14 -0
  52. package/src/components/ui/card/CardDescription.vue +14 -0
  53. package/src/components/ui/card/CardFooter.vue +14 -0
  54. package/src/components/ui/card/CardHeader.vue +14 -0
  55. package/src/components/ui/card/CardTitle.vue +18 -0
  56. package/src/components/ui/card/CardTray.vue +14 -0
  57. package/src/components/ui/card/index.ts +1 -0
  58. package/src/components/ui/checkbox/Checkbox.vue +63 -0
  59. package/src/components/ui/checkbox/CheckboxBase.vue +39 -0
  60. package/src/components/ui/checkbox/index.ts +1 -0
  61. package/src/components/ui/checkbox-group/CheckboxGroup.vue +65 -0
  62. package/src/components/ui/checkbox-group/index.ts +15 -0
  63. package/src/components/ui/color-picker/Alpha.vue +63 -0
  64. package/src/components/ui/color-picker/Angle.vue +145 -0
  65. package/src/components/ui/color-picker/Checkboard.vue +43 -0
  66. package/src/components/ui/color-picker/Color.vue +255 -0
  67. package/src/components/ui/color-picker/ColorPicker.vue +25 -0
  68. package/src/components/ui/color-picker/Gradient.vue +172 -0
  69. package/src/components/ui/color-picker/Handle.vue +19 -0
  70. package/src/components/ui/color-picker/Hue.vue +80 -0
  71. package/src/components/ui/color-picker/LabelInput.vue +16 -0
  72. package/src/components/ui/color-picker/Rail.vue +100 -0
  73. package/src/components/ui/color-picker/Saturation.vue +142 -0
  74. package/src/components/ui/color-picker/index.ts +4 -0
  75. package/src/components/ui/combobox/Combobox.vue +202 -0
  76. package/src/components/ui/combobox/ComboboxContent.vue +27 -0
  77. package/src/components/ui/combobox/ComboboxEmpty.vue +20 -0
  78. package/src/components/ui/combobox/ComboboxGroup.vue +29 -0
  79. package/src/components/ui/combobox/ComboboxInput.vue +52 -0
  80. package/src/components/ui/combobox/ComboboxItem.vue +26 -0
  81. package/src/components/ui/combobox/ComboboxRoot.vue +31 -0
  82. package/src/components/ui/combobox/ComboboxSeparator.vue +23 -0
  83. package/src/components/ui/combobox/index.ts +1 -0
  84. package/src/components/ui/date-picker/DatePicker.vue +55 -0
  85. package/src/components/ui/date-picker/index.ts +1 -0
  86. package/src/components/ui/date-range-picker/DateRangePicker.vue +137 -0
  87. package/src/components/ui/date-range-picker/index.ts +1 -0
  88. package/src/components/ui/dialog/Dialog.vue +78 -0
  89. package/src/components/ui/dialog/DialogContent.vue +46 -0
  90. package/src/components/ui/dialog/DialogDescription.vue +24 -0
  91. package/src/components/ui/dialog/DialogFooter.vue +19 -0
  92. package/src/components/ui/dialog/DialogHeader.vue +16 -0
  93. package/src/components/ui/dialog/DialogTitle.vue +29 -0
  94. package/src/components/ui/dialog/DialogTrigger.vue +11 -0
  95. package/src/components/ui/dialog/index.ts +1 -0
  96. package/src/components/ui/drawer/Drawer.vue +88 -0
  97. package/src/components/ui/drawer/DrawerContent.vue +57 -0
  98. package/src/components/ui/drawer/DrawerDescription.vue +22 -0
  99. package/src/components/ui/drawer/DrawerFooter.vue +19 -0
  100. package/src/components/ui/drawer/DrawerHeader.vue +16 -0
  101. package/src/components/ui/drawer/DrawerTitle.vue +22 -0
  102. package/src/components/ui/drawer/DrawerTrigger.vue +11 -0
  103. package/src/components/ui/drawer/index.ts +21 -0
  104. package/src/components/ui/dropdown-menu/DropdownCheckboxGroupMenu.vue +87 -0
  105. package/src/components/ui/dropdown-menu/DropdownMenu.vue +72 -0
  106. package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
  107. package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +37 -0
  108. package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
  109. package/src/components/ui/dropdown-menu/DropdownMenuHelp.vue +14 -0
  110. package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +28 -0
  111. package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +24 -0
  112. package/src/components/ui/dropdown-menu/DropdownMenuPart.vue +64 -0
  113. package/src/components/ui/dropdown-menu/DropdownMenuPartItem.vue +76 -0
  114. package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
  115. package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +41 -0
  116. package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +22 -0
  117. package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
  118. package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
  119. package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +30 -0
  120. package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +33 -0
  121. package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +13 -0
  122. package/src/components/ui/dropdown-menu/DropdownRadioGroupMenu.vue +75 -0
  123. package/src/components/ui/dropdown-menu/index.ts +36 -0
  124. package/src/components/ui/file-upload-button/FileUploadButton.vue +55 -0
  125. package/src/components/ui/file-upload-button/index.ts +1 -0
  126. package/src/components/ui/form/Form.vue +13 -0
  127. package/src/components/ui/form/FormControl.vue +16 -0
  128. package/src/components/ui/form/FormDescription.vue +20 -0
  129. package/src/components/ui/form/FormField.vue +61 -0
  130. package/src/components/ui/form/FormLabel.vue +23 -0
  131. package/src/components/ui/form/FormMessage.vue +16 -0
  132. package/src/components/ui/form/index.ts +2 -0
  133. package/src/components/ui/form/useFormField.ts +30 -0
  134. package/src/components/ui/icon/Icon.vue +16 -0
  135. package/src/components/ui/icon/index.ts +1 -0
  136. package/src/components/ui/input/Input.vue +51 -0
  137. package/src/components/ui/input/InputBase.vue +18 -0
  138. package/src/components/ui/input/index.ts +1 -0
  139. package/src/components/ui/label/Label.vue +27 -0
  140. package/src/components/ui/label/index.ts +1 -0
  141. package/src/components/ui/pagination/Pagination.vue +50 -0
  142. package/src/components/ui/pagination/PaginationContent.vue +21 -0
  143. package/src/components/ui/pagination/PaginationEllipsis.vue +24 -0
  144. package/src/components/ui/pagination/PaginationFirst.vue +32 -0
  145. package/src/components/ui/pagination/PaginationItem.vue +32 -0
  146. package/src/components/ui/pagination/PaginationLast.vue +32 -0
  147. package/src/components/ui/pagination/PaginationNext.vue +32 -0
  148. package/src/components/ui/pagination/PaginationPrevious.vue +32 -0
  149. package/src/components/ui/pagination/index.ts +1 -0
  150. package/src/components/ui/popover/Popover.vue +57 -0
  151. package/src/components/ui/popover/PopoverTrigger.vue +15 -0
  152. package/src/components/ui/popover/index.ts +1 -0
  153. package/src/components/ui/progress/Progress.vue +35 -0
  154. package/src/components/ui/progress/ProgressIndicator.vue +19 -0
  155. package/src/components/ui/progress/index.ts +2 -0
  156. package/src/components/ui/progress-circular/ProgressCircular.vue +85 -0
  157. package/src/components/ui/progress-circular/index.ts +1 -0
  158. package/src/components/ui/radio-group/RadioGroup.vue +81 -0
  159. package/src/components/ui/radio-group/RadioGroupItem.vue +39 -0
  160. package/src/components/ui/radio-group/index.ts +15 -0
  161. package/src/components/ui/range-calendar/RangeCalendar.vue +71 -0
  162. package/src/components/ui/range-calendar/RangeCalendarCell.vue +28 -0
  163. package/src/components/ui/range-calendar/RangeCalendarCellTrigger.vue +40 -0
  164. package/src/components/ui/range-calendar/RangeCalendarGrid.vue +24 -0
  165. package/src/components/ui/range-calendar/RangeCalendarGridBody.vue +11 -0
  166. package/src/components/ui/range-calendar/RangeCalendarGridHead.vue +11 -0
  167. package/src/components/ui/range-calendar/RangeCalendarGridRow.vue +21 -0
  168. package/src/components/ui/range-calendar/RangeCalendarHeadCell.vue +21 -0
  169. package/src/components/ui/range-calendar/RangeCalendarHeader.vue +21 -0
  170. package/src/components/ui/range-calendar/RangeCalendarHeading.vue +27 -0
  171. package/src/components/ui/range-calendar/RangeCalendarNextButton.vue +32 -0
  172. package/src/components/ui/range-calendar/RangeCalendarPrevButton.vue +32 -0
  173. package/src/components/ui/range-calendar/index.ts +1 -0
  174. package/src/components/ui/select/Select.vue +120 -0
  175. package/src/components/ui/select/SelectContent.vue +45 -0
  176. package/src/components/ui/select/SelectGroup.vue +19 -0
  177. package/src/components/ui/select/SelectItem.vue +43 -0
  178. package/src/components/ui/select/SelectLabel.vue +13 -0
  179. package/src/components/ui/select/SelectSeparator.vue +17 -0
  180. package/src/components/ui/select/SelectTrigger.vue +31 -0
  181. package/src/components/ui/select/SelectValue.vue +11 -0
  182. package/src/components/ui/select/index.ts +1 -0
  183. package/src/components/ui/slider/Slider.vue +100 -0
  184. package/src/components/ui/slider/index.ts +1 -0
  185. package/src/components/ui/switch/Switch.vue +40 -0
  186. package/src/components/ui/switch/SwitchBase.vue +36 -0
  187. package/src/components/ui/switch/index.ts +1 -0
  188. package/src/components/ui/tabs/Tabs.vue +63 -0
  189. package/src/components/ui/tabs/TabsContent.vue +26 -0
  190. package/src/components/ui/tabs/TabsTrigger.vue +27 -0
  191. package/src/components/ui/tabs/index.ts +28 -0
  192. package/src/components/ui/textarea/Textarea.vue +13 -0
  193. package/src/components/ui/textarea/index.ts +1 -0
  194. package/src/components/ui/toast/Toast.vue +28 -0
  195. package/src/components/ui/toast/ToastAction.vue +26 -0
  196. package/src/components/ui/toast/ToastClose.vue +29 -0
  197. package/src/components/ui/toast/ToastDescription.vue +19 -0
  198. package/src/components/ui/toast/ToastProvider.vue +11 -0
  199. package/src/components/ui/toast/ToastTitle.vue +19 -0
  200. package/src/components/ui/toast/ToastViewport.vue +17 -0
  201. package/src/components/ui/toast/Toaster.vue +30 -0
  202. package/src/components/ui/toast/index.ts +34 -0
  203. package/src/components/ui/toast/useToast.ts +163 -0
  204. package/src/components/ui/toggle/Toggle.vue +51 -0
  205. package/src/components/ui/toggle/index.ts +71 -0
  206. package/src/components/ui/toggle-group/ToggleGroup.vue +58 -0
  207. package/src/components/ui/toggle-group/ToggleGroupItem.vue +54 -0
  208. package/src/components/ui/toggle-group/index.ts +1 -0
  209. package/src/components/ui/tooltip/Tooltip.vue +42 -0
  210. package/src/components/ui/tooltip/TooltipProvider.vue +11 -0
  211. package/src/components/ui/tooltip/index.ts +2 -0
  212. package/src/composables/delegated-props.ts +6 -0
  213. package/src/composables/emits-as-props.ts +17 -0
  214. package/src/composables/forward-props-emits.ts +11 -0
  215. package/src/directives/autofocus.ts +7 -0
  216. package/src/index.ts +159 -0
  217. package/src/options-provider.ts +19 -0
  218. package/src/utils/gradient.ts +158 -0
  219. package/src/utils/options.ts +40 -0
  220. package/src/utils/tailwind.ts +14 -0
  221. 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'