@mechane-ai/elements 0.54.0 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/catalog.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@mechane-ai/elements",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "recipes": [
5
5
  {
6
6
  "slug": "allocation-report",
@@ -4,7 +4,7 @@ import { a as d, d as f, f as p, l as ee, r as te, s as ne, t as re, u as ie } f
4
4
  import { a as ae, r as oe, s as se, t as ce } from "../tree-diagram-BHLewHQl.js";
5
5
  import { n as le, t as ue } from "../treemap-n3Er3k6e.js";
6
6
  import { a as de, r as fe, t as pe } from "../image-grid-D0Xk_KNk.js";
7
- import { c as me, i as he, o as m, r as ge, t as _e, u as ve } from "../token-heatmap-D3v9r6jf.js";
7
+ import { c as me, i as he, o as m, r as ge, t as _e, u as ve } from "../token-heatmap-CgJNUXJH.js";
8
8
  import { a as ye, l as be, r as xe, s as Se, t as Ce } from "../embedding-map-BSlNwXs2.js";
9
9
  import { a as we, c as Te, r as h, t as Ee } from "../token-predictions-BMVVfAL3.js";
10
10
  import { n as De, t as Oe } from "../waterfall-ChExGsn8.js";
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "../token-heatmap-D3v9r6jf.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "../token-heatmap-CgJNUXJH.js";
2
2
  import { t as p } from "../color-legend-CIo7DhXB.js";
3
3
  import { t as m } from "../heatmap-scale-Zte6Ya-g.js";
4
4
  export { f as AttentionMatrix, t as CalendarHeatmap, p as ColorLegend, s as ConfusionMatrix, i as CorrelationMatrix, l as Matrix, d as TokenHeatmap, n as attentionMatrixLimits, a as calendarHeatmapLimits, u as confusionMatrixLimits, e as correlationMatrixLimits, m as heatmapColor, c as matrixCellId, r as matrixLimits, o as tokenHeatmapLimits };
@@ -2,14 +2,15 @@ import { r as e } from "./control-styles-D3q_Qyxi.js";
2
2
  import { n as t, t as n } from "./forms-CEbwzlRR.js";
3
3
  import { D as r, T as i, k as a } from "./src-9EJskqB_.js";
4
4
  import { r as o } from "./src-na2DdkKI.js";
5
- import * as s from "@stylexjs/stylex";
6
- import { useEffect as c, useId as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
7
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
8
- import { CalendarDays as g, ChevronLeft as _, ChevronRight as v } from "lucide-react";
9
- import * as y from "@ui-sdk/react/calendar";
10
- import { DateInput as b, DateInputSegment as x } from "@ui-sdk/react/date-input";
5
+ import { t as s } from "./accessibility-P89UG9-r.js";
6
+ import * as c from "@stylexjs/stylex";
7
+ import { useEffect as l, useId as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
8
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
9
+ import { CalendarDays as _, ChevronLeft as v, ChevronRight as y } from "lucide-react";
10
+ import * as b from "@ui-sdk/react/calendar";
11
+ import { DateInput as x, DateInputSegment as S } from "@ui-sdk/react/date-input";
11
12
  // packages/forms/src/dates/civil.ts
12
- var S = {
13
+ var C = {
13
14
  maximumYear: 9999,
14
15
  monthsPerYear: 12,
15
16
  leapCycle: 4,
@@ -22,12 +23,12 @@ var S = {
22
23
  yearDigits: 4,
23
24
  componentDigits: 2
24
25
  };
25
- function C(e) {
26
- return Number.isInteger(e.year) && e.year >= 1 && e.year <= S.maximumYear ? Number.isInteger(e.month) && e.month >= 1 && e.month <= S.monthsPerYear : !1;
27
- }
28
26
  function w(e) {
29
- if (!C(e) || !Number.isInteger(e.day) || e.day < 1) return !1;
30
- let t = e.year % S.leapCycle === 0 && (e.year % S.century !== 0 || e.year % S.leapCentury === 0) ? S.leapFebruaryDays : S.februaryDays, { longMonthDays: n, shortMonthDays: r } = S, i = [
27
+ return Number.isInteger(e.year) && e.year >= 1 && e.year <= C.maximumYear ? Number.isInteger(e.month) && e.month >= 1 && e.month <= C.monthsPerYear : !1;
28
+ }
29
+ function T(e) {
30
+ if (!w(e) || !Number.isInteger(e.day) || e.day < 1) return !1;
31
+ let t = e.year % C.leapCycle === 0 && (e.year % C.century !== 0 || e.year % C.leapCentury === 0) ? C.leapFebruaryDays : C.februaryDays, { longMonthDays: n, shortMonthDays: r } = C, i = [
31
32
  n,
32
33
  t,
33
34
  n,
@@ -43,80 +44,80 @@ function w(e) {
43
44
  ];
44
45
  return e.day <= (i[e.month - 1] ?? 0);
45
46
  }
46
- function T(e) {
47
- return e.year * S.monthsPerYear + e.month;
48
- }
49
47
  function E(e) {
50
- if (!w(e)) throw RangeError("Cannot serialize an invalid calendar date.");
51
- return `${D(e)}-${String(e.day).padStart(S.componentDigits, "0")}`;
48
+ return e.year * C.monthsPerYear + e.month;
52
49
  }
53
50
  function D(e) {
54
- if (!C(e)) throw RangeError("Cannot serialize an invalid calendar month.");
55
- return `${String(e.year).padStart(S.yearDigits, "0")}-${String(e.month).padStart(S.componentDigits, "0")}`;
51
+ if (!T(e)) throw RangeError("Cannot serialize an invalid calendar date.");
52
+ return `${O(e)}-${String(e.day).padStart(C.componentDigits, "0")}`;
56
53
  }
57
54
  function O(e) {
55
+ if (!w(e)) throw RangeError("Cannot serialize an invalid calendar month.");
56
+ return `${String(e.year).padStart(C.yearDigits, "0")}-${String(e.month).padStart(C.componentDigits, "0")}`;
57
+ }
58
+ function k(e) {
58
59
  let [t = 0, n = 0, r = 0] = e.split("-").map(Number), i = {
59
60
  year: t,
60
61
  month: n,
61
62
  day: r
62
63
  };
63
- return w(i) && E(i) === e ? i : void 0;
64
+ return T(i) && D(i) === e ? i : void 0;
64
65
  }
65
- function k(e) {
66
+ function A(e) {
66
67
  let [t = 0, n = 0] = e.split("-").map(Number), r = {
67
68
  year: t,
68
69
  month: n
69
70
  };
70
- return C(r) && D(r) === e ? r : void 0;
71
+ return w(r) && O(r) === e ? r : void 0;
71
72
  }
72
- function A(e, t) {
73
- if (!w(e) || !Number.isInteger(t)) throw RangeError("Calendar-day arithmetic requires a valid date and integer offset.");
74
- let n = /* @__PURE__ */ new Date(`${E(e)}T00:00:00Z`);
73
+ function j(e, t) {
74
+ if (!T(e) || !Number.isInteger(t)) throw RangeError("Calendar-day arithmetic requires a valid date and integer offset.");
75
+ let n = /* @__PURE__ */ new Date(`${D(e)}T00:00:00Z`);
75
76
  n.setUTCDate(n.getUTCDate() + t);
76
77
  let r = {
77
78
  year: n.getUTCFullYear(),
78
79
  month: n.getUTCMonth() + 1,
79
80
  day: n.getUTCDate()
80
81
  };
81
- if (!w(r)) throw RangeError("Calendar-day arithmetic exceeds the supported years 1–9999.");
82
+ if (!T(r)) throw RangeError("Calendar-day arithmetic exceeds the supported years 1–9999.");
82
83
  return r;
83
84
  }
84
- function j(e, t) {
85
- if (!C(e) || !Number.isInteger(t)) throw RangeError("Calendar-month arithmetic requires a valid month and integer offset.");
86
- let n = (e.year - 1) * S.monthsPerYear + e.month - 1 + t, r = {
87
- year: Math.floor(n / S.monthsPerYear) + 1,
88
- month: n % S.monthsPerYear + 1
85
+ function M(e, t) {
86
+ if (!w(e) || !Number.isInteger(t)) throw RangeError("Calendar-month arithmetic requires a valid month and integer offset.");
87
+ let n = (e.year - 1) * C.monthsPerYear + e.month - 1 + t, r = {
88
+ year: Math.floor(n / C.monthsPerYear) + 1,
89
+ month: n % C.monthsPerYear + 1
89
90
  };
90
- if (!C(r)) throw RangeError("Calendar-month arithmetic exceeds the supported years 1–9999.");
91
+ if (!w(r)) throw RangeError("Calendar-month arithmetic exceeds the supported years 1–9999.");
91
92
  return r;
92
93
  }
93
- function M(e, t) {
94
- return w(e) ? new Intl.DateTimeFormat(t, {
94
+ function N(e, t) {
95
+ return T(e) ? new Intl.DateTimeFormat(t, {
95
96
  dateStyle: "medium",
96
97
  timeZone: "UTC",
97
98
  calendar: "gregory"
98
- }).format(Date.parse(`${E(e)}T12:00:00Z`)) : "Invalid date";
99
+ }).format(Date.parse(`${D(e)}T12:00:00Z`)) : "Invalid date";
99
100
  }
100
- function N(e, t) {
101
- return C(e) ? new Intl.DateTimeFormat(t, {
101
+ function P(e, t) {
102
+ return w(e) ? new Intl.DateTimeFormat(t, {
102
103
  month: "short",
103
104
  year: "numeric",
104
105
  timeZone: "UTC",
105
106
  calendar: "gregory"
106
- }).format(Date.parse(`${D(e)}-01T12:00:00Z`)) : "Invalid month";
107
- }
108
- function P(e, t, n) {
109
- if (!w(e)) return "Select a valid date.";
110
- if (t !== void 0 && E(e) < E(t)) return `Select a date on or after ${E(t)}.`;
111
- if (n !== void 0 && E(e) > E(n)) return `Select a date on or before ${E(n)}.`;
107
+ }).format(Date.parse(`${O(e)}-01T12:00:00Z`)) : "Invalid month";
112
108
  }
113
109
  function F(e, t, n) {
114
- if (!C(e)) return "Select a valid month.";
115
- if (t !== void 0 && T(e) < T(t)) return `Select a month on or after ${D(t)}.`;
116
- if (n !== void 0 && T(e) > T(n)) return `Select a month on or before ${D(n)}.`;
110
+ if (!T(e)) return "Select a valid date.";
111
+ if (t !== void 0 && D(e) < D(t)) return `Select a date on or after ${D(t)}.`;
112
+ if (n !== void 0 && D(e) > D(n)) return `Select a date on or before ${D(n)}.`;
113
+ }
114
+ function I(e, t, n) {
115
+ if (!w(e)) return "Select a valid month.";
116
+ if (t !== void 0 && E(e) < E(t)) return `Select a month on or after ${O(t)}.`;
117
+ if (n !== void 0 && E(e) > E(n)) return `Select a month on or before ${O(n)}.`;
117
118
  }
118
119
  // packages/forms/src/dates/calendar.tsx
119
- var I = {
120
+ var L = {
120
121
  dayButton: {
121
122
  kB7OPa: "x9f619",
122
123
  kzqmXN: "x9c6wpo x1ff4b4a",
@@ -172,16 +173,16 @@ var I = {
172
173
  $$css: !0
173
174
  }
174
175
  };
175
- function L(e) {
176
- return e !== void 0 && w(e) ? E(e) : void 0;
177
- }
178
176
  function R(e) {
179
- let t = d(null);
180
- u(() => {
177
+ return e !== void 0 && T(e) ? D(e) : void 0;
178
+ }
179
+ function z(e) {
180
+ let t = f(null);
181
+ d(() => {
181
182
  e.autoFocus === !0 && t.current?.querySelector("[tabindex=\"0\"]")?.focus();
182
183
  }, [e.autoFocus, e.timeZone]);
183
- let n = L(e.today) ?? "2000-01-01", r = w(e.initialMonth) ? D(e.initialMonth) : n.slice(0, 7), i = L(e.minimum), a = L(e.maximum), o = e.mode === "range" ? L(e.value?.from) : void 0, c = e.mode === "range" ? L(e.value?.to) : void 0, l = o !== void 0 && c !== void 0 ? [o, c] : null;
184
- return /* @__PURE__ */ m(y.Calendar, {
184
+ let n = R(e.today) ?? "2000-01-01", r = T(e.initialMonth) ? O(e.initialMonth) : n.slice(0, 7), i = R(e.minimum), a = R(e.maximum), o = e.mode === "range" ? R(e.value?.from) : void 0, s = e.mode === "range" ? R(e.value?.to) : void 0, l = o !== void 0 && s !== void 0 ? [o, s] : null;
185
+ return /* @__PURE__ */ h(b.Calendar, {
185
186
  className: "xbixft xpvm0e4 x1hz01jw xj57cvi xtqrqnz x1778rvt x1717udv xezivpi x193iq5w xw2csxc",
186
187
  "aria-label": e.label,
187
188
  mode: e.mode,
@@ -194,15 +195,15 @@ function R(e) {
194
195
  ...a !== void 0 && { max: a },
195
196
  showOutsideDays: !0,
196
197
  deselectable: !0,
197
- value: e.mode === "single" ? L(e.value) ?? null : l,
198
+ value: e.mode === "single" ? R(e.value) ?? null : l,
198
199
  onAnchorChange: (t, n) => {
199
200
  if (e.mode !== "range") return;
200
201
  if (t === null) {
201
202
  n.reason === "escape-key" && e.onValueChange(void 0);
202
203
  return;
203
204
  }
204
- let r = O(t);
205
- r !== void 0 && (e.value !== void 0 && o !== void 0 && c === void 0 ? (n.cancel(), e.onValueChange(t < o ? {
205
+ let r = k(t);
206
+ r !== void 0 && (e.value !== void 0 && o !== void 0 && s === void 0 ? (n.cancel(), e.onValueChange(t < o ? {
206
207
  from: r,
207
208
  to: e.value.from
208
209
  } : {
@@ -211,49 +212,49 @@ function R(e) {
211
212
  })) : e.onValueChange({ from: r }));
212
213
  },
213
214
  onValueChange: (t) => {
214
- if (e.mode === "single") e.onValueChange(typeof t == "string" ? O(t) : void 0);
215
+ if (e.mode === "single") e.onValueChange(typeof t == "string" ? k(t) : void 0);
215
216
  else if (Array.isArray(t)) {
216
- let n = O(t[0]), r = O(t[1]);
217
+ let n = k(t[0]), r = k(t[1]);
217
218
  n !== void 0 && r !== void 0 && e.onValueChange({
218
219
  from: n,
219
220
  to: r
220
221
  });
221
222
  }
222
223
  },
223
- children: /* @__PURE__ */ h("div", {
224
+ children: /* @__PURE__ */ g("div", {
224
225
  className: "x1n2onr6",
225
226
  children: [
226
- /* @__PURE__ */ m("div", {
227
+ /* @__PURE__ */ h("div", {
227
228
  className: "x78zum5 x6s0dn4 xl56j7k x1f9pz31 x992rv9 x1jfksii",
228
- children: /* @__PURE__ */ m(y.CalendarHeading, { className: "x1ghz6dp xtqrqnz xk4h15q" })
229
+ children: /* @__PURE__ */ h(b.CalendarHeading, { className: "x1ghz6dp xtqrqnz xk4h15q" })
229
230
  }),
230
- /* @__PURE__ */ h("div", {
231
+ /* @__PURE__ */ g("div", {
231
232
  className: "x10l6tqk x17y0mx6 x13vifvy x78zum5 x1qughib x47corl",
232
- children: [/* @__PURE__ */ m(y.CalendarPrevious, {
233
+ children: [/* @__PURE__ */ h(b.CalendarPrevious, {
233
234
  className: "x3nfvp2 x9f619 x6s0dn4 xl56j7k x9c6wpo x1ff4b4a x1f9pz31 x992rv9 x1717udv xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xbixft xpvm0e4 x67bb7w x1ypdohk x19tlqzf xtgyt42 xqqsu6m xzro3xz x13qnu6 x9v5kkp x19rmrnh x1bqaal",
234
- children: /* @__PURE__ */ m(_, {
235
+ children: /* @__PURE__ */ h(v, {
235
236
  "aria-hidden": "true",
236
237
  className: "xtwnzbg x18utl2x"
237
238
  })
238
- }), /* @__PURE__ */ m(y.CalendarNext, {
239
+ }), /* @__PURE__ */ h(b.CalendarNext, {
239
240
  className: "x3nfvp2 x9f619 x6s0dn4 xl56j7k x9c6wpo x1ff4b4a x1f9pz31 x992rv9 x1717udv xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xbixft xpvm0e4 x67bb7w x1ypdohk x19tlqzf xtgyt42 xqqsu6m xzro3xz x13qnu6 x9v5kkp x19rmrnh x1bqaal",
240
- children: /* @__PURE__ */ m(v, {
241
+ children: /* @__PURE__ */ h(y, {
241
242
  "aria-hidden": "true",
242
243
  className: "xtwnzbg x18utl2x"
243
244
  })
244
245
  })]
245
246
  }),
246
- /* @__PURE__ */ h(y.CalendarGrid, {
247
+ /* @__PURE__ */ g(b.CalendarGrid, {
247
248
  ref: t,
248
249
  className: "x1mwwwfo x1gukg7c",
249
- children: [/* @__PURE__ */ m(y.CalendarWeekdays, { children: (e) => /* @__PURE__ */ m(y.CalendarWeekday, {
250
+ children: [/* @__PURE__ */ h(b.CalendarWeekdays, { children: (e) => /* @__PURE__ */ h(b.CalendarWeekday, {
250
251
  index: e,
251
252
  className: "x153jb6y xj57cvi xy8obcc x1f9pz31 x2b8uid"
252
- }) }), /* @__PURE__ */ m(y.CalendarWeeks, { children: (e) => /* @__PURE__ */ m(y.CalendarDay, {
253
+ }) }), /* @__PURE__ */ h(b.CalendarWeeks, { children: (e) => /* @__PURE__ */ h(b.CalendarDay, {
253
254
  value: e.date,
254
255
  className: (e) => {
255
- let t = e.rangeStart || e.rangeEnd, n = e.date === o && c === void 0, r = e.selected || t || n, i = e.inRange && !t;
256
- return s.props(I.dayButton, e.outside && I.outside, e.today && I.today, r && I.selected, i && I.rangeMiddle, e.disabled && I.disabledDay).className ?? "";
256
+ let t = e.rangeStart || e.rangeEnd, n = e.date === o && s === void 0, r = e.selected || t || n, i = e.inRange && !t;
257
+ return c.props(L.dayButton, e.outside && L.outside, e.today && L.today, r && L.selected, i && L.rangeMiddle, e.disabled && L.disabledDay).className ?? "";
257
258
  }
258
259
  }) })]
259
260
  })
@@ -262,7 +263,7 @@ function R(e) {
262
263
  }, e.timeZone);
263
264
  }
264
265
  // packages/forms/src/dates/date-inputs.tsx
265
- var z = {
266
+ var B = {
266
267
  input: {
267
268
  kzqmXN: "xh8yej3",
268
269
  k7Eaqz: "xeuugli",
@@ -308,82 +309,82 @@ var z = {
308
309
  kMwMTN: "x153jb6y",
309
310
  $$css: !0
310
311
  }
311
- }, B = {
312
- year: [z.segment, z.year],
313
- month: [z.segment],
314
- day: [z.segment],
315
- hour: [z.segment],
316
- minute: [z.segment],
317
- second: [z.segment],
318
- dayPeriod: [z.segment],
319
- literal: [z.literal]
312
+ }, V = {
313
+ year: [B.segment, B.year],
314
+ month: [B.segment],
315
+ day: [B.segment],
316
+ hour: [B.segment],
317
+ minute: [B.segment],
318
+ second: [B.segment],
319
+ dayPeriod: [B.segment],
320
+ literal: [B.literal]
320
321
  };
321
- function V({ label: t, value: r, minimum: i, maximum: a, locale: o, onValueChange: c }) {
322
- return /* @__PURE__ */ h(n.Root, { children: [/* @__PURE__ */ m(n.Label, { children: t }), /* @__PURE__ */ m(b, {
323
- value: r === void 0 ? null : E(r),
324
- ...i !== void 0 && { min: E(i) },
325
- ...a !== void 0 && { max: E(a) },
322
+ function H({ label: t, value: r, minimum: i, maximum: a, locale: o, onValueChange: s }) {
323
+ return /* @__PURE__ */ g(n.Root, { children: [/* @__PURE__ */ h(n.Label, { children: t }), /* @__PURE__ */ h(x, {
324
+ value: r === void 0 ? null : D(r),
325
+ ...i !== void 0 && { min: D(i) },
326
+ ...a !== void 0 && { max: D(a) },
326
327
  locale: o,
327
- onValueChange: (e) => c(e === null ? void 0 : O(e)),
328
- ...s.props(e.base, e.field, e.singleLineField, z.segments),
329
- children: ({ segments: e }) => e.map((e) => /* @__PURE__ */ m(x, {
328
+ onValueChange: (e) => s(e === null ? void 0 : k(e)),
329
+ ...c.props(e.base, e.field, e.singleLineField, B.segments),
330
+ children: ({ segments: e }) => e.map((e) => /* @__PURE__ */ h(S, {
330
331
  segment: e,
331
- ...s.props(B[e.type])
332
+ ...c.props(V[e.type])
332
333
  }, e.key))
333
334
  })] });
334
335
  }
335
- function H({ label: e, value: r, minimum: i, maximum: a, onValueChange: o }) {
336
- return /* @__PURE__ */ h(n.Root, { children: [/* @__PURE__ */ m(n.Label, { children: e }), /* @__PURE__ */ m(t, {
336
+ function U({ label: e, value: r, minimum: i, maximum: a, onValueChange: o }) {
337
+ return /* @__PURE__ */ g(n.Root, { children: [/* @__PURE__ */ h(n.Label, { children: e }), /* @__PURE__ */ h(t, {
337
338
  type: "month",
338
- value: r === void 0 ? "" : D(r),
339
- min: i === void 0 ? "0001-01" : D(i),
340
- max: a === void 0 ? "9999-12" : D(a),
341
- onChange: (e) => o(k(e.target.value)),
342
- xstyle: z.input
339
+ value: r === void 0 ? "" : O(r),
340
+ min: i === void 0 ? "0001-01" : O(i),
341
+ max: a === void 0 ? "9999-12" : O(a),
342
+ onChange: (e) => o(A(e.target.value)),
343
+ xstyle: B.input
343
344
  })] });
344
345
  }
345
- function U({ children: e }) {
346
- return /* @__PURE__ */ m("div", {
346
+ function W({ children: e }) {
347
+ return /* @__PURE__ */ h("div", {
347
348
  className: "xrvj5dj xnby9oq x1hnptsi",
348
349
  children: e
349
350
  });
350
351
  }
351
352
  // packages/forms/src/dates/picker-popover.tsx
352
- function W({ label: e, value: t, onValueChange: n, formatValue: r, validateValue: s, presets: c = [], density: u = "standard", disabled: d, isClearable: p = !0, timeZone: _, children: v }) {
353
- let [y, b] = f(!1), [x, S] = f(t), C = l(), w = x === void 0 ? void 0 : s(x);
353
+ function G({ label: e, value: t, onValueChange: n, formatValue: r, validateValue: s, presets: c = [], density: l = "standard", disabled: d, isClearable: f = !0, timeZone: m, children: v }) {
354
+ let [y, b] = p(!1), [x, S] = p(t), C = u(), w = x === void 0 ? void 0 : s(x);
354
355
  function T(e) {
355
356
  n(e), b(!1);
356
357
  }
357
- return /* @__PURE__ */ h(o.Root, {
358
+ return /* @__PURE__ */ g(o.Root, {
358
359
  open: y,
359
360
  onOpenChange: (e) => {
360
361
  e && S(t), b(e);
361
362
  },
362
- children: [/* @__PURE__ */ h(o.Trigger, {
363
+ children: [/* @__PURE__ */ g(o.Trigger, {
363
364
  disabled: d ?? !1,
364
- render: /* @__PURE__ */ m(i, {
365
- density: u,
365
+ render: /* @__PURE__ */ h(i, {
366
+ density: l,
366
367
  variant: "outline"
367
368
  }),
368
369
  "aria-label": t === void 0 ? e : `${e}: ${r(t)}`,
369
- children: [/* @__PURE__ */ m(g, {
370
+ children: [/* @__PURE__ */ h(_, {
370
371
  size: 16,
371
372
  "aria-hidden": "true"
372
373
  }), t === void 0 ? e : r(t)]
373
- }), /* @__PURE__ */ m(o.Popup, {
374
+ }), /* @__PURE__ */ h(o.Popup, {
374
375
  align: "end",
375
376
  collisionPadding: 1,
376
377
  "aria-label": e,
377
378
  className: "x1vae6as x1rxfojk",
378
- children: /* @__PURE__ */ h("div", {
379
+ children: /* @__PURE__ */ g("div", {
379
380
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
380
381
  children: [
381
- /* @__PURE__ */ m(o.Title, { children: e }),
382
- c.length > 0 && /* @__PURE__ */ m("div", {
382
+ /* @__PURE__ */ h(o.Title, { children: e }),
383
+ c.length > 0 && /* @__PURE__ */ h("div", {
383
384
  role: "group",
384
385
  "aria-label": "Date presets",
385
386
  className: "x78zum5 x1a02dak xunmzkg xmmm7uk xso031l x1q0q8m5 x1qndepd",
386
- children: c.map((e) => /* @__PURE__ */ m(i, {
387
+ children: c.map((e) => /* @__PURE__ */ h(i, {
387
388
  variant: "ghost",
388
389
  disabled: s(e.value) !== void 0,
389
390
  onClick: () => T(e.value),
@@ -391,31 +392,31 @@ function W({ label: e, value: t, onValueChange: n, formatValue: r, validateValue
391
392
  }, e.id))
392
393
  }),
393
394
  y && v(x, S),
394
- /* @__PURE__ */ m("div", {
395
+ /* @__PURE__ */ h("div", {
395
396
  id: C,
396
397
  "aria-live": "polite",
397
398
  className: "xr5kp14 xy8obcc xas2l8k",
398
399
  children: w
399
400
  }),
400
- /* @__PURE__ */ h("div", {
401
+ /* @__PURE__ */ g("div", {
401
402
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x3bg4vu x178xt8z x13fuv20 xhjagg4",
402
- children: [/* @__PURE__ */ m("span", {
403
+ children: [/* @__PURE__ */ h("span", {
403
404
  className: "x153jb6y xy8obcc xas2l8k",
404
- children: _
405
- }), /* @__PURE__ */ h("div", {
405
+ children: m
406
+ }), /* @__PURE__ */ g("div", {
406
407
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi",
407
408
  children: [
408
- p && /* @__PURE__ */ m(a, {
409
+ f && /* @__PURE__ */ h(a, {
409
410
  disabled: t === void 0,
410
411
  onClick: () => T(void 0),
411
412
  children: "Clear"
412
413
  }),
413
- /* @__PURE__ */ m(i, {
414
+ /* @__PURE__ */ h(i, {
414
415
  variant: "ghost",
415
416
  onClick: () => b(!1),
416
417
  children: "Cancel"
417
418
  }),
418
- /* @__PURE__ */ m(i, {
419
+ /* @__PURE__ */ h(i, {
419
420
  variant: "solid",
420
421
  disabled: x === void 0 || w !== void 0,
421
422
  "aria-describedby": w === void 0 ? void 0 : C,
@@ -433,54 +434,54 @@ function W({ label: e, value: t, onValueChange: n, formatValue: r, validateValue
433
434
  });
434
435
  }
435
436
  // packages/forms/src/dates/date-picker.tsx
436
- function G({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
437
- return /* @__PURE__ */ m(W, {
437
+ function K({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
438
+ return /* @__PURE__ */ h(G, {
438
439
  label: e,
439
440
  value: t,
440
441
  onValueChange: n,
441
- formatValue: r ?? ((e) => M(e, s.locale)),
442
- validateValue: (e) => P(e, s.minimum, s.maximum),
442
+ formatValue: r ?? ((e) => N(e, s.locale)),
443
+ validateValue: (e) => F(e, s.minimum, s.maximum),
443
444
  density: i,
444
445
  disabled: a,
445
446
  isClearable: o,
446
447
  timeZone: s.timeZone,
447
- children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(V, {
448
+ children: (t, n) => /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(H, {
448
449
  label: "Date",
449
450
  value: t,
450
451
  locale: s.locale,
451
452
  minimum: s.minimum,
452
453
  maximum: s.maximum,
453
454
  onValueChange: n
454
- }), /* @__PURE__ */ m(R, {
455
+ }), /* @__PURE__ */ h(z, {
455
456
  ...s,
456
457
  label: e,
457
458
  mode: "single",
458
459
  autoFocus: !0,
459
460
  value: t,
460
- initialMonth: t !== void 0 && w(t) ? t : s.initialMonth,
461
+ initialMonth: t !== void 0 && T(t) ? t : s.initialMonth,
461
462
  onValueChange: n
462
463
  })] })
463
464
  });
464
465
  }
465
466
  // packages/forms/src/dates/date-range-picker.tsx
466
- function K({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
467
+ function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
467
468
  function u(e) {
468
469
  if (e.to === void 0) return "Select a start and end date.";
469
- let t = P(e.from, l.minimum, l.maximum) ?? P(e.to, l.minimum, l.maximum);
470
- return t === void 0 ? E(e.from) > E(e.to) ? "End date must be on or after start date." : a?.({
470
+ let t = F(e.from, l.minimum, l.maximum) ?? F(e.to, l.minimum, l.maximum);
471
+ return t === void 0 ? D(e.from) > D(e.to) ? "End date must be on or after start date." : a?.({
471
472
  from: e.from,
472
473
  to: e.to
473
474
  }) : t;
474
475
  }
475
476
  function d(e) {
476
- if (e.to === void 0) return M(e.from, l.locale);
477
+ if (e.to === void 0) return N(e.from, l.locale);
477
478
  let t = {
478
479
  from: e.from,
479
480
  to: e.to
480
481
  };
481
- return r?.(t) ?? `${M(t.from, l.locale)} – ${M(t.to, l.locale)}`;
482
+ return r?.(t) ?? `${N(t.from, l.locale)} – ${N(t.to, l.locale)}`;
482
483
  }
483
- return /* @__PURE__ */ m(W, {
484
+ return /* @__PURE__ */ h(G, {
484
485
  label: e,
485
486
  value: t,
486
487
  formatValue: d,
@@ -496,7 +497,7 @@ function K({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
496
497
  to: e.to
497
498
  });
498
499
  },
499
- children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(U, { children: [/* @__PURE__ */ m(V, {
500
+ children: (t, n) => /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(W, { children: [/* @__PURE__ */ h(H, {
500
501
  label: "Start date",
501
502
  value: t?.from,
502
503
  locale: l.locale,
@@ -506,7 +507,7 @@ function K({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
506
507
  from: e,
507
508
  to: t?.to
508
509
  })
509
- }), /* @__PURE__ */ m(V, {
510
+ }), /* @__PURE__ */ h(H, {
510
511
  label: "End date",
511
512
  value: t?.to,
512
513
  locale: l.locale,
@@ -521,32 +522,32 @@ function K({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
521
522
  to: e
522
523
  });
523
524
  }
524
- })] }), /* @__PURE__ */ m(R, {
525
+ })] }), /* @__PURE__ */ h(z, {
525
526
  ...l,
526
527
  label: e,
527
528
  mode: "range",
528
529
  autoFocus: !0,
529
530
  value: t,
530
- initialMonth: t !== void 0 && w(t.from) ? t.from : l.initialMonth,
531
+ initialMonth: t !== void 0 && T(t.from) ? t.from : l.initialMonth,
531
532
  onValueChange: n
532
533
  })] })
533
534
  });
534
535
  }
535
536
  // packages/forms/src/dates/month-calendar.tsx
536
- var q = { month: {
537
+ var J = { month: {
537
538
  kzqmXN: "xh8yej3",
538
539
  $$css: !0
539
540
  } };
540
- function J(e, t, n) {
541
- let r = C(e) ? e : {
541
+ function Y(e, t, n) {
542
+ let r = w(e) ? e : {
542
543
  year: 2e3,
543
544
  month: 1
544
545
  };
545
- return t !== void 0 && T(r) < T(t) ? t : n !== void 0 && T(r) > T(n) ? n : r;
546
+ return t !== void 0 && E(r) < E(t) ? t : n !== void 0 && E(r) > E(n) ? n : r;
546
547
  }
547
- function Y({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMonth: s, minimum: l, maximum: u }) {
548
- let p = J(s, l, u), [g, y] = f(p.year), [b, x] = f(p), S = d(/* @__PURE__ */ new Map()), C = d(!1);
549
- c(() => {
548
+ function X({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMonth: s, minimum: c, maximum: u }) {
549
+ let d = Y(s, c, u), [m, _] = p(d.year), [b, x] = p(d), S = f(/* @__PURE__ */ new Map()), C = f(!1);
550
+ l(() => {
550
551
  C.current && (C.current = !1, S.current.get(b.month)?.focus());
551
552
  }, [b]);
552
553
  function w(e, t) {
@@ -560,121 +561,121 @@ function Y({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMo
560
561
  }[e.key];
561
562
  if (e.key === "Home" && (n = 1 - t.month), e.key === "End" && (n = 12 - t.month), n === void 0) return;
562
563
  e.preventDefault();
563
- let r = Math.max(12, Math.min(119999, T(t) - 1 + n)), i = J({
564
+ let r = Math.max(12, Math.min(119999, E(t) - 1 + n)), i = Y({
564
565
  year: Math.floor(r / 12),
565
566
  month: r % 12 + 1
566
- }, l, u);
567
- C.current = !0, y(i.year), x(i);
567
+ }, c, u);
568
+ C.current = !0, _(i.year), x(i);
568
569
  }
569
- function E(e) {
570
- let t = J({
570
+ function T(e) {
571
+ let t = Y({
571
572
  year: e,
572
573
  month: b.month
573
- }, l, u);
574
- y(t.year), x(t);
574
+ }, c, u);
575
+ _(t.year), x(t);
575
576
  }
576
- return /* @__PURE__ */ h("div", {
577
+ return /* @__PURE__ */ g("div", {
577
578
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli",
578
- children: [/* @__PURE__ */ h("div", {
579
+ children: [/* @__PURE__ */ g("div", {
579
580
  className: "x78zum5 x6s0dn4 x1qughib x1hnptsi",
580
581
  children: [
581
- /* @__PURE__ */ m(r, {
582
+ /* @__PURE__ */ h(r, {
582
583
  "aria-label": "Previous year",
583
- disabled: g <= (l?.year ?? 1),
584
- onClick: () => E(g - 1),
585
- children: /* @__PURE__ */ m(_, { size: 16 })
584
+ disabled: m <= (c?.year ?? 1),
585
+ onClick: () => T(m - 1),
586
+ children: /* @__PURE__ */ h(v, { size: 16 })
586
587
  }),
587
- /* @__PURE__ */ m("span", {
588
+ /* @__PURE__ */ h("span", {
588
589
  "aria-live": "polite",
589
590
  className: "xk4h15q xss6m8b",
590
- children: g
591
+ children: m
591
592
  }),
592
- /* @__PURE__ */ m(r, {
593
+ /* @__PURE__ */ h(r, {
593
594
  "aria-label": "Next year",
594
- disabled: g >= (u?.year ?? 9999),
595
- onClick: () => E(g + 1),
596
- children: /* @__PURE__ */ m(v, { size: 16 })
595
+ disabled: m >= (u?.year ?? 9999),
596
+ onClick: () => T(m + 1),
597
+ children: /* @__PURE__ */ h(y, { size: 16 })
597
598
  })
598
599
  ]
599
- }), /* @__PURE__ */ m("div", {
600
+ }), /* @__PURE__ */ h("div", {
600
601
  role: "group",
601
602
  "aria-label": e,
602
603
  className: "xrvj5dj x185a7wo xunmzkg",
603
604
  children: Array.from({ length: 12 }, (e, r) => {
604
605
  let s = {
605
- year: g,
606
+ year: m,
606
607
  month: r + 1
607
- }, c = T(s), d = t === void 0 ? void 0 : T(t.from), f = t?.to === void 0 ? void 0 : T(t.to), p = c === d || c === f, h = d !== void 0 && f !== void 0 && c > d && c < f, _ = l !== void 0 && c < T(l), v = u !== void 0 && c > T(u), y = _ || v;
608
- return /* @__PURE__ */ m(i, {
609
- variant: p || h ? "solid" : "ghost",
610
- "aria-label": N(s, a),
611
- "aria-pressed": p || h,
612
- "aria-current": g === o.year && s.month === o.month ? "date" : void 0,
608
+ }, l = E(s), d = t === void 0 ? void 0 : E(t.from), f = t?.to === void 0 ? void 0 : E(t.to), p = l === d || l === f, g = d !== void 0 && f !== void 0 && l > d && l < f, _ = c !== void 0 && l < E(c), v = u !== void 0 && l > E(u), y = _ || v;
609
+ return /* @__PURE__ */ h(i, {
610
+ variant: p || g ? "solid" : "ghost",
611
+ "aria-label": P(s, a),
612
+ "aria-pressed": p || g,
613
+ "aria-current": m === o.year && s.month === o.month ? "date" : void 0,
613
614
  disabled: y,
614
- tabIndex: b.year === g && b.month === s.month ? 0 : -1,
615
+ tabIndex: b.year === m && b.month === s.month ? 0 : -1,
615
616
  ref: (e) => {
616
617
  e === null ? S.current.delete(s.month) : S.current.set(s.month, e);
617
618
  },
618
619
  onFocus: () => x(s),
619
620
  onKeyDown: (e) => w(e, s),
620
621
  onClick: () => n(s),
621
- xstyle: q.month,
622
+ xstyle: J.month,
622
623
  children: new Intl.DateTimeFormat(a, {
623
624
  month: "short",
624
625
  timeZone: "UTC",
625
626
  calendar: "gregory"
626
- }).format(/* @__PURE__ */ new Date(`${String(g).padStart(4, "0")}-${String(s.month).padStart(2, "0")}-01T12:00:00Z`))
627
+ }).format(/* @__PURE__ */ new Date(`${String(m).padStart(4, "0")}-${String(s.month).padStart(2, "0")}-01T12:00:00Z`))
627
628
  }, s.month);
628
629
  })
629
630
  })]
630
631
  });
631
632
  }
632
633
  // packages/forms/src/dates/month-picker.tsx
633
- function X({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
634
- return /* @__PURE__ */ m(W, {
634
+ function Z({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
635
+ return /* @__PURE__ */ h(G, {
635
636
  label: e,
636
637
  value: t,
637
638
  onValueChange: n,
638
- formatValue: r ?? ((e) => N(e, s.locale)),
639
- validateValue: (e) => F(e, s.minimum, s.maximum),
639
+ formatValue: r ?? ((e) => P(e, s.locale)),
640
+ validateValue: (e) => I(e, s.minimum, s.maximum),
640
641
  density: i,
641
642
  disabled: a,
642
643
  isClearable: o,
643
644
  timeZone: s.timeZone,
644
- children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(H, {
645
+ children: (t, n) => /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(U, {
645
646
  label: "Month",
646
647
  value: t,
647
648
  minimum: s.minimum,
648
649
  maximum: s.maximum,
649
650
  onValueChange: n
650
- }), /* @__PURE__ */ m(Y, {
651
+ }), /* @__PURE__ */ h(X, {
651
652
  ...s,
652
653
  label: e,
653
654
  selection: t === void 0 ? void 0 : { from: t },
654
- initialMonth: t !== void 0 && C(t) ? t : s.initialMonth,
655
+ initialMonth: t !== void 0 && w(t) ? t : s.initialMonth,
655
656
  onSelect: n
656
657
  })] })
657
658
  });
658
659
  }
659
660
  // packages/forms/src/dates/month-range-picker.tsx
660
- function Z({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
661
+ function Q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
661
662
  function u(e) {
662
663
  if (e.to === void 0) return "Select a start and end month.";
663
- let t = F(e.from, l.minimum, l.maximum) ?? F(e.to, l.minimum, l.maximum);
664
- return t === void 0 ? T(e.from) > T(e.to) ? "End month must be on or after start month." : a?.({
664
+ let t = I(e.from, l.minimum, l.maximum) ?? I(e.to, l.minimum, l.maximum);
665
+ return t === void 0 ? E(e.from) > E(e.to) ? "End month must be on or after start month." : a?.({
665
666
  from: e.from,
666
667
  to: e.to
667
668
  }) : t;
668
669
  }
669
670
  function d(e) {
670
- if (e.to === void 0) return N(e.from, l.locale);
671
+ if (e.to === void 0) return P(e.from, l.locale);
671
672
  let t = {
672
673
  from: e.from,
673
674
  to: e.to
674
675
  };
675
- return r?.(t) ?? `${N(t.from, l.locale)} – ${N(t.to, l.locale)}`;
676
+ return r?.(t) ?? `${P(t.from, l.locale)} – ${P(t.to, l.locale)}`;
676
677
  }
677
- return /* @__PURE__ */ m(W, {
678
+ return /* @__PURE__ */ h(G, {
678
679
  label: e,
679
680
  value: t,
680
681
  formatValue: d,
@@ -690,7 +691,7 @@ function Z({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
690
691
  to: e.to
691
692
  });
692
693
  },
693
- children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(U, { children: [/* @__PURE__ */ m(H, {
694
+ children: (t, n) => /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(W, { children: [/* @__PURE__ */ h(U, {
694
695
  label: "Start month",
695
696
  value: t?.from,
696
697
  minimum: l.minimum,
@@ -699,7 +700,7 @@ function Z({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
699
700
  from: e,
700
701
  to: t?.to
701
702
  })
702
- }), /* @__PURE__ */ m(H, {
703
+ }), /* @__PURE__ */ h(U, {
703
704
  label: "End month",
704
705
  value: t?.to,
705
706
  minimum: l.minimum,
@@ -713,13 +714,13 @@ function Z({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
713
714
  to: e
714
715
  });
715
716
  }
716
- })] }), /* @__PURE__ */ m(Y, {
717
+ })] }), /* @__PURE__ */ h(X, {
717
718
  ...l,
718
719
  label: e,
719
720
  selection: t,
720
- initialMonth: t !== void 0 && C(t.from) ? t.from : l.initialMonth,
721
+ initialMonth: t !== void 0 && w(t.from) ? t.from : l.initialMonth,
721
722
  onSelect: (e) => {
722
- t === void 0 || t.to !== void 0 ? n({ from: e }) : T(e) < T(t.from) ? n({
723
+ t === void 0 || t.to !== void 0 ? n({ from: e }) : E(e) < E(t.from) ? n({
723
724
  from: e,
724
725
  to: t.from
725
726
  }) : n({
@@ -731,44 +732,45 @@ function Z({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
731
732
  });
732
733
  }
733
734
  // packages/forms/src/dates/event-month.tsx
734
- var Q = 2;
735
- function $({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStartsOn: a = 1, itemsByDate: o, onSelect: s }) {
736
- let c = E(i), l = E(r);
737
- function u(e) {
738
- let t = O(e);
739
- t !== void 0 && s(t);
735
+ var $ = 2;
736
+ function ee({ label: e, loading: t, locale: n, timeZone: r, today: i, selected: a, weekStartsOn: o = 1, itemsByDate: l, onSelect: u }) {
737
+ let d = D(a), f = D(i);
738
+ function p(e) {
739
+ let t = k(e);
740
+ t !== void 0 && u(t);
740
741
  }
741
- return /* @__PURE__ */ m(y.Calendar, {
742
+ return /* @__PURE__ */ g(b.Calendar, {
742
743
  "aria-label": e,
743
744
  mode: "single",
744
- locale: t,
745
- timeZone: n,
746
- today: l,
747
- month: D(i),
748
- value: c,
749
- weekStartsOn: a,
745
+ locale: n,
746
+ timeZone: r,
747
+ today: f,
748
+ month: O(a),
749
+ value: d,
750
+ weekStartsOn: o,
750
751
  weekdayFormat: "short",
751
752
  showOutsideDays: !0,
752
753
  onValueChange: (e) => {
753
- typeof e == "string" && u(e);
754
+ typeof e == "string" && p(e);
754
755
  },
755
756
  onFocusedChange: (e, t) => {
756
- t.reason === "list-navigation" && u(e);
757
+ t.reason === "list-navigation" && p(e);
757
758
  },
758
- children: /* @__PURE__ */ h(y.CalendarGrid, {
759
+ children: [/* @__PURE__ */ g(b.CalendarGrid, {
760
+ "aria-busy": t !== void 0,
759
761
  className: "xh8yej3 x140o2bo x1mwwwfo x1y0btm7 xmkeg23 x1ey3b81 xpvm0e4 xbixft x1hz01jw",
760
- children: [/* @__PURE__ */ m(y.CalendarWeekdays, { children: (e) => /* @__PURE__ */ m(y.CalendarWeekday, {
762
+ children: [/* @__PURE__ */ h(b.CalendarWeekdays, { children: (e) => /* @__PURE__ */ h(b.CalendarWeekday, {
761
763
  index: e,
762
764
  className: "xn9t2bk x14w6jbu x153jb6y x2b8uid xy8obcc xk4h15q"
763
- }) }), /* @__PURE__ */ m(y.CalendarWeeks, { children: (e) => {
764
- let n = O(e.date);
765
- if (n === void 0) return null;
766
- let r = o.get(e.date) ?? [], a = r.length - Q, s = r.slice(0, Q), u = [
767
- M(n, t),
768
- ...s.map((e) => e.label),
769
- a > 0 && `+${a} more`
765
+ }) }), /* @__PURE__ */ h(b.CalendarWeeks, { children: (e) => {
766
+ let r = k(e.date);
767
+ if (r === void 0) return null;
768
+ let i = l.get(e.date) ?? [], o = i.length === 0 && r.month === a.month, s = i.length - $, c = i.slice(0, $), u = [
769
+ N(r, n),
770
+ ...c.map((e) => e.label),
771
+ s > 0 && `+${s} more`
770
772
  ].filter(Boolean).join(", ");
771
- return /* @__PURE__ */ m(y.CalendarDay, {
773
+ return /* @__PURE__ */ h(b.CalendarDay, {
772
774
  value: e.date,
773
775
  "aria-label": u,
774
776
  ...{
@@ -776,27 +778,31 @@ function $({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStarts
776
778
  2: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x153jb6y x1r7kqkb" },
777
779
  1: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x1r8u7ye" },
778
780
  3: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x153jb6y x1r8u7ye" }
779
- }[(n.month !== i.month) << 1 | e.date === c],
780
- children: /* @__PURE__ */ h("div", {
781
+ }[(r.month !== a.month) << 1 | e.date === d],
782
+ children: /* @__PURE__ */ g("div", {
781
783
  className: "xrvj5dj x10ukxgv xunmzkg xefclja x13wpdut x1s01oa9",
782
784
  "aria-hidden": "true",
783
785
  children: [
784
- /* @__PURE__ */ m("span", {
786
+ /* @__PURE__ */ h("span", {
785
787
  ...{
786
788
  0: { className: "x1lqcxt8 x14w6jbu xy8obcc x1ok0vyi" },
787
789
  1: { className: "x1lqcxt8 x14w6jbu xy8obcc x1ok0vyi x7ixh4y x1r8u7ye xtjd4bd" }
788
- }[e.date === l | 0],
789
- children: n.day
790
+ }[e.date === f | 0],
791
+ children: r.day
792
+ }),
793
+ t !== void 0 && o && /* @__PURE__ */ h("span", {
794
+ className: "xqcmdr3 x1qme5af x13ux6vm x1irg2zc xskzprw",
795
+ children: t.placeholder
790
796
  }),
791
- s.map((e) => /* @__PURE__ */ m("span", {
797
+ c.map((e) => /* @__PURE__ */ h("span", {
792
798
  className: "x1lliihq xb3r6kr xlyipyv xuxw1ft x14w6jbu xy8obcc x1r7kqkb x1ok0vyi",
793
799
  children: e.label
794
800
  }, e.id)),
795
- a > 0 && /* @__PURE__ */ h("span", {
801
+ s > 0 && /* @__PURE__ */ g("span", {
796
802
  className: "xy8obcc x153jb6y xuxw1ft xb3r6kr",
797
803
  children: [
798
804
  "+",
799
- a,
805
+ s,
800
806
  " more"
801
807
  ]
802
808
  })
@@ -804,7 +810,11 @@ function $({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStarts
804
810
  })
805
811
  });
806
812
  } })]
807
- })
813
+ }), t !== void 0 && /* @__PURE__ */ h("span", {
814
+ role: "status",
815
+ ...c.props(s.hidden),
816
+ children: t.label
817
+ })]
808
818
  });
809
819
  }
810
- export { G as a, j as c, E as d, D as f, K as i, O as l, Z as n, R as o, X as r, A as s, $ as t, k as u };
820
+ export { K as a, M as c, D as d, O as f, q as i, k as l, Q as n, z as o, Z as r, j as s, ee as t, A as u };
@@ -1 +1 @@
1
- export { o as Calendar, a as DatePicker, i as DateRangePicker, t as EventMonth, r as MonthPicker, n as MonthRangePicker, s as addCalendarDays, c as addCalendarMonths, l as parseCalendarDate, u as parseCalendarMonth, d as serializeCalendarDate, f as serializeCalendarMonth } from "../dates-CjlTzw00.js";
1
+ export { o as Calendar, a as DatePicker, i as DateRangePicker, t as EventMonth, r as MonthPicker, n as MonthRangePicker, s as addCalendarDays, c as addCalendarMonths, l as parseCalendarDate, u as parseCalendarMonth, d as serializeCalendarDate, f as serializeCalendarMonth } from "../dates-Cq90-D2X.js";
@@ -1,4 +1,4 @@
1
- import { u as e } from "../token-heatmap-D3v9r6jf.js";
1
+ import { u as e } from "../token-heatmap-CgJNUXJH.js";
2
2
  import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-BMVVfAL3.js";
3
3
  import { T as s, m as c, t as l } from "../src-9EJskqB_.js";
4
4
  import { m as u } from "../src-Bg4eyJZO.js";
@@ -7,6 +7,10 @@ export type EventMonthItem = {
7
7
  export type EventMonthProps = {
8
8
  readonly label: string;
9
9
  readonly locale: string;
10
+ readonly loading?: {
11
+ readonly label: string;
12
+ readonly placeholder: ReactNode;
13
+ } | undefined;
10
14
  readonly timeZone: string;
11
15
  readonly today: CalendarDate;
12
16
  readonly selected: CalendarDate;
@@ -14,4 +18,4 @@ export type EventMonthProps = {
14
18
  readonly itemsByDate: ReadonlyMap<string, ReadonlyArray<EventMonthItem>>;
15
19
  readonly onSelect: (date: CalendarDate) => void;
16
20
  };
17
- export declare function EventMonth({ label, locale, timeZone, today, selected, weekStartsOn, itemsByDate, onSelect, }: EventMonthProps): ReactNode;
21
+ export declare function EventMonth({ label, loading: pendingItems, locale, timeZone, today, selected, weekStartsOn, itemsByDate, onSelect, }: EventMonthProps): ReactNode;
package/dist/styles2.css CHANGED
@@ -902,6 +902,10 @@
902
902
  align-self: stretch;
903
903
  }
904
904
 
905
+ .x13ux6vm {
906
+ animation-delay: .12s;
907
+ }
908
+
905
909
  .xegkacw {
906
910
  animation-duration: .9s;
907
911
  }
@@ -918,6 +922,10 @@
918
922
  animation-duration: 80ms;
919
923
  }
920
924
 
925
+ .xskzprw {
926
+ animation-fill-mode: backwards;
927
+ }
928
+
921
929
  .xuij49y {
922
930
  animation-iteration-count: 2;
923
931
  }
@@ -1,5 +1,5 @@
1
1
  import { r as e } from "./tokens.stylex-dF5CACEJ.js";
2
- import { d as t, l as n, s as r } from "./dates-CjlTzw00.js";
2
+ import { d as t, l as n, s as r } from "./dates-Cq90-D2X.js";
3
3
  import { A as i, D as a, E as o, M as s, O as c, S as l, a as u, j as d, k as f } from "./plot-layout-PBlcYu9p.js";
4
4
  import { i as p } from "./chart-link-AE_xuxiP.js";
5
5
  import { n as m, r as h } from "./figure-format-B8kRZMlo.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -27,7 +27,8 @@ Put the pointer away and complete the page's main task.
27
27
 
28
28
  Hold a slow read, fail one, and return an empty result.
29
29
 
30
- - Pending reserves the result's geometry with a matching placeholder. Nothing jumps when the content arrives.
30
+ - A slow first read shows a shape-matched skeleton. Check that its loading announcement is available to a screen reader
31
+ and visually hidden. Dates, filters and other usable controls keep their positions when data arrives.
31
32
  - A refresh keeps the last result, its focus and any draft on screen, with progress or the failure beside it.
32
33
  - A failed first read shows a `Notice` with Retry in place. A successful empty result shows an `EmptyState`.
33
34
  - Each failure has one presentation. Not a banner and a toast for the same error.
@@ -10,6 +10,12 @@ values a reader compares together. Keep available filters usable and preserve us
10
10
  selection. Use the component's delay and reduced-motion behavior. On a cold document, wait for session resolution before
11
11
  showing account navigation or sign-in.
12
12
 
13
+ For a first read, use a visual skeleton in the space the result will occupy. Keep “Loading events” or an equivalent
14
+ short label in the accessible status. For a month view, pass a `loading` label and `SkeletonText` placeholder to
15
+ `EventMonth` while the visible range is unknown. Dates and keyboard navigation stay usable while event rows show
16
+ skeletons. Omit `loading` when that range has resolved, including an empty result. Keep existing events visible during a
17
+ background refresh.
18
+
13
19
  For a custom plot, start with `ChartFrame` and chart tones from `/charts`. Outline filled marks with
14
20
  `chartToneOutlines`, draw the zero baseline and axes in ink, and set tick text in the mono face, as the shared charts
15
21
  do. Keep data meaning in the caller. For a calendar heatmap, give each date a square cell, align week columns and day