@bagelink/vue 0.0.1300 → 1.0.1

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 (33) hide show
  1. package/dist/components/AddressSearch.vue.d.ts +0 -3
  2. package/dist/components/AddressSearch.vue.d.ts.map +1 -1
  3. package/dist/components/DataPreview.vue.d.ts +1 -1
  4. package/dist/components/DataPreview.vue.d.ts.map +1 -1
  5. package/dist/components/DropDown.vue.d.ts +0 -1
  6. package/dist/components/DropDown.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/ColorInput.vue.d.ts +21 -0
  8. package/dist/components/form/inputs/ColorInput.vue.d.ts.map +1 -0
  9. package/dist/components/form/inputs/SelectInput.vue.d.ts +0 -6
  10. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/TelInput.vue.d.ts +1 -618
  12. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/index.d.ts +1 -1
  14. package/dist/components/form/inputs/index.d.ts.map +1 -1
  15. package/dist/composables/useSchemaField.d.ts.map +1 -1
  16. package/dist/index.cjs +300 -221
  17. package/dist/index.mjs +301 -222
  18. package/dist/style.css +32 -32
  19. package/dist/utils/BagelFormUtils.d.ts +5 -0
  20. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  21. package/dist/utils/timeAgo.d.ts +1 -0
  22. package/dist/utils/timeAgo.d.ts.map +1 -1
  23. package/package.json +1 -1
  24. package/src/components/DataPreview.vue +2 -2
  25. package/src/components/Dropdown.vue +20 -3
  26. package/src/components/Spreadsheet/Index.vue +2 -2
  27. package/src/components/form/FieldArray.vue +1 -1
  28. package/src/components/form/inputs/{ColorPicker.vue → ColorInput.vue} +1 -1
  29. package/src/components/form/inputs/TelInput.vue +198 -172
  30. package/src/components/form/inputs/index.ts +1 -1
  31. package/src/composables/useSchemaField.ts +6 -1
  32. package/src/utils/BagelFormUtils.ts +17 -3
  33. package/src/utils/timeAgo.ts +36 -0
package/dist/index.cjs CHANGED
@@ -868,7 +868,7 @@ const _hoisted_6$j = {
868
868
  key: 0,
869
869
  class: "align-items-center flex justify-content-center h-100p opacity-6"
870
870
  };
871
- const _hoisted_7$e = {
871
+ const _hoisted_7$f = {
872
872
  key: 1,
873
873
  class: "w-100p"
874
874
  };
@@ -898,7 +898,7 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
898
898
  vue.createElementVNode("div", _hoisted_4$r, vue.toDisplayString(__props.day.dateTimeString.substring(8, 10)), 1)
899
899
  ]),
900
900
  vue.createElementVNode("div", _hoisted_5$n, [
901
- __props.day.events.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$e, [
901
+ __props.day.events.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$f, [
902
902
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.day.events, (dayEvent) => {
903
903
  return vue.openBlock(), vue.createBlock(AgendaEventTile, {
904
904
  key: `agenda_event_${dayEvent.id}`,
@@ -1612,7 +1612,7 @@ const _hoisted_6$i = {
1612
1612
  key: 0,
1613
1613
  class: "event-flyout__row is-title"
1614
1614
  };
1615
- const _hoisted_7$d = {
1615
+ const _hoisted_7$e = {
1616
1616
  key: 1,
1617
1617
  class: "event-flyout__row is-time"
1618
1618
  };
@@ -1836,7 +1836,7 @@ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
1836
1836
  }, null, 4),
1837
1837
  vue.createTextVNode(" " + vue.toDisplayString(calendarEvent.value.title), 1)
1838
1838
  ])) : vue.createCommentVNode("", true),
1839
- calendarEvent.value.time ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$d, vue.toDisplayString(getEventTime.value), 1)) : vue.createCommentVNode("", true),
1839
+ calendarEvent.value.time ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$e, vue.toDisplayString(getEventTime.value), 1)) : vue.createCommentVNode("", true),
1840
1840
  calendarEvent.value.location ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$9, [
1841
1841
  vue.createVNode(vue.unref(Icon), {
1842
1842
  icon: icons.location
@@ -2549,7 +2549,7 @@ const _hoisted_6$h = {
2549
2549
  key: 2,
2550
2550
  class: "calendar-week__event-row is-topic"
2551
2551
  };
2552
- const _hoisted_7$c = {
2552
+ const _hoisted_7$d = {
2553
2553
  key: 3,
2554
2554
  class: "calendar-week__event-row is-description"
2555
2555
  };
@@ -2925,7 +2925,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
2925
2925
  }, null, 8, ["icon"]),
2926
2926
  vue.createElementVNode("span", null, vue.toDisplayString(event.value.topic), 1)
2927
2927
  ])) : vue.createCommentVNode("", true),
2928
- event.value.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$c, [
2928
+ event.value.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$d, [
2929
2929
  vue.createVNode(vue.unref(Icon), {
2930
2930
  icon: icons.value.description,
2931
2931
  class: "calendar-week__event-icon"
@@ -9337,7 +9337,7 @@ const _hoisted_4$2$1 = {
9337
9337
  };
9338
9338
  const _hoisted_5$2$1 = ["x1", "y1", "x2", "y2"];
9339
9339
  const _hoisted_6$2$1 = ["x1", "y1", "x2", "y2"];
9340
- const _hoisted_7$b = ["x1", "y1", "x2", "y2"];
9340
+ const _hoisted_7$c = ["x1", "y1", "x2", "y2"];
9341
9341
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
9342
9342
  return _ctx.data.length ? (vue.openBlock(), vue.createElementBlock("g", {
9343
9343
  key: 0,
@@ -9393,7 +9393,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
9393
9393
  y1: _ctx.canvas.y,
9394
9394
  x2: _ctx.canvas.width - 1,
9395
9395
  y2: _ctx.canvas.height
9396
- }, null, 8, _hoisted_7$b)
9396
+ }, null, 8, _hoisted_7$c)
9397
9397
  ])
9398
9398
  ], 8, _hoisted_1$4$1)) : vue.createCommentVNode("v-if", true);
9399
9399
  }
@@ -10539,6 +10539,8 @@ function useSchemaField(optns) {
10539
10539
  textarea: TextInput,
10540
10540
  number: NumberInput,
10541
10541
  array: _sfc_main$R,
10542
+ color: _sfc_main$N,
10543
+ tel: TelInput,
10542
10544
  select: SelectInput,
10543
10545
  toggle: ToggleInput,
10544
10546
  check: CheckInput,
@@ -10769,13 +10771,13 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
10769
10771
  useServerSort: { type: Boolean },
10770
10772
  selectable: { type: Boolean },
10771
10773
  onLastItemVisible: { type: Function },
10772
- data: {},
10774
+ modelValue: {},
10773
10775
  includeUnset: { type: Boolean }
10774
10776
  },
10775
10777
  setup(__props) {
10776
10778
  const props2 = __props;
10777
10779
  const slots = vue.useSlots();
10778
- const data2 = vue.computed(() => Array.isArray(props2.data) ? props2.data : [props2.data]);
10780
+ const data2 = vue.computed(() => Array.isArray(props2.modelValue) ? props2.modelValue : [props2.modelValue]);
10779
10781
  const {
10780
10782
  computedSchema,
10781
10783
  computedData
@@ -10802,7 +10804,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
10802
10804
  };
10803
10805
  }
10804
10806
  });
10805
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-550fe546"]]);
10807
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-74c7df87"]]);
10806
10808
  function useTableSelection(options) {
10807
10809
  const allSelectorEl = vue.ref();
10808
10810
  const computedSelectedItems = vue.computed(() => options.selectedItems.value);
@@ -11440,7 +11442,7 @@ const _hoisted_3$s = { class: "row first-row" };
11440
11442
  const _hoisted_4$i = { key: 0 };
11441
11443
  const _hoisted_5$h = ["onClick"];
11442
11444
  const _hoisted_6$e = { class: "flex" };
11443
- const _hoisted_7$a = ["onClick"];
11445
+ const _hoisted_7$b = ["onClick"];
11444
11446
  const _hoisted_8$7 = { key: 0 };
11445
11447
  const _hoisted_9$6 = ["value"];
11446
11448
  const _hoisted_10$6 = { key: 1 };
@@ -11635,7 +11637,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
11635
11637
  ]))
11636
11638
  ]);
11637
11639
  }), 128))
11638
- ], 10, _hoisted_7$a);
11640
+ ], 10, _hoisted_7$b);
11639
11641
  }), 128)),
11640
11642
  props2.onLastItemVisible !== void 0 ? (vue.openBlock(), vue.createElementBlock("tr", {
11641
11643
  key: 0,
@@ -14758,11 +14760,10 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
14758
14760
  border: { type: Boolean },
14759
14761
  outline: { type: Boolean },
14760
14762
  round: { type: Boolean },
14761
- placement: {},
14763
+ placement: { default: "bottom-start" },
14762
14764
  noAutoFocus: { type: Boolean },
14763
- positioningDisabled: { type: Boolean },
14764
- autoHide: { type: Boolean },
14765
- triggers: {}
14765
+ autoHide: { type: Boolean, default: true },
14766
+ triggers: { default: () => ["click"] }
14766
14767
  }, {
14767
14768
  "shown": {
14768
14769
  type: Boolean,
@@ -14818,8 +14819,10 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
14818
14819
  icon: _ctx.icon,
14819
14820
  value: _ctx.value,
14820
14821
  thin: _ctx.thin,
14821
- flat: _ctx.flat
14822
- }, null, 8, ["class", "iconEnd", "icon", "value", "thin", "flat"])
14822
+ flat: _ctx.flat,
14823
+ outline: _ctx.outline,
14824
+ round: _ctx.round
14825
+ }, null, 8, ["class", "iconEnd", "icon", "value", "thin", "flat", "outline", "round"])
14823
14826
  ])
14824
14827
  ]),
14825
14828
  _: 3
@@ -15014,11 +15017,22 @@ function bglForm(idOrField, ...schema) {
15014
15017
  }
15015
15018
  function telField(id, label, options) {
15016
15019
  return {
15017
- $el: vue.markRaw(TelInput),
15020
+ $el: "tel",
15018
15021
  id,
15019
15022
  label,
15020
15023
  vIf: options == null ? void 0 : options.vIf,
15021
- attrs: options
15024
+ attrs: options,
15025
+ class: options == null ? void 0 : options.class
15026
+ };
15027
+ }
15028
+ function colorField(id, label, options) {
15029
+ return {
15030
+ $el: "color",
15031
+ id,
15032
+ label,
15033
+ vIf: options == null ? void 0 : options.vIf,
15034
+ attrs: options,
15035
+ class: options == null ? void 0 : options.class
15022
15036
  };
15023
15037
  }
15024
15038
  function findBglFieldById(id, _schema) {
@@ -15046,6 +15060,7 @@ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
15046
15060
  arrField,
15047
15061
  bglForm,
15048
15062
  checkField,
15063
+ colorField,
15049
15064
  dateField,
15050
15065
  findBglFieldById,
15051
15066
  frmRow: frmRow$1,
@@ -15392,7 +15407,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15392
15407
  const _hoisted_1$K = { class: "label mb-05" };
15393
15408
  const _hoisted_2$x = {
15394
15409
  key: 0,
15395
- class: "ps-025 border-start"
15410
+ class: "ps-025 border-start mb-05"
15396
15411
  };
15397
15412
  const _hoisted_3$r = { class: "bg-gray-80 -my-05 px-025 pt-065 txt-center" };
15398
15413
  const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
@@ -15720,7 +15735,7 @@ const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data
15720
15735
  const _hoisted_1$G = ["title"];
15721
15736
  const _hoisted_2$u = ["id", "placeholder", "required"];
15722
15737
  const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
15723
- __name: "ColorPicker",
15738
+ __name: "ColorInput",
15724
15739
  props: {
15725
15740
  label: {},
15726
15741
  id: {},
@@ -15743,8 +15758,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
15743
15758
  }
15744
15759
  );
15745
15760
  return (_ctx, _cache) => {
15746
- return _ctx.id ? (vue.openBlock(), vue.createElementBlock("div", {
15747
- key: 0,
15761
+ return vue.openBlock(), vue.createElementBlock("div", {
15748
15762
  class: vue.normalizeClass(["bagel-input", { small: _ctx.small }]),
15749
15763
  title: _ctx.label
15750
15764
  }, [
@@ -15761,7 +15775,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
15761
15775
  [vue.vModelText, inputVal.value]
15762
15776
  ])
15763
15777
  ])
15764
- ], 10, _hoisted_1$G)) : vue.createCommentVNode("", true);
15778
+ ], 10, _hoisted_1$G);
15765
15779
  };
15766
15780
  }
15767
15781
  });
@@ -15774,7 +15788,7 @@ const _hoisted_3$o = {
15774
15788
  const _hoisted_4$g = { class: "calendar-section m_border-none pe-05 m_p-0" };
15775
15789
  const _hoisted_5$f = { class: "flex space-between pb-1" };
15776
15790
  const _hoisted_6$c = { class: "flex gap-05" };
15777
- const _hoisted_7$9 = { class: "month-year" };
15791
+ const _hoisted_7$a = { class: "month-year" };
15778
15792
  const _hoisted_8$6 = {
15779
15793
  key: 0,
15780
15794
  class: "calendar-grid grid gap-025"
@@ -15837,7 +15851,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
15837
15851
  };
15838
15852
  return dateObj.toLocaleString(props2.locale || void 0, options);
15839
15853
  };
15840
- const formatDate = (date2) => {
15854
+ const formatDate2 = (date2) => {
15841
15855
  if (!date2) return "";
15842
15856
  const dateObj = typeof date2 === "string" ? new Date(date2) : date2;
15843
15857
  return props2.enableTime ? dateObj.toISOString().slice(0, 16) : dateObj.toISOString().split("T")[0];
@@ -15861,7 +15875,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
15861
15875
  };
15862
15876
  return {
15863
15877
  formatDisplayDate,
15864
- formatDate,
15878
+ formatDate: formatDate2,
15865
15879
  parseUserInput
15866
15880
  };
15867
15881
  }
@@ -15887,10 +15901,10 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
15887
15901
  };
15888
15902
  }
15889
15903
  function useDateState() {
15890
- const { formatDisplayDate, formatDate } = useFormatting();
15904
+ const { formatDisplayDate, formatDate: formatDate2 } = useFormatting();
15891
15905
  const formattedDisplayValue2 = vue.computed(() => formatDisplayDate(props2.modelValue));
15892
- const formattedMin2 = vue.computed(() => formatDate(props2.min));
15893
- const formattedMax2 = vue.computed(() => formatDate(props2.max));
15906
+ const formattedMin2 = vue.computed(() => formatDate2(props2.min));
15907
+ const formattedMax2 = vue.computed(() => formatDate2(props2.max));
15894
15908
  const selectedDate2 = vue.computed(() => {
15895
15909
  if (!props2.modelValue) return null;
15896
15910
  return typeof props2.modelValue === "string" ? new Date(props2.modelValue) : props2.modelValue;
@@ -16224,7 +16238,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
16224
16238
  icon: "chevron_left",
16225
16239
  onClick: vue.unref(previousYear)
16226
16240
  }, null, 8, ["onClick"]),
16227
- vue.createElementVNode("span", _hoisted_7$9, vue.toDisplayString(vue.unref(currentMonthValue).formatted.year), 1),
16241
+ vue.createElementVNode("span", _hoisted_7$a, vue.toDisplayString(vue.unref(currentMonthValue).formatted.year), 1),
16228
16242
  vue.createVNode(vue.unref(Btn), {
16229
16243
  flat: "",
16230
16244
  icon: "chevron_right",
@@ -16333,7 +16347,7 @@ const _hoisted_3$n = {
16333
16347
  const _hoisted_4$f = { class: "date-picker-container" };
16334
16348
  const _hoisted_5$e = ["value", "min", "max", "required", "disabled"];
16335
16349
  const _hoisted_6$b = { class: "flex gap-075 p-05 m_flex-wrap calendar-container justify-content-center h-100p" };
16336
- const _hoisted_7$8 = { class: "calendar-section m_border-none pe-05 m_p-0" };
16350
+ const _hoisted_7$9 = { class: "calendar-section m_border-none pe-05 m_p-0" };
16337
16351
  const _hoisted_8$5 = { class: "flex space-between pb-1" };
16338
16352
  const _hoisted_9$4 = { class: "flex gap-05" };
16339
16353
  const _hoisted_10$4 = { class: "month-year" };
@@ -16403,14 +16417,14 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
16403
16417
  timeZone: props2.timezone
16404
16418
  });
16405
16419
  }
16406
- function formatDate(date2) {
16420
+ function formatDate2(date2) {
16407
16421
  if (!date2) return "";
16408
16422
  const dateObj = typeof date2 === "string" ? new Date(date2) : date2;
16409
16423
  return props2.enableTime ? dateObj.toISOString().slice(0, 16) : dateObj.toISOString().split("T")[0];
16410
16424
  }
16411
16425
  const formattedDisplayValue = vue.computed(() => formatDisplayDate(props2.modelValue));
16412
- const formattedMin = vue.computed(() => formatDate(props2.min));
16413
- const formattedMax = vue.computed(() => formatDate(props2.max));
16426
+ const formattedMin = vue.computed(() => formatDate2(props2.min));
16427
+ const formattedMax = vue.computed(() => formatDate2(props2.max));
16414
16428
  const selectedDate = vue.computed(() => {
16415
16429
  if (!props2.modelValue) return null;
16416
16430
  return typeof props2.modelValue === "string" ? new Date(props2.modelValue) : props2.modelValue;
@@ -16580,7 +16594,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
16580
16594
  ]),
16581
16595
  default: vue.withCtx(() => [
16582
16596
  vue.createElementVNode("div", _hoisted_6$b, [
16583
- vue.createElementVNode("div", _hoisted_7$8, [
16597
+ vue.createElementVNode("div", _hoisted_7$9, [
16584
16598
  vue.createElementVNode("div", _hoisted_8$5, [
16585
16599
  vue.unref(currentView) === "days" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
16586
16600
  vue.createVNode(vue.unref(Btn), {
@@ -16783,7 +16797,7 @@ const _hoisted_3$l = { class: "m-05 flex opacity-7 z-99" };
16783
16797
  const _hoisted_4$d = { class: "ellipsis-1 word-break-all h-20 m-0 color-black" };
16784
16798
  const _hoisted_5$d = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
16785
16799
  const _hoisted_6$a = { class: "ellipsis-1 word-break-all h-20 m-0 color-black txt16" };
16786
- const _hoisted_7$7 = {
16800
+ const _hoisted_7$8 = {
16787
16801
  key: 1,
16788
16802
  class: "txt-gray txt-12"
16789
16803
  };
@@ -17066,7 +17080,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
17066
17080
  ])
17067
17081
  ]);
17068
17082
  }), 128)),
17069
- !storageFiles.value.length && !fileQueue.value.length ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$7, vue.toDisplayString(_ctx.noFilePlaceholder || "No file selected"), 1)) : vue.createCommentVNode("", true)
17083
+ !storageFiles.value.length && !fileQueue.value.length ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$8, vue.toDisplayString(_ctx.noFilePlaceholder || "No file selected"), 1)) : vue.createCommentVNode("", true)
17070
17084
  ]),
17071
17085
  _: 1
17072
17086
  })) : (vue.openBlock(), vue.createElementBlock("div", {
@@ -17665,7 +17679,7 @@ const _hoisted_6$9 = {
17665
17679
  key: 0,
17666
17680
  class: "m-0 m_txt-14"
17667
17681
  };
17668
- const _hoisted_7$6 = {
17682
+ const _hoisted_7$7 = {
17669
17683
  key: 1,
17670
17684
  class: "txt-gray txt-12 m-0"
17671
17685
  };
@@ -17740,7 +17754,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
17740
17754
  }, null, 8, _hoisted_4$b)) : vue.createCommentVNode("", true),
17741
17755
  vue.createElementVNode("div", _hoisted_5$b, [
17742
17756
  opt.label ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6$9, vue.toDisplayString(opt.label), 1)) : vue.createCommentVNode("", true),
17743
- opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$6, vue.toDisplayString(opt.subLabel), 1)) : vue.createCommentVNode("", true)
17757
+ opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$7, vue.toDisplayString(opt.subLabel), 1)) : vue.createCommentVNode("", true)
17744
17758
  ]),
17745
17759
  vue.renderSlot(_ctx.$slots, "radioItem", vue.mergeProps({ ref_for: true }, opt), void 0, true)
17746
17760
  ]),
@@ -17841,7 +17855,7 @@ const _hoisted_3$g = { class: "range-slider relative w-100" };
17841
17855
  const _hoisted_4$9 = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
17842
17856
  const _hoisted_5$9 = ["value", "min", "max", "step", "required", "disabled"];
17843
17857
  const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
17844
- const _hoisted_7$5 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
17858
+ const _hoisted_7$6 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
17845
17859
  const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17846
17860
  __name: "RangeInput",
17847
17861
  props: {
@@ -17982,7 +17996,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17982
17996
  ], true)
17983
17997
  ], 4)) : vue.createCommentVNode("", true)
17984
17998
  ]),
17985
- vue.createElementVNode("p", _hoisted_7$5, [
17999
+ vue.createElementVNode("p", _hoisted_7$6, [
17986
18000
  vue.renderSlot(_ctx.$slots, "min", {
17987
18001
  max: vue.unref(formatValue)(vue.unref(max2)),
17988
18002
  min: vue.unref(formatValue)(vue.unref(min2)),
@@ -19676,7 +19690,7 @@ const _hoisted_4$8 = {
19676
19690
  };
19677
19691
  const _hoisted_5$8 = ["value"];
19678
19692
  const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
19679
- const _hoisted_7$4 = { class: "block" };
19693
+ const _hoisted_7$5 = { class: "block" };
19680
19694
  const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
19681
19695
  __name: "SelectInput",
19682
19696
  props: {
@@ -19969,7 +19983,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
19969
19983
  size: 1.1
19970
19984
  })) : vue.createCommentVNode("", true)
19971
19985
  ], 64)) : vue.createCommentVNode("", true),
19972
- vue.createElementVNode("span", _hoisted_7$4, vue.toDisplayString(getLabel(option2)), 1)
19986
+ vue.createElementVNode("span", _hoisted_7$5, vue.toDisplayString(getLabel(option2)), 1)
19973
19987
  ], 42, _hoisted_6$7);
19974
19988
  }), 128))
19975
19989
  ], 2),
@@ -27867,11 +27881,12 @@ function parsePhoneNumber() {
27867
27881
  return withMetadataArgument(parsePhoneNumber$1, arguments);
27868
27882
  }
27869
27883
  const _hoisted_1$o = ["aria-expanded"];
27870
- const _hoisted_2$e = { class: "p-075 tel-countryp-dropdown" };
27871
- const _hoisted_3$b = ["aria-selected", "onClick", "onMousemove"];
27872
- const _hoisted_4$6 = { class: "tel-country" };
27873
- const _hoisted_5$6 = { key: 1 };
27874
- const _hoisted_6$5 = ["id", "required", "placeholder", "disabled", "autocomplete", "pattern", "minlength", "maxlength", "name", "readonly", "tabindex", "aria-describedby"];
27884
+ const _hoisted_2$e = { class: "flex gap-05" };
27885
+ const _hoisted_3$b = { class: "p-075 tel-countryp-dropdown" };
27886
+ const _hoisted_4$6 = ["aria-selected", "onClick", "onMousemove"];
27887
+ const _hoisted_5$6 = { class: "tel-country" };
27888
+ const _hoisted_6$5 = { key: 1 };
27889
+ const _hoisted_7$4 = ["id", "required", "placeholder", "disabled", "autocomplete", "pattern", "minlength", "maxlength", "name", "readonly", "tabindex", "aria-describedby"];
27875
27890
  const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
27876
27891
  __name: "TelInput",
27877
27892
  props: /* @__PURE__ */ vue.mergeModels({
@@ -27895,8 +27910,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
27895
27910
  mode: { default: "INTERNATIONAL" },
27896
27911
  onlyCountries: { default: () => [] },
27897
27912
  preferredCountries: { default: () => [] },
27898
- parseArg: {},
27899
- debounceDelay: { default: 300 }
27913
+ parseArg: {}
27900
27914
  }, {
27901
27915
  "modelValue": {
27902
27916
  default: ""
@@ -27917,13 +27931,8 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
27917
27931
  setup(__props, { emit: __emit }) {
27918
27932
  const props2 = __props;
27919
27933
  const emit2 = __emit;
27920
- async function getIp() {
27921
- const apiData = sessionStorage.getItem("ipapi");
27922
- if (apiData) return JSON.parse(apiData);
27923
- const { data: data2 } = await axios$1.get("https://ipapi.co/json/");
27924
- sessionStorage.setItem("ipapi", JSON.stringify(data2));
27925
- return data2;
27926
- }
27934
+ const open = vue.ref(false);
27935
+ const dropdownOpenDirection = vue.ref("below");
27927
27936
  const defaultDropdownOptions = {
27928
27937
  hide: false,
27929
27938
  disabled: false,
@@ -27954,52 +27963,169 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
27954
27963
  ...defaultInputOptions,
27955
27964
  ...props2.inputOptions
27956
27965
  }));
27957
- let activeCountryCode = vue.ref();
27958
- let open = vue.ref(false);
27959
- let selectedIndex = vue.ref();
27960
- const dropdownOpenDirection = vue.ref("below");
27961
- const searchQuery = vue.ref("");
27962
- const activeCountry = vue.computed(
27963
- () => props2.allCountries.find(
27964
- (country) => {
27965
- var _a;
27966
- return country.iso2 === ((_a = activeCountryCode.value) == null ? void 0 : _a.toUpperCase());
27967
- }
27968
- )
27969
- );
27970
- const isPreferred = (country) => props2.preferredCountries.includes(country == null ? void 0 : country.iso2);
27971
- const filteredCountries = vue.computed(() => {
27972
- if (props2.onlyCountries.length > 0) {
27973
- return props2.allCountries.filter(
27974
- ({ iso2 }) => props2.onlyCountries.some((c2) => c2.toUpperCase() === iso2)
27966
+ function useCountrySelection(props22, emit22) {
27967
+ const activeCountryCode2 = vue.ref();
27968
+ const selectedIndex2 = vue.ref();
27969
+ const searchQuery2 = vue.ref("");
27970
+ const activeCountry = vue.computed(() => {
27971
+ var _a;
27972
+ return (_a = props22.allCountries) == null ? void 0 : _a.find(
27973
+ (country) => {
27974
+ var _a2;
27975
+ return country.iso2 === ((_a2 = activeCountryCode2.value) == null ? void 0 : _a2.toUpperCase());
27976
+ }
27975
27977
  );
27978
+ });
27979
+ const filteredCountries = vue.computed(() => {
27980
+ const countries = props22.allCountries || [];
27981
+ const onlyCountries = props22.onlyCountries || [];
27982
+ const excludeCountries = props22.excludeCountries || [];
27983
+ if (onlyCountries.length > 0) {
27984
+ return countries.filter(({ iso2 }) => onlyCountries.some((c2) => c2.toUpperCase() === iso2));
27985
+ }
27986
+ if (excludeCountries.length > 0) {
27987
+ return countries.filter(
27988
+ ({ iso2 }) => !excludeCountries.includes(iso2.toUpperCase()) && !excludeCountries.includes(iso2.toLowerCase())
27989
+ );
27990
+ }
27991
+ return countries;
27992
+ });
27993
+ const sortedCountries2 = vue.computed(() => {
27994
+ const preferredCountries = getCountries(props22.preferredCountries || []);
27995
+ const countriesList = [...preferredCountries, ...filteredCountries.value];
27996
+ const cleanInput = searchQuery2.value.replaceAll(
27997
+ /[~`!#$%&*()+={};:'"<>.,\\/@-]/g,
27998
+ ""
27999
+ ).toLowerCase();
28000
+ return countriesList.filter(
28001
+ (c2) => new RegExp(cleanInput, "i").test(c2.name || "") || new RegExp(cleanInput, "i").test(c2.iso2 || "") || new RegExp(cleanInput, "i").test(c2.dialCode || "")
28002
+ ).filter(Boolean);
28003
+ });
28004
+ const findCountry = (iso) => filteredCountries.value.find(
28005
+ (country) => country.iso2 === iso.toUpperCase()
28006
+ );
28007
+ const findCountryByDialCode = (dialCode) => filteredCountries.value.find((country) => Number(country.dialCode) === dialCode);
28008
+ function getCountries(list) {
28009
+ const countryList = [];
28010
+ list.forEach((countryCode) => {
28011
+ const country = findCountry(countryCode);
28012
+ if (country) countryList.push(country);
28013
+ });
28014
+ return countryList;
27976
28015
  }
27977
- if (props2.excludeCountries.length > 0) {
27978
- return props2.allCountries.filter(
27979
- ({ iso2 }) => !props2.excludeCountries.includes(iso2.toUpperCase()) && !props2.excludeCountries.includes(iso2.toLowerCase())
27980
- );
28016
+ async function initializeCountry2() {
28017
+ if (props22.defaultCountry) {
28018
+ if (typeof props22.defaultCountry === "string") {
28019
+ chooseCountry2(props22.defaultCountry);
28020
+ return;
28021
+ }
28022
+ if (typeof props22.defaultCountry === "number") {
28023
+ const country = findCountryByDialCode(props22.defaultCountry);
28024
+ if (country) {
28025
+ chooseCountry2(country.iso2);
28026
+ return;
28027
+ }
28028
+ }
28029
+ }
28030
+ const fallbackCountry = sortedCountries2.value[0];
28031
+ if (props22.autoDefaultCountry) {
28032
+ try {
28033
+ const res = (await getIp()).country;
28034
+ chooseCountry2(res || activeCountryCode2.value);
28035
+ } catch (error) {
28036
+ console.warn(error);
28037
+ chooseCountry2(fallbackCountry.iso2);
28038
+ }
28039
+ } else {
28040
+ chooseCountry2(fallbackCountry.iso2);
28041
+ }
27981
28042
  }
27982
- return props2.allCountries;
27983
- });
27984
- const sortedCountries = vue.computed(() => {
27985
- const preferredCountries = getCountries(props2.preferredCountries);
27986
- const countriesList = [...preferredCountries, ...filteredCountries.value];
27987
- const cleanInput = searchQuery.value.replaceAll(
27988
- // eslint-disable-next-line regexp/no-obscure-range
27989
- /[~`!#$%&*()+={};:'"<>.,/?-_]/g,
27990
- ""
28043
+ function chooseCountry2(country) {
28044
+ if (!country) return;
28045
+ const parsedCountry = findCountry(country);
28046
+ if (!parsedCountry) return;
28047
+ activeCountryCode2.value = parsedCountry.iso2;
28048
+ emit22("country-changed", parsedCountry);
28049
+ open.value = false;
28050
+ }
28051
+ vue.watch(
28052
+ () => activeCountry.value,
28053
+ (value, oldValue) => {
28054
+ if (!value && (oldValue == null ? void 0 : oldValue.iso2)) {
28055
+ activeCountryCode2.value = oldValue.iso2;
28056
+ return;
28057
+ }
28058
+ if (value == null ? void 0 : value.iso2) emit22("country-changed", value);
28059
+ }
27991
28060
  );
27992
- return countriesList.filter(
27993
- (c2) => new RegExp(cleanInput, "i").test(c2.name || "") || new RegExp(cleanInput, "i").test(c2.iso2 || "") || new RegExp(cleanInput, "i").test(c2.dialCode || "")
27994
- ).filter(Boolean);
27995
- });
27996
- const parseArgs = vue.computed(() => ({
27997
- ...props2.parseArg,
27998
- defaultCountry: activeCountryCode.value
27999
- }));
28061
+ return {
28062
+ activeCountryCode: activeCountryCode2,
28063
+ activeCountry,
28064
+ selectedIndex: selectedIndex2,
28065
+ searchQuery: searchQuery2,
28066
+ sortedCountries: sortedCountries2,
28067
+ chooseCountry: chooseCountry2,
28068
+ initializeCountry: initializeCountry2,
28069
+ findCountry,
28070
+ findCountryByDialCode
28071
+ };
28072
+ }
28073
+ function usePhoneNumberFormatting(props22, activeCountryCode2) {
28074
+ const parseArgs = vue.computed(() => ({
28075
+ ...props22.parseArg,
28076
+ defaultCountry: activeCountryCode2.value
28077
+ }));
28078
+ function formatPhone2(val) {
28079
+ var _a, _b, _c;
28080
+ let phoneNumber = parsePhoneNumber(val, parseArgs.value);
28081
+ if (!phoneNumber && val.startsWith("+")) {
28082
+ const currentCountry = (_a = props22.allCountries) == null ? void 0 : _a.find((c2) => c2.iso2 === activeCountryCode2.value);
28083
+ if (currentCountry) {
28084
+ const { dialCode } = currentCountry;
28085
+ const withoutDialCode = val.replace(new RegExp(`^\\+${dialCode}`), "");
28086
+ phoneNumber = parsePhoneNumber(withoutDialCode, parseArgs.value);
28087
+ }
28088
+ }
28089
+ if (!phoneNumber) {
28090
+ const dialCode = ((_c = (_b = props22.allCountries) == null ? void 0 : _b.find(
28091
+ (c2) => c2.iso2 === activeCountryCode2.value
28092
+ )) == null ? void 0 : _c.dialCode) || "";
28093
+ if (props22.mode === "INTERNATIONAL") return `+${dialCode}`;
28094
+ return dialCode;
28095
+ }
28096
+ const formattedNumber = phoneNumber.format(props22.mode || "INTERNATIONAL");
28097
+ if (props22.mode === "INTERNATIONAL") {
28098
+ const countryCode = phoneNumber.countryCallingCode;
28099
+ const { nationalNumber } = phoneNumber;
28100
+ return `+${countryCode}${nationalNumber}`;
28101
+ }
28102
+ return formattedNumber.replaceAll(" ", "") || "";
28103
+ }
28104
+ return {
28105
+ formatPhone: formatPhone2,
28106
+ parseArgs
28107
+ };
28108
+ }
28000
28109
  const debouncedEmit = useDebounceFn((maybeFormatted) => {
28001
28110
  emit2("debounce", maybeFormatted);
28002
- }, props2.debounceDelay);
28111
+ });
28112
+ const {
28113
+ activeCountryCode,
28114
+ selectedIndex,
28115
+ searchQuery,
28116
+ sortedCountries,
28117
+ chooseCountry,
28118
+ initializeCountry
28119
+ } = useCountrySelection(props2, emit2);
28120
+ const { formatPhone } = usePhoneNumberFormatting(props2, activeCountryCode);
28121
+ const isPreferred = (country) => props2.preferredCountries.includes(country == null ? void 0 : country.iso2) || false;
28122
+ function reset() {
28123
+ if (!sortedCountries.value || !activeCountryCode.value) return;
28124
+ selectedIndex.value = sortedCountries.value.findIndex(
28125
+ (c2) => c2.iso2 === activeCountryCode.value
28126
+ );
28127
+ open.value = false;
28128
+ }
28003
28129
  const phone = vue.useModel(__props, "modelValue", {
28004
28130
  set: (value) => {
28005
28131
  let maybeFormatted = value;
@@ -28016,99 +28142,18 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
28016
28142
  },
28017
28143
  get: (value) => value
28018
28144
  });
28019
- function formatPhone(val) {
28020
- var _a;
28021
- const phoneNumber = parsePhoneNumber(val, parseArgs.value);
28022
- if (!phoneNumber) {
28023
- const dialCode = ((_a = sortedCountries.value.find((c2) => c2.iso2 === activeCountryCode.value)) == null ? void 0 : _a.dialCode) || "";
28024
- if (props2.mode === "INTERNATIONAL") return `+${dialCode}`;
28025
- return dialCode;
28026
- }
28027
- return phoneNumber.format(props2.mode).replaceAll(" ", "") || "";
28028
- }
28029
- vue.watch(
28030
- () => activeCountry.value,
28031
- (value, oldValue) => {
28032
- if (!value && (oldValue == null ? void 0 : oldValue.iso2)) {
28033
- activeCountryCode.value = oldValue.iso2;
28034
- return;
28035
- }
28036
- if (value == null ? void 0 : value.iso2) emit2("country-changed", value);
28037
- }
28038
- );
28039
- async function initializeCountry() {
28040
- if (props2.defaultCountry) {
28041
- if (typeof props2.defaultCountry === "string") {
28042
- chooseCountry(props2.defaultCountry);
28043
- return;
28044
- }
28045
- if (typeof props2.defaultCountry === "number") {
28046
- const country = findCountryByDialCode(props2.defaultCountry);
28047
- if (country) {
28048
- chooseCountry(country.iso2);
28049
- return;
28050
- }
28051
- }
28052
- }
28053
- const fallbackCountry = sortedCountries.value[0];
28054
- if (props2.autoDefaultCountry) {
28055
- try {
28056
- const res = (await getIp()).country;
28057
- chooseCountry(res || activeCountryCode.value);
28058
- } catch (error) {
28059
- console.warn(error);
28060
- chooseCountry(fallbackCountry.iso2);
28061
- }
28062
- } else {
28063
- chooseCountry(fallbackCountry.iso2);
28064
- }
28065
- }
28066
- vue.onMounted(initializeCountry);
28067
- const findCountry = (iso) => filteredCountries.value.find((country) => country.iso2 === iso.toUpperCase());
28068
- function getCountries(list) {
28069
- const countryList = [];
28070
- list.forEach((countryCode) => {
28071
- const country = findCountry(countryCode);
28072
- if (country) countryList.push(country);
28073
- });
28074
- return countryList;
28075
- }
28076
- function findCountryByDialCode(dialCode) {
28077
- return filteredCountries.value.find((country) => Number(country.dialCode) === dialCode);
28078
- }
28079
- const phoneDropdown = vue.ref();
28080
- function chooseCountry(country) {
28081
- var _a, _b;
28082
- if (!country) return;
28083
- const parsedCountry = findCountry(country);
28084
- if (!parsedCountry) return;
28085
- activeCountryCode.value = parsedCountry.iso2;
28086
- if (((_a = props2.inputOptions) == null ? void 0 : _a.showDialCode) && parsedCountry) {
28087
- phone.value = `+ ${parsedCountry.dialCode}`;
28088
- activeCountryCode.value = parsedCountry.iso2 || "";
28089
- return;
28090
- }
28091
- activeCountryCode.value = parsedCountry.iso2 || "";
28092
- (_b = phoneDropdown.value) == null ? void 0 : _b.hide();
28093
- }
28094
28145
  function onBlur() {
28095
28146
  emit2("blur");
28096
28147
  }
28097
28148
  function onFocus() {
28098
28149
  emit2("focus");
28099
28150
  }
28100
- function onEnter(e) {
28151
+ function onEnter() {
28101
28152
  emit2("enter");
28102
28153
  }
28103
28154
  function onSpace() {
28104
28155
  emit2("space");
28105
28156
  }
28106
- function reset() {
28107
- selectedIndex.value = sortedCountries.value.findIndex(
28108
- (c2) => c2.iso2 === activeCountryCode.value
28109
- );
28110
- open.value = false;
28111
- }
28112
28157
  function handleInput(e) {
28113
28158
  const keyVal = e.key ?? "";
28114
28159
  if (keyVal.length > 1 || e.metaKey) return;
@@ -28116,6 +28161,14 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
28116
28161
  if (!hasBadChars) return;
28117
28162
  e.preventDefault();
28118
28163
  }
28164
+ async function getIp() {
28165
+ const apiData = sessionStorage.getItem("ipapi");
28166
+ if (apiData) return JSON.parse(apiData);
28167
+ const { data: data2 } = await axios$1.get("https://ipapi.co/json/");
28168
+ sessionStorage.setItem("ipapi", JSON.stringify(data2));
28169
+ return data2;
28170
+ }
28171
+ vue.onMounted(initializeCountry);
28119
28172
  return (_ctx, _cache) => {
28120
28173
  return vue.openBlock(), vue.createElementBlock("div", {
28121
28174
  class: vue.normalizeClass(["bagel-input", { disabled: _ctx.disabled, [props2.class || ""]: true }])
@@ -28128,89 +28181,83 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
28128
28181
  tabindex: "-1",
28129
28182
  "aria-label": "Country Code Selector",
28130
28183
  "aria-haspopup": "listbox",
28131
- "aria-expanded": vue.unref(open),
28184
+ "aria-expanded": open.value,
28132
28185
  onKeydown: [
28133
28186
  vue.withKeys(reset, ["esc"]),
28134
28187
  vue.withKeys(reset, ["tab"])
28135
28188
  ]
28136
28189
  }, [
28137
- !computedDropDownOptions.value.hide ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$V), {
28138
- key: 0,
28139
- ref_key: "phoneDropdown",
28140
- ref: phoneDropdown,
28190
+ vue.createVNode(vue.unref(_sfc_main$V), {
28191
+ shown: open.value,
28192
+ "onUpdate:shown": _cache[1] || (_cache[1] = ($event) => open.value = $event),
28141
28193
  placement: "bottom-start",
28142
- disabled: computedDropDownOptions.value.disabled,
28143
- onHide: _cache[2] || (_cache[2] = ($event) => vue.isRef(open) ? open.value = false : open = false)
28194
+ disabled: vue.unref(computedDropDownOptions).disabled
28144
28195
  }, {
28145
28196
  trigger: vue.withCtx(() => [
28146
- vue.createElementVNode("span", {
28147
- class: "flex gap-05",
28148
- onClick: _cache[0] || (_cache[0] = ($event) => vue.isRef(open) ? open.value = true : open = true)
28149
- }, [
28197
+ vue.createElementVNode("span", _hoisted_2$e, [
28150
28198
  vue.createVNode(vue.unref(Icon), {
28151
- icon: vue.unref(open) ? "collapse_all" : "expand_all"
28199
+ icon: open.value ? "collapse_all" : "expand_all"
28152
28200
  }, null, 8, ["icon"]),
28153
- computedDropDownOptions.value.showFlags && vue.unref(activeCountryCode) ? (vue.openBlock(), vue.createBlock(vue.unref(Flag), {
28201
+ vue.unref(computedDropDownOptions).showFlags && vue.unref(activeCountryCode) ? (vue.openBlock(), vue.createBlock(vue.unref(Flag), {
28154
28202
  key: 0,
28155
28203
  country: vue.unref(activeCountryCode)
28156
28204
  }, null, 8, ["country"])) : vue.createCommentVNode("", true)
28157
28205
  ])
28158
28206
  ]),
28159
28207
  default: vue.withCtx(() => [
28160
- vue.createElementVNode("div", _hoisted_2$e, [
28208
+ vue.createElementVNode("div", _hoisted_3$b, [
28161
28209
  _ctx.searchable ? (vue.openBlock(), vue.createBlock(vue.unref(TextInput), {
28162
28210
  key: 0,
28163
- modelValue: searchQuery.value,
28164
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
28211
+ modelValue: vue.unref(searchQuery),
28212
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
28165
28213
  "aria-label": "Search by country name or country code",
28166
28214
  placeholder: "Search",
28167
28215
  icon: "search"
28168
28216
  }, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
28169
28217
  vue.createElementVNode("ul", {
28170
- class: vue.normalizeClass(["overflow-y p-0", dropdownOpenDirection.value]),
28171
- style: { "max-height": "400px" },
28218
+ class: vue.normalizeClass(["overflow-y p-0 max-h-300px", dropdownOpenDirection.value]),
28172
28219
  role: "listbox"
28173
28220
  }, [
28174
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sortedCountries.value, (pb, index2) => {
28221
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(sortedCountries), (pb, index2) => {
28175
28222
  return vue.openBlock(), vue.createElementBlock("li", {
28176
28223
  key: pb.iso2 + isPreferred(pb),
28177
28224
  role: "option",
28178
28225
  class: "flex gap-075",
28179
28226
  tabindex: "-1",
28180
28227
  "aria-selected": vue.unref(activeCountryCode) === pb.iso2 && !isPreferred(pb),
28181
- onClick: ($event) => chooseCountry(pb.iso2),
28182
- onMousemove: ($event) => vue.isRef(selectedIndex) ? selectedIndex.value = index2 : selectedIndex = index2
28228
+ onClick: ($event) => vue.unref(chooseCountry)(pb.iso2),
28229
+ onMousemove: ($event) => selectedIndex.value = index2
28183
28230
  }, [
28184
- computedDropDownOptions.value.showFlags ? (vue.openBlock(), vue.createBlock(vue.unref(Flag), {
28231
+ vue.unref(computedDropDownOptions).showFlags ? (vue.openBlock(), vue.createBlock(vue.unref(Flag), {
28185
28232
  key: 0,
28186
28233
  country: pb.iso2
28187
28234
  }, null, 8, ["country"])) : vue.createCommentVNode("", true),
28188
- vue.createElementVNode("p", _hoisted_4$6, vue.toDisplayString(pb.name), 1),
28189
- computedDropDownOptions.value.showDialCodeInList ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$6, " +" + vue.toDisplayString(pb.dialCode), 1)) : vue.createCommentVNode("", true)
28190
- ], 40, _hoisted_3$b);
28235
+ vue.createElementVNode("p", _hoisted_5$6, vue.toDisplayString(pb.name), 1),
28236
+ vue.unref(computedDropDownOptions).showDialCodeInList ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$5, " +" + vue.toDisplayString(pb.dialCode), 1)) : vue.createCommentVNode("", true)
28237
+ ], 40, _hoisted_4$6);
28191
28238
  }), 128))
28192
28239
  ], 2)
28193
28240
  ])
28194
28241
  ]),
28195
28242
  _: 1
28196
- }, 8, ["disabled"])) : vue.createCommentVNode("", true),
28243
+ }, 8, ["shown", "disabled"]),
28197
28244
  vue.withDirectives(vue.createElementVNode("input", {
28198
28245
  id: _ctx.id,
28199
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => phone.value = $event),
28246
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => phone.value = $event),
28200
28247
  required: _ctx.required,
28201
28248
  placeholder: props2.placeholder || "Enter a phone number",
28202
28249
  disabled: _ctx.disabled,
28203
28250
  type: "tel",
28204
28251
  autocomplete: _ctx.autocomplete,
28205
28252
  class: "vti__input",
28206
- pattern: computedInputOptions.value.pattern,
28207
- minlength: computedInputOptions.value.minlength,
28208
- maxlength: computedInputOptions.value.maxlength,
28209
- name: computedInputOptions.value.name,
28210
- readonly: computedInputOptions.value.readonly,
28211
- tabindex: computedInputOptions.value.tabindex,
28212
- "aria-describedby": computedInputOptions.value["aria-describedby"],
28213
- style: vue.normalizeStyle(computedInputOptions.value.style),
28253
+ pattern: vue.unref(computedInputOptions).pattern,
28254
+ minlength: vue.unref(computedInputOptions).minlength,
28255
+ maxlength: vue.unref(computedInputOptions).maxlength,
28256
+ name: vue.unref(computedInputOptions).name,
28257
+ readonly: vue.unref(computedInputOptions).readonly,
28258
+ tabindex: vue.unref(computedInputOptions).tabindex,
28259
+ "aria-describedby": vue.unref(computedInputOptions)["aria-describedby"],
28260
+ style: vue.normalizeStyle(vue.unref(computedInputOptions).style),
28214
28261
  onBlur,
28215
28262
  onFocus,
28216
28263
  onKeyup: [
@@ -28218,7 +28265,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
28218
28265
  vue.withKeys(onSpace, ["space"])
28219
28266
  ],
28220
28267
  onKeydown: handleInput
28221
- }, null, 44, _hoisted_6$5), [
28268
+ }, null, 44, _hoisted_7$4), [
28222
28269
  [vue.vModelText, phone.value]
28223
28270
  ])
28224
28271
  ], 40, _hoisted_1$o)
@@ -28227,7 +28274,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
28227
28274
  };
28228
28275
  }
28229
28276
  });
28230
- const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-492fcc54"]]);
28277
+ const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-a77caf64"]]);
28231
28278
  const _hoisted_1$n = ["title"];
28232
28279
  const _hoisted_2$d = ["for"];
28233
28280
  const _hoisted_3$a = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
@@ -35431,7 +35478,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
35431
35478
  };
35432
35479
  }
35433
35480
  });
35434
- const Index = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-2976f0c9"]]);
35481
+ const Index = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f204ab99"]]);
35435
35482
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
35436
35483
  __name: "Title",
35437
35484
  props: {
@@ -37269,6 +37316,37 @@ function timeAgo(date2, lang = "en") {
37269
37316
  }
37270
37317
  return selectedLang.justNow;
37271
37318
  }
37319
+ const formatMap = {
37320
+ dd: { type: "day", format: "2-digit" },
37321
+ ddd: { type: "weekday", format: "short" },
37322
+ dddd: { type: "weekday", format: "long" },
37323
+ mm: { type: "month", format: "2-digit" },
37324
+ mmm: { type: "month", format: "short" },
37325
+ mmmm: { type: "month", format: "long" },
37326
+ yy: { type: "year", format: "2-digit" },
37327
+ yyyy: { type: "year", format: "numeric" },
37328
+ HH: { type: "hour", format: "2-digit" },
37329
+ hh: { type: "hour", format: "2-digit" },
37330
+ MM: { type: "minute", format: "2-digit" },
37331
+ ss: { type: "second", format: "2-digit" },
37332
+ ampm: { type: "dayPeriod", format: "short" }
37333
+ };
37334
+ function formatDate(date2, format2 = "dd.mm.yy") {
37335
+ if (!date2) return "";
37336
+ try {
37337
+ const formatParts = format2.split(/[.\s:]/);
37338
+ const formatObject = {};
37339
+ for (const part of formatParts) {
37340
+ const formatInfo = formatMap[part];
37341
+ if (!formatInfo) continue;
37342
+ formatObject[formatInfo.type] = formatInfo.format;
37343
+ }
37344
+ const d2 = typeof date2 === "string" ? new Date(date2) : date2;
37345
+ return d2.toLocaleDateString("he-IL", formatObject);
37346
+ } catch (error) {
37347
+ return "";
37348
+ }
37349
+ }
37272
37350
  exports.Accordion = _sfc_main$1m;
37273
37351
  exports.AccordionItem = AccordionItem;
37274
37352
  exports.AddressSearch = _sfc_main$1k;
@@ -37287,7 +37365,7 @@ exports.Carousel = Carousel;
37287
37365
  exports.CheckInput = CheckInput;
37288
37366
  exports.Checkbox = Checkbox;
37289
37367
  exports.CodeEditor = CodeEditor;
37290
- exports.ColorPicker = _sfc_main$N;
37368
+ exports.ColorInput = _sfc_main$N;
37291
37369
  exports.DataPreview = DataPreview;
37292
37370
  exports.DataTable = DataTable;
37293
37371
  exports.DateInput = DateInput;
@@ -37358,6 +37436,7 @@ exports.classify = classify;
37358
37436
  exports.copyText = copyText;
37359
37437
  exports.debounce = debounce;
37360
37438
  exports.denullify = denullify;
37439
+ exports.formatDate = formatDate;
37361
37440
  exports.formatString = formatString;
37362
37441
  exports.getFallbackSchema = getFallbackSchema;
37363
37442
  exports.getNestedValue = getNestedValue;