@bagelink/vue 1.2.33 → 1.2.39

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.
@@ -1,6 +1,6 @@
1
1
  import { CalendarEvent, CalendarView, WeekStart } from './CalendarTypes';
2
2
  interface CalendarProps {
3
- events: CalendarEvent[];
3
+ events?: CalendarEvent[];
4
4
  startDate?: Date;
5
5
  view?: CalendarView;
6
6
  weekStart?: WeekStart;
@@ -43,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<CalendarProps, {
43
43
  onViewChange?: ((view: CalendarView) => any) | undefined;
44
44
  }>, {
45
45
  view: CalendarView;
46
+ events: CalendarEvent[];
46
47
  startDate: Date;
47
48
  weekStart: WeekStart;
48
49
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/Index.vue"],"names":[],"mappings":"AA2JA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAQ7E,UAAU,aAAa;IACtB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,SAAS,CAAC,EAAE,SAAS,CAAA;CACrB;AAyFD,iBAAS,cAAc;WAkMT,OAAO,IAA6B;;;;YAVf,GAAG;;;;EAerC;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;oBA9SoB,IAAI;kBAAY,IAAI;;;;;;;;;oBAApB,IAAI;kBAAY,IAAI;;;;;;UAbrD,YAAY;eADP,IAAI;eAEJ,SAAS;wFAoUpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/Index.vue"],"names":[],"mappings":"AA4JA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAQ7E,UAAU,aAAa;IACtB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,SAAS,CAAC,EAAE,SAAS,CAAA;CACrB;AA2FD,iBAAS,cAAc;WAkMT,OAAO,IAA6B;;;;YAVf,GAAG;;;;EAerC;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;oBA/SoB,IAAI;kBAAY,IAAI;;;;;;;;;oBAApB,IAAI;kBAAY,IAAI;;;;;;UAdrD,YAAY;YAFV,aAAa,EAAE;eACZ,IAAI;eAEJ,SAAS;wFAsUpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MonthView.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/calendar/views/MonthView.vue"],"names":[],"mappings":"AA6TA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAgBrD,KAAK,WAAW,GAAG;IAClB,MAAM,EAAE,aAAa,EAAE,CAAA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C;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/DateInput.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAI/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAuIH,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,GAAG,WAAW,CAAC;;;;;;WAvJN,OAAO;UASR,QAAQ;YAGN,MAAM;cAbJ,OAAO;gBAML,OAAO;oBAMH,cAAc;;;;;AA6TjC,wBAUG"}
1
+ {"version":3,"file":"DateInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/DateInput.vue"],"names":[],"mappings":"AAsNA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAI/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAuIH,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,GAAG,WAAW,CAAC;;;;;;WAvJN,OAAO;UASR,QAAQ;YAGN,MAAM;cAbJ,OAAO;gBAML,OAAO;oBAMH,cAAc;;;;;AA2TjC,wBAUG"}
package/dist/index.cjs CHANGED
@@ -1013,12 +1013,12 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
1013
1013
  };
1014
1014
  }
1015
1015
  });
1016
- const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-e972943e"]]);
1016
+ const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-eeb8abde"]]);
1017
1017
  const _hoisted_1$U = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
1018
1018
  const _hoisted_2$F = { class: "weekGrid border-bottom me-1" };
1019
1019
  const _hoisted_3$z = { class: "overflow h-100p pe-05" };
1020
1020
  const _hoisted_4$m = ["onClick"];
1021
- const _hoisted_5$l = { class: "overflow-hidden color-text-light p-025 txt12 h-100p" };
1021
+ const _hoisted_5$l = { class: "overflow-hidden color-white p-025 txt12 h-100p" };
1022
1022
  const _hoisted_6$i = { class: "white-space ellipsis-1" };
1023
1023
  const _hoisted_7$e = { class: "txt10 opacity-8" };
1024
1024
  const slotHeight = 60;
@@ -1100,7 +1100,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
1100
1100
  top: top2,
1101
1101
  height,
1102
1102
  left: 0,
1103
- width: 95,
1103
+ width: 100,
1104
1104
  overlappingEvents: 0,
1105
1105
  position: 0
1106
1106
  };
@@ -1285,11 +1285,10 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
1285
1285
  ref_key: "popoverRef",
1286
1286
  ref: popoverRef,
1287
1287
  thin: "",
1288
- class: "custom-popover fixed z-999 radius-05 bg-white w350",
1288
+ class: "custom-popover fixed z-999 radius-1 bg-white",
1289
1289
  style: vue.normalizeStyle({
1290
1290
  top: `${popoverPosition.value.top}px`,
1291
- left: `${popoverPosition.value.left}px`,
1292
- maxWidth: `${popoverPosition.value.width}px`
1291
+ left: `${popoverPosition.value.left}px`
1293
1292
  })
1294
1293
  }, {
1295
1294
  default: vue.withCtx(() => [
@@ -1304,7 +1303,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
1304
1303
  };
1305
1304
  }
1306
1305
  });
1307
- const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-c29ed3b2"]]);
1306
+ const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-b897fbe8"]]);
1308
1307
  const _hoisted_1$T = { class: "calendar" };
1309
1308
  const _hoisted_2$E = { class: "flex m_block m_pb-1" };
1310
1309
  const _hoisted_3$y = { class: "txt-light my-0" };
@@ -1312,7 +1311,7 @@ const _hoisted_4$l = { class: "ms-auto flex gap-025" };
1312
1311
  const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
1313
1312
  __name: "Index",
1314
1313
  props: {
1315
- events: {},
1314
+ events: { default: () => [] },
1316
1315
  startDate: { default: () => /* @__PURE__ */ new Date() },
1317
1316
  view: { default: "Week" },
1318
1317
  weekStart: { default: "Sunday" }
@@ -1433,7 +1432,7 @@ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
1433
1432
  };
1434
1433
  }
1435
1434
  });
1436
- const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-98cddf40"]]);
1435
+ const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-36ea5622"]]);
1437
1436
  const _hoisted_1$S = {
1438
1437
  key: 0,
1439
1438
  class: "card_label"
@@ -8086,7 +8085,7 @@ ${indent}}`;
8086
8085
  richtext: RichText,
8087
8086
  upload: UploadInput,
8088
8087
  file: UploadInput,
8089
- date: DateInput,
8088
+ date: _sfc_main$L,
8090
8089
  tabs: TabsNav,
8091
8090
  form: _sfc_main$T,
8092
8091
  range: RangeInput
@@ -15213,7 +15212,6 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
15213
15212
  (...args) => vue.unref(handleFocus) && vue.unref(handleFocus)(...args))
15214
15213
  }, [
15215
15214
  _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$s, [
15216
- vue.createTextVNode(vue.toDisplayString(_ctx.label) + " ", 1),
15217
15215
  _ctx.required ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$o, "*")) : vue.createCommentVNode("", true)
15218
15216
  ])) : vue.createCommentVNode("", true),
15219
15217
  vue.createVNode(vue.unref(_sfc_main$W), {
@@ -15234,7 +15232,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
15234
15232
  }, [
15235
15233
  vue.createVNode(vue.unref(TextInput), {
15236
15234
  modelValue: vue.unref(formatDisplayDate)(selectedDate.value),
15237
- icon: "calendar",
15235
+ iconStart: "calendar",
15238
15236
  min: vue.unref(formatDisplayDate)(_ctx.min),
15239
15237
  max: vue.unref(formatDisplayDate)(_ctx.max),
15240
15238
  required: _ctx.required,
@@ -15275,7 +15273,6 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
15275
15273
  };
15276
15274
  }
15277
15275
  });
15278
- const DateInput = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-a0f799e6"]]);
15279
15276
  const _hoisted_1$D = { class: "bagel-input" };
15280
15277
  const _hoisted_2$r = {
15281
15278
  key: 0,
@@ -36354,23 +36351,14 @@ function getBrowserNavigatorLocale() {
36354
36351
  if (typeof navigator !== "object") return "en-US";
36355
36352
  return navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language;
36356
36353
  }
36357
- function handleTimezone(date2, timeZone) {
36358
- if (timeZone === "UTC") {
36354
+ function handleTimezone(date2, locale2, intFmtOpt) {
36355
+ if (intFmtOpt.timeZone === "UTC") {
36359
36356
  const utcDate = new Date(date2.getTime());
36360
36357
  utcDate.setMinutes(utcDate.getMinutes() + date2.getTimezoneOffset());
36361
36358
  return utcDate;
36362
36359
  }
36363
36360
  try {
36364
- const formatter = new Intl.DateTimeFormat("en-US", {
36365
- timeZone,
36366
- timeZoneName: "short",
36367
- year: "numeric",
36368
- month: "numeric",
36369
- day: "numeric",
36370
- hour: "numeric",
36371
- minute: "numeric",
36372
- second: "numeric"
36373
- });
36361
+ const formatter = new Intl.DateTimeFormat(locale2, intFmtOpt);
36374
36362
  const formattedParts = formatter.formatToParts(date2);
36375
36363
  const parts = {};
36376
36364
  formattedParts.forEach((part) => {
@@ -36389,12 +36377,12 @@ function handleTimezone(date2, timeZone) {
36389
36377
  );
36390
36378
  return adjustedDate;
36391
36379
  } catch (error) {
36392
- console.warn(`Error handling timezone ${timeZone}:`, error);
36380
+ console.warn(`Error handling timezone ${intFmtOpt.timeZone}:`, error);
36393
36381
  return date2;
36394
36382
  }
36395
36383
  }
36396
- function getDatePartsMap(date2, locale2, timeZone) {
36397
- const d2 = timeZone ? handleTimezone(date2, timeZone) : date2;
36384
+ function getDatePartsMap(date2, locale2, intFmtOpt) {
36385
+ const d2 = (intFmtOpt == null ? void 0 : intFmtOpt.timeZone) ? handleTimezone(date2, locale2, intFmtOpt) : date2;
36398
36386
  return {
36399
36387
  AmPm: d2.toLocaleString(locale2, { hour: "numeric", hour12: true, minute: "numeric" }).split(" ")[1],
36400
36388
  DD: String(d2.getDate()).padStart(2, "0"),
@@ -36415,7 +36403,7 @@ const _datePartsMapNow = getDatePartsMap(/* @__PURE__ */ new Date(), getBrowserN
36415
36403
  const _orderedDateTokens = Object.keys(_datePartsMapNow).sort((a2, b2) => b2.length - a2.length);
36416
36404
  const _tokenRegExPattern = new RegExp(_orderedDateTokens.map((token) => token).join("|"), "g");
36417
36405
  function formatDate(date2, opts = {}) {
36418
- let { fmt: format2, locale: locale2, tz: timeZone } = opts;
36406
+ let { fmt: format2, locale: locale2, tz: timeZone, ...rest } = opts;
36419
36407
  if (!date2) return "";
36420
36408
  format2 = format2 || "DD.MM.YY";
36421
36409
  locale2 = locale2 || getBrowserNavigatorLocale();
@@ -36425,11 +36413,12 @@ function formatDate(date2, opts = {}) {
36425
36413
  console.warn("Invalid date provided to formatDate:", date2);
36426
36414
  return "";
36427
36415
  }
36428
- const datePartsMap = getDatePartsMap(d2, locale2, timeZone);
36429
- const formatter = new Intl.DateTimeFormat(locale2, {
36416
+ const intFmtOpt = {
36430
36417
  day: "numeric",
36431
36418
  hour: "2-digit",
36432
- hour12: true,
36419
+ // Set default hour12 to true if not explicitly set
36420
+ // hour12: true,
36421
+ hour12: rest.hour12 === void 0 ? true : rest.hour12,
36433
36422
  minute: "2-digit",
36434
36423
  month: "long",
36435
36424
  second: "2-digit",
@@ -36437,7 +36426,9 @@ function formatDate(date2, opts = {}) {
36437
36426
  // Add timeZone if provided
36438
36427
  weekday: "long",
36439
36428
  year: "numeric"
36440
- });
36429
+ };
36430
+ const datePartsMap = getDatePartsMap(d2, locale2, intFmtOpt);
36431
+ const formatter = new Intl.DateTimeFormat(locale2, intFmtOpt);
36441
36432
  const formattedParts = formatter.formatToParts(d2);
36442
36433
  const partsMap = {};
36443
36434
  formattedParts.forEach((part) => {
@@ -36492,7 +36483,7 @@ exports.CodeEditor = CodeEditor;
36492
36483
  exports.ColorInput = _sfc_main$N;
36493
36484
  exports.DataPreview = DataPreview;
36494
36485
  exports.DataTable = DataTable;
36495
- exports.DateInput = DateInput;
36486
+ exports.DateInput = _sfc_main$L;
36496
36487
  exports.DatePicker = DatePicker;
36497
36488
  exports.Draggable = _sfc_main$X;
36498
36489
  exports.Dropdown = _sfc_main$W;
package/dist/index.mjs CHANGED
@@ -1011,12 +1011,12 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
1011
1011
  };
1012
1012
  }
1013
1013
  });
1014
- const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-e972943e"]]);
1014
+ const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-eeb8abde"]]);
1015
1015
  const _hoisted_1$U = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
1016
1016
  const _hoisted_2$F = { class: "weekGrid border-bottom me-1" };
1017
1017
  const _hoisted_3$z = { class: "overflow h-100p pe-05" };
1018
1018
  const _hoisted_4$m = ["onClick"];
1019
- const _hoisted_5$l = { class: "overflow-hidden color-text-light p-025 txt12 h-100p" };
1019
+ const _hoisted_5$l = { class: "overflow-hidden color-white p-025 txt12 h-100p" };
1020
1020
  const _hoisted_6$i = { class: "white-space ellipsis-1" };
1021
1021
  const _hoisted_7$e = { class: "txt10 opacity-8" };
1022
1022
  const slotHeight = 60;
@@ -1098,7 +1098,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1098
1098
  top: top2,
1099
1099
  height,
1100
1100
  left: 0,
1101
- width: 95,
1101
+ width: 100,
1102
1102
  overlappingEvents: 0,
1103
1103
  position: 0
1104
1104
  };
@@ -1283,11 +1283,10 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1283
1283
  ref_key: "popoverRef",
1284
1284
  ref: popoverRef,
1285
1285
  thin: "",
1286
- class: "custom-popover fixed z-999 radius-05 bg-white w350",
1286
+ class: "custom-popover fixed z-999 radius-1 bg-white",
1287
1287
  style: normalizeStyle({
1288
1288
  top: `${popoverPosition.value.top}px`,
1289
- left: `${popoverPosition.value.left}px`,
1290
- maxWidth: `${popoverPosition.value.width}px`
1289
+ left: `${popoverPosition.value.left}px`
1291
1290
  })
1292
1291
  }, {
1293
1292
  default: withCtx(() => [
@@ -1302,7 +1301,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1302
1301
  };
1303
1302
  }
1304
1303
  });
1305
- const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-c29ed3b2"]]);
1304
+ const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-b897fbe8"]]);
1306
1305
  const _hoisted_1$T = { class: "calendar" };
1307
1306
  const _hoisted_2$E = { class: "flex m_block m_pb-1" };
1308
1307
  const _hoisted_3$y = { class: "txt-light my-0" };
@@ -1310,7 +1309,7 @@ const _hoisted_4$l = { class: "ms-auto flex gap-025" };
1310
1309
  const _sfc_main$11 = /* @__PURE__ */ defineComponent({
1311
1310
  __name: "Index",
1312
1311
  props: {
1313
- events: {},
1312
+ events: { default: () => [] },
1314
1313
  startDate: { default: () => /* @__PURE__ */ new Date() },
1315
1314
  view: { default: "Week" },
1316
1315
  weekStart: { default: "Sunday" }
@@ -1431,7 +1430,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
1431
1430
  };
1432
1431
  }
1433
1432
  });
1434
- const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-98cddf40"]]);
1433
+ const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-36ea5622"]]);
1435
1434
  const _hoisted_1$S = {
1436
1435
  key: 0,
1437
1436
  class: "card_label"
@@ -8084,7 +8083,7 @@ ${indent}}`;
8084
8083
  richtext: RichText,
8085
8084
  upload: UploadInput,
8086
8085
  file: UploadInput,
8087
- date: DateInput,
8086
+ date: _sfc_main$L,
8088
8087
  tabs: TabsNav,
8089
8088
  form: _sfc_main$T,
8090
8089
  range: RangeInput
@@ -15211,7 +15210,6 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
15211
15210
  (...args) => unref(handleFocus) && unref(handleFocus)(...args))
15212
15211
  }, [
15213
15212
  _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$s, [
15214
- createTextVNode(toDisplayString(_ctx.label) + " ", 1),
15215
15213
  _ctx.required ? (openBlock(), createElementBlock("span", _hoisted_3$o, "*")) : createCommentVNode("", true)
15216
15214
  ])) : createCommentVNode("", true),
15217
15215
  createVNode(unref(_sfc_main$W), {
@@ -15232,7 +15230,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
15232
15230
  }, [
15233
15231
  createVNode(unref(TextInput), {
15234
15232
  modelValue: unref(formatDisplayDate)(selectedDate.value),
15235
- icon: "calendar",
15233
+ iconStart: "calendar",
15236
15234
  min: unref(formatDisplayDate)(_ctx.min),
15237
15235
  max: unref(formatDisplayDate)(_ctx.max),
15238
15236
  required: _ctx.required,
@@ -15273,7 +15271,6 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
15273
15271
  };
15274
15272
  }
15275
15273
  });
15276
- const DateInput = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-a0f799e6"]]);
15277
15274
  const _hoisted_1$D = { class: "bagel-input" };
15278
15275
  const _hoisted_2$r = {
15279
15276
  key: 0,
@@ -36352,23 +36349,14 @@ function getBrowserNavigatorLocale() {
36352
36349
  if (typeof navigator !== "object") return "en-US";
36353
36350
  return navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language;
36354
36351
  }
36355
- function handleTimezone(date2, timeZone) {
36356
- if (timeZone === "UTC") {
36352
+ function handleTimezone(date2, locale2, intFmtOpt) {
36353
+ if (intFmtOpt.timeZone === "UTC") {
36357
36354
  const utcDate = new Date(date2.getTime());
36358
36355
  utcDate.setMinutes(utcDate.getMinutes() + date2.getTimezoneOffset());
36359
36356
  return utcDate;
36360
36357
  }
36361
36358
  try {
36362
- const formatter = new Intl.DateTimeFormat("en-US", {
36363
- timeZone,
36364
- timeZoneName: "short",
36365
- year: "numeric",
36366
- month: "numeric",
36367
- day: "numeric",
36368
- hour: "numeric",
36369
- minute: "numeric",
36370
- second: "numeric"
36371
- });
36359
+ const formatter = new Intl.DateTimeFormat(locale2, intFmtOpt);
36372
36360
  const formattedParts = formatter.formatToParts(date2);
36373
36361
  const parts = {};
36374
36362
  formattedParts.forEach((part) => {
@@ -36387,12 +36375,12 @@ function handleTimezone(date2, timeZone) {
36387
36375
  );
36388
36376
  return adjustedDate;
36389
36377
  } catch (error) {
36390
- console.warn(`Error handling timezone ${timeZone}:`, error);
36378
+ console.warn(`Error handling timezone ${intFmtOpt.timeZone}:`, error);
36391
36379
  return date2;
36392
36380
  }
36393
36381
  }
36394
- function getDatePartsMap(date2, locale2, timeZone) {
36395
- const d2 = timeZone ? handleTimezone(date2, timeZone) : date2;
36382
+ function getDatePartsMap(date2, locale2, intFmtOpt) {
36383
+ const d2 = (intFmtOpt == null ? void 0 : intFmtOpt.timeZone) ? handleTimezone(date2, locale2, intFmtOpt) : date2;
36396
36384
  return {
36397
36385
  AmPm: d2.toLocaleString(locale2, { hour: "numeric", hour12: true, minute: "numeric" }).split(" ")[1],
36398
36386
  DD: String(d2.getDate()).padStart(2, "0"),
@@ -36413,7 +36401,7 @@ const _datePartsMapNow = getDatePartsMap(/* @__PURE__ */ new Date(), getBrowserN
36413
36401
  const _orderedDateTokens = Object.keys(_datePartsMapNow).sort((a2, b2) => b2.length - a2.length);
36414
36402
  const _tokenRegExPattern = new RegExp(_orderedDateTokens.map((token) => token).join("|"), "g");
36415
36403
  function formatDate(date2, opts = {}) {
36416
- let { fmt: format2, locale: locale2, tz: timeZone } = opts;
36404
+ let { fmt: format2, locale: locale2, tz: timeZone, ...rest } = opts;
36417
36405
  if (!date2) return "";
36418
36406
  format2 = format2 || "DD.MM.YY";
36419
36407
  locale2 = locale2 || getBrowserNavigatorLocale();
@@ -36423,11 +36411,12 @@ function formatDate(date2, opts = {}) {
36423
36411
  console.warn("Invalid date provided to formatDate:", date2);
36424
36412
  return "";
36425
36413
  }
36426
- const datePartsMap = getDatePartsMap(d2, locale2, timeZone);
36427
- const formatter = new Intl.DateTimeFormat(locale2, {
36414
+ const intFmtOpt = {
36428
36415
  day: "numeric",
36429
36416
  hour: "2-digit",
36430
- hour12: true,
36417
+ // Set default hour12 to true if not explicitly set
36418
+ // hour12: true,
36419
+ hour12: rest.hour12 === void 0 ? true : rest.hour12,
36431
36420
  minute: "2-digit",
36432
36421
  month: "long",
36433
36422
  second: "2-digit",
@@ -36435,7 +36424,9 @@ function formatDate(date2, opts = {}) {
36435
36424
  // Add timeZone if provided
36436
36425
  weekday: "long",
36437
36426
  year: "numeric"
36438
- });
36427
+ };
36428
+ const datePartsMap = getDatePartsMap(d2, locale2, intFmtOpt);
36429
+ const formatter = new Intl.DateTimeFormat(locale2, intFmtOpt);
36439
36430
  const formattedParts = formatter.formatToParts(d2);
36440
36431
  const partsMap = {};
36441
36432
  formattedParts.forEach((part) => {
@@ -36491,7 +36482,7 @@ export {
36491
36482
  _sfc_main$N as ColorInput,
36492
36483
  DataPreview,
36493
36484
  DataTable,
36494
- DateInput,
36485
+ _sfc_main$L as DateInput,
36495
36486
  DatePicker,
36496
36487
  _sfc_main$X as Draggable,
36497
36488
  _sfc_main$W as Dropdown,
package/dist/style.css CHANGED
@@ -478,23 +478,23 @@ to {
478
478
  }
479
479
  }
480
480
 
481
- .month-view[data-v-e972943e] {
481
+ .month-view[data-v-eeb8abde] {
482
482
  display: flex;
483
483
  flex-direction: column;
484
484
  height: 100%;
485
485
  overflow: hidden;
486
486
  }
487
- .month-header[data-v-e972943e] {
487
+ .month-header[data-v-eeb8abde] {
488
488
  display: grid;
489
489
  grid-template-columns: repeat(7, 1fr);
490
490
  border-bottom: 1px solid var(--border-color);
491
491
  }
492
- .weekday[data-v-e972943e] {
492
+ .weekday[data-v-eeb8abde] {
493
493
  padding: 0.5rem;
494
494
  text-align: center;
495
495
  color: var(--text-muted);
496
496
  }
497
- .month-grid[data-v-e972943e] {
497
+ .month-grid[data-v-eeb8abde] {
498
498
  display: grid;
499
499
  grid-template-columns: repeat(7, 1fr);
500
500
  grid-template-rows: repeat(6, 1fr);
@@ -502,7 +502,7 @@ to {
502
502
  overflow: auto;
503
503
  border-inline-end: 1px solid var(--border-color);
504
504
  }
505
- .day-cell[data-v-e972943e] {
505
+ .day-cell[data-v-eeb8abde] {
506
506
  border-inline-start: 1px solid var(--border-color);
507
507
  border-bottom: 1px solid var(--border-color);
508
508
  padding: 0.5rem;
@@ -510,24 +510,24 @@ to {
510
510
  display: flex;
511
511
  flex-direction: column;
512
512
  }
513
- .day-number[data-v-e972943e] {
513
+ .day-number[data-v-eeb8abde] {
514
514
  margin-bottom: 0.5rem;
515
515
  }
516
- .other-month[data-v-e972943e] {
516
+ .other-month[data-v-eeb8abde] {
517
517
  background-color: var(--bgl-gray-light);
518
518
  color: var(--bgl-gray);
519
519
  }
520
- .today[data-v-e972943e] {
520
+ .today[data-v-eeb8abde] {
521
521
  background-color: var(--bgl-primary-light);
522
522
  }
523
- .today .day-number[data-v-e972943e] {
523
+ .today .day-number[data-v-eeb8abde] {
524
524
  color: var(--bgl-primary);
525
525
  }
526
- .day-events[data-v-e972943e] {
526
+ .day-events[data-v-eeb8abde] {
527
527
  flex-grow: 1;
528
528
  overflow-y: auto;
529
529
  }
530
- .event-item[data-v-e972943e] {
530
+ .event-item[data-v-eeb8abde] {
531
531
  margin-bottom: 0.25rem;
532
532
  padding: 0.25rem;
533
533
  border-radius: 4px;
@@ -536,49 +536,35 @@ to {
536
536
  cursor: pointer;
537
537
  transition: all 0.2s ease;
538
538
  }
539
- .event-title[data-v-e972943e] {
539
+ .event-title[data-v-eeb8abde] {
540
540
  font-weight: 500;
541
541
  white-space: nowrap;
542
542
  overflow: hidden;
543
543
  text-overflow: ellipsis;
544
544
  }
545
- .event-time[data-v-e972943e] {
545
+ .event-time[data-v-eeb8abde] {
546
546
  font-size: 0.7rem;
547
547
  opacity: 0.8;
548
548
  }
549
- .event-dot[data-v-e972943e] {
549
+ .event-dot[data-v-eeb8abde] {
550
550
  width: 6px;
551
551
  height: 6px;
552
552
  background-color: var(--bgl-primary);
553
553
  border-radius: 50%;
554
554
  margin: 0.25rem auto;
555
555
  }
556
- @media (max-width: 768px) {
557
- .day-cell[data-v-e972943e] {
558
- min-height: 60px;
559
- padding: 0.25rem;
560
- }
561
- .day-number[data-v-e972943e] {
562
- font-size: 0.8rem;
563
- margin-bottom: 0.25rem;
564
- }
565
- .weekday[data-v-e972943e] {
566
- font-size: 0.8rem;
567
- padding: 0.25rem;
568
- }
569
- }
570
- .custom-popover[data-v-e972943e] {
556
+ .custom-popover[data-v-eeb8abde] {
571
557
  position: fixed;
572
558
  z-index: 1000;
573
559
  min-width: 250px;
574
560
  max-width: 350px;
575
561
  background-color: white;
576
- border-radius: 4px;
562
+ border-radius: var(--btn-border-radius);
577
563
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
578
- animation: fadeIn-e972943e 0.2s ease;
564
+ animation: fadeIn-eeb8abde 0.2s ease;
579
565
  transform-origin: center left;
580
566
  }
581
- @keyframes fadeIn-e972943e {
567
+ @keyframes fadeIn-eeb8abde {
582
568
  from {
583
569
  opacity: 0;
584
570
  transform: scale(0.95);
@@ -588,50 +574,64 @@ to {
588
574
  transform: scale(1);
589
575
  }
590
576
  }
577
+ @media (max-width: 768px) {
578
+ .day-cell[data-v-eeb8abde] {
579
+ min-height: 60px;
580
+ padding: 0.25rem;
581
+ }
582
+ .day-number[data-v-eeb8abde] {
583
+ font-size: 0.8rem;
584
+ margin-bottom: 0.25rem;
585
+ }
586
+ .weekday[data-v-eeb8abde] {
587
+ font-size: 0.8rem;
588
+ padding: 0.25rem;
589
+ }
590
+ }
591
591
 
592
- .weekGrid[data-v-c29ed3b2]{
592
+ .weekGrid[data-v-b897fbe8]{
593
593
  display: grid;
594
594
  grid-template-columns: 5rem repeat(7, 1fr);
595
595
  }
596
- .days-column[data-v-c29ed3b2] {
596
+ .days-column[data-v-b897fbe8] {
597
597
  flex-grow: 1;
598
598
  display: flex;
599
599
  }
600
- .time-slot[data-v-c29ed3b2] {
600
+ .time-slot[data-v-b897fbe8] {
601
601
  height: 30px;
602
602
  display: flex;
603
603
  align-items: center;
604
604
  justify-content: center;
605
605
  color: var(--text-muted);
606
606
  }
607
- .time-slots[data-v-c29ed3b2] {
607
+ .time-slots[data-v-b897fbe8] {
608
608
  flex-grow: 1;
609
609
  display: flex;
610
610
  overflow: auto;
611
611
  position: relative;
612
612
  }
613
- .day-column[data-v-c29ed3b2] {
613
+ .day-column[data-v-b897fbe8] {
614
614
  flex: 1;
615
615
  }
616
- .event[data-v-c29ed3b2] {
616
+ .event[data-v-b897fbe8] {
617
617
  margin-right: 2px;
618
618
  }
619
- .event[data-v-c29ed3b2]:hover {
619
+ .event[data-v-b897fbe8]:hover {
620
620
  z-index: 1;
621
621
  }
622
- .drag-preview[data-v-c29ed3b2] {
622
+ .drag-preview[data-v-b897fbe8] {
623
623
  border: 2px solid var(--bgl-primary);
624
624
  }
625
- .current-time-line[data-v-c29ed3b2] {
625
+ .current-time-line[data-v-b897fbe8] {
626
626
  height: 2px;
627
627
  }
628
- .custom-popover[data-v-c29ed3b2] {
628
+ .custom-popover[data-v-b897fbe8] {
629
629
  min-width: 250px;
630
630
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
631
- animation: fadeIn-c29ed3b2 0.2s ease;
631
+ animation: fadeIn-b897fbe8 0.2s ease;
632
632
  transform-origin: center left;
633
633
  }
634
- @keyframes fadeIn-c29ed3b2 {
634
+ @keyframes fadeIn-b897fbe8 {
635
635
  from {
636
636
  opacity: 0;
637
637
  transform: scale(0.95);
@@ -644,7 +644,7 @@ to {
644
644
  @media screen and (max-width: 910px) {
645
645
  }
646
646
 
647
- .calendar[data-v-98cddf40] {
647
+ .calendar[data-v-36ea5622] {
648
648
  display: flex;
649
649
  flex-direction: column;
650
650
  height: 100%;
@@ -1462,9 +1462,18 @@ pre code.hljs{
1462
1462
  opacity: 0.4;
1463
1463
  }
1464
1464
 
1465
- .date-picker-container[data-v-a0f799e6] {
1465
+ .date-picker-container {
1466
1466
  width: 100%;
1467
1467
  }
1468
+ .date-picker-container .date-input{
1469
+ --input-bg: transparent;
1470
+ --input-font-size: 12px;
1471
+ opacity: 0.6;
1472
+ --input-height: 20px;
1473
+ }
1474
+ .date-picker-container .date-input .bagel-input input{
1475
+ padding: 0 !important;
1476
+ }
1468
1477
 
1469
1478
  .fileUploadWrap[data-v-50fd0597] {
1470
1479
  outline: 1px solid var(--border-color);
@@ -17,8 +17,8 @@ export declare function timeAgo(date: string | Date, lang?: AvailableTimeLanguag
17
17
  * @param timeZone The timezone to use (e.g., 'UTC', 'America/New_York')
18
18
  * @returns Date parts with timezone adjustment applied
19
19
  */
20
- export declare function handleTimezone(date: Date, timeZone: string): Date;
21
- export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, timeZone?: string): {
20
+ export declare function handleTimezone(date: Date, locale: Intl.LocalesArgument, intFmtOpt: Intl.DateTimeFormatOptions): Date;
21
+ export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, intFmtOpt?: Intl.DateTimeFormatOptions): {
22
22
  AmPm: string;
23
23
  DD: string;
24
24
  DDD: string;
@@ -33,7 +33,7 @@ export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument
33
33
  YY: string;
34
34
  YYYY: string;
35
35
  };
36
- export interface FormatDateOptions {
36
+ export interface FormatDateOptions extends Partial<Pick<Intl.DateTimeFormatOptions, 'hour12'>> {
37
37
  fmt?: DateTimeAcceptedFormats;
38
38
  locale?: Intl.LocalesArgument;
39
39
  tz?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAyBvE;AAqDD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,sBAA6B,UAsD/E;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAgDjE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;;;EAoB1F;AAcD,MAAM,WAAW,iBAAiB;IACjC,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAC7B,EAAE,CA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EAAE,QAAQ,CAAC,CAAC;IAC7F,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACX;AACD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACzB,IAAI,CAAC,EAAE,QAAQ,EACf,IAAI,GAAE,iBAAsB,GAC1B,MAAM,CAuER;AACD,eAAO,MAAM,OAAO,mBAAa,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.2.33",
4
+ "version": "1.2.39",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -9,7 +9,7 @@ import MonthView from './views/MonthView.vue'
9
9
  import WeekView from './views/WeekView.vue'
10
10
 
11
11
  interface CalendarProps {
12
- events: CalendarEvent[]
12
+ events?: CalendarEvent[]
13
13
  startDate?: Date
14
14
  view?: CalendarView
15
15
  weekStart?: WeekStart
@@ -18,7 +18,8 @@ interface CalendarProps {
18
18
  const props = withDefaults(defineProps<CalendarProps>(), {
19
19
  startDate: () => new Date(),
20
20
  view: 'Week',
21
- weekStart: 'Sunday'
21
+ weekStart: 'Sunday',
22
+ events: () => []
22
23
  })
23
24
 
24
25
  const emit = defineEmits<{
@@ -272,30 +272,13 @@ function closePopover() {
272
272
  margin: 0.25rem auto;
273
273
  }
274
274
 
275
- @media (max-width: 768px) {
276
- .day-cell {
277
- min-height: 60px;
278
- padding: 0.25rem;
279
- }
280
-
281
- .day-number {
282
- font-size: 0.8rem;
283
- margin-bottom: 0.25rem;
284
- }
285
-
286
- .weekday {
287
- font-size: 0.8rem;
288
- padding: 0.25rem;
289
- }
290
- }
291
-
292
275
  .custom-popover {
293
276
  position: fixed;
294
277
  z-index: 1000;
295
278
  min-width: 250px;
296
279
  max-width: 350px;
297
280
  background-color: white;
298
- border-radius: 4px;
281
+ border-radius: var(--btn-border-radius);
299
282
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
300
283
  animation: fadeIn 0.2s ease;
301
284
  transform-origin: center left;
@@ -311,4 +294,21 @@ function closePopover() {
311
294
  transform: scale(1);
312
295
  }
313
296
  }
297
+
298
+ @media (max-width: 768px) {
299
+ .day-cell {
300
+ min-height: 60px;
301
+ padding: 0.25rem;
302
+ }
303
+
304
+ .day-number {
305
+ font-size: 0.8rem;
306
+ margin-bottom: 0.25rem;
307
+ }
308
+
309
+ .weekday {
310
+ font-size: 0.8rem;
311
+ padding: 0.25rem;
312
+ }
313
+ }
314
314
  </style>
@@ -129,7 +129,7 @@ const processedEvents = computed(() => {
129
129
  top,
130
130
  height,
131
131
  left: 0,
132
- width: 95,
132
+ width: 100,
133
133
  overlappingEvents: 0,
134
134
  position: 0
135
135
  }
@@ -317,7 +317,7 @@ onUnmounted(() => {
317
317
  }"
318
318
  @click.stop="slots.eventContent ? openPopover(event, $event) : emit('eventClick', event)"
319
319
  >
320
- <div class="overflow-hidden color-text-light p-025 txt12 h-100p">
320
+ <div class="overflow-hidden color-white p-025 txt12 h-100p">
321
321
  <div class="white-space ellipsis-1">
322
322
  {{ event.title }}
323
323
  </div>
@@ -349,11 +349,11 @@ onUnmounted(() => {
349
349
  ref="popoverRef"
350
350
  v-click-outside="closePopover"
351
351
  thin
352
- class="custom-popover fixed z-999 radius-05 bg-white w350"
352
+ class="custom-popover fixed z-999 radius-1 bg-white "
353
353
  :style="{
354
354
  top: `${popoverPosition.top}px`,
355
355
  left: `${popoverPosition.left}px`,
356
- maxWidth: `${popoverPosition.width}px`,
356
+
357
357
  }"
358
358
  >
359
359
  <slot name="eventContent" :event="activeEvent" />
@@ -150,7 +150,7 @@ onMounted(() => {
150
150
  <template>
151
151
  <div class="bagel-input" :class="{ small }" :title="label" @focusin="handleFocus">
152
152
  <label v-if="label">
153
- {{ label }}
153
+ <!-- {{ label }} -->
154
154
  <span v-if="required" class="required">*</span>
155
155
  </label>
156
156
  <Dropdown
@@ -163,7 +163,7 @@ onMounted(() => {
163
163
  <div ref="datePickerRef" class="date-picker-container" @mousedown.stop @click.stop>
164
164
  <TextInput
165
165
  :modelValue="formatDisplayDate(selectedDate)"
166
- icon="calendar"
166
+ iconStart="calendar"
167
167
  :min="formatDisplayDate(min)"
168
168
  :max="formatDisplayDate(max)"
169
169
  :required="required"
@@ -196,8 +196,17 @@ onMounted(() => {
196
196
  </div>
197
197
  </template>
198
198
 
199
- <style scoped>
199
+ <style>
200
200
  .date-picker-container {
201
201
  width: 100%;
202
202
  }
203
+ .date-picker-container .date-input{
204
+ --input-bg: transparent;
205
+ --input-font-size: 12px;
206
+ opacity: 0.6;
207
+ --input-height: 20px;
208
+ }
209
+ .date-picker-container .date-input .bagel-input input{
210
+ padding: 0 !important;
211
+ }
203
212
  </style>
@@ -158,9 +158,9 @@ function getBrowserNavigatorLocale(): string {
158
158
  * @param timeZone The timezone to use (e.g., 'UTC', 'America/New_York')
159
159
  * @returns Date parts with timezone adjustment applied
160
160
  */
161
- export function handleTimezone(date: Date, timeZone: string): Date {
161
+ export function handleTimezone(date: Date, locale: Intl.LocalesArgument, intFmtOpt: Intl.DateTimeFormatOptions): Date {
162
162
  // If timeZone is UTC, convert to UTC directly
163
- if (timeZone === 'UTC') {
163
+ if (intFmtOpt.timeZone === 'UTC') {
164
164
  const utcDate = new Date(date.getTime())
165
165
  utcDate.setMinutes(utcDate.getMinutes() + date.getTimezoneOffset())
166
166
  return utcDate
@@ -169,16 +169,7 @@ export function handleTimezone(date: Date, timeZone: string): Date {
169
169
  // For other timezones, use the Intl API
170
170
  try {
171
171
  // Get the target timezone's offset at this specific date
172
- const formatter = new Intl.DateTimeFormat('en-US', {
173
- timeZone,
174
- timeZoneName: 'short',
175
- year: 'numeric',
176
- month: 'numeric',
177
- day: 'numeric',
178
- hour: 'numeric',
179
- minute: 'numeric',
180
- second: 'numeric',
181
- })
172
+ const formatter = new Intl.DateTimeFormat(locale, intFmtOpt)
182
173
 
183
174
  // Format the date in the target timezone
184
175
  const formattedParts = formatter.formatToParts(date)
@@ -203,14 +194,15 @@ export function handleTimezone(date: Date, timeZone: string): Date {
203
194
 
204
195
  return adjustedDate
205
196
  } catch (error) {
206
- console.warn(`Error handling timezone ${timeZone}:`, error)
197
+ console.warn(`Error handling timezone ${intFmtOpt.timeZone}:`, error)
207
198
  return date // Return original date on error
208
199
  }
209
200
  }
210
201
 
211
- export function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, timeZone?: string) {
202
+ export function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, intFmtOpt?: Intl.DateTimeFormatOptions) {
212
203
  // Apply timezone adjustment if specified
213
- const d = timeZone ? handleTimezone(date, timeZone) : date
204
+ const d = intFmtOpt?.timeZone ? handleTimezone(date, locale, intFmtOpt) : date
205
+ // const d = date
214
206
 
215
207
  /// keep-sorted
216
208
  return {
@@ -242,7 +234,7 @@ const _orderedDateTokens = (
242
234
  // ? no longer creating the Regex Objs it in a loop
243
235
  const _tokenRegExPattern = new RegExp(_orderedDateTokens.map(token => token).join('|'), 'g')
244
236
 
245
- export interface FormatDateOptions {
237
+ export interface FormatDateOptions extends Partial<Pick<Intl.DateTimeFormatOptions, 'hour12'>> {
246
238
  fmt?: DateTimeAcceptedFormats
247
239
  locale?: Intl.LocalesArgument
248
240
  tz?: string
@@ -258,9 +250,9 @@ export interface FormatDateOptions {
258
250
  */
259
251
  export function formatDate(
260
252
  date?: DateLike,
261
- opts: FormatDateOptions = {}
253
+ opts: FormatDateOptions = {},
262
254
  ): string {
263
- let { fmt: format, locale, tz: timeZone } = opts
255
+ let { fmt: format, locale, tz: timeZone, ...rest } = opts
264
256
 
265
257
  if (!date) return ''
266
258
  format = format || 'DD.MM.YY'
@@ -276,21 +268,26 @@ export function formatDate(
276
268
  return ''
277
269
  }
278
270
 
279
- const datePartsMap = getDatePartsMap(d, locale, timeZone)
280
-
281
271
  // For more complex formats that need localization, use Intl.DateTimeFormat
282
272
  /// keep-sorted
283
- const formatter = new Intl.DateTimeFormat(locale, {
273
+ const intFmtOpt: Intl.DateTimeFormatOptions = {
284
274
  day: 'numeric',
285
275
  hour: '2-digit',
286
- hour12: true,
276
+
277
+ // Set default hour12 to true if not explicitly set
278
+ // hour12: true,
279
+ hour12: rest.hour12 === undefined ? true : rest.hour12,
287
280
  minute: '2-digit',
288
281
  month: 'long',
289
282
  second: '2-digit',
290
283
  timeZone, // Add timeZone if provided
291
284
  weekday: 'long',
292
285
  year: 'numeric',
293
- })
286
+ }
287
+
288
+ const datePartsMap = getDatePartsMap(d, locale, intFmtOpt)
289
+
290
+ const formatter = new Intl.DateTimeFormat(locale, intFmtOpt)
294
291
 
295
292
  const formattedParts = formatter.formatToParts(d)
296
293
  const partsMap: Partial<Record<Intl.DateTimeFormatPartTypes, string>> = {}