courthive-components 3.4.6 → 3.5.0

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.
@@ -1191,13 +1191,13 @@ var oe = class {
1191
1191
  let t = (t) => {
1192
1192
  if (this.core.isDestroyed || !n.includes(t.key)) return;
1193
1193
  t.preventDefault();
1194
- let r = parseInt(e.value) || 0, i = parseInt(e.getAttribute("max") || "23"), a = +(this.core.options.clock.type === "12h");
1195
- e.value = this.computeSpinValue(t.key, r, a, i, 3).toString().padStart(2, "0"), e.setAttribute("aria-valuenow", e.value), e.setAttribute("aria-valuetext", e.value), M(this.core.getModalElement(), `${this.core.options.labels.announceHour ?? "Hour"}: ${e.value}`), this.emitter.emit("animation:clock", {}), this.emitter.emit("select:hour", { hour: e.value });
1196
- let o = this.core.getMinutes(), s = this.core.getActiveTypeMode();
1194
+ let r = parseInt(e.value) || 0, i = parseInt(e.getAttribute("max") || "23"), a = +(this.core.options.clock.type === "12h"), o = this.computeSpinValue(t.key, r, a, i, 3);
1195
+ e.value = o.toString().padStart(2, "0"), e.setAttribute("aria-valuenow", e.value), e.setAttribute("aria-valuetext", e.value), M(this.core.getModalElement(), `${this.core.options.labels.announceHour ?? "Hour"}: ${e.value}`), this.emitter.emit("animation:clock", {}), this.emitter.emit("select:hour", { hour: e.value });
1196
+ let s = this.core.getMinutes(), c = this.core.getActiveTypeMode();
1197
1197
  this.emitter.emit("update", {
1198
1198
  hour: e.value,
1199
- minutes: o?.value,
1200
- type: s?.textContent || void 0
1199
+ minutes: s?.value,
1200
+ type: c?.textContent || void 0
1201
1201
  });
1202
1202
  };
1203
1203
  e.addEventListener("keydown", t), this.cleanupHandlers.push(() => e.removeEventListener("keydown", t));
@@ -1206,13 +1206,13 @@ var oe = class {
1206
1206
  let e = (e) => {
1207
1207
  if (this.core.isDestroyed || !n.includes(e.key)) return;
1208
1208
  e.preventDefault();
1209
- let r = parseInt(t.value) || 0;
1210
- t.value = this.computeSpinValue(e.key, r, 0, 59, 5).toString().padStart(2, "0"), t.setAttribute("aria-valuenow", t.value), t.setAttribute("aria-valuetext", t.value), M(this.core.getModalElement(), `${this.core.options.labels.announceMinute ?? "Minutes"}: ${t.value}`), this.emitter.emit("animation:clock", {}), this.emitter.emit("select:minute", { minutes: t.value });
1211
- let i = this.core.getHour(), a = this.core.getActiveTypeMode();
1209
+ let r = parseInt(t.value) || 0, i = this.computeSpinValue(e.key, r, 0, 59, 5);
1210
+ t.value = i.toString().padStart(2, "0"), t.setAttribute("aria-valuenow", t.value), t.setAttribute("aria-valuetext", t.value), M(this.core.getModalElement(), `${this.core.options.labels.announceMinute ?? "Minutes"}: ${t.value}`), this.emitter.emit("animation:clock", {}), this.emitter.emit("select:minute", { minutes: t.value });
1211
+ let a = this.core.getHour(), o = this.core.getActiveTypeMode();
1212
1212
  this.emitter.emit("update", {
1213
- hour: i?.value,
1213
+ hour: a?.value,
1214
1214
  minutes: t.value,
1215
- type: a?.textContent || void 0
1215
+ type: o?.textContent || void 0
1216
1216
  });
1217
1217
  };
1218
1218
  t.addEventListener("keydown", e), this.cleanupHandlers.push(() => t.removeEventListener("keydown", e));
@@ -6,5 +6,12 @@
6
6
  * "Dec 30, 2025 – Jan 2, 2026" (cross-year range)
7
7
  *
8
8
  * Returns undefined when neither bound is present or both parse as NaN.
9
+ *
10
+ * startDate/endDate are CALENDAR DAYS (YYYY-MM-DD), so they must be parsed as
11
+ * such — `new Date("2026-06-30")` parses as UTC midnight and renders one day
12
+ * early west of UTC (in America/New_York it formats as "Jun 29"), which made a
13
+ * June-30 tournament's card read "… – Jun 29" while its Live pill (which uses
14
+ * parseCalendarDate) stayed correct. Build a LOCAL-midnight Date from the
15
+ * calendar parts so the day survives toLocaleDateString in any host timezone.
9
16
  */
10
17
  export declare function formatDateRange(startISO?: string, endISO?: string): string | undefined;
@@ -314,8 +314,8 @@ var m = class {
314
314
  case "ArrowRight":
315
315
  case "ArrowLeft": {
316
316
  i.preventDefault();
317
- let e = n[((i.key === "ArrowRight" ? t + 1 : t - 1) + n.length) % n.length];
318
- this.isTabDisabled(e) || e.focus();
317
+ let e = ((i.key === "ArrowRight" ? t + 1 : t - 1) + n.length) % n.length, r = n[e];
318
+ this.isTabDisabled(r) || r.focus();
319
319
  break;
320
320
  }
321
321
  case "Home":
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "courthive-components",
3
3
  "packageManager": "pnpm@11.9.0",
4
- "version": "3.4.6",
4
+ "version": "3.5.0",
5
5
  "engines": {
6
6
  "node": ">=22"
7
7
  },
@@ -117,7 +117,7 @@
117
117
  "focus-trap": "^8.0.0",
118
118
  "timepicker-ui": "^4.1.2",
119
119
  "tippy.js": "6.3.7",
120
- "tods-competition-factory": "5.9.0",
120
+ "tods-competition-factory": "6.0.0",
121
121
  "vanillajs-datepicker": "1.3.4"
122
122
  }
123
123
  }