@shwfed/nuxt 0.1.28 → 0.1.29
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/dist/module.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -3
- package/dist/runtime/components/app.vue +0 -1
- package/dist/runtime/components/query.d.vue.ts +10 -0
- package/dist/runtime/components/query.vue +83 -0
- package/dist/runtime/components/query.vue.d.ts +10 -0
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +42 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue +207 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +42 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue +23 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.d.vue.ts +20 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +38 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue.d.ts +20 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue +22 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.d.vue.ts +14 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.vue +16 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.vue.d.ts +14 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.vue +17 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +22 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +22 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue +22 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.d.vue.ts +19 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue +27 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue.d.ts +19 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +31 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.d.vue.ts +18 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +31 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue.d.ts +18 -0
- package/dist/runtime/components/ui/calendar/index.d.ts +13 -0
- package/dist/runtime/components/ui/calendar/index.js +12 -0
- package/dist/runtime/components/ui/command/CommandItem.vue +1 -1
- package/dist/runtime/components/ui/field/Field.d.vue.ts +19 -0
- package/dist/runtime/components/ui/field/Field.vue +22 -0
- package/dist/runtime/components/ui/field/Field.vue.d.ts +19 -0
- package/dist/runtime/components/ui/field/FieldContent.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldContent.vue +18 -0
- package/dist/runtime/components/ui/field/FieldContent.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/FieldDescription.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldDescription.vue +20 -0
- package/dist/runtime/components/ui/field/FieldDescription.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/FieldError.d.vue.ts +20 -0
- package/dist/runtime/components/ui/field/FieldError.vue +51 -0
- package/dist/runtime/components/ui/field/FieldError.vue.d.ts +20 -0
- package/dist/runtime/components/ui/field/FieldGroup.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldGroup.vue +18 -0
- package/dist/runtime/components/ui/field/FieldGroup.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/FieldLabel.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldLabel.vue +21 -0
- package/dist/runtime/components/ui/field/FieldLabel.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/FieldLegend.d.vue.ts +18 -0
- package/dist/runtime/components/ui/field/FieldLegend.vue +22 -0
- package/dist/runtime/components/ui/field/FieldLegend.vue.d.ts +18 -0
- package/dist/runtime/components/ui/field/FieldSeparator.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldSeparator.vue +27 -0
- package/dist/runtime/components/ui/field/FieldSeparator.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/FieldSet.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldSet.vue +19 -0
- package/dist/runtime/components/ui/field/FieldSet.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/FieldTitle.d.vue.ts +17 -0
- package/dist/runtime/components/ui/field/FieldTitle.vue +18 -0
- package/dist/runtime/components/ui/field/FieldTitle.vue.d.ts +17 -0
- package/dist/runtime/components/ui/field/index.d.ts +15 -0
- package/dist/runtime/components/ui/field/index.js +52 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +13 -0
- package/dist/runtime/components/ui/input/Input.vue +27 -0
- package/dist/runtime/components/ui/input/Input.vue.d.ts +13 -0
- package/dist/runtime/components/ui/input/index.d.ts +1 -0
- package/dist/runtime/components/ui/input/index.js +1 -0
- package/dist/runtime/components/ui/input-group/InputCombobox.d.vue.ts +13 -0
- package/dist/runtime/components/ui/input-group/InputCombobox.vue +56 -0
- package/dist/runtime/components/ui/input-group/InputCombobox.vue.d.ts +13 -0
- package/dist/runtime/components/ui/input-group/InputComboboxInput.d.vue.ts +3 -0
- package/dist/runtime/components/ui/input-group/InputComboboxInput.vue +16 -0
- package/dist/runtime/components/ui/input-group/InputComboboxInput.vue.d.ts +3 -0
- package/dist/runtime/components/ui/input-group/InputGroup.d.vue.ts +17 -0
- package/dist/runtime/components/ui/input-group/InputGroup.vue +27 -0
- package/dist/runtime/components/ui/input-group/InputGroup.vue.d.ts +17 -0
- package/dist/runtime/components/ui/input-group/InputGroupAddon.d.vue.ts +21 -0
- package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +30 -0
- package/dist/runtime/components/ui/input-group/InputGroupAddon.vue.d.ts +21 -0
- package/dist/runtime/components/ui/input-group/InputGroupButton.d.vue.ts +24 -0
- package/dist/runtime/components/ui/input-group/InputGroupButton.vue +20 -0
- package/dist/runtime/components/ui/input-group/InputGroupButton.vue.d.ts +24 -0
- package/dist/runtime/components/ui/input-group/InputGroupInput.d.vue.ts +7 -0
- package/dist/runtime/components/ui/input-group/InputGroupInput.vue +18 -0
- package/dist/runtime/components/ui/input-group/InputGroupInput.vue.d.ts +7 -0
- package/dist/runtime/components/ui/input-group/InputGroupText.d.vue.ts +17 -0
- package/dist/runtime/components/ui/input-group/InputGroupText.vue +17 -0
- package/dist/runtime/components/ui/input-group/InputGroupText.vue.d.ts +17 -0
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.d.vue.ts +7 -0
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +17 -0
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue.d.ts +7 -0
- package/dist/runtime/components/ui/input-group/index.d.ts +16 -0
- package/dist/runtime/components/ui/input-group/index.js +40 -0
- package/dist/runtime/components/ui/label/Label.d.vue.ts +18 -0
- package/dist/runtime/components/ui/label/Label.vue +27 -0
- package/dist/runtime/components/ui/label/Label.vue.d.ts +18 -0
- package/dist/runtime/components/ui/label/index.d.ts +1 -0
- package/dist/runtime/components/ui/label/index.js +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelect.d.vue.ts +23 -0
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +45 -0
- package/dist/runtime/components/ui/native-select/NativeSelect.vue.d.ts +23 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +17 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue +15 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +17 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +17 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +15 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +17 -0
- package/dist/runtime/components/ui/native-select/index.d.ts +3 -0
- package/dist/runtime/components/ui/native-select/index.js +3 -0
- package/dist/runtime/components/ui/popover/Popover.d.vue.ts +21 -0
- package/dist/runtime/components/ui/popover/Popover.vue +20 -0
- package/dist/runtime/components/ui/popover/Popover.vue.d.ts +21 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.d.vue.ts +14 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.vue +17 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.vue.d.ts +14 -0
- package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +35 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue +57 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +35 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.d.vue.ts +14 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.vue +16 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.vue.d.ts +14 -0
- package/dist/runtime/components/ui/popover/index.d.ts +4 -0
- package/dist/runtime/components/ui/popover/index.js +4 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue +95 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue +23 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.d.vue.ts +20 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +40 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue.d.ts +20 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGrid.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGrid.vue +22 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGrid.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridBody.d.vue.ts +14 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridBody.vue +16 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridBody.vue.d.ts +14 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridHead.d.vue.ts +14 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridHead.vue +16 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridHead.vue.d.ts +14 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridRow.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridRow.vue +22 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarGridRow.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeadCell.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeadCell.vue +22 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeadCell.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeader.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeader.vue +22 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeader.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeading.d.vue.ts +19 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeading.vue +26 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarHeading.vue.d.ts +19 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +32 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.d.vue.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +32 -0
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue.d.ts +18 -0
- package/dist/runtime/components/ui/range-calendar/index.d.ts +12 -0
- package/dist/runtime/components/ui/range-calendar/index.js +12 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +13 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue +22 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +13 -0
- package/dist/runtime/components/ui/textarea/index.d.ts +1 -0
- package/dist/runtime/components/ui/textarea/index.js +1 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue +1 -1
- package/dist/runtime/plugins/cel/env.d.ts +2 -2
- package/dist/runtime/plugins/cel/env.js +5 -7
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -6,9 +6,7 @@ const module$1 = defineNuxtModule({
|
|
|
6
6
|
name: "@shwfed/nuxt",
|
|
7
7
|
configKey: "shwfed"
|
|
8
8
|
},
|
|
9
|
-
defaults: {
|
|
10
|
-
features: []
|
|
11
|
-
},
|
|
9
|
+
defaults: {},
|
|
12
10
|
setup(options, nuxt) {
|
|
13
11
|
const resolver = createResolver(import.meta.url);
|
|
14
12
|
nuxt.options.runtimeConfig.public.shwfed = options;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
fields: ReadonlyArray<{
|
|
3
|
+
label: string;
|
|
4
|
+
prop: string;
|
|
5
|
+
initial?: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Icon } from "@iconify/vue";
|
|
3
|
+
import { Field, FieldLabel } from "./ui/field";
|
|
4
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputCombobox } from "./ui/input-group";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
|
6
|
+
import { useI18n } from "vue-i18n";
|
|
7
|
+
import { CommandItem, CommandGroup } from "./ui/command";
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
defineProps({
|
|
10
|
+
fields: { type: Array, required: true }
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div
|
|
16
|
+
class="mx-auto"
|
|
17
|
+
style="width: 400px;"
|
|
18
|
+
>
|
|
19
|
+
<Field>
|
|
20
|
+
<InputGroup>
|
|
21
|
+
<InputCombobox>
|
|
22
|
+
<CommandGroup heading="Search">
|
|
23
|
+
<CommandItem
|
|
24
|
+
value="1"
|
|
25
|
+
>
|
|
26
|
+
<Icon
|
|
27
|
+
icon="fluent:search-20-filled"
|
|
28
|
+
/>
|
|
29
|
+
<span>
|
|
30
|
+
Search
|
|
31
|
+
</span>
|
|
32
|
+
</CommandItem>
|
|
33
|
+
<CommandItem
|
|
34
|
+
value="2"
|
|
35
|
+
>
|
|
36
|
+
<Icon
|
|
37
|
+
icon="fluent:bookmark-20-filled"
|
|
38
|
+
/>
|
|
39
|
+
<span>
|
|
40
|
+
Bookmark
|
|
41
|
+
</span>
|
|
42
|
+
</CommandItem>
|
|
43
|
+
</CommandGroup>
|
|
44
|
+
</InputCombobox>
|
|
45
|
+
<InputGroupAddon
|
|
46
|
+
align="inline-end"
|
|
47
|
+
>
|
|
48
|
+
<Tooltip :delay-duration="800">
|
|
49
|
+
<TooltipProvider>
|
|
50
|
+
<TooltipTrigger as-child>
|
|
51
|
+
<InputGroupButton>
|
|
52
|
+
<Icon
|
|
53
|
+
icon="fluent:dismiss-20-regular"
|
|
54
|
+
/>
|
|
55
|
+
</InputGroupButton>
|
|
56
|
+
</TooltipTrigger>
|
|
57
|
+
<TooltipContent>
|
|
58
|
+
{{ t("clear") }}
|
|
59
|
+
</TooltipContent>
|
|
60
|
+
</TooltipProvider>
|
|
61
|
+
</Tooltip>
|
|
62
|
+
</InputGroupAddon>
|
|
63
|
+
</InputGroup>
|
|
64
|
+
<FieldLabel>
|
|
65
|
+
Query
|
|
66
|
+
</FieldLabel>
|
|
67
|
+
</Field>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<i18n lang="json">
|
|
72
|
+
{
|
|
73
|
+
"zh": {
|
|
74
|
+
"clear": "清空"
|
|
75
|
+
},
|
|
76
|
+
"ja": {
|
|
77
|
+
"clear": "クリア"
|
|
78
|
+
},
|
|
79
|
+
"en": {
|
|
80
|
+
"clear": "Clear"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</i18n>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
fields: ReadonlyArray<{
|
|
3
|
+
label: string;
|
|
4
|
+
prop: string;
|
|
5
|
+
initial?: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CalendarRootProps, DateValue } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import type { LayoutTypes } from '.';
|
|
4
|
+
type __VLS_Props = CalendarRootProps & {
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
layout?: LayoutTypes;
|
|
7
|
+
yearRange?: DateValue[];
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_59: {}, __VLS_67: {}, __VLS_69: {
|
|
10
|
+
date: DateValue;
|
|
11
|
+
month: import("@vueuse/core").ReuseTemplateComponent<{
|
|
12
|
+
date: DateValue;
|
|
13
|
+
}, Record<"default", undefined>>;
|
|
14
|
+
year: import("@vueuse/core").ReuseTemplateComponent<{
|
|
15
|
+
date: DateValue;
|
|
16
|
+
}, Record<"default", undefined>>;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
'calendar-prev-icon'?: (props: typeof __VLS_59) => any;
|
|
20
|
+
} & {
|
|
21
|
+
'calendar-next-icon'?: (props: typeof __VLS_67) => any;
|
|
22
|
+
} & {
|
|
23
|
+
'calendar-heading'?: (props: typeof __VLS_69) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (date: DateValue | undefined) => any;
|
|
27
|
+
"update:placeholder": (date: DateValue) => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
30
|
+
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
modelValue: DateValue | DateValue[];
|
|
33
|
+
layout: "month-and-year" | "month-only" | "year-only";
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
3
|
+
import { createReusableTemplate, reactiveOmit, useNavigatorLanguage, useVModel } from "@vueuse/core";
|
|
4
|
+
import { CalendarRoot, useDateFormatter, useForwardPropsEmits } from "reka-ui";
|
|
5
|
+
import { createYear, createYearRange, toDate } from "reka-ui/date";
|
|
6
|
+
import { computed, toRaw } from "vue";
|
|
7
|
+
import { cn } from "../../../utils/cn";
|
|
8
|
+
import { NativeSelect, NativeSelectOption } from "../native-select";
|
|
9
|
+
import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from ".";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
defaultValue: { type: null, required: false },
|
|
12
|
+
defaultPlaceholder: { type: null, required: false },
|
|
13
|
+
placeholder: { type: null, required: false },
|
|
14
|
+
pagedNavigation: { type: Boolean, required: false },
|
|
15
|
+
preventDeselect: { type: Boolean, required: false },
|
|
16
|
+
weekStartsOn: { type: Number, required: false },
|
|
17
|
+
weekdayFormat: { type: String, required: false },
|
|
18
|
+
calendarLabel: { type: String, required: false },
|
|
19
|
+
fixedWeeks: { type: Boolean, required: false },
|
|
20
|
+
maxValue: { type: null, required: false },
|
|
21
|
+
minValue: { type: null, required: false },
|
|
22
|
+
locale: { type: String, required: false },
|
|
23
|
+
numberOfMonths: { type: Number, required: false },
|
|
24
|
+
disabled: { type: Boolean, required: false },
|
|
25
|
+
readonly: { type: Boolean, required: false },
|
|
26
|
+
initialFocus: { type: Boolean, required: false },
|
|
27
|
+
isDateDisabled: { type: Function, required: false },
|
|
28
|
+
isDateUnavailable: { type: Function, required: false },
|
|
29
|
+
dir: { type: String, required: false },
|
|
30
|
+
nextPage: { type: Function, required: false },
|
|
31
|
+
prevPage: { type: Function, required: false },
|
|
32
|
+
modelValue: { type: null, required: false, default: void 0 },
|
|
33
|
+
multiple: { type: Boolean, required: false },
|
|
34
|
+
disableDaysOutsideCurrentView: { type: Boolean, required: false },
|
|
35
|
+
asChild: { type: Boolean, required: false },
|
|
36
|
+
as: { type: null, required: false },
|
|
37
|
+
class: { type: null, required: false },
|
|
38
|
+
layout: { type: null, required: false, default: void 0 },
|
|
39
|
+
yearRange: { type: Array, required: false }
|
|
40
|
+
});
|
|
41
|
+
const emits = defineEmits(["update:modelValue", "update:placeholder"]);
|
|
42
|
+
const delegatedProps = reactiveOmit(props, "class", "layout", "placeholder");
|
|
43
|
+
const placeholder = useVModel(props, "placeholder", emits, {
|
|
44
|
+
passive: true,
|
|
45
|
+
defaultValue: props.defaultPlaceholder ?? today(getLocalTimeZone())
|
|
46
|
+
});
|
|
47
|
+
const formatter = useDateFormatter(props.locale ?? "en");
|
|
48
|
+
const yearRange = computed(() => {
|
|
49
|
+
return props.yearRange ?? createYearRange({
|
|
50
|
+
start: props?.minValue ?? (toRaw(props.placeholder) ?? props.defaultPlaceholder ?? today(getLocalTimeZone())).cycle("year", -100),
|
|
51
|
+
end: props?.maxValue ?? (toRaw(props.placeholder) ?? props.defaultPlaceholder ?? today(getLocalTimeZone())).cycle("year", 10)
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
const [DefineMonthTemplate, ReuseMonthTemplate] = createReusableTemplate();
|
|
55
|
+
const [DefineYearTemplate, ReuseYearTemplate] = createReusableTemplate();
|
|
56
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
57
|
+
const locale = useNavigatorLanguage();
|
|
58
|
+
const weekStartsOn = computed(() => {
|
|
59
|
+
if (!locale.isSupported || !locale.language.value) return void 0;
|
|
60
|
+
const intl = new Intl.Locale(locale.language.value);
|
|
61
|
+
if ("getWeekInfo" in intl && typeof intl.getWeekInfo === "function") {
|
|
62
|
+
return intl.getWeekInfo().firstDay;
|
|
63
|
+
}
|
|
64
|
+
return void 0;
|
|
65
|
+
});
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<DefineMonthTemplate v-slot="{ date }">
|
|
70
|
+
<div class="**:data-[slot=native-select-icon]:right-1">
|
|
71
|
+
<div class="relative">
|
|
72
|
+
<div class="absolute inset-0 flex h-full items-center text-sm pl-2 pointer-events-none">
|
|
73
|
+
{{ formatter.custom(toDate(date), { month: "short" }) }}
|
|
74
|
+
</div>
|
|
75
|
+
<NativeSelect
|
|
76
|
+
class="text-xs h-8 pr-6 pl-2 text-transparent relative"
|
|
77
|
+
@change="(e) => {
|
|
78
|
+
placeholder = placeholder.set({
|
|
79
|
+
month: Number(e?.target?.value)
|
|
80
|
+
});
|
|
81
|
+
}"
|
|
82
|
+
>
|
|
83
|
+
<NativeSelectOption
|
|
84
|
+
v-for="(month) in createYear({ dateObj: date })"
|
|
85
|
+
:key="month.toString()"
|
|
86
|
+
:value="month.month"
|
|
87
|
+
:selected="date.month === month.month"
|
|
88
|
+
>
|
|
89
|
+
{{ formatter.custom(toDate(month), { month: "short" }) }}
|
|
90
|
+
</NativeSelectOption>
|
|
91
|
+
</NativeSelect>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</DefineMonthTemplate>
|
|
95
|
+
|
|
96
|
+
<DefineYearTemplate v-slot="{ date }">
|
|
97
|
+
<div class="**:data-[slot=native-select-icon]:right-1">
|
|
98
|
+
<div class="relative">
|
|
99
|
+
<div class="absolute inset-0 flex h-full items-center text-sm pl-2 pointer-events-none">
|
|
100
|
+
{{ formatter.custom(toDate(date), { year: "numeric" }) }}
|
|
101
|
+
</div>
|
|
102
|
+
<NativeSelect
|
|
103
|
+
class="text-xs h-8 pr-6 pl-2 text-transparent relative"
|
|
104
|
+
@change="(e) => {
|
|
105
|
+
placeholder = placeholder.set({
|
|
106
|
+
year: Number(e?.target?.value)
|
|
107
|
+
});
|
|
108
|
+
}"
|
|
109
|
+
>
|
|
110
|
+
<NativeSelectOption
|
|
111
|
+
v-for="(year) in yearRange"
|
|
112
|
+
:key="year.toString()"
|
|
113
|
+
:value="year.year"
|
|
114
|
+
:selected="date.year === year.year"
|
|
115
|
+
>
|
|
116
|
+
{{ formatter.custom(toDate(year), { year: "numeric" }) }}
|
|
117
|
+
</NativeSelectOption>
|
|
118
|
+
</NativeSelect>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</DefineYearTemplate>
|
|
122
|
+
|
|
123
|
+
<CalendarRoot
|
|
124
|
+
v-slot="{ grid, weekDays, date }"
|
|
125
|
+
v-bind="forwarded"
|
|
126
|
+
v-model:placeholder="placeholder"
|
|
127
|
+
data-slot="calendar"
|
|
128
|
+
:week-starts-on="weekStartsOn"
|
|
129
|
+
:class="cn('p-3', props.class)"
|
|
130
|
+
>
|
|
131
|
+
<CalendarHeader class="pt-0">
|
|
132
|
+
<nav class="w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between">
|
|
133
|
+
<CalendarPrevButton>
|
|
134
|
+
<slot name="calendar-prev-icon" />
|
|
135
|
+
</CalendarPrevButton>
|
|
136
|
+
<CalendarNextButton>
|
|
137
|
+
<slot name="calendar-next-icon" />
|
|
138
|
+
</CalendarNextButton>
|
|
139
|
+
</nav>
|
|
140
|
+
|
|
141
|
+
<slot
|
|
142
|
+
name="calendar-heading"
|
|
143
|
+
:date="date"
|
|
144
|
+
:month="ReuseMonthTemplate"
|
|
145
|
+
:year="ReuseYearTemplate"
|
|
146
|
+
>
|
|
147
|
+
<template v-if="layout === 'month-and-year'">
|
|
148
|
+
<div class="flex items-center justify-center gap-1">
|
|
149
|
+
<ReuseMonthTemplate :date="date" />
|
|
150
|
+
<ReuseYearTemplate :date="date" />
|
|
151
|
+
</div>
|
|
152
|
+
</template>
|
|
153
|
+
<template v-else-if="layout === 'month-only'">
|
|
154
|
+
<div class="flex items-center justify-center gap-1">
|
|
155
|
+
<ReuseMonthTemplate :date="date" />
|
|
156
|
+
{{ formatter.custom(toDate(date), { year: "numeric" }) }}
|
|
157
|
+
</div>
|
|
158
|
+
</template>
|
|
159
|
+
<template v-else-if="layout === 'year-only'">
|
|
160
|
+
<div class="flex items-center justify-center gap-1">
|
|
161
|
+
{{ formatter.custom(toDate(date), { month: "short" }) }}
|
|
162
|
+
<ReuseYearTemplate :date="date" />
|
|
163
|
+
</div>
|
|
164
|
+
</template>
|
|
165
|
+
<template v-else>
|
|
166
|
+
<CalendarHeading />
|
|
167
|
+
</template>
|
|
168
|
+
</slot>
|
|
169
|
+
</CalendarHeader>
|
|
170
|
+
|
|
171
|
+
<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
|
|
172
|
+
<CalendarGrid
|
|
173
|
+
v-for="month in grid"
|
|
174
|
+
:key="month.value.toString()"
|
|
175
|
+
>
|
|
176
|
+
<CalendarGridHead>
|
|
177
|
+
<CalendarGridRow>
|
|
178
|
+
<CalendarHeadCell
|
|
179
|
+
v-for="day in weekDays"
|
|
180
|
+
:key="day"
|
|
181
|
+
>
|
|
182
|
+
{{ day }}
|
|
183
|
+
</CalendarHeadCell>
|
|
184
|
+
</CalendarGridRow>
|
|
185
|
+
</CalendarGridHead>
|
|
186
|
+
<CalendarGridBody>
|
|
187
|
+
<CalendarGridRow
|
|
188
|
+
v-for="(weekDates, index) in month.rows"
|
|
189
|
+
:key="`weekDate-${index}`"
|
|
190
|
+
class="mt-2 w-full"
|
|
191
|
+
>
|
|
192
|
+
<CalendarCell
|
|
193
|
+
v-for="weekDate in weekDates"
|
|
194
|
+
:key="weekDate.toString()"
|
|
195
|
+
:date="weekDate"
|
|
196
|
+
>
|
|
197
|
+
<CalendarCellTrigger
|
|
198
|
+
:day="weekDate"
|
|
199
|
+
:month="month.value"
|
|
200
|
+
/>
|
|
201
|
+
</CalendarCell>
|
|
202
|
+
</CalendarGridRow>
|
|
203
|
+
</CalendarGridBody>
|
|
204
|
+
</CalendarGrid>
|
|
205
|
+
</div>
|
|
206
|
+
</CalendarRoot>
|
|
207
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CalendarRootProps, DateValue } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import type { LayoutTypes } from '.';
|
|
4
|
+
type __VLS_Props = CalendarRootProps & {
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
layout?: LayoutTypes;
|
|
7
|
+
yearRange?: DateValue[];
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_59: {}, __VLS_67: {}, __VLS_69: {
|
|
10
|
+
date: DateValue;
|
|
11
|
+
month: import("@vueuse/core").ReuseTemplateComponent<{
|
|
12
|
+
date: DateValue;
|
|
13
|
+
}, Record<"default", undefined>>;
|
|
14
|
+
year: import("@vueuse/core").ReuseTemplateComponent<{
|
|
15
|
+
date: DateValue;
|
|
16
|
+
}, Record<"default", undefined>>;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
'calendar-prev-icon'?: (props: typeof __VLS_59) => any;
|
|
20
|
+
} & {
|
|
21
|
+
'calendar-next-icon'?: (props: typeof __VLS_67) => any;
|
|
22
|
+
} & {
|
|
23
|
+
'calendar-heading'?: (props: typeof __VLS_69) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (date: DateValue | undefined) => any;
|
|
27
|
+
"update:placeholder": (date: DateValue) => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
30
|
+
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
modelValue: DateValue | DateValue[];
|
|
33
|
+
layout: "month-and-year" | "month-only" | "year-only";
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalendarCellProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = CalendarCellProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { CalendarCell, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils/cn";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
date: { type: null, required: true },
|
|
7
|
+
asChild: { type: Boolean, required: false },
|
|
8
|
+
as: { type: null, required: false },
|
|
9
|
+
class: { type: null, required: false }
|
|
10
|
+
});
|
|
11
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<CalendarCell
|
|
17
|
+
data-slot="calendar-cell"
|
|
18
|
+
:class="cn('relative p-0 text-center text-sm focus-within:relative focus-within:z-20 flex-1', props.class)"
|
|
19
|
+
v-bind="forwardedProps"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</CalendarCell>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalendarCellProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = CalendarCellProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CalendarCellTriggerProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = CalendarCellTriggerProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { CalendarCellTrigger, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils/cn";
|
|
5
|
+
import { buttonVariants } from "../button";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
day: { type: null, required: true },
|
|
8
|
+
month: { type: null, required: true },
|
|
9
|
+
asChild: { type: Boolean, required: false },
|
|
10
|
+
as: { type: null, required: false, default: "button" },
|
|
11
|
+
class: { type: null, required: false }
|
|
12
|
+
});
|
|
13
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
14
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<CalendarCellTrigger
|
|
19
|
+
data-slot="calendar-cell-trigger"
|
|
20
|
+
:class="cn(
|
|
21
|
+
buttonVariants({ variant: 'ghost' }),
|
|
22
|
+
'size-8 rounded-full p-0 font-normal transition-all duration-180 aria-selected:opacity-100 cursor-pointer',
|
|
23
|
+
'[&[data-today]:not([data-selected])]:text-white [&[data-today]:not([data-selected])]:bg-red-400',
|
|
24
|
+
// Selected
|
|
25
|
+
'data-selected:bg-[color-mix(in_srgb,var(--primary)_20%,white)] data-selected:opacity-100 data-selected:text-(--primary)',
|
|
26
|
+
// Disabled
|
|
27
|
+
'data-disabled:text-zinc-500 data-disabled:opacity-50',
|
|
28
|
+
// Unavailable
|
|
29
|
+
'data-unavailable:text-zinc-300 data-unavailable:line-through',
|
|
30
|
+
// Outside months
|
|
31
|
+
'data-outside-view:text-zinc-300',
|
|
32
|
+
props.class
|
|
33
|
+
)"
|
|
34
|
+
v-bind="forwardedProps"
|
|
35
|
+
>
|
|
36
|
+
<slot />
|
|
37
|
+
</CalendarCellTrigger>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CalendarCellTriggerProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = CalendarCellTriggerProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalendarGridProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = CalendarGridProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { CalendarGrid, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils/cn";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
asChild: { type: Boolean, required: false },
|
|
7
|
+
as: { type: null, required: false },
|
|
8
|
+
class: { type: null, required: false }
|
|
9
|
+
});
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<CalendarGrid
|
|
16
|
+
data-slot="calendar-grid"
|
|
17
|
+
:class="cn('w-full border-collapse space-x-1', props.class)"
|
|
18
|
+
v-bind="forwardedProps"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</CalendarGrid>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalendarGridProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = CalendarGridProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CalendarGridBodyProps } from 'reka-ui';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<CalendarGridBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalendarGridBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|