@rebilly/revel 12.12.2 → 12.13.0
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/CHANGELOG.md +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/r-date-range/components/calendar.vue.d.ts +24 -0
- package/dist/components/r-date-range/components/inputs.vue.d.ts +24 -0
- package/dist/components/r-date-range/components/month.vue.d.ts +18 -0
- package/dist/components/r-date-range/components/popup.vue.d.ts +36 -0
- package/dist/components/r-date-range/components/presets.vue.d.ts +13 -0
- package/dist/components/r-date-range/components/trigger.vue.d.ts +24 -0
- package/dist/components/r-date-range/index.d.ts +2 -0
- package/dist/components/r-date-range/r-date-range.vue.d.ts +46 -0
- package/dist/components/r-date-range/types.d.ts +40 -0
- package/dist/components/r-date-range/use-calendar.d.ts +21 -0
- package/dist/components/r-date-range/use-date-range-state.d.ts +30 -0
- package/dist/components/r-flex/r-flex.vue.d.ts +1 -1
- package/dist/components/r-modal/r-modal.vue.d.ts +1 -1
- package/dist/components/r-popper/r-popper.vue.d.ts +2 -2
- package/dist/revel.mjs +6475 -5251
- package/dist/revel.umd.js +126 -126
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [12.
|
|
1
|
+
## [12.13.0](https://github.com/Rebilly/rebilly/compare/revel-v12.12.2...revel-v12.13.0) (2026-01-20)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **revel:** Add r-date-range component ([#17958](https://github.com/Rebilly/rebilly/issues/17958)) ([184f2aa](https://github.com/Rebilly/rebilly/commit/184f2aaf6a27be73b3d1d2715ea776b5e28ac1c5))
|
|
@@ -6,6 +6,7 @@ export { default as RButton } from './r-button/r-button.vue';
|
|
|
6
6
|
export { default as RButtonGroup } from './r-button-group/r-button-group.vue';
|
|
7
7
|
export { default as RCheckbox } from './r-checkbox/r-checkbox.vue';
|
|
8
8
|
export { default as RDateInput } from './r-date-input/r-date-input.vue';
|
|
9
|
+
export { default as RDateRange } from './r-date-range/r-date-range.vue';
|
|
9
10
|
export { default as RFileUpload } from './r-file-upload/r-file-upload.vue';
|
|
10
11
|
export { default as RFlex } from './r-flex/r-flex.vue';
|
|
11
12
|
export { default as RFlexItem } from './r-flex/r-flex-item.vue';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
columns?: 1 | 2;
|
|
3
|
+
minDate?: Date | string;
|
|
4
|
+
maxDate?: Date | string;
|
|
5
|
+
timezone?: string;
|
|
6
|
+
navigateToDate?: Date | null;
|
|
7
|
+
isInRange: (date: Date) => boolean;
|
|
8
|
+
isRangeStart: (date: Date) => boolean;
|
|
9
|
+
isRangeEnd: (date: Date) => boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
"date-click": (date: Date) => any;
|
|
13
|
+
"date-hover": (date: Date | null) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
15
|
+
"onDate-click"?: ((date: Date) => any) | undefined;
|
|
16
|
+
"onDate-hover"?: ((date: Date | null) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
columns: 1 | 2;
|
|
19
|
+
timezone: string;
|
|
20
|
+
minDate: Date | string;
|
|
21
|
+
maxDate: Date | string;
|
|
22
|
+
navigateToDate: Date | null;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TimeValue } from '../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
startDate: Date | null;
|
|
4
|
+
endDate: Date | null;
|
|
5
|
+
startTime: TimeValue;
|
|
6
|
+
endTime: TimeValue;
|
|
7
|
+
showTimePicker?: boolean;
|
|
8
|
+
is24hr?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
"update:startDate": (value: Date | null) => any;
|
|
12
|
+
"update:endDate": (value: Date | null) => any;
|
|
13
|
+
"update:startTime": (value: TimeValue) => any;
|
|
14
|
+
"update:endTime": (value: TimeValue) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
16
|
+
"onUpdate:startDate"?: ((value: Date | null) => any) | undefined;
|
|
17
|
+
"onUpdate:endDate"?: ((value: Date | null) => any) | undefined;
|
|
18
|
+
"onUpdate:startTime"?: ((value: TimeValue) => any) | undefined;
|
|
19
|
+
"onUpdate:endTime"?: ((value: TimeValue) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
is24hr: boolean;
|
|
22
|
+
showTimePicker: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalendarMonth } from '../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
month: CalendarMonth;
|
|
4
|
+
showHeader?: boolean;
|
|
5
|
+
isInRange: (date: Date) => boolean;
|
|
6
|
+
isRangeStart: (date: Date) => boolean;
|
|
7
|
+
isRangeEnd: (date: Date) => boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
"date-click": (date: Date) => any;
|
|
11
|
+
"date-hover": (date: Date | null) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
+
"onDate-click"?: ((date: Date) => any) | undefined;
|
|
14
|
+
"onDate-hover"?: ((date: Date | null) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
showHeader: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { TimeValue } from '../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
startDate: Date | null;
|
|
4
|
+
endDate: Date | null;
|
|
5
|
+
startTime: TimeValue;
|
|
6
|
+
endTime: TimeValue;
|
|
7
|
+
selectedPreset: string | null;
|
|
8
|
+
showPresets?: boolean;
|
|
9
|
+
showTimePicker?: boolean;
|
|
10
|
+
is24hr?: boolean;
|
|
11
|
+
columns?: 1 | 2;
|
|
12
|
+
minDate?: Date | string;
|
|
13
|
+
maxDate?: Date | string;
|
|
14
|
+
timezone?: string;
|
|
15
|
+
isMobile?: boolean;
|
|
16
|
+
isInRange: (date: Date) => boolean;
|
|
17
|
+
isRangeStart: (date: Date) => boolean;
|
|
18
|
+
isRangeEnd: (date: Date) => boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
} & {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
25
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
columns: 1 | 2;
|
|
28
|
+
timezone: string;
|
|
29
|
+
is24hr: boolean;
|
|
30
|
+
minDate: Date | string;
|
|
31
|
+
maxDate: Date | string;
|
|
32
|
+
showPresets: boolean;
|
|
33
|
+
showTimePicker: boolean;
|
|
34
|
+
isMobile: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
selectedPreset?: string | null;
|
|
3
|
+
isMobile?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
select: (preset: "today" | "yesterday" | "thisWeek" | "lastWeek" | "last30Days" | "thisMonth" | "lastMonth" | "last3Months" | "last6Months" | "thisYear" | "lastYear") => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
+
onSelect?: ((preset: "today" | "yesterday" | "thisWeek" | "lastWeek" | "last30Days" | "thisMonth" | "lastMonth" | "last3Months" | "last6Months" | "thisYear" | "lastYear") => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
selectedPreset: string | null;
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DateRange } from '../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
dateRange?: DateRange | null;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
showTimePicker?: boolean;
|
|
7
|
+
is24hr?: boolean;
|
|
8
|
+
timezone?: string;
|
|
9
|
+
isInvalid?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
click: () => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
onClick?: (() => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
placeholder: string;
|
|
18
|
+
isInvalid: boolean;
|
|
19
|
+
timezone: string;
|
|
20
|
+
is24hr: boolean;
|
|
21
|
+
dateRange: DateRange | null;
|
|
22
|
+
showTimePicker: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { DateRange } from './types';
|
|
2
|
+
import type { ValidationState } from '../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
validate?: Nullable<ValidationState>;
|
|
8
|
+
showValidateMessages?: boolean;
|
|
9
|
+
timezone?: string;
|
|
10
|
+
showPresets?: boolean;
|
|
11
|
+
showTimePicker?: boolean;
|
|
12
|
+
is24hr?: boolean;
|
|
13
|
+
minDate?: Date | string;
|
|
14
|
+
maxDate?: Date | string;
|
|
15
|
+
columns?: 1 | 2;
|
|
16
|
+
}
|
|
17
|
+
type __VLS_Props = Props;
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
19
|
+
modelValue?: DateRange | null;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (value: DateRange | null) => any;
|
|
23
|
+
} & {
|
|
24
|
+
cancel: () => any;
|
|
25
|
+
apply: (value: DateRange | null) => any;
|
|
26
|
+
clear: () => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
onCancel?: (() => any) | undefined;
|
|
29
|
+
"onUpdate:modelValue"?: ((value: DateRange | null) => any) | undefined;
|
|
30
|
+
onApply?: ((value: DateRange | null) => any) | undefined;
|
|
31
|
+
onClear?: (() => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
columns: 1 | 2;
|
|
34
|
+
label: string;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
placeholder: string;
|
|
37
|
+
validate: Nullable<ValidationState>;
|
|
38
|
+
timezone: string;
|
|
39
|
+
is24hr: boolean;
|
|
40
|
+
minDate: Date | string;
|
|
41
|
+
maxDate: Date | string;
|
|
42
|
+
showPresets: boolean;
|
|
43
|
+
showValidateMessages: boolean;
|
|
44
|
+
showTimePicker: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ValidationState } from '../../types';
|
|
2
|
+
import type { DateRange } from '../r-date-input/types';
|
|
3
|
+
export type { DateRange };
|
|
4
|
+
export type { CalendarPreset, CalendarPresetLabel, CalendarPresetPeriod, } from '../r-date-input/calendar-presets';
|
|
5
|
+
export interface TimeValue {
|
|
6
|
+
hours: number;
|
|
7
|
+
minutes: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CalendarDay {
|
|
10
|
+
date: Date;
|
|
11
|
+
day: number;
|
|
12
|
+
month: number;
|
|
13
|
+
year: number;
|
|
14
|
+
isToday: boolean;
|
|
15
|
+
isCurrentMonth: boolean;
|
|
16
|
+
isDisabled: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface CalendarMonth {
|
|
19
|
+
month: number;
|
|
20
|
+
year: number;
|
|
21
|
+
name: string;
|
|
22
|
+
weeks: CalendarDay[][];
|
|
23
|
+
}
|
|
24
|
+
export interface DateRangePickerProps {
|
|
25
|
+
modelValue?: DateRange | null;
|
|
26
|
+
label?: string;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
validate?: Nullable<ValidationState>;
|
|
30
|
+
showValidateMessages?: boolean;
|
|
31
|
+
timezone?: string;
|
|
32
|
+
showPresets?: boolean;
|
|
33
|
+
showTimePicker?: boolean;
|
|
34
|
+
is24hr?: boolean;
|
|
35
|
+
minDate?: Date | string;
|
|
36
|
+
maxDate?: Date | string;
|
|
37
|
+
locale?: string;
|
|
38
|
+
columns?: 1 | 2;
|
|
39
|
+
}
|
|
40
|
+
export type SelectionMode = 'start' | 'end' | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
import type { CalendarMonth } from './types';
|
|
3
|
+
export interface UseCalendarOptions {
|
|
4
|
+
timezone?: string;
|
|
5
|
+
minDate?: Ref<Date | string | undefined>;
|
|
6
|
+
maxDate?: Ref<Date | string | undefined>;
|
|
7
|
+
columns?: Ref<1 | 2>;
|
|
8
|
+
}
|
|
9
|
+
export interface UseCalendarReturn {
|
|
10
|
+
currentYear: Ref<number>;
|
|
11
|
+
currentMonth: Ref<number>;
|
|
12
|
+
displayedMonths: ComputedRef<CalendarMonth[]>;
|
|
13
|
+
nextMonth: () => void;
|
|
14
|
+
prevMonth: () => void;
|
|
15
|
+
nextYear: () => void;
|
|
16
|
+
prevYear: () => void;
|
|
17
|
+
goToDate: (date: Date) => void;
|
|
18
|
+
isDateDisabled: (date: Date) => boolean;
|
|
19
|
+
isToday: (date: Date) => boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function useCalendar(options?: UseCalendarOptions): UseCalendarReturn;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
import type { DateRange, TimeValue, SelectionMode } from './types';
|
|
3
|
+
import { type CalendarPreset } from '../r-date-input/calendar-presets';
|
|
4
|
+
export interface UseDateRangeStateOptions {
|
|
5
|
+
initialValue?: DateRange | null;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
showTimePicker?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface UseDateRangeStateReturn {
|
|
10
|
+
startDate: Ref<Date | null>;
|
|
11
|
+
endDate: Ref<Date | null>;
|
|
12
|
+
startTime: Ref<TimeValue>;
|
|
13
|
+
endTime: Ref<TimeValue>;
|
|
14
|
+
hoveredDate: Ref<Date | null>;
|
|
15
|
+
selectionMode: Ref<SelectionMode>;
|
|
16
|
+
selectedPreset: Ref<string | null>;
|
|
17
|
+
selectedPresetLabel: ComputedRef<string | null>;
|
|
18
|
+
onDateClick: (date: Date) => void;
|
|
19
|
+
onDateHover: (date: Date | null) => void;
|
|
20
|
+
isInRange: (date: Date) => boolean;
|
|
21
|
+
isRangeStart: (date: Date) => boolean;
|
|
22
|
+
isRangeEnd: (date: Date) => boolean;
|
|
23
|
+
applyPreset: (presetKey: CalendarPreset) => void;
|
|
24
|
+
buildDateRange: () => DateRange | null;
|
|
25
|
+
reset: () => void;
|
|
26
|
+
setFromDateRange: (range: DateRange | null) => void;
|
|
27
|
+
clear: () => void;
|
|
28
|
+
hasSelection: ComputedRef<boolean>;
|
|
29
|
+
}
|
|
30
|
+
export declare function useDateRangeState(options?: UseDateRangeStateOptions): UseDateRangeStateReturn;
|
|
@@ -39,12 +39,12 @@ type __VLS_Slots = {} & {
|
|
|
39
39
|
};
|
|
40
40
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
41
41
|
columns: FlexSize;
|
|
42
|
+
direction: Nullable<Direction>;
|
|
42
43
|
wrap: Nullable<Wrap>;
|
|
43
44
|
gap: Gap;
|
|
44
45
|
alignItems: Nullable<Distribution>;
|
|
45
46
|
alignContent: Nullable<ContentDistribution>;
|
|
46
47
|
justifyContent: Nullable<ContentDistribution>;
|
|
47
|
-
direction: Nullable<Direction>;
|
|
48
48
|
unstackable: boolean;
|
|
49
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
50
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -68,10 +68,10 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
|
|
|
68
68
|
title: Nullable<string>;
|
|
69
69
|
size: Nullable<ModalSize>;
|
|
70
70
|
scroll: boolean;
|
|
71
|
+
duration: number;
|
|
71
72
|
show: boolean;
|
|
72
73
|
cancelLabel: string;
|
|
73
74
|
scrollContent: boolean;
|
|
74
|
-
duration: number;
|
|
75
75
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
76
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
77
77
|
export default _default;
|
|
@@ -116,15 +116,15 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
116
116
|
autoHide: boolean;
|
|
117
117
|
position: Positions;
|
|
118
118
|
offset: number;
|
|
119
|
-
direction: Directions;
|
|
120
|
-
duration: number;
|
|
121
119
|
state: Nullable<boolean>;
|
|
122
120
|
escToHide: boolean;
|
|
123
121
|
globalAutoHide: boolean;
|
|
124
122
|
closeFunction: Nullable<() => unknown>;
|
|
125
123
|
openOnMount: boolean;
|
|
126
124
|
margin: MarginsOffset;
|
|
125
|
+
direction: Directions;
|
|
127
126
|
slideFrom: SlideFrom;
|
|
127
|
+
duration: number;
|
|
128
128
|
strategy: Strategy;
|
|
129
129
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
130
130
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|