@box-kite/react 2.2.16 → 2.2.18

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 (76) hide show
  1. package/.claude/rules/box-kite-rules.md +3 -3
  2. package/.claude/skills/box-kite/SKILL.md +3 -3
  3. package/.claude/skills/box-kite/references/components.md +1 -1
  4. package/.claude/skills/box-kite/references/styling.md +1 -1
  5. package/.cursor/rules/box-kite.mdc +3 -3
  6. package/AGENTS.md +3 -3
  7. package/BOX_AI_CONTEXT.md +2 -2
  8. package/BOX_KITE_AI_CONTEXT.md +2 -2
  9. package/behavior.cjs +1 -1
  10. package/behavior.mjs +62 -62
  11. package/catalog.cjs +1 -1
  12. package/catalog.mjs +3 -3
  13. package/client.cjs +1 -1
  14. package/client.mjs +15 -15
  15. package/components/accordion.cjs +1 -1
  16. package/components/accordion.mjs +1 -1
  17. package/components/calendar.cjs +1 -1
  18. package/components/calendar.mjs +1 -1
  19. package/components/combobox.cjs +1 -1
  20. package/components/combobox.mjs +1 -1
  21. package/components/dashboard.cjs +1 -1
  22. package/components/dashboard.mjs +1 -1
  23. package/components/dataGrid.cjs +2 -2
  24. package/components/dataGrid.mjs +11 -11
  25. package/components/dateField.cjs +1 -1
  26. package/components/dateField.mjs +1 -1
  27. package/components/datePicker.cjs +1 -1
  28. package/components/datePicker.mjs +198 -198
  29. package/components/dialog.cjs +1 -1
  30. package/components/dialog.mjs +140 -132
  31. package/components/form.cjs +1 -1
  32. package/components/form.mjs +1 -1
  33. package/components/menu.cjs +1 -1
  34. package/components/menu.mjs +120 -119
  35. package/components/overlay.cjs +1 -1
  36. package/components/overlay.mjs +5 -4
  37. package/components/popover.cjs +1 -1
  38. package/components/popover.mjs +50 -49
  39. package/components/presence.cjs +1 -1
  40. package/components/presence.mjs +1 -1
  41. package/components/radioGroup.cjs +1 -1
  42. package/components/radioGroup.mjs +1 -1
  43. package/components/semantics.d.ts +29 -29
  44. package/components/slider.cjs +1 -1
  45. package/components/slider.mjs +1 -1
  46. package/components/sortableList.cjs +1 -1
  47. package/components/sortableList.mjs +1 -1
  48. package/components/swipeItem.cjs +1 -1
  49. package/components/swipeItem.mjs +12 -12
  50. package/components/tabs.cjs +1 -1
  51. package/components/tabs.mjs +2 -2
  52. package/components/toaster.cjs +1 -1
  53. package/components/toaster.mjs +133 -115
  54. package/components/tooltip.cjs +1 -1
  55. package/components/tooltip.mjs +1 -1
  56. package/components/virtualList.cjs +1 -1
  57. package/components/virtualList.mjs +1 -1
  58. package/docs/props.md +2 -2
  59. package/interactionListening.cjs +1 -1
  60. package/interactionListening.mjs +3 -3
  61. package/layer.cjs +1 -1
  62. package/layer.mjs +17 -14
  63. package/motion.cjs +1 -1
  64. package/motion.mjs +30 -20
  65. package/package.json +40 -40
  66. package/placement.cjs +1 -1
  67. package/placement.mjs +10 -10
  68. package/platform.cjs +1 -1
  69. package/platform.mjs +18 -11
  70. package/react/animation/useHeldContent.d.ts +6 -0
  71. package/react/animation/usePresence.d.ts +4 -0
  72. package/react-shared.cjs +1 -1
  73. package/react-shared.mjs +1 -1
  74. package/scrolling.cjs +1 -1
  75. package/scrolling.mjs +1 -1
  76. package/utils/dom/domUtils.d.ts +7 -0
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { f as e } from "../react-shared.mjs";
3
- import { l as t, m as n, p as r } from "../platform.mjs";
3
+ import { d as t, g as n, h as r } from "../platform.mjs";
4
4
  import { n as i } from "../effects.mjs";
5
5
  import a from "../box.mjs";
6
6
  import { a as o, i as s } from "../behavior.mjs";
@@ -10,10 +10,11 @@ import { t as u } from "../placement.mjs";
10
10
  import { a as d, i as f } from "../reporting.mjs";
11
11
  import { t as p } from "../layer.mjs";
12
12
  import m from "./overlay.mjs";
13
- import { createContext as h, useCallback as g, useContext as _, useMemo as v, useRef as y, useState as b } from "react";
14
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
13
+ import { t as h } from "../motion.mjs";
14
+ import { createContext as g, useCallback as _, useContext as v, useMemo as y, useRef as b, useState as x } from "react";
15
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
15
16
  //#region src/utils/menu/menuUtils.ts
16
- var w;
17
+ var T;
17
18
  (function(e) {
18
19
  let t = e.ITEM_SELECTOR = "[role=\"menuitem\"],[role=\"menuitemcheckbox\"],[role=\"menuitemradio\"]";
19
20
  function n(e, t) {
@@ -41,18 +42,18 @@ var w;
41
42
  return r < 0 ? void 0 : e[r];
42
43
  }
43
44
  e.typeaheadTarget = s;
44
- })(w ||= {});
45
- var T = w, E = h(null);
46
- function D(e) {
47
- let t = _(E);
45
+ })(T ||= {});
46
+ var E = T, D = g(null);
47
+ function O(e) {
48
+ let t = v(D);
48
49
  if (!t) throw Error(`<${e}> must be rendered inside a <Menu>.`);
49
50
  return t;
50
51
  }
51
- function O(e) {
52
- let [t, n] = b([]);
52
+ function k(e) {
53
+ let [t, n] = x([]);
53
54
  return {
54
55
  panels: t,
55
- registerLayer: g((t) => {
56
+ registerLayer: _((t) => {
56
57
  n((e) => [...e, t]);
57
58
  let r = e?.(t);
58
59
  return () => {
@@ -61,12 +62,12 @@ function O(e) {
61
62
  }, [e])
62
63
  };
63
64
  }
64
- var k = h(null);
65
- function A(e, t) {
66
- let { trigger: n, children: r, open: i, defaultOpen: a = !1, onOpenChange: s, label: c, labelledBy: l, side: u = "bottom", align: d = "start", offset: f = 1, flip: m = !0, matchWidth: h = !1, props: g, ..._ } = e, b = y("first"), w = o((e) => {
67
- let t = T.items(e), n = b.current === "last" ? t[t.length - 1] : t[0];
68
- b.current = "first", (n ?? e).focus();
69
- }), { panels: D, registerLayer: k } = O(), A = p({
65
+ var A = g(null);
66
+ function j(e, t) {
67
+ let { trigger: n, children: r, open: i, defaultOpen: a = !1, onOpenChange: s, label: c, labelledBy: l, side: u = "bottom", align: d = "start", offset: f = 1, flip: m = !0, matchWidth: h = !1, props: g, ..._ } = e, v = b("first"), x = o((e) => {
68
+ let t = E.items(e), n = v.current === "last" ? t[t.length - 1] : t[0];
69
+ v.current = "first", (n ?? e).focus();
70
+ }), { panels: T, registerLayer: O } = k(), A = p({
70
71
  haspopup: "menu",
71
72
  idPrefix: "menu",
72
73
  id: _.id,
@@ -77,31 +78,31 @@ function A(e, t) {
77
78
  component: "menu",
78
79
  type: "openChange"
79
80
  },
80
- onOpened: w,
81
- inside: D
82
- }), M = o((e) => {
83
- (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), b.current = e.key === "ArrowUp" ? "last" : "first", A.isOpen && A.panelElement ? w(A.panelElement) : A.setOpen(!0, {
81
+ onOpened: x,
82
+ inside: T
83
+ }), j = o((e) => {
84
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), v.current = e.key === "ArrowUp" ? "last" : "first", A.isOpen && A.panelElement ? x(A.panelElement) : A.setOpen(!0, {
84
85
  reason: "trigger",
85
86
  event: e
86
87
  }));
87
- }), N = v(() => ({
88
+ }), N = y(() => ({
88
89
  ref: A.trigger.ref,
89
90
  props: {
90
91
  ...A.trigger.props,
91
- onKeyDown: M
92
+ onKeyDown: j
92
93
  }
93
- }), [M, A.trigger]), P = o((e) => A.setOpen(!1, e)), F = v(() => ({
94
+ }), [j, A.trigger]), P = o((e) => A.setOpen(!1, e)), F = y(() => ({
94
95
  open: A.isOpen,
95
96
  closeAll: P,
96
- registerLayer: k
97
+ registerLayer: O
97
98
  }), [
98
99
  P,
99
100
  A.isOpen,
100
- k
101
+ O
101
102
  ]);
102
- return /* @__PURE__ */ C(x, { children: [n(N), /* @__PURE__ */ S(E.Provider, {
103
+ return /* @__PURE__ */ w(S, { children: [n(N), /* @__PURE__ */ C(D.Provider, {
103
104
  value: F,
104
- children: /* @__PURE__ */ S(j, {
105
+ children: /* @__PURE__ */ C(M, {
105
106
  layer: A,
106
107
  side: u,
107
108
  align: d,
@@ -117,104 +118,104 @@ function A(e, t) {
117
118
  })
118
119
  })] });
119
120
  }
120
- function j(e) {
121
- let { layer: r, side: i, align: s, offset: c, flip: d, matchWidth: f, label: p, labelledBy: h, contentProps: _, closeSelf: v, elementRef: b, children: x, ...C } = e, { platform: w, isOpen: E, id: O, triggerElement: k, setPanel: A } = r, j = g((e) => {
122
- A(e), t(b, e);
123
- }, [A, b]), M = D("Menu"), N = y({
121
+ function M(e) {
122
+ let { layer: r, side: i, align: s, offset: c, flip: d, matchWidth: f, label: p, labelledBy: g, contentProps: v, closeSelf: y, elementRef: x, children: S, ...w } = e, { platform: T, isOpen: D, id: k, triggerElement: A, setPanel: j } = r, M = _((e) => {
123
+ j(e), t(x, e);
124
+ }, [j, x]), N = O("Menu"), P = b({
124
125
  query: "",
125
126
  at: 0
126
- }), P = u({
127
+ }), F = u({
127
128
  side: i,
128
129
  align: s,
129
130
  offset: c,
130
131
  flip: d,
131
132
  matchWidth: f,
132
- anchor: k
133
- }), F = {
133
+ anchor: A
134
+ }), I = h(S, D, r.panelElement), L = {
134
135
  role: "menu",
135
136
  "aria-label": p,
136
- "aria-labelledby": h,
137
+ "aria-labelledby": g,
137
138
  tabIndex: -1,
138
139
  onKeyDown: o((e) => {
139
140
  let t = e.currentTarget;
140
- if (!T.owns(t, e.target)) return;
141
- let r = T.items(t), i = r.indexOf(document.activeElement), a = (t) => {
141
+ if (!E.owns(t, e.target)) return;
142
+ let r = E.items(t), i = r.indexOf(document.activeElement), a = (t) => {
142
143
  t && (e.preventDefault(), t.focus());
143
144
  }, o = n(t) ? "ArrowRight" : "ArrowLeft";
144
145
  switch (e.key) {
145
- case "ArrowDown": return a(T.step(r, i, 1));
146
- case "ArrowUp": return a(T.step(r, i, -1));
146
+ case "ArrowDown": return a(E.step(r, i, 1));
147
+ case "ArrowUp": return a(E.step(r, i, -1));
147
148
  case "Home": return a(r[0]);
148
149
  case "End": return a(r[r.length - 1]);
149
- case "Tab": return M.closeAll({
150
+ case "Tab": return N.closeAll({
150
151
  reason: "tab",
151
152
  event: e
152
153
  });
153
- case o: return v ? (e.preventDefault(), v({
154
+ case o: return y ? (e.preventDefault(), y({
154
155
  reason: "trigger",
155
156
  event: e
156
157
  })) : void 0;
157
158
  }
158
159
  if (l.isPrintable(e)) {
159
- let t = l.push(N.current, e.key, e.timeStamp);
160
- a(T.typeaheadTarget(r, t, i));
160
+ let t = l.push(P.current, e.key, e.timeStamp);
161
+ a(E.typeaheadTarget(r, t, i));
161
162
  }
162
163
  }),
163
164
  onPointerOver: o((e) => {
164
- let t = e.currentTarget, n = e.target?.closest(T.ITEM_SELECTOR);
165
- !n || !T.owns(t, n) || n === document.activeElement || n.focus();
165
+ let t = e.currentTarget, n = e.target?.closest(E.ITEM_SELECTOR);
166
+ !n || !E.owns(t, n) || n === document.activeElement || n.focus();
166
167
  }),
167
- ..._
168
+ ...v
168
169
  };
169
- return w ? /* @__PURE__ */ S(a, {
170
- ref: j,
170
+ return T ? /* @__PURE__ */ C(a, {
171
+ ref: M,
171
172
  component: "menu",
172
- ...C,
173
- variant: [C.variant, { topLayer: !0 }],
174
- ...P.layerProps,
175
- id: O,
173
+ ...w,
174
+ variant: [w.variant, { topLayer: !0 }],
175
+ ...F.layerProps,
176
+ id: k,
176
177
  props: {
177
178
  popover: "auto",
178
- ...F
179
+ ...L
179
180
  },
180
- children: x
181
- }) : E ? /* @__PURE__ */ S(m, {
182
- contentRef: j,
183
- anchor: k,
181
+ children: I
182
+ }) : D ? /* @__PURE__ */ C(m, {
183
+ contentRef: M,
184
+ anchor: A,
184
185
  side: i,
185
186
  align: s,
186
187
  offset: c,
187
188
  flip: d,
188
189
  matchWidth: f,
189
190
  component: "menu",
190
- ...C,
191
- id: O,
192
- props: F,
193
- children: x
191
+ ...w,
192
+ id: k,
193
+ props: L,
194
+ children: S
194
195
  }) : null;
195
196
  }
196
- function M(e, t) {
197
- let { label: s, children: l, disabled: u, side: d = "end", align: m = "start", offset: h = 0, flip: g = !0, itemProps: _, props: y, ...b } = e, w = D("Menu.Sub"), k = c("menu-sub"), A = o((e) => {
198
- (T.items(e)[0] ?? e).focus();
199
- }), M = o((e, t) => {
197
+ function N(e, t) {
198
+ let { label: s, children: l, disabled: u, side: d = "end", align: m = "start", offset: h = 0, flip: g = !0, itemProps: _, props: v, ...b } = e, x = O("Menu.Sub"), T = c("menu-sub"), A = o((e) => {
199
+ (E.items(e)[0] ?? e).focus();
200
+ }), j = o((e, t) => {
200
201
  e && t?.focus();
201
- }), { panels: P, registerLayer: F } = O(w.registerLayer), I = f("menu.sub"), L = p({
202
+ }), { panels: N, registerLayer: F } = k(x.registerLayer), I = f("menu.sub"), L = p({
202
203
  haspopup: "menu",
203
204
  idPrefix: "menu-sub",
204
205
  id: b.id,
205
206
  onOpened: A,
206
- onClosing: M,
207
- inside: P
207
+ onClosing: j,
208
+ inside: N
208
209
  });
209
210
  i(() => {
210
- if (!(!L.isOpen || !L.panelElement)) return w.registerLayer(L.panelElement);
211
+ if (!(!L.isOpen || !L.panelElement)) return x.registerLayer(L.panelElement);
211
212
  }, [
212
213
  L.isOpen,
213
214
  L.panelElement,
214
- w.registerLayer
215
+ x.registerLayer
215
216
  ]), i(() => {
216
- w.open || L.setOpen(!1, { reason: "imperative" });
217
- }, [w.open, L.setOpen]), i(() => {
217
+ x.open || L.setOpen(!1, { reason: "imperative" });
218
+ }, [x.open, L.setOpen]), i(() => {
218
219
  if (!L.isOpen) return;
219
220
  let e = new AbortController();
220
221
  return document.addEventListener("focusin", (e) => {
@@ -237,28 +238,28 @@ function M(e, t) {
237
238
  }), I("openChange", !0, {
238
239
  reason: "keyboard",
239
240
  event: e,
240
- item: N(s)
241
+ item: P(s)
241
242
  }));
242
243
  }), z = o((e) => {
243
244
  u || L.setOpen(!0, {
244
245
  reason: "trigger",
245
246
  event: e
246
247
  });
247
- }), B = v(() => ({
248
+ }), B = y(() => ({
248
249
  open: L.isOpen,
249
- closeAll: w.closeAll,
250
+ closeAll: x.closeAll,
250
251
  registerLayer: F
251
252
  }), [
252
253
  L.isOpen,
253
- w.closeAll,
254
+ x.closeAll,
254
255
  F
255
256
  ]);
256
- return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(a, {
257
+ return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(a, {
257
258
  tag: "button",
258
259
  ref: u ? void 0 : L.trigger.ref,
259
260
  component: "menu.item",
260
261
  variant: { sub: !0 },
261
- id: k,
262
+ id: T,
262
263
  props: {
263
264
  type: "button",
264
265
  role: "menuitem",
@@ -269,18 +270,18 @@ function M(e, t) {
269
270
  onKeyDown: R,
270
271
  onPointerEnter: z
271
272
  },
272
- children: [s, /* @__PURE__ */ S(a, { component: "menu.arrow" })]
273
- }), !u && /* @__PURE__ */ S(E.Provider, {
273
+ children: [s, /* @__PURE__ */ C(a, { component: "menu.arrow" })]
274
+ }), !u && /* @__PURE__ */ C(D.Provider, {
274
275
  value: B,
275
- children: /* @__PURE__ */ S(j, {
276
+ children: /* @__PURE__ */ C(M, {
276
277
  layer: L,
277
278
  side: d,
278
279
  align: m,
279
280
  offset: h,
280
281
  flip: g,
281
282
  matchWidth: !1,
282
- labelledBy: k,
283
- contentProps: y,
283
+ labelledBy: T,
284
+ contentProps: v,
284
285
  closeSelf: (e) => L.setOpen(!1, e),
285
286
  ...b,
286
287
  elementRef: t,
@@ -288,10 +289,10 @@ function M(e, t) {
288
289
  })
289
290
  })] });
290
291
  }
291
- var N = (e, t) => t ?? (typeof e == "string" ? e : void 0);
292
- function P(e) {
293
- let { onSelect: t, disabled: n, closeOnSelect: r = !0, value: i, props: s, children: c, ...l } = e, u = D("Menu.Item"), d = f("menu.item"), p = o((e) => {
294
- n || (t?.(e), d("select", N(c, i), {
292
+ var P = (e, t) => t ?? (typeof e == "string" ? e : void 0);
293
+ function F(e) {
294
+ let { onSelect: t, disabled: n, closeOnSelect: r = !0, value: i, props: s, children: c, ...l } = e, u = O("Menu.Item"), d = f("menu.item"), p = o((e) => {
295
+ n || (t?.(e), d("select", P(c, i), {
295
296
  reason: "select",
296
297
  event: e
297
298
  }), r && u.closeAll({
@@ -299,7 +300,7 @@ function P(e) {
299
300
  event: e
300
301
  }));
301
302
  });
302
- return /* @__PURE__ */ S(a, {
303
+ return /* @__PURE__ */ C(a, {
303
304
  tag: "button",
304
305
  component: "menu.item",
305
306
  ...l,
@@ -314,8 +315,8 @@ function P(e) {
314
315
  children: c
315
316
  });
316
317
  }
317
- function F(e) {
318
- let { checked: t, defaultChecked: n = !1, onCheckedChange: r, disabled: i, closeOnSelect: c = !1, value: l, props: u, children: d, ...p } = e, m = D("Menu.CheckboxItem"), [h, g] = s({
318
+ function I(e) {
319
+ let { checked: t, defaultChecked: n = !1, onCheckedChange: r, disabled: i, closeOnSelect: c = !1, value: l, props: u, children: d, ...p } = e, m = O("Menu.CheckboxItem"), [h, g] = s({
319
320
  value: t,
320
321
  defaultValue: n,
321
322
  onChange: r
@@ -326,13 +327,13 @@ function F(e) {
326
327
  }), _("checkedChange", !h, {
327
328
  reason: "select",
328
329
  event: e,
329
- item: N(d, l)
330
+ item: P(d, l)
330
331
  }), c && m.closeAll({
331
332
  reason: "select",
332
333
  event: e
333
334
  }));
334
335
  });
335
- return /* @__PURE__ */ C(a, {
336
+ return /* @__PURE__ */ w(a, {
336
337
  tag: "button",
337
338
  component: "menu.item",
338
339
  ...p,
@@ -345,13 +346,13 @@ function F(e) {
345
346
  ...u,
346
347
  onClick: v
347
348
  },
348
- children: [/* @__PURE__ */ S(a, {
349
+ children: [/* @__PURE__ */ C(a, {
349
350
  component: "menu.indicator",
350
- children: h && /* @__PURE__ */ S(a, { component: "menu.check" })
351
+ children: h && /* @__PURE__ */ C(a, { component: "menu.check" })
351
352
  }), d]
352
353
  });
353
354
  }
354
- function I(e) {
355
+ function L(e) {
355
356
  let { label: t, value: n, defaultValue: r = "", onValueChange: i, children: a, ...s } = e, [c, l] = d({
356
357
  value: n,
357
358
  defaultValue: r,
@@ -363,21 +364,21 @@ function I(e) {
363
364
  }), u = o((e, t) => l(e, {
364
365
  reason: "select",
365
366
  event: t
366
- })), f = v(() => ({
367
+ })), f = y(() => ({
367
368
  value: c,
368
369
  select: u
369
370
  }), [c, u]);
370
- return /* @__PURE__ */ S(k.Provider, {
371
+ return /* @__PURE__ */ C(A.Provider, {
371
372
  value: f,
372
- children: /* @__PURE__ */ S(R, {
373
+ children: /* @__PURE__ */ C(z, {
373
374
  label: t,
374
375
  ...s,
375
376
  children: a
376
377
  })
377
378
  });
378
379
  }
379
- function L(e) {
380
- let { value: t, disabled: n, closeOnSelect: r = !1, props: i, children: s, ...c } = e, l = D("Menu.RadioItem"), u = _(k);
380
+ function R(e) {
381
+ let { value: t, disabled: n, closeOnSelect: r = !1, props: i, children: s, ...c } = e, l = O("Menu.RadioItem"), u = v(A);
381
382
  if (!u) throw Error("<Menu.RadioItem> must be rendered inside a <Menu.RadioGroup>.");
382
383
  let d = u.value === t, f = o((e) => {
383
384
  n || (u.select(t, e), r && l.closeAll({
@@ -385,7 +386,7 @@ function L(e) {
385
386
  event: e
386
387
  }));
387
388
  });
388
- return /* @__PURE__ */ C(a, {
389
+ return /* @__PURE__ */ w(a, {
389
390
  tag: "button",
390
391
  component: "menu.item",
391
392
  ...c,
@@ -398,15 +399,15 @@ function L(e) {
398
399
  ...i,
399
400
  onClick: f
400
401
  },
401
- children: [/* @__PURE__ */ S(a, {
402
+ children: [/* @__PURE__ */ C(a, {
402
403
  component: "menu.indicator",
403
- children: d && /* @__PURE__ */ S(a, { component: "menu.dot" })
404
+ children: d && /* @__PURE__ */ C(a, { component: "menu.dot" })
404
405
  }), s]
405
406
  });
406
407
  }
407
- function R(e) {
408
+ function z(e) {
408
409
  let { label: t, props: n, children: r, ...i } = e, o = c("menu-group");
409
- return /* @__PURE__ */ C(a, {
410
+ return /* @__PURE__ */ w(a, {
410
411
  component: "menu.group",
411
412
  ...i,
412
413
  props: {
@@ -414,7 +415,7 @@ function R(e) {
414
415
  "aria-labelledby": t ? o : void 0,
415
416
  ...n
416
417
  },
417
- children: [t && /* @__PURE__ */ S(a, {
418
+ children: [t && /* @__PURE__ */ C(a, {
418
419
  component: "menu.label",
419
420
  id: o,
420
421
  props: { role: "presentation" },
@@ -422,9 +423,9 @@ function R(e) {
422
423
  }), r]
423
424
  });
424
425
  }
425
- function z(e) {
426
+ function B(e) {
426
427
  let { props: t, ...n } = e;
427
- return /* @__PURE__ */ S(a, {
428
+ return /* @__PURE__ */ C(a, {
428
429
  component: "menu.separator",
429
430
  ...n,
430
431
  props: {
@@ -433,15 +434,15 @@ function z(e) {
433
434
  }
434
435
  });
435
436
  }
436
- P.displayName = "Menu.Item", F.displayName = "Menu.CheckboxItem", I.displayName = "Menu.RadioGroup", L.displayName = "Menu.RadioItem", R.displayName = "Menu.Group", z.displayName = "Menu.Separator";
437
- var B = Object.assign(e(A, "Menu"), {
438
- Item: P,
439
- CheckboxItem: F,
440
- RadioGroup: I,
441
- RadioItem: L,
442
- Group: R,
443
- Separator: z,
444
- Sub: e(M, "Menu.Sub")
437
+ F.displayName = "Menu.Item", I.displayName = "Menu.CheckboxItem", L.displayName = "Menu.RadioGroup", R.displayName = "Menu.RadioItem", z.displayName = "Menu.Group", B.displayName = "Menu.Separator";
438
+ var V = Object.assign(e(j, "Menu"), {
439
+ Item: F,
440
+ CheckboxItem: I,
441
+ RadioGroup: L,
442
+ RadioItem: R,
443
+ Group: z,
444
+ Separator: B,
445
+ Sub: e(N, "Menu.Sub")
445
446
  });
446
447
  //#endregion
447
- export { B as default };
448
+ export { V as default };
@@ -1 +1 @@
1
- "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../platform.cjs"),t=require("../client.cjs"),n=require("../effects.cjs"),r=require("../box.cjs"),i=require("../placement.cjs"),a=require("../layer.cjs");let o=require("react"),s=require("react/jsx-runtime"),c=require("react-dom");function l(l,u){let{side:d=`bottom`,align:f=`center`,offset:p=0,flip:m=!0,onSideChange:h,anchor:g,contentRef:_,matchWidth:v=!0,...y}=l,[b,x]=(0,o.useState)(null),[S,C]=(0,o.useState)(!1),w=(0,o.useRef)(null),T=a.n(),E=(0,o.useRef)(null),D=t.t(!T),O=i.t({side:d,align:f,offset:p,flip:m,matchWidth:v,anchor:g??b,trackSide:!!h});n.n(()=>{let t=E.current;!T||!e.c()||!t||!t.isConnected||t.matches(`:popover-open`)||t.showPopover()}),n.n(()=>{if(T)return;let t=e.f(g)??b;C(!!t&&e.m(t))},[g,b,T]),n.n(()=>{w.current!==O.side&&(w.current=O.side,h?.(O.side))});let k=O.layerProps.ref,A=(0,o.useCallback)(t=>{k?.(t),E.current=t,e.l(u,t)},[k,u]),j=(0,s.jsx)(r.default,{...O.layerProps,ref:A,transition:`none`,props:T?{popover:`manual`}:{dir:S?`rtl`:`ltr`},children:(0,s.jsx)(r.default,{ref:_,...y})});return(0,s.jsxs)(s.Fragment,{children:[!g&&(0,s.jsx)(r.default,{ref:x}),T?j:D&&(0,c.createPortal)(j,D)]})}var u=(0,o.forwardRef)(l);u.displayName=`Overlay`,exports.default=u;
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../platform.cjs"),t=require("../client.cjs"),n=require("../effects.cjs"),r=require("../box.cjs"),i=require("../placement.cjs"),a=require("../layer.cjs");let o=require("react"),s=require("react/jsx-runtime"),c=require("react-dom");function l(l,u){let{side:d=`bottom`,align:f=`center`,offset:p=0,flip:m=!0,onSideChange:h,anchor:g,contentRef:_,matchWidth:v=!0,...y}=l,[b,x]=(0,o.useState)(null),[S,C]=(0,o.useState)(!1),w=(0,o.useRef)(null),T=a.n(),E=(0,o.useRef)(null),D=t.t(!T),O=i.t({side:d,align:f,offset:p,flip:m,matchWidth:v,anchor:g??b,trackSide:!!h});n.n(()=>{let t=E.current;!T||!e.c()||!t||!t.isConnected||t.matches(`:popover-open`)||t.showPopover()}),n.n(()=>{if(T)return;let t=e.m(g)??b;C(!!t&&e.g(t))},[g,b,T]),n.n(()=>{w.current!==O.side&&(w.current=O.side,h?.(O.side))});let k=O.layerProps.ref,A=(0,o.useCallback)(t=>{k?.(t),E.current=t,e.d(u,t)},[k,u]),j=(0,s.jsx)(r.default,{...O.layerProps,ref:A,transition:`none`,overflow:`visible`,props:T?{popover:`manual`}:{dir:S?`rtl`:`ltr`},children:(0,s.jsx)(r.default,{ref:_,...y})});return(0,s.jsxs)(s.Fragment,{children:[!g&&(0,s.jsx)(r.default,{ref:x}),T?j:D&&(0,c.createPortal)(j,D)]})}var u=(0,o.forwardRef)(l);u.displayName=`Overlay`,exports.default=u;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { c as e, f as t, l as n, m as r } from "../platform.mjs";
2
+ import { c as e, d as t, g as n, m as r } from "../platform.mjs";
3
3
  import { t as i } from "../client.mjs";
4
4
  import { n as a } from "../effects.mjs";
5
5
  import o from "../box.mjs";
@@ -24,8 +24,8 @@ function _(l, _) {
24
24
  !M || !e() || !t || !t.isConnected || t.matches(":popover-open") || t.showPopover();
25
25
  }), a(() => {
26
26
  if (M) return;
27
- let e = t(C) ?? D;
28
- A(!!e && r(e));
27
+ let e = r(C) ?? D;
28
+ A(!!e && n(e));
29
29
  }, [
30
30
  C,
31
31
  D,
@@ -34,11 +34,12 @@ function _(l, _) {
34
34
  j.current !== F.side && (j.current = F.side, S?.(F.side));
35
35
  });
36
36
  let I = F.layerProps.ref, L = u((e) => {
37
- I?.(e), N.current = e, n(_, e);
37
+ I?.(e), N.current = e, t(_, e);
38
38
  }, [I, _]), R = /* @__PURE__ */ m(o, {
39
39
  ...F.layerProps,
40
40
  ref: L,
41
41
  transition: "none",
42
+ overflow: "visible",
42
43
  props: M ? { popover: "manual" } : { dir: k ? "rtl" : "ltr" },
43
44
  children: /* @__PURE__ */ m(o, {
44
45
  ref: w,
@@ -1 +1 @@
1
- "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../react-shared.cjs"),t=require("../platform.cjs"),n=require("../box.cjs"),r=require("../behavior.cjs"),i=require("../placement.cjs"),a=require("../layer.cjs"),o=require("./overlay.cjs");let s=require("react"),c=require("react/jsx-runtime");function l(e,l){let{trigger:u,children:d,open:f,defaultOpen:p=!1,onOpenChange:m,label:h,labelledBy:g,side:_=`bottom`,align:v=`center`,offset:y=2,flip:b=!0,matchWidth:x=!1,autoFocus:S=!0,props:C,...w}=e,T=r.a(e=>{!S||e.contains(document.activeElement)||e.focus()}),{platform:E,isOpen:D,id:O,trigger:k,triggerElement:A,setPanel:j}=a.t({haspopup:`dialog`,idPrefix:`popover`,id:w.id,interaction:{component:`popover`,type:`openChange`},open:f,defaultOpen:p,onOpenChange:m,onOpened:T}),M=i.t({side:_,align:v,offset:y,flip:b,matchWidth:x,anchor:A}),N=(0,s.useCallback)(e=>{j(e),t.l(l,e)},[j,l]),P={"aria-label":h,"aria-labelledby":g},F=w;return E?(0,c.jsxs)(c.Fragment,{children:[u(k),(0,c.jsx)(n.default,{ref:N,component:`popover`,...F,variant:[F.variant,{topLayer:!0}],...M.layerProps,id:O,props:{popover:`auto`,role:`dialog`,...P,tabIndex:-1,...C},children:d})]}):(0,c.jsxs)(c.Fragment,{children:[u(k),D&&(0,c.jsx)(o.default,{contentRef:N,anchor:A,side:_,align:v,offset:y,flip:b,matchWidth:x,component:`popover`,...F,id:O,props:{role:`dialog`,...P,tabIndex:-1,...C},children:d})]})}var u=e.f(l,`Popover`);exports.default=u;
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../react-shared.cjs"),t=require("../platform.cjs"),n=require("../box.cjs"),r=require("../behavior.cjs"),i=require("../placement.cjs"),a=require("../layer.cjs"),o=require("./overlay.cjs"),s=require("../motion.cjs");let c=require("react"),l=require("react/jsx-runtime");function u(e,u){let{trigger:d,children:f,open:p,defaultOpen:m=!1,onOpenChange:h,label:g,labelledBy:_,side:v=`bottom`,align:y=`center`,offset:b=2,flip:x=!0,matchWidth:S=!1,autoFocus:C=!0,props:w,...T}=e,E=r.a(e=>{!C||e.contains(document.activeElement)||e.focus()}),{platform:D,isOpen:O,id:k,trigger:A,triggerElement:j,setPanel:M,panelElement:N}=a.t({haspopup:`dialog`,idPrefix:`popover`,id:T.id,interaction:{component:`popover`,type:`openChange`},open:p,defaultOpen:m,onOpenChange:h,onOpened:E}),P=i.t({side:v,align:y,offset:b,flip:x,matchWidth:S,anchor:j}),F=s.t(f,O,N),I=(0,c.useCallback)(e=>{M(e),t.d(u,e)},[M,u]),L={"aria-label":g,"aria-labelledby":_},R=T;return D?(0,l.jsxs)(l.Fragment,{children:[d(A),(0,l.jsx)(n.default,{ref:I,component:`popover`,...R,variant:[R.variant,{topLayer:!0}],...P.layerProps,id:k,props:{popover:`auto`,role:`dialog`,...L,tabIndex:-1,...w},children:F})]}):(0,l.jsxs)(l.Fragment,{children:[d(A),O&&(0,l.jsx)(o.default,{contentRef:I,anchor:j,side:v,align:y,offset:b,flip:x,matchWidth:S,component:`popover`,...R,id:k,props:{role:`dialog`,...L,tabIndex:-1,...w},children:f})]})}var d=e.f(u,`Popover`);exports.default=d;
@@ -1,77 +1,78 @@
1
1
  "use client";
2
2
  import { f as e } from "../react-shared.mjs";
3
- import { l as t } from "../platform.mjs";
3
+ import { d as t } from "../platform.mjs";
4
4
  import n from "../box.mjs";
5
5
  import { a as r } from "../behavior.mjs";
6
6
  import { t as i } from "../placement.mjs";
7
7
  import { t as a } from "../layer.mjs";
8
8
  import o from "./overlay.mjs";
9
- import { useCallback as s } from "react";
10
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
9
+ import { t as s } from "../motion.mjs";
10
+ import { useCallback as c } from "react";
11
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
11
12
  //#region src/components/popover.tsx
12
- function d(e, d) {
13
- let { trigger: f, children: p, open: m, defaultOpen: h = !1, onOpenChange: g, label: _, labelledBy: v, side: y = "bottom", align: b = "center", offset: x = 2, flip: S = !0, matchWidth: C = !1, autoFocus: w = !0, props: T, ...E } = e, D = r((e) => {
14
- !w || e.contains(document.activeElement) || e.focus();
15
- }), { platform: O, isOpen: k, id: A, trigger: j, triggerElement: M, setPanel: N } = a({
13
+ function f(e, f) {
14
+ let { trigger: p, children: m, open: h, defaultOpen: g = !1, onOpenChange: _, label: v, labelledBy: y, side: b = "bottom", align: x = "center", offset: S = 2, flip: C = !0, matchWidth: w = !1, autoFocus: T = !0, props: E, ...D } = e, O = r((e) => {
15
+ !T || e.contains(document.activeElement) || e.focus();
16
+ }), { platform: k, isOpen: A, id: j, trigger: M, triggerElement: N, setPanel: P, panelElement: F } = a({
16
17
  haspopup: "dialog",
17
18
  idPrefix: "popover",
18
- id: E.id,
19
+ id: D.id,
19
20
  interaction: {
20
21
  component: "popover",
21
22
  type: "openChange"
22
23
  },
23
- open: m,
24
- defaultOpen: h,
25
- onOpenChange: g,
26
- onOpened: D
27
- }), P = i({
28
- side: y,
29
- align: b,
30
- offset: x,
31
- flip: S,
32
- matchWidth: C,
33
- anchor: M
34
- }), F = s((e) => {
35
- N(e), t(d, e);
36
- }, [N, d]), I = {
37
- "aria-label": _,
38
- "aria-labelledby": v
39
- }, L = E;
40
- return O ? /* @__PURE__ */ u(c, { children: [f(j), /* @__PURE__ */ l(n, {
41
- ref: F,
24
+ open: h,
25
+ defaultOpen: g,
26
+ onOpenChange: _,
27
+ onOpened: O
28
+ }), I = i({
29
+ side: b,
30
+ align: x,
31
+ offset: S,
32
+ flip: C,
33
+ matchWidth: w,
34
+ anchor: N
35
+ }), L = s(m, A, F), R = c((e) => {
36
+ P(e), t(f, e);
37
+ }, [P, f]), z = {
38
+ "aria-label": v,
39
+ "aria-labelledby": y
40
+ }, B = D;
41
+ return k ? /* @__PURE__ */ d(l, { children: [p(M), /* @__PURE__ */ u(n, {
42
+ ref: R,
42
43
  component: "popover",
43
- ...L,
44
- variant: [L.variant, { topLayer: !0 }],
45
- ...P.layerProps,
46
- id: A,
44
+ ...B,
45
+ variant: [B.variant, { topLayer: !0 }],
46
+ ...I.layerProps,
47
+ id: j,
47
48
  props: {
48
49
  popover: "auto",
49
50
  role: "dialog",
50
- ...I,
51
+ ...z,
51
52
  tabIndex: -1,
52
- ...T
53
+ ...E
53
54
  },
54
- children: p
55
- })] }) : /* @__PURE__ */ u(c, { children: [f(j), k && /* @__PURE__ */ l(o, {
56
- contentRef: F,
57
- anchor: M,
58
- side: y,
59
- align: b,
60
- offset: x,
61
- flip: S,
62
- matchWidth: C,
55
+ children: L
56
+ })] }) : /* @__PURE__ */ d(l, { children: [p(M), A && /* @__PURE__ */ u(o, {
57
+ contentRef: R,
58
+ anchor: N,
59
+ side: b,
60
+ align: x,
61
+ offset: S,
62
+ flip: C,
63
+ matchWidth: w,
63
64
  component: "popover",
64
- ...L,
65
- id: A,
65
+ ...B,
66
+ id: j,
66
67
  props: {
67
68
  role: "dialog",
68
- ...I,
69
+ ...z,
69
70
  tabIndex: -1,
70
- ...T
71
+ ...E
71
72
  },
72
- children: p
73
+ children: m
73
74
  })] });
74
75
  }
75
- var f = e(d, "Popover");
76
+ var p = e(f, "Popover");
76
77
  //#endregion
77
- export { f as default };
78
+ export { p as default };