@pequity/squirrel 11.0.1 → 11.0.2

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.
@@ -4,7 +4,7 @@ import { _ as _sfc_main$1 } from "./p-icon.js";
4
4
  import { _ as _sfc_main$2 } from "./p-ring-loader.js";
5
5
  import { isExternalLink } from "../link.js";
6
6
  import { sanitizeUrl } from "../sanitization.js";
7
- import { T } from "./index.js";
7
+ import { t as tv } from "./index.js";
8
8
  const _hoisted_1 = { class: "slot-wrapper empty:hidden" };
9
9
  const btnClasses = {
10
10
  slots: {
@@ -75,7 +75,7 @@ const btnClasses = {
75
75
  size: "md"
76
76
  }
77
77
  };
78
- const btn = T(btnClasses);
78
+ const btn = tv(btnClasses);
79
79
  const BUTTON_TYPES = Object.keys(btnClasses.variants.type);
80
80
  const BUTTON_NATIVE_TYPES = ["button", "submit", "reset"];
81
81
  const LOADER_SIZES = { sm: 24, md: 30, lg: 40 };
@@ -569,6 +569,38 @@ const formatDistance = (token, count, options) => {
569
569
  }
570
570
  return result;
571
571
  };
572
+ const dateFormats = {
573
+ full: "EEEE d MMMM y",
574
+ long: "d MMMM y",
575
+ medium: "d MMM y",
576
+ short: "dd/MM/y"
577
+ };
578
+ const timeFormats = {
579
+ full: "HH:mm:ss zzzz",
580
+ long: "HH:mm:ss z",
581
+ medium: "HH:mm:ss",
582
+ short: "HH:mm"
583
+ };
584
+ const dateTimeFormats = {
585
+ full: "{{date}} 'à' {{time}}",
586
+ long: "{{date}} 'à' {{time}}",
587
+ medium: "{{date}}, {{time}}",
588
+ short: "{{date}}, {{time}}"
589
+ };
590
+ const formatLong = {
591
+ date: buildFormatLongFn({
592
+ formats: dateFormats,
593
+ defaultWidth: "full"
594
+ }),
595
+ time: buildFormatLongFn({
596
+ formats: timeFormats,
597
+ defaultWidth: "full"
598
+ }),
599
+ dateTime: buildFormatLongFn({
600
+ formats: dateTimeFormats,
601
+ defaultWidth: "full"
602
+ })
603
+ };
572
604
  const formatRelativeLocale = {
573
605
  lastWeek: "eeee 'dernier à' p",
574
606
  yesterday: "'hier à' p",
@@ -830,53 +862,20 @@ const match = {
830
862
  defaultParseWidth: "any"
831
863
  })
832
864
  };
833
- const dateFormats = {
834
- full: "EEEE d MMMM y",
835
- long: "d MMMM y",
836
- medium: "d MMM y",
837
- short: "yy-MM-dd"
838
- };
839
- const timeFormats = {
840
- full: "HH:mm:ss zzzz",
841
- long: "HH:mm:ss z",
842
- medium: "HH:mm:ss",
843
- short: "HH:mm"
844
- };
845
- const dateTimeFormats = {
846
- full: "{{date}} 'à' {{time}}",
847
- long: "{{date}} 'à' {{time}}",
848
- medium: "{{date}}, {{time}}",
849
- short: "{{date}}, {{time}}"
850
- };
851
- const formatLong = {
852
- date: buildFormatLongFn({
853
- formats: dateFormats,
854
- defaultWidth: "full"
855
- }),
856
- time: buildFormatLongFn({
857
- formats: timeFormats,
858
- defaultWidth: "full"
859
- }),
860
- dateTime: buildFormatLongFn({
861
- formats: dateTimeFormats,
862
- defaultWidth: "full"
863
- })
864
- };
865
- const frCA = {
866
- code: "fr-CA",
865
+ const fr = {
866
+ code: "fr",
867
867
  formatDistance,
868
868
  formatLong,
869
869
  formatRelative,
870
870
  localize,
871
871
  match,
872
- // Unique for fr-CA
873
872
  options: {
874
- weekStartsOn: 0,
875
- firstWeekContainsDate: 1
873
+ weekStartsOn: 1,
874
+ firstWeekContainsDate: 4
876
875
  }
877
876
  };
878
877
  const localeMap = {
879
- "fr-CA": frCA,
878
+ "fr-FR": fr,
880
879
  "en-US": enUS
881
880
  };
882
881
  const isValidLocaleCode = (code) => code in localeMap;
package/dist/es/index.js CHANGED
@@ -66,7 +66,7 @@ import { toNumberOrNull } from "./number.js";
66
66
  import { isObject } from "./object.js";
67
67
  import { createPagingRange } from "./pagination.js";
68
68
  import { sanitizeUrl } from "./sanitization.js";
69
- import { i, u, C, Q, T } from "./chunks/index.js";
69
+ import { c, a as a2, b, e, d, t } from "./chunks/index.js";
70
70
  const _hoisted_1$3 = ["data-has-error"];
71
71
  const _hoisted_2$3 = ["aria-label"];
72
72
  const _hoisted_3$3 = {
@@ -176,9 +176,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
176
176
  const fileInputRef = shallowRef();
177
177
  const isDraggingOver = ref(false);
178
178
  const toast = useToast();
179
- const { t } = useI18n({ useScope: "global" });
179
+ const { t: t2 } = useI18n({ useScope: "global" });
180
180
  const { labelClasses, errorMsgClasses } = useInputClasses(props);
181
- const fileWord = computed(() => t("squirrel.file_upload_files", props.multiple ? 2 : 1));
181
+ const fileWord = computed(() => t2("squirrel.file_upload_files", props.multiple ? 2 : 1));
182
182
  const files = computed({
183
183
  get() {
184
184
  return Array.isArray(props.modelValue) ? props.modelValue : [props.modelValue];
@@ -199,13 +199,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
199
199
  });
200
200
  const validateFiles = (filesToUpload) => {
201
201
  const res = [];
202
- for (let i2 = 0; i2 < filesToUpload.length; i2++) {
203
- const file = filesToUpload[i2];
202
+ for (let i = 0; i < filesToUpload.length; i++) {
203
+ const file = filesToUpload[i];
204
204
  const fileName = file.name || file.url;
205
205
  if (res.length + files.value.length >= props.maxNumberOfFiles) {
206
206
  if (!(props.multiple && props.maxNumberOfFiles === 1)) {
207
207
  toast.error(
208
- t("squirrel.file_upload_max_files_exceeded", { count: props.maxNumberOfFiles, fileWord: fileWord.value })
208
+ t2("squirrel.file_upload_max_files_exceeded", { count: props.maxNumberOfFiles, fileWord: fileWord.value })
209
209
  );
210
210
  }
211
211
  break;
@@ -222,13 +222,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
222
222
  const extension = getFileExtension(fileName) ? `.${getFileExtension(fileName)}` : "";
223
223
  const isValidExtension = extension ? props.fileTypes.includes(extension) : false;
224
224
  if (!isValidExtension) {
225
- toast.error(t("squirrel.file_upload_files_not_allowed", { extension }));
225
+ toast.error(t2("squirrel.file_upload_files_not_allowed", { extension }));
226
226
  continue;
227
227
  }
228
228
  }
229
229
  if ((file.size || 0) > props.maxSizeInBytes) {
230
230
  toast.error(
231
- t("squirrel.file_upload_file_size_exceeded", { fileName, maxSize: formatBytes(props.maxSizeInBytes) })
231
+ t2("squirrel.file_upload_file_size_exceeded", { fileName, maxSize: formatBytes(props.maxSizeInBytes) })
232
232
  );
233
233
  continue;
234
234
  }
@@ -236,8 +236,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
236
236
  }
237
237
  return res;
238
238
  };
239
- const uploadFile = (e) => {
240
- const f = e.target?.files || e.dataTransfer?.files;
239
+ const uploadFile = (e2) => {
240
+ const f = e2.target?.files || e2.dataTransfer?.files;
241
241
  if (!f) {
242
242
  return;
243
243
  }
@@ -245,8 +245,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
245
245
  files.value = props.multiple ? [...files.value, ...validatedFiles] : validatedFiles;
246
246
  emit("file-added", validatedFiles);
247
247
  };
248
- const changeFieldValue = (e) => {
249
- uploadFile(e);
248
+ const changeFieldValue = (e2) => {
249
+ uploadFile(e2);
250
250
  if (fileInputRef.value) {
251
251
  fileInputRef.value.value = "";
252
252
  }
@@ -258,9 +258,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
258
258
  emit("file-removed", removedFile);
259
259
  }
260
260
  };
261
- const onDrop = (e) => {
261
+ const onDrop = (e2) => {
262
262
  isDraggingOver.value = false;
263
- changeFieldValue(e);
263
+ changeFieldValue(e2);
264
264
  };
265
265
  const openFileDialog = () => {
266
266
  if (fileInputRef.value) {
@@ -783,20 +783,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
783
783
  ths.value[index] = el;
784
784
  }
785
785
  };
786
- const emitScroll = (e) => {
787
- emit("scroll", e);
786
+ const emitScroll = (e2) => {
787
+ emit("scroll", e2);
788
788
  };
789
- const thDivClasses = (i2) => {
789
+ const thDivClasses = (i) => {
790
790
  const res = ["relative", "py-2"];
791
791
  res.push("border-b border-p-gray-30");
792
- if (i2 === 0 && props.isFirstColFixed || i2 === props.cols.length - 1 && props.isLastColFixed) {
792
+ if (i === 0 && props.isFirstColFixed || i === props.cols.length - 1 && props.isLastColFixed) {
793
793
  res.push("th-shadow px-4");
794
794
  } else {
795
795
  !props.colsResizable ? res.push("px-2") : res.push("pl-2 pr-4");
796
796
  }
797
797
  return res;
798
798
  };
799
- const thSubheaderClasses = (i2) => {
799
+ const thSubheaderClasses = (i) => {
800
800
  const res = [
801
801
  "flex",
802
802
  "h-6",
@@ -809,7 +809,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
809
809
  "font-medium",
810
810
  "text-p-gray-40"
811
811
  ];
812
- if (i2 === 0 && props.isFirstColFixed || i2 === props.cols.length - 1 && props.isLastColFixed) {
812
+ if (i === 0 && props.isFirstColFixed || i === props.cols.length - 1 && props.isLastColFixed) {
813
813
  res.push("th-shadow");
814
814
  }
815
815
  return res;
@@ -868,10 +868,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
868
868
  ref: theadRef
869
869
  }, [
870
870
  createElementVNode("tr", null, [
871
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col, i2) => {
871
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col, i) => {
872
872
  return openBlock(), createElementBlock("th", mergeProps({
873
873
  ref_for: true,
874
- ref: (el) => updateThsRefs(el, i2),
874
+ ref: (el) => updateThsRefs(el, i),
875
875
  key: col.id,
876
876
  "data-col-id": col.id
877
877
  }, { ref_for: true }, col.thAttrs, {
@@ -879,7 +879,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
879
879
  class: "bg-surface"
880
880
  }), [
881
881
  createElementVNode("div", {
882
- class: normalizeClass(thDivClasses(i2)),
882
+ class: normalizeClass(thDivClasses(i)),
883
883
  style: normalizeStyle(bgColorStyle(col))
884
884
  }, [
885
885
  createElementVNode("div", {
@@ -893,7 +893,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
893
893
  "tooltip-text": col.tooltip,
894
894
  class: [
895
895
  unref(hasWrap) ? "leading-4" : "leading-5",
896
- { "pl-2": i2 === 1 && __props.isFirstColFixed, "pr-2": i2 === __props.cols.length && __props.isLastColFixed },
896
+ { "pl-2": i === 1 && __props.isFirstColFixed, "pr-2": i === __props.cols.length && __props.isLastColFixed },
897
897
  "grow"
898
898
  ],
899
899
  "text-color": headerCellTextColor(col)
@@ -906,17 +906,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
906
906
  _: 2
907
907
  }, 1040, ["text", "filter-active", "show-filter-icon", "tooltip-text", "class", "text-color", "onClickFilterIcon"])
908
908
  ], 2),
909
- __props.colsResizable && i2 !== 0 && !(i2 === __props.cols.length - 1 && __props.isLastColFixed) ? (openBlock(), createElementBlock("div", {
909
+ __props.colsResizable && i !== 0 && !(i === __props.cols.length - 1 && __props.isLastColFixed) ? (openBlock(), createElementBlock("div", {
910
910
  key: 0,
911
- class: normalizeClass(["absolute right-0 top-1/2 z-110 h-5 w-2 -translate-y-1/2 cursor-col-resize after:absolute after:bottom-0 after:z-110 after:block after:h-full after:w-2 after:cursor-col-resize after:border-r-2 after:border-dashed after:border-p-gray-30", i2 === __props.cols.length - 1 ? "after:right-0.5" : "after:right-0"]),
911
+ class: normalizeClass(["absolute right-0 top-1/2 z-110 h-5 w-2 -translate-y-1/2 cursor-col-resize after:absolute after:bottom-0 after:z-110 after:block after:h-full after:w-2 after:cursor-col-resize after:border-r-2 after:border-dashed after:border-p-gray-30", i === __props.cols.length - 1 ? "after:right-0.5" : "after:right-0"]),
912
912
  "data-resize-handle": "",
913
- onMousedown: ($event) => unref(colResizeStart)($event, i2),
914
- onDblclick: ($event) => unref(colResizeFitToData)(i2)
913
+ onMousedown: ($event) => unref(colResizeStart)($event, i),
914
+ onDblclick: ($event) => unref(colResizeFitToData)(i)
915
915
  }, null, 42, _hoisted_2$1)) : createCommentVNode("", true)
916
916
  ], 6),
917
917
  __props.subheader ? (openBlock(), createElementBlock("div", {
918
918
  key: 0,
919
- class: normalizeClass(thSubheaderClasses(i2))
919
+ class: normalizeClass(thSubheaderClasses(i))
920
920
  }, [
921
921
  renderSlot(_ctx.$slots, `subheader-cell-${unref(kebabCase)(col.name)}`, {}, void 0, true)
922
922
  ], 2)) : createCommentVNode("", true)
@@ -1060,12 +1060,12 @@ const enUS = {
1060
1060
  squirrel: squirrel$1
1061
1061
  };
1062
1062
  const squirrel = { "close": "Fermer", "action_bar_clear_all": "Effacer tout", "select_list_items": "{count} élément | {count} éléments", "select_list_select_all": "Tout sélectionner", "select_list_select_all_filtered": "Sélectionner tout (filtré)", "select_list_clear_all": "Effacer tout", "select_list_no_items_found": "Aucun élément trouvé", "dropdown_select_aria_label": "Liste déroulante", "dropdown_select_remove_item": "Supprimer l'élément", "dropdown_select_clear_selection": "Effacer la sélection", "dropdown_select_all_options_selected": "Toutes les options sélectionnées", "dropdown_select_options": "option | options", "dropdown_select_selected": "sélectionné", "dropdown_select_items": "@:squirrel.select_list_items", "dropdown_select_select_all": "@:squirrel.select_list_select_all", "dropdown_select_select_all_filtered": "@:squirrel.select_list_select_all_filtered", "dropdown_select_clear_all": "@:squirrel.select_list_clear_all", "dropdown_select_add": "Ajouter", "dropdown_select_no_items_found_type_to_add": "Aucun élément trouvé. Tapez pour ajouter", "dropdown_select_no_items_found": "@:squirrel.select_list_no_items_found", "file_upload_dropzone": "zone de dépôt", "file_upload_drag_or_select": "Glisser ou {select}", "file_upload_drop": "Déposer {fileWord}", "file_upload_max": "Max {count}", "file_upload_one": "Un", "file_upload_files": "fichier | fichiers", "file_upload_select": "sélectionner {fileWord}", "file_upload_with_size_less_than": "avec une taille inférieure à {maxSize} | avec une taille inférieure à {maxSize} chacun", "file_upload_max_files_exceeded": "Vous ne pouvez télécharger qu'un maximum de {count} {fileWord}.", "file_upload_files_not_allowed": "Les fichiers {extension} ne sont pas autorisés.", "file_upload_file_size_exceeded": "La taille du fichier {fileName} dépasse {maxSize}.", "input_search_press_enter_to_search": "Appuyez sur Entrée pour rechercher", "input_search_clear_search_input": "Effacer la saisie de recherche", "pagination_go_to_previous_page": "aller à la page précédente", "pagination_go_to_page": "aller à la page {page}", "pagination_go_to_next_page": "aller à la page suivante", "pagination_info_showing_results": "Affichage de {from} à {to} sur {count} résultats", "pagination_info_no_results_found": "Aucun résultat trouvé", "table_sort_sort": "TRIER", "table_sort_clear": "Effacer", "table_sort_sort_ascending": "Trier par ordre croissant", "table_sort_sort_descending": "Trier par ordre décroissant", "tabs_pills_aria_label": "Onglets pilules" };
1063
- const frCA = {
1063
+ const frFR = {
1064
1064
  squirrel
1065
1065
  };
1066
1066
  const squirrelMessages = {
1067
1067
  "en-US": enUS,
1068
- "fr-CA": frCA
1068
+ "fr-FR": frFR
1069
1069
  };
1070
1070
  const isSquirrelLocale = (locale) => {
1071
1071
  return locale in squirrelMessages;
@@ -1137,12 +1137,13 @@ export {
1137
1137
  S as SIZES,
1138
1138
  SORTING_TYPES,
1139
1139
  SquirrelPlugin,
1140
- i as cn,
1141
- u as cnBase,
1140
+ c as cn,
1141
+ a2 as cnMerge,
1142
1142
  colsInjectionKey,
1143
1143
  createPagingRange,
1144
- C as createTV,
1145
- Q as defaultConfig,
1144
+ b as createTV,
1145
+ e as cx,
1146
+ d as defaultConfig,
1146
1147
  getNextActiveElement,
1147
1148
  isColsResizableInjectionKey,
1148
1149
  isElement,
@@ -1156,7 +1157,7 @@ export {
1156
1157
  squirrelTailwindConfig,
1157
1158
  toNumberOrNull,
1158
1159
  toString,
1159
- T as tv,
1160
+ t as tv,
1160
1161
  useInputClasses,
1161
1162
  usePLoading,
1162
1163
  usePModal,
@@ -1,5 +1,5 @@
1
- import { T } from "./chunks/index.js";
2
- const inputClasses = T({
1
+ import { t as tv } from "./chunks/index.js";
2
+ const inputClasses = tv({
3
3
  slots: {
4
4
  input: "w-full rounded border-0 bg-surface text-night ring-1 ring-inset ring-p-gray-30 placeholder:text-p-gray-40 hover:ring-primary focus:outline-none focus:ring-2 focus:ring-primary disabled:cursor-default disabled:bg-p-blue-10 disabled:ring-p-gray-30 disabled:hover:ring-p-gray-30",
5
5
  label: "mb-1 block font-medium",
@@ -90,7 +90,7 @@ const inputClasses = T({
90
90
  size: "md"
91
91
  }
92
92
  });
93
- const textareaClasses = T({
93
+ const textareaClasses = tv({
94
94
  extend: inputClasses,
95
95
  slots: {
96
96
  input: "resize-y overflow-auto"
@@ -109,7 +109,7 @@ const textareaClasses = T({
109
109
  }
110
110
  }
111
111
  });
112
- const selectClasses = T({
112
+ const selectClasses = tv({
113
113
  extend: inputClasses,
114
114
  slots: {
115
115
  input: "squirrel-bg-chevron-down appearance-none truncate bg-no-repeat"
@@ -1,9 +1,9 @@
1
1
  import { type RouterLinkProps } from 'vue-router';
2
- declare var __VLS_1: {}, __VLS_9: {};
2
+ declare var __VLS_1: {}, __VLS_10: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  } & {
6
- default?: (props: typeof __VLS_9) => any;
6
+ default?: (props: typeof __VLS_10) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<RouterLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouterLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,6 +1,6 @@
1
- declare var __VLS_6: {};
1
+ declare var __VLS_7: {};
2
2
  type __VLS_Slots = {} & {
3
- 'no-results'?: (props: typeof __VLS_6) => any;
3
+ 'no-results'?: (props: typeof __VLS_7) => any;
4
4
  };
5
5
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
6
  /**
@@ -48,7 +48,9 @@ declare const __VLS_export: <T extends Record<string, unknown>>(__VLS_props: Non
48
48
  onScroll?: ((val: Event) => any) | undefined;
49
49
  "onCol-resize"?: ((colIndex: number, width: number) => any) | undefined;
50
50
  "onClick-filter-icon"?: ((val: Event, col: any) => any) | undefined;
51
- }> & import("vue").PublicProps;
51
+ }> & import("vue").PublicProps & (typeof globalThis extends {
52
+ __VLS_PROPS_FALLBACK: infer P;
53
+ } ? P : {});
52
54
  expose: (exposed: import("vue").ShallowUnwrapRef<{
53
55
  tbodyElement: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
54
56
  }>) => void;
@@ -6,9 +6,9 @@ type Props = {
6
6
  tooltipText?: string;
7
7
  textColor?: string;
8
8
  };
9
- declare var __VLS_5: {};
9
+ declare var __VLS_6: {};
10
10
  type __VLS_Slots = {} & {
11
- icon?: (props: typeof __VLS_5) => any;
11
+ icon?: (props: typeof __VLS_6) => any;
12
12
  };
13
13
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
14
  "click-filter-icon": (event: Event, filterActive: boolean) => any;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@pequity/squirrel",
3
3
  "description": "Squirrel component library",
4
- "version": "11.0.1",
5
- "packageManager": "pnpm@10.22.0",
4
+ "version": "11.0.2",
5
+ "packageManager": "pnpm@10.23.0",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "preinstall": "npx only-allow pnpm",
@@ -56,31 +56,31 @@
56
56
  "@playwright/test": "^1.56.1",
57
57
  "@semantic-release/changelog": "^6.0.3",
58
58
  "@semantic-release/git": "^10.0.1",
59
- "@storybook/addon-a11y": "^10.0.7",
60
- "@storybook/addon-docs": "^10.0.7",
61
- "@storybook/addon-links": "^10.0.7",
62
- "@storybook/addon-vitest": "^10.0.7",
63
- "@storybook/vue3-vite": "^10.0.7",
59
+ "@storybook/addon-a11y": "^10.0.8",
60
+ "@storybook/addon-docs": "^10.0.8",
61
+ "@storybook/addon-links": "^10.0.8",
62
+ "@storybook/addon-vitest": "^10.0.8",
63
+ "@storybook/vue3-vite": "^10.0.8",
64
64
  "@tanstack/vue-virtual": "3.13.12",
65
65
  "@types/jsdom": "^27.0.0",
66
66
  "@types/lodash-es": "^4.17.12",
67
67
  "@types/node": "^24.10.1",
68
- "@vitejs/plugin-vue": "^6.0.1",
69
- "@vitest/browser": "4.0.8",
70
- "@vitest/browser-playwright": "^4.0.8",
71
- "@vitest/coverage-v8": "^4.0.8",
72
- "@vue/compiler-sfc": "3.5.24",
68
+ "@vitejs/plugin-vue": "^6.0.2",
69
+ "@vitest/browser": "4.0.13",
70
+ "@vitest/browser-playwright": "^4.0.13",
71
+ "@vitest/coverage-v8": "^4.0.13",
72
+ "@vue/compiler-sfc": "3.5.25",
73
73
  "@vue/test-utils": "^2.4.6",
74
- "@vuepic/vue-datepicker": "12.0.3",
74
+ "@vuepic/vue-datepicker": "12.0.5",
75
75
  "autoprefixer": "^10.4.22",
76
76
  "eslint": "^9.39.1",
77
- "eslint-plugin-storybook": "^10.0.7",
77
+ "eslint-plugin-storybook": "^10.0.8",
78
78
  "floating-vue": "5.2.2",
79
- "glob": "^11.0.3",
79
+ "glob": "^13.0.0",
80
80
  "husky": "^9.1.7",
81
81
  "iconify-icon": "^3.0.2",
82
82
  "jsdom": "^27.2.0",
83
- "lint-staged": "^16.2.6",
83
+ "lint-staged": "^16.2.7",
84
84
  "lodash-es": "4.17.21",
85
85
  "make-coverage-badge": "^1.2.0",
86
86
  "playwright": "^1.56.1",
@@ -88,25 +88,25 @@
88
88
  "prettier": "^3.6.2",
89
89
  "prettier-plugin-tailwindcss": "^0.7.1",
90
90
  "resolve-tspaths": "^0.8.23",
91
- "rimraf": "^6.1.0",
92
- "sass": "^1.94.0",
91
+ "rimraf": "^6.1.2",
92
+ "sass": "^1.94.2",
93
93
  "semantic-release": "^25.0.2",
94
- "storybook": "^10.0.7",
94
+ "storybook": "^10.0.8",
95
95
  "svgo": "^4.0.0",
96
96
  "tailwindcss": "^3.4.17",
97
97
  "typescript": "5.9.3",
98
- "vite": "^7.2.2",
99
- "vitest": "^4.0.8",
100
- "vue": "3.5.24",
98
+ "vite": "^7.2.4",
99
+ "vitest": "^4.0.13",
100
+ "vue": "3.5.25",
101
101
  "vue-currency-input": "3.2.1",
102
- "vue-i18n": "^11.1.12",
102
+ "vue-i18n": "^11.2.1",
103
103
  "vue-router": "4.6.3",
104
104
  "vue-toastification": "2.0.0-rc.5",
105
- "vue-tsc": "3.1.3"
105
+ "vue-tsc": "3.1.5"
106
106
  },
107
107
  "dependencies": {
108
108
  "date-fns": "^4.1.0",
109
109
  "tailwind-merge": "^3.4.0",
110
- "tailwind-variants": "^3.1.1"
110
+ "tailwind-variants": "^3.2.2"
111
111
  }
112
112
  }
@@ -1,5 +1,5 @@
1
1
  import enUS from '@squirrel/locales/en-US.json';
2
- import frCA from '@squirrel/locales/fr-CA.json';
2
+ import frFR from '@squirrel/locales/fr-FR.json';
3
3
  import { SquirrelPlugin } from '@squirrel/plugin/index';
4
4
  import { type App, createApp, nextTick, ref } from 'vue';
5
5
 
@@ -56,12 +56,12 @@ describe('SquirrelPlugin', () => {
56
56
  });
57
57
 
58
58
  it('should merge fr-CA messages when locale is fr-CA', async () => {
59
- mockI18n = createMockI18n('fr-CA', { 'fr-CA': {} });
59
+ mockI18n = createMockI18n('fr-FR', { 'fr-FR': {} });
60
60
  app.use(SquirrelPlugin, mockI18n);
61
61
 
62
62
  await nextTick();
63
63
 
64
- expect(mockI18n.global.mergeLocaleMessage).toHaveBeenCalledWith('fr-CA', frCA);
64
+ expect(mockI18n.global.mergeLocaleMessage).toHaveBeenCalledWith('fr-FR', frFR);
65
65
  });
66
66
 
67
67
  it('should not merge messages for unsupported locales', async () => {
@@ -86,7 +86,7 @@ describe('SquirrelPlugin', () => {
86
86
 
87
87
  it('should react to locale changes', async () => {
88
88
  // Only have en-US available initially, so watcher doesn't get unwatched
89
- mockI18n = createMockI18n('en-US', { 'en-US': {}, 'fr-CA': {} });
89
+ mockI18n = createMockI18n('en-US', { 'en-US': {}, 'fr-FR': {} });
90
90
  mockI18n.global.availableLocales = ['en-US']; // Only one locale available
91
91
  app.use(SquirrelPlugin, mockI18n);
92
92
 
@@ -97,17 +97,17 @@ describe('SquirrelPlugin', () => {
97
97
  mockI18n.global.mergeLocaleMessage.mockClear();
98
98
 
99
99
  // Add fr-CA to available locales and change to it
100
- mockI18n.global.availableLocales.push('fr-CA');
101
- mockI18n.global.locale.value = 'fr-CA';
100
+ mockI18n.global.availableLocales.push('fr-FR');
101
+ mockI18n.global.locale.value = 'fr-FR';
102
102
  await nextTick();
103
103
 
104
- expect(mockI18n.global.mergeLocaleMessage).toHaveBeenCalledWith('fr-CA', frCA);
104
+ expect(mockI18n.global.mergeLocaleMessage).toHaveBeenCalledWith('fr-FR', frFR);
105
105
  });
106
106
 
107
107
  it('should stop watching when all Squirrel locales are available', async () => {
108
108
  // Create mock with both locales available initially
109
- mockI18n = createMockI18n('en-US', { 'en-US': {}, 'fr-CA': {} });
110
- mockI18n.global.availableLocales = ['en-US', 'fr-CA'];
109
+ mockI18n = createMockI18n('en-US', { 'en-US': {}, 'fr-FR': {} });
110
+ mockI18n.global.availableLocales = ['en-US', 'fr-FR'];
111
111
 
112
112
  app.use(SquirrelPlugin, mockI18n);
113
113
 
@@ -120,7 +120,7 @@ describe('SquirrelPlugin', () => {
120
120
  mockI18n.global.mergeLocaleMessage.mockClear();
121
121
 
122
122
  // Change locale after unwatching should not trigger more merges
123
- mockI18n.global.locale.value = 'fr-CA';
123
+ mockI18n.global.locale.value = 'fr-FR';
124
124
  await nextTick();
125
125
 
126
126
  // Should not merge again since watcher was stopped
@@ -1,5 +1,5 @@
1
1
  import enUS from '@squirrel/locales/en-US.json';
2
- import frCA from '@squirrel/locales/fr-CA.json';
2
+ import frFR from '@squirrel/locales/fr-FR.json';
3
3
  import { type App, nextTick, type Plugin, watchEffect } from 'vue';
4
4
 
5
5
  type I18nInstance = {
@@ -13,7 +13,7 @@ type I18nInstance = {
13
13
 
14
14
  const squirrelMessages = {
15
15
  'en-US': enUS,
16
- 'fr-CA': frCA,
16
+ 'fr-FR': frFR,
17
17
  } as const;
18
18
 
19
19
  type SquirrelLocale = keyof typeof squirrelMessages;
@@ -1,20 +1,20 @@
1
1
  import { getDateFnsLocale } from '@squirrel/utils/dateLocale';
2
- import { enUS, frCA } from 'date-fns/locale';
2
+ import { enUS, fr } from 'date-fns/locale';
3
3
 
4
4
  describe('getDateFnsLocale', () => {
5
5
  it('should return correct locale for valid codes', () => {
6
- expect(getDateFnsLocale('fr-CA')).toBe(frCA);
6
+ expect(getDateFnsLocale('fr-FR')).toBe(fr);
7
7
  expect(getDateFnsLocale('en-US')).toBe(enUS);
8
8
  });
9
9
 
10
10
  it('should return enUS as fallback for invalid locale codes', () => {
11
- expect(getDateFnsLocale('fr-FR')).toBe(enUS);
11
+ expect(getDateFnsLocale('fr-CA')).toBe(enUS);
12
12
  expect(getDateFnsLocale('invalid')).toBe(enUS);
13
13
  expect(getDateFnsLocale('')).toBe(enUS);
14
14
  });
15
15
 
16
16
  it('should be case-sensitive', () => {
17
- expect(getDateFnsLocale('FR-CA')).toBe(enUS);
18
- expect(getDateFnsLocale('fr-ca')).toBe(enUS);
17
+ expect(getDateFnsLocale('FR-FR')).toBe(enUS);
18
+ expect(getDateFnsLocale('fr-fr')).toBe(enUS);
19
19
  });
20
20
  });
@@ -1,15 +1,15 @@
1
1
  import type { Locale } from 'date-fns';
2
2
  import { enUS } from 'date-fns/locale/en-US';
3
- import { frCA } from 'date-fns/locale/fr-CA';
3
+ import { fr } from 'date-fns/locale/fr';
4
4
 
5
5
  /**
6
6
  * Maps vue-i18n locale codes to date-fns Locale objects.
7
7
  *
8
- * @param localeCode - The locale code from vue-i18n (e.g., 'en-US', 'fr-CA')
8
+ * @param localeCode - The locale code from vue-i18n (e.g., 'en-US', 'fr-FR')
9
9
  * @returns The corresponding date-fns Locale object
10
10
  */
11
11
  const localeMap = {
12
- 'fr-CA': frCA,
12
+ 'fr-FR': fr,
13
13
  'en-US': enUS,
14
14
  } as const;
15
15
 
File without changes