@bagelink/vue 0.0.1102 → 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: {},
@@ -9760,9 +9760,9 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9760
9760
  };
9761
9761
  }
9762
9762
  });
9763
- const _hoisted_1$L = { class: "px-1 pt-025 pb-1" };
9764
- const _hoisted_2$w = { class: "ms-1" };
9765
- 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({
9766
9766
  __name: "FieldSetVue",
9767
9767
  props: {
9768
9768
  label: {},
@@ -9770,15 +9770,15 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9770
9770
  },
9771
9771
  setup(__props) {
9772
9772
  return (_ctx, _cache) => {
9773
- return openBlock(), createElementBlock("fieldset", _hoisted_1$L, [
9774
- 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),
9775
9775
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
9776
9776
  ]);
9777
9777
  };
9778
9778
  }
9779
9779
  });
9780
- const FieldSetVue = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-f7e758e5"]]);
9781
- 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({
9782
9782
  __name: "Flag",
9783
9783
  props: {
9784
9784
  country: {},
@@ -9808,7 +9808,92 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
9808
9808
  };
9809
9809
  }
9810
9810
  });
9811
- 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
+ }
9812
9897
  const state$1 = reactive(/* @__PURE__ */ new Map());
9813
9898
  function useTabs(group) {
9814
9899
  if (!state$1.has(group)) {
@@ -9822,8 +9907,8 @@ function useTabs(group) {
9822
9907
  });
9823
9908
  return { currentTab };
9824
9909
  }
9825
- const _hoisted_1$K = ["onClick"];
9826
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
9910
+ const _hoisted_1$L = ["onClick"];
9911
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
9827
9912
  __name: "TabsNav",
9828
9913
  props: {
9829
9914
  title: {},
@@ -9905,77 +9990,16 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
9905
9990
  icon: tab.icon
9906
9991
  }, null, 8, ["icon"])) : createCommentVNode("", true),
9907
9992
  createTextVNode(" " + toDisplayString(tabLabel(tab)), 1)
9908
- ], 10, _hoisted_1$K);
9993
+ ], 10, _hoisted_1$L);
9909
9994
  }), 128))
9910
9995
  ], true)
9911
9996
  ], 2);
9912
9997
  };
9913
9998
  }
9914
9999
  });
9915
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-307612a9"]]);
9916
- const FORM_STATE_KEY = Symbol("bagelFormState");
9917
- function safeClone(obj) {
9918
- if (obj === null || typeof obj !== "object") return obj;
9919
- const seen = /* @__PURE__ */ new WeakSet();
9920
- return JSON.parse(JSON.stringify(obj, (key, value) => {
9921
- if (typeof value === "object" && value !== null) {
9922
- if (seen.has(value)) {
9923
- return void 0;
9924
- }
9925
- seen.add(value);
9926
- }
9927
- return value;
9928
- }));
9929
- }
9930
- function provideBagelFormState(initialData) {
9931
- const data2 = ref(initialData);
9932
- const isDirty = ref(false);
9933
- const getFieldData = (path) => {
9934
- if (!path) return "";
9935
- const keys4 = path.split(/[.[]/);
9936
- let current = data2.value;
9937
- for (let i2 = 0; i2 < keys4.length; i2++) {
9938
- const key = keys4[i2];
9939
- if (!current || typeof current !== "object" || !(key in current)) {
9940
- return "";
9941
- }
9942
- current = current[key];
9943
- }
9944
- return current ?? "";
9945
- };
9946
- const updateField = (path, value) => {
9947
- const keys4 = path.split(/[.[]/);
9948
- if (typeof data2.value !== "object" || data2.value === null) {
9949
- data2.value = {};
9950
- }
9951
- let current = data2.value;
9952
- for (let i2 = 0; i2 < keys4.length - 1; i2++) {
9953
- const key = keys4[i2];
9954
- if (!(key in current) || typeof current[key] !== "object" || current[key] === null) {
9955
- current[key] = {};
9956
- }
9957
- current = current[key];
9958
- }
9959
- const safeValue = safeClone(value);
9960
- current[keys4[keys4.length - 1]] = safeValue;
9961
- isDirty.value = true;
9962
- };
9963
- const state2 = {
9964
- data: data2,
9965
- getFieldData,
9966
- updateField,
9967
- isDirty
9968
- };
9969
- provide(FORM_STATE_KEY, state2);
9970
- return state2;
9971
- }
9972
- function useBagelFormState() {
9973
- const state2 = inject(FORM_STATE_KEY);
9974
- if (!state2) throw new Error("BagelFormState must be provided");
9975
- return state2;
9976
- }
9977
- const _hoisted_1$J = { key: 1 };
9978
- 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({
9979
10003
  __name: "BglField",
9980
10004
  props: {
9981
10005
  field: {},
@@ -9986,8 +10010,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9986
10010
  emits: ["update:modelValue"],
9987
10011
  setup(__props, { emit: __emit }) {
9988
10012
  const props2 = __props;
9989
- const emit2 = __emit;
9990
- const formState = inject(FORM_STATE_KEY) ?? provideBagelFormState(props2.modelValue);
10013
+ const { fieldData } = useFormField(props2);
9991
10014
  const customAttrs = ref({});
9992
10015
  const is4 = computed(() => {
9993
10016
  if (props2.field.$el === "text") return TextInput;
@@ -9996,62 +10019,36 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9996
10019
  return TextInput;
9997
10020
  }
9998
10021
  if (props2.field.$el === "number") return NumberInput;
9999
- if (props2.field.$el === "array") return _sfc_main$P;
10022
+ if (props2.field.$el === "array") return _sfc_main$Q;
10000
10023
  if (props2.field.$el === "select") return SelectInput;
10001
10024
  if (props2.field.$el === "toggle") return ToggleInput;
10002
10025
  if (props2.field.$el === "check") return CheckInput;
10003
10026
  if (props2.field.$el === "richtext") return RichText;
10004
10027
  if (props2.field.$el === "upload") return UploadInput;
10005
10028
  if (props2.field.$el === "file") return FileUpload;
10006
- if (props2.field.$el === "date") return _sfc_main$K;
10029
+ if (props2.field.$el === "date") return _sfc_main$L;
10007
10030
  if (props2.field.$el === "tabs") return TabsNav;
10008
- if (props2.field.$el === "bglform") return _sfc_main$R;
10031
+ if (props2.field.$el === "bglform") return _sfc_main$S;
10009
10032
  return props2.field.$el ?? "div";
10010
10033
  });
10011
- const fieldData = computed({
10012
- get: () => {
10013
- if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
10014
- const value = formState.getFieldData(props2.fieldID);
10015
- if (props2.field.$el === "form" && !value) return {};
10016
- return value ?? "";
10017
- },
10018
- set: (val) => {
10019
- if (!props2.fieldID) return;
10020
- const currentValue = formState.getFieldData(props2.fieldID);
10021
- if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
10022
- emit2("update:modelValue", val);
10023
- if (props2.field.onUpdate) {
10024
- props2.field.onUpdate(val, currentValue);
10025
- }
10026
- formState.updateField(props2.fieldID, val);
10027
- }
10028
- });
10029
- const vIf = computed(() => {
10030
- if (props2.field["v-if"] === void 0 && props2.field.vIf === void 0) return true;
10031
- if (typeof props2.field["v-if"] === "boolean" || typeof props2.field.vIf === "boolean") return props2.field["v-if"];
10032
- if (typeof props2.field["v-if"] === "string" || typeof props2.field.vIf === "string") return true;
10033
- if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState.data.value);
10034
- if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState.data.value);
10035
- return true;
10036
- });
10037
10034
  const computedOptions = computed(
10038
- () => bindAttrs({ options: props2.field.options }, fieldData.value, formState.data.value).options
10035
+ () => bindAttrs({ options: props2.field.options }, fieldData, props2.modelValue).options
10039
10036
  );
10040
10037
  const computedAttrs = computed(() => {
10041
10038
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10042
- return bindAttrs(attrs, fieldData.value, formState.data.value);
10039
+ return bindAttrs(attrs, fieldData, props2.modelValue);
10043
10040
  });
10044
10041
  const computedClass = computed(
10045
10042
  () => {
10046
10043
  var _a2;
10047
- 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);
10048
10045
  }
10049
10046
  );
10050
10047
  return (_ctx, _cache) => {
10051
10048
  const _component_BglField = resolveComponent("BglField", true);
10052
- return vIf.value ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10053
- modelValue: fieldData.value,
10054
- "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),
10055
10052
  fieldID: props2.fieldID,
10056
10053
  required: _ctx.field.required,
10057
10054
  class: computedClass.value,
@@ -10070,7 +10067,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10070
10067
  fieldID: [props2.fieldID, child.id].filter(Boolean).join("."),
10071
10068
  field: child,
10072
10069
  "parent-path": props2.fieldID
10073
- }, 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))
10074
10071
  ], 64);
10075
10072
  }), 128))
10076
10073
  ]),
@@ -10079,7 +10076,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10079
10076
  };
10080
10077
  }
10081
10078
  });
10082
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
10079
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10083
10080
  __name: "BglForm",
10084
10081
  props: {
10085
10082
  label: {},
@@ -10109,7 +10106,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10109
10106
  }
10110
10107
  data2.value = newVal;
10111
10108
  }, { deep: true, immediate: true });
10112
- watch(() => data2, (newVal) => {
10109
+ watch(() => data2.value, (newVal) => {
10113
10110
  if (emitDirty.value) return;
10114
10111
  emitDirty.value = true;
10115
10112
  emit2("dirty");
@@ -10181,7 +10178,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10181
10178
  return openBlock(), createElementBlock(Fragment, null, [
10182
10179
  _ctx.tag === "template" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10183
10180
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, (field, i2) => {
10184
- return openBlock(), createBlock(unref(_sfc_main$S), {
10181
+ return openBlock(), createBlock(unref(_sfc_main$T), {
10185
10182
  key: field.id || `${i2}p`,
10186
10183
  fieldID: field.id,
10187
10184
  field
@@ -10204,7 +10201,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10204
10201
  label: _ctx.label
10205
10202
  }, null, 8, ["label"])) : createCommentVNode("", true),
10206
10203
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, (field, i2) => {
10207
- return openBlock(), createBlock(unref(_sfc_main$S), {
10204
+ return openBlock(), createBlock(unref(_sfc_main$T), {
10208
10205
  key: field.id || `${i2}p`,
10209
10206
  fieldID: field.id,
10210
10207
  field
@@ -10222,8 +10219,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10222
10219
  };
10223
10220
  }
10224
10221
  });
10225
- const _hoisted_1$I = { key: 0 };
10226
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10222
+ const _hoisted_1$J = { key: 0 };
10223
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10227
10224
  __name: "BglMultiStepForm",
10228
10225
  props: /* @__PURE__ */ mergeModels({
10229
10226
  bagelFormProps: { default: () => ({}) },
@@ -10290,8 +10287,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10290
10287
  mode: "out-in"
10291
10288
  }, {
10292
10289
  default: withCtx(() => [
10293
- !unref(isStepping) ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
10294
- createVNode(unref(_sfc_main$R), mergeProps({
10290
+ !unref(isStepping) ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
10291
+ createVNode(unref(_sfc_main$S), mergeProps({
10295
10292
  ref_key: "formRef",
10296
10293
  ref: formRef,
10297
10294
  modelValue: formData.value,
@@ -10330,12 +10327,12 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10330
10327
  };
10331
10328
  }
10332
10329
  });
10333
- const _hoisted_1$H = { class: "label mb-05" };
10334
- const _hoisted_2$v = {
10330
+ const _hoisted_1$I = { class: "label mb-05" };
10331
+ const _hoisted_2$w = {
10335
10332
  key: 0,
10336
10333
  class: "-ms-05 ps-05 border-start"
10337
10334
  };
10338
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
10335
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10339
10336
  __name: "FieldArray",
10340
10337
  props: {
10341
10338
  el: { default: "div" },
@@ -10392,8 +10389,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10392
10389
  return openBlock(), createElementBlock("div", {
10393
10390
  class: normalizeClass(props2.class)
10394
10391
  }, [
10395
- createElementVNode("p", _hoisted_1$H, toDisplayString(_ctx.label), 1),
10396
- _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, [
10397
10394
  (openBlock(true), createElementBlock(Fragment, null, renderList(data2.value, (_2, i2) => {
10398
10395
  return openBlock(), createElementBlock("div", {
10399
10396
  key: i2,
@@ -10401,7 +10398,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10401
10398
  thin: "",
10402
10399
  class: "mb-05 itemBox transition p-05"
10403
10400
  }, [
10404
- createVNode(unref(_sfc_main$R), {
10401
+ createVNode(unref(_sfc_main$S), {
10405
10402
  modelValue: data2.value[i2],
10406
10403
  "onUpdate:modelValue": [($event) => data2.value[i2] = $event, emitValue],
10407
10404
  schema: _ctx.schema
@@ -10431,7 +10428,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10431
10428
  _: 1
10432
10429
  })) : createCommentVNode("", true)
10433
10430
  ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(data2.value, (_2, i2) => {
10434
- return openBlock(), createBlock(unref(_sfc_main$S), {
10431
+ return openBlock(), createBlock(unref(_sfc_main$T), {
10435
10432
  key: i2,
10436
10433
  modelValue: data2.value[i2],
10437
10434
  "onUpdate:modelValue": [($event) => data2.value[i2] = $event, emitValue],
@@ -10442,8 +10439,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10442
10439
  };
10443
10440
  }
10444
10441
  });
10445
- const _hoisted_1$G = { class: "primary-checkbox" };
10446
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
10442
+ const _hoisted_1$H = { class: "primary-checkbox" };
10443
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
10447
10444
  __name: "Checkbox",
10448
10445
  props: {
10449
10446
  "modelValue": { type: Boolean, ...{ default: false } },
@@ -10453,7 +10450,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10453
10450
  setup(__props) {
10454
10451
  const val = useModel(__props, "modelValue");
10455
10452
  return (_ctx, _cache) => {
10456
- return openBlock(), createElementBlock("label", _hoisted_1$G, [
10453
+ return openBlock(), createElementBlock("label", _hoisted_1$H, [
10457
10454
  renderSlot(_ctx.$slots, "label", {}, void 0, true),
10458
10455
  withDirectives(createElementVNode("input", {
10459
10456
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => val.value = $event),
@@ -10465,11 +10462,11 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
10465
10462
  };
10466
10463
  }
10467
10464
  });
10468
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-73f1d9ad"]]);
10469
- const _hoisted_1$F = ["title"];
10470
- const _hoisted_2$u = ["id", "value", "required"];
10471
- const _hoisted_3$n = ["for"];
10472
- 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({
10473
10470
  __name: "CheckInput",
10474
10471
  props: /* @__PURE__ */ mergeModels({
10475
10472
  label: {},
@@ -10503,32 +10500,32 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10503
10500
  required: _ctx.required,
10504
10501
  type: "checkbox",
10505
10502
  class: "me-05"
10506
- }, null, 8, _hoisted_2$u), [
10503
+ }, null, 8, _hoisted_2$v), [
10507
10504
  [vModelCheckbox, checked.value]
10508
10505
  ]),
10509
10506
  createElementVNode("label", { for: inputId.value }, [
10510
10507
  renderSlot(_ctx.$slots, "label", {}, () => [
10511
10508
  createTextVNode(toDisplayString(_ctx.label), 1)
10512
10509
  ], true)
10513
- ], 8, _hoisted_3$n)
10514
- ], 10, _hoisted_1$F);
10510
+ ], 8, _hoisted_3$o)
10511
+ ], 10, _hoisted_1$G);
10515
10512
  };
10516
10513
  }
10517
10514
  });
10518
- const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-03ed2982"]]);
10519
- const _hoisted_1$E = { class: "mb-05" };
10520
- 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 = {
10521
10518
  key: 0,
10522
10519
  class: "label txt-start"
10523
10520
  };
10524
- const _hoisted_3$m = {
10521
+ const _hoisted_3$n = {
10525
10522
  key: 1,
10526
10523
  class: "code-editor-wrap grid rounded p-1 overflow hm-300px ltr txt-start relative h-100p"
10527
10524
  };
10528
- const _hoisted_4$f = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
10529
- const _hoisted_5$e = ["innerHTML"];
10530
- const _hoisted_6$b = ["onKeydown"];
10531
- 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({
10532
10529
  __name: "Index",
10533
10530
  props: {
10534
10531
  language: {},
@@ -10610,19 +10607,19 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10610
10607
  }
10611
10608
  }, { immediate: true });
10612
10609
  return (_ctx, _cache) => {
10613
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
10614
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$t, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
10615
- 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, [
10616
10613
  createElementVNode("div", {
10617
10614
  class: "relative block h-100",
10618
10615
  style: normalizeStyle({ height: `calc(${unref(elHeight)} - 2rem)` })
10619
10616
  }, [
10620
- createElementVNode("pre", _hoisted_4$f, [
10617
+ createElementVNode("pre", _hoisted_4$g, [
10621
10618
  _cache[2] || (_cache[2] = createTextVNode(" ")),
10622
10619
  createElementVNode("code", {
10623
10620
  class: normalizeClass(["absolute inset-0", className.value]),
10624
10621
  innerHTML: highlightedCode.value
10625
- }, null, 10, _hoisted_5$e),
10622
+ }, null, 10, _hoisted_5$f),
10626
10623
  _cache[3] || (_cache[3] = createTextVNode("\n "))
10627
10624
  ]),
10628
10625
  !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("textarea", {
@@ -10637,7 +10634,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10637
10634
  "data-gramm": "false",
10638
10635
  onKeydown: withKeys(withModifiers(handleTab, ["prevent"]), ["tab"]),
10639
10636
  onInput: _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", unref(code)))
10640
- }, null, 40, _hoisted_6$b)), [
10637
+ }, null, 40, _hoisted_6$c)), [
10641
10638
  [vModelText, unref(code)]
10642
10639
  ]) : createCommentVNode("", true)
10643
10640
  ], 4)
@@ -10646,10 +10643,10 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10646
10643
  };
10647
10644
  }
10648
10645
  });
10649
- const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-1fbc9b61"]]);
10650
- const _hoisted_1$D = ["title"];
10651
- const _hoisted_2$s = ["id", "placeholder", "required"];
10652
- 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({
10653
10650
  __name: "ColorPicker",
10654
10651
  props: {
10655
10652
  label: {},
@@ -10687,11 +10684,11 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
10687
10684
  placeholder: _ctx.placeholder || _ctx.label,
10688
10685
  class: { "no-edit": !_ctx.editMode },
10689
10686
  required: _ctx.required
10690
- }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$s), [
10687
+ }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$t), [
10691
10688
  [vModelText, inputVal.value]
10692
10689
  ])
10693
10690
  ])
10694
- ], 10, _hoisted_1$D)) : createCommentVNode("", true);
10691
+ ], 10, _hoisted_1$E)) : createCommentVNode("", true);
10695
10692
  };
10696
10693
  }
10697
10694
  });
@@ -19249,9 +19246,9 @@ const eo = ({
19249
19246
  Object.entries(go).forEach(([e, t]) => {
19250
19247
  e !== "default" && (Hn[e] = t);
19251
19248
  });
19252
- const _hoisted_1$C = ["title"];
19253
- const _hoisted_2$r = { key: 0 };
19254
- 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({
19255
19252
  __name: "DateInput",
19256
19253
  props: {
19257
19254
  required: { type: Boolean },
@@ -19293,7 +19290,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
19293
19290
  class: normalizeClass(["bagel-input", { small: _ctx.small }]),
19294
19291
  title: _ctx.label
19295
19292
  }, [
19296
- _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),
19297
19294
  createVNode(unref(Hn), mergeProps({
19298
19295
  ref_key: "datePicker",
19299
19296
  ref: datePicker,
@@ -19309,10 +19306,374 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
19309
19306
  "minutes-grid-increment": _ctx.minutesGridIncrement,
19310
19307
  "start-time": { hours: 8, minutes: 0 }
19311
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"])
19312
19672
  ], 10, _hoisted_1$C);
19313
19673
  };
19314
19674
  }
19315
19675
  });
19676
+ const DatePick = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-e36ecd8c"]]);
19316
19677
  const _hoisted_1$B = { class: "datetime-wrap" };
19317
19678
  const _hoisted_2$q = { class: "date-wrap" };
19318
19679
  const _hoisted_3$l = {
@@ -19702,7 +20063,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
19702
20063
  return openBlock(), createElementBlock("div", _hoisted_1$z, [
19703
20064
  createElementVNode("label", null, toDisplayString(_ctx.label), 1),
19704
20065
  _ctx.required && !storageFiles.value.length ? (openBlock(), createElementBlock("input", _hoisted_2$o)) : createCommentVNode("", true),
19705
- _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$_), {
20066
+ _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$$), {
19706
20067
  key: 1,
19707
20068
  outline: "",
19708
20069
  class: "flex p-05 gap-1",
@@ -20012,7 +20373,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20012
20373
  id: {},
20013
20374
  helptext: {},
20014
20375
  layout: {},
20015
- center: { type: Boolean }
20376
+ center: { type: Boolean },
20377
+ padZero: {}
20016
20378
  },
20017
20379
  emits: ["update:modelValue"],
20018
20380
  setup(__props, { emit: __emit }) {
@@ -20032,7 +20394,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20032
20394
  emit2("update:modelValue", numberValue.value);
20033
20395
  }
20034
20396
  function formatNumber2(num) {
20035
- 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, ",");
20036
20402
  }
20037
20403
  let formattedValue = ref("");
20038
20404
  function inputHandler() {
@@ -20147,7 +20513,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20147
20513
  };
20148
20514
  }
20149
20515
  });
20150
- 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"]]);
20151
20517
  const _hoisted_1$w = ["value", "autofocus", "onKeydown", "onPaste"];
20152
20518
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
20153
20519
  __name: "OTP",
@@ -20810,7 +21176,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
20810
21176
  return openBlock(), createElementBlock("div", _hoisted_1$q, [
20811
21177
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.map(configToOption).filter(Boolean), (action, index2) => {
20812
21178
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
20813
- action.name === "insertTable" ? (openBlock(), createBlock(unref(_sfc_main$W), {
21179
+ action.name === "insertTable" ? (openBlock(), createBlock(unref(_sfc_main$X), {
20814
21180
  key: 0,
20815
21181
  placement: "bottom-start",
20816
21182
  thin: "",
@@ -22108,7 +22474,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22108
22474
  }
22109
22475
  });
22110
22476
  return (_ctx, _cache) => {
22111
- return openBlock(), createBlock(unref(_sfc_main$W), {
22477
+ return openBlock(), createBlock(unref(_sfc_main$X), {
22112
22478
  ref_key: "dropdown",
22113
22479
  ref: dropdown,
22114
22480
  shown: unref(open),
@@ -22187,7 +22553,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22187
22553
  height: "25px",
22188
22554
  class: "mx-1 my-1"
22189
22555
  })) : createCommentVNode("", true),
22190
- createVNode(unref(_sfc_main$_), {
22556
+ createVNode(unref(_sfc_main$$), {
22191
22557
  class: "p-05",
22192
22558
  style: normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
22193
22559
  }, {
@@ -30346,7 +30712,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30346
30712
  withKeys(reset, ["tab"])
30347
30713
  ]
30348
30714
  }, [
30349
- !computedDropDownOptions.value.hide ? (openBlock(), createBlock(unref(_sfc_main$W), {
30715
+ !computedDropDownOptions.value.hide ? (openBlock(), createBlock(unref(_sfc_main$X), {
30350
30716
  key: 0,
30351
30717
  ref_key: "phoneDropdown",
30352
30718
  ref: phoneDropdown,
@@ -30813,7 +31179,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
30813
31179
  return openBlock(), createElementBlock("div", _hoisted_1$i, [
30814
31180
  _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$9, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
30815
31181
  _ctx.required && !pathKeys.value.length ? (openBlock(), createElementBlock("input", _hoisted_3$7)) : createCommentVNode("", true),
30816
- _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$_), {
31182
+ _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$$), {
30817
31183
  key: 2,
30818
31184
  outline: "",
30819
31185
  class: "flex p-05 gap-1",
@@ -31109,7 +31475,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
31109
31475
  },
31110
31476
  setup(__props) {
31111
31477
  return (_ctx, _cache) => {
31112
- 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" }, {
31113
31479
  default: withCtx(() => [
31114
31480
  renderSlot(_ctx.$slots, "brand", {}, void 0, true),
31115
31481
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navLinks, (nav, i2) => {
@@ -31210,7 +31576,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
31210
31576
  icon: "keyboard_arrow_right",
31211
31577
  onClick: unref(toggleMenu)
31212
31578
  }, null, 8, ["onClick"]),
31213
- 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" }, {
31214
31580
  default: withCtx(() => [
31215
31581
  !unref(isOpen) || !unref(slots)["brand-open"] ? renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : createCommentVNode("", true),
31216
31582
  unref(isOpen) ? renderSlot(_ctx.$slots, "brand-open", { key: 1 }, void 0, true) : createCommentVNode("", true),
@@ -31731,7 +32097,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
31731
32097
  onClick: _cache[1] || (_cache[1] = () => _ctx.dismissable ? closeModal() : ""),
31732
32098
  onKeydown: withKeys(closeModal, ["esc"])
31733
32099
  }, [
31734
- createVNode(unref(_sfc_main$_), {
32100
+ createVNode(unref(_sfc_main$$), {
31735
32101
  class: "modal",
31736
32102
  style: normalizeStyle({ ...maxWidth.value }),
31737
32103
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
@@ -31908,7 +32274,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31908
32274
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => emit2("update:visible", $event))
31909
32275
  }, createSlots({
31910
32276
  default: withCtx(() => [
31911
- _ctx.visible ? (openBlock(), createBlock(unref(_sfc_main$R), {
32277
+ _ctx.visible ? (openBlock(), createBlock(unref(_sfc_main$S), {
31912
32278
  key: 0,
31913
32279
  ref_key: "form",
31914
32280
  ref: form,
@@ -33027,7 +33393,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
33027
33393
  row,
33028
33394
  field
33029
33395
  }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_10$1, [
33030
- createVNode(unref(_sfc_main$10), {
33396
+ createVNode(unref(_sfc_main$11), {
33031
33397
  id: field.id,
33032
33398
  class: "embedded-field",
33033
33399
  field,
@@ -35154,33 +35520,34 @@ function timeAgo(date2, lang = "en") {
35154
35520
  return selectedLang.justNow;
35155
35521
  }
35156
35522
  export {
35157
- _sfc_main$17 as Accordion,
35523
+ _sfc_main$18 as Accordion,
35158
35524
  AccordionItem,
35159
- _sfc_main$15 as AddressSearch,
35525
+ _sfc_main$16 as AddressSearch,
35160
35526
  Alert,
35161
35527
  Avatar,
35162
35528
  Badge,
35163
- _sfc_main$R as BagelForm,
35529
+ _sfc_main$S as BagelForm,
35164
35530
  BagelVue,
35165
- _sfc_main$10 as BglComponent,
35166
- _sfc_main$S as BglField,
35167
- _sfc_main$R as BglForm,
35168
- _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,
35169
35535
  BglVideo,
35170
35536
  BottomMenu,
35171
35537
  Btn,
35172
- _sfc_main$_ as Card,
35538
+ _sfc_main$$ as Card,
35173
35539
  Carousel,
35174
35540
  CheckInput,
35175
35541
  Checkbox,
35176
35542
  CodeEditor,
35177
- _sfc_main$L as ColorPicker,
35543
+ _sfc_main$M as ColorPicker,
35178
35544
  DataPreview,
35179
- _sfc_main$K as DateInput,
35545
+ _sfc_main$L as DateInput,
35546
+ DatePick,
35180
35547
  _sfc_main$J as DatePicker,
35181
- _sfc_main$W as Dropdown,
35548
+ _sfc_main$X as Dropdown,
35182
35549
  FORM_STATE_KEY,
35183
- _sfc_main$P as FieldArray,
35550
+ _sfc_main$Q as FieldArray,
35184
35551
  FieldSetVue,
35185
35552
  FileUpload,
35186
35553
  Flag,
@@ -35191,7 +35558,7 @@ export {
35191
35558
  Image$1 as Image,
35192
35559
  JSONInput,
35193
35560
  Layout,
35194
- _sfc_main$Y as Lineart,
35561
+ _sfc_main$Z as Lineart,
35195
35562
  _sfc_main$h as ListItem,
35196
35563
  ListView,
35197
35564
  Loading,