@archpublicwebsite/rangepicker 1.2.0 → 1.2.5
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/Rangepicker.vue.d.ts +2 -2
- package/dist/Rangepicker.vue.d.ts.map +1 -1
- package/dist/RangepickerInput.vue.d.ts +4 -37
- package/dist/RangepickerInput.vue.d.ts.map +1 -1
- package/dist/RangepickerModes.stories.d.ts +5 -0
- package/dist/RangepickerModes.stories.d.ts.map +1 -1
- package/dist/RangepickerModes.stories.js +109 -41
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/rangepicker.js +153 -133
- package/dist/rangepicker.js.map +1 -1
- package/dist/rangepicker.umd.cjs +1 -1
- package/dist/rangepicker.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +102 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -17,8 +17,9 @@ declare const _default: import('vue').DefineComponent<RangepickerProps, {}, {},
|
|
|
17
17
|
onDateSelected?: (date: Dayjs) => any;
|
|
18
18
|
onRangeSelected?: (start: Dayjs, end: Dayjs) => any;
|
|
19
19
|
}>, {
|
|
20
|
-
isOpen: boolean;
|
|
21
20
|
variant: "desktop" | "mobile";
|
|
21
|
+
borderRadius: string;
|
|
22
|
+
isOpen: boolean;
|
|
22
23
|
valueOfMonths: number;
|
|
23
24
|
valueOfColumns: number;
|
|
24
25
|
format: string;
|
|
@@ -26,7 +27,6 @@ declare const _default: import('vue').DefineComponent<RangepickerProps, {}, {},
|
|
|
26
27
|
showTooltip: boolean;
|
|
27
28
|
autoApply: boolean;
|
|
28
29
|
position: "auto" | "top" | "bottom";
|
|
29
|
-
borderRadius: string;
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
31
31
|
calendarRef: HTMLDivElement;
|
|
32
32
|
}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rangepicker.vue.d.ts","sourceRoot":"","sources":["../src/Rangepicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Rangepicker.vue.d.ts","sourceRoot":"","sources":["../src/Rangepicker.vue"],"names":[],"mappings":"AA4jBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,SAAS,CAAC;;;mBAgBjB,MAAM;iBAAW,MAAM;;;;;;;mBAAvB,MAAM;iBAAW,MAAM;;;;;;;;;;;;;;;;;;;AA+lBnE,wBAUG"}
|
|
@@ -1,47 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
allowRepick?: boolean;
|
|
4
|
-
dropdowns?: any;
|
|
5
|
-
startDate?: Date | string;
|
|
6
|
-
minDate?: Date | string;
|
|
7
|
-
maxDate?: Date | string;
|
|
8
|
-
format?: string;
|
|
9
|
-
numberOfColumns?: number;
|
|
10
|
-
numberOfMonths?: number;
|
|
11
|
-
singleMode?: boolean;
|
|
12
|
-
tooltipText?: any;
|
|
13
|
-
tooltipNumber?: any;
|
|
14
|
-
inlineMode?: boolean;
|
|
15
|
-
minDays?: number;
|
|
16
|
-
maxDays?: number;
|
|
17
|
-
showTooltip?: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface Props {
|
|
20
|
-
id?: string;
|
|
21
|
-
close?: boolean;
|
|
22
|
-
modelValue?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
placeholder?: string;
|
|
25
|
-
readonly?: boolean;
|
|
26
|
-
class?: string;
|
|
27
|
-
options?: LitepickerOptions;
|
|
28
|
-
variant?: 'desktop' | 'mobile';
|
|
29
|
-
primaryColor?: string;
|
|
30
|
-
secondaryColor?: string;
|
|
31
|
-
fontFamily?: string;
|
|
32
|
-
borderRadius?: string;
|
|
33
|
-
showClearButton?: boolean;
|
|
34
|
-
}
|
|
35
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
1
|
+
import { RangepickerInputProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<RangepickerInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
3
|
"update:modelValue": (value: string) => any;
|
|
37
4
|
focusin: () => any;
|
|
38
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<RangepickerInputProps> & Readonly<{
|
|
39
6
|
"onUpdate:modelValue"?: (value: string) => any;
|
|
40
7
|
onFocusin?: () => any;
|
|
41
8
|
}>, {
|
|
42
|
-
variant: "desktop" | "mobile";
|
|
43
9
|
placeholder: string;
|
|
44
10
|
readonly: boolean;
|
|
11
|
+
variant: "desktop" | "mobile";
|
|
45
12
|
showClearButton: boolean;
|
|
46
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
47
14
|
wrapperRef: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangepickerInput.vue.d.ts","sourceRoot":"","sources":["../src/RangepickerInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RangepickerInput.vue.d.ts","sourceRoot":"","sources":["../src/RangepickerInput.vue"],"names":[],"mappings":"AAoNA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;;;;;;;;;;;;;;;;AAqRpD,wBAUG"}
|
|
@@ -32,4 +32,9 @@ export declare const AutoApply: Story;
|
|
|
32
32
|
* Gives users a chance to review before confirming.
|
|
33
33
|
*/
|
|
34
34
|
export declare const ManualApply: Story;
|
|
35
|
+
/**
|
|
36
|
+
* Show Clear Button mode displays a clear button to reset the selected dates.
|
|
37
|
+
* Allows users to quickly clear their selection.
|
|
38
|
+
*/
|
|
39
|
+
export declare const ShowClearButton: Story;
|
|
35
40
|
//# sourceMappingURL=RangepickerModes.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangepickerModes.stories.d.ts","sourceRoot":"","sources":["../src/RangepickerModes.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAEtD;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,
|
|
1
|
+
{"version":3,"file":"RangepickerModes.stories.d.ts","sourceRoot":"","sources":["../src/RangepickerModes.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAEtD;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAiIvC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAqB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAoB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KA2BxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAyBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAyBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KA2B7B,CAAC"}
|
|
@@ -33,9 +33,45 @@ and behavior modes to fit various use cases.
|
|
|
33
33
|
defaultValue: { summary: "desktop" },
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
control: "
|
|
38
|
-
description: "
|
|
36
|
+
autoApply: {
|
|
37
|
+
control: "boolean",
|
|
38
|
+
description: "Automatically apply selection without requiring an Apply button",
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: "boolean" },
|
|
41
|
+
defaultValue: { summary: "false" },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
singleMode: {
|
|
45
|
+
control: "boolean",
|
|
46
|
+
description: "Enable single date mode instead of range",
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: "boolean" },
|
|
49
|
+
defaultValue: { summary: "false" },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
format: {
|
|
53
|
+
control: "text",
|
|
54
|
+
description: "Date format string (e.g., 'DD MMM YYYY')",
|
|
55
|
+
table: {
|
|
56
|
+
type: { summary: "string" },
|
|
57
|
+
defaultValue: { summary: "'YYYY-MM-DD'" },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
numberOfColumns: {
|
|
61
|
+
control: "number",
|
|
62
|
+
description: "Number of calendar columns to display",
|
|
63
|
+
table: {
|
|
64
|
+
type: { summary: "number" },
|
|
65
|
+
defaultValue: { summary: "2" },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
numberOfMonths: {
|
|
69
|
+
control: "number",
|
|
70
|
+
description: "Number of months to display",
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: "number" },
|
|
73
|
+
defaultValue: { summary: "2" },
|
|
74
|
+
},
|
|
39
75
|
},
|
|
40
76
|
primaryColor: {
|
|
41
77
|
control: "color",
|
|
@@ -45,28 +81,34 @@ and behavior modes to fit various use cases.
|
|
|
45
81
|
control: "color",
|
|
46
82
|
description: "Secondary color for hover states (HEX format)",
|
|
47
83
|
},
|
|
84
|
+
showClearButton: {
|
|
85
|
+
control: "boolean",
|
|
86
|
+
description: "Show clear button to reset selection",
|
|
87
|
+
table: {
|
|
88
|
+
type: { summary: "boolean" },
|
|
89
|
+
defaultValue: { summary: "true" },
|
|
90
|
+
},
|
|
91
|
+
},
|
|
48
92
|
},
|
|
49
93
|
args: {
|
|
50
94
|
placeholder: "Check in / Check out",
|
|
51
95
|
id: "dates",
|
|
52
96
|
name: "dates",
|
|
53
97
|
variant: "desktop",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
singleMode: false,
|
|
69
|
-
}
|
|
98
|
+
autoApply: true,
|
|
99
|
+
allowRepick: true,
|
|
100
|
+
dropdowns: {
|
|
101
|
+
minYear: new Date().getFullYear(),
|
|
102
|
+
maxYear: new Date().getFullYear() + 2,
|
|
103
|
+
months: true,
|
|
104
|
+
years: true,
|
|
105
|
+
},
|
|
106
|
+
startDate: new Date(),
|
|
107
|
+
minDate: new Date(),
|
|
108
|
+
format: 'DD MMM YYYY',
|
|
109
|
+
numberOfColumns: 2,
|
|
110
|
+
numberOfMonths: 2,
|
|
111
|
+
singleMode: false,
|
|
70
112
|
},
|
|
71
113
|
render: (args) => ({
|
|
72
114
|
components: { RangepickerInput },
|
|
@@ -147,14 +189,12 @@ export const SingleMode = {
|
|
|
147
189
|
args: {
|
|
148
190
|
variant: "desktop",
|
|
149
191
|
placeholder: "Select date",
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
minDate: new Date(),
|
|
157
|
-
}
|
|
192
|
+
autoApply: true,
|
|
193
|
+
singleMode: true,
|
|
194
|
+
format: 'DD MMM YYYY',
|
|
195
|
+
numberOfColumns: 1,
|
|
196
|
+
numberOfMonths: 1,
|
|
197
|
+
minDate: new Date(),
|
|
158
198
|
},
|
|
159
199
|
parameters: {
|
|
160
200
|
docs: {
|
|
@@ -180,13 +220,11 @@ When enabled, clicking a date immediately selects it without requiring a second
|
|
|
180
220
|
export const AutoApply = {
|
|
181
221
|
args: {
|
|
182
222
|
variant: "desktop",
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
minDate: new Date(),
|
|
189
|
-
}
|
|
223
|
+
autoApply: true,
|
|
224
|
+
format: 'DD MMM YYYY',
|
|
225
|
+
numberOfColumns: 2,
|
|
226
|
+
numberOfMonths: 2,
|
|
227
|
+
minDate: new Date(),
|
|
190
228
|
},
|
|
191
229
|
parameters: {
|
|
192
230
|
docs: {
|
|
@@ -212,13 +250,11 @@ When enabled, the selection is confirmed immediately after picking the end date.
|
|
|
212
250
|
export const ManualApply = {
|
|
213
251
|
args: {
|
|
214
252
|
variant: "desktop",
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
minDate: new Date(),
|
|
221
|
-
}
|
|
253
|
+
autoApply: false,
|
|
254
|
+
format: 'DD MMM YYYY',
|
|
255
|
+
numberOfColumns: 2,
|
|
256
|
+
numberOfMonths: 2,
|
|
257
|
+
minDate: new Date(),
|
|
222
258
|
},
|
|
223
259
|
parameters: {
|
|
224
260
|
docs: {
|
|
@@ -237,3 +273,35 @@ When \`autoApply\` is set to \`false\`, users must explicitly confirm their date
|
|
|
237
273
|
},
|
|
238
274
|
},
|
|
239
275
|
};
|
|
276
|
+
/**
|
|
277
|
+
* Show Clear Button mode displays a clear button to reset the selected dates.
|
|
278
|
+
* Allows users to quickly clear their selection.
|
|
279
|
+
*/
|
|
280
|
+
export const ShowClearButton = {
|
|
281
|
+
args: {
|
|
282
|
+
variant: "desktop",
|
|
283
|
+
modelValue: "2026-02-10 - 2026-02-20",
|
|
284
|
+
showClearButton: true,
|
|
285
|
+
autoApply: true,
|
|
286
|
+
format: 'DD MMM YYYY',
|
|
287
|
+
numberOfColumns: 2,
|
|
288
|
+
numberOfMonths: 2,
|
|
289
|
+
minDate: new Date(),
|
|
290
|
+
},
|
|
291
|
+
parameters: {
|
|
292
|
+
docs: {
|
|
293
|
+
description: {
|
|
294
|
+
story: `
|
|
295
|
+
### Show Clear Button
|
|
296
|
+
|
|
297
|
+
Display a clear button that allows users to reset the selected date range.
|
|
298
|
+
|
|
299
|
+
- **Type**: \`boolean\`
|
|
300
|
+
- **Default**: \`true\`
|
|
301
|
+
|
|
302
|
+
When enabled, a clear button appears in the input field when dates are selected, allowing users to quickly clear their selection and start over. This is a custom prop on the RangepickerInput component, not part of the Litepicker options.
|
|
303
|
+
`,
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './styles/rangepicker.scss';
|
|
2
2
|
import Rangepicker from './Rangepicker.vue';
|
|
3
3
|
import RangepickerInput from './RangepickerInput.vue';
|
|
4
|
-
import type { DateRange, RangepickerProps, RangepickerEmits, CalendarDay, CalendarMonth } from './types';
|
|
4
|
+
import type { DateRange, RangepickerProps, RangepickerEmits, CalendarDay, CalendarMonth, RangepickerInputProps } from './types';
|
|
5
5
|
export default RangepickerInput;
|
|
6
6
|
export { Rangepicker, RangepickerInput };
|
|
7
|
-
export type { RangepickerProps, RangepickerEmits, DateRange, CalendarDay, CalendarMonth };
|
|
7
|
+
export type { RangepickerProps, RangepickerInputProps, RangepickerEmits, DateRange, CalendarDay, CalendarMonth };
|
|
8
8
|
export declare function useRangepicker(triggerRef: any, options?: Partial<RangepickerProps>): {
|
|
9
9
|
isOpen: import("vue").Ref<boolean, boolean>;
|
|
10
10
|
dateRange: import("vue").Ref<{
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA;AAClC,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAC3C,OAAO,gBAAgB,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA;AAClC,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAC3C,OAAO,gBAAgB,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAGhB,eAAe,gBAAgB,CAAA;AAG/B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA;AAGxC,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,aAAa,EACd,CAAA;AAGD,wBAAgB,cAAc,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;EAgBtF"}
|