@serendie/ui 3.5.1-dev.202605201240 → 3.5.1-dev.202606160617

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 (47) hide show
  1. package/dist/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  2. package/dist/components/DataTable/DataTable.sampleData.d.ts +12 -0
  3. package/dist/components/DataTable/DataTable.sampleData.test.d.ts +1 -0
  4. package/dist/components/DataTable/DataTableComponent.d.ts +1 -1
  5. package/dist/components/DataTable/table/BodyCheckbox.d.ts +1 -1
  6. package/dist/components/Divider/Divider.d.ts +1 -1
  7. package/dist/components/List/List.d.ts +1 -1
  8. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +1 -0
  9. package/dist/components/ProgressIndicator/AnimatedArc.js +31 -34
  10. package/dist/components/ProgressIndicator/AnimatedArc.test.d.ts +1 -0
  11. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  12. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +2 -1
  13. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +49 -36
  14. package/dist/components/ProgressIndicator/animatedArcProps.d.ts +11 -0
  15. package/dist/components/ProgressIndicator/animatedArcProps.js +19 -0
  16. package/dist/components/Tabs/TabItem.d.ts +1 -1
  17. package/dist/components/Tabs/Tabs.d.ts +1 -1
  18. package/dist/i18n/provider.d.ts +1 -1
  19. package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +49 -50
  20. package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +70 -68
  21. package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
  22. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +322 -308
  23. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +93 -79
  24. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +35 -43
  25. package/dist/node_modules/@zag-js/date-utils/dist/locale.js +12 -0
  26. package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +36 -35
  27. package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +27 -37
  28. package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +56 -41
  29. package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +51 -31
  30. package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +46 -25
  31. package/dist/node_modules/@zag-js/dom-query/dist/controller.js +5 -5
  32. package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +13 -21
  33. package/dist/node_modules/@zag-js/dom-query/dist/scroll.js +11 -0
  34. package/dist/node_modules/@zag-js/live-region/dist/index.js +29 -19
  35. package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +138 -135
  36. package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +24 -24
  37. package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +1 -1
  38. package/dist/node_modules/@zag-js/popper/dist/get-placement.js +82 -71
  39. package/dist/node_modules/@zag-js/react/dist/machine.js +105 -96
  40. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +34 -26
  41. package/dist/node_modules/@zag-js/select/dist/select.connect.js +104 -101
  42. package/dist/node_modules/@zag-js/select/dist/select.machine.js +1 -1
  43. package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +63 -60
  44. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +27 -25
  45. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -14
  46. package/dist/theme/initColorScheme.d.ts +1 -1
  47. package/package.json +8 -8
@@ -1,27 +1,19 @@
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);
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);
5
5
  }
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, []));
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, []));
9
9
  }
10
- var v = /auto|scroll|overlay|hidden|clip/, g = /* @__PURE__ */ new Set(["inline", "contents"]);
10
+ var d = /auto|scroll|overlay|hidden|clip/, m = /* @__PURE__ */ new Set(["inline", "contents"]);
11
11
  function i(t) {
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);
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);
21
14
  }
22
15
  export {
23
- l as getNearestOverflowAncestor,
24
- d as getOverflowAncestors,
25
- i as isOverflowElement,
26
- O as scrollIntoView
16
+ s as getNearestOverflowAncestor,
17
+ v as getOverflowAncestors,
18
+ i as isOverflowElement
27
19
  };
@@ -0,0 +1,11 @@
1
+ import { isOverflowElement as l } from "./overflow.js";
2
+ function n(t) {
3
+ return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth;
4
+ }
5
+ function e(t, r) {
6
+ const { rootEl: o, ...i } = r || {};
7
+ !t || !o || !l(o) || !n(o) || t.scrollIntoView(i);
8
+ }
9
+ export {
10
+ e as scrollIntoView
11
+ };
@@ -1,13 +1,18 @@
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, {
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, {
11
16
  border: "0",
12
17
  clip: "rect(0 0 0 0)",
13
18
  height: "1px",
@@ -18,22 +23,27 @@ function w(s = {}) {
18
23
  width: "1px",
19
24
  whiteSpace: "nowrap",
20
25
  wordWrap: "normal"
21
- }), u.appendChild(e), l.setTimeout(() => {
22
- e.textContent = n;
23
- }, r);
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);
24
32
  }
25
- function m() {
26
- const n = t.getElementById(o);
27
- n == null || n.remove();
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();
28
38
  }
29
39
  return {
30
- announce: p,
31
- destroy: m,
40
+ announce: m,
41
+ destroy: x,
32
42
  toJSON() {
33
43
  return o;
34
44
  }
35
45
  };
36
46
  }
37
47
  export {
38
- w as createLiveRegion
48
+ _ as createLiveRegion
39
49
  };
@@ -1,45 +1,46 @@
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";
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";
6
7
  import { parts as l } from "./menu.anatomy.js";
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({
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({
14
15
  ...a("positioning"),
15
- placement: w ? "bottom" : L
16
+ placement: D ? "bottom" : E
16
17
  });
17
- function O(t) {
18
+ function S(e) {
18
19
  return {
19
- id: F(d, t.value),
20
- disabled: !!t.disabled,
21
- highlighted: D === t.value
20
+ id: B(d, e.value),
21
+ disabled: !!e.disabled,
22
+ highlighted: G === e.value
22
23
  };
23
24
  }
24
- function G(t) {
25
- const e = t.valueText ?? t.value;
26
- return { ...t, id: t.value, valueText: e };
25
+ function M(e) {
26
+ const t = e.valueText ?? e.value;
27
+ return { ...e, id: e.value, valueText: t };
27
28
  }
28
- function y(t) {
29
+ function h(e) {
29
30
  return {
30
- ...O(G(t)),
31
- checked: !!t.checked
31
+ ...S(M(e)),
32
+ checked: !!e.checked
32
33
  };
33
34
  }
34
- function S(t) {
35
- const { closeOnSelect: e, valueText: s, value: c } = t, r = O(t), o = F(d, c);
35
+ function A(e) {
36
+ const { closeOnSelect: t, valueText: s, value: c } = e, r = S(e), o = B(d, c);
36
37
  return g.element({
37
38
  ...l.item.attrs,
38
39
  id: o,
39
40
  role: "menuitem",
40
- "aria-disabled": z(r.disabled),
41
+ "aria-disabled": ee(r.disabled),
41
42
  "data-disabled": T(r.disabled),
42
- "data-ownedby": h(d),
43
+ "data-ownedby": P(d),
43
44
  "data-highlighted": T(r.highlighted),
44
45
  "data-value": c,
45
46
  "data-valuetext": s,
@@ -50,72 +51,72 @@ function ft(I, g) {
50
51
  if (r.disabled || i.pointerType !== "mouse") return;
51
52
  const u = i.currentTarget;
52
53
  if (r.highlighted) return;
53
- const A = f(i);
54
- n({ type: "ITEM_POINTERMOVE", id: o, target: u, closeOnSelect: e, point: A });
54
+ const N = y(i);
55
+ n({ type: "ITEM_POINTERMOVE", id: o, target: u, closeOnSelect: t, point: N });
55
56
  },
56
57
  onPointerLeave(i) {
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 });
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 });
61
62
  },
62
63
  onPointerDown(i) {
63
64
  if (r.disabled) return;
64
65
  const u = i.currentTarget;
65
- n({ type: "ITEM_POINTERDOWN", target: u, id: o, closeOnSelect: e });
66
+ n({ type: "ITEM_POINTERDOWN", target: u, id: o, closeOnSelect: t });
66
67
  },
67
68
  onClick(i) {
68
69
  if (x(i) || U(i) || r.disabled) return;
69
70
  const u = i.currentTarget;
70
- n({ type: "ITEM_CLICK", target: u, id: o, closeOnSelect: e });
71
+ n({ type: "ITEM_CLICK", target: u, id: o, closeOnSelect: t });
71
72
  }
72
73
  });
73
74
  }
74
75
  return {
75
- highlightedValue: D,
76
+ highlightedValue: G,
76
77
  open: p,
77
- setOpen(t) {
78
- k.hasTag("open") !== t && n({ type: t ? "OPEN" : "CLOSE" });
78
+ setOpen(e) {
79
+ C.hasTag("open") !== e && n({ type: e ? "OPEN" : "CLOSE" });
79
80
  },
80
- triggerValue: E,
81
- setTriggerValue(t) {
82
- n({ type: "TRIGGER_VALUE.SET", value: t });
81
+ triggerValue: f,
82
+ setTriggerValue(e) {
83
+ n({ type: "TRIGGER_VALUE.SET", value: e });
83
84
  },
84
- setHighlightedValue(t) {
85
- n({ type: "HIGHLIGHTED.SET", value: t });
85
+ setHighlightedValue(e) {
86
+ n({ type: "HIGHLIGHTED.SET", value: e });
86
87
  },
87
- setParent(t) {
88
- n({ type: "PARENT.SET", value: t, id: t.prop("id") });
88
+ setParent(e) {
89
+ n({ type: "PARENT.SET", value: e, id: e.prop("id") });
89
90
  },
90
- setChild(t) {
91
- n({ type: "CHILD.SET", value: t, id: t.prop("id") });
91
+ setChild(e) {
92
+ n({ type: "CHILD.SET", value: e, id: e.prop("id") });
92
93
  },
93
- reposition(t = {}) {
94
- n({ type: "POSITIONING.SET", options: t });
94
+ reposition(e = {}) {
95
+ n({ type: "POSITIONING.SET", options: e });
95
96
  },
96
- addItemListener(t) {
97
- const e = d.getById(t.id);
98
- if (!e) return;
97
+ addItemListener(e) {
98
+ const t = d.getById(e.id);
99
+ if (!t) return;
99
100
  const s = () => {
100
101
  var c;
101
- return (c = t.onSelect) == null ? void 0 : c.call(t);
102
+ return (c = e.onSelect) == null ? void 0 : c.call(e);
102
103
  };
103
- return e.addEventListener(X, s), () => e.removeEventListener(X, s);
104
+ return t.addEventListener(F, s), () => t.removeEventListener(F, s);
104
105
  },
105
- getContextTriggerProps(t = {}) {
106
- const { value: e } = t, s = e == null ? !1 : E === e, c = H(d, e);
106
+ getContextTriggerProps(e = {}) {
107
+ const { value: t } = e, s = t == null ? !1 : f === t, c = K(d, t);
107
108
  return g.element({
108
109
  ...l.contextTrigger.attrs,
109
110
  dir: a("dir"),
110
111
  id: c,
111
112
  "data-ownedby": d.id,
112
- "data-value": e,
113
+ "data-value": t,
113
114
  "data-current": T(s),
114
115
  "data-state": p ? "open" : "closed",
115
116
  onPointerDown(r) {
116
117
  if (r.pointerType === "mouse") return;
117
- const o = f(r);
118
- n({ type: "CONTEXT_MENU_START", point: o, value: e });
118
+ const o = y(r);
119
+ n({ type: "CONTEXT_MENU_START", point: o, value: t });
119
120
  },
120
121
  onPointerCancel(r) {
121
122
  r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
@@ -127,11 +128,11 @@ function ft(I, g) {
127
128
  r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
128
129
  },
129
130
  onContextMenu(r) {
130
- const o = f(r), i = p && e != null && !s;
131
+ const o = y(r), i = p && t != null && !s;
131
132
  n({
132
133
  type: i ? "TRIGGER_VALUE.SET" : "CONTEXT_MENU",
133
134
  point: o,
134
- value: e
135
+ value: t
135
136
  }), r.preventDefault();
136
137
  },
137
138
  style: {
@@ -141,39 +142,40 @@ function ft(I, g) {
141
142
  }
142
143
  });
143
144
  },
144
- getTriggerItemProps(t) {
145
- const e = t.getTriggerProps();
146
- return ot(S({ value: e.id }), e);
145
+ getTriggerItemProps(e) {
146
+ const t = e.getTriggerProps();
147
+ return de(A({ value: t.id }), t);
147
148
  },
148
- getTriggerProps(t = {}) {
149
- const { value: e } = t, s = e == null ? !1 : E === e, c = K(d, e);
149
+ getTriggerProps(e = {}) {
150
+ const { value: t } = e, s = t == null ? !1 : f === t, c = X(d, t);
150
151
  return g.button({
151
- ...R ? l.triggerItem.attrs : l.trigger.attrs,
152
- "data-placement": m.get("currentPlacement"),
152
+ ...b ? l.triggerItem.attrs : l.trigger.attrs,
153
+ "data-placement": E,
154
+ "data-side": w,
153
155
  type: "button",
154
156
  dir: a("dir"),
155
157
  id: c,
156
158
  // Multi-trigger attributes - only included when value is provided
157
- ...e != null && {
159
+ ...t != null && {
158
160
  "data-ownedby": d.id,
159
- "data-value": e,
161
+ "data-value": t,
160
162
  "data-current": T(s)
161
163
  },
162
164
  "data-uid": a("id"),
163
- "aria-haspopup": _ ? "menu" : "dialog",
164
- "aria-controls": h(d),
165
- "data-controls": h(d),
166
- "aria-expanded": e == null ? p : p && s,
165
+ "aria-haspopup": L ? "menu" : "dialog",
166
+ "aria-controls": P(d),
167
+ "data-controls": P(d),
168
+ "aria-expanded": t == null ? p : p && s,
167
169
  "data-state": p ? "open" : "closed",
168
170
  onPointerMove(r) {
169
- if (r.pointerType !== "mouse" || P(r.currentTarget) || !R) return;
170
- const i = f(r);
171
+ if (r.pointerType !== "mouse" || I(r.currentTarget) || !b) return;
172
+ const i = y(r);
171
173
  n({ type: "TRIGGER_POINTERMOVE", target: r.currentTarget, point: i });
172
174
  },
173
175
  onPointerLeave(r) {
174
- if (P(r.currentTarget) || r.pointerType !== "mouse" || !R) return;
175
- it(I.refs.get("parent"), !0);
176
- const o = f(r);
176
+ if (I(r.currentTarget) || r.pointerType !== "mouse" || !b) return;
177
+ ae(R.refs.get("parent"), !0);
178
+ const o = y(r);
177
179
  n({
178
180
  type: "TRIGGER_POINTERLEAVE",
179
181
  target: r.currentTarget,
@@ -181,15 +183,15 @@ function ft(I, g) {
181
183
  });
182
184
  },
183
185
  onPointerDown(r) {
184
- P(r.currentTarget) || q(r) || r.preventDefault();
186
+ I(r.currentTarget) || J(r) || r.preventDefault();
185
187
  },
186
188
  onClick(r) {
187
- if (r.defaultPrevented || P(r.currentTarget)) return;
188
- const o = p && e != null && !s;
189
+ if (r.defaultPrevented || I(r.currentTarget)) return;
190
+ const o = p && t != null && !s;
189
191
  n({
190
192
  type: o ? "TRIGGER_VALUE.SET" : "TRIGGER_CLICK",
191
193
  target: r.currentTarget,
192
- value: e
194
+ value: t
193
195
  });
194
196
  },
195
197
  onBlur() {
@@ -202,18 +204,18 @@ function ft(I, g) {
202
204
  if (r.defaultPrevented) return;
203
205
  const o = {
204
206
  ArrowDown() {
205
- n({ type: "ARROW_DOWN", value: e });
207
+ n({ type: "ARROW_DOWN", value: t });
206
208
  },
207
209
  ArrowUp() {
208
- n({ type: "ARROW_UP", value: e });
210
+ n({ type: "ARROW_UP", value: t });
209
211
  },
210
212
  Enter() {
211
- n({ type: "ARROW_DOWN", src: "enter", value: e });
213
+ n({ type: "ARROW_DOWN", src: "enter", value: t });
212
214
  },
213
215
  Space() {
214
- n({ type: "ARROW_DOWN", src: "space", value: e });
216
+ n({ type: "ARROW_DOWN", src: "space", value: t });
215
217
  }
216
- }, i = W(r, {
218
+ }, i = V(r, {
217
219
  orientation: "vertical",
218
220
  dir: a("dir")
219
221
  }), u = o[i];
@@ -232,47 +234,48 @@ function ft(I, g) {
232
234
  return g.element({
233
235
  ...l.positioner.attrs,
234
236
  dir: a("dir"),
235
- id: nt(d),
236
- style: b.floating
237
+ id: oe(d),
238
+ style: O.floating
237
239
  });
238
240
  },
239
241
  getArrowProps() {
240
242
  return g.element({
241
- id: rt(d),
243
+ id: ie(d),
242
244
  ...l.arrow.attrs,
243
245
  dir: a("dir"),
244
- style: b.arrow
246
+ style: O.arrow
245
247
  });
246
248
  },
247
249
  getArrowTipProps() {
248
250
  return g.element({
249
251
  ...l.arrowTip.attrs,
250
252
  dir: a("dir"),
251
- style: b.arrowTip
253
+ style: O.arrowTip
252
254
  });
253
255
  },
254
256
  getContentProps() {
255
257
  return g.element({
256
258
  ...l.content.attrs,
257
- id: h(d),
259
+ id: P(d),
258
260
  "aria-label": a("aria-label"),
259
261
  hidden: !p,
260
262
  "data-state": p ? "open" : "closed",
261
- role: _ ? "menu" : "dialog",
263
+ role: L ? "menu" : "dialog",
262
264
  tabIndex: 0,
263
265
  dir: a("dir"),
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" });
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" });
269
272
  },
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();
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();
276
279
  return;
277
280
  }
278
281
  const c = {
@@ -293,7 +296,7 @@ function ft(I, g) {
293
296
  },
294
297
  Space(i) {
295
298
  var u;
296
- Y ? n({ type: "TYPEAHEAD", key: i.key }) : (u = c.Enter) == null || u.call(c, i);
299
+ $ ? n({ type: "TYPEAHEAD", key: i.key }) : (u = c.Enter) == null || u.call(c, i);
297
300
  },
298
301
  Home() {
299
302
  n({ type: "HOME" });
@@ -301,12 +304,12 @@ function ft(I, g) {
301
304
  End() {
302
305
  n({ type: "END" });
303
306
  }
304
- }, r = W(t, { dir: a("dir") }), o = c[r];
307
+ }, r = V(e, { dir: a("dir") }), o = c[r];
305
308
  if (o) {
306
- o(t), t.stopPropagation(), t.preventDefault();
309
+ o(e), e.stopPropagation(), e.preventDefault();
307
310
  return;
308
311
  }
309
- a("typeahead") && $(t) && (j(t) || Z(e) || (n({ type: "TYPEAHEAD", key: t.key }), t.preventDefault()));
312
+ a("typeahead") && j(e) && (q(e) || z(t) || (n({ type: "TYPEAHEAD", key: e.key }), e.preventDefault()));
310
313
  }
311
314
  });
312
315
  },
@@ -318,19 +321,19 @@ function ft(I, g) {
318
321
  "aria-orientation": "horizontal"
319
322
  });
320
323
  },
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);
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);
326
329
  return {
327
- ...S(r),
330
+ ...A(r),
328
331
  ...g.element({
329
- "data-type": e,
332
+ "data-type": t,
330
333
  ...l.item.attrs,
331
334
  dir: a("dir"),
332
335
  "data-value": r.value,
333
- role: `menuitem${e}`,
336
+ role: `menuitem${t}`,
334
337
  "aria-checked": !!o.checked,
335
338
  "data-state": o.checked ? "checked" : "unchecked",
336
339
  onClick(i) {
@@ -341,45 +344,45 @@ function ft(I, g) {
341
344
  })
342
345
  };
343
346
  },
344
- getItemIndicatorProps(t) {
345
- const e = y(B(t)), s = e.checked ? "checked" : "unchecked";
347
+ getItemIndicatorProps(e) {
348
+ const t = h(Y(e)), s = t.checked ? "checked" : "unchecked";
346
349
  return g.element({
347
350
  ...l.itemIndicator.attrs,
348
351
  dir: a("dir"),
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
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
353
356
  });
354
357
  },
355
- getItemTextProps(t) {
356
- const e = y(B(t)), s = e.checked ? "checked" : "unchecked";
358
+ getItemTextProps(e) {
359
+ const t = h(Y(e)), s = t.checked ? "checked" : "unchecked";
357
360
  return g.element({
358
361
  ...l.itemText.attrs,
359
362
  dir: a("dir"),
360
- "data-disabled": T(e.disabled),
361
- "data-highlighted": T(e.highlighted),
362
- "data-state": N(t, "checked") ? s : void 0
363
+ "data-disabled": T(t.disabled),
364
+ "data-highlighted": T(t.highlighted),
365
+ "data-state": k(e, "checked") ? s : void 0
363
366
  });
364
367
  },
365
- getItemGroupLabelProps(t) {
368
+ getItemGroupLabelProps(e) {
366
369
  return g.element({
367
370
  ...l.itemGroupLabel.attrs,
368
- id: V(d, t.htmlFor),
371
+ id: H(d, e.htmlFor),
369
372
  dir: a("dir")
370
373
  });
371
374
  },
372
- getItemGroupProps(t) {
375
+ getItemGroupProps(e) {
373
376
  return g.element({
374
- id: et(d, t.id),
377
+ id: ne(d, e.id),
375
378
  ...l.itemGroup.attrs,
376
379
  dir: a("dir"),
377
- "aria-labelledby": V(d, t.id),
380
+ "aria-labelledby": H(d, e.id),
378
381
  role: "group"
379
382
  });
380
383
  }
381
384
  };
382
385
  }
383
386
  export {
384
- ft as connect
387
+ Pe as connect
385
388
  };