@serendie/ui 3.5.1-dev.202606091509 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  2. package/dist/components/DataTable/DataTableComponent.d.ts +1 -1
  3. package/dist/components/DataTable/table/BodyCheckbox.d.ts +1 -1
  4. package/dist/components/Divider/Divider.d.ts +1 -1
  5. package/dist/components/List/List.d.ts +1 -1
  6. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  7. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +1 -1
  8. package/dist/components/Tabs/TabItem.d.ts +1 -1
  9. package/dist/components/Tabs/Tabs.d.ts +1 -1
  10. package/dist/i18n/provider.d.ts +1 -1
  11. package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +50 -49
  12. package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +68 -70
  13. package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
  14. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +308 -322
  15. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +79 -93
  16. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +43 -35
  17. package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +35 -36
  18. package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +37 -27
  19. package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +41 -56
  20. package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +31 -51
  21. package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +25 -46
  22. package/dist/node_modules/@zag-js/dom-query/dist/controller.js +5 -5
  23. package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +21 -13
  24. package/dist/node_modules/@zag-js/live-region/dist/index.js +19 -29
  25. package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +135 -138
  26. package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +24 -24
  27. package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +1 -1
  28. package/dist/node_modules/@zag-js/popper/dist/get-placement.js +71 -82
  29. package/dist/node_modules/@zag-js/react/dist/machine.js +96 -105
  30. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +26 -34
  31. package/dist/node_modules/@zag-js/select/dist/select.connect.js +101 -104
  32. package/dist/node_modules/@zag-js/select/dist/select.machine.js +1 -1
  33. package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +60 -63
  34. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +25 -27
  35. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +14 -15
  36. package/dist/theme/initColorScheme.d.ts +1 -1
  37. package/package.json +8 -8
  38. package/dist/node_modules/@zag-js/date-utils/dist/locale.js +0 -12
  39. package/dist/node_modules/@zag-js/dom-query/dist/scroll.js +0 -11
@@ -1,19 +1,27 @@
1
- import { getWindow as c, getParentNode as u, isRootElement as a, getDocument as f, isHTMLElement as w } from "./node.js";
2
- function s(t) {
3
- const e = u(t);
4
- return a(e) ? f(e).body : w(e) && i(e) ? e : s(e);
1
+ import { getWindow as c, getParentNode as u, isRootElement as f, getDocument as a, isHTMLElement as w } from "./node.js";
2
+ function l(t) {
3
+ const o = u(t);
4
+ return f(o) ? a(o).body : w(o) && i(o) ? o : l(o);
5
5
  }
6
- function v(t, e = []) {
7
- const o = s(t), r = o === t.ownerDocument.body, n = c(o);
8
- return r ? e.concat(n, n.visualViewport || [], i(o) ? o : []) : e.concat(o, v(o, []));
6
+ function d(t, o = []) {
7
+ const n = l(t), e = n === t.ownerDocument.body, r = c(n);
8
+ return e ? o.concat(r, r.visualViewport || [], i(n) ? n : []) : o.concat(n, d(n, []));
9
9
  }
10
- var d = /auto|scroll|overlay|hidden|clip/, m = /* @__PURE__ */ new Set(["inline", "contents"]);
10
+ var v = /auto|scroll|overlay|hidden|clip/, g = /* @__PURE__ */ new Set(["inline", "contents"]);
11
11
  function i(t) {
12
- const e = c(t), { overflow: o, overflowX: r, overflowY: n, display: l } = e.getComputedStyle(t);
13
- return d.test(o + n + r) && !m.has(l);
12
+ const o = c(t), { overflow: n, overflowX: e, overflowY: r, display: s } = o.getComputedStyle(t);
13
+ return v.test(n + r + e) && !g.has(s);
14
+ }
15
+ function m(t) {
16
+ return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth;
17
+ }
18
+ function O(t, o) {
19
+ const { rootEl: n, ...e } = o || {};
20
+ !t || !n || !i(n) || !m(n) || t.scrollIntoView(e);
14
21
  }
15
22
  export {
16
- s as getNearestOverflowAncestor,
17
- v as getOverflowAncestors,
18
- i as isOverflowElement
23
+ l as getNearestOverflowAncestor,
24
+ d as getOverflowAncestors,
25
+ i as isOverflowElement,
26
+ O as scrollIntoView
19
27
  };
@@ -1,18 +1,13 @@
1
- var o = "__live-region__", a = "__live-region-debug__", h = "position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;";
2
- function _(l = {}) {
3
- const { level: d = "polite", document: t = document, root: u, delay: p = 0, debug: g = !1 } = l, v = t.defaultView ?? window, s = u ?? t.body;
4
- function b() {
5
- if (!g) return;
6
- let e = t.getElementById(a);
7
- return e || (e = t.createElement("div"), e.id = a, e.dataset.liveAnnouncerDebug = "true", e.setAttribute("aria-hidden", "true"), e.style.cssText = h, s.appendChild(e), e);
8
- }
9
- function m(e, i) {
10
- const r = t.getElementById(o);
11
- r == null || r.remove(), i = i ?? p;
12
- const n = t.createElement("span");
13
- n.id = o, n.dataset.liveAnnouncer = "true";
14
- const f = d !== "assertive" ? "status" : "alert";
15
- n.setAttribute("aria-live", d), n.setAttribute("role", f), Object.assign(n.style, {
1
+ var o = "__live-region__";
2
+ function w(s = {}) {
3
+ const { level: a = "polite", document: t = document, root: c, delay: d = 0 } = s, l = t.defaultView ?? window, u = c ?? t.body;
4
+ function p(n, r) {
5
+ const i = t.getElementById(o);
6
+ i == null || i.remove(), r = r ?? d;
7
+ const e = t.createElement("span");
8
+ e.id = o, e.dataset.liveAnnouncer = "true";
9
+ const v = a !== "assertive" ? "status" : "alert";
10
+ e.setAttribute("aria-live", a), e.setAttribute("role", v), Object.assign(e.style, {
16
11
  border: "0",
17
12
  clip: "rect(0 0 0 0)",
18
13
  height: "1px",
@@ -23,27 +18,22 @@ function _(l = {}) {
23
18
  width: "1px",
24
19
  whiteSpace: "nowrap",
25
20
  wordWrap: "normal"
26
- }), s.appendChild(n), v.setTimeout(() => {
27
- if (!n.isConnected) return;
28
- n.textContent = e;
29
- const c = b();
30
- c && (c.textContent = e);
31
- }, i);
21
+ }), u.appendChild(e), l.setTimeout(() => {
22
+ e.textContent = n;
23
+ }, r);
32
24
  }
33
- function x() {
34
- const e = t.getElementById(o);
35
- e == null || e.remove();
36
- const i = t.getElementById(a);
37
- i == null || i.remove();
25
+ function m() {
26
+ const n = t.getElementById(o);
27
+ n == null || n.remove();
38
28
  }
39
29
  return {
40
- announce: m,
41
- destroy: x,
30
+ announce: p,
31
+ destroy: m,
42
32
  toJSON() {
43
33
  return o;
44
34
  }
45
35
  };
46
36
  }
47
37
  export {
48
- _ as createLiveRegion
38
+ w as createLiveRegion
49
39
  };
@@ -1,46 +1,45 @@
1
- import { isDownloadingEvent as x, isOpeningInNewTab as U, getEventTarget as W, getEventKey as V, isPrintableKey as j, isModifierKey as q, isContextMenuEvent as J, getEventPoint as y } from "../../dom-query/dist/event.js";
2
- import { isValidTabEvent as Q } from "../../dom-query/dist/initial-focus.js";
3
- import { contains as Z, isEditableElement as z } from "../../dom-query/dist/node.js";
4
- import { dataAttr as T, ariaAttr as ee } from "../../dom-query/dist/shared.js";
5
- import { getPlacementStyles as te } from "../../popper/dist/get-styles.js";
6
- import { getPlacementSide as re } from "../../popper/dist/placement.js";
1
+ import { isDownloadingEvent as x, isOpeningInNewTab as U, getEventTarget as v, getEventKey as W, isPrintableKey as $, isModifierKey as j, isContextMenuEvent as q, getEventPoint as f } from "../../dom-query/dist/event.js";
2
+ import { isValidTabEvent as J } from "../../dom-query/dist/initial-focus.js";
3
+ import { contains as Q, isEditableElement as Z } from "../../dom-query/dist/node.js";
4
+ import { dataAttr as T, ariaAttr as z } from "../../dom-query/dist/shared.js";
5
+ import { getPlacementStyles as tt } from "../../popper/dist/get-styles.js";
7
6
  import { parts as l } from "./menu.anatomy.js";
8
- import { getGroupLabelId as H, getGroupId as ne, getContextTriggerId as K, getTriggerId as X, getContentId as P, getArrowId as ie, getPositionerId as oe, isTargetDisabled as I, itemSelectEvent as F, getItemId as B } from "./menu.dom.js";
9
- import { setParentRoutingLock as ae } from "./menu.utils.js";
10
- import { hasProp as k } from "../../utils/dist/guard.js";
11
- import { mergeProps as de } from "../../core/dist/merge-props.js";
12
- import { cast as Y } from "../../utils/dist/functions.js";
13
- function Pe(R, g) {
14
- const { context: m, send: n, state: C, computed: _, prop: a, scope: d } = R, p = C.hasTag("open"), b = m.get("isSubmenu"), $ = _("isTypingAhead"), L = a("composite"), E = m.get("currentPlacement"), w = E ? re(E) : void 0, D = m.get("anchorPoint"), G = m.get("highlightedValue"), f = m.get("triggerValue"), O = te({
7
+ import { getGroupLabelId as V, getGroupId as et, getContextTriggerId as H, getTriggerId as K, getContentId as h, getArrowId as rt, getPositionerId as nt, isTargetDisabled as P, itemSelectEvent as X, getItemId as F } from "./menu.dom.js";
8
+ import { setParentRoutingLock as it } from "./menu.utils.js";
9
+ import { hasProp as N } from "../../utils/dist/guard.js";
10
+ import { mergeProps as ot } from "../../core/dist/merge-props.js";
11
+ import { cast as B } from "../../utils/dist/functions.js";
12
+ function ft(I, g) {
13
+ const { context: m, send: n, state: k, computed: C, prop: a, scope: d } = I, p = k.hasTag("open"), R = m.get("isSubmenu"), Y = C("isTypingAhead"), _ = a("composite"), L = m.get("currentPlacement"), w = m.get("anchorPoint"), D = m.get("highlightedValue"), E = m.get("triggerValue"), b = tt({
15
14
  ...a("positioning"),
16
- placement: D ? "bottom" : E
15
+ placement: w ? "bottom" : L
17
16
  });
18
- function S(e) {
17
+ function O(t) {
19
18
  return {
20
- id: B(d, e.value),
21
- disabled: !!e.disabled,
22
- highlighted: G === e.value
19
+ id: F(d, t.value),
20
+ disabled: !!t.disabled,
21
+ highlighted: D === t.value
23
22
  };
24
23
  }
25
- function M(e) {
26
- const t = e.valueText ?? e.value;
27
- return { ...e, id: e.value, valueText: t };
24
+ function G(t) {
25
+ const e = t.valueText ?? t.value;
26
+ return { ...t, id: t.value, valueText: e };
28
27
  }
29
- function h(e) {
28
+ function y(t) {
30
29
  return {
31
- ...S(M(e)),
32
- checked: !!e.checked
30
+ ...O(G(t)),
31
+ checked: !!t.checked
33
32
  };
34
33
  }
35
- function A(e) {
36
- const { closeOnSelect: t, valueText: s, value: c } = e, r = S(e), o = B(d, c);
34
+ function S(t) {
35
+ const { closeOnSelect: e, valueText: s, value: c } = t, r = O(t), o = F(d, c);
37
36
  return g.element({
38
37
  ...l.item.attrs,
39
38
  id: o,
40
39
  role: "menuitem",
41
- "aria-disabled": ee(r.disabled),
40
+ "aria-disabled": z(r.disabled),
42
41
  "data-disabled": T(r.disabled),
43
- "data-ownedby": P(d),
42
+ "data-ownedby": h(d),
44
43
  "data-highlighted": T(r.highlighted),
45
44
  "data-value": c,
46
45
  "data-valuetext": s,
@@ -51,72 +50,72 @@ function Pe(R, g) {
51
50
  if (r.disabled || i.pointerType !== "mouse") return;
52
51
  const u = i.currentTarget;
53
52
  if (r.highlighted) return;
54
- const N = y(i);
55
- n({ type: "ITEM_POINTERMOVE", id: o, target: u, closeOnSelect: t, point: N });
53
+ const A = f(i);
54
+ n({ type: "ITEM_POINTERMOVE", id: o, target: u, closeOnSelect: e, point: A });
56
55
  },
57
56
  onPointerLeave(i) {
58
- var v;
59
- if (r.disabled || i.pointerType !== "mouse" || !((v = R.event.previous()) == null ? void 0 : v.type.includes("POINTER"))) return;
60
- const N = i.currentTarget;
61
- n({ type: "ITEM_POINTERLEAVE", id: o, target: N, closeOnSelect: t });
57
+ var M;
58
+ if (r.disabled || i.pointerType !== "mouse" || !((M = I.event.previous()) == null ? void 0 : M.type.includes("POINTER"))) return;
59
+ const A = i.currentTarget;
60
+ n({ type: "ITEM_POINTERLEAVE", id: o, target: A, closeOnSelect: e });
62
61
  },
63
62
  onPointerDown(i) {
64
63
  if (r.disabled) return;
65
64
  const u = i.currentTarget;
66
- n({ type: "ITEM_POINTERDOWN", target: u, id: o, closeOnSelect: t });
65
+ n({ type: "ITEM_POINTERDOWN", target: u, id: o, closeOnSelect: e });
67
66
  },
68
67
  onClick(i) {
69
68
  if (x(i) || U(i) || r.disabled) return;
70
69
  const u = i.currentTarget;
71
- n({ type: "ITEM_CLICK", target: u, id: o, closeOnSelect: t });
70
+ n({ type: "ITEM_CLICK", target: u, id: o, closeOnSelect: e });
72
71
  }
73
72
  });
74
73
  }
75
74
  return {
76
- highlightedValue: G,
75
+ highlightedValue: D,
77
76
  open: p,
78
- setOpen(e) {
79
- C.hasTag("open") !== e && n({ type: e ? "OPEN" : "CLOSE" });
77
+ setOpen(t) {
78
+ k.hasTag("open") !== t && n({ type: t ? "OPEN" : "CLOSE" });
80
79
  },
81
- triggerValue: f,
82
- setTriggerValue(e) {
83
- n({ type: "TRIGGER_VALUE.SET", value: e });
80
+ triggerValue: E,
81
+ setTriggerValue(t) {
82
+ n({ type: "TRIGGER_VALUE.SET", value: t });
84
83
  },
85
- setHighlightedValue(e) {
86
- n({ type: "HIGHLIGHTED.SET", value: e });
84
+ setHighlightedValue(t) {
85
+ n({ type: "HIGHLIGHTED.SET", value: t });
87
86
  },
88
- setParent(e) {
89
- n({ type: "PARENT.SET", value: e, id: e.prop("id") });
87
+ setParent(t) {
88
+ n({ type: "PARENT.SET", value: t, id: t.prop("id") });
90
89
  },
91
- setChild(e) {
92
- n({ type: "CHILD.SET", value: e, id: e.prop("id") });
90
+ setChild(t) {
91
+ n({ type: "CHILD.SET", value: t, id: t.prop("id") });
93
92
  },
94
- reposition(e = {}) {
95
- n({ type: "POSITIONING.SET", options: e });
93
+ reposition(t = {}) {
94
+ n({ type: "POSITIONING.SET", options: t });
96
95
  },
97
- addItemListener(e) {
98
- const t = d.getById(e.id);
99
- if (!t) return;
96
+ addItemListener(t) {
97
+ const e = d.getById(t.id);
98
+ if (!e) return;
100
99
  const s = () => {
101
100
  var c;
102
- return (c = e.onSelect) == null ? void 0 : c.call(e);
101
+ return (c = t.onSelect) == null ? void 0 : c.call(t);
103
102
  };
104
- return t.addEventListener(F, s), () => t.removeEventListener(F, s);
103
+ return e.addEventListener(X, s), () => e.removeEventListener(X, s);
105
104
  },
106
- getContextTriggerProps(e = {}) {
107
- const { value: t } = e, s = t == null ? !1 : f === t, c = K(d, t);
105
+ getContextTriggerProps(t = {}) {
106
+ const { value: e } = t, s = e == null ? !1 : E === e, c = H(d, e);
108
107
  return g.element({
109
108
  ...l.contextTrigger.attrs,
110
109
  dir: a("dir"),
111
110
  id: c,
112
111
  "data-ownedby": d.id,
113
- "data-value": t,
112
+ "data-value": e,
114
113
  "data-current": T(s),
115
114
  "data-state": p ? "open" : "closed",
116
115
  onPointerDown(r) {
117
116
  if (r.pointerType === "mouse") return;
118
- const o = y(r);
119
- n({ type: "CONTEXT_MENU_START", point: o, value: t });
117
+ const o = f(r);
118
+ n({ type: "CONTEXT_MENU_START", point: o, value: e });
120
119
  },
121
120
  onPointerCancel(r) {
122
121
  r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
@@ -128,11 +127,11 @@ function Pe(R, g) {
128
127
  r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
129
128
  },
130
129
  onContextMenu(r) {
131
- const o = y(r), i = p && t != null && !s;
130
+ const o = f(r), i = p && e != null && !s;
132
131
  n({
133
132
  type: i ? "TRIGGER_VALUE.SET" : "CONTEXT_MENU",
134
133
  point: o,
135
- value: t
134
+ value: e
136
135
  }), r.preventDefault();
137
136
  },
138
137
  style: {
@@ -142,40 +141,39 @@ function Pe(R, g) {
142
141
  }
143
142
  });
144
143
  },
145
- getTriggerItemProps(e) {
146
- const t = e.getTriggerProps();
147
- return de(A({ value: t.id }), t);
144
+ getTriggerItemProps(t) {
145
+ const e = t.getTriggerProps();
146
+ return ot(S({ value: e.id }), e);
148
147
  },
149
- getTriggerProps(e = {}) {
150
- const { value: t } = e, s = t == null ? !1 : f === t, c = X(d, t);
148
+ getTriggerProps(t = {}) {
149
+ const { value: e } = t, s = e == null ? !1 : E === e, c = K(d, e);
151
150
  return g.button({
152
- ...b ? l.triggerItem.attrs : l.trigger.attrs,
153
- "data-placement": E,
154
- "data-side": w,
151
+ ...R ? l.triggerItem.attrs : l.trigger.attrs,
152
+ "data-placement": m.get("currentPlacement"),
155
153
  type: "button",
156
154
  dir: a("dir"),
157
155
  id: c,
158
156
  // Multi-trigger attributes - only included when value is provided
159
- ...t != null && {
157
+ ...e != null && {
160
158
  "data-ownedby": d.id,
161
- "data-value": t,
159
+ "data-value": e,
162
160
  "data-current": T(s)
163
161
  },
164
162
  "data-uid": a("id"),
165
- "aria-haspopup": L ? "menu" : "dialog",
166
- "aria-controls": P(d),
167
- "data-controls": P(d),
168
- "aria-expanded": t == null ? p : p && s,
163
+ "aria-haspopup": _ ? "menu" : "dialog",
164
+ "aria-controls": h(d),
165
+ "data-controls": h(d),
166
+ "aria-expanded": e == null ? p : p && s,
169
167
  "data-state": p ? "open" : "closed",
170
168
  onPointerMove(r) {
171
- if (r.pointerType !== "mouse" || I(r.currentTarget) || !b) return;
172
- const i = y(r);
169
+ if (r.pointerType !== "mouse" || P(r.currentTarget) || !R) return;
170
+ const i = f(r);
173
171
  n({ type: "TRIGGER_POINTERMOVE", target: r.currentTarget, point: i });
174
172
  },
175
173
  onPointerLeave(r) {
176
- if (I(r.currentTarget) || r.pointerType !== "mouse" || !b) return;
177
- ae(R.refs.get("parent"), !0);
178
- const o = y(r);
174
+ if (P(r.currentTarget) || r.pointerType !== "mouse" || !R) return;
175
+ it(I.refs.get("parent"), !0);
176
+ const o = f(r);
179
177
  n({
180
178
  type: "TRIGGER_POINTERLEAVE",
181
179
  target: r.currentTarget,
@@ -183,15 +181,15 @@ function Pe(R, g) {
183
181
  });
184
182
  },
185
183
  onPointerDown(r) {
186
- I(r.currentTarget) || J(r) || r.preventDefault();
184
+ P(r.currentTarget) || q(r) || r.preventDefault();
187
185
  },
188
186
  onClick(r) {
189
- if (r.defaultPrevented || I(r.currentTarget)) return;
190
- const o = p && t != null && !s;
187
+ if (r.defaultPrevented || P(r.currentTarget)) return;
188
+ const o = p && e != null && !s;
191
189
  n({
192
190
  type: o ? "TRIGGER_VALUE.SET" : "TRIGGER_CLICK",
193
191
  target: r.currentTarget,
194
- value: t
192
+ value: e
195
193
  });
196
194
  },
197
195
  onBlur() {
@@ -204,18 +202,18 @@ function Pe(R, g) {
204
202
  if (r.defaultPrevented) return;
205
203
  const o = {
206
204
  ArrowDown() {
207
- n({ type: "ARROW_DOWN", value: t });
205
+ n({ type: "ARROW_DOWN", value: e });
208
206
  },
209
207
  ArrowUp() {
210
- n({ type: "ARROW_UP", value: t });
208
+ n({ type: "ARROW_UP", value: e });
211
209
  },
212
210
  Enter() {
213
- n({ type: "ARROW_DOWN", src: "enter", value: t });
211
+ n({ type: "ARROW_DOWN", src: "enter", value: e });
214
212
  },
215
213
  Space() {
216
- n({ type: "ARROW_DOWN", src: "space", value: t });
214
+ n({ type: "ARROW_DOWN", src: "space", value: e });
217
215
  }
218
- }, i = V(r, {
216
+ }, i = W(r, {
219
217
  orientation: "vertical",
220
218
  dir: a("dir")
221
219
  }), u = o[i];
@@ -234,48 +232,47 @@ function Pe(R, g) {
234
232
  return g.element({
235
233
  ...l.positioner.attrs,
236
234
  dir: a("dir"),
237
- id: oe(d),
238
- style: O.floating
235
+ id: nt(d),
236
+ style: b.floating
239
237
  });
240
238
  },
241
239
  getArrowProps() {
242
240
  return g.element({
243
- id: ie(d),
241
+ id: rt(d),
244
242
  ...l.arrow.attrs,
245
243
  dir: a("dir"),
246
- style: O.arrow
244
+ style: b.arrow
247
245
  });
248
246
  },
249
247
  getArrowTipProps() {
250
248
  return g.element({
251
249
  ...l.arrowTip.attrs,
252
250
  dir: a("dir"),
253
- style: O.arrowTip
251
+ style: b.arrowTip
254
252
  });
255
253
  },
256
254
  getContentProps() {
257
255
  return g.element({
258
256
  ...l.content.attrs,
259
- id: P(d),
257
+ id: h(d),
260
258
  "aria-label": a("aria-label"),
261
259
  hidden: !p,
262
260
  "data-state": p ? "open" : "closed",
263
- role: L ? "menu" : "dialog",
261
+ role: _ ? "menu" : "dialog",
264
262
  tabIndex: 0,
265
263
  dir: a("dir"),
266
- "aria-activedescendant": _("highlightedId") || void 0,
267
- "aria-labelledby": D ? K(d, f ?? void 0) : X(d, f ?? void 0),
268
- "data-placement": E,
269
- "data-side": w,
270
- onPointerEnter(e) {
271
- e.pointerType === "mouse" && n({ type: "MENU_POINTERENTER" });
264
+ "aria-activedescendant": C("highlightedId") || void 0,
265
+ "aria-labelledby": w ? H(d, E ?? void 0) : K(d, E ?? void 0),
266
+ "data-placement": L,
267
+ onPointerEnter(t) {
268
+ t.pointerType === "mouse" && n({ type: "MENU_POINTERENTER" });
272
269
  },
273
- onKeyDown(e) {
274
- if (e.defaultPrevented || !Z(e.currentTarget, W(e))) return;
275
- const t = W(e);
276
- if (!((t == null ? void 0 : t.closest("[role=menu]")) === e.currentTarget || t === e.currentTarget)) return;
277
- if (e.key === "Tab" && !Q(e)) {
278
- e.preventDefault();
270
+ onKeyDown(t) {
271
+ if (t.defaultPrevented || !Q(t.currentTarget, v(t))) return;
272
+ const e = v(t);
273
+ if (!((e == null ? void 0 : e.closest("[role=menu]")) === t.currentTarget || e === t.currentTarget)) return;
274
+ if (t.key === "Tab" && !J(t)) {
275
+ t.preventDefault();
279
276
  return;
280
277
  }
281
278
  const c = {
@@ -296,7 +293,7 @@ function Pe(R, g) {
296
293
  },
297
294
  Space(i) {
298
295
  var u;
299
- $ ? n({ type: "TYPEAHEAD", key: i.key }) : (u = c.Enter) == null || u.call(c, i);
296
+ Y ? n({ type: "TYPEAHEAD", key: i.key }) : (u = c.Enter) == null || u.call(c, i);
300
297
  },
301
298
  Home() {
302
299
  n({ type: "HOME" });
@@ -304,12 +301,12 @@ function Pe(R, g) {
304
301
  End() {
305
302
  n({ type: "END" });
306
303
  }
307
- }, r = V(e, { dir: a("dir") }), o = c[r];
304
+ }, r = W(t, { dir: a("dir") }), o = c[r];
308
305
  if (o) {
309
- o(e), e.stopPropagation(), e.preventDefault();
306
+ o(t), t.stopPropagation(), t.preventDefault();
310
307
  return;
311
308
  }
312
- a("typeahead") && j(e) && (q(e) || z(t) || (n({ type: "TYPEAHEAD", key: e.key }), e.preventDefault()));
309
+ a("typeahead") && $(t) && (j(t) || Z(e) || (n({ type: "TYPEAHEAD", key: t.key }), t.preventDefault()));
313
310
  }
314
311
  });
315
312
  },
@@ -321,19 +318,19 @@ function Pe(R, g) {
321
318
  "aria-orientation": "horizontal"
322
319
  });
323
320
  },
324
- getItemState: S,
325
- getItemProps: A,
326
- getOptionItemState: h,
327
- getOptionItemProps(e) {
328
- const { type: t, disabled: s, closeOnSelect: c } = e, r = M(e), o = h(e);
321
+ getItemState: O,
322
+ getItemProps: S,
323
+ getOptionItemState: y,
324
+ getOptionItemProps(t) {
325
+ const { type: e, disabled: s, closeOnSelect: c } = t, r = G(t), o = y(t);
329
326
  return {
330
- ...A(r),
327
+ ...S(r),
331
328
  ...g.element({
332
- "data-type": t,
329
+ "data-type": e,
333
330
  ...l.item.attrs,
334
331
  dir: a("dir"),
335
332
  "data-value": r.value,
336
- role: `menuitem${t}`,
333
+ role: `menuitem${e}`,
337
334
  "aria-checked": !!o.checked,
338
335
  "data-state": o.checked ? "checked" : "unchecked",
339
336
  onClick(i) {
@@ -344,45 +341,45 @@ function Pe(R, g) {
344
341
  })
345
342
  };
346
343
  },
347
- getItemIndicatorProps(e) {
348
- const t = h(Y(e)), s = t.checked ? "checked" : "unchecked";
344
+ getItemIndicatorProps(t) {
345
+ const e = y(B(t)), s = e.checked ? "checked" : "unchecked";
349
346
  return g.element({
350
347
  ...l.itemIndicator.attrs,
351
348
  dir: a("dir"),
352
- "data-disabled": T(t.disabled),
353
- "data-highlighted": T(t.highlighted),
354
- "data-state": k(e, "checked") ? s : void 0,
355
- hidden: k(e, "checked") ? !t.checked : void 0
349
+ "data-disabled": T(e.disabled),
350
+ "data-highlighted": T(e.highlighted),
351
+ "data-state": N(t, "checked") ? s : void 0,
352
+ hidden: N(t, "checked") ? !e.checked : void 0
356
353
  });
357
354
  },
358
- getItemTextProps(e) {
359
- const t = h(Y(e)), s = t.checked ? "checked" : "unchecked";
355
+ getItemTextProps(t) {
356
+ const e = y(B(t)), s = e.checked ? "checked" : "unchecked";
360
357
  return g.element({
361
358
  ...l.itemText.attrs,
362
359
  dir: a("dir"),
363
- "data-disabled": T(t.disabled),
364
- "data-highlighted": T(t.highlighted),
365
- "data-state": k(e, "checked") ? s : void 0
360
+ "data-disabled": T(e.disabled),
361
+ "data-highlighted": T(e.highlighted),
362
+ "data-state": N(t, "checked") ? s : void 0
366
363
  });
367
364
  },
368
- getItemGroupLabelProps(e) {
365
+ getItemGroupLabelProps(t) {
369
366
  return g.element({
370
367
  ...l.itemGroupLabel.attrs,
371
- id: H(d, e.htmlFor),
368
+ id: V(d, t.htmlFor),
372
369
  dir: a("dir")
373
370
  });
374
371
  },
375
- getItemGroupProps(e) {
372
+ getItemGroupProps(t) {
376
373
  return g.element({
377
- id: ne(d, e.id),
374
+ id: et(d, t.id),
378
375
  ...l.itemGroup.attrs,
379
376
  dir: a("dir"),
380
- "aria-labelledby": H(d, e.id),
377
+ "aria-labelledby": V(d, t.id),
381
378
  role: "group"
382
379
  });
383
380
  }
384
381
  };
385
382
  }
386
383
  export {
387
- Pe as connect
384
+ ft as connect
388
385
  };