@mechane-ai/elements 0.44.0 → 0.46.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.
Files changed (117) hide show
  1. package/README.md +48 -18
  2. package/bin/mechane-elements-catalog.mjs +42 -4
  3. package/dist/ai.js +268 -202
  4. package/dist/catalog.json +95 -31
  5. package/dist/categorical-values-BXi-rJuv.js +74 -0
  6. package/dist/chart-cursor-1mFd48Jc.js +23 -0
  7. package/dist/chart-data-CIJVWCYt.js +21 -0
  8. package/dist/chart-frame-BaxKn_MB.js +236 -0
  9. package/dist/{chart-input-B6_HXFDP.js → chart-input-Bm82_9Rd.js} +2 -2
  10. package/dist/chart-theme-4zprJ3rW.js +404 -0
  11. package/dist/charts/cartesian.js +1624 -1442
  12. package/dist/charts/distribution.js +486 -409
  13. package/dist/charts/graph.js +383 -358
  14. package/dist/charts/hierarchy.js +103 -94
  15. package/dist/charts/matrix.js +340 -333
  16. package/dist/charts/timeline.js +167 -134
  17. package/dist/charts.js +3 -3
  18. package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
  19. package/dist/collections.js +1648 -1188
  20. package/dist/{constants.stylex-CaVa9yGN.js → constants.stylex-CqhVl0uU.js} +9 -9
  21. package/dist/content/code.js +1 -1
  22. package/dist/content/diff.js +67 -66
  23. package/dist/content/link.js +1 -1
  24. package/dist/content/markdown.js +2 -2
  25. package/dist/content/tree.js +3 -3
  26. package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
  27. package/dist/content.js +1 -1
  28. package/dist/csp.js +6 -11
  29. package/dist/feedback.js +1 -1
  30. package/dist/forms/dates.js +274 -214
  31. package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
  32. package/dist/forms.js +3 -3
  33. package/dist/index.js +1 -1
  34. package/dist/layout.js +207 -207
  35. package/dist/navigation.js +4 -3
  36. package/dist/packages/ai/src/conversation.d.ts +2 -0
  37. package/dist/packages/ai/src/prompt-input.d.ts +7 -2
  38. package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
  39. package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
  40. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
  41. package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
  42. package/dist/packages/charts/src/categorical-values.d.ts +14 -9
  43. package/dist/packages/charts/src/chart-frame.d.ts +7 -9
  44. package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
  45. package/dist/packages/charts/src/chart-range.d.ts +33 -0
  46. package/dist/packages/charts/src/chart-rows.d.ts +20 -0
  47. package/dist/packages/charts/src/chart-theme.d.ts +25 -1
  48. package/dist/packages/charts/src/chart.d.ts +81 -0
  49. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +6 -4
  50. package/dist/packages/charts/src/index.d.ts +2 -1
  51. package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
  52. package/dist/packages/charts/src/plot-width.d.ts +0 -1
  53. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  54. package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
  55. package/dist/packages/collections/src/collection-controls.d.ts +5 -1
  56. package/dist/packages/collections/src/collection-filters.d.ts +4 -1
  57. package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
  58. package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
  59. package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
  60. package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
  61. package/dist/packages/collections/src/data-table-text.d.ts +13 -0
  62. package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
  63. package/dist/packages/collections/src/data-table.d.ts +3 -85
  64. package/dist/packages/collections/src/index.d.ts +11 -6
  65. package/dist/packages/collections/src/query-controls.d.ts +6 -2
  66. package/dist/packages/collections/src/table-results.d.ts +47 -13
  67. package/dist/packages/collections/src/timeline.d.ts +1 -0
  68. package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
  69. package/dist/packages/collections/src/use-table-window.d.ts +25 -0
  70. package/dist/packages/content/src/viewer.d.ts +8 -0
  71. package/dist/packages/core/src/disclosure.d.ts +9 -1
  72. package/dist/packages/core/src/index.d.ts +1 -0
  73. package/dist/packages/core/src/route-link.d.ts +11 -0
  74. package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
  75. package/dist/packages/forms/src/file-picker.d.ts +15 -0
  76. package/dist/packages/forms/src/form-controls.d.ts +1 -6
  77. package/dist/packages/forms/src/forms.d.ts +4 -1
  78. package/dist/packages/forms/src/index.d.ts +4 -2
  79. package/dist/packages/forms/src/selection.d.ts +14 -0
  80. package/dist/packages/foundations/src/chart-tones.d.ts +5 -0
  81. package/dist/packages/foundations/src/csp/index.d.ts +1 -1
  82. package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
  83. package/dist/packages/navigation/src/index.d.ts +1 -1
  84. package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
  85. package/dist/plot-width-v2c_rA20.js +63 -0
  86. package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
  87. package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
  88. package/dist/src-CGc_hjxJ.js +409 -0
  89. package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
  90. package/dist/{src-CDp1JtwC.js → src-DVHlknB6.js} +135 -120
  91. package/dist/styles2.css +167 -132
  92. package/dist/tokens.js +1 -1
  93. package/package.json +1 -4
  94. package/packages/foundations/src/constants.stylex.ts +9 -9
  95. package/packages/foundations/src/tokens.stylex.ts +9 -9
  96. package/skills/extend-elements/SKILL.md +74 -0
  97. package/skills/review-elements/SKILL.md +76 -0
  98. package/skills/upgrade-elements/SKILL.md +34 -0
  99. package/skills/upgrade-elements/references/releases.md +58 -0
  100. package/skills/use-elements/SKILL.md +64 -13
  101. package/skills/use-elements/references/agent.md +57 -0
  102. package/skills/use-elements/references/charts.md +63 -0
  103. package/skills/use-elements/references/collections.md +89 -0
  104. package/skills/use-elements/references/conversations.md +47 -0
  105. package/skills/use-elements/references/forms.md +81 -0
  106. package/skills/use-elements/references/reports.md +6 -4
  107. package/skills/use-elements/references/styling.md +70 -0
  108. package/skills/use-elements/references/workspace.md +3 -3
  109. package/dist/categorical-values-ByvFLaNE.js +0 -59
  110. package/dist/chart-frame-Bcd9Tpt5.js +0 -251
  111. package/dist/chart-navigation-BAbb5PV9.js +0 -154
  112. package/dist/header-styles-COxCYFZx.js +0 -90
  113. package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
  114. package/dist/packages/charts/src/chart-surface.d.ts +0 -27
  115. package/dist/packages/navigation/src/route-link.d.ts +0 -2
  116. package/dist/plot-width-8cXdAjoD.js +0 -96
  117. package/dist/src-Bk7M67zy.js +0 -396
@@ -1,13 +1,15 @@
1
- import { n as e, t } from "../forms-DeU0Tiv3.js";
2
- import { E as n, O as r, w as i } from "../src-DcW_gMX8.js";
3
- import { r as a } from "../src-na2DdkKI.js";
4
- import * as o from "@stylexjs/stylex";
5
- import { useEffect as s, useId as c, useLayoutEffect as l, useRef as u, useState as d } from "react";
6
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
7
- import { CalendarDays as h, ChevronLeft as g, ChevronRight as _ } from "lucide-react";
8
- import * as v from "@ui-sdk/react/calendar";
1
+ import { r as e } from "../control-styles-D3q_Qyxi.js";
2
+ import { n as t, t as n } from "../forms-CEbwzlRR.js";
3
+ import { D as r, T as i, k as a } from "../src-CpdJlDhO.js";
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";
9
11
  // packages/forms/src/dates/civil.ts
10
- var y = {
12
+ var S = {
11
13
  maximumYear: 9999,
12
14
  monthsPerYear: 12,
13
15
  leapCycle: 4,
@@ -20,12 +22,12 @@ var y = {
20
22
  yearDigits: 4,
21
23
  componentDigits: 2
22
24
  };
23
- function b(e) {
24
- return Number.isInteger(e.year) && e.year >= 1 && e.year <= y.maximumYear ? Number.isInteger(e.month) && e.month >= 1 && e.month <= y.monthsPerYear : !1;
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;
25
27
  }
26
- function x(e) {
27
- if (!b(e) || !Number.isInteger(e.day) || e.day < 1) return !1;
28
- let t = e.year % y.leapCycle === 0 && (e.year % y.century !== 0 || e.year % y.leapCentury === 0) ? y.leapFebruaryDays : y.februaryDays, { longMonthDays: n, shortMonthDays: r } = y, i = [
28
+ 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 = [
29
31
  n,
30
32
  t,
31
33
  n,
@@ -41,80 +43,80 @@ function x(e) {
41
43
  ];
42
44
  return e.day <= (i[e.month - 1] ?? 0);
43
45
  }
44
- function S(e) {
45
- return e.year * y.monthsPerYear + e.month;
46
+ function T(e) {
47
+ return e.year * S.monthsPerYear + e.month;
46
48
  }
47
- function C(e) {
48
- if (!x(e)) throw RangeError("Cannot serialize an invalid calendar date.");
49
- return `${w(e)}-${String(e.day).padStart(y.componentDigits, "0")}`;
49
+ 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")}`;
50
52
  }
51
- function w(e) {
52
- if (!b(e)) throw RangeError("Cannot serialize an invalid calendar month.");
53
- return `${String(e.year).padStart(y.yearDigits, "0")}-${String(e.month).padStart(y.componentDigits, "0")}`;
53
+ 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")}`;
54
56
  }
55
- function T(e) {
57
+ function O(e) {
56
58
  let [t = 0, n = 0, r = 0] = e.split("-").map(Number), i = {
57
59
  year: t,
58
60
  month: n,
59
61
  day: r
60
62
  };
61
- return x(i) && C(i) === e ? i : void 0;
63
+ return w(i) && E(i) === e ? i : void 0;
62
64
  }
63
- function E(e) {
65
+ function k(e) {
64
66
  let [t = 0, n = 0] = e.split("-").map(Number), r = {
65
67
  year: t,
66
68
  month: n
67
69
  };
68
- return b(r) && w(r) === e ? r : void 0;
70
+ return C(r) && D(r) === e ? r : void 0;
69
71
  }
70
- function D(e, t) {
71
- if (!x(e) || !Number.isInteger(t)) throw RangeError("Calendar-day arithmetic requires a valid date and integer offset.");
72
- let n = /* @__PURE__ */ new Date(`${C(e)}T00:00:00Z`);
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
75
  n.setUTCDate(n.getUTCDate() + t);
74
76
  let r = {
75
77
  year: n.getUTCFullYear(),
76
78
  month: n.getUTCMonth() + 1,
77
79
  day: n.getUTCDate()
78
80
  };
79
- if (!x(r)) throw RangeError("Calendar-day arithmetic exceeds the supported years 1–9999.");
81
+ if (!w(r)) throw RangeError("Calendar-day arithmetic exceeds the supported years 1–9999.");
80
82
  return r;
81
83
  }
82
- function O(e, t) {
83
- if (!b(e) || !Number.isInteger(t)) throw RangeError("Calendar-month arithmetic requires a valid month and integer offset.");
84
- let n = (e.year - 1) * y.monthsPerYear + e.month - 1 + t, r = {
85
- year: Math.floor(n / y.monthsPerYear) + 1,
86
- month: n % y.monthsPerYear + 1
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
87
89
  };
88
- if (!b(r)) throw RangeError("Calendar-month arithmetic exceeds the supported years 1–9999.");
90
+ if (!C(r)) throw RangeError("Calendar-month arithmetic exceeds the supported years 1–9999.");
89
91
  return r;
90
92
  }
91
- function k(e, t) {
92
- return x(e) ? new Intl.DateTimeFormat(t, {
93
+ function M(e, t) {
94
+ return w(e) ? new Intl.DateTimeFormat(t, {
93
95
  dateStyle: "medium",
94
96
  timeZone: "UTC",
95
97
  calendar: "gregory"
96
- }).format(Date.parse(`${C(e)}T12:00:00Z`)) : "Invalid date";
98
+ }).format(Date.parse(`${E(e)}T12:00:00Z`)) : "Invalid date";
97
99
  }
98
- function A(e, t) {
99
- return b(e) ? new Intl.DateTimeFormat(t, {
100
+ function N(e, t) {
101
+ return C(e) ? new Intl.DateTimeFormat(t, {
100
102
  month: "short",
101
103
  year: "numeric",
102
104
  timeZone: "UTC",
103
105
  calendar: "gregory"
104
- }).format(Date.parse(`${w(e)}-01T12:00:00Z`)) : "Invalid month";
106
+ }).format(Date.parse(`${D(e)}-01T12:00:00Z`)) : "Invalid month";
105
107
  }
106
- function j(e, t, n) {
107
- if (!x(e)) return "Select a valid date.";
108
- if (t !== void 0 && C(e) < C(t)) return `Select a date on or after ${C(t)}.`;
109
- if (n !== void 0 && C(e) > C(n)) return `Select a date on or before ${C(n)}.`;
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)}.`;
110
112
  }
111
- function M(e, t, n) {
112
- if (!b(e)) return "Select a valid month.";
113
- if (t !== void 0 && S(e) < S(t)) return `Select a month on or after ${w(t)}.`;
114
- if (n !== void 0 && S(e) > S(n)) return `Select a month on or before ${w(n)}.`;
113
+ 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)}.`;
115
117
  }
116
118
  // packages/forms/src/dates/calendar.tsx
117
- var N = {
119
+ var I = {
118
120
  dayButton: {
119
121
  kB7OPa: "x9f619",
120
122
  kzqmXN: "x9c6wpo x1ff4b4a",
@@ -170,16 +172,16 @@ var N = {
170
172
  $$css: !0
171
173
  }
172
174
  };
173
- function P(e) {
174
- return e !== void 0 && x(e) ? C(e) : void 0;
175
+ function L(e) {
176
+ return e !== void 0 && w(e) ? E(e) : void 0;
175
177
  }
176
- function F(e) {
177
- let t = u(null);
178
- l(() => {
178
+ function R(e) {
179
+ let t = d(null);
180
+ u(() => {
179
181
  e.autoFocus === !0 && t.current?.querySelector("[tabindex=\"0\"]")?.focus();
180
182
  }, [e.autoFocus, e.timeZone]);
181
- let n = P(e.today) ?? "2000-01-01", r = x(e.initialMonth) ? w(e.initialMonth) : n.slice(0, 7), i = P(e.minimum), a = P(e.maximum), s = e.mode === "range" ? P(e.value?.from) : void 0, c = e.mode === "range" ? P(e.value?.to) : void 0, d = s !== void 0 && c !== void 0 ? [s, c] : null;
182
- return /* @__PURE__ */ p(v.Calendar, {
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, {
183
185
  className: "xbixft xpvm0e4 x1hz01jw xj57cvi xtqrqnz x1778rvt x1717udv xezivpi x193iq5w xw2csxc",
184
186
  "aria-label": e.label,
185
187
  mode: e.mode,
@@ -192,15 +194,15 @@ function F(e) {
192
194
  ...a !== void 0 && { max: a },
193
195
  showOutsideDays: !0,
194
196
  deselectable: !0,
195
- value: e.mode === "single" ? P(e.value) ?? null : d,
197
+ value: e.mode === "single" ? L(e.value) ?? null : l,
196
198
  onAnchorChange: (t, n) => {
197
199
  if (e.mode !== "range") return;
198
200
  if (t === null) {
199
201
  n.reason === "escape-key" && e.onValueChange(void 0);
200
202
  return;
201
203
  }
202
- let r = T(t);
203
- r !== void 0 && (e.value !== void 0 && s !== void 0 && c === void 0 ? (n.cancel(), e.onValueChange(t < s ? {
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 ? {
204
206
  from: r,
205
207
  to: e.value.from
206
208
  } : {
@@ -209,49 +211,49 @@ function F(e) {
209
211
  })) : e.onValueChange({ from: r }));
210
212
  },
211
213
  onValueChange: (t) => {
212
- if (e.mode === "single") e.onValueChange(typeof t == "string" ? T(t) : void 0);
214
+ if (e.mode === "single") e.onValueChange(typeof t == "string" ? O(t) : void 0);
213
215
  else if (Array.isArray(t)) {
214
- let n = T(t[0]), r = T(t[1]);
216
+ let n = O(t[0]), r = O(t[1]);
215
217
  n !== void 0 && r !== void 0 && e.onValueChange({
216
218
  from: n,
217
219
  to: r
218
220
  });
219
221
  }
220
222
  },
221
- children: /* @__PURE__ */ m("div", {
223
+ children: /* @__PURE__ */ h("div", {
222
224
  className: "x1n2onr6",
223
225
  children: [
224
- /* @__PURE__ */ p("div", {
226
+ /* @__PURE__ */ m("div", {
225
227
  className: "x78zum5 x6s0dn4 xl56j7k x1f9pz31 x992rv9 x1jfksii",
226
- children: /* @__PURE__ */ p(v.CalendarHeading, { className: "x1ghz6dp xtqrqnz xk4h15q" })
228
+ children: /* @__PURE__ */ m(y.CalendarHeading, { className: "x1ghz6dp xtqrqnz xk4h15q" })
227
229
  }),
228
- /* @__PURE__ */ m("div", {
230
+ /* @__PURE__ */ h("div", {
229
231
  className: "x10l6tqk x17y0mx6 x13vifvy x78zum5 x1qughib x47corl",
230
- children: [/* @__PURE__ */ p(v.CalendarPrevious, {
232
+ children: [/* @__PURE__ */ m(y.CalendarPrevious, {
231
233
  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",
232
- children: /* @__PURE__ */ p(g, {
234
+ children: /* @__PURE__ */ m(_, {
233
235
  "aria-hidden": "true",
234
236
  className: "xtwnzbg x18utl2x"
235
237
  })
236
- }), /* @__PURE__ */ p(v.CalendarNext, {
238
+ }), /* @__PURE__ */ m(y.CalendarNext, {
237
239
  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",
238
- children: /* @__PURE__ */ p(_, {
240
+ children: /* @__PURE__ */ m(v, {
239
241
  "aria-hidden": "true",
240
242
  className: "xtwnzbg x18utl2x"
241
243
  })
242
244
  })]
243
245
  }),
244
- /* @__PURE__ */ m(v.CalendarGrid, {
246
+ /* @__PURE__ */ h(y.CalendarGrid, {
245
247
  ref: t,
246
248
  className: "x1mwwwfo x1gukg7c",
247
- children: [/* @__PURE__ */ p(v.CalendarWeekdays, { children: (e) => /* @__PURE__ */ p(v.CalendarWeekday, {
249
+ children: [/* @__PURE__ */ m(y.CalendarWeekdays, { children: (e) => /* @__PURE__ */ m(y.CalendarWeekday, {
248
250
  index: e,
249
251
  className: "x153jb6y xj57cvi xy8obcc x1f9pz31 x2b8uid"
250
- }) }), /* @__PURE__ */ p(v.CalendarWeeks, { children: (e) => /* @__PURE__ */ p(v.CalendarDay, {
252
+ }) }), /* @__PURE__ */ m(y.CalendarWeeks, { children: (e) => /* @__PURE__ */ m(y.CalendarDay, {
251
253
  value: e.date,
252
254
  className: (e) => {
253
- let t = e.rangeStart || e.rangeEnd, n = e.date === s && c === void 0, r = e.selected || t || n, i = e.inRange && !t;
254
- return o.props(N.dayButton, e.outside && N.outside, e.today && N.today, r && N.selected, i && N.rangeMiddle, e.disabled && N.disabledDay).className ?? "";
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 ?? "";
255
257
  }
256
258
  }) })]
257
259
  })
@@ -260,73 +262,128 @@ function F(e) {
260
262
  }, e.timeZone);
261
263
  }
262
264
  // packages/forms/src/dates/date-inputs.tsx
263
- var I = { input: {
264
- kzqmXN: "xh8yej3",
265
- k7Eaqz: "xeuugli",
266
- $$css: !0
267
- } };
268
- function L({ label: n, value: r, minimum: i, maximum: a, onValueChange: o }) {
269
- return /* @__PURE__ */ m(t.Root, { children: [/* @__PURE__ */ p(t.Label, { children: n }), /* @__PURE__ */ p(e, {
270
- type: "date",
271
- value: r === void 0 ? "" : C(r),
272
- min: i === void 0 ? "0001-01-01" : C(i),
273
- max: a === void 0 ? "9999-12-31" : C(a),
274
- onChange: (e) => o(T(e.target.value)),
275
- xstyle: I.input
265
+ var z = {
266
+ input: {
267
+ kzqmXN: "xh8yej3",
268
+ k7Eaqz: "xeuugli",
269
+ $$css: !0
270
+ },
271
+ segments: {
272
+ k1xSpc: "x78zum5",
273
+ kGNEyG: "x6s0dn4",
274
+ kcqcaj: "xss6m8b",
275
+ krA4I7: "x1u8w8hx",
276
+ kXImzq: "x14xc8xn",
277
+ kpj6Ty: "x1nvizq4",
278
+ kfQpEX: "xjy7s37",
279
+ k90wUN: "xs95o9x",
280
+ $$css: !0
281
+ },
282
+ segment: {
283
+ kB7OPa: "x1afcbsf",
284
+ kzqmXN: "xu85ibj",
285
+ kmVPX3: "x1717udv",
286
+ kg3NbH: "x1r97e56",
287
+ kMzoRj: "xc342km",
288
+ kaIpWk: "x1ok0vyi",
289
+ kWkggS: "xjbqb8w",
290
+ kMwMTN: "x1heor9g",
291
+ kMv6JI: "xjb2p0i",
292
+ kGuDYH: "x1qlqyl8",
293
+ kLWn49: "x15bjb6t",
294
+ kcqcaj: "x1wgrp8u",
295
+ k9WMMc: "x2b8uid",
296
+ k3XXqK: "x1t137rt",
297
+ knGrYV: "xbuiw85",
298
+ kL3a3j: "xzhmotu",
299
+ kabz5l: "x1u2mymh",
300
+ k8Qsv1: "xz7023x",
301
+ $$css: !0
302
+ },
303
+ year: {
304
+ kzqmXN: "xl3ry0p",
305
+ $$css: !0
306
+ },
307
+ literal: {
308
+ kMwMTN: "x153jb6y",
309
+ $$css: !0
310
+ }
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]
320
+ };
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) },
326
+ 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, {
330
+ segment: e,
331
+ ...s.props(B[e.type])
332
+ }, e.key))
276
333
  })] });
277
334
  }
278
- function R({ label: n, value: r, minimum: i, maximum: a, onValueChange: o }) {
279
- return /* @__PURE__ */ m(t.Root, { children: [/* @__PURE__ */ p(t.Label, { children: n }), /* @__PURE__ */ p(e, {
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, {
280
337
  type: "month",
281
- value: r === void 0 ? "" : w(r),
282
- min: i === void 0 ? "0001-01" : w(i),
283
- max: a === void 0 ? "9999-12" : w(a),
284
- onChange: (e) => o(E(e.target.value)),
285
- xstyle: I.input
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
286
343
  })] });
287
344
  }
288
- function z({ children: e }) {
289
- return /* @__PURE__ */ p("div", {
345
+ function U({ children: e }) {
346
+ return /* @__PURE__ */ m("div", {
290
347
  className: "xrvj5dj xnby9oq x1hnptsi",
291
348
  children: e
292
349
  });
293
350
  }
294
351
  // packages/forms/src/dates/picker-popover.tsx
295
- function B({ label: e, value: t, onValueChange: n, formatValue: o, validateValue: s, presets: l = [], density: u = "standard", disabled: f, isClearable: g = !0, timeZone: _, children: v }) {
296
- let [y, b] = d(!1), [x, S] = d(t), C = c(), w = x === void 0 ? void 0 : s(x);
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);
297
354
  function T(e) {
298
355
  n(e), b(!1);
299
356
  }
300
- return /* @__PURE__ */ m(a.Root, {
357
+ return /* @__PURE__ */ h(o.Root, {
301
358
  open: y,
302
359
  onOpenChange: (e) => {
303
360
  e && S(t), b(e);
304
361
  },
305
- children: [/* @__PURE__ */ m(a.Trigger, {
306
- disabled: f ?? !1,
307
- render: /* @__PURE__ */ p(i, {
362
+ children: [/* @__PURE__ */ h(o.Trigger, {
363
+ disabled: d ?? !1,
364
+ render: /* @__PURE__ */ m(i, {
308
365
  density: u,
309
366
  variant: "outline"
310
367
  }),
311
- "aria-label": t === void 0 ? e : `${e}: ${o(t)}`,
312
- children: [/* @__PURE__ */ p(h, {
368
+ "aria-label": t === void 0 ? e : `${e}: ${r(t)}`,
369
+ children: [/* @__PURE__ */ m(g, {
313
370
  size: 16,
314
371
  "aria-hidden": "true"
315
- }), t === void 0 ? e : o(t)]
316
- }), /* @__PURE__ */ p(a.Popup, {
372
+ }), t === void 0 ? e : r(t)]
373
+ }), /* @__PURE__ */ m(o.Popup, {
317
374
  align: "end",
318
375
  collisionPadding: 1,
319
376
  "aria-label": e,
320
377
  className: "x1vae6as x1rxfojk",
321
- children: /* @__PURE__ */ m("div", {
378
+ children: /* @__PURE__ */ h("div", {
322
379
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
323
380
  children: [
324
- /* @__PURE__ */ p(a.Title, { children: e }),
325
- l.length > 0 && /* @__PURE__ */ p("div", {
381
+ /* @__PURE__ */ m(o.Title, { children: e }),
382
+ c.length > 0 && /* @__PURE__ */ m("div", {
326
383
  role: "group",
327
384
  "aria-label": "Date presets",
328
385
  className: "x78zum5 x1a02dak xunmzkg xmmm7uk xso031l x1q0q8m5 x1qndepd",
329
- children: l.map((e) => /* @__PURE__ */ p(i, {
386
+ children: c.map((e) => /* @__PURE__ */ m(i, {
330
387
  variant: "ghost",
331
388
  disabled: s(e.value) !== void 0,
332
389
  onClick: () => T(e.value),
@@ -334,31 +391,31 @@ function B({ label: e, value: t, onValueChange: n, formatValue: o, validateValue
334
391
  }, e.id))
335
392
  }),
336
393
  y && v(x, S),
337
- /* @__PURE__ */ p("div", {
394
+ /* @__PURE__ */ m("div", {
338
395
  id: C,
339
396
  "aria-live": "polite",
340
397
  className: "xr5kp14 xy8obcc xas2l8k",
341
398
  children: w
342
399
  }),
343
- /* @__PURE__ */ m("div", {
400
+ /* @__PURE__ */ h("div", {
344
401
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x3bg4vu x178xt8z x13fuv20 xhjagg4",
345
- children: [/* @__PURE__ */ p("span", {
402
+ children: [/* @__PURE__ */ m("span", {
346
403
  className: "x153jb6y xy8obcc xas2l8k",
347
404
  children: _
348
- }), /* @__PURE__ */ m("div", {
405
+ }), /* @__PURE__ */ h("div", {
349
406
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi",
350
407
  children: [
351
- g && /* @__PURE__ */ p(r, {
408
+ p && /* @__PURE__ */ m(a, {
352
409
  disabled: t === void 0,
353
410
  onClick: () => T(void 0),
354
411
  children: "Clear"
355
412
  }),
356
- /* @__PURE__ */ p(i, {
413
+ /* @__PURE__ */ m(i, {
357
414
  variant: "ghost",
358
415
  onClick: () => b(!1),
359
416
  children: "Cancel"
360
417
  }),
361
- /* @__PURE__ */ p(i, {
418
+ /* @__PURE__ */ m(i, {
362
419
  variant: "solid",
363
420
  disabled: x === void 0 || w !== void 0,
364
421
  "aria-describedby": w === void 0 ? void 0 : C,
@@ -376,53 +433,54 @@ function B({ label: e, value: t, onValueChange: n, formatValue: o, validateValue
376
433
  });
377
434
  }
378
435
  // packages/forms/src/dates/date-picker.tsx
379
- function V({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
380
- return /* @__PURE__ */ p(B, {
436
+ function G({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
437
+ return /* @__PURE__ */ m(W, {
381
438
  label: e,
382
439
  value: t,
383
440
  onValueChange: n,
384
- formatValue: r ?? ((e) => k(e, s.locale)),
385
- validateValue: (e) => j(e, s.minimum, s.maximum),
441
+ formatValue: r ?? ((e) => M(e, s.locale)),
442
+ validateValue: (e) => P(e, s.minimum, s.maximum),
386
443
  density: i,
387
444
  disabled: a,
388
445
  isClearable: o,
389
446
  timeZone: s.timeZone,
390
- children: (t, n) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(L, {
447
+ children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(V, {
391
448
  label: "Date",
392
449
  value: t,
450
+ locale: s.locale,
393
451
  minimum: s.minimum,
394
452
  maximum: s.maximum,
395
453
  onValueChange: n
396
- }), /* @__PURE__ */ p(F, {
454
+ }), /* @__PURE__ */ m(R, {
397
455
  ...s,
398
456
  label: e,
399
457
  mode: "single",
400
458
  autoFocus: !0,
401
459
  value: t,
402
- initialMonth: t !== void 0 && x(t) ? t : s.initialMonth,
460
+ initialMonth: t !== void 0 && w(t) ? t : s.initialMonth,
403
461
  onValueChange: n
404
462
  })] })
405
463
  });
406
464
  }
407
465
  // packages/forms/src/dates/date-range-picker.tsx
408
- function H({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
466
+ function K({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
409
467
  function u(e) {
410
468
  if (e.to === void 0) return "Select a start and end date.";
411
- let t = j(e.from, l.minimum, l.maximum) ?? j(e.to, l.minimum, l.maximum);
412
- return t === void 0 ? C(e.from) > C(e.to) ? "End date must be on or after start date." : a?.({
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?.({
413
471
  from: e.from,
414
472
  to: e.to
415
473
  }) : t;
416
474
  }
417
475
  function d(e) {
418
- if (e.to === void 0) return k(e.from, l.locale);
476
+ if (e.to === void 0) return M(e.from, l.locale);
419
477
  let t = {
420
478
  from: e.from,
421
479
  to: e.to
422
480
  };
423
- return r?.(t) ?? `${k(t.from, l.locale)} – ${k(t.to, l.locale)}`;
481
+ return r?.(t) ?? `${M(t.from, l.locale)} – ${M(t.to, l.locale)}`;
424
482
  }
425
- return /* @__PURE__ */ p(B, {
483
+ return /* @__PURE__ */ m(W, {
426
484
  label: e,
427
485
  value: t,
428
486
  formatValue: d,
@@ -438,18 +496,20 @@ function H({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
438
496
  to: e.to
439
497
  });
440
498
  },
441
- children: (t, n) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m(z, { children: [/* @__PURE__ */ p(L, {
499
+ children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(U, { children: [/* @__PURE__ */ m(V, {
442
500
  label: "Start date",
443
501
  value: t?.from,
502
+ locale: l.locale,
444
503
  minimum: l.minimum,
445
504
  maximum: l.maximum,
446
505
  onValueChange: (e) => n(e === void 0 ? void 0 : {
447
506
  from: e,
448
507
  to: t?.to
449
508
  })
450
- }), /* @__PURE__ */ p(L, {
509
+ }), /* @__PURE__ */ m(V, {
451
510
  label: "End date",
452
511
  value: t?.to,
512
+ locale: l.locale,
453
513
  minimum: l.minimum,
454
514
  maximum: l.maximum,
455
515
  onValueChange: (e) => {
@@ -461,35 +521,35 @@ function H({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
461
521
  to: e
462
522
  });
463
523
  }
464
- })] }), /* @__PURE__ */ p(F, {
524
+ })] }), /* @__PURE__ */ m(R, {
465
525
  ...l,
466
526
  label: e,
467
527
  mode: "range",
468
528
  autoFocus: !0,
469
529
  value: t,
470
- initialMonth: t !== void 0 && x(t.from) ? t.from : l.initialMonth,
530
+ initialMonth: t !== void 0 && w(t.from) ? t.from : l.initialMonth,
471
531
  onValueChange: n
472
532
  })] })
473
533
  });
474
534
  }
475
535
  // packages/forms/src/dates/month-calendar.tsx
476
- var U = { month: {
536
+ var q = { month: {
477
537
  kzqmXN: "xh8yej3",
478
538
  $$css: !0
479
539
  } };
480
- function W(e, t, n) {
481
- let r = b(e) ? e : {
540
+ function J(e, t, n) {
541
+ let r = C(e) ? e : {
482
542
  year: 2e3,
483
543
  month: 1
484
544
  };
485
- return t !== void 0 && S(r) < S(t) ? t : n !== void 0 && S(r) > S(n) ? n : r;
545
+ return t !== void 0 && T(r) < T(t) ? t : n !== void 0 && T(r) > T(n) ? n : r;
486
546
  }
487
- function G({ label: e, selection: t, onSelect: r, locale: a, today: o, initialMonth: c, minimum: l, maximum: f }) {
488
- let h = W(c, l, f), [v, y] = d(h.year), [b, x] = d(h), C = u(/* @__PURE__ */ new Map()), w = u(!1);
489
- s(() => {
490
- w.current && (w.current = !1, C.current.get(b.month)?.focus());
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(() => {
550
+ C.current && (C.current = !1, S.current.get(b.month)?.focus());
491
551
  }, [b]);
492
- function T(e, t) {
552
+ function w(e, t) {
493
553
  let n = {
494
554
  ArrowLeft: -1,
495
555
  ArrowRight: 1,
@@ -500,121 +560,121 @@ function G({ label: e, selection: t, onSelect: r, locale: a, today: o, initialMo
500
560
  }[e.key];
501
561
  if (e.key === "Home" && (n = 1 - t.month), e.key === "End" && (n = 12 - t.month), n === void 0) return;
502
562
  e.preventDefault();
503
- let r = Math.max(12, Math.min(119999, S(t) - 1 + n)), i = W({
563
+ let r = Math.max(12, Math.min(119999, T(t) - 1 + n)), i = J({
504
564
  year: Math.floor(r / 12),
505
565
  month: r % 12 + 1
506
- }, l, f);
507
- w.current = !0, y(i.year), x(i);
566
+ }, l, u);
567
+ C.current = !0, y(i.year), x(i);
508
568
  }
509
569
  function E(e) {
510
- let t = W({
570
+ let t = J({
511
571
  year: e,
512
572
  month: b.month
513
- }, l, f);
573
+ }, l, u);
514
574
  y(t.year), x(t);
515
575
  }
516
- return /* @__PURE__ */ m("div", {
576
+ return /* @__PURE__ */ h("div", {
517
577
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli",
518
- children: [/* @__PURE__ */ m("div", {
578
+ children: [/* @__PURE__ */ h("div", {
519
579
  className: "x78zum5 x6s0dn4 x1qughib x1hnptsi",
520
580
  children: [
521
- /* @__PURE__ */ p(n, {
581
+ /* @__PURE__ */ m(r, {
522
582
  "aria-label": "Previous year",
523
- disabled: v <= (l?.year ?? 1),
524
- onClick: () => E(v - 1),
525
- children: /* @__PURE__ */ p(g, { size: 16 })
583
+ disabled: g <= (l?.year ?? 1),
584
+ onClick: () => E(g - 1),
585
+ children: /* @__PURE__ */ m(_, { size: 16 })
526
586
  }),
527
- /* @__PURE__ */ p("span", {
587
+ /* @__PURE__ */ m("span", {
528
588
  "aria-live": "polite",
529
589
  className: "xk4h15q xss6m8b",
530
- children: v
590
+ children: g
531
591
  }),
532
- /* @__PURE__ */ p(n, {
592
+ /* @__PURE__ */ m(r, {
533
593
  "aria-label": "Next year",
534
- disabled: v >= (f?.year ?? 9999),
535
- onClick: () => E(v + 1),
536
- children: /* @__PURE__ */ p(_, { size: 16 })
594
+ disabled: g >= (u?.year ?? 9999),
595
+ onClick: () => E(g + 1),
596
+ children: /* @__PURE__ */ m(v, { size: 16 })
537
597
  })
538
598
  ]
539
- }), /* @__PURE__ */ p("div", {
599
+ }), /* @__PURE__ */ m("div", {
540
600
  role: "group",
541
601
  "aria-label": e,
542
602
  className: "xrvj5dj x185a7wo xunmzkg",
543
- children: Array.from({ length: 12 }, (e, n) => {
603
+ children: Array.from({ length: 12 }, (e, r) => {
544
604
  let s = {
545
- year: v,
546
- month: n + 1
547
- }, c = S(s), u = t === void 0 ? void 0 : S(t.from), d = t?.to === void 0 ? void 0 : S(t.to), m = c === u || c === d, h = u !== void 0 && d !== void 0 && c > u && c < d, g = l !== void 0 && c < S(l), _ = f !== void 0 && c > S(f), y = g || _;
548
- return /* @__PURE__ */ p(i, {
549
- variant: m || h ? "solid" : "ghost",
550
- "aria-label": A(s, a),
551
- "aria-pressed": m || h,
552
- "aria-current": v === o.year && s.month === o.month ? "date" : void 0,
605
+ year: g,
606
+ 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,
553
613
  disabled: y,
554
- tabIndex: b.year === v && b.month === s.month ? 0 : -1,
614
+ tabIndex: b.year === g && b.month === s.month ? 0 : -1,
555
615
  ref: (e) => {
556
- e === null ? C.current.delete(s.month) : C.current.set(s.month, e);
616
+ e === null ? S.current.delete(s.month) : S.current.set(s.month, e);
557
617
  },
558
618
  onFocus: () => x(s),
559
- onKeyDown: (e) => T(e, s),
560
- onClick: () => r(s),
561
- xstyle: U.month,
619
+ onKeyDown: (e) => w(e, s),
620
+ onClick: () => n(s),
621
+ xstyle: q.month,
562
622
  children: new Intl.DateTimeFormat(a, {
563
623
  month: "short",
564
624
  timeZone: "UTC",
565
625
  calendar: "gregory"
566
- }).format(/* @__PURE__ */ new Date(`${String(v).padStart(4, "0")}-${String(s.month).padStart(2, "0")}-01T12:00:00Z`))
626
+ }).format(/* @__PURE__ */ new Date(`${String(g).padStart(4, "0")}-${String(s.month).padStart(2, "0")}-01T12:00:00Z`))
567
627
  }, s.month);
568
628
  })
569
629
  })]
570
630
  });
571
631
  }
572
632
  // packages/forms/src/dates/month-picker.tsx
573
- function K({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
574
- return /* @__PURE__ */ p(B, {
633
+ function X({ label: e, value: t, onValueChange: n, formatValue: r, density: i, disabled: a, isClearable: o, ...s }) {
634
+ return /* @__PURE__ */ m(W, {
575
635
  label: e,
576
636
  value: t,
577
637
  onValueChange: n,
578
- formatValue: r ?? ((e) => A(e, s.locale)),
579
- validateValue: (e) => M(e, s.minimum, s.maximum),
638
+ formatValue: r ?? ((e) => N(e, s.locale)),
639
+ validateValue: (e) => F(e, s.minimum, s.maximum),
580
640
  density: i,
581
641
  disabled: a,
582
642
  isClearable: o,
583
643
  timeZone: s.timeZone,
584
- children: (t, n) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(R, {
644
+ children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(H, {
585
645
  label: "Month",
586
646
  value: t,
587
647
  minimum: s.minimum,
588
648
  maximum: s.maximum,
589
649
  onValueChange: n
590
- }), /* @__PURE__ */ p(G, {
650
+ }), /* @__PURE__ */ m(Y, {
591
651
  ...s,
592
652
  label: e,
593
653
  selection: t === void 0 ? void 0 : { from: t },
594
- initialMonth: t !== void 0 && b(t) ? t : s.initialMonth,
654
+ initialMonth: t !== void 0 && C(t) ? t : s.initialMonth,
595
655
  onSelect: n
596
656
  })] })
597
657
  });
598
658
  }
599
659
  // packages/forms/src/dates/month-range-picker.tsx
600
- function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
660
+ function Z({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, validateRange: a, density: o, disabled: s, isClearable: c, ...l }) {
601
661
  function u(e) {
602
662
  if (e.to === void 0) return "Select a start and end month.";
603
- let t = M(e.from, l.minimum, l.maximum) ?? M(e.to, l.minimum, l.maximum);
604
- return t === void 0 ? S(e.from) > S(e.to) ? "End month must be on or after start month." : a?.({
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?.({
605
665
  from: e.from,
606
666
  to: e.to
607
667
  }) : t;
608
668
  }
609
669
  function d(e) {
610
- if (e.to === void 0) return A(e.from, l.locale);
670
+ if (e.to === void 0) return N(e.from, l.locale);
611
671
  let t = {
612
672
  from: e.from,
613
673
  to: e.to
614
674
  };
615
- return r?.(t) ?? `${A(t.from, l.locale)} – ${A(t.to, l.locale)}`;
675
+ return r?.(t) ?? `${N(t.from, l.locale)} – ${N(t.to, l.locale)}`;
616
676
  }
617
- return /* @__PURE__ */ p(B, {
677
+ return /* @__PURE__ */ m(W, {
618
678
  label: e,
619
679
  value: t,
620
680
  formatValue: d,
@@ -630,7 +690,7 @@ function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
630
690
  to: e.to
631
691
  });
632
692
  },
633
- children: (t, n) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m(z, { children: [/* @__PURE__ */ p(R, {
693
+ children: (t, n) => /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(U, { children: [/* @__PURE__ */ m(H, {
634
694
  label: "Start month",
635
695
  value: t?.from,
636
696
  minimum: l.minimum,
@@ -639,7 +699,7 @@ function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
639
699
  from: e,
640
700
  to: t?.to
641
701
  })
642
- }), /* @__PURE__ */ p(R, {
702
+ }), /* @__PURE__ */ m(H, {
643
703
  label: "End month",
644
704
  value: t?.to,
645
705
  minimum: l.minimum,
@@ -653,13 +713,13 @@ function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
653
713
  to: e
654
714
  });
655
715
  }
656
- })] }), /* @__PURE__ */ p(G, {
716
+ })] }), /* @__PURE__ */ m(Y, {
657
717
  ...l,
658
718
  label: e,
659
719
  selection: t,
660
- initialMonth: t !== void 0 && b(t.from) ? t.from : l.initialMonth,
720
+ initialMonth: t !== void 0 && C(t.from) ? t.from : l.initialMonth,
661
721
  onSelect: (e) => {
662
- t === void 0 || t.to !== void 0 ? n({ from: e }) : S(e) < S(t.from) ? n({
722
+ t === void 0 || t.to !== void 0 ? n({ from: e }) : T(e) < T(t.from) ? n({
663
723
  from: e,
664
724
  to: t.from
665
725
  }) : n({
@@ -671,20 +731,20 @@ function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
671
731
  });
672
732
  }
673
733
  // packages/forms/src/dates/event-month.tsx
674
- var J = 2;
675
- function Y({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStartsOn: a = 1, itemsByDate: o, onSelect: s }) {
676
- let c = C(i), l = C(r);
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);
677
737
  function u(e) {
678
- let t = T(e);
738
+ let t = O(e);
679
739
  t !== void 0 && s(t);
680
740
  }
681
- return /* @__PURE__ */ p(v.Calendar, {
741
+ return /* @__PURE__ */ m(y.Calendar, {
682
742
  "aria-label": e,
683
743
  mode: "single",
684
744
  locale: t,
685
745
  timeZone: n,
686
746
  today: l,
687
- month: w(i),
747
+ month: D(i),
688
748
  value: c,
689
749
  weekStartsOn: a,
690
750
  weekdayFormat: "short",
@@ -695,20 +755,20 @@ function Y({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStarts
695
755
  onFocusedChange: (e, t) => {
696
756
  t.reason === "list-navigation" && u(e);
697
757
  },
698
- children: /* @__PURE__ */ m(v.CalendarGrid, {
758
+ children: /* @__PURE__ */ h(y.CalendarGrid, {
699
759
  className: "xh8yej3 x140o2bo x1mwwwfo x1y0btm7 xmkeg23 x1ey3b81 xpvm0e4 xbixft",
700
- children: [/* @__PURE__ */ p(v.CalendarWeekdays, { children: (e) => /* @__PURE__ */ p(v.CalendarWeekday, {
760
+ children: [/* @__PURE__ */ m(y.CalendarWeekdays, { children: (e) => /* @__PURE__ */ m(y.CalendarWeekday, {
701
761
  index: e,
702
762
  className: "xn9t2bk x14w6jbu x153jb6y x2b8uid xy8obcc xk4h15q"
703
- }) }), /* @__PURE__ */ p(v.CalendarWeeks, { children: (e) => {
704
- let n = T(e.date);
763
+ }) }), /* @__PURE__ */ m(y.CalendarWeeks, { children: (e) => {
764
+ let n = O(e.date);
705
765
  if (n === void 0) return null;
706
- let r = o.get(e.date) ?? [], a = r.length - J, s = r.slice(0, J), u = [
707
- k(n, t),
766
+ let r = o.get(e.date) ?? [], a = r.length - Q, s = r.slice(0, Q), u = [
767
+ M(n, t),
708
768
  ...s.map((e) => e.label),
709
769
  a > 0 && `+${a} more`
710
770
  ].filter(Boolean).join(", ");
711
- return /* @__PURE__ */ p(v.CalendarDay, {
771
+ return /* @__PURE__ */ m(y.CalendarDay, {
712
772
  value: e.date,
713
773
  "aria-label": u,
714
774
  ...{
@@ -717,22 +777,22 @@ function Y({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStarts
717
777
  1: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x1r8u7ye" },
718
778
  3: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x153jb6y x1r8u7ye" }
719
779
  }[(n.month !== i.month) << 1 | e.date === c],
720
- children: /* @__PURE__ */ m("div", {
780
+ children: /* @__PURE__ */ h("div", {
721
781
  className: "xrvj5dj x10ukxgv xunmzkg xefclja x13wpdut x1s01oa9",
722
782
  "aria-hidden": "true",
723
783
  children: [
724
- /* @__PURE__ */ p("span", {
784
+ /* @__PURE__ */ m("span", {
725
785
  ...{
726
786
  0: { className: "x1lqcxt8 x14w6jbu xy8obcc x1ok0vyi" },
727
787
  1: { className: "x1lqcxt8 x14w6jbu xy8obcc x1ok0vyi x7ixh4y x1r8u7ye xtjd4bd" }
728
788
  }[e.date === l | 0],
729
789
  children: n.day
730
790
  }),
731
- s.map((e) => /* @__PURE__ */ p("span", {
791
+ s.map((e) => /* @__PURE__ */ m("span", {
732
792
  className: "x1lliihq xb3r6kr xlyipyv xuxw1ft x14w6jbu xy8obcc x1r7kqkb x1ok0vyi",
733
793
  children: e.label
734
794
  }, e.id)),
735
- a > 0 && /* @__PURE__ */ m("span", {
795
+ a > 0 && /* @__PURE__ */ h("span", {
736
796
  className: "xy8obcc x153jb6y xuxw1ft xb3r6kr",
737
797
  children: [
738
798
  "+",
@@ -747,4 +807,4 @@ function Y({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStarts
747
807
  })
748
808
  });
749
809
  }
750
- export { F as Calendar, V as DatePicker, H as DateRangePicker, Y as EventMonth, K as MonthPicker, q as MonthRangePicker, D as addCalendarDays, O as addCalendarMonths, T as parseCalendarDate, E as parseCalendarMonth, C as serializeCalendarDate, w as serializeCalendarMonth };
810
+ export { R as Calendar, G as DatePicker, K as DateRangePicker, $ as EventMonth, X as MonthPicker, Z as MonthRangePicker, A as addCalendarDays, j as addCalendarMonths, O as parseCalendarDate, k as parseCalendarMonth, E as serializeCalendarDate, D as serializeCalendarMonth };