@bagelink/vue 0.0.1100 → 0.0.1104

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/dist/index.mjs CHANGED
@@ -45,7 +45,7 @@ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
45
45
  return uploadField;
46
46
  }
47
47
  }, Symbol.toStringTag, { value: "Module" }));
48
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
48
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
49
49
  __name: "Accordion",
50
50
  setup(__props) {
51
51
  const state2 = reactive({
@@ -59,10 +59,10 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
59
59
  };
60
60
  }
61
61
  });
62
- const _hoisted_1$W = ["aria-expanded", "aria-controls"];
63
- const _hoisted_2$C = { class: "accordion-label" };
64
- const _hoisted_3$s = ["id", "aria-hidden"];
65
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
62
+ const _hoisted_1$X = ["aria-expanded", "aria-controls"];
63
+ const _hoisted_2$D = { class: "accordion-label" };
64
+ const _hoisted_3$t = ["id", "aria-hidden"];
65
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
66
66
  __name: "AccordionItem",
67
67
  props: {
68
68
  label: {},
@@ -128,7 +128,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
128
128
  createVNode(unref(_sfc_main$d), { icon: computedIcon.value }, null, 8, ["icon"])
129
129
  ], 2)) : createCommentVNode("", true),
130
130
  renderSlot(_ctx.$slots, "head", {}, () => [
131
- createElementVNode("span", _hoisted_2$C, toDisplayString(_ctx.label), 1)
131
+ createElementVNode("span", _hoisted_2$D, toDisplayString(_ctx.label), 1)
132
132
  ], true),
133
133
  iconPosition.value === "end" ? (openBlock(), createElementBlock("span", {
134
134
  key: 1,
@@ -136,7 +136,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
136
136
  }, [
137
137
  createVNode(unref(_sfc_main$d), { icon: computedIcon.value }, null, 8, ["icon"])
138
138
  ], 2)) : createCommentVNode("", true)
139
- ], 8, _hoisted_1$W),
139
+ ], 8, _hoisted_1$X),
140
140
  createVNode(Transition, { name: "expand" }, {
141
141
  default: withCtx(() => [
142
142
  unref(isOpen) ? (openBlock(), createElementBlock("div", {
@@ -146,7 +146,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
146
146
  "aria-hidden": unref(isOpen) ? "false" : "true"
147
147
  }, [
148
148
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
149
- ], 8, _hoisted_3$s)) : createCommentVNode("", true)
149
+ ], 8, _hoisted_3$t)) : createCommentVNode("", true)
150
150
  ]),
151
151
  _: 3
152
152
  })
@@ -161,9 +161,9 @@ const _export_sfc = (sfc, props2) => {
161
161
  }
162
162
  return target;
163
163
  };
164
- const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-1e73ca3e"]]);
165
- const _hoisted_1$V = { class: "relative" };
166
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
164
+ const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-1e73ca3e"]]);
165
+ const _hoisted_1$W = { class: "relative" };
166
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
167
167
  __name: "AddressSearch",
168
168
  emits: ["addressSelected"],
169
169
  setup(__props, { emit: __emit }) {
@@ -185,8 +185,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
185
185
  (_a2 = suggestion.value) == null ? void 0 : _a2.show();
186
186
  }
187
187
  return (_ctx, _cache) => {
188
- return openBlock(), createElementBlock("div", _hoisted_1$V, [
189
- createVNode(unref(_sfc_main$W), {
188
+ return openBlock(), createElementBlock("div", _hoisted_1$W, [
189
+ createVNode(unref(_sfc_main$X), {
190
190
  ref_key: "suggestion",
191
191
  ref: suggestion,
192
192
  noAutoFocus: true,
@@ -221,11 +221,11 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
221
221
  };
222
222
  }
223
223
  });
224
- const _hoisted_1$U = {
224
+ const _hoisted_1$V = {
225
225
  key: 1,
226
226
  class: "bgl_btn-flex"
227
227
  };
228
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
228
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
229
229
  __name: "Btn",
230
230
  props: {
231
231
  disabled: { type: Boolean, default: false },
@@ -290,7 +290,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
290
290
  _ctx.loading ? (openBlock(), createBlock(unref(Loading), {
291
291
  key: 0,
292
292
  size: "15"
293
- })) : (openBlock(), createElementBlock("div", _hoisted_1$U, [
293
+ })) : (openBlock(), createElementBlock("div", _hoisted_1$V, [
294
294
  _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$d), {
295
295
  key: 0,
296
296
  icon: _ctx.icon
@@ -312,10 +312,10 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
312
312
  };
313
313
  }
314
314
  });
315
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-c23a3626"]]);
316
- const _hoisted_1$T = ["dismissable"];
317
- const _hoisted_2$B = { class: "m-0" };
318
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
315
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-c23a3626"]]);
316
+ const _hoisted_1$U = ["dismissable"];
317
+ const _hoisted_2$C = { class: "m-0" };
318
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
319
319
  __name: "Alert",
320
320
  props: {
321
321
  message: {},
@@ -343,7 +343,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
343
343
  size: 2,
344
344
  color: color2[_ctx.type]
345
345
  }, null, 8, ["icon", "color"])) : createCommentVNode("", true),
346
- createElementVNode("p", _hoisted_2$B, toDisplayString(_ctx.message), 1),
346
+ createElementVNode("p", _hoisted_2$C, toDisplayString(_ctx.message), 1),
347
347
  createVNode(Btn, {
348
348
  flat: "",
349
349
  thin: "",
@@ -351,13 +351,13 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
351
351
  icon: "close",
352
352
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
353
353
  })
354
- ], 10, _hoisted_1$T)) : createCommentVNode("", true);
354
+ ], 10, _hoisted_1$U)) : createCommentVNode("", true);
355
355
  };
356
356
  }
357
357
  });
358
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-57141c32"]]);
359
- const _hoisted_1$S = ["src", "alt"];
360
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
358
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-57141c32"]]);
359
+ const _hoisted_1$T = ["src", "alt"];
360
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
361
361
  __name: "Avatar",
362
362
  props: {
363
363
  fallback: {},
@@ -375,7 +375,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
375
375
  key: 0,
376
376
  src: _ctx.src,
377
377
  alt: _ctx.name
378
- }, null, 8, _hoisted_1$S)) : (openBlock(), createElementBlock("p", {
378
+ }, null, 8, _hoisted_1$T)) : (openBlock(), createElementBlock("p", {
379
379
  key: 1,
380
380
  style: normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
381
381
  }, toDisplayString((_ctx.fallback || unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -383,8 +383,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
383
383
  };
384
384
  }
385
385
  });
386
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-46ad8c25"]]);
387
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
386
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-46ad8c25"]]);
387
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
388
388
  __name: "Badge",
389
389
  props: {
390
390
  color: {},
@@ -413,9 +413,9 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
413
413
  };
414
414
  }
415
415
  });
416
- const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-2f3caf93"]]);
417
- const _hoisted_1$R = { key: 1 };
418
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
416
+ const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-2f3caf93"]]);
417
+ const _hoisted_1$S = { key: 1 };
418
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
419
419
  __name: "BglComponent",
420
420
  props: {
421
421
  field: {},
@@ -435,16 +435,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
435
435
  return TextInput;
436
436
  }
437
437
  if (props2.field.$el === "number") return NumberInput;
438
- if (props2.field.$el === "array") return _sfc_main$P;
438
+ if (props2.field.$el === "array") return _sfc_main$Q;
439
439
  if (props2.field.$el === "select") return SelectInput;
440
440
  if (props2.field.$el === "toggle") return ToggleInput;
441
441
  if (props2.field.$el === "check") return CheckInput;
442
442
  if (props2.field.$el === "richtext") return RichText;
443
443
  if (props2.field.$el === "upload") return UploadInput;
444
444
  if (props2.field.$el === "file") return FileUpload;
445
- if (props2.field.$el === "date") return _sfc_main$K;
445
+ if (props2.field.$el === "date") return _sfc_main$L;
446
446
  if (props2.field.$el === "tabs") return TabsNav;
447
- if (props2.field.$el === "form") return _sfc_main$R;
447
+ if (props2.field.$el === "form") return _sfc_main$S;
448
448
  return props2.field.$el ?? "div";
449
449
  });
450
450
  function getFieldData(path) {
@@ -561,7 +561,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
561
561
  id: [props2.id, child.id].filter(Boolean).join("."),
562
562
  field: child,
563
563
  "parent-path": props2.id
564
- }, null, 8, ["id", "field", "parent-path"])) : (openBlock(), createElementBlock("span", _hoisted_1$R, toDisplayString(child), 1))
564
+ }, null, 8, ["id", "field", "parent-path"])) : (openBlock(), createElementBlock("span", _hoisted_1$S, toDisplayString(child), 1))
565
565
  ], 64);
566
566
  }), 128))
567
567
  ], 64))
@@ -571,10 +571,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
571
571
  };
572
572
  }
573
573
  });
574
- const _hoisted_1$Q = ["src"];
575
- const _hoisted_2$A = ["autoplay", "muted", "loop", "controls", "playsinline"];
576
- const _hoisted_3$r = ["src", "type"];
577
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
574
+ const _hoisted_1$R = ["src"];
575
+ const _hoisted_2$B = ["autoplay", "muted", "loop", "controls", "playsinline"];
576
+ const _hoisted_3$s = ["src", "type"];
577
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
578
578
  __name: "BglVideo",
579
579
  props: {
580
580
  src: {},
@@ -651,7 +651,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
651
651
  allowfullscreen: "",
652
652
  title: "Video",
653
653
  allow: "autoplay"
654
- }, null, 12, _hoisted_1$Q)) : _ctx.src ? (openBlock(), createElementBlock("video", {
654
+ }, null, 12, _hoisted_1$R)) : _ctx.src ? (openBlock(), createElementBlock("video", {
655
655
  key: 1,
656
656
  ref_key: "video",
657
657
  ref: video,
@@ -665,18 +665,18 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
665
665
  createElementVNode("source", {
666
666
  src: _ctx.src,
667
667
  type: `video/${videoFormat.value}`
668
- }, null, 8, _hoisted_3$r)
669
- ], 12, _hoisted_2$A)) : createCommentVNode("", true)
668
+ }, null, 8, _hoisted_3$s)
669
+ ], 12, _hoisted_2$B)) : createCommentVNode("", true)
670
670
  ], 2);
671
671
  };
672
672
  }
673
673
  });
674
- const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-006552f6"]]);
675
- const _hoisted_1$P = {
674
+ const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-006552f6"]]);
675
+ const _hoisted_1$Q = {
676
676
  key: 0,
677
677
  class: "card_label"
678
678
  };
679
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
679
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
680
680
  __name: "Card",
681
681
  props: {
682
682
  label: {},
@@ -705,7 +705,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
705
705
  }])
706
706
  }, {
707
707
  default: withCtx(() => [
708
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$P, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
708
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$Q, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
709
709
  renderSlot(_ctx.$slots, "default")
710
710
  ]),
711
711
  _: 3
@@ -715,18 +715,18 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
715
715
  };
716
716
  }
717
717
  });
718
- const _hoisted_1$O = ["dir"];
719
- const _hoisted_2$z = {
718
+ const _hoisted_1$P = ["dir"];
719
+ const _hoisted_2$A = {
720
720
  key: 0,
721
721
  class: "blocker"
722
722
  };
723
- const _hoisted_3$q = {
723
+ const _hoisted_3$r = {
724
724
  key: 0,
725
725
  class: "dots flex-center gap-05 mt-1"
726
726
  };
727
- const _hoisted_4$i = ["onClick"];
728
- const _hoisted_5$h = { class: "Handlers" };
729
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
727
+ const _hoisted_4$j = ["onClick"];
728
+ const _hoisted_5$i = { class: "Handlers" };
729
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
730
730
  __name: "Carousel",
731
731
  props: {
732
732
  autoHeight: { type: Boolean, default: false },
@@ -904,19 +904,19 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
904
904
  onMouseover: clearAutoplay,
905
905
  onFocusin: clearAutoplay
906
906
  }, [
907
- unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_2$z)) : createCommentVNode("", true),
907
+ unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_2$A)) : createCommentVNode("", true),
908
908
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
909
909
  ], 38),
910
- __props.dots && unref(slideCount) > 1 ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
910
+ __props.dots && unref(slideCount) > 1 ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
911
911
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(slideCount), (i2) => {
912
912
  return openBlock(), createElementBlock("span", {
913
913
  key: i2,
914
914
  class: normalizeClass(["dot cursor", { current: unref(activeSlideIndex) === i2 - 1 }]),
915
915
  onClick: ($event) => goToSlide(i2 - 1)
916
- }, null, 10, _hoisted_4$i);
916
+ }, null, 10, _hoisted_4$j);
917
917
  }), 128))
918
918
  ])) : createCommentVNode("", true),
919
- createElementVNode("div", _hoisted_5$h, [
919
+ createElementVNode("div", _hoisted_5$i, [
920
920
  createElementVNode("span", { onClick: prev }, [
921
921
  renderSlot(_ctx.$slots, "prev", {
922
922
  index: unref(activeSlideIndex),
@@ -930,11 +930,11 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
930
930
  }, void 0, true)
931
931
  ])
932
932
  ])
933
- ], 14, _hoisted_1$O);
933
+ ], 14, _hoisted_1$P);
934
934
  };
935
935
  }
936
936
  });
937
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-063b5ad9"]]);
937
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-063b5ad9"]]);
938
938
  function _isPlaceholder(a2) {
939
939
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
940
940
  }
@@ -5845,7 +5845,7 @@ const _hoisted_4$2$1 = {
5845
5845
  };
5846
5846
  const _hoisted_5$2$1 = ["x1", "y1", "x2", "y2"];
5847
5847
  const _hoisted_6$2$1 = ["x1", "y1", "x2", "y2"];
5848
- const _hoisted_7$9 = ["x1", "y1", "x2", "y2"];
5848
+ const _hoisted_7$a = ["x1", "y1", "x2", "y2"];
5849
5849
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
5850
5850
  return _ctx.data.length ? (openBlock(), createElementBlock("g", {
5851
5851
  key: 0,
@@ -5901,7 +5901,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
5901
5901
  y1: _ctx.canvas.y,
5902
5902
  x2: _ctx.canvas.width - 1,
5903
5903
  y2: _ctx.canvas.height
5904
- }, null, 8, _hoisted_7$9)
5904
+ }, null, 8, _hoisted_7$a)
5905
5905
  ])
5906
5906
  ], 8, _hoisted_1$4$1)) : createCommentVNode("v-if", true);
5907
5907
  }
@@ -6768,10 +6768,10 @@ const _hoisted_1$1$1 = {
6768
6768
  style: { display: "flex", position: "relative" }
6769
6769
  };
6770
6770
  const _hoisted_2$1$1 = ["width", "height", "viewBox"];
6771
- const _hoisted_3$p = { class: "layer-rectangles" };
6772
- const _hoisted_4$h = ["transform", "onMouseover"];
6773
- const _hoisted_5$g = ["width", "height"];
6774
- const _hoisted_6$d = {
6771
+ const _hoisted_3$q = { class: "layer-rectangles" };
6772
+ const _hoisted_4$i = ["transform", "onMouseover"];
6773
+ const _hoisted_5$h = ["width", "height"];
6774
+ const _hoisted_6$e = {
6775
6775
  x: 0 + 10,
6776
6776
  y: 0 + 20,
6777
6777
  "font-size": `15px`,
@@ -6786,7 +6786,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
6786
6786
  viewBox: `0 0 ${_ctx.size.width} ${_ctx.size.height}`,
6787
6787
  ref: "el"
6788
6788
  }, [
6789
- createElementVNode("g", _hoisted_3$p, [
6789
+ createElementVNode("g", _hoisted_3$q, [
6790
6790
  (openBlock(true), createElementBlock(
6791
6791
  Fragment,
6792
6792
  null,
@@ -6807,21 +6807,21 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
6807
6807
  y: 0,
6808
6808
  width: r2.width,
6809
6809
  height: r2.height
6810
- }), null, 16, _hoisted_5$g),
6810
+ }), null, 16, _hoisted_5$h),
6811
6811
  renderSlot(_ctx.$slots, "text", {
6812
6812
  r: r2,
6813
6813
  selected: _ctx.selected === i2
6814
6814
  }, () => [
6815
6815
  createElementVNode(
6816
6816
  "text",
6817
- _hoisted_6$d,
6817
+ _hoisted_6$e,
6818
6818
  toDisplayString(r2.data.name),
6819
6819
  1
6820
6820
  /* TEXT */
6821
6821
  )
6822
6822
  ])
6823
6823
  ])
6824
- ], 42, _hoisted_4$h);
6824
+ ], 42, _hoisted_4$i);
6825
6825
  }),
6826
6826
  128
6827
6827
  /* KEYED_FRAGMENT */
@@ -6878,25 +6878,25 @@ var script = defineComponent({
6878
6878
  return { bar, canvas, direction, mouse };
6879
6879
  }
6880
6880
  });
6881
- const _hoisted_1$N = {
6881
+ const _hoisted_1$O = {
6882
6882
  key: 0,
6883
6883
  class: "layer-hover-bar"
6884
6884
  };
6885
- const _hoisted_2$y = ["x", "y", "width", "height"];
6885
+ const _hoisted_2$z = ["x", "y", "width", "height"];
6886
6886
  function render(_ctx, _cache, $props, $setup, $data, $options) {
6887
- return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$N, [
6887
+ return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$O, [
6888
6888
  createElementVNode("rect", mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
6889
6889
  x: _ctx.bar.x,
6890
6890
  y: _ctx.bar.y,
6891
6891
  width: _ctx.bar.width > 0 ? _ctx.bar.width : 0,
6892
6892
  height: _ctx.bar.height > 0 ? _ctx.bar.height : 0
6893
- }), null, 16, _hoisted_2$y)
6893
+ }), null, 16, _hoisted_2$z)
6894
6894
  ])) : createCommentVNode("v-if", true);
6895
6895
  }
6896
6896
  script.render = render;
6897
6897
  script.__file = "src/components/HoverBar/index.vue";
6898
6898
  const BRAND_COLOR = "var(--bgl-primary)";
6899
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
6899
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
6900
6900
  __name: "Lineart",
6901
6901
  props: {
6902
6902
  data: {},
@@ -7036,28 +7036,28 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
7036
7036
  };
7037
7037
  }
7038
7038
  });
7039
- const _hoisted_1$M = {
7039
+ const _hoisted_1$N = {
7040
7040
  key: 0,
7041
7041
  class: "data"
7042
7042
  };
7043
- const _hoisted_2$x = {
7043
+ const _hoisted_2$y = {
7044
7044
  key: 0,
7045
7045
  class: "data-row m_py-05"
7046
7046
  };
7047
- const _hoisted_3$o = { class: "key" };
7048
- const _hoisted_4$g = { class: "m-0" };
7049
- const _hoisted_5$f = { key: 1 };
7050
- const _hoisted_6$c = {
7047
+ const _hoisted_3$p = { class: "key" };
7048
+ const _hoisted_4$h = { class: "m-0" };
7049
+ const _hoisted_5$g = { key: 1 };
7050
+ const _hoisted_6$d = {
7051
7051
  key: 0,
7052
7052
  class: "data-row"
7053
7053
  };
7054
- const _hoisted_7$8 = { class: "key" };
7055
- const _hoisted_8$5 = { class: "m-0" };
7056
- const _hoisted_9$4 = {
7054
+ const _hoisted_7$9 = { class: "key" };
7055
+ const _hoisted_8$6 = { class: "m-0" };
7056
+ const _hoisted_9$5 = {
7057
7057
  key: 0,
7058
7058
  class: "m-0"
7059
7059
  };
7060
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
7060
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
7061
7061
  __name: "DataPreview",
7062
7062
  props: /* @__PURE__ */ mergeModels({
7063
7063
  showFields: {},
@@ -7093,7 +7093,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7093
7093
  const computedSchema = computed(() => getFallbackSchema([itemData.value], props2.showFields));
7094
7094
  return (_ctx, _cache) => {
7095
7095
  var _a2;
7096
- return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$M, [
7096
+ return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
7097
7097
  _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$4), {
7098
7098
  key: 0,
7099
7099
  label: _ctx.title
@@ -7102,11 +7102,11 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7102
7102
  return openBlock(), createElementBlock(Fragment, {
7103
7103
  key: field.id
7104
7104
  }, [
7105
- unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
7106
- createElementVNode("div", _hoisted_3$o, [
7107
- createElementVNode("p", _hoisted_4$g, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1)
7105
+ unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
7106
+ createElementVNode("div", _hoisted_3$p, [
7107
+ createElementVNode("p", _hoisted_4$h, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1)
7108
7108
  ]),
7109
- createVNode(unref(_sfc_main$S), {
7109
+ createVNode(unref(_sfc_main$T), {
7110
7110
  modelValue: itemData.value,
7111
7111
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => itemData.value = $event),
7112
7112
  label: "",
@@ -7116,15 +7116,15 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7116
7116
  ])) : createCommentVNode("", true)
7117
7117
  ], 64);
7118
7118
  }), 128)),
7119
- !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
7119
+ !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
7120
7120
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, ({ id, label }) => {
7121
7121
  return openBlock(), createElementBlock(Fragment, { key: id }, [
7122
- !isUnset(itemData.value[id]) ? (openBlock(), createElementBlock("div", _hoisted_6$c, [
7123
- createElementVNode("div", _hoisted_7$8, [
7124
- createElementVNode("p", _hoisted_8$5, toDisplayString(label), 1)
7122
+ !isUnset(itemData.value[id]) ? (openBlock(), createElementBlock("div", _hoisted_6$d, [
7123
+ createElementVNode("div", _hoisted_7$9, [
7124
+ createElementVNode("p", _hoisted_8$6, toDisplayString(label), 1)
7125
7125
  ]),
7126
7126
  createElementVNode("div", null, [
7127
- id ? (openBlock(), createElementBlock("p", _hoisted_9$4, toDisplayString(dataTransform(itemData.value[id])), 1)) : createCommentVNode("", true)
7127
+ id ? (openBlock(), createElementBlock("p", _hoisted_9$5, toDisplayString(dataTransform(itemData.value[id])), 1)) : createCommentVNode("", true)
7128
7128
  ])
7129
7129
  ])) : createCommentVNode("", true)
7130
7130
  ], 64);
@@ -7135,7 +7135,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7135
7135
  };
7136
7136
  }
7137
7137
  });
7138
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-6c27f163"]]);
7138
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-6c27f163"]]);
7139
7139
  const sides = ["top", "right", "bottom", "left"];
7140
7140
  const alignments = ["start", "end"];
7141
7141
  const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
@@ -9682,7 +9682,7 @@ const Gt$1 = {
9682
9682
  install: Ct$1,
9683
9683
  options: h
9684
9684
  };
9685
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
9685
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
9686
9686
  __name: "Dropdown",
9687
9687
  props: /* @__PURE__ */ mergeModels({
9688
9688
  value: {},
@@ -9709,15 +9709,17 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9709
9709
  setup(__props, { expose: __expose, emit: __emit }) {
9710
9710
  const emit2 = __emit;
9711
9711
  const ddownRef = ref();
9712
+ const triggerRef = ref();
9712
9713
  const shown = useModel(__props, "shown");
9713
9714
  const show = () => {
9714
9715
  var _a2;
9715
9716
  return (_a2 = ddownRef.value) == null ? void 0 : _a2.show();
9716
9717
  };
9717
- const hide = () => {
9718
- var _a2;
9719
- return (_a2 = ddownRef.value) == null ? void 0 : _a2.hide();
9720
- };
9718
+ function hide() {
9719
+ var _a2, _b;
9720
+ (_a2 = triggerRef.value) == null ? void 0 : _a2.focus();
9721
+ (_b = ddownRef.value) == null ? void 0 : _b.hide();
9722
+ }
9721
9723
  __expose({ show, hide, shown });
9722
9724
  return (_ctx, _cache) => {
9723
9725
  return openBlock(), createBlock(unref(kt$1), {
@@ -9738,6 +9740,10 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9738
9740
  })
9739
9741
  ]),
9740
9742
  default: withCtx(() => [
9743
+ createElementVNode("div", {
9744
+ ref_key: "triggerRef",
9745
+ ref: triggerRef
9746
+ }, null, 512),
9741
9747
  renderSlot(_ctx.$slots, "trigger", {}, () => [
9742
9748
  createVNode(unref(Btn), {
9743
9749
  class: normalizeClass(_ctx.triggerClass),
@@ -9754,9 +9760,9 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9754
9760
  };
9755
9761
  }
9756
9762
  });
9757
- const _hoisted_1$L = { class: "px-1 pt-025 pb-1" };
9758
- const _hoisted_2$w = { class: "ms-1" };
9759
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
9763
+ const _hoisted_1$M = { class: "px-1 pt-025 pb-1" };
9764
+ const _hoisted_2$x = { class: "ms-1" };
9765
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9760
9766
  __name: "FieldSetVue",
9761
9767
  props: {
9762
9768
  label: {},
@@ -9764,15 +9770,15 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9764
9770
  },
9765
9771
  setup(__props) {
9766
9772
  return (_ctx, _cache) => {
9767
- return openBlock(), createElementBlock("fieldset", _hoisted_1$L, [
9768
- createElementVNode("legend", _hoisted_2$w, toDisplayString(_ctx.legend || _ctx.label), 1),
9773
+ return openBlock(), createElementBlock("fieldset", _hoisted_1$M, [
9774
+ createElementVNode("legend", _hoisted_2$x, toDisplayString(_ctx.legend || _ctx.label), 1),
9769
9775
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
9770
9776
  ]);
9771
9777
  };
9772
9778
  }
9773
9779
  });
9774
- const FieldSetVue = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-f7e758e5"]]);
9775
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
9780
+ const FieldSetVue = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-f7e758e5"]]);
9781
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9776
9782
  __name: "Flag",
9777
9783
  props: {
9778
9784
  country: {},
@@ -9802,7 +9808,92 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
9802
9808
  };
9803
9809
  }
9804
9810
  });
9805
- const Flag = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-f99f1900"]]);
9811
+ const Flag = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-f99f1900"]]);
9812
+ const FORM_STATE_KEY = Symbol("bagelFormState");
9813
+ function safeClone(obj) {
9814
+ if (obj === null || typeof obj !== "object") return obj;
9815
+ const seen = /* @__PURE__ */ new WeakSet();
9816
+ return JSON.parse(JSON.stringify(obj, (key, value) => {
9817
+ if (typeof value === "object" && value !== null) {
9818
+ if (seen.has(value)) {
9819
+ return void 0;
9820
+ }
9821
+ seen.add(value);
9822
+ }
9823
+ return value;
9824
+ }));
9825
+ }
9826
+ function provideBagelFormState(initialData) {
9827
+ const data2 = ref(initialData);
9828
+ const isDirty = ref(false);
9829
+ const getFieldData = (path) => {
9830
+ if (!path) return "";
9831
+ const keys4 = path.split(/[.[]/);
9832
+ let current = data2.value;
9833
+ for (let i2 = 0; i2 < keys4.length; i2++) {
9834
+ const key = keys4[i2];
9835
+ if (!current || typeof current !== "object" || !(key in current)) {
9836
+ return "";
9837
+ }
9838
+ current = current[key];
9839
+ }
9840
+ return current ?? "";
9841
+ };
9842
+ const updateField = (path, value) => {
9843
+ const keys4 = path.split(/[.[]/);
9844
+ if (typeof data2.value !== "object" || data2.value === null) {
9845
+ data2.value = {};
9846
+ }
9847
+ let current = data2.value;
9848
+ for (let i2 = 0; i2 < keys4.length - 1; i2++) {
9849
+ const key = keys4[i2];
9850
+ if (!(key in current) || typeof current[key] !== "object" || current[key] === null) {
9851
+ current[key] = {};
9852
+ }
9853
+ current = current[key];
9854
+ }
9855
+ const safeValue = safeClone(value);
9856
+ current[keys4[keys4.length - 1]] = safeValue;
9857
+ isDirty.value = true;
9858
+ };
9859
+ const state2 = {
9860
+ data: data2,
9861
+ getFieldData,
9862
+ updateField,
9863
+ isDirty
9864
+ };
9865
+ provide(FORM_STATE_KEY, state2);
9866
+ return state2;
9867
+ }
9868
+ function useBagelFormState() {
9869
+ const state2 = inject(FORM_STATE_KEY);
9870
+ if (!state2) throw new Error("BagelFormState must be provided");
9871
+ return state2;
9872
+ }
9873
+ function useFormField(props2) {
9874
+ const formState = inject(FORM_STATE_KEY);
9875
+ const fieldData = computed({
9876
+ get: () => {
9877
+ if (!props2.fieldID || !formState) return props2.modelValue ?? props2.field.defaultValue ?? "";
9878
+ const value = formState.getFieldData(props2.fieldID);
9879
+ if (props2.field.$el === "form" && !value) return {};
9880
+ return value ?? "";
9881
+ },
9882
+ set: (val) => {
9883
+ if (!props2.fieldID || !formState) return;
9884
+ const currentValue = formState.getFieldData(props2.fieldID);
9885
+ if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
9886
+ if (props2.field.onUpdate) {
9887
+ props2.field.onUpdate(val, currentValue);
9888
+ }
9889
+ formState.updateField(props2.fieldID, val);
9890
+ }
9891
+ });
9892
+ return {
9893
+ fieldData,
9894
+ formState
9895
+ };
9896
+ }
9806
9897
  const state$1 = reactive(/* @__PURE__ */ new Map());
9807
9898
  function useTabs(group) {
9808
9899
  if (!state$1.has(group)) {
@@ -9816,8 +9907,8 @@ function useTabs(group) {
9816
9907
  });
9817
9908
  return { currentTab };
9818
9909
  }
9819
- const _hoisted_1$K = ["onClick"];
9820
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
9910
+ const _hoisted_1$L = ["onClick"];
9911
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
9821
9912
  __name: "TabsNav",
9822
9913
  props: {
9823
9914
  title: {},
@@ -9899,77 +9990,16 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
9899
9990
  icon: tab.icon
9900
9991
  }, null, 8, ["icon"])) : createCommentVNode("", true),
9901
9992
  createTextVNode(" " + toDisplayString(tabLabel(tab)), 1)
9902
- ], 10, _hoisted_1$K);
9993
+ ], 10, _hoisted_1$L);
9903
9994
  }), 128))
9904
9995
  ], true)
9905
9996
  ], 2);
9906
9997
  };
9907
9998
  }
9908
9999
  });
9909
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-307612a9"]]);
9910
- const FORM_STATE_KEY = Symbol("bagelFormState");
9911
- function safeClone(obj) {
9912
- if (obj === null || typeof obj !== "object") return obj;
9913
- const seen = /* @__PURE__ */ new WeakSet();
9914
- return JSON.parse(JSON.stringify(obj, (key, value) => {
9915
- if (typeof value === "object" && value !== null) {
9916
- if (seen.has(value)) {
9917
- return void 0;
9918
- }
9919
- seen.add(value);
9920
- }
9921
- return value;
9922
- }));
9923
- }
9924
- function provideBagelFormState(initialData) {
9925
- const data2 = ref(initialData);
9926
- const isDirty = ref(false);
9927
- const getFieldData = (path) => {
9928
- if (!path) return "";
9929
- const keys4 = path.split(/[.[]/);
9930
- let current = data2.value;
9931
- for (let i2 = 0; i2 < keys4.length; i2++) {
9932
- const key = keys4[i2];
9933
- if (!current || typeof current !== "object" || !(key in current)) {
9934
- return "";
9935
- }
9936
- current = current[key];
9937
- }
9938
- return current ?? "";
9939
- };
9940
- const updateField = (path, value) => {
9941
- const keys4 = path.split(/[.[]/);
9942
- if (typeof data2.value !== "object" || data2.value === null) {
9943
- data2.value = {};
9944
- }
9945
- let current = data2.value;
9946
- for (let i2 = 0; i2 < keys4.length - 1; i2++) {
9947
- const key = keys4[i2];
9948
- if (!(key in current) || typeof current[key] !== "object" || current[key] === null) {
9949
- current[key] = {};
9950
- }
9951
- current = current[key];
9952
- }
9953
- const safeValue = safeClone(value);
9954
- current[keys4[keys4.length - 1]] = safeValue;
9955
- isDirty.value = true;
9956
- };
9957
- const state2 = {
9958
- data: data2,
9959
- getFieldData,
9960
- updateField,
9961
- isDirty
9962
- };
9963
- provide(FORM_STATE_KEY, state2);
9964
- return state2;
9965
- }
9966
- function useBagelFormState() {
9967
- const state2 = inject(FORM_STATE_KEY);
9968
- if (!state2) throw new Error("BagelFormState must be provided");
9969
- return state2;
9970
- }
9971
- const _hoisted_1$J = { key: 1 };
9972
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
10000
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-307612a9"]]);
10001
+ const _hoisted_1$K = { key: 1 };
10002
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
9973
10003
  __name: "BglField",
9974
10004
  props: {
9975
10005
  field: {},
@@ -9980,8 +10010,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9980
10010
  emits: ["update:modelValue"],
9981
10011
  setup(__props, { emit: __emit }) {
9982
10012
  const props2 = __props;
9983
- const emit2 = __emit;
9984
- const formState = inject(FORM_STATE_KEY) ?? provideBagelFormState(props2.modelValue);
10013
+ const { fieldData } = useFormField(props2);
9985
10014
  const customAttrs = ref({});
9986
10015
  const is4 = computed(() => {
9987
10016
  if (props2.field.$el === "text") return TextInput;
@@ -9990,62 +10019,36 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9990
10019
  return TextInput;
9991
10020
  }
9992
10021
  if (props2.field.$el === "number") return NumberInput;
9993
- if (props2.field.$el === "array") return _sfc_main$P;
10022
+ if (props2.field.$el === "array") return _sfc_main$Q;
9994
10023
  if (props2.field.$el === "select") return SelectInput;
9995
10024
  if (props2.field.$el === "toggle") return ToggleInput;
9996
10025
  if (props2.field.$el === "check") return CheckInput;
9997
10026
  if (props2.field.$el === "richtext") return RichText;
9998
10027
  if (props2.field.$el === "upload") return UploadInput;
9999
10028
  if (props2.field.$el === "file") return FileUpload;
10000
- if (props2.field.$el === "date") return _sfc_main$K;
10029
+ if (props2.field.$el === "date") return _sfc_main$L;
10001
10030
  if (props2.field.$el === "tabs") return TabsNav;
10002
- if (props2.field.$el === "bglform") return _sfc_main$R;
10031
+ if (props2.field.$el === "bglform") return _sfc_main$S;
10003
10032
  return props2.field.$el ?? "div";
10004
10033
  });
10005
- const fieldData = computed({
10006
- get: () => {
10007
- if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
10008
- const value = formState.getFieldData(props2.fieldID);
10009
- if (props2.field.$el === "form" && !value) return {};
10010
- return value ?? "";
10011
- },
10012
- set: (val) => {
10013
- if (!props2.fieldID) return;
10014
- const currentValue = formState.getFieldData(props2.fieldID);
10015
- if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
10016
- emit2("update:modelValue", val);
10017
- if (props2.field.onUpdate) {
10018
- props2.field.onUpdate(val, currentValue);
10019
- }
10020
- formState.updateField(props2.fieldID, val);
10021
- }
10022
- });
10023
- const vIf = computed(() => {
10024
- if (props2.field["v-if"] === void 0 && props2.field.vIf === void 0) return true;
10025
- if (typeof props2.field["v-if"] === "boolean" || typeof props2.field.vIf === "boolean") return props2.field["v-if"];
10026
- if (typeof props2.field["v-if"] === "string" || typeof props2.field.vIf === "string") return true;
10027
- if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState.data.value);
10028
- if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState.data.value);
10029
- return true;
10030
- });
10031
10034
  const computedOptions = computed(
10032
- () => bindAttrs({ options: props2.field.options }, fieldData.value, formState.data.value).options
10035
+ () => bindAttrs({ options: props2.field.options }, fieldData, props2.modelValue).options
10033
10036
  );
10034
10037
  const computedAttrs = computed(() => {
10035
10038
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10036
- return bindAttrs(attrs, fieldData.value, formState.data.value);
10039
+ return bindAttrs(attrs, fieldData, props2.modelValue);
10037
10040
  });
10038
10041
  const computedClass = computed(
10039
10042
  () => {
10040
10043
  var _a2;
10041
- return classify(fieldData.value, formState.data.value, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10044
+ return classify(fieldData, props2.modelValue, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10042
10045
  }
10043
10046
  );
10044
10047
  return (_ctx, _cache) => {
10045
10048
  const _component_BglField = resolveComponent("BglField", true);
10046
- return vIf.value ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10047
- modelValue: fieldData.value,
10048
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fieldData.value = $event),
10049
+ return _ctx.field.vIf === void 0 || _ctx.field.vIf ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10050
+ modelValue: unref(fieldData),
10051
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(fieldData) ? fieldData.value = $event : null),
10049
10052
  fieldID: props2.fieldID,
10050
10053
  required: _ctx.field.required,
10051
10054
  class: computedClass.value,
@@ -10064,7 +10067,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10064
10067
  fieldID: [props2.fieldID, child.id].filter(Boolean).join("."),
10065
10068
  field: child,
10066
10069
  "parent-path": props2.fieldID
10067
- }, null, 8, ["fieldID", "field", "parent-path"])) : (openBlock(), createElementBlock("span", _hoisted_1$J, toDisplayString(child), 1))
10070
+ }, null, 8, ["fieldID", "field", "parent-path"])) : (openBlock(), createElementBlock("span", _hoisted_1$K, toDisplayString(child), 1))
10068
10071
  ], 64);
10069
10072
  }), 128))
10070
10073
  ]),
@@ -10073,7 +10076,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10073
10076
  };
10074
10077
  }
10075
10078
  });
10076
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
10079
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10077
10080
  __name: "BglForm",
10078
10081
  props: {
10079
10082
  label: {},
@@ -10103,7 +10106,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10103
10106
  }
10104
10107
  data2.value = newVal;
10105
10108
  }, { deep: true, immediate: true });
10106
- watch(() => data2, (newVal) => {
10109
+ watch(() => data2.value, (newVal) => {
10107
10110
  if (emitDirty.value) return;
10108
10111
  emitDirty.value = true;
10109
10112
  emit2("dirty");
@@ -10175,7 +10178,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10175
10178
  return openBlock(), createElementBlock(Fragment, null, [
10176
10179
  _ctx.tag === "template" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10177
10180
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, (field, i2) => {
10178
- return openBlock(), createBlock(unref(_sfc_main$S), {
10181
+ return openBlock(), createBlock(unref(_sfc_main$T), {
10179
10182
  key: field.id || `${i2}p`,
10180
10183
  fieldID: field.id,
10181
10184
  field
@@ -10198,7 +10201,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10198
10201
  label: _ctx.label
10199
10202
  }, null, 8, ["label"])) : createCommentVNode("", true),
10200
10203
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, (field, i2) => {
10201
- return openBlock(), createBlock(unref(_sfc_main$S), {
10204
+ return openBlock(), createBlock(unref(_sfc_main$T), {
10202
10205
  key: field.id || `${i2}p`,
10203
10206
  fieldID: field.id,
10204
10207
  field
@@ -10216,8 +10219,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10216
10219
  };
10217
10220
  }
10218
10221
  });
10219
- const _hoisted_1$I = { key: 0 };
10220
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10222
+ const _hoisted_1$J = { key: 0 };
10223
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10221
10224
  __name: "BglMultiStepForm",
10222
10225
  props: /* @__PURE__ */ mergeModels({
10223
10226
  bagelFormProps: { default: () => ({}) },
@@ -10284,8 +10287,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10284
10287
  mode: "out-in"
10285
10288
  }, {
10286
10289
  default: withCtx(() => [
10287
- !unref(isStepping) ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
10288
- createVNode(unref(_sfc_main$R), mergeProps({
10290
+ !unref(isStepping) ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
10291
+ createVNode(unref(_sfc_main$S), mergeProps({
10289
10292
  ref_key: "formRef",
10290
10293
  ref: formRef,
10291
10294
  modelValue: formData.value,
@@ -10324,12 +10327,12 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10324
10327
  };
10325
10328
  }
10326
10329
  });
10327
- const _hoisted_1$H = { class: "label mb-05" };
10328
- const _hoisted_2$v = {
10330
+ const _hoisted_1$I = { class: "label mb-05" };
10331
+ const _hoisted_2$w = {
10329
10332
  key: 0,
10330
10333
  class: "-ms-05 ps-05 border-start"
10331
10334
  };
10332
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
10335
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10333
10336
  __name: "FieldArray",
10334
10337
  props: {
10335
10338
  el: { default: "div" },
@@ -10386,8 +10389,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10386
10389
  return openBlock(), createElementBlock("div", {
10387
10390
  class: normalizeClass(props2.class)
10388
10391
  }, [
10389
- createElementVNode("p", _hoisted_1$H, toDisplayString(_ctx.label), 1),
10390
- _ctx.schema ? (openBlock(), createElementBlock("div", _hoisted_2$v, [
10392
+ createElementVNode("p", _hoisted_1$I, toDisplayString(_ctx.label), 1),
10393
+ _ctx.schema ? (openBlock(), createElementBlock("div", _hoisted_2$w, [
10391
10394
  (openBlock(true), createElementBlock(Fragment, null, renderList(data2.value, (_2, i2) => {
10392
10395
  return openBlock(), createElementBlock("div", {
10393
10396
  key: i2,
@@ -10395,7 +10398,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10395
10398
  thin: "",
10396
10399
  class: "mb-05 itemBox transition p-05"
10397
10400
  }, [
10398
- createVNode(unref(_sfc_main$R), {
10401
+ createVNode(unref(_sfc_main$S), {
10399
10402
  modelValue: data2.value[i2],
10400
10403
  "onUpdate:modelValue": [($event) => data2.value[i2] = $event, emitValue],
10401
10404
  schema: _ctx.schema
@@ -10425,7 +10428,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10425
10428
  _: 1
10426
10429
  })) : createCommentVNode("", true)
10427
10430
  ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(data2.value, (_2, i2) => {
10428
- return openBlock(), createBlock(unref(_sfc_main$S), {
10431
+ return openBlock(), createBlock(unref(_sfc_main$T), {
10429
10432
  key: i2,
10430
10433
  modelValue: data2.value[i2],
10431
10434
  "onUpdate:modelValue": [($event) => data2.value[i2] = $event, emitValue],
@@ -10436,8 +10439,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10436
10439
  };
10437
10440
  }
10438
10441
  });
10439
- const _hoisted_1$G = { class: "primary-checkbox" };
10440
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
10442
+ const _hoisted_1$H = { class: "primary-checkbox" };
10443
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10441
10444
  __name: "Checkbox",
10442
10445
  props: {
10443
10446
  "modelValue": { type: Boolean, ...{ default: false } },
@@ -10447,7 +10450,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10447
10450
  setup(__props) {
10448
10451
  const val = useModel(__props, "modelValue");
10449
10452
  return (_ctx, _cache) => {
10450
- return openBlock(), createElementBlock("label", _hoisted_1$G, [
10453
+ return openBlock(), createElementBlock("label", _hoisted_1$H, [
10451
10454
  renderSlot(_ctx.$slots, "label", {}, void 0, true),
10452
10455
  withDirectives(createElementVNode("input", {
10453
10456
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => val.value = $event),
@@ -10459,11 +10462,11 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10459
10462
  };
10460
10463
  }
10461
10464
  });
10462
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-73f1d9ad"]]);
10463
- const _hoisted_1$F = ["title"];
10464
- const _hoisted_2$u = ["id", "value", "required"];
10465
- const _hoisted_3$n = ["for"];
10466
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
10465
+ const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-73f1d9ad"]]);
10466
+ const _hoisted_1$G = ["title"];
10467
+ const _hoisted_2$v = ["id", "value", "required"];
10468
+ const _hoisted_3$o = ["for"];
10469
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10467
10470
  __name: "CheckInput",
10468
10471
  props: /* @__PURE__ */ mergeModels({
10469
10472
  label: {},
@@ -10497,32 +10500,32 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10497
10500
  required: _ctx.required,
10498
10501
  type: "checkbox",
10499
10502
  class: "me-05"
10500
- }, null, 8, _hoisted_2$u), [
10503
+ }, null, 8, _hoisted_2$v), [
10501
10504
  [vModelCheckbox, checked.value]
10502
10505
  ]),
10503
10506
  createElementVNode("label", { for: inputId.value }, [
10504
10507
  renderSlot(_ctx.$slots, "label", {}, () => [
10505
10508
  createTextVNode(toDisplayString(_ctx.label), 1)
10506
10509
  ], true)
10507
- ], 8, _hoisted_3$n)
10508
- ], 10, _hoisted_1$F);
10510
+ ], 8, _hoisted_3$o)
10511
+ ], 10, _hoisted_1$G);
10509
10512
  };
10510
10513
  }
10511
10514
  });
10512
- const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-03ed2982"]]);
10513
- const _hoisted_1$E = { class: "mb-05" };
10514
- const _hoisted_2$t = {
10515
+ const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-03ed2982"]]);
10516
+ const _hoisted_1$F = { class: "mb-05" };
10517
+ const _hoisted_2$u = {
10515
10518
  key: 0,
10516
10519
  class: "label txt-start"
10517
10520
  };
10518
- const _hoisted_3$m = {
10521
+ const _hoisted_3$n = {
10519
10522
  key: 1,
10520
10523
  class: "code-editor-wrap grid rounded p-1 overflow hm-300px ltr txt-start relative h-100p"
10521
10524
  };
10522
- const _hoisted_4$f = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
10523
- const _hoisted_5$e = ["innerHTML"];
10524
- const _hoisted_6$b = ["onKeydown"];
10525
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
10525
+ const _hoisted_4$g = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
10526
+ const _hoisted_5$f = ["innerHTML"];
10527
+ const _hoisted_6$c = ["onKeydown"];
10528
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10526
10529
  __name: "Index",
10527
10530
  props: {
10528
10531
  language: {},
@@ -10604,19 +10607,19 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10604
10607
  }
10605
10608
  }, { immediate: true });
10606
10609
  return (_ctx, _cache) => {
10607
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
10608
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$t, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
10609
- unref(loaded) ? (openBlock(), createElementBlock("div", _hoisted_3$m, [
10610
+ return openBlock(), createElementBlock("div", _hoisted_1$F, [
10611
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$u, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
10612
+ unref(loaded) ? (openBlock(), createElementBlock("div", _hoisted_3$n, [
10610
10613
  createElementVNode("div", {
10611
10614
  class: "relative block h-100",
10612
10615
  style: normalizeStyle({ height: `calc(${unref(elHeight)} - 2rem)` })
10613
10616
  }, [
10614
- createElementVNode("pre", _hoisted_4$f, [
10617
+ createElementVNode("pre", _hoisted_4$g, [
10615
10618
  _cache[2] || (_cache[2] = createTextVNode(" ")),
10616
10619
  createElementVNode("code", {
10617
10620
  class: normalizeClass(["absolute inset-0", className.value]),
10618
10621
  innerHTML: highlightedCode.value
10619
- }, null, 10, _hoisted_5$e),
10622
+ }, null, 10, _hoisted_5$f),
10620
10623
  _cache[3] || (_cache[3] = createTextVNode("\n "))
10621
10624
  ]),
10622
10625
  !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("textarea", {
@@ -10631,7 +10634,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10631
10634
  "data-gramm": "false",
10632
10635
  onKeydown: withKeys(withModifiers(handleTab, ["prevent"]), ["tab"]),
10633
10636
  onInput: _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", unref(code)))
10634
- }, null, 40, _hoisted_6$b)), [
10637
+ }, null, 40, _hoisted_6$c)), [
10635
10638
  [vModelText, unref(code)]
10636
10639
  ]) : createCommentVNode("", true)
10637
10640
  ], 4)
@@ -10640,10 +10643,10 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10640
10643
  };
10641
10644
  }
10642
10645
  });
10643
- const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-1fbc9b61"]]);
10644
- const _hoisted_1$D = ["title"];
10645
- const _hoisted_2$s = ["id", "placeholder", "required"];
10646
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
10646
+ const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-1fbc9b61"]]);
10647
+ const _hoisted_1$E = ["title"];
10648
+ const _hoisted_2$t = ["id", "placeholder", "required"];
10649
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10647
10650
  __name: "ColorPicker",
10648
10651
  props: {
10649
10652
  label: {},
@@ -10681,11 +10684,11 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
10681
10684
  placeholder: _ctx.placeholder || _ctx.label,
10682
10685
  class: { "no-edit": !_ctx.editMode },
10683
10686
  required: _ctx.required
10684
- }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$s), [
10687
+ }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$t), [
10685
10688
  [vModelText, inputVal.value]
10686
10689
  ])
10687
10690
  ])
10688
- ], 10, _hoisted_1$D)) : createCommentVNode("", true);
10691
+ ], 10, _hoisted_1$E)) : createCommentVNode("", true);
10689
10692
  };
10690
10693
  }
10691
10694
  });
@@ -19243,9 +19246,9 @@ const eo = ({
19243
19246
  Object.entries(go).forEach(([e, t]) => {
19244
19247
  e !== "default" && (Hn[e] = t);
19245
19248
  });
19246
- const _hoisted_1$C = ["title"];
19247
- const _hoisted_2$r = { key: 0 };
19248
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
19249
+ const _hoisted_1$D = ["title"];
19250
+ const _hoisted_2$s = { key: 0 };
19251
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
19249
19252
  __name: "DateInput",
19250
19253
  props: {
19251
19254
  required: { type: Boolean },
@@ -19287,7 +19290,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
19287
19290
  class: normalizeClass(["bagel-input", { small: _ctx.small }]),
19288
19291
  title: _ctx.label
19289
19292
  }, [
19290
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$r, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
19293
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$s, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
19291
19294
  createVNode(unref(Hn), mergeProps({
19292
19295
  ref_key: "datePicker",
19293
19296
  ref: datePicker,
@@ -19303,10 +19306,374 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
19303
19306
  "minutes-grid-increment": _ctx.minutesGridIncrement,
19304
19307
  "start-time": { hours: 8, minutes: 0 }
19305
19308
  }), null, 16, ["modelValue", "required", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
19309
+ ], 10, _hoisted_1$D);
19310
+ };
19311
+ }
19312
+ });
19313
+ const _hoisted_1$C = ["title"];
19314
+ const _hoisted_2$r = { key: 0 };
19315
+ const _hoisted_3$m = {
19316
+ key: 0,
19317
+ class: "required"
19318
+ };
19319
+ const _hoisted_4$f = { class: "date-picker-container" };
19320
+ const _hoisted_5$e = ["type", "value", "min", "max", "required", "disabled"];
19321
+ const _hoisted_6$b = { class: "calendar-container" };
19322
+ const _hoisted_7$8 = { class: "calendar-section" };
19323
+ const _hoisted_8$5 = { class: "calendar-header" };
19324
+ const _hoisted_9$4 = { class: "month-year-selector" };
19325
+ const _hoisted_10$4 = { class: "month-year" };
19326
+ const _hoisted_11$3 = {
19327
+ key: 0,
19328
+ class: "calendar-grid"
19329
+ };
19330
+ const _hoisted_12$3 = ["disabled", "onClick"];
19331
+ const _hoisted_13$3 = {
19332
+ key: 1,
19333
+ class: "month-grid"
19334
+ };
19335
+ const _hoisted_14$2 = ["disabled", "onClick"];
19336
+ const _hoisted_15$1 = {
19337
+ key: 2,
19338
+ class: "year-grid"
19339
+ };
19340
+ const _hoisted_16 = ["disabled", "onClick"];
19341
+ const _hoisted_17 = {
19342
+ key: 0,
19343
+ class: "time-picker"
19344
+ };
19345
+ const _hoisted_18 = { class: "time-input-group" };
19346
+ const _hoisted_19 = { class: "timezone-display" };
19347
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
19348
+ __name: "DatePick",
19349
+ props: {
19350
+ required: { type: Boolean },
19351
+ label: {},
19352
+ editMode: { type: Boolean, default: true },
19353
+ small: { type: Boolean, default: false },
19354
+ enableTime: { type: Boolean, default: false },
19355
+ modelValue: {},
19356
+ min: {},
19357
+ max: {},
19358
+ timezone: { default: "UTC" }
19359
+ },
19360
+ emits: ["update:modelValue"],
19361
+ setup(__props, { emit: __emit }) {
19362
+ const props2 = __props;
19363
+ const emit2 = __emit;
19364
+ let isOpen = ref(false);
19365
+ let currentMonth = ref(/* @__PURE__ */ new Date());
19366
+ let currentView = ref("days");
19367
+ const inputType = computed(() => props2.enableTime ? "datetime-local" : "date");
19368
+ function formatDate(date2) {
19369
+ if (!date2) return "";
19370
+ const dateObj = typeof date2 === "string" ? new Date(date2) : date2;
19371
+ return props2.enableTime ? dateObj.toISOString().slice(0, 16) : dateObj.toISOString().split("T")[0];
19372
+ }
19373
+ const formattedValue = computed(() => formatDate(props2.modelValue));
19374
+ const formattedMin = computed(() => formatDate(props2.min));
19375
+ const formattedMax = computed(() => formatDate(props2.max));
19376
+ const selectedDate = computed(() => {
19377
+ if (!props2.modelValue) return null;
19378
+ return typeof props2.modelValue === "string" ? new Date(props2.modelValue) : props2.modelValue;
19379
+ });
19380
+ const currentMonthDays = computed(() => {
19381
+ const year = currentMonth.value.getFullYear();
19382
+ const month = currentMonth.value.getMonth();
19383
+ const firstDay = new Date(year, month, 1);
19384
+ const lastDay = new Date(year, month + 1, 0);
19385
+ const days = [];
19386
+ for (let i2 = 0; i2 < firstDay.getDay(); i2++) days.push(null);
19387
+ for (let i2 = 1; i2 <= lastDay.getDate(); i2++) days.push(new Date(year, month, i2));
19388
+ return days;
19389
+ });
19390
+ const currentMonthValue = computed(() => ({
19391
+ month: currentMonth.value.getMonth(),
19392
+ year: currentMonth.value.getFullYear(),
19393
+ formatted: {
19394
+ month: currentMonth.value.toLocaleString("default", { month: "long", timeZone: props2.timezone }),
19395
+ year: currentMonth.value.toLocaleString("default", { year: "numeric", timeZone: props2.timezone })
19396
+ }
19397
+ }));
19398
+ const months = computed(
19399
+ () => Array.from({ length: 12 }, (_2, i2) => {
19400
+ const date2 = new Date(currentMonthValue.value.year, i2, 1);
19401
+ return {
19402
+ name: date2.toLocaleString("default", { month: "short" }),
19403
+ value: i2,
19404
+ disabled: isDateDisabled(date2)
19405
+ };
19406
+ })
19407
+ );
19408
+ const years = computed(() => {
19409
+ const startYear = currentMonthValue.value.year - 10;
19410
+ return Array.from({ length: 21 }, (_2, i2) => ({
19411
+ value: startYear + i2,
19412
+ disabled: isYearDisabled(startYear + i2)
19413
+ }));
19414
+ });
19415
+ function isDateDisabled(date2) {
19416
+ if (!date2) return true;
19417
+ const minDate = props2.min ? new Date(props2.min) : null;
19418
+ const maxDate = props2.max ? new Date(props2.max) : null;
19419
+ if (minDate && date2 < minDate) return true;
19420
+ if (maxDate && date2 > maxDate) return true;
19421
+ return false;
19422
+ }
19423
+ function isYearDisabled(year) {
19424
+ const minDate = props2.min ? new Date(props2.min) : null;
19425
+ const maxDate = props2.max ? new Date(props2.max) : null;
19426
+ if (minDate && year < minDate.getFullYear()) return true;
19427
+ if (maxDate && year > maxDate.getFullYear()) return true;
19428
+ return false;
19429
+ }
19430
+ function selectMonth(monthIndex) {
19431
+ currentMonth.value = new Date(currentMonth.value.getFullYear(), monthIndex, 1);
19432
+ currentView.value = "days";
19433
+ }
19434
+ function selectYear(year) {
19435
+ currentMonth.value = new Date(year, currentMonth.value.getMonth(), 1);
19436
+ currentView.value = "months";
19437
+ }
19438
+ function previousMonth() {
19439
+ currentMonth.value = new Date(currentMonth.value.getFullYear(), currentMonth.value.getMonth() - 1, 1);
19440
+ }
19441
+ function nextMonth() {
19442
+ currentMonth.value = new Date(currentMonth.value.getFullYear(), currentMonth.value.getMonth() + 1, 1);
19443
+ }
19444
+ function previousYear() {
19445
+ const offset2 = currentView.value === "months" ? 1 : 21;
19446
+ currentMonth.value = new Date(currentMonth.value.getFullYear() - offset2, currentMonth.value.getMonth(), 1);
19447
+ }
19448
+ function nextYear() {
19449
+ const offset2 = currentView.value === "months" ? 1 : 21;
19450
+ currentMonth.value = new Date(currentMonth.value.getFullYear() + offset2, currentMonth.value.getMonth(), 1);
19451
+ }
19452
+ function selectDate(date2) {
19453
+ var _a2, _b;
19454
+ if (!date2 || !props2.editMode) return;
19455
+ const newDate = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), 0, 0, 0);
19456
+ if (props2.enableTime) {
19457
+ const currentHours = ((_a2 = selectedDate.value) == null ? void 0 : _a2.getHours()) ?? (/* @__PURE__ */ new Date()).getHours();
19458
+ const currentMinutes = ((_b = selectedDate.value) == null ? void 0 : _b.getMinutes()) ?? (/* @__PURE__ */ new Date()).getMinutes();
19459
+ newDate.setHours(currentHours);
19460
+ newDate.setMinutes(currentMinutes);
19461
+ emit2("update:modelValue", newDate.toISOString());
19462
+ } else {
19463
+ emit2("update:modelValue", newDate.toISOString().split("T")[0]);
19464
+ isOpen.value = false;
19465
+ }
19466
+ }
19467
+ function handleInput(event) {
19468
+ const input = event.target;
19469
+ if (!input.value) {
19470
+ emit2("update:modelValue", "");
19471
+ return;
19472
+ }
19473
+ const date2 = new Date(input.value);
19474
+ emit2("update:modelValue", props2.enableTime ? date2.toISOString() : date2.toISOString().split("T")[0]);
19475
+ }
19476
+ const hours = computed(() => {
19477
+ var _a2;
19478
+ return ((_a2 = selectedDate.value) == null ? void 0 : _a2.getHours()) ?? 0;
19479
+ });
19480
+ const minutes = computed(() => {
19481
+ var _a2;
19482
+ return ((_a2 = selectedDate.value) == null ? void 0 : _a2.getMinutes()) ?? 0;
19483
+ });
19484
+ function handleHourInput(value) {
19485
+ if (!selectedDate.value) return;
19486
+ const newDate = new Date(selectedDate.value);
19487
+ newDate.setHours(value);
19488
+ emit2("update:modelValue", newDate.toISOString());
19489
+ }
19490
+ function handleMinuteInput(value) {
19491
+ if (!selectedDate.value) return;
19492
+ const newDate = new Date(selectedDate.value);
19493
+ newDate.setMinutes(value);
19494
+ emit2("update:modelValue", newDate.toISOString());
19495
+ }
19496
+ function isSelected(date2) {
19497
+ if (!date2 || !selectedDate.value) return false;
19498
+ return date2.toISOString().split("T")[0] === selectedDate.value.toISOString().split("T")[0];
19499
+ }
19500
+ function isToday(date2) {
19501
+ if (!date2) return false;
19502
+ return date2.toISOString().split("T")[0] === (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
19503
+ }
19504
+ const timezoneDisplay = computed(() => {
19505
+ if (!props2.enableTime) return "";
19506
+ try {
19507
+ return (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
19508
+ timeZoneName: "short",
19509
+ timeZone: props2.timezone
19510
+ }).split(" ").pop();
19511
+ } catch {
19512
+ return "UTC";
19513
+ }
19514
+ });
19515
+ return (_ctx, _cache) => {
19516
+ return openBlock(), createElementBlock("div", {
19517
+ class: normalizeClass(["bagel-input", { small: _ctx.small }]),
19518
+ title: _ctx.label
19519
+ }, [
19520
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$r, [
19521
+ createTextVNode(toDisplayString(_ctx.label) + " ", 1),
19522
+ _ctx.required ? (openBlock(), createElementBlock("span", _hoisted_3$m, "*")) : createCommentVNode("", true)
19523
+ ])) : createCommentVNode("", true),
19524
+ createVNode(unref(kt$1), {
19525
+ shown: unref(isOpen),
19526
+ triggers: [],
19527
+ placement: "bottom-start",
19528
+ distance: 4,
19529
+ onApplyShow: _cache[4] || (_cache[4] = ($event) => isRef(isOpen) ? isOpen.value = true : isOpen = true),
19530
+ onApplyHide: _cache[5] || (_cache[5] = ($event) => isRef(isOpen) ? isOpen.value = false : isOpen = false)
19531
+ }, {
19532
+ popper: withCtx(() => [
19533
+ createElementVNode("div", _hoisted_6$b, [
19534
+ createElementVNode("div", _hoisted_7$8, [
19535
+ createElementVNode("div", _hoisted_8$5, [
19536
+ unref(currentView) === "days" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
19537
+ createVNode(unref(Btn), {
19538
+ flat: "",
19539
+ icon: "chevron_left",
19540
+ onClick: previousMonth
19541
+ }),
19542
+ createElementVNode("div", _hoisted_9$4, [
19543
+ createElementVNode("button", {
19544
+ class: "month-btn",
19545
+ onClick: _cache[1] || (_cache[1] = ($event) => isRef(currentView) ? currentView.value = "months" : currentView = "months")
19546
+ }, toDisplayString(currentMonthValue.value.formatted.month), 1),
19547
+ createElementVNode("button", {
19548
+ class: "year-btn",
19549
+ onClick: _cache[2] || (_cache[2] = ($event) => isRef(currentView) ? currentView.value = "years" : currentView = "years")
19550
+ }, toDisplayString(currentMonthValue.value.formatted.year), 1)
19551
+ ]),
19552
+ createVNode(unref(Btn), {
19553
+ flat: "",
19554
+ icon: "chevron_right",
19555
+ onClick: nextMonth
19556
+ })
19557
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
19558
+ createVNode(unref(Btn), {
19559
+ flat: "",
19560
+ icon: "chevron_left",
19561
+ onClick: previousYear
19562
+ }),
19563
+ createElementVNode("span", _hoisted_10$4, toDisplayString(currentMonthValue.value.formatted.year), 1),
19564
+ createVNode(unref(Btn), {
19565
+ flat: "",
19566
+ icon: "chevron_right",
19567
+ onClick: nextYear
19568
+ })
19569
+ ], 64))
19570
+ ]),
19571
+ unref(currentView) === "days" ? (openBlock(), createElementBlock("div", _hoisted_11$3, [
19572
+ (openBlock(), createElementBlock(Fragment, null, renderList(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], (day) => {
19573
+ return createElementVNode("div", {
19574
+ key: day,
19575
+ class: "weekday"
19576
+ }, toDisplayString(day), 1);
19577
+ }), 64)),
19578
+ (openBlock(true), createElementBlock(Fragment, null, renderList(currentMonthDays.value, (date2, index2) => {
19579
+ return openBlock(), createElementBlock("button", {
19580
+ key: index2,
19581
+ type: "button",
19582
+ class: normalizeClass(["day", {
19583
+ selected: isSelected(date2),
19584
+ today: isToday(date2),
19585
+ disabled: isDateDisabled(date2)
19586
+ }]),
19587
+ disabled: isDateDisabled(date2),
19588
+ onClick: ($event) => selectDate(date2)
19589
+ }, toDisplayString(date2 == null ? void 0 : date2.getDate()), 11, _hoisted_12$3);
19590
+ }), 128))
19591
+ ])) : unref(currentView) === "months" ? (openBlock(), createElementBlock("div", _hoisted_13$3, [
19592
+ (openBlock(true), createElementBlock(Fragment, null, renderList(months.value, (month) => {
19593
+ return openBlock(), createElementBlock("button", {
19594
+ key: month.value,
19595
+ class: normalizeClass(["month-item", {
19596
+ selected: month.value === currentMonthValue.value.month,
19597
+ disabled: month.disabled
19598
+ }]),
19599
+ disabled: month.disabled,
19600
+ onClick: ($event) => selectMonth(month.value)
19601
+ }, toDisplayString(month.name), 11, _hoisted_14$2);
19602
+ }), 128))
19603
+ ])) : (openBlock(), createElementBlock("div", _hoisted_15$1, [
19604
+ (openBlock(true), createElementBlock(Fragment, null, renderList(years.value, (year) => {
19605
+ return openBlock(), createElementBlock("button", {
19606
+ key: year.value,
19607
+ class: normalizeClass(["year-item", {
19608
+ selected: year.value === currentMonthValue.value.year,
19609
+ disabled: year.disabled
19610
+ }]),
19611
+ disabled: year.disabled,
19612
+ onClick: ($event) => selectYear(year.value)
19613
+ }, toDisplayString(year.value), 11, _hoisted_16);
19614
+ }), 128))
19615
+ ]))
19616
+ ]),
19617
+ _ctx.enableTime && unref(currentView) === "days" ? (openBlock(), createElementBlock("div", _hoisted_17, [
19618
+ createElementVNode("div", _hoisted_18, [
19619
+ createVNode(unref(NumberInput), {
19620
+ center: "",
19621
+ "model-value": hours.value,
19622
+ disabled: !selectedDate.value,
19623
+ min: 0,
19624
+ max: 23,
19625
+ layout: "vertical",
19626
+ padZero: 2,
19627
+ "onUpdate:modelValue": handleHourInput
19628
+ }, null, 8, ["model-value", "disabled"]),
19629
+ _cache[6] || (_cache[6] = createElementVNode("span", null, ":", -1)),
19630
+ createVNode(unref(NumberInput), {
19631
+ center: "",
19632
+ "model-value": minutes.value,
19633
+ disabled: !selectedDate.value,
19634
+ min: 0,
19635
+ max: 59,
19636
+ padZero: 2,
19637
+ layout: "vertical",
19638
+ "onUpdate:modelValue": handleMinuteInput
19639
+ }, null, 8, ["model-value", "disabled"])
19640
+ ]),
19641
+ createElementVNode("span", _hoisted_19, toDisplayString(timezoneDisplay.value), 1),
19642
+ selectedDate.value ? (openBlock(), createBlock(unref(Btn), {
19643
+ key: 0,
19644
+ flat: "",
19645
+ onClick: _cache[3] || (_cache[3] = ($event) => isRef(isOpen) ? isOpen.value = false : isOpen = false)
19646
+ }, {
19647
+ default: withCtx(() => _cache[7] || (_cache[7] = [
19648
+ createTextVNode(" Done ")
19649
+ ])),
19650
+ _: 1
19651
+ })) : createCommentVNode("", true)
19652
+ ])) : createCommentVNode("", true)
19653
+ ])
19654
+ ]),
19655
+ default: withCtx(() => [
19656
+ createElementVNode("div", _hoisted_4$f, [
19657
+ createElementVNode("input", {
19658
+ type: inputType.value,
19659
+ value: formattedValue.value,
19660
+ min: formattedMin.value,
19661
+ max: formattedMax.value,
19662
+ required: _ctx.required,
19663
+ disabled: !_ctx.editMode,
19664
+ class: "date-input",
19665
+ onInput: handleInput,
19666
+ onClick: _cache[0] || (_cache[0] = ($event) => isRef(isOpen) ? isOpen.value = true : isOpen = true)
19667
+ }, null, 40, _hoisted_5$e)
19668
+ ])
19669
+ ]),
19670
+ _: 1
19671
+ }, 8, ["shown"])
19306
19672
  ], 10, _hoisted_1$C);
19307
19673
  };
19308
19674
  }
19309
19675
  });
19676
+ const DatePick = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-e36ecd8c"]]);
19310
19677
  const _hoisted_1$B = { class: "datetime-wrap" };
19311
19678
  const _hoisted_2$q = { class: "date-wrap" };
19312
19679
  const _hoisted_3$l = {
@@ -19696,7 +20063,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
19696
20063
  return openBlock(), createElementBlock("div", _hoisted_1$z, [
19697
20064
  createElementVNode("label", null, toDisplayString(_ctx.label), 1),
19698
20065
  _ctx.required && !storageFiles.value.length ? (openBlock(), createElementBlock("input", _hoisted_2$o)) : createCommentVNode("", true),
19699
- _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$_), {
20066
+ _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$$), {
19700
20067
  key: 1,
19701
20068
  outline: "",
19702
20069
  class: "flex p-05 gap-1",
@@ -20006,7 +20373,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20006
20373
  id: {},
20007
20374
  helptext: {},
20008
20375
  layout: {},
20009
- center: { type: Boolean }
20376
+ center: { type: Boolean },
20377
+ padZero: {}
20010
20378
  },
20011
20379
  emits: ["update:modelValue"],
20012
20380
  setup(__props, { emit: __emit }) {
@@ -20026,7 +20394,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20026
20394
  emit2("update:modelValue", numberValue.value);
20027
20395
  }
20028
20396
  function formatNumber2(num) {
20029
- return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
20397
+ let formatted = num.toString();
20398
+ if (__props.padZero && __props.padZero > 0) {
20399
+ formatted = formatted.padStart(__props.padZero, "0");
20400
+ }
20401
+ return formatted.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
20030
20402
  }
20031
20403
  let formattedValue = ref("");
20032
20404
  function inputHandler() {
@@ -20141,7 +20513,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20141
20513
  };
20142
20514
  }
20143
20515
  });
20144
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-a6e0446d"]]);
20516
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3a20cf4a"]]);
20145
20517
  const _hoisted_1$w = ["value", "autofocus", "onKeydown", "onPaste"];
20146
20518
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
20147
20519
  __name: "OTP",
@@ -20804,7 +21176,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
20804
21176
  return openBlock(), createElementBlock("div", _hoisted_1$q, [
20805
21177
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.map(configToOption).filter(Boolean), (action, index2) => {
20806
21178
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
20807
- action.name === "insertTable" ? (openBlock(), createBlock(unref(_sfc_main$W), {
21179
+ action.name === "insertTable" ? (openBlock(), createBlock(unref(_sfc_main$X), {
20808
21180
  key: 0,
20809
21181
  placement: "bottom-start",
20810
21182
  thin: "",
@@ -22102,7 +22474,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22102
22474
  }
22103
22475
  });
22104
22476
  return (_ctx, _cache) => {
22105
- return openBlock(), createBlock(unref(_sfc_main$W), {
22477
+ return openBlock(), createBlock(unref(_sfc_main$X), {
22106
22478
  ref_key: "dropdown",
22107
22479
  ref: dropdown,
22108
22480
  shown: unref(open),
@@ -22181,7 +22553,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22181
22553
  height: "25px",
22182
22554
  class: "mx-1 my-1"
22183
22555
  })) : createCommentVNode("", true),
22184
- createVNode(unref(_sfc_main$_), {
22556
+ createVNode(unref(_sfc_main$$), {
22185
22557
  class: "p-05",
22186
22558
  style: normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
22187
22559
  }, {
@@ -30340,7 +30712,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30340
30712
  withKeys(reset, ["tab"])
30341
30713
  ]
30342
30714
  }, [
30343
- !computedDropDownOptions.value.hide ? (openBlock(), createBlock(unref(_sfc_main$W), {
30715
+ !computedDropDownOptions.value.hide ? (openBlock(), createBlock(unref(_sfc_main$X), {
30344
30716
  key: 0,
30345
30717
  ref_key: "phoneDropdown",
30346
30718
  ref: phoneDropdown,
@@ -30807,7 +31179,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
30807
31179
  return openBlock(), createElementBlock("div", _hoisted_1$i, [
30808
31180
  _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$9, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
30809
31181
  _ctx.required && !pathKeys.value.length ? (openBlock(), createElementBlock("input", _hoisted_3$7)) : createCommentVNode("", true),
30810
- _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$_), {
31182
+ _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$$), {
30811
31183
  key: 2,
30812
31184
  outline: "",
30813
31185
  class: "flex p-05 gap-1",
@@ -31103,7 +31475,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
31103
31475
  },
31104
31476
  setup(__props) {
31105
31477
  return (_ctx, _cache) => {
31106
- return openBlock(), createBlock(unref(_sfc_main$_), { class: "hide m_grid gap-05 bgl_bottombar px-1 txt14 justify-content-start align-items-center overflow-x" }, {
31478
+ return openBlock(), createBlock(unref(_sfc_main$$), { class: "hide m_grid gap-05 bgl_bottombar px-1 txt14 justify-content-start align-items-center overflow-x" }, {
31107
31479
  default: withCtx(() => [
31108
31480
  renderSlot(_ctx.$slots, "brand", {}, void 0, true),
31109
31481
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navLinks, (nav, i2) => {
@@ -31204,7 +31576,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
31204
31576
  icon: "keyboard_arrow_right",
31205
31577
  onClick: unref(toggleMenu)
31206
31578
  }, null, 8, ["onClick"]),
31207
- createVNode(unref(_sfc_main$_), { class: "py-1 px-05 h-100 flex column gap-05 rounded relative bg-primary font-light overflow-y" }, {
31579
+ createVNode(unref(_sfc_main$$), { class: "py-1 px-05 h-100 flex column gap-05 rounded relative bg-primary font-light overflow-y" }, {
31208
31580
  default: withCtx(() => [
31209
31581
  !unref(isOpen) || !unref(slots)["brand-open"] ? renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : createCommentVNode("", true),
31210
31582
  unref(isOpen) ? renderSlot(_ctx.$slots, "brand-open", { key: 1 }, void 0, true) : createCommentVNode("", true),
@@ -31725,7 +32097,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
31725
32097
  onClick: _cache[1] || (_cache[1] = () => _ctx.dismissable ? closeModal() : ""),
31726
32098
  onKeydown: withKeys(closeModal, ["esc"])
31727
32099
  }, [
31728
- createVNode(unref(_sfc_main$_), {
32100
+ createVNode(unref(_sfc_main$$), {
31729
32101
  class: "modal",
31730
32102
  style: normalizeStyle({ ...maxWidth.value }),
31731
32103
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
@@ -31902,7 +32274,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31902
32274
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => emit2("update:visible", $event))
31903
32275
  }, createSlots({
31904
32276
  default: withCtx(() => [
31905
- _ctx.visible ? (openBlock(), createBlock(unref(_sfc_main$R), {
32277
+ _ctx.visible ? (openBlock(), createBlock(unref(_sfc_main$S), {
31906
32278
  key: 0,
31907
32279
  ref_key: "form",
31908
32280
  ref: form,
@@ -33021,7 +33393,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
33021
33393
  row,
33022
33394
  field
33023
33395
  }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_10$1, [
33024
- createVNode(unref(_sfc_main$10), {
33396
+ createVNode(unref(_sfc_main$11), {
33025
33397
  id: field.id,
33026
33398
  class: "embedded-field",
33027
33399
  field,
@@ -35148,33 +35520,34 @@ function timeAgo(date2, lang = "en") {
35148
35520
  return selectedLang.justNow;
35149
35521
  }
35150
35522
  export {
35151
- _sfc_main$17 as Accordion,
35523
+ _sfc_main$18 as Accordion,
35152
35524
  AccordionItem,
35153
- _sfc_main$15 as AddressSearch,
35525
+ _sfc_main$16 as AddressSearch,
35154
35526
  Alert,
35155
35527
  Avatar,
35156
35528
  Badge,
35157
- _sfc_main$R as BagelForm,
35529
+ _sfc_main$S as BagelForm,
35158
35530
  BagelVue,
35159
- _sfc_main$10 as BglComponent,
35160
- _sfc_main$S as BglField,
35161
- _sfc_main$R as BglForm,
35162
- _sfc_main$Q as BglMultiStepForm,
35531
+ _sfc_main$11 as BglComponent,
35532
+ _sfc_main$T as BglField,
35533
+ _sfc_main$S as BglForm,
35534
+ _sfc_main$R as BglMultiStepForm,
35163
35535
  BglVideo,
35164
35536
  BottomMenu,
35165
35537
  Btn,
35166
- _sfc_main$_ as Card,
35538
+ _sfc_main$$ as Card,
35167
35539
  Carousel,
35168
35540
  CheckInput,
35169
35541
  Checkbox,
35170
35542
  CodeEditor,
35171
- _sfc_main$L as ColorPicker,
35543
+ _sfc_main$M as ColorPicker,
35172
35544
  DataPreview,
35173
- _sfc_main$K as DateInput,
35545
+ _sfc_main$L as DateInput,
35546
+ DatePick,
35174
35547
  _sfc_main$J as DatePicker,
35175
- _sfc_main$W as Dropdown,
35548
+ _sfc_main$X as Dropdown,
35176
35549
  FORM_STATE_KEY,
35177
- _sfc_main$P as FieldArray,
35550
+ _sfc_main$Q as FieldArray,
35178
35551
  FieldSetVue,
35179
35552
  FileUpload,
35180
35553
  Flag,
@@ -35185,7 +35558,7 @@ export {
35185
35558
  Image$1 as Image,
35186
35559
  JSONInput,
35187
35560
  Layout,
35188
- _sfc_main$Y as Lineart,
35561
+ _sfc_main$Z as Lineart,
35189
35562
  _sfc_main$h as ListItem,
35190
35563
  ListView,
35191
35564
  Loading,