@enos5/enos-vue-default 1.8.2 → 1.8.4

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/README.md CHANGED
@@ -54,6 +54,10 @@ Or import individual components:
54
54
  import { Button, ColorPicker, TextInput } from '@enos5/enos-vue-default'
55
55
  ```
56
56
 
57
+ `ColorPicker` resolves its built-in UI labels through `vue-i18n` using the English copy as keys. If your app wants localized picker chrome, define translations for keys such as `Color`, `Selected color`, `Pick color from screen`, `Hue`, `Opacity`, `Hex value`, `Saturation and brightness for {color}`, and `Rainbow color area for {color}`.
58
+
59
+ `DateInput` and `DateRangeInput` default to English locale behavior. Pass `locale` to override that, and for native browser date fields remember the final picker UI is still browser-controlled, with `lang` used as the locale hint.
60
+
57
61
  Styles are loaded automatically when you import the package entrypoint, so consumers do not have to remember a separate CSS import.
58
62
 
59
63
  If a consuming app wants earlier stylesheet loading during `npm run dev`, it can opt into the stable stylesheet entry explicitly:
@@ -5,6 +5,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
5
5
  type: (StringConstructor | NumberConstructor | null)[];
6
6
  default: string;
7
7
  };
8
+ locale: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
8
12
  withTimestamp: {
9
13
  type: BooleanConstructor;
10
14
  default: boolean;
@@ -26,6 +30,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
26
30
  type: (StringConstructor | NumberConstructor | null)[];
27
31
  default: string;
28
32
  };
33
+ locale: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
29
37
  withTimestamp: {
30
38
  type: BooleanConstructor;
31
39
  default: boolean;
@@ -44,5 +52,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
44
52
  disabled: boolean;
45
53
  modelValue: string | number | null;
46
54
  disabledClass: string;
55
+ locale: string;
47
56
  withTimestamp: boolean;
48
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -98,9 +98,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
98
98
  modelValue: Record<string, any>;
99
99
  disabledClass: string;
100
100
  placeholder: string;
101
+ locale: string;
101
102
  max: string;
102
103
  min: string;
103
104
  minDays: number;
104
105
  maxDays: number;
105
- locale: string;
106
106
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -395,12 +395,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
395
395
  optionClass: string | unknown[] | Record<string, any>;
396
396
  deletedOptionClass: string | unknown[] | Record<string, any>;
397
397
  placeholderClass: string | unknown[] | Record<string, any>;
398
+ locale: string;
398
399
  withTimestamp: boolean;
399
400
  max: string;
400
401
  min: string;
401
402
  minDays: number;
402
403
  maxDays: number;
403
- locale: string;
404
404
  currentImageUrl: string;
405
405
  accept: string;
406
406
  currentLabel: string;
@@ -419,6 +419,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
419
419
  allowAlpha: boolean;
420
420
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
421
421
  type __VLS_Slots = {
422
+ label?: ((props: {
423
+ label: string;
424
+ for: string | undefined;
425
+ }) => any) | undefined;
426
+ } & {
422
427
  'unsupported-type'?: ((props: {
423
428
  type: string;
424
429
  modelValue: string | number | boolean | unknown[] | null;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './styles.css';
2
- import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-DYTVm2W1.js";
2
+ import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-CG0XGuww.js";
3
3
  export {
4
4
  _ as ActionCard,
5
5
  a as ActionMessage,
@@ -1,4 +1,4 @@
1
- import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-DYTVm2W1.js";
1
+ import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-CG0XGuww.js";
2
2
  export {
3
3
  _ as ActionCard,
4
4
  a as ActionMessage,
@@ -1,6 +1,7 @@
1
1
  import { ref, computed, watch, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, normalizeStyle, toDisplayString, createBlock, createCommentVNode, renderSlot, createVNode, Transition, withCtx, mergeProps, useSlots, unref, withDirectives, vShow, useAttrs, vModelCheckbox, onMounted, nextTick, onBeforeUnmount, Teleport, withModifiers, onUnmounted, inject, provide, defineComponent, isVNode, cloneVNode, resolveDynamicComponent, createTextVNode, h, vModelText, createSlots } from "vue";
2
2
  import { LockClosedIcon, ChevronDownIcon, PhotoIcon, EyeDropperIcon, ExclamationCircleIcon, ExclamationTriangleIcon, ChevronUpIcon, MagnifyingGlassIcon, CheckIcon, PencilSquareIcon } from "@heroicons/vue/24/outline";
3
3
  import Editor from "@tinymce/tinymce-vue";
4
+ import { useI18n } from "vue-i18n";
4
5
  import { Link } from "@inertiajs/vue3";
5
6
  const _hoisted_1$E = { class: "border-b border-neutral-200 bg-neutral-50/80 p-2 dark:border-neutral-800 dark:bg-neutral-900/80" };
6
7
  const _hoisted_2$o = {
@@ -1334,7 +1335,7 @@ const _sfc_main$F = {
1334
1335
  };
1335
1336
  }
1336
1337
  };
1337
- const _hoisted_1$s = ["type", "max", "value", "disabled"];
1338
+ const _hoisted_1$s = ["type", "lang", "max", "value", "disabled"];
1338
1339
  const _sfc_main$E = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1339
1340
  __name: "DateInput",
1340
1341
  props: {
@@ -1342,6 +1343,10 @@ const _sfc_main$E = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1342
1343
  type: [String, Number, null],
1343
1344
  default: ""
1344
1345
  },
1346
+ locale: {
1347
+ type: String,
1348
+ default: "en"
1349
+ },
1345
1350
  withTimestamp: {
1346
1351
  type: Boolean,
1347
1352
  default: false
@@ -1363,6 +1368,10 @@ const _sfc_main$E = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1363
1368
  const input = ref(null);
1364
1369
  const inputType = computed(() => props.withTimestamp ? "datetime-local" : "date");
1365
1370
  const normalizedValue = computed(() => props.modelValue ?? "");
1371
+ const inputLang = computed(() => {
1372
+ const lang = attrs.lang;
1373
+ return typeof lang === "string" && lang !== "" ? lang : props.locale;
1374
+ });
1366
1375
  const cappedMax = computed(() => {
1367
1376
  const limit = props.withTimestamp ? "9999-12-31T23:59" : "9999-12-31";
1368
1377
  const incoming = attrs.max;
@@ -1372,7 +1381,7 @@ const _sfc_main$E = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1372
1381
  return incoming > limit ? limit : incoming;
1373
1382
  });
1374
1383
  const inputAttrs = computed(() => {
1375
- const { class: _class, type: _type, ...rest } = attrs;
1384
+ const { class: _class, type: _type, lang: _lang, ...rest } = attrs;
1376
1385
  return rest;
1377
1386
  });
1378
1387
  const inputClasses = computed(() => [
@@ -1409,6 +1418,7 @@ const _sfc_main$E = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1409
1418
  ref: input
1410
1419
  }, inputAttrs.value, {
1411
1420
  type: inputType.value,
1421
+ lang: inputLang.value,
1412
1422
  max: cappedMax.value,
1413
1423
  class: [inputClasses.value, props.disabled ? props.disabledClass : null],
1414
1424
  value: normalizedValue.value,
@@ -1419,7 +1429,7 @@ const _sfc_main$E = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1419
1429
  };
1420
1430
  }
1421
1431
  });
1422
- const DateInput = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-35dd480a"]]);
1432
+ const DateInput = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-c8cee934"]]);
1423
1433
  const _hoisted_1$r = { class: "relative" };
1424
1434
  const _hoisted_2$i = {
1425
1435
  key: 0,
@@ -1479,7 +1489,7 @@ const _sfc_main$D = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1479
1489
  },
1480
1490
  locale: {
1481
1491
  type: String,
1482
- default: "fr-CA"
1492
+ default: "en"
1483
1493
  }
1484
1494
  },
1485
1495
  emits: ["update:modelValue"],
@@ -1822,7 +1832,7 @@ const _sfc_main$D = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1822
1832
  };
1823
1833
  }
1824
1834
  });
1825
- const DateRangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-60a85ab0"]]);
1835
+ const DateRangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-5c96a933"]]);
1826
1836
  const _hoisted_1$q = { class: "relative" };
1827
1837
  const _hoisted_2$h = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" };
1828
1838
  const _hoisted_3$b = ["accept"];
@@ -2266,41 +2276,43 @@ const _hoisted_2$e = ["name", "value", "disabled", "required"];
2266
2276
  const _hoisted_3$a = ["disabled", "aria-expanded"];
2267
2277
  const _hoisted_4$7 = { class: "color-picker-checker relative inline-flex size-10 shrink-0 overflow-hidden rounded-lg border border-neutral-200 dark:border-neutral-700" };
2268
2278
  const _hoisted_5$5 = { class: "min-w-0 flex-1" };
2269
- const _hoisted_6$5 = { class: "block truncate font-mono text-sm text-neutral-900 dark:text-neutral-50" };
2270
- const _hoisted_7$5 = { class: "rounded-2xl border border-neutral-200 bg-white/96 p-4 shadow-2xl shadow-neutral-950/12 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/96 dark:shadow-black/30" };
2271
- const _hoisted_8$3 = { class: "flex items-start gap-3" };
2272
- const _hoisted_9$3 = { class: "color-picker-checker relative size-14 shrink-0 overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700" };
2273
- const _hoisted_10$3 = { class: "min-w-0 flex-1" };
2274
- const _hoisted_11$3 = { class: "truncate font-mono text-base text-neutral-900 dark:text-neutral-50" };
2275
- const _hoisted_12$2 = ["disabled"];
2276
- const _hoisted_13$2 = { class: "mt-4 space-y-4" };
2277
- const _hoisted_14$2 = ["aria-label", "aria-valuenow"];
2278
- const _hoisted_15$2 = {
2279
+ const _hoisted_6$5 = { class: "block text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400" };
2280
+ const _hoisted_7$5 = { class: "block truncate font-mono text-sm text-neutral-900 dark:text-neutral-50" };
2281
+ const _hoisted_8$3 = { class: "rounded-2xl border border-neutral-200 bg-white/96 p-4 shadow-2xl shadow-neutral-950/12 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/96 dark:shadow-black/30" };
2282
+ const _hoisted_9$3 = { class: "flex items-start gap-3" };
2283
+ const _hoisted_10$3 = { class: "color-picker-checker relative size-14 shrink-0 overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700" };
2284
+ const _hoisted_11$3 = { class: "min-w-0 flex-1" };
2285
+ const _hoisted_12$2 = { class: "text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400" };
2286
+ const _hoisted_13$2 = { class: "truncate font-mono text-base text-neutral-900 dark:text-neutral-50" };
2287
+ const _hoisted_14$2 = ["disabled", "aria-label"];
2288
+ const _hoisted_15$2 = { class: "mt-4 space-y-4" };
2289
+ const _hoisted_16$1 = ["aria-label", "aria-valuenow"];
2290
+ const _hoisted_17$1 = {
2279
2291
  key: 0,
2280
2292
  class: "absolute inset-0 bg-[linear-gradient(to_right,#fff,transparent)]"
2281
2293
  };
2282
- const _hoisted_16$1 = {
2294
+ const _hoisted_18$1 = {
2283
2295
  key: 2,
2284
2296
  class: "absolute inset-0 bg-[linear-gradient(to_top,#000,transparent)]"
2285
2297
  };
2286
- const _hoisted_17$1 = { class: "space-y-3" };
2287
- const _hoisted_18$1 = {
2298
+ const _hoisted_19 = { class: "space-y-3" };
2299
+ const _hoisted_20 = {
2288
2300
  key: 0,
2289
2301
  class: "space-y-2"
2290
2302
  };
2291
- const _hoisted_19 = { class: "flex items-center justify-between text-xs font-medium text-neutral-500 dark:text-neutral-400" };
2292
- const _hoisted_20 = ["for"];
2293
- const _hoisted_21 = ["id", "disabled", "value"];
2294
- const _hoisted_22 = {
2303
+ const _hoisted_21 = { class: "flex items-center justify-between text-xs font-medium text-neutral-500 dark:text-neutral-400" };
2304
+ const _hoisted_22 = ["for"];
2305
+ const _hoisted_23 = ["id", "disabled", "value"];
2306
+ const _hoisted_24 = {
2295
2307
  key: 1,
2296
2308
  class: "space-y-2"
2297
2309
  };
2298
- const _hoisted_23 = { class: "flex items-center justify-between text-xs font-medium text-neutral-500 dark:text-neutral-400" };
2299
- const _hoisted_24 = ["for"];
2300
- const _hoisted_25 = ["id", "disabled", "value"];
2301
- const _hoisted_26 = { class: "space-y-2" };
2302
- const _hoisted_27 = ["for"];
2303
- const _hoisted_28 = ["id", "maxlength", "placeholder", "value", "disabled"];
2310
+ const _hoisted_25 = { class: "flex items-center justify-between text-xs font-medium text-neutral-500 dark:text-neutral-400" };
2311
+ const _hoisted_26 = ["for"];
2312
+ const _hoisted_27 = ["id", "disabled", "value"];
2313
+ const _hoisted_28 = { class: "space-y-2" };
2314
+ const _hoisted_29 = ["for"];
2315
+ const _hoisted_30 = ["id", "maxlength", "placeholder", "value", "disabled"];
2304
2316
  const DEFAULT_HEX = "#000000";
2305
2317
  const DEFAULT_ALPHA = 255;
2306
2318
  const PICKER_PANEL_WIDTH = 320;
@@ -2334,6 +2346,7 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2334
2346
  const props = __props;
2335
2347
  const emit = __emit;
2336
2348
  const attrs = useAttrs();
2349
+ const { t } = useI18n();
2337
2350
  const triggerRef = ref(null);
2338
2351
  const panelRef = ref(null);
2339
2352
  const hexInputRef = ref(null);
@@ -2520,7 +2533,7 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2520
2533
  } : {
2521
2534
  backgroundColor: hueColor.value
2522
2535
  });
2523
- const saturationAreaLabel = computed(() => isRainbowVariant.value ? `Rainbow color area for ${emittedValue.value}` : `Saturation and brightness for ${emittedValue.value}`);
2536
+ const saturationAreaLabel = computed(() => isRainbowVariant.value ? t("Rainbow color area for {color}", { color: emittedValue.value }) : t("Saturation and brightness for {color}", { color: emittedValue.value }));
2524
2537
  const fieldId = computed(() => {
2525
2538
  const id = attrs.id;
2526
2539
  return typeof id === "string" && id !== "" ? id : void 0;
@@ -2857,8 +2870,8 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2857
2870
  }, null, 4)
2858
2871
  ]),
2859
2872
  createElementVNode("span", _hoisted_5$5, [
2860
- _cache[1] || (_cache[1] = createElementVNode("span", { class: "block text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400" }, "Color", -1)),
2861
- createElementVNode("span", _hoisted_6$5, toDisplayString(emittedValue.value), 1)
2873
+ createElementVNode("span", _hoisted_6$5, toDisplayString(unref(t)("Color")), 1),
2874
+ createElementVNode("span", _hoisted_7$5, toDisplayString(emittedValue.value), 1)
2862
2875
  ]),
2863
2876
  createVNode(unref(ChevronDownIcon), {
2864
2877
  class: normalizeClass(["size-4 shrink-0 text-neutral-400 transition-transform dark:text-neutral-500", isOpen.value ? "rotate-180" : ""])
@@ -2881,30 +2894,30 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2881
2894
  class: "z-50",
2882
2895
  style: normalizeStyle(panelStyle.value)
2883
2896
  }, [
2884
- createElementVNode("div", _hoisted_7$5, [
2885
- createElementVNode("div", _hoisted_8$3, [
2886
- createElementVNode("div", _hoisted_9$3, [
2897
+ createElementVNode("div", _hoisted_8$3, [
2898
+ createElementVNode("div", _hoisted_9$3, [
2899
+ createElementVNode("div", _hoisted_10$3, [
2887
2900
  createElementVNode("span", {
2888
2901
  class: "absolute inset-0",
2889
2902
  style: normalizeStyle({ backgroundColor: swatchColor.value })
2890
2903
  }, null, 4)
2891
2904
  ]),
2892
- createElementVNode("div", _hoisted_10$3, [
2893
- _cache[2] || (_cache[2] = createElementVNode("p", { class: "text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400" }, "Selected color", -1)),
2894
- createElementVNode("p", _hoisted_11$3, toDisplayString(emittedValue.value), 1)
2905
+ createElementVNode("div", _hoisted_11$3, [
2906
+ createElementVNode("p", _hoisted_12$2, toDisplayString(unref(t)("Selected color")), 1),
2907
+ createElementVNode("p", _hoisted_13$2, toDisplayString(emittedValue.value), 1)
2895
2908
  ]),
2896
2909
  supportsEyeDropper.value ? (openBlock(), createElementBlock("button", {
2897
2910
  key: 0,
2898
2911
  type: "button",
2899
2912
  class: normalizeClass(["inline-flex size-10 items-center justify-center rounded-xl border border-neutral-200 text-neutral-600 transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-neutral-950/10 dark:border-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-900 dark:focus:ring-neutral-100/10", props.disabled ? "cursor-not-allowed opacity-50" : ""]),
2900
2913
  disabled: props.disabled,
2901
- "aria-label": "Pick color from screen",
2914
+ "aria-label": unref(t)("Pick color from screen"),
2902
2915
  onClick: pickFromScreen
2903
2916
  }, [
2904
2917
  createVNode(unref(EyeDropperIcon), { class: "size-5" })
2905
- ], 10, _hoisted_12$2)) : createCommentVNode("", true)
2918
+ ], 10, _hoisted_14$2)) : createCommentVNode("", true)
2906
2919
  ]),
2907
- createElementVNode("div", _hoisted_13$2, [
2920
+ createElementVNode("div", _hoisted_15$2, [
2908
2921
  createElementVNode("div", {
2909
2922
  ref_key: "saturationRef",
2910
2923
  ref: saturationRef,
@@ -2919,22 +2932,22 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2919
2932
  onPointerdown: _cache[0] || (_cache[0] = ($event) => beginDrag($event, updateFromSaturationPointer)),
2920
2933
  onKeydown: updateFromSaturationKey
2921
2934
  }, [
2922
- !isRainbowVariant.value ? (openBlock(), createElementBlock("div", _hoisted_15$2)) : createCommentVNode("", true),
2935
+ !isRainbowVariant.value ? (openBlock(), createElementBlock("div", _hoisted_17$1)) : createCommentVNode("", true),
2923
2936
  isRainbowVariant.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2924
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "absolute inset-x-0 top-0 h-1/2 bg-[linear-gradient(to_bottom,#fff,transparent)]" }, null, -1)),
2925
- _cache[4] || (_cache[4] = createElementVNode("div", { class: "absolute inset-x-0 bottom-0 h-1/2 bg-[linear-gradient(to_bottom,transparent,#000)]" }, null, -1))
2926
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_16$1)),
2937
+ _cache[1] || (_cache[1] = createElementVNode("div", { class: "absolute inset-x-0 top-0 h-1/2 bg-[linear-gradient(to_bottom,#fff,transparent)]" }, null, -1)),
2938
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "absolute inset-x-0 bottom-0 h-1/2 bg-[linear-gradient(to_bottom,transparent,#000)]" }, null, -1))
2939
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_18$1)),
2927
2940
  createElementVNode("span", {
2928
2941
  class: "pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.3)]",
2929
2942
  style: normalizeStyle(saturationHandleStyle.value)
2930
2943
  }, null, 4)
2931
- ], 44, _hoisted_14$2),
2932
- createElementVNode("div", _hoisted_17$1, [
2933
- !isRainbowVariant.value ? (openBlock(), createElementBlock("div", _hoisted_18$1, [
2934
- createElementVNode("div", _hoisted_19, [
2944
+ ], 44, _hoisted_16$1),
2945
+ createElementVNode("div", _hoisted_19, [
2946
+ !isRainbowVariant.value ? (openBlock(), createElementBlock("div", _hoisted_20, [
2947
+ createElementVNode("div", _hoisted_21, [
2935
2948
  createElementVNode("label", {
2936
2949
  for: fieldId.value ? `${fieldId.value}-hue` : void 0
2937
- }, "Hue", 8, _hoisted_20),
2950
+ }, toDisplayString(unref(t)("Hue")), 9, _hoisted_22),
2938
2951
  createElementVNode("span", null, toDisplayString(Math.round(hue.value)) + "°", 1)
2939
2952
  ]),
2940
2953
  createElementVNode("input", {
@@ -2948,13 +2961,13 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2948
2961
  value: hue.value,
2949
2962
  style: { "background": "linear-gradient(90deg, #FF0000 0%, #FFFF00 17%, #00FF00 33%, #00FFFF 50%, #0000FF 67%, #FF00FF 83%, #FF0000 100%)" },
2950
2963
  onInput: handleHueInput
2951
- }, null, 40, _hoisted_21)
2964
+ }, null, 40, _hoisted_23)
2952
2965
  ])) : createCommentVNode("", true),
2953
- props.allowAlpha ? (openBlock(), createElementBlock("div", _hoisted_22, [
2954
- createElementVNode("div", _hoisted_23, [
2966
+ props.allowAlpha ? (openBlock(), createElementBlock("div", _hoisted_24, [
2967
+ createElementVNode("div", _hoisted_25, [
2955
2968
  createElementVNode("label", {
2956
2969
  for: fieldId.value ? `${fieldId.value}-alpha` : void 0
2957
- }, "Opacity", 8, _hoisted_24),
2970
+ }, toDisplayString(unref(t)("Opacity")), 9, _hoisted_26),
2958
2971
  createElementVNode("span", null, toDisplayString(opacityPercent.value) + "%", 1)
2959
2972
  ]),
2960
2973
  createElementVNode("input", {
@@ -2968,14 +2981,14 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2968
2981
  value: opacityPercent.value,
2969
2982
  style: normalizeStyle({ background: alphaGradient.value }),
2970
2983
  onInput: handleAlphaInput
2971
- }, null, 44, _hoisted_25)
2984
+ }, null, 44, _hoisted_27)
2972
2985
  ])) : createCommentVNode("", true)
2973
2986
  ]),
2974
- createElementVNode("div", _hoisted_26, [
2987
+ createElementVNode("div", _hoisted_28, [
2975
2988
  createElementVNode("label", {
2976
2989
  for: fieldId.value ? `${fieldId.value}-hex` : void 0,
2977
2990
  class: "text-xs font-medium uppercase tracking-[0.16em] text-neutral-500 dark:text-neutral-400"
2978
- }, "Hex value", 8, _hoisted_27),
2991
+ }, toDisplayString(unref(t)("Hex value")), 9, _hoisted_29),
2979
2992
  createElementVNode("input", {
2980
2993
  id: fieldId.value ? `${fieldId.value}-hex` : void 0,
2981
2994
  ref_key: "hexInputRef",
@@ -2991,7 +3004,7 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
2991
3004
  disabled: props.disabled,
2992
3005
  onInput: handleHexInput,
2993
3006
  onBlur: handleHexBlur
2994
- }, null, 40, _hoisted_28)
3007
+ }, null, 40, _hoisted_30)
2995
3008
  ])
2996
3009
  ])
2997
3010
  ])
@@ -3004,7 +3017,7 @@ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
3004
3017
  };
3005
3018
  }
3006
3019
  });
3007
- const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-b86f621b"]]);
3020
+ const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-7d6915fa"]]);
3008
3021
  const _hoisted_1$j = ["for"];
3009
3022
  const _hoisted_2$d = {
3010
3023
  key: 1,
@@ -3188,7 +3201,7 @@ const _sfc_main$v = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
3188
3201
  },
3189
3202
  locale: {
3190
3203
  type: String,
3191
- default: "fr-CA"
3204
+ default: "en"
3192
3205
  },
3193
3206
  allowAlpha: {
3194
3207
  type: Boolean,
@@ -3265,6 +3278,7 @@ const _sfc_main$v = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
3265
3278
  class: [defaultFieldClass, attrs.class],
3266
3279
  name: props.name,
3267
3280
  modelValue: props.modelValue,
3281
+ locale: props.locale,
3268
3282
  withTimestamp: props.type === "datetime-local" || props.withTimestamp,
3269
3283
  disabled: props.disabled,
3270
3284
  disabledClass: props.disabledClass
@@ -3394,11 +3408,17 @@ const _sfc_main$v = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
3394
3408
  }));
3395
3409
  return (_ctx, _cache) => {
3396
3410
  return openBlock(), createElementBlock("div", null, [
3397
- __props.label && !showsInlineChoiceControl.value ? (openBlock(), createElementBlock("label", {
3411
+ !showsInlineChoiceControl.value && (_ctx.$slots.label || __props.label) ? renderSlot(_ctx.$slots, "label", {
3398
3412
  key: 0,
3399
- for: fieldId.value,
3400
- class: "text-base font-semibold text-gray-900 dark:text-gray-50 mb-1 block"
3401
- }, toDisplayString(__props.label), 9, _hoisted_1$j)) : createCommentVNode("", true),
3413
+ label: __props.label,
3414
+ for: fieldId.value
3415
+ }, () => [
3416
+ __props.label ? (openBlock(), createElementBlock("label", {
3417
+ key: 0,
3418
+ for: fieldId.value,
3419
+ class: "text-base font-semibold text-gray-900 dark:text-gray-50 mb-1 block"
3420
+ }, toDisplayString(__props.label), 9, _hoisted_1$j)) : createCommentVNode("", true)
3421
+ ]) : createCommentVNode("", true),
3402
3422
  __props.helperText && !showsInlineChoiceControl.value ? (openBlock(), createElementBlock("span", _hoisted_2$d, toDisplayString(__props.helperText), 1)) : createCommentVNode("", true),
3403
3423
  isTextareaType.value ? (openBlock(), createBlock(_sfc_main$H, mergeProps({ key: 2 }, textAreaBindings.value, {
3404
3424
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event)),
@@ -6099,4 +6119,4 @@ export {
6099
6119
  _sfc_main$B as y,
6100
6120
  _sfc_main$A as z
6101
6121
  };
6102
- //# sourceMappingURL=plugin-DYTVm2W1.js.map
6122
+ //# sourceMappingURL=plugin-CG0XGuww.js.map