@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.
@@ -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":"AAujBA,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;;;;;;;;;;;;;;;;;;;AA0lBnE,wBAUG"}
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
- interface LitepickerOptions {
2
- autoApply?: boolean;
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<Props> & 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":"AAkRA,UAAU,iBAAiB;IACzB,SAA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B,wBAUG"}
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,CAuFvC,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,KA6BxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KA2BvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC"}
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
- options: {
37
- control: "object",
38
- description: "Configuration options for the rangepicker",
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
- options: {
55
- autoApply: true,
56
- allowRepick: true,
57
- dropdowns: {
58
- minYear: new Date().getFullYear(),
59
- maxYear: new Date().getFullYear() + 2,
60
- months: true,
61
- years: true,
62
- },
63
- startDate: new Date(),
64
- minDate: new Date(),
65
- format: 'DD MMM YYYY',
66
- numberOfColumns: 2,
67
- numberOfMonths: 2,
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
- options: {
151
- autoApply: true,
152
- singleMode: true,
153
- format: 'DD MMM YYYY',
154
- numberOfColumns: 1,
155
- numberOfMonths: 1,
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
- options: {
184
- autoApply: true,
185
- format: 'DD MMM YYYY',
186
- numberOfColumns: 2,
187
- numberOfMonths: 2,
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
- options: {
216
- autoApply: false,
217
- format: 'DD MMM YYYY',
218
- numberOfColumns: 2,
219
- numberOfMonths: 2,
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<{
@@ -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,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGxG,eAAe,gBAAgB,CAAA;AAG/B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA;AAGxC,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,CAAA;AAGzF,wBAAgB,cAAc,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;EAgBtF"}
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"}