@box-kite/react 2.2.15 → 2.2.17

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 (144) hide show
  1. package/.claude/rules/box-kite-rules.md +1 -1
  2. package/.claude/skills/box-kite/SKILL.md +1 -1
  3. package/.claude/skills/box-kite/references/styling.md +1 -1
  4. package/.cursor/rules/box-kite.mdc +1 -1
  5. package/AGENTS.md +1 -1
  6. package/BOX_AI_CONTEXT.md +16 -0
  7. package/BOX_KITE_AI_CONTEXT.md +16 -0
  8. package/behavior.cjs +1 -1
  9. package/behavior.mjs +16 -16
  10. package/catalog.cjs +1 -1
  11. package/catalog.mjs +1 -1
  12. package/client.cjs +1 -1
  13. package/client.mjs +10 -10
  14. package/components/accordion.cjs +1 -1
  15. package/components/accordion.mjs +95 -91
  16. package/components/calendar.cjs +1 -1
  17. package/components/calendar.mjs +212 -210
  18. package/components/chart.cjs +1 -1
  19. package/components/chart.d.ts +8 -3
  20. package/components/chart.mjs +70 -65
  21. package/components/combobox.cjs +1 -1
  22. package/components/combobox.mjs +187 -186
  23. package/components/dashboard.cjs +1 -1
  24. package/components/dashboard.d.ts +1 -44
  25. package/components/dashboard.mjs +202 -201
  26. package/components/dataGrid/components/dataGridListLayout.d.ts +1 -1
  27. package/components/dataGrid/contracts/dataGridContract.d.ts +1 -1
  28. package/components/dataGrid/models/gridModel.d.ts +1 -1
  29. package/components/dataGrid.cjs +2 -2
  30. package/components/dataGrid.mjs +10 -10
  31. package/components/dateField.cjs +1 -1
  32. package/components/dateField.mjs +96 -96
  33. package/components/datePicker.cjs +1 -1
  34. package/components/datePicker.mjs +286 -285
  35. package/components/dialog.cjs +1 -1
  36. package/components/dialog.d.ts +2 -64
  37. package/components/dialog.mjs +131 -126
  38. package/components/form.cjs +1 -1
  39. package/components/form.d.ts +4 -3
  40. package/components/form.mjs +25 -22
  41. package/components/menu.cjs +1 -1
  42. package/components/menu.d.ts +2 -73
  43. package/components/menu.mjs +220 -215
  44. package/components/overlay.cjs +1 -1
  45. package/components/overlay.mjs +44 -43
  46. package/components/popover.cjs +1 -1
  47. package/components/popover.d.ts +1 -41
  48. package/components/popover.mjs +56 -51
  49. package/components/presence.cjs +1 -1
  50. package/components/presence.mjs +1 -1
  51. package/components/radioGroup.cjs +1 -1
  52. package/components/radioGroup.mjs +59 -55
  53. package/components/semantics.d.ts +29 -29
  54. package/components/slider.cjs +1 -1
  55. package/components/slider.d.ts +1 -55
  56. package/components/slider.mjs +92 -90
  57. package/components/sortableList.cjs +1 -1
  58. package/components/sortableList.mjs +149 -148
  59. package/components/swipeItem.cjs +1 -1
  60. package/components/swipeItem.mjs +100 -100
  61. package/components/tabs.cjs +1 -1
  62. package/components/tabs.mjs +135 -132
  63. package/components/toaster.cjs +1 -1
  64. package/components/toaster.d.ts +1 -37
  65. package/components/toaster.mjs +130 -128
  66. package/components/tooltip.cjs +1 -1
  67. package/components/tooltip.d.ts +1 -34
  68. package/components/tooltip.mjs +73 -69
  69. package/components/virtualList.cjs +1 -1
  70. package/components/virtualList.mjs +88 -87
  71. package/docs/props.md +2 -2
  72. package/interactionListening.cjs +1 -1
  73. package/interactionListening.mjs +3 -3
  74. package/layer.cjs +1 -1
  75. package/layer.mjs +1 -1
  76. package/motion.cjs +1 -1
  77. package/motion.mjs +30 -20
  78. package/package.json +41 -40
  79. package/placement.cjs +1 -1
  80. package/placement.mjs +1 -1
  81. package/platform.cjs +1 -1
  82. package/platform.mjs +17 -14
  83. package/react/animation/useHeldContent.d.ts +6 -0
  84. package/react/animation/usePresence.d.ts +4 -0
  85. package/react/componentsContext.d.ts +1 -1
  86. package/react-shared.cjs +1 -1
  87. package/react-shared.mjs +1 -1
  88. package/scrolling.cjs +1 -1
  89. package/scrolling.mjs +1 -1
  90. package/utils/chart/chartUtils.d.ts +3 -2
  91. package/utils/dashboard/dashboardUtils.d.ts +1 -1
  92. package/utils/dom/domUtils.d.ts +6 -0
  93. package/create/src/agents.d.ts +0 -22
  94. package/create/src/agents.test.d.ts +0 -1
  95. package/create/src/index.d.ts +0 -1
  96. package/create/src/options.d.ts +0 -31
  97. package/create/src/options.test.d.ts +0 -1
  98. package/create/src/packageManager.d.ts +0 -5
  99. package/create/src/project.d.ts +0 -27
  100. package/create/src/project.test.d.ts +0 -1
  101. package/create/templates/ts/designs/azure.d.ts +0 -5
  102. package/create/templates/ts/designs/ember.d.ts +0 -5
  103. package/create/templates/ts/designs/mono.d.ts +0 -5
  104. package/create/templates/ts/src/App.d.ts +0 -2
  105. package/create/templates/ts/src/design.d.ts +0 -5
  106. package/create/templates/ts/src/main.d.ts +0 -0
  107. package/mcp/src/data.d.ts +0 -90
  108. package/mcp/src/data.test.d.ts +0 -1
  109. package/mcp/src/engine.d.ts +0 -23
  110. package/mcp/src/index.d.ts +0 -1
  111. package/mcp/src/search.d.ts +0 -38
  112. package/mcp/src/search.test.d.ts +0 -1
  113. package/mcp/src/server.d.ts +0 -18
  114. package/mcp/src/server.test.d.ts +0 -1
  115. package/mcp/src/styles.d.ts +0 -27
  116. package/mcp/src/styles.test.d.ts +0 -1
  117. package/mcp/src/tools.d.ts +0 -18
  118. package/mcp/src/vocabulary.d.ts +0 -41
  119. package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +0 -24
  120. package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +0 -13
  121. package/registry/blocks/data-grid/invoice-rows.d.ts +0 -15
  122. package/registry/blocks/data-grid/invoices-grid.d.ts +0 -1
  123. package/registry/blocks/settings-form/settings-form.d.ts +0 -17
  124. package/registry/designs/store/address-form.d.ts +0 -11
  125. package/registry/designs/store/cart-items.d.ts +0 -10
  126. package/registry/designs/store/cart-page.d.ts +0 -4
  127. package/registry/designs/store/checkout-page.d.ts +0 -7
  128. package/registry/designs/store/credit-card-form.d.ts +0 -10
  129. package/registry/designs/store/form-field.d.ts +0 -19
  130. package/registry/designs/store/order-summary.d.ts +0 -18
  131. package/registry/designs/store/product-art.d.ts +0 -26
  132. package/registry/designs/store/product-card.d.ts +0 -11
  133. package/registry/designs/store/product-gallery.d.ts +0 -11
  134. package/registry/designs/store/product-grid.d.ts +0 -10
  135. package/registry/designs/store/product-page.d.ts +0 -5
  136. package/registry/designs/store/quantity-stepper.d.ts +0 -13
  137. package/registry/designs/store/shipping-method.d.ts +0 -14
  138. package/registry/designs/store/store-data.d.ts +0 -53
  139. package/registry/designs/store/store-design.d.ts +0 -63
  140. package/registry/designs/store/store-shell.d.ts +0 -12
  141. package/registry/designs/store/storefront-page.d.ts +0 -4
  142. package/registry/designs/store/variant-picker.d.ts +0 -15
  143. package/supabase/functions/collect/index.d.ts +0 -30
  144. package/supabase/functions/collect/index.test.d.ts +0 -1
@@ -1,79 +1,80 @@
1
1
  "use client";
2
- import { p as e } from "../platform.mjs";
3
- import t from "../box.mjs";
4
- import { a as n, i as r } from "../behavior.mjs";
5
- import { t as i } from "../identity.mjs";
6
- import { C as a, G as o, Q as s, S as c, U as l, V as ee, W as u, Z as te, f as d, q as f, t as p, w as m, x as ne } from "../dates.mjs";
7
- import { N as re, x as ie } from "../date-math.mjs";
8
- import { a as ae, i as oe } from "../reporting.mjs";
9
- import { Path as se, Svg as ce } from "./svg.mjs";
10
- import { n as le } from "../date-environment.mjs";
11
- import ue from "./visuallyHidden.mjs";
12
- import { useEffect as de, useMemo as fe, useRef as pe, useState as h } from "react";
13
- import { Fragment as me, jsx as g, jsxs as _ } from "react/jsx-runtime";
2
+ import { f as e } from "../react-shared.mjs";
3
+ import { l as t, m as n } from "../platform.mjs";
4
+ import r from "../box.mjs";
5
+ import { a as i, i as a } from "../behavior.mjs";
6
+ import { t as o } from "../identity.mjs";
7
+ import { C as s, G as c, Q as l, S as ee, U as u, V as te, W as d, Z as ne, f, q as p, t as m, w as h, x as re } from "../dates.mjs";
8
+ import { N as ie, x as ae } from "../date-math.mjs";
9
+ import { a as oe, i as se } from "../reporting.mjs";
10
+ import { Path as ce, Svg as le } from "./svg.mjs";
11
+ import { n as ue } from "../date-environment.mjs";
12
+ import de from "./visuallyHidden.mjs";
13
+ import { useCallback as fe, useEffect as pe, useMemo as me, useRef as he, useState as g } from "react";
14
+ import { Fragment as ge, jsx as _, jsxs as v } from "react/jsx-runtime";
14
15
  //#region src/utils/date/calendarModel.ts
15
- function v(e) {
16
- let t = d(e);
16
+ function y(e) {
17
+ let t = f(e);
17
18
  return t && t.kind === "date" ? t.fields : null;
18
19
  }
19
- function y(e) {
20
- return m({
20
+ function b(e) {
21
+ return h({
21
22
  ...e,
22
- ...ee
23
+ ...te
23
24
  });
24
25
  }
25
- function he(e, t, n) {
26
+ function _e(e, t, n) {
26
27
  let r = {
27
28
  year: e,
28
29
  month: t,
29
30
  day: 1
30
- }, i = l(r, -s(o(r) - n, 7));
31
+ }, i = u(r, -l(c(r) - n, 7));
31
32
  return Array.from({ length: 6 }, (e, r) => {
32
33
  let a = Array.from({ length: 7 }, (e, n) => {
33
- let a = l(i, r * 7 + n);
34
+ let a = u(i, r * 7 + n);
34
35
  return {
35
- date: y(a),
36
+ date: b(a),
36
37
  day: a.day,
37
38
  outside: a.month !== t
38
39
  };
39
- }), o = l(i, r * 7 + s(4 - n, 7));
40
+ }), o = u(i, r * 7 + l(4 - n, 7));
40
41
  return {
41
- week: te(o).week,
42
+ week: ne(o).week,
42
43
  days: a
43
44
  };
44
45
  });
45
46
  }
46
- function ge(e, t, n, r) {
47
+ function ve(e, t, n, r) {
47
48
  let i = r.rtl ? "ArrowLeft" : "ArrowRight", a = r.rtl ? "ArrowRight" : "ArrowLeft";
48
49
  switch (t) {
49
- case i: return l(e, 1);
50
- case a: return l(e, -1);
51
- case "ArrowDown": return l(e, 7);
52
- case "ArrowUp": return l(e, -7);
53
- case "Home": return l(e, -s(o(e) - r.firstDay, 7));
54
- case "End": return l(e, 6 - s(o(e) - r.firstDay, 7));
55
- case "PageUp": return u(e, n ? -12 : -1);
56
- case "PageDown": return u(e, n ? 12 : 1);
50
+ case i: return u(e, 1);
51
+ case a: return u(e, -1);
52
+ case "ArrowDown": return u(e, 7);
53
+ case "ArrowUp": return u(e, -7);
54
+ case "Home": return u(e, -l(c(e) - r.firstDay, 7));
55
+ case "End": return u(e, 6 - l(c(e) - r.firstDay, 7));
56
+ case "PageUp": return d(e, n ? -12 : -1);
57
+ case "PageDown": return d(e, n ? 12 : 1);
57
58
  default: return null;
58
59
  }
59
60
  }
60
- function _e(e, t) {
61
- return t.min != null && f(e) < f(t.min) || t.max != null && f(e) > f(t.max);
62
- }
63
- function b(e, t) {
64
- return t.min && f(e) < f(t.min) ? t.min : t.max && f(e) > f(t.max) ? t.max : e;
61
+ function ye(e, t) {
62
+ return t.min != null && p(e) < p(t.min) || t.max != null && p(e) > p(t.max);
65
63
  }
66
64
  function x(e, t) {
67
- return f(e) <= f(t) ? [e, t] : [t, e];
65
+ return t.min && p(e) < p(t.min) ? t.min : t.max && p(e) > p(t.max) ? t.max : e;
66
+ }
67
+ function S(e, t) {
68
+ return p(e) <= p(t) ? [e, t] : [t, e];
68
69
  }
69
- function ve(e, t, n) {
70
- if (!t || !n) return t && f(e) === f(t) ? "start" : null;
71
- let [r, i] = x(t, n), a = f(e);
72
- return a === f(r) ? "start" : a === f(i) ? "end" : a > f(r) && a < f(i) ? "middle" : null;
70
+ function be(e, t, n) {
71
+ if (!t || !n) return t && p(e) === p(t) ? "start" : null;
72
+ let [r, i] = S(t, n), a = p(e);
73
+ return a === p(r) ? "start" : a === p(i) ? "end" : a > p(r) && a < p(i) ? "middle" : null;
73
74
  }
74
- function ye(e, t, n) {
75
- let [r, i] = x(e, t);
76
- for (let e = f(r); e <= f(i); e++) if (n(y(l({
75
+ function xe(e, t, n) {
76
+ let [r, i] = S(e, t);
77
+ for (let e = p(r); e <= p(i); e++) if (n(b(u({
77
78
  year: 1970,
78
79
  month: 1,
79
80
  day: 1
@@ -82,24 +83,24 @@ function ye(e, t, n) {
82
83
  }
83
84
  //#endregion
84
85
  //#region src/components/calendar.tsx
85
- var be = "data-date", S = 12;
86
- function C(e, t) {
87
- return e !== null && t !== null && f(e) === f(t);
86
+ var Se = "data-date", C = 12;
87
+ function w(e, t) {
88
+ return e !== null && t !== null && p(e) === p(t);
88
89
  }
89
- function xe(o) {
90
- let { mode: s = "single", value: l, defaultValue: ee = null, onValueChange: te, min: d, max: f, isDateUnavailable: m, locale: se, zone: ce, firstDayOfWeek: xe, months: T = 1, weekNumbers: D = !1, showOutsideDays: we = !0, focusedDate: Te, defaultFocusedDate: Ee, onFocusedDateChange: De, disabled: O = !1, readOnly: Oe = !1, autoFocus: ke = !1, label: Ae, previousLabel: je = "Previous", nextLabel: Me = "Next", props: Ne, ...Pe } = o, k = le({
91
- locale: se,
92
- zone: ce
93
- }), { locale: A } = k, j = v(re(k.zone)), M = xe ?? c(A).firstDay, N = (e) => Se(A).format(e), P = s === "range", F = fe(() => ({
94
- min: v(d),
95
- max: v(f)
96
- }), [d, f]), [I, Fe] = ae({
97
- value: l,
98
- defaultValue: ee,
90
+ function Ce(e, c) {
91
+ let { mode: l = "single", value: u, defaultValue: te = null, onValueChange: ne, min: f, max: p, isDateUnavailable: h, locale: ce, zone: le, firstDayOfWeek: Ce, months: E = 1, weekNumbers: O = !1, showOutsideDays: Ee = !0, focusedDate: De, defaultFocusedDate: Oe, onFocusedDateChange: ke, disabled: k = !1, readOnly: Ae = !1, autoFocus: je = !1, label: Me, previousLabel: Ne = "Previous", nextLabel: Pe = "Next", props: Fe, ...Ie } = e, A = ue({
92
+ locale: ce,
93
+ zone: le
94
+ }), { locale: j } = A, M = y(ie(A.zone)), N = Ce ?? ee(j).firstDay, P = (e) => we(j).format(e), F = l === "range", I = me(() => ({
95
+ min: y(f),
96
+ max: y(p)
97
+ }), [f, p]), [L, R] = oe({
98
+ value: u,
99
+ defaultValue: te,
99
100
  onChange: (e, t) => {
100
- te?.(e, P ? t : {
101
+ ne?.(e, F ? t : {
101
102
  ...t,
102
- ...ie(e, k.zone)
103
+ ...ae(e, A.zone)
103
104
  });
104
105
  },
105
106
  interaction: {
@@ -107,93 +108,95 @@ function xe(o) {
107
108
  type: "valueChange",
108
109
  content: ["value"]
109
110
  }
110
- }), Ie = P ? null : v(I), L = P && I ? I : null, [R, z] = h(null), [Le, B] = h(null), Re = y(b(v(Ee) ?? Ie ?? v(L?.start) ?? j, F)), [ze, V] = r({
111
- value: Te,
112
- defaultValue: Re,
113
- onChange: De
114
- }), H = v(ze) ?? j, [U, Be] = h("day"), W = oe("calendar"), [G, Ve] = h(() => w(H)), K = G;
115
- (w(H) < G || w(H) > G + T - 1) && (K = w(H) < G ? w(H) : w(H) - T + 1, Ve(K));
116
- let He = pe(null), q = pe(ke), Ue = i("calendar");
117
- de(() => {
118
- q.current && (q.current = !1, He.current?.querySelector(`[${be}="${ze}"]`)?.focus());
111
+ }), Le = F ? null : y(L), z = F && L ? L : null, [B, V] = g(null), [Re, H] = g(null), ze = b(x(y(Oe) ?? Le ?? y(z?.start) ?? M, I)), [Be, U] = a({
112
+ value: De,
113
+ defaultValue: ze,
114
+ onChange: ke
115
+ }), W = y(Be) ?? M, [G, Ve] = g("day"), K = se("calendar"), [q, He] = g(() => T(W)), J = q;
116
+ (T(W) < q || T(W) > q + E - 1) && (J = T(W) < q ? T(W) : T(W) - E + 1, He(J));
117
+ let Ue = he(null), We = fe((e) => {
118
+ Ue.current = e, t(c, e);
119
+ }, [c]), Y = he(je), Ge = o("calendar");
120
+ pe(() => {
121
+ Y.current && (Y.current = !1, Ue.current?.querySelector(`[${Se}="${Be}"]`)?.focus());
119
122
  });
120
- let We = (e) => _e(e, F), Ge = (e) => m?.(y(e)) ?? !1, J = (e, t, n) => {
121
- q.current = n, V(y(b(e, F)), { reason: t });
122
- }, Ke = (e, t) => {
123
- if (O || Oe || We(e) || Ge(e)) return;
124
- if (J(e, "select", !1), !P) {
125
- Fe(y(e), {
123
+ let Ke = (e) => ye(e, I), qe = (e) => h?.(b(e)) ?? !1, X = (e, t, n) => {
124
+ Y.current = n, U(b(x(e, I)), { reason: t });
125
+ }, Je = (e, t) => {
126
+ if (k || Ae || Ke(e) || qe(e)) return;
127
+ if (X(e, "select", !1), !F) {
128
+ R(b(e), {
126
129
  reason: "select",
127
130
  event: t
128
131
  });
129
132
  return;
130
133
  }
131
- if (!R) {
132
- z(e), B(e);
134
+ if (!B) {
135
+ V(e), H(e);
133
136
  return;
134
137
  }
135
- let [n, r] = x(R, e);
136
- z(null), B(null), !(m && ye(n, r, m)) && Fe({
137
- start: y(n),
138
- end: y(r)
138
+ let [n, r] = S(B, e);
139
+ V(null), H(null), !(h && xe(n, r, h)) && R({
140
+ start: b(n),
141
+ end: b(r)
139
142
  }, {
140
143
  reason: "select",
141
144
  event: t
142
145
  });
143
- }, qe = n((t) => {
144
- if (O) return;
145
- if (t.key === "Enter" || t.key === " ") {
146
- t.preventDefault(), Ke(H, t);
146
+ }, Ye = i((e) => {
147
+ if (k) return;
148
+ if (e.key === "Enter" || e.key === " ") {
149
+ e.preventDefault(), Je(W, e);
147
150
  return;
148
151
  }
149
- if (t.key === "Escape" && R) {
150
- t.preventDefault(), t.stopPropagation(), z(null), B(null);
152
+ if (e.key === "Escape" && B) {
153
+ e.preventDefault(), e.stopPropagation(), V(null), H(null);
151
154
  return;
152
155
  }
153
- let n = ge(H, t.key, t.shiftKey, {
154
- rtl: e(t.currentTarget),
155
- firstDay: M
156
+ let t = ve(W, e.key, e.shiftKey, {
157
+ rtl: n(e.currentTarget),
158
+ firstDay: N
156
159
  });
157
- n && (t.preventDefault(), J(n, "keyboard", !0), R && B(b(n, F)));
158
- }), Je = (e) => {
159
- let t = u(H, e * (U === "day" ? T : U === "month" ? 12 : 144));
160
- U === "day" && Ve(K + e * T), J(t, "navigate", !1), W("pageChange", y(t), {
160
+ t && (e.preventDefault(), X(t, "keyboard", !0), B && H(x(t, I)));
161
+ }), Xe = (e) => {
162
+ let t = d(W, e * (G === "day" ? E : G === "month" ? 12 : 144));
163
+ G === "day" && He(J + e * E), X(t, "navigate", !1), K("pageChange", b(t), {
161
164
  reason: e === 1 ? "next" : "previous",
162
165
  content: ["value"]
163
166
  });
164
- }, Y = Array.from({ length: T }, (e, t) => ({
165
- year: Math.floor((K + t) / 12),
166
- month: (K + t) % 12 + 1,
167
+ }, Z = Array.from({ length: E }, (e, t) => ({
168
+ year: Math.floor((J + t) / 12),
169
+ month: (J + t) % 12 + 1,
167
170
  day: 1
168
- })), X = `${Ue}-title`, Ye = U === "day" && T > 1, Xe = U === "day" ? Y.map((e) => p(y(e), {
169
- locale: A,
171
+ })), Q = `${Ge}-title`, Ze = G === "day" && E > 1, Qe = G === "day" ? Z.map((e) => m(b(e), {
172
+ locale: j,
170
173
  month: "long",
171
174
  year: "numeric"
172
- })).join(" – ") : U === "month" ? N(H.year) : `${N(E(H.year))} – ${N(E(H.year) + S - 1)}`, Z = a(A, "short"), Ze = Z.some((e) => e.length > 4) ? a(A, "narrow") : Z, Qe = a(A, "long"), $e = Array.from({ length: 7 }, (e, t) => (M + t) % 7), et = R ? Le ?? R : null, Q = R ?? v(L?.start), $ = R ? et : v(L?.end), tt = (e) => {
173
- let n = v(e.date), r = We(n), i = Ge(n), a = P ? ve(n, Q, $) : null, o = P ? a !== null : C(n, Ie), s = C(n, j), c = C(n, H);
174
- return e.outside && (!we || T > 1) ? /* @__PURE__ */ g(t, {
175
+ })).join(" – ") : G === "month" ? P(W.year) : `${P(D(W.year))} – ${P(D(W.year) + C - 1)}`, $e = s(j, "short"), et = $e.some((e) => e.length > 4) ? s(j, "narrow") : $e, tt = s(j, "long"), nt = Array.from({ length: 7 }, (e, t) => (N + t) % 7), rt = B ? Re ?? B : null, it = B ?? y(z?.start), $ = B ? rt : y(z?.end), at = (e) => {
176
+ let t = y(e.date), n = Ke(t), i = qe(t), a = F ? be(t, it, $) : null, o = F ? a !== null : w(t, Le), s = w(t, M), c = w(t, W);
177
+ return e.outside && (!Ee || E > 1) ? /* @__PURE__ */ _(r, {
175
178
  tag: "td",
176
179
  component: "calendar.cell",
177
180
  display: "table-cell",
178
181
  props: { role: "gridcell" }
179
- }, e.date) : /* @__PURE__ */ g(t, {
182
+ }, e.date) : /* @__PURE__ */ _(r, {
180
183
  tag: "td",
181
184
  component: "calendar.cell",
182
185
  display: "table-cell",
183
186
  p: 0,
184
187
  py: .5,
185
188
  variant: {
186
- rangeStart: a === "start" && $ !== null && !C(Q, $),
189
+ rangeStart: a === "start" && $ !== null && !w(it, $),
187
190
  rangeEnd: a === "end",
188
191
  rangeMiddle: a === "middle"
189
192
  },
190
193
  props: {
191
194
  role: "gridcell",
192
195
  "aria-selected": o || void 0,
193
- "aria-disabled": r || O || void 0,
196
+ "aria-disabled": n || k || void 0,
194
197
  "aria-current": s ? "date" : void 0
195
198
  },
196
- children: /* @__PURE__ */ g(t, {
199
+ children: /* @__PURE__ */ _(r, {
197
200
  component: "calendar.day",
198
201
  display: "flex",
199
202
  ai: "center",
@@ -208,69 +211,69 @@ function xe(o) {
208
211
  today: s,
209
212
  selected: o && a !== "middle",
210
213
  outside: e.outside,
211
- blocked: r || O,
214
+ blocked: n || k,
212
215
  unavailable: i
213
216
  },
214
217
  props: {
215
- [be]: e.date,
216
- tabIndex: c && !r && !O ? 0 : -1,
217
- "aria-label": p(e.date, {
218
- locale: A,
218
+ [Se]: e.date,
219
+ tabIndex: c && !n && !k ? 0 : -1,
220
+ "aria-label": m(e.date, {
221
+ locale: j,
219
222
  dateStyle: "full"
220
223
  }),
221
- onClick: (e) => Ke(n, e),
222
- onPointerEnter: () => R && B(n)
224
+ onClick: (e) => Je(t, e),
225
+ onPointerEnter: () => B && H(t)
223
226
  },
224
- children: N(e.day)
227
+ children: P(e.day)
225
228
  })
226
229
  }, e.date);
227
- }, nt = (t, n, r, i, a, o) => {
228
- let s = e(t.currentTarget), c = {
230
+ }, ot = (e, t, r, i, a, o) => {
231
+ let s = n(e.currentTarget), c = {
229
232
  ArrowUp: -r,
230
233
  ArrowDown: r,
231
234
  [s ? "ArrowRight" : "ArrowLeft"]: -1,
232
235
  [s ? "ArrowLeft" : "ArrowRight"]: 1
233
236
  };
234
- t.key === "Enter" || t.key === " " ? (t.preventDefault(), i(o)) : t.key in c && (t.preventDefault(), a(Math.max(0, Math.min(n - 1, o + c[t.key])), t.currentTarget.parentElement));
235
- }, rt = () => {
236
- let e = ne(A, "short"), n = E(H.year), r = U === "month" ? e.map((e, t) => ({
237
+ e.key === "Enter" || e.key === " " ? (e.preventDefault(), i(o)) : e.key in c && (e.preventDefault(), a(Math.max(0, Math.min(t - 1, o + c[e.key])), e.currentTarget.parentElement));
238
+ }, st = () => {
239
+ let e = re(j, "short"), t = D(W.year), n = G === "month" ? e.map((e, t) => ({
237
240
  label: e,
238
- active: t + 1 === H.month,
239
- current: j.year === H.year && j.month === t + 1
240
- })) : Array.from({ length: S }, (e, t) => ({
241
- label: N(n + t),
242
- active: n + t === H.year,
243
- current: j.year === n + t
244
- })), i = (e) => U === "month" ? {
245
- ...H,
241
+ active: t + 1 === W.month,
242
+ current: M.year === W.year && M.month === t + 1
243
+ })) : Array.from({ length: C }, (e, n) => ({
244
+ label: P(t + n),
245
+ active: t + n === W.year,
246
+ current: M.year === t + n
247
+ })), i = (e) => G === "month" ? {
248
+ ...W,
246
249
  month: e + 1,
247
250
  day: 1
248
251
  } : {
249
- ...H,
250
- year: n + e,
252
+ ...W,
253
+ year: t + e,
251
254
  day: 1
252
255
  }, a = (e) => {
253
256
  let t = i(e);
254
- q.current = !0, V(y(b({
257
+ Y.current = !0, U(b(x({
255
258
  ...t,
256
- day: Math.min(H.day, 28)
257
- }, F)), { reason: "navigate" }), Be(U === "year" ? "month" : "day"), W("viewChange", U === "year" ? "month" : "day", { reason: "zoom-in" });
259
+ day: Math.min(W.day, 28)
260
+ }, I)), { reason: "navigate" }), Ve(G === "year" ? "month" : "day"), K("viewChange", G === "year" ? "month" : "day", { reason: "zoom-in" });
258
261
  }, o = (e, t) => {
259
262
  let n = i(e);
260
- V(y({
263
+ U(b({
261
264
  ...n,
262
- day: Math.min(H.day, 28)
265
+ day: Math.min(W.day, 28)
263
266
  }), { reason: "keyboard" }), t?.querySelector(`[data-zoom="${e}"]`)?.focus();
264
267
  };
265
- return /* @__PURE__ */ g(t, {
268
+ return /* @__PURE__ */ _(r, {
266
269
  display: "grid",
267
270
  gridTemplateColumns: 3,
268
271
  gap: 1,
269
272
  props: {
270
273
  role: "group",
271
- "aria-labelledby": X
274
+ "aria-labelledby": Q
272
275
  },
273
- children: r.map((e, n) => /* @__PURE__ */ g(t, {
276
+ children: n.map((e, t) => /* @__PURE__ */ _(r, {
274
277
  tag: "button",
275
278
  component: "calendar.zoomItem",
276
279
  variant: {
@@ -279,25 +282,25 @@ function xe(o) {
279
282
  },
280
283
  py: 2,
281
284
  borderRadius: 2,
282
- disabled: O,
285
+ disabled: k,
283
286
  props: {
284
287
  type: "button",
285
- "data-zoom": n,
288
+ "data-zoom": t,
286
289
  tabIndex: e.active ? 0 : -1,
287
290
  "aria-pressed": e.active,
288
- onClick: () => a(n),
289
- onKeyDown: (e) => nt(e, r.length, 3, a, o, n)
291
+ onClick: () => a(t),
292
+ onKeyDown: (e) => ot(e, n.length, 3, a, o, t)
290
293
  },
291
294
  children: e.label
292
295
  }, e.label))
293
296
  });
294
- }, it = (e, n) => {
295
- let r = he(e.year, e.month, M), i = p(y(e), {
296
- locale: A,
297
+ }, ct = (e, t) => {
298
+ let n = _e(e.year, e.month, N), i = m(b(e), {
299
+ locale: j,
297
300
  month: "long",
298
301
  year: "numeric"
299
302
  });
300
- return /* @__PURE__ */ _(t, {
303
+ return /* @__PURE__ */ v(r, {
301
304
  tag: "table",
302
305
  css: {
303
306
  borderCollapse: "collapse",
@@ -305,23 +308,23 @@ function xe(o) {
305
308
  },
306
309
  props: {
307
310
  role: "grid",
308
- "aria-label": T > 1 ? i : void 0,
309
- "aria-labelledby": T > 1 ? void 0 : X,
310
- "aria-readonly": Oe || void 0,
311
- onKeyDown: qe
311
+ "aria-label": E > 1 ? i : void 0,
312
+ "aria-labelledby": E > 1 ? void 0 : Q,
313
+ "aria-readonly": Ae || void 0,
314
+ onKeyDown: Ye
312
315
  },
313
- children: [/* @__PURE__ */ g(t, {
316
+ children: [/* @__PURE__ */ _(r, {
314
317
  tag: "thead",
315
318
  display: "table-header-group",
316
- children: /* @__PURE__ */ _(t, {
319
+ children: /* @__PURE__ */ v(r, {
317
320
  tag: "tr",
318
321
  display: "table-row",
319
- children: [D && /* @__PURE__ */ g(t, {
322
+ children: [O && /* @__PURE__ */ _(r, {
320
323
  tag: "th",
321
324
  display: "table-cell",
322
325
  component: "calendar.weekday",
323
326
  props: { "aria-hidden": !0 }
324
- }), $e.map((e) => /* @__PURE__ */ g(t, {
327
+ }), nt.map((e) => /* @__PURE__ */ _(r, {
325
328
  tag: "th",
326
329
  display: "table-cell",
327
330
  component: "calendar.weekday",
@@ -329,48 +332,48 @@ function xe(o) {
329
332
  fontSize: 12,
330
333
  props: {
331
334
  scope: "col",
332
- abbr: Qe[e]
335
+ abbr: tt[e]
333
336
  },
334
- children: Ze[e]
337
+ children: et[e]
335
338
  }, e))]
336
339
  })
337
- }), /* @__PURE__ */ g(t, {
340
+ }), /* @__PURE__ */ _(r, {
338
341
  tag: "tbody",
339
342
  display: "table-row-group",
340
- children: r.map((e) => /* @__PURE__ */ _(t, {
343
+ children: n.map((e) => /* @__PURE__ */ v(r, {
341
344
  tag: "tr",
342
345
  display: "table-row",
343
- children: [D && /* @__PURE__ */ g(t, {
346
+ children: [O && /* @__PURE__ */ _(r, {
344
347
  tag: "td",
345
348
  display: "table-cell",
346
349
  component: "calendar.weekNumber",
347
350
  fontSize: 11,
348
351
  textAlign: "center",
349
352
  props: { role: "rowheader" },
350
- children: N(e.week)
351
- }), e.days.map(tt)]
353
+ children: P(e.week)
354
+ }), e.days.map(at)]
352
355
  }, e.days[0].date))
353
356
  })]
354
- }, n);
357
+ }, t);
355
358
  };
356
- return /* @__PURE__ */ _(t, {
357
- ref: He,
359
+ return /* @__PURE__ */ v(r, {
360
+ ref: We,
358
361
  component: "calendar",
359
362
  display: "inline-block",
360
- ...Pe,
361
- variant: [Pe.variant, { disabled: O }],
363
+ ...Ie,
364
+ variant: [Ie.variant, { disabled: k }],
362
365
  props: {
363
- role: Ae ? "group" : void 0,
364
- "aria-label": Ae,
365
- ...Ne,
366
- onPointerLeave: () => R && B(R)
366
+ role: Me ? "group" : void 0,
367
+ "aria-label": Me,
368
+ ...Fe,
369
+ onPointerLeave: () => B && H(B)
367
370
  },
368
- children: [/* @__PURE__ */ _(t, {
371
+ children: [/* @__PURE__ */ v(r, {
369
372
  position: "relative",
370
373
  minHeight: 8,
371
374
  mb: 2,
372
375
  children: [
373
- /* @__PURE__ */ g(t, {
376
+ /* @__PURE__ */ _(r, {
374
377
  tag: "button",
375
378
  component: "calendar.nav",
376
379
  position: "absolute",
@@ -382,58 +385,58 @@ function xe(o) {
382
385
  width: 8,
383
386
  height: 8,
384
387
  borderRadius: 2,
385
- disabled: O,
388
+ disabled: k,
386
389
  props: {
387
390
  type: "button",
388
- "aria-label": je,
389
- onClick: () => Je(-1)
391
+ "aria-label": Ne,
392
+ onClick: () => Xe(-1)
390
393
  },
391
- children: /* @__PURE__ */ g(Ce, { direction: -1 })
394
+ children: /* @__PURE__ */ _(Te, { direction: -1 })
392
395
  }),
393
- Ye ? /* @__PURE__ */ _(me, { children: [/* @__PURE__ */ g(t, {
396
+ Ze ? /* @__PURE__ */ v(ge, { children: [/* @__PURE__ */ _(r, {
394
397
  display: "flex",
395
398
  gap: 4,
396
- children: Y.map((e) => /* @__PURE__ */ g(t, {
399
+ children: Z.map((e) => /* @__PURE__ */ _(r, {
397
400
  flex1: !0,
398
401
  textAlign: "center",
399
402
  py: 1.5,
400
403
  fontSize: 14,
401
404
  fontWeight: 600,
402
405
  props: { "aria-hidden": !0 },
403
- children: p(y(e), {
404
- locale: A,
406
+ children: m(b(e), {
407
+ locale: j,
405
408
  month: "long",
406
409
  year: "numeric"
407
410
  })
408
- }, y(e)))
409
- }), /* @__PURE__ */ g(ue, {
410
- id: X,
411
+ }, b(e)))
412
+ }), /* @__PURE__ */ _(de, {
413
+ id: Q,
411
414
  props: { "aria-live": "polite" },
412
- children: Xe
413
- })] }) : /* @__PURE__ */ g(t, {
415
+ children: Qe
416
+ })] }) : /* @__PURE__ */ _(r, {
414
417
  display: "flex",
415
418
  jc: "center",
416
419
  px: 9,
417
- children: /* @__PURE__ */ g(t, {
420
+ children: /* @__PURE__ */ _(r, {
418
421
  tag: "button",
419
422
  component: "calendar.title",
420
423
  py: 1.5,
421
424
  px: 3,
422
425
  borderRadius: 2,
423
426
  fontSize: 14,
424
- id: X,
425
- disabled: O || U === "year",
427
+ id: Q,
428
+ disabled: k || G === "year",
426
429
  props: {
427
430
  type: "button",
428
431
  "aria-live": "polite",
429
432
  onClick: () => {
430
- Be(U === "day" ? "month" : "year"), W("viewChange", U === "day" ? "month" : "year", { reason: "zoom-out" });
433
+ Ve(G === "day" ? "month" : "year"), K("viewChange", G === "day" ? "month" : "year", { reason: "zoom-out" });
431
434
  }
432
435
  },
433
- children: Xe
436
+ children: Qe
434
437
  })
435
438
  }),
436
- /* @__PURE__ */ g(t, {
439
+ /* @__PURE__ */ _(r, {
437
440
  tag: "button",
438
441
  component: "calendar.nav",
439
442
  position: "absolute",
@@ -445,42 +448,42 @@ function xe(o) {
445
448
  width: 8,
446
449
  height: 8,
447
450
  borderRadius: 2,
448
- disabled: O,
451
+ disabled: k,
449
452
  props: {
450
453
  type: "button",
451
- "aria-label": Me,
452
- onClick: () => Je(1)
454
+ "aria-label": Pe,
455
+ onClick: () => Xe(1)
453
456
  },
454
- children: /* @__PURE__ */ g(Ce, { direction: 1 })
457
+ children: /* @__PURE__ */ _(Te, { direction: 1 })
455
458
  })
456
459
  ]
457
- }), U === "day" ? /* @__PURE__ */ g(t, {
460
+ }), G === "day" ? /* @__PURE__ */ _(r, {
458
461
  display: "flex",
459
462
  gap: 4,
460
463
  ai: "start",
461
- children: Y.map(it)
462
- }) : rt()]
464
+ children: Z.map(ct)
465
+ }) : st()]
463
466
  });
464
467
  }
465
- function w(e) {
468
+ function T(e) {
466
469
  return e.year * 12 + e.month - 1;
467
470
  }
468
- var T = /* @__PURE__ */ new Map();
469
- function Se(e) {
470
- let t = T.get(e);
471
- return t || (t = new Intl.NumberFormat(e, { useGrouping: !1 }), T.set(e, t)), t;
471
+ var E = /* @__PURE__ */ new Map();
472
+ function we(e) {
473
+ let t = E.get(e);
474
+ return t || (t = new Intl.NumberFormat(e, { useGrouping: !1 }), E.set(e, t)), t;
472
475
  }
473
- function E(e) {
474
- return e - (e % S + S) % S;
476
+ function D(e) {
477
+ return e - (e % C + C) % C;
475
478
  }
476
- function Ce({ direction: e }) {
477
- return /* @__PURE__ */ g(ce, {
479
+ function Te({ direction: e }) {
480
+ return /* @__PURE__ */ _(le, {
478
481
  viewBox: "0 0 16 16",
479
482
  width: "1rem",
480
483
  height: "1rem",
481
484
  rtl: { flip: "xAxis" },
482
485
  props: { fill: "none" },
483
- children: /* @__PURE__ */ g(se, {
486
+ children: /* @__PURE__ */ _(ce, {
484
487
  d: e === 1 ? "M6 3l5 5-5 5" : "M10 3L5 8l5 5",
485
488
  stroke: "currentColor",
486
489
  strokeWidth: 2,
@@ -489,7 +492,6 @@ function Ce({ direction: e }) {
489
492
  })
490
493
  });
491
494
  }
492
- var D = xe;
493
- D.displayName = "Calendar";
495
+ var O = e(Ce, "Calendar");
494
496
  //#endregion
495
- export { D as default };
497
+ export { O as default };