@pequity/squirrel 10.0.3 → 11.0.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.
Files changed (76) hide show
  1. package/README.md +20 -1
  2. package/dist/cjs/chunks/p-action-bar.js +17 -14
  3. package/dist/cjs/chunks/p-dropdown-select.js +27 -26
  4. package/dist/cjs/chunks/p-inline-date-picker.js +53 -84
  5. package/dist/cjs/chunks/p-pagination-info.js +2 -2
  6. package/dist/cjs/chunks/p-pagination.js +13 -11
  7. package/dist/cjs/chunks/p-tabs-pills.js +8 -8
  8. package/dist/cjs/dateLocale.js +886 -0
  9. package/dist/cjs/index.js +103 -50
  10. package/dist/cjs/p-date-picker.js +146 -2
  11. package/dist/cjs/p-drawer.js +4 -4
  12. package/dist/cjs/p-input-search.js +5 -4
  13. package/dist/cjs/p-modal.js +3 -3
  14. package/dist/cjs/p-select-pill.js +1 -1
  15. package/dist/es/chunks/p-action-bar.js +18 -15
  16. package/dist/es/chunks/p-dropdown-select.js +27 -26
  17. package/dist/es/chunks/p-inline-date-picker.js +52 -83
  18. package/dist/es/chunks/p-pagination-info.js +2 -2
  19. package/dist/es/chunks/p-pagination.js +13 -11
  20. package/dist/es/chunks/p-tabs-pills.js +8 -8
  21. package/dist/es/dateLocale.js +886 -0
  22. package/dist/es/index.js +152 -99
  23. package/dist/es/p-date-picker.js +146 -2
  24. package/dist/es/p-drawer.js +4 -4
  25. package/dist/es/p-input-search.js +5 -4
  26. package/dist/es/p-modal.js +3 -3
  27. package/dist/es/p-select-pill.js +1 -1
  28. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +19 -23
  29. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +2 -2
  30. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +12 -13
  31. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +2 -2
  32. package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +1 -1
  33. package/dist/squirrel/index.d.ts +1 -0
  34. package/dist/squirrel/plugin/index.d.ts +11 -0
  35. package/dist/squirrel/utils/dateLocale.d.ts +2 -0
  36. package/dist/squirrel.css +73 -40
  37. package/package.json +33 -29
  38. package/squirrel/components/p-action-bar/p-action-bar.vue +4 -1
  39. package/squirrel/components/p-btn/p-btn.spec.js +0 -1
  40. package/squirrel/components/p-checkbox/p-checkbox.stories.js +2 -2
  41. package/squirrel/components/p-date-picker/p-date-picker.spec.js +49 -4
  42. package/squirrel/components/p-date-picker/p-date-picker.vue +85 -12
  43. package/squirrel/components/p-drawer/p-drawer.spec.js +364 -0
  44. package/squirrel/components/p-drawer/p-drawer.vue +8 -2
  45. package/squirrel/components/p-dropdown/p-dropdown.spec.js +252 -55
  46. package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +16 -12
  47. package/squirrel/components/p-file-upload/p-file-upload.spec.js +0 -1
  48. package/squirrel/components/p-file-upload/p-file-upload.vue +26 -9
  49. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +33 -18
  50. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +23 -10
  51. package/squirrel/components/p-input-search/p-input-search.vue +2 -2
  52. package/squirrel/components/p-modal/p-modal.vue +1 -1
  53. package/squirrel/components/p-pagination/p-pagination.vue +3 -3
  54. package/squirrel/components/p-pagination-info/p-pagination-info.vue +2 -2
  55. package/squirrel/components/p-progress-bar/{p-progess-bar.spec.js → p-progress-bar.spec.js} +7 -5
  56. package/squirrel/components/p-select-btn/p-select-btn.spec.js +104 -0
  57. package/squirrel/components/p-select-list/p-select-list.vue +7 -5
  58. package/squirrel/components/p-select-pill/p-select-pill.spec.js +114 -0
  59. package/squirrel/components/p-select-pill/p-select-pill.vue +1 -1
  60. package/squirrel/components/p-table/usePTableColResize.spec.js +123 -11
  61. package/squirrel/components/p-table/usePTableHeaderWrap.spec.js +1 -1
  62. package/squirrel/components/p-table/usePTableRowVirtualizer.spec.js +207 -0
  63. package/squirrel/components/p-table-header-cell/p-table-header-cell.stories.js +3 -0
  64. package/squirrel/components/p-table-sort/p-table-sort.vue +4 -4
  65. package/squirrel/components/p-tabs-pills/p-tabs-pills.vue +1 -1
  66. package/squirrel/index.spec.js +5 -0
  67. package/squirrel/index.ts +1 -0
  68. package/squirrel/locales/en-US.json +47 -0
  69. package/squirrel/locales/fr-CA.json +47 -0
  70. package/squirrel/plugin/index.spec.ts +140 -0
  71. package/squirrel/plugin/index.ts +54 -0
  72. package/squirrel/utils/dateLocale.spec.ts +20 -0
  73. package/squirrel/utils/dateLocale.ts +19 -0
  74. package/squirrel/utils/listKeyboardNavigation.spec.js +58 -0
  75. package/dist/cjs/chunks/p-date-picker.js +0 -169
  76. package/dist/es/chunks/p-date-picker.js +0 -170
@@ -1,4 +1,148 @@
1
- import { _ as _sfc_main } from "./chunks/p-date-picker.js";
1
+ import { defineComponent, mergeModels, useModel, useAttrs, computed, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, withKeys } from "vue";
2
+ import { _ as _sfc_main$1 } from "./chunks/p-input.js";
3
+ import { getDateFnsLocale } from "./dateLocale.js";
4
+ import { VueDatePicker } from "@vuepic/vue-datepicker";
5
+ import { useI18n } from "vue-i18n";
6
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{
9
+ name: "PDatePicker",
10
+ inheritAttrs: false
11
+ },
12
+ __name: "p-date-picker",
13
+ props: /* @__PURE__ */ mergeModels({
14
+ multiCalendars: { type: [Boolean, Number, String, Object] },
15
+ modelType: { default: "yyyy-MM-dd" },
16
+ dark: { type: Boolean },
17
+ transitions: { type: [Boolean, Object] },
18
+ ariaLabels: {},
19
+ hideNavigation: {},
20
+ timezone: {},
21
+ vertical: { type: Boolean },
22
+ hideMonthYearSelect: { type: Boolean },
23
+ disableYearSelect: { type: Boolean },
24
+ yearRange: {},
25
+ autoApply: { type: Boolean, default: true },
26
+ disabledDates: {},
27
+ startDate: {},
28
+ hideOffsetDates: { type: Boolean, default: true },
29
+ noToday: { type: Boolean },
30
+ allowedDates: {},
31
+ markers: {},
32
+ presetDates: {},
33
+ flow: {},
34
+ preventMinMaxNavigation: { type: Boolean },
35
+ reverseYears: { type: Boolean },
36
+ weekPicker: { type: Boolean },
37
+ filters: {},
38
+ arrowNavigation: { type: Boolean },
39
+ highlight: {},
40
+ teleport: { type: [String, Boolean] },
41
+ centered: { type: Boolean },
42
+ locale: {},
43
+ weekStart: { default: 0 },
44
+ weekNumbers: { type: [Boolean, Object] },
45
+ dayNames: {},
46
+ monthPicker: { type: Boolean },
47
+ yearPicker: { type: Boolean },
48
+ modelAuto: { type: Boolean },
49
+ formats: { default: () => ({ input: "dd-MMM-yyyy" }) },
50
+ multiDates: { type: [Boolean, Object] },
51
+ minDate: {},
52
+ maxDate: {},
53
+ minTime: {},
54
+ maxTime: {},
55
+ inputAttrs: {},
56
+ timeConfig: { default: () => ({ enableTimePicker: false }) },
57
+ placeholder: { default: "" },
58
+ timePicker: { type: Boolean },
59
+ range: { type: [Boolean, Object] },
60
+ menuId: {},
61
+ disabled: { type: Boolean },
62
+ readonly: { type: Boolean },
63
+ inline: { type: [Boolean, Object] },
64
+ textInput: { type: [Boolean, Object], default: true },
65
+ sixWeeks: { type: [Boolean, String] },
66
+ actionRow: {},
67
+ focusStartDate: { type: Boolean },
68
+ disabledTimes: {},
69
+ calendar: {},
70
+ config: {},
71
+ quarterPicker: { type: Boolean },
72
+ yearFirst: { type: Boolean },
73
+ loading: { type: Boolean },
74
+ ui: {},
75
+ floating: {},
76
+ name: { default: "" },
77
+ label: { default: "" },
78
+ errorMsg: { default: "" },
79
+ required: { type: Boolean, default: false }
80
+ }, {
81
+ "modelValue": {},
82
+ "modelModifiers": {}
83
+ }),
84
+ emits: ["update:modelValue"],
85
+ setup(__props) {
86
+ const props = __props;
87
+ const model = useModel(__props, "modelValue");
88
+ const { locale } = useI18n();
89
+ const attrs = useAttrs();
90
+ const datePickerProps = computed(() => {
91
+ const { name, label, errorMsg, required, ...vueDatePickerProps } = props;
92
+ const { class: classes, style, ...attrsWithoutClassAndStyle } = attrs;
93
+ return {
94
+ ...vueDatePickerProps,
95
+ ...attrsWithoutClassAndStyle,
96
+ locale: getDateFnsLocale(locale.value)
97
+ };
98
+ });
99
+ const inputPropsAndAttrs = computed(() => {
100
+ const { class: classes, style, ...res } = attrs;
101
+ res.label = props.label;
102
+ res.errorMsg = props.errorMsg;
103
+ res.required = props.required;
104
+ res.disabled = props.disabled;
105
+ res.placeholder = props.placeholder ? props.placeholder : typeof props.formats?.input === "string" ? props.formats.input : "dd-MMM-yyyy";
106
+ res.name = props.name;
107
+ res.readonly = props.readonly;
108
+ return res;
109
+ });
110
+ const handleInput = (e, onInputFn, onClearFn) => {
111
+ if (e.target instanceof HTMLInputElement && e.target.value === "") {
112
+ onClearFn(e);
113
+ return;
114
+ }
115
+ return onInputFn(e);
116
+ };
117
+ return (_ctx, _cache) => {
118
+ return openBlock(), createBlock(unref(VueDatePicker), mergeProps({
119
+ modelValue: model.value,
120
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
121
+ class: [
122
+ { hidden: _ctx.$attrs.hidden },
123
+ _ctx.$attrs.class,
124
+ { "has-label": !!__props.label },
125
+ { "has-error": !!__props.errorMsg },
126
+ `size-${_ctx.$attrs.size || "md"}`
127
+ ]
128
+ }, datePickerProps.value), {
129
+ "dp-input": withCtx(({ value, onInput, onEnter, onTab, onFocus, onBlur, onClear }) => [
130
+ createVNode(_sfc_main$1, mergeProps({ "model-value": value }, inputPropsAndAttrs.value, {
131
+ onInput: ($event) => handleInput($event, onInput, onClear),
132
+ onKeydown: [
133
+ withKeys(($event) => onEnter($event), ["enter"]),
134
+ withKeys(($event) => onTab($event), ["tab"])
135
+ ],
136
+ onFocus,
137
+ onBlur
138
+ }), null, 16, ["model-value", "onInput", "onKeydown", "onFocus", "onBlur"])
139
+ ]),
140
+ _: 1
141
+ }, 16, ["modelValue", "class"]);
142
+ };
143
+ }
144
+ });
145
+ const pDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5f4efd82"]]);
2
146
  export {
3
- _sfc_main as default
147
+ pDatePicker as default
4
148
  };
@@ -112,7 +112,7 @@ const __default__ = defineComponent({
112
112
  */
113
113
  closeLabel: {
114
114
  type: String,
115
- default: "Close"
115
+ default: ""
116
116
  },
117
117
  /**
118
118
  * Whether to show the backdrop behind the drawer.
@@ -236,7 +236,7 @@ const __default__ = defineComponent({
236
236
  });
237
237
  const __injectCSSVars__ = () => {
238
238
  useCssVars((_ctx) => ({
239
- "v0ae27020": _ctx.width
239
+ "v485968ad": _ctx.width
240
240
  }));
241
241
  };
242
242
  const __setup__ = __default__.setup;
@@ -308,7 +308,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
308
308
  }, [
309
309
  _ctx.enableClose ? (openBlock(), createBlock(_component_PCloseBtn, {
310
310
  key: 0,
311
- "aria-label": _ctx.closeLabel,
311
+ "aria-label": _ctx.closeLabel || _ctx.$t("squirrel.close"),
312
312
  class: "flex-0",
313
313
  disabled: _ctx.disabled,
314
314
  onClick: _ctx.close
@@ -353,7 +353,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
353
353
  }, 8, ["enter-active-class", "leave-active-class", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
354
354
  ], 8, ["to"])) : createCommentVNode("", true);
355
355
  }
356
- const pDrawer = /* @__PURE__ */ _export_sfc(__default__, [["render", _sfc_render], ["__scopeId", "data-v-b08a9ced"]]);
356
+ const pDrawer = /* @__PURE__ */ _export_sfc(__default__, [["render", _sfc_render], ["__scopeId", "data-v-e3739b6f"]]);
357
357
  export {
358
358
  pDrawer as default
359
359
  };
@@ -3,6 +3,7 @@ import { S as SIZES } from "./chunks/p-btn.types.js";
3
3
  import { _ as _sfc_main$2 } from "./chunks/p-icon.js";
4
4
  import { _ as _sfc_main$1 } from "./chunks/p-input.js";
5
5
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
+ const _hoisted_1 = ["aria-label"];
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  ...{
8
9
  name: "PInputSearch",
@@ -103,7 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
104
  }, null, 2)), [
104
105
  [
105
106
  _directive_tooltip,
106
- { content: "Press enter to search", delay: { show: 100, hide: 0 } },
107
+ { content: _ctx.$t("squirrel.input_search_press_enter_to_search"), delay: { show: 100, hide: 0 } },
107
108
  void 0,
108
109
  { bottom: true }
109
110
  ]
@@ -111,7 +112,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
112
  query.value ? (openBlock(), createElementBlock("button", {
112
113
  key: 1,
113
114
  role: "button",
114
- "aria-label": "Clear search input",
115
+ "aria-label": _ctx.$t("squirrel.input_search_clear_search_input"),
115
116
  class: normalizeClass(["absolute cursor-pointer", clearIconClasses[__props.size]]),
116
117
  onClick: clearSearch
117
118
  }, [
@@ -119,14 +120,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
120
  icon: "cancel-circle",
120
121
  class: "text-p-gray-40 hover:text-p-gray-50"
121
122
  })
122
- ], 2)) : createCommentVNode("", true)
123
+ ], 10, _hoisted_1)) : createCommentVNode("", true)
123
124
  ]),
124
125
  _: 1
125
126
  }, 16, ["modelValue", "size"]);
126
127
  };
127
128
  }
128
129
  });
129
- const PInputSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ce44730a"]]);
130
+ const PInputSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ed3f0628"]]);
130
131
  export {
131
132
  PInputSearch as default
132
133
  };
@@ -189,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
189
189
  emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
190
190
  setup(__props, { emit: __emit }) {
191
191
  useCssVars((_ctx) => ({
192
- "a8364442": __props.maxWidth
192
+ "v19879df9": __props.maxWidth
193
193
  }));
194
194
  let animatingZIndex = 0;
195
195
  const emit = __emit;
@@ -404,7 +404,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
404
404
  createVNode(PCloseBtn, {
405
405
  disabled: __props.disabled,
406
406
  class: normalizeClass({ invisible: !__props.enableClose }),
407
- "aria-label": __props.closeLabel,
407
+ "aria-label": __props.closeLabel || _ctx.$t("squirrel.close"),
408
408
  onClick: withModifiers(close, ["prevent"])
409
409
  }, null, 8, ["disabled", "class", "aria-label"])
410
410
  ])
@@ -446,7 +446,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
446
446
  };
447
447
  }
448
448
  });
449
- const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5c370dbc"]]);
449
+ const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f666f5ac"]]);
450
450
  export {
451
451
  pModal as default
452
452
  };
@@ -135,7 +135,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
135
  createElementVNode("div", _hoisted_2, null, 512),
136
136
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (o) => {
137
137
  return openBlock(), createElementBlock("button", {
138
- key: o[_ctx.itemValue],
138
+ key: String(o[_ctx.itemValue]),
139
139
  disabled: o.disabled,
140
140
  class: normalizeClass(["z-10 duration-700", [
141
141
  _ctx.SIZES[_ctx.size],
@@ -1,5 +1,10 @@
1
- import { type VueDatePickerProps } from '@vuepic/vue-datepicker';
2
- type Props = {
1
+ import { type RootProps } from '@vuepic/vue-datepicker';
2
+ type Props = Omit<RootProps, 'modelValue'> & {
3
+ /**
4
+ * The name of the date picker field.
5
+ * Passed to the underlying PInput component.
6
+ */
7
+ name?: string;
3
8
  /**
4
9
  * Text label for the date picker field.
5
10
  * Passed to the underlying PInput component.
@@ -15,42 +20,33 @@ type Props = {
15
20
  * Passed to the underlying PInput component and adds visual indicator.
16
21
  */
17
22
  required?: boolean;
18
- } & VueDatePickerProps;
23
+ };
19
24
  type __VLS_Props = Props;
20
25
  type __VLS_ModelProps = {
21
26
  /**
22
27
  * The selected date value (v-model).
23
- * Supports two-way binding for form inputs.
28
+ * Supports all VueDatePicker model types: Date, Date[], string, TimeModel, etc.
24
29
  */
25
- modelValue?: Date | string | null;
30
+ modelValue?: RootProps['modelValue'];
26
31
  };
27
32
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
28
33
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
- "update:modelValue": (value: string | Date | null) => any;
34
+ "update:modelValue": (value: import("@vuepic/vue-datepicker").ModelValue) => any;
30
35
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
31
- "onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
36
+ "onUpdate:modelValue"?: ((value: import("@vuepic/vue-datepicker").ModelValue) => any) | undefined;
32
37
  }>, {
33
- inline: boolean | {
34
- input?: boolean;
35
- };
38
+ name: string;
39
+ placeholder: string;
36
40
  label: string;
37
41
  required: boolean;
38
42
  errorMsg: string;
39
- enableTimePicker: boolean;
40
- weekStart: "0" | "1" | "2" | "3" | "4" | "5" | "6" | 0 | 1 | 2 | 3 | 4 | 5 | 6;
41
- format: string | ((date: Date) => string) | ((dates: Date[]) => string);
43
+ modelType: string;
42
44
  autoApply: boolean;
43
- textInput: boolean | {
44
- enterSubmit?: boolean;
45
- tabSubmit?: boolean;
46
- openMenu?: "open" | "toggle" | boolean;
47
- rangeSeparator?: string;
48
- selectOnFocus?: boolean;
49
- format?: string | string[] | ((value: string) => Date | null);
50
- escClose?: boolean;
51
- };
52
45
  hideOffsetDates: boolean;
53
- modelType: "timestamp" | "iso" | "format" | string;
46
+ weekStart: string | number;
47
+ formats: Partial<import("@vuepic/vue-datepicker").FormatsConfig> | null;
48
+ timeConfig: Partial<import("@vuepic/vue-datepicker").TimeConfig>;
49
+ textInput: boolean | Partial<import("@vuepic/vue-datepicker").TextInputConfig>;
54
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
55
51
  declare const _default: typeof __VLS_export;
56
52
  export default _default;
@@ -145,7 +145,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
145
145
  beforeClose(): void;
146
146
  closing(): void;
147
147
  closed(): void;
148
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "closed" | "before-open" | "opening" | "opened" | "before-close" | "closing")[], "update:modelValue" | "closed" | "before-open" | "opening" | "opened" | "before-close" | "closing", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
148
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "before-open" | "opening" | "opened" | "before-close" | "closing" | "closed")[], "update:modelValue" | "before-open" | "opening" | "opened" | "before-close" | "closing" | "closed", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
149
149
  /**
150
150
  * Target element to append the drawer to.
151
151
  * Usually 'body' for proper z-index stacking.
@@ -291,8 +291,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
291
291
  disabled: boolean;
292
292
  modelValue: boolean;
293
293
  errorMsg: string;
294
- position: string;
295
294
  appendTo: string;
295
+ position: string;
296
296
  zIndex: number;
297
297
  drawerStyle: Record<string, any>;
298
298
  drawerClass: string;
@@ -1,4 +1,4 @@
1
- import { type VueDatePickerProps } from '@vuepic/vue-datepicker';
1
+ import { type RootProps } from '@vuepic/vue-datepicker';
2
2
  type __VLS_Slots = {
3
3
  /**
4
4
  * Custom label content - overrides the label prop.
@@ -10,7 +10,7 @@ type __VLS_Slots = {
10
10
  labelClasses: string;
11
11
  }) => unknown;
12
12
  };
13
- type Props = {
13
+ type Props = Omit<RootProps, 'modelValue'> & {
14
14
  /**
15
15
  * Text label for the date picker field.
16
16
  * If not provided, you can use the label slot instead.
@@ -26,32 +26,31 @@ type Props = {
26
26
  * Adds required attribute and visual indicator.
27
27
  */
28
28
  required?: boolean;
29
- } & VueDatePickerProps;
29
+ };
30
30
  type __VLS_Props = Props;
31
31
  type __VLS_ModelProps = {
32
32
  /**
33
33
  * The selected date value (v-model).
34
- * Supports two-way binding for form inputs.
34
+ * Supports all VueDatePicker model types: Date, Date[], string, TimeModel, etc.
35
35
  */
36
- modelValue?: Date | string | null;
36
+ modelValue?: RootProps['modelValue'];
37
37
  };
38
38
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
39
39
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
- "update:modelValue": (value: string | Date | null) => any;
40
+ "update:modelValue": (value: import("@vuepic/vue-datepicker").ModelValue) => any;
41
41
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
42
- "onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
42
+ "onUpdate:modelValue"?: ((value: import("@vuepic/vue-datepicker").ModelValue) => any) | undefined;
43
43
  }>, {
44
- inline: boolean | {
45
- input?: boolean;
46
- };
44
+ placeholder: string;
47
45
  label: string;
48
46
  required: boolean;
49
47
  errorMsg: string;
50
- enableTimePicker: boolean;
51
- weekStart: "0" | "1" | "2" | "3" | "4" | "5" | "6" | 0 | 1 | 2 | 3 | 4 | 5 | 6;
48
+ modelType: string;
52
49
  autoApply: boolean;
53
50
  hideOffsetDates: boolean;
54
- modelType: "timestamp" | "iso" | "format" | string;
51
+ weekStart: string | number;
52
+ timeConfig: Partial<import("@vuepic/vue-datepicker").TimeConfig>;
53
+ textInput: boolean | Partial<import("@vuepic/vue-datepicker").TextInputConfig>;
55
54
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
56
55
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
57
56
  declare const _default: typeof __VLS_export;
@@ -188,12 +188,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
188
188
  };
189
189
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
190
190
  "update:modelValue": (value: boolean) => any;
191
- closed: () => any;
192
191
  "before-open": () => any;
193
192
  opening: () => any;
194
193
  opened: () => any;
195
194
  "before-close": () => any;
196
195
  closing: () => any;
196
+ closed: () => any;
197
197
  "click:overlay": (event: MouseEvent) => any;
198
198
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
199
199
  /**
@@ -358,12 +358,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
358
358
  };
359
359
  }>> & Readonly<{
360
360
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
361
- onClosed?: (() => any) | undefined;
362
361
  "onBefore-open"?: (() => any) | undefined;
363
362
  onOpening?: (() => any) | undefined;
364
363
  onOpened?: (() => any) | undefined;
365
364
  "onBefore-close"?: (() => any) | undefined;
366
365
  onClosing?: (() => any) | undefined;
366
+ onClosed?: (() => any) | undefined;
367
367
  "onClick:overlay"?: ((event: MouseEvent) => any) | undefined;
368
368
  }>, {
369
369
  name: string;
@@ -21,8 +21,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
21
21
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
22
22
  "onClick:step"?: ((step: StepItem, index: number) => any) | undefined;
23
23
  }>, {
24
- activeStep: StepItem["value"];
25
24
  steps: readonly StepItem[];
25
+ activeStep: StepItem["value"];
26
26
  clickable: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
@@ -1,6 +1,7 @@
1
1
  import './assets/squirrel.css';
2
2
  export * from './components';
3
3
  export * from './composables';
4
+ export * from './plugin';
4
5
  export * from './tailwind/config';
5
6
  export * from './utils';
6
7
  export * from 'tailwind-variants';
@@ -0,0 +1,11 @@
1
+ import { type Plugin } from 'vue';
2
+ /**
3
+ * Squirrel Vue Plugin for i18n integration.
4
+ *
5
+ * This plugin merges Squirrel's translations with the consumer's existing i18n instance.
6
+ * This ensures there's only one i18n instance and no component/directive conflicts.
7
+ *
8
+ * @param app - Vue application instance
9
+ * @param i18n - The consumer's i18n instance with mergeLocaleMessage support
10
+ */
11
+ export declare const SquirrelPlugin: Plugin;
@@ -0,0 +1,2 @@
1
+ import type { Locale } from 'date-fns';
2
+ export declare const getDateFnsLocale: (localeCode: string) => Locale;