@shwfed/nuxt 0.11.52 → 0.11.54
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.json +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.d.vue.ts +22 -0
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue +91 -0
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue.d.ts +22 -0
- package/dist/runtime/components/ui/date-range-picker/DateTimeRangePicker.d.vue.ts +21 -0
- package/dist/runtime/components/ui/date-range-picker/DateTimeRangePicker.vue +225 -0
- package/dist/runtime/components/ui/date-range-picker/DateTimeRangePicker.vue.d.ts +21 -0
- package/dist/runtime/components/ui/date-range-picker/index.d.ts +2 -0
- package/dist/runtime/components/ui/date-range-picker/index.js +2 -0
- package/dist/runtime/components/ui/table/Table.vue +1 -1
- package/dist/runtime/table-renderers/builtins.js +21 -10
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RangeCalendarRootProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RangeCalendarRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
displayPlaceholder?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (date: import("reka-ui").DateRange) => any;
|
|
9
|
+
"update:placeholder": (date: import("reka-ui").DateValue) => any;
|
|
10
|
+
"update:validModelValue": (date: import("reka-ui").DateRange) => any;
|
|
11
|
+
"update:startValue": (date: import("reka-ui").DateValue | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((date: import("reka-ui").DateValue) => any) | undefined;
|
|
15
|
+
"onUpdate:validModelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
16
|
+
"onUpdate:startValue"?: ((date: import("reka-ui").DateValue | undefined) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
numberOfMonths: number;
|
|
19
|
+
displayPlaceholder: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { useDateFormatter, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
import { toDate } from "reka-ui/date";
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
import { Icon } from "@iconify/vue";
|
|
7
|
+
import { cn } from "../../../utils/cn";
|
|
8
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../popover";
|
|
9
|
+
import { RangeCalendar } from "../range-calendar";
|
|
10
|
+
import { Button } from "../button";
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
defaultPlaceholder: { type: null, required: false },
|
|
13
|
+
defaultValue: { type: Object, required: false },
|
|
14
|
+
modelValue: { type: [Object, null], required: false },
|
|
15
|
+
placeholder: { type: null, required: false },
|
|
16
|
+
allowNonContiguousRanges: { type: Boolean, required: false },
|
|
17
|
+
pagedNavigation: { type: Boolean, required: false },
|
|
18
|
+
preventDeselect: { type: Boolean, required: false },
|
|
19
|
+
maximumDays: { type: Number, required: false },
|
|
20
|
+
weekStartsOn: { type: Number, required: false },
|
|
21
|
+
weekdayFormat: { type: String, required: false },
|
|
22
|
+
calendarLabel: { type: String, required: false },
|
|
23
|
+
fixedWeeks: { type: Boolean, required: false },
|
|
24
|
+
maxValue: { type: null, required: false },
|
|
25
|
+
minValue: { type: null, required: false },
|
|
26
|
+
locale: { type: String, required: false },
|
|
27
|
+
numberOfMonths: { type: Number, required: false, default: 2 },
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
readonly: { type: Boolean, required: false },
|
|
30
|
+
initialFocus: { type: Boolean, required: false },
|
|
31
|
+
isDateDisabled: { type: Function, required: false },
|
|
32
|
+
isDateUnavailable: { type: Function, required: false },
|
|
33
|
+
isDateHighlightable: { type: Function, required: false },
|
|
34
|
+
dir: { type: String, required: false },
|
|
35
|
+
nextPage: { type: Function, required: false },
|
|
36
|
+
prevPage: { type: Function, required: false },
|
|
37
|
+
disableDaysOutsideCurrentView: { type: Boolean, required: false },
|
|
38
|
+
fixedDate: { type: String, required: false },
|
|
39
|
+
asChild: { type: Boolean, required: false },
|
|
40
|
+
as: { type: null, required: false },
|
|
41
|
+
class: { type: null, required: false },
|
|
42
|
+
displayPlaceholder: { type: String, required: false, default: "Pick a date range" }
|
|
43
|
+
});
|
|
44
|
+
const emits = defineEmits(["update:modelValue", "update:validModelValue", "update:placeholder", "update:startValue"]);
|
|
45
|
+
const delegatedProps = reactiveOmit(props, "class", "displayPlaceholder");
|
|
46
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
47
|
+
const formatter = useDateFormatter(props.locale ?? "en");
|
|
48
|
+
const displayValue = computed(() => {
|
|
49
|
+
if (!props.modelValue?.start) return void 0;
|
|
50
|
+
const start = formatter.custom(toDate(props.modelValue.start), {
|
|
51
|
+
month: "short",
|
|
52
|
+
day: "numeric",
|
|
53
|
+
year: "numeric"
|
|
54
|
+
});
|
|
55
|
+
if (!props.modelValue.end) return start;
|
|
56
|
+
const end = formatter.custom(toDate(props.modelValue.end), {
|
|
57
|
+
month: "short",
|
|
58
|
+
day: "numeric",
|
|
59
|
+
year: "numeric"
|
|
60
|
+
});
|
|
61
|
+
return `${start} \u2013 ${end}`;
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
<Popover>
|
|
67
|
+
<PopoverTrigger as-child>
|
|
68
|
+
<Button
|
|
69
|
+
data-slot="date-range-picker"
|
|
70
|
+
variant="default"
|
|
71
|
+
:class="cn(
|
|
72
|
+
'w-auto justify-start text-left font-normal',
|
|
73
|
+
!displayValue && 'text-zinc-400',
|
|
74
|
+
props.class
|
|
75
|
+
)"
|
|
76
|
+
>
|
|
77
|
+
<Icon
|
|
78
|
+
icon="fluent:calendar-20-regular"
|
|
79
|
+
class="size-4"
|
|
80
|
+
/>
|
|
81
|
+
<span>{{ displayValue ?? displayPlaceholder }}</span>
|
|
82
|
+
</Button>
|
|
83
|
+
</PopoverTrigger>
|
|
84
|
+
<PopoverContent
|
|
85
|
+
class="w-auto p-0"
|
|
86
|
+
align="start"
|
|
87
|
+
>
|
|
88
|
+
<RangeCalendar v-bind="forwarded" />
|
|
89
|
+
</PopoverContent>
|
|
90
|
+
</Popover>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RangeCalendarRootProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RangeCalendarRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
displayPlaceholder?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (date: import("reka-ui").DateRange) => any;
|
|
9
|
+
"update:placeholder": (date: import("reka-ui").DateValue) => any;
|
|
10
|
+
"update:validModelValue": (date: import("reka-ui").DateRange) => any;
|
|
11
|
+
"update:startValue": (date: import("reka-ui").DateValue | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((date: import("reka-ui").DateValue) => any) | undefined;
|
|
15
|
+
"onUpdate:validModelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
16
|
+
"onUpdate:startValue"?: ((date: import("reka-ui").DateValue | undefined) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
numberOfMonths: number;
|
|
19
|
+
displayPlaceholder: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DateRangePickerRootProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = DateRangePickerRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (date: import("reka-ui").DateRange) => any;
|
|
8
|
+
"update:open": (value: boolean) => any;
|
|
9
|
+
"update:placeholder": (date: import("reka-ui").DateValue) => any;
|
|
10
|
+
"update:startValue": (date: import("reka-ui").DateValue | undefined) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
13
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((date: import("reka-ui").DateValue) => any) | undefined;
|
|
15
|
+
"onUpdate:startValue"?: ((date: import("reka-ui").DateValue | undefined) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
numberOfMonths: number;
|
|
18
|
+
granularity: "day" | "hour" | "minute" | "second";
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import {
|
|
5
|
+
DateRangePickerCalendar,
|
|
6
|
+
DateRangePickerCell,
|
|
7
|
+
DateRangePickerCellTrigger,
|
|
8
|
+
DateRangePickerContent,
|
|
9
|
+
DateRangePickerField,
|
|
10
|
+
DateRangePickerGrid,
|
|
11
|
+
DateRangePickerGridBody,
|
|
12
|
+
DateRangePickerGridHead,
|
|
13
|
+
DateRangePickerGridRow,
|
|
14
|
+
DateRangePickerHeadCell,
|
|
15
|
+
DateRangePickerHeader,
|
|
16
|
+
DateRangePickerHeading,
|
|
17
|
+
DateRangePickerInput,
|
|
18
|
+
DateRangePickerNext,
|
|
19
|
+
DateRangePickerPrev,
|
|
20
|
+
DateRangePickerRoot,
|
|
21
|
+
DateRangePickerTrigger,
|
|
22
|
+
useForwardPropsEmits
|
|
23
|
+
} from "reka-ui";
|
|
24
|
+
import { cn } from "../../../utils/cn";
|
|
25
|
+
import { buttonVariants } from "../button";
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
defaultValue: { type: Object, required: false },
|
|
28
|
+
defaultPlaceholder: { type: null, required: false },
|
|
29
|
+
placeholder: { type: null, required: false },
|
|
30
|
+
modelValue: { type: [Object, null], required: false },
|
|
31
|
+
hourCycle: { type: null, required: false },
|
|
32
|
+
step: { type: Object, required: false },
|
|
33
|
+
granularity: { type: String, required: false, default: "minute" },
|
|
34
|
+
hideTimeZone: { type: Boolean, required: false },
|
|
35
|
+
maxValue: { type: null, required: false },
|
|
36
|
+
minValue: { type: null, required: false },
|
|
37
|
+
locale: { type: String, required: false },
|
|
38
|
+
disabled: { type: Boolean, required: false },
|
|
39
|
+
readonly: { type: Boolean, required: false },
|
|
40
|
+
isDateUnavailable: { type: Function, required: false },
|
|
41
|
+
id: { type: String, required: false },
|
|
42
|
+
dir: { type: String, required: false },
|
|
43
|
+
name: { type: String, required: false },
|
|
44
|
+
required: { type: Boolean, required: false },
|
|
45
|
+
defaultOpen: { type: Boolean, required: false },
|
|
46
|
+
open: { type: Boolean, required: false },
|
|
47
|
+
modal: { type: Boolean, required: false },
|
|
48
|
+
isDateDisabled: { type: Function, required: false },
|
|
49
|
+
pagedNavigation: { type: Boolean, required: false },
|
|
50
|
+
weekStartsOn: { type: Number, required: false },
|
|
51
|
+
weekdayFormat: { type: String, required: false },
|
|
52
|
+
fixedWeeks: { type: Boolean, required: false },
|
|
53
|
+
numberOfMonths: { type: Number, required: false, default: 2 },
|
|
54
|
+
preventDeselect: { type: Boolean, required: false },
|
|
55
|
+
isDateHighlightable: { type: Function, required: false },
|
|
56
|
+
allowNonContiguousRanges: { type: Boolean, required: false },
|
|
57
|
+
fixedDate: { type: String, required: false },
|
|
58
|
+
maximumDays: { type: Number, required: false },
|
|
59
|
+
closeOnSelect: { type: Boolean, required: false },
|
|
60
|
+
class: { type: null, required: false }
|
|
61
|
+
});
|
|
62
|
+
const emits = defineEmits(["update:open", "update:modelValue", "update:placeholder", "update:startValue"]);
|
|
63
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
64
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<DateRangePickerRoot
|
|
69
|
+
v-bind="forwarded"
|
|
70
|
+
>
|
|
71
|
+
<DateRangePickerField v-slot="{ segments }">
|
|
72
|
+
<div
|
|
73
|
+
data-slot="date-time-range-picker"
|
|
74
|
+
:class="cn(
|
|
75
|
+
'flex items-center gap-0.5 border border-zinc-200 rounded bg-transparent h-9 px-3 py-1 text-sm text-zinc-700 transition-colors ease-out duration-180 outline-none hover:border-zinc-300 focus-within:border-(--primary) disabled:pointer-events-none disabled:opacity-50',
|
|
76
|
+
props.class
|
|
77
|
+
)"
|
|
78
|
+
>
|
|
79
|
+
<template
|
|
80
|
+
v-for="segment in segments.start"
|
|
81
|
+
:key="segment.part + '-start'"
|
|
82
|
+
>
|
|
83
|
+
<DateRangePickerInput
|
|
84
|
+
v-if="segment.part === 'literal'"
|
|
85
|
+
type="start"
|
|
86
|
+
:part="segment.part"
|
|
87
|
+
class="text-zinc-400"
|
|
88
|
+
>
|
|
89
|
+
{{ segment.value }}
|
|
90
|
+
</DateRangePickerInput>
|
|
91
|
+
<DateRangePickerInput
|
|
92
|
+
v-else
|
|
93
|
+
type="start"
|
|
94
|
+
:part="segment.part"
|
|
95
|
+
class="rounded-sm px-0.5 text-zinc-700 outline-none focus:bg-[color-mix(in_srgb,var(--primary)_20%,white)] focus:text-(--primary)"
|
|
96
|
+
>
|
|
97
|
+
{{ segment.value }}
|
|
98
|
+
</DateRangePickerInput>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<span class="mx-1 text-zinc-400">–</span>
|
|
102
|
+
|
|
103
|
+
<template
|
|
104
|
+
v-for="segment in segments.end"
|
|
105
|
+
:key="segment.part + '-end'"
|
|
106
|
+
>
|
|
107
|
+
<DateRangePickerInput
|
|
108
|
+
v-if="segment.part === 'literal'"
|
|
109
|
+
type="end"
|
|
110
|
+
:part="segment.part"
|
|
111
|
+
class="text-zinc-400"
|
|
112
|
+
>
|
|
113
|
+
{{ segment.value }}
|
|
114
|
+
</DateRangePickerInput>
|
|
115
|
+
<DateRangePickerInput
|
|
116
|
+
v-else
|
|
117
|
+
type="end"
|
|
118
|
+
:part="segment.part"
|
|
119
|
+
class="rounded-sm px-0.5 text-zinc-700 outline-none focus:bg-[color-mix(in_srgb,var(--primary)_20%,white)] focus:text-(--primary)"
|
|
120
|
+
>
|
|
121
|
+
{{ segment.value }}
|
|
122
|
+
</DateRangePickerInput>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
<DateRangePickerTrigger
|
|
126
|
+
:class="cn(
|
|
127
|
+
buttonVariants({ variant: 'ghost', size: 'xs' }),
|
|
128
|
+
'ml-auto size-6 p-0'
|
|
129
|
+
)"
|
|
130
|
+
>
|
|
131
|
+
<Icon
|
|
132
|
+
icon="fluent:calendar-20-regular"
|
|
133
|
+
class="size-4"
|
|
134
|
+
/>
|
|
135
|
+
</DateRangePickerTrigger>
|
|
136
|
+
</div>
|
|
137
|
+
</DateRangePickerField>
|
|
138
|
+
|
|
139
|
+
<DateRangePickerContent
|
|
140
|
+
:side-offset="4"
|
|
141
|
+
align="start"
|
|
142
|
+
:class="cn(
|
|
143
|
+
'bg-white text-zinc-700 z-50 rounded border border-zinc-200 shadow-md outline-hidden',
|
|
144
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2'
|
|
145
|
+
)"
|
|
146
|
+
>
|
|
147
|
+
<DateRangePickerCalendar
|
|
148
|
+
v-slot="{ grid, weekDays }"
|
|
149
|
+
class="p-3"
|
|
150
|
+
>
|
|
151
|
+
<DateRangePickerHeader class="flex justify-center pt-1 relative items-center w-full">
|
|
152
|
+
<DateRangePickerHeading class="text-sm font-medium" />
|
|
153
|
+
|
|
154
|
+
<div class="flex items-center gap-1">
|
|
155
|
+
<DateRangePickerPrev
|
|
156
|
+
:class="cn(
|
|
157
|
+
buttonVariants({ variant: 'ghost', size: 'sm' }),
|
|
158
|
+
'absolute left-1 size-7 bg-transparent p-0 opacity-50 hover:opacity-100'
|
|
159
|
+
)"
|
|
160
|
+
>
|
|
161
|
+
<Icon icon="fluent:chevron-left-20-regular" />
|
|
162
|
+
</DateRangePickerPrev>
|
|
163
|
+
<DateRangePickerNext
|
|
164
|
+
:class="cn(
|
|
165
|
+
buttonVariants({ variant: 'ghost', size: 'sm' }),
|
|
166
|
+
'absolute right-1 size-7 bg-transparent p-0 opacity-50 hover:opacity-100'
|
|
167
|
+
)"
|
|
168
|
+
>
|
|
169
|
+
<Icon icon="fluent:chevron-right-20-regular" />
|
|
170
|
+
</DateRangePickerNext>
|
|
171
|
+
</div>
|
|
172
|
+
</DateRangePickerHeader>
|
|
173
|
+
|
|
174
|
+
<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
|
|
175
|
+
<DateRangePickerGrid
|
|
176
|
+
v-for="month in grid"
|
|
177
|
+
:key="month.value.toString()"
|
|
178
|
+
class="w-full border-collapse space-x-1"
|
|
179
|
+
>
|
|
180
|
+
<DateRangePickerGridHead>
|
|
181
|
+
<DateRangePickerGridRow class="flex w-full">
|
|
182
|
+
<DateRangePickerHeadCell
|
|
183
|
+
v-for="day in weekDays"
|
|
184
|
+
:key="day"
|
|
185
|
+
class="w-8 rounded-md text-[0.8rem] font-normal text-zinc-300"
|
|
186
|
+
>
|
|
187
|
+
{{ day }}
|
|
188
|
+
</DateRangePickerHeadCell>
|
|
189
|
+
</DateRangePickerGridRow>
|
|
190
|
+
</DateRangePickerGridHead>
|
|
191
|
+
<DateRangePickerGridBody>
|
|
192
|
+
<DateRangePickerGridRow
|
|
193
|
+
v-for="(weekDates, index) in month.rows"
|
|
194
|
+
:key="`weekDate-${index}`"
|
|
195
|
+
class="mt-2 flex w-full"
|
|
196
|
+
>
|
|
197
|
+
<DateRangePickerCell
|
|
198
|
+
v-for="weekDate in weekDates"
|
|
199
|
+
:key="weekDate.toString()"
|
|
200
|
+
:date="weekDate"
|
|
201
|
+
class="relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-zinc-100 first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md"
|
|
202
|
+
>
|
|
203
|
+
<DateRangePickerCellTrigger
|
|
204
|
+
:day="weekDate"
|
|
205
|
+
:month="month.value"
|
|
206
|
+
:class="cn(
|
|
207
|
+
buttonVariants({ variant: 'ghost' }),
|
|
208
|
+
'h-8 w-8 p-0 font-normal data-selected:opacity-100',
|
|
209
|
+
'[&[data-today]:not([data-selected])]:bg-white [&[data-today]:not([data-selected])]:text-zinc-700',
|
|
210
|
+
'data-selection-start:bg-[color-mix(in_srgb,var(--primary)_20%,white)] data-selection-start:text-white data-selection-start:hover:bg-[color-mix(in_srgb,var(--primary)_40%,white)] data-selection-start:hover:text-white data-selection-start:focus:bg-[color-mix(in_srgb,var(--primary)_40%,white)] data-selection-start:focus:text-white',
|
|
211
|
+
'data-selection-end:bg-[color-mix(in_srgb,var(--primary)_20%,white)] data-selection-end:text-white data-selection-end:hover:bg-[color-mix(in_srgb,var(--primary)_40%,white)] data-selection-end:hover:text-white data-selection-end:focus:bg-[color-mix(in_srgb,var(--primary)_40%,white)] data-selection-end:focus:text-white',
|
|
212
|
+
'data-outside-view:text-zinc-300',
|
|
213
|
+
'data-disabled:text-zinc-300 data-disabled:opacity-50',
|
|
214
|
+
'data-unavailable:text-zinc-300 data-unavailable:line-through'
|
|
215
|
+
)"
|
|
216
|
+
/>
|
|
217
|
+
</DateRangePickerCell>
|
|
218
|
+
</DateRangePickerGridRow>
|
|
219
|
+
</DateRangePickerGridBody>
|
|
220
|
+
</DateRangePickerGrid>
|
|
221
|
+
</div>
|
|
222
|
+
</DateRangePickerCalendar>
|
|
223
|
+
</DateRangePickerContent>
|
|
224
|
+
</DateRangePickerRoot>
|
|
225
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DateRangePickerRootProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = DateRangePickerRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (date: import("reka-ui").DateRange) => any;
|
|
8
|
+
"update:open": (value: boolean) => any;
|
|
9
|
+
"update:placeholder": (date: import("reka-ui").DateValue) => any;
|
|
10
|
+
"update:startValue": (date: import("reka-ui").DateValue | undefined) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
13
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((date: import("reka-ui").DateValue) => any) | undefined;
|
|
15
|
+
"onUpdate:startValue"?: ((date: import("reka-ui").DateValue | undefined) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
numberOfMonths: number;
|
|
18
|
+
granularity: "day" | "hour" | "minute" | "second";
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -107,7 +107,7 @@ function translate(column) {
|
|
|
107
107
|
const options = renderer.parseOptions(column.renderer && typeof column.renderer === "object" && "props" in column.renderer ? column.renderer.props : null);
|
|
108
108
|
return {
|
|
109
109
|
id: column.id ?? genColumnId(column),
|
|
110
|
-
header: (ctx) => renderer.header
|
|
110
|
+
header: (ctx) => renderer.header ? renderer.header({ ctx, options }) : getColumnTitle(column),
|
|
111
111
|
cell: (ctx) => {
|
|
112
112
|
const slot = slots[ctx.column.id];
|
|
113
113
|
if (slot) {
|
|
@@ -594,16 +594,27 @@ defineTableRenderer(
|
|
|
594
594
|
"table.renderer.radio",
|
|
595
595
|
{},
|
|
596
596
|
{
|
|
597
|
-
cell: ({ ctx }) =>
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
597
|
+
cell: ({ ctx }) => {
|
|
598
|
+
const selected = ctx.row.getIsSelected();
|
|
599
|
+
const disabled = !ctx.row.getCanSelect();
|
|
600
|
+
return /* @__PURE__ */ jsx("div", { class: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
601
|
+
"button",
|
|
602
|
+
{
|
|
603
|
+
type: "button",
|
|
604
|
+
role: "radio",
|
|
605
|
+
"aria-checked": selected,
|
|
606
|
+
disabled,
|
|
607
|
+
onClick: () => ctx.table.setRowSelection({ [ctx.row.id]: true }),
|
|
608
|
+
class: [
|
|
609
|
+
"size-4 shrink-0 rounded-full border shadow-xs outline-none transition-shadow",
|
|
610
|
+
"flex items-center justify-center",
|
|
611
|
+
selected ? "bg-(--primary) border-(--primary)" : "border-zinc-200 hover:shadow",
|
|
612
|
+
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
613
|
+
],
|
|
614
|
+
children: selected ? /* @__PURE__ */ jsx("span", { class: "size-1.5 rounded-full bg-white" }) : null
|
|
615
|
+
}
|
|
616
|
+
) });
|
|
617
|
+
},
|
|
607
618
|
header: () => null,
|
|
608
619
|
config: NoOptionsConfig,
|
|
609
620
|
columnDefOverrides: {
|