@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,4 +1,4 @@
1
- import { getByTypeahead as c } from "../../dom-query/dist/typeahead.js";
1
+ import { getByTypeahead as v } from "../../dom-query/dist/typeahead.js";
2
2
  import { getWindow as I, isHTMLElement as u, contains as f } from "../../dom-query/dist/node.js";
3
3
  import { prev as p, next as E, last as y, first as $ } from "../../utils/dist/array.js";
4
4
  import { isFunction as l } from "../../utils/dist/guard.js";
@@ -14,7 +14,7 @@ var m = (e, t) => {
14
14
  }, d = (e) => {
15
15
  var t;
16
16
  return ((t = e.ids) == null ? void 0 : t.content) ?? `menu:${e.id}:content`;
17
- }, N = (e) => {
17
+ }, M = (e) => {
18
18
  var t;
19
19
  return ((t = e.ids) == null ? void 0 : t.arrow) ?? `menu:${e.id}:arrow`;
20
20
  }, T = (e) => {
@@ -23,21 +23,21 @@ var m = (e, t) => {
23
23
  }, W = (e, t) => {
24
24
  var r, n;
25
25
  return ((n = (r = e.ids) == null ? void 0 : r.group) == null ? void 0 : n.call(r, t)) ?? `menu:${e.id}:group:${t}`;
26
- }, h = (e, t) => `${e.id}/${t}`, D = (e) => (e == null ? void 0 : e.dataset.value) ?? null, G = (e, t) => {
26
+ }, h = (e, t) => `${e.id}/${t}`, G = (e) => (e == null ? void 0 : e.dataset.value) ?? null, j = (e, t) => {
27
27
  var r, n;
28
28
  return ((n = (r = e.ids) == null ? void 0 : r.groupLabel) == null ? void 0 : n.call(r, t)) ?? `menu:${e.id}:group-label:${t}`;
29
- }, v = (e) => e.getById(d(e)), R = (e) => e.getById(T(e)), w = (e) => e.getById(m(e)), j = (e, t) => t ? e.getById(h(e, t)) : null, q = (e) => e.getById(b(e)), B = (e) => a(e.getRootNode(), `[data-scope="menu"][data-part="trigger"][data-ownedby="${e.id}"]`), H = (e) => a(e.getRootNode(), `[data-scope="menu"][data-part="context-trigger"][data-ownedby="${e.id}"]`), K = (e, t) => t == null ? w(e) ?? B(e)[0] : e.getById(m(e, t)), o = (e) => {
29
+ }, c = (e) => e.getById(d(e)), q = (e) => e.getById(T(e)), w = (e) => e.getById(m(e)), H = (e, t) => t ? e.getById(h(e, t)) : null, K = (e) => e.getById(b(e)), B = (e) => a(e.getDoc(), `[data-scope="menu"][data-part="trigger"][data-ownedby="${e.id}"]`), N = (e) => a(e.getDoc(), `[data-scope="menu"][data-part="context-trigger"][data-ownedby="${e.id}"]`), O = (e, t) => t == null ? w(e) ?? B(e)[0] : e.getById(m(e, t)), o = (e) => {
30
30
  const r = `[role^="menuitem"][data-ownedby=${CSS.escape(d(e))}]:not([data-disabled])`;
31
- return a(v(e), r);
32
- }, O = (e) => $(o(e)), V = (e) => y(o(e)), g = (e, t) => t ? e.id === t || e.dataset.value === t : !1, z = (e, t) => {
31
+ return a(c(e), r);
32
+ }, V = (e) => $(o(e)), z = (e) => y(o(e)), g = (e, t) => t ? e.id === t || e.dataset.value === t : !1, J = (e, t) => {
33
33
  const r = o(e), n = r.findIndex((i) => g(i, t.value));
34
34
  return E(r, n, { loop: t.loop ?? t.loopFocus });
35
- }, J = (e, t) => {
35
+ }, Q = (e, t) => {
36
36
  const r = o(e), n = r.findIndex((i) => g(i, t.value));
37
37
  return p(r, n, { loop: t.loop ?? t.loopFocus });
38
- }, Q = (e, t) => {
38
+ }, R = (e, t) => {
39
39
  const r = o(e), n = r.find((i) => g(i, t.value));
40
- return c(r, { state: t.typeaheadState, key: t.key, activeId: (n == null ? void 0 : n.id) ?? null });
40
+ return v(r, { state: t.typeaheadState, key: t.key, activeId: (n == null ? void 0 : n.id) ?? null });
41
41
  }, U = (e) => u(e) && (e.dataset.disabled === "" || e.hasAttribute("disabled")), X = (e) => {
42
42
  var t;
43
43
  return !!((t = e == null ? void 0 : e.getAttribute("role")) != null && t.startsWith("menuitem")) && !!(e != null && e.hasAttribute("data-controls"));
@@ -49,7 +49,7 @@ function Y(e, t) {
49
49
  }
50
50
  function A(e) {
51
51
  const t = d(e);
52
- return v(e) ?? e.getDoc().getElementById(t);
52
+ return c(e) ?? e.getDoc().getElementById(t);
53
53
  }
54
54
  function S(e, t) {
55
55
  if (!u(e)) return !1;
@@ -63,26 +63,26 @@ function S(e, t) {
63
63
  }
64
64
  export {
65
65
  Y as dispatchSelectionEvent,
66
- K as getActiveTriggerEl,
67
- N as getArrowId,
68
- v as getContentEl,
66
+ O as getActiveTriggerEl,
67
+ M as getArrowId,
68
+ c as getContentEl,
69
69
  d as getContentId,
70
- q as getContextTriggerEl,
71
- H as getContextTriggerEls,
70
+ K as getContextTriggerEl,
71
+ N as getContextTriggerEls,
72
72
  b as getContextTriggerId,
73
- Q as getElemByKey,
73
+ R as getElemByKey,
74
74
  o as getElements,
75
- O as getFirstEl,
75
+ V as getFirstEl,
76
76
  W as getGroupId,
77
- G as getGroupLabelId,
78
- j as getItemEl,
77
+ j as getGroupLabelId,
78
+ H as getItemEl,
79
79
  h as getItemId,
80
- D as getItemValue,
81
- V as getLastEl,
82
- z as getNextEl,
83
- R as getPositionerEl,
80
+ G as getItemValue,
81
+ z as getLastEl,
82
+ J as getNextEl,
83
+ q as getPositionerEl,
84
84
  T as getPositionerId,
85
- J as getPrevEl,
85
+ Q as getPrevEl,
86
86
  w as getTriggerEl,
87
87
  B as getTriggerEls,
88
88
  m as getTriggerId,
@@ -14,7 +14,7 @@ import { addDomEvent as te, getEventTarget as L } from "../../dom-query/dist/eve
14
14
  import { trackDismissableElement as ne } from "../../dismissable/dist/dismissable-layer.js";
15
15
  import { getByTypeahead as ie } from "../../dom-query/dist/typeahead.js";
16
16
  import { clickIfLink as oe } from "../../dom-query/dist/navigate.js";
17
- import { scrollIntoView as re } from "../../dom-query/dist/scroll.js";
17
+ import { scrollIntoView as re } from "../../dom-query/dist/overflow.js";
18
18
  var { not: a, and: O, or: se } = X(), Le = K({
19
19
  props({ props: e }) {
20
20
  return {
@@ -5,7 +5,7 @@ import { getPlacementDetails as V } from "./placement.js";
5
5
  import { raf as ee } from "../../dom-query/dist/raf.js";
6
6
  import { getWindow as te, isHTMLElement as re } from "../../dom-query/dist/node.js";
7
7
  import { getComputedStyle as ne } from "../../dom-query/dist/computed-style.js";
8
- import { noop as W } from "../../utils/dist/functions.js";
8
+ import { noop as H } from "../../utils/dist/functions.js";
9
9
  import { isNull as ie } from "../../utils/dist/guard.js";
10
10
  import { compact as oe } from "../../utils/dist/object.js";
11
11
  var se = {
@@ -22,14 +22,14 @@ var se = {
22
22
  overflowPadding: 8,
23
23
  arrowPadding: 4
24
24
  };
25
- function $(e, t) {
25
+ function U(e, t) {
26
26
  const i = e.devicePixelRatio || 1;
27
27
  return Math.round(t * i) / i;
28
28
  }
29
- function m(e, t) {
29
+ function y(e, t) {
30
30
  return e != null && Math.abs(e - t) < 0.5;
31
31
  }
32
- function w(e) {
32
+ function b(e) {
33
33
  return typeof e == "function" ? e() : e === "clipping-ancestors" ? "clippingAncestors" : e;
34
34
  }
35
35
  function le(e, t, i) {
@@ -39,65 +39,54 @@ function le(e, t, i) {
39
39
  function fe(e, t) {
40
40
  if (!ie(t.offset ?? t.gutter))
41
41
  return k(({ placement: i }) => {
42
- var s, l;
43
- const o = ((e == null ? void 0 : e.clientHeight) || 0) / 2, f = ((s = t.offset) == null ? void 0 : s.mainAxis) ?? t.gutter, u = typeof f == "number" ? f + o : f ?? o, { hasAlign: n } = V(i), c = n ? void 0 : t.shift, d = ((l = t.offset) == null ? void 0 : l.crossAxis) ?? c;
42
+ var l, a;
43
+ const o = ((e == null ? void 0 : e.clientHeight) || 0) / 2, f = ((l = t.offset) == null ? void 0 : l.mainAxis) ?? t.gutter, p = typeof f == "number" ? f + o : f ?? o, { hasAlign: n } = V(i), s = n ? void 0 : t.shift, d = ((a = t.offset) == null ? void 0 : a.crossAxis) ?? s;
44
44
  return oe({
45
45
  crossAxis: d,
46
- mainAxis: u,
46
+ mainAxis: p,
47
47
  alignmentAxis: t.shift
48
48
  });
49
49
  });
50
50
  }
51
51
  function ae(e) {
52
- if (e.flip)
53
- return L(() => {
54
- const t = w(e.boundary);
55
- return {
56
- ...t ? { boundary: t } : void 0,
57
- padding: e.overflowPadding,
58
- fallbackPlacements: e.flip === !0 ? void 0 : e.flip
59
- };
60
- });
52
+ if (!e.flip) return;
53
+ const t = b(e.boundary);
54
+ return L({
55
+ ...t ? { boundary: t } : void 0,
56
+ padding: e.overflowPadding,
57
+ fallbackPlacements: e.flip === !0 ? void 0 : e.flip
58
+ });
61
59
  }
62
60
  function ce(e) {
63
- if (!(!e.slide && !e.overlap))
64
- return N(() => {
65
- const t = w(e.boundary);
66
- return {
67
- ...t ? { boundary: t } : void 0,
68
- mainAxis: e.slide,
69
- crossAxis: e.overlap,
70
- padding: e.overflowPadding,
71
- limiter: J()
72
- };
73
- });
61
+ if (!e.slide && !e.overlap) return;
62
+ const t = b(e.boundary);
63
+ return N({
64
+ ...t ? { boundary: t } : void 0,
65
+ mainAxis: e.slide,
66
+ crossAxis: e.overlap,
67
+ padding: e.overflowPadding,
68
+ limiter: J()
69
+ });
74
70
  }
75
71
  function de(e) {
76
72
  if (e.sizeMiddleware === !1 && !e.sameWidth && !e.fitViewport) return;
77
73
  let t, i, o, f;
78
- return Y(() => {
79
- const u = w(e.boundary);
80
- return {
81
- padding: e.overflowPadding,
82
- ...u ? { boundary: u } : void 0,
83
- apply({ elements: n, rects: c, availableHeight: d, availableWidth: s }) {
84
- const l = n.floating, g = Math.round(c.reference.width), h = Math.round(c.reference.height);
85
- s = Math.floor(s), d = Math.floor(d), m(t, g) || (l.style.setProperty("--reference-width", `${g}px`), t = g), m(i, h) || (l.style.setProperty("--reference-height", `${h}px`), i = h), m(o, s) || (l.style.setProperty("--available-width", `${s}px`), o = s), m(f, d) || (l.style.setProperty("--available-height", `${d}px`), f = d);
86
- }
87
- };
74
+ return Y({
75
+ padding: e.overflowPadding,
76
+ apply({ elements: p, rects: n, availableHeight: s, availableWidth: d }) {
77
+ const l = p.floating, a = Math.round(n.reference.width), g = Math.round(n.reference.height);
78
+ d = Math.floor(d), s = Math.floor(s), y(t, a) || (l.style.setProperty("--reference-width", `${a}px`), t = a), y(i, g) || (l.style.setProperty("--reference-height", `${g}px`), i = g), y(o, d) || (l.style.setProperty("--available-width", `${d}px`), o = d), y(f, s) || (l.style.setProperty("--available-height", `${s}px`), f = s);
79
+ }
88
80
  });
89
81
  }
90
82
  function ue(e) {
91
83
  if (e.hideWhenDetached)
92
- return G(() => ({
93
- strategy: "referenceHidden",
94
- boundary: w(e.boundary) ?? "clippingAncestors"
95
- }));
84
+ return G({ strategy: "referenceHidden", boundary: b(e.boundary) ?? "clippingAncestors" });
96
85
  }
97
86
  function pe(e) {
98
87
  return e ? e === !0 ? { ancestorResize: !0, ancestorScroll: !0, elementResize: !0, layoutShift: !0 } : e : {};
99
88
  }
100
- var ye = [
89
+ var me = [
101
90
  "transform",
102
91
  "visibility",
103
92
  "pointer-events",
@@ -109,9 +98,9 @@ var ye = [
109
98
  "--available-width",
110
99
  "--available-height",
111
100
  "--transform-origin"
112
- ], me = ["top", "right", "bottom", "left"];
113
- function F(e, t) {
114
- if (!e) return W;
101
+ ], ye = ["top", "right", "bottom", "left"];
102
+ function $(e, t) {
103
+ if (!e) return H;
115
104
  const i = new Map(t.map((o) => [o, e.style.getPropertyValue(o)]));
116
105
  return () => {
117
106
  i.forEach((o, f) => {
@@ -119,81 +108,81 @@ function F(e, t) {
119
108
  }), e.style.length === 0 && e.removeAttribute("style");
120
109
  };
121
110
  }
122
- function H(e) {
111
+ function F(e) {
123
112
  return e == null ? null : re(e) ? e : typeof e == "object" && e && "contextElement" in e && e.contextElement ? e.contextElement : e;
124
113
  }
125
114
  function ge(e, t, i = {}) {
126
115
  const o = () => (typeof t == "function" ? t() : t) ?? null, f = () => {
127
- var a;
116
+ var c;
128
117
  const r = typeof e == "function" ? e() : e;
129
- return ((a = i.getAnchorElement) == null ? void 0 : a.call(i)) ?? r;
130
- }, u = () => {
118
+ return ((c = i.getAnchorElement) == null ? void 0 : c.call(i)) ?? r;
119
+ }, p = () => {
131
120
  const r = f();
132
121
  return !r && !i.getAnchorRect ? null : K(r, i.getAnchorRect);
133
122
  }, n = Object.assign({}, se, i);
134
- let c = [], d = null, s, l;
123
+ let s = [], d = null, l, a;
135
124
  function g(r) {
136
- s == null || s(), l == null || l(), d = r, s = n.restoreStyles ? F(r, ye) : void 0;
137
- const a = r.querySelector("[data-part=arrow]");
138
- l = n.restoreStyles ? F(a, me) : void 0, c = [
139
- fe(a, n),
125
+ l == null || l(), a == null || a(), d = r, l = n.restoreStyles ? $(r, me) : void 0;
126
+ const c = r.querySelector("[data-part=arrow]");
127
+ a = n.restoreStyles ? $(c, ye) : void 0, s = [
128
+ fe(c, n),
140
129
  ae(n),
141
130
  ce(n),
142
- le(a, r.ownerDocument, n),
143
- Z(a),
131
+ le(c, r.ownerDocument, n),
132
+ Z(c),
144
133
  _(
145
134
  { gutter: n.gutter, offset: n.offset, overlap: n.overlap },
146
- a
135
+ c
147
136
  ),
148
137
  de(n),
149
138
  ue(n),
150
139
  Q
151
140
  ];
152
141
  }
153
- const { placement: h, strategy: I, onComplete: P, onPositioned: y } = n;
154
- let z, R, x = !1, C, D, A = W;
142
+ const { placement: W, strategy: I, onComplete: v, onPositioned: m } = n;
143
+ let E, z, w = !1, R, C, P = H;
155
144
  const j = pe(n.listeners);
156
145
  function q() {
157
146
  if (!n.listeners) return;
158
- const r = f(), a = u(), p = o();
159
- if (!a || !p) return;
160
- (H(r) !== H(C) || p !== D) && (A(), C = r, D = p, A = T(a, p, S, j));
147
+ const r = f(), c = p(), u = o();
148
+ if (!c || !u) return;
149
+ (F(r) !== F(R) || u !== C) && (P(), R = r, C = u, P = T(c, u, O, j));
161
150
  }
162
- async function O() {
163
- var U;
151
+ async function D() {
152
+ var S;
164
153
  q();
165
154
  const r = o();
166
155
  if (!r) return;
167
- r !== d && (g(r), x = !1);
168
- const a = u();
169
- if (!a) return;
170
- const p = await B(a, r, {
171
- placement: h,
172
- middleware: c,
156
+ r !== d && (g(r), w = !1);
157
+ const c = p();
158
+ if (!c) return;
159
+ const u = await B(c, r, {
160
+ placement: W,
161
+ middleware: s,
173
162
  strategy: I
174
163
  });
175
- P == null || P(p);
176
- const M = te(r), v = $(M, p.x), b = $(M, p.y);
177
- if (m(z, v) || (r.style.setProperty("--x", `${v}px`), z = v), m(R, b) || (r.style.setProperty("--y", `${b}px`), R = b), n.hideWhenDetached && (((U = p.middlewareData.hide) == null ? void 0 : U.referenceHidden) ? (r.style.setProperty("visibility", "hidden"), r.style.setProperty("pointer-events", "none")) : (r.style.removeProperty("visibility"), r.style.removeProperty("pointer-events"))), !x) {
178
- const E = r.firstElementChild;
179
- E && (r.style.setProperty("--z-index", ne(E).zIndex), x = !0);
164
+ v == null || v(u);
165
+ const x = te(r), h = U(x, u.x), A = U(x, u.y);
166
+ if (y(E, h) || (r.style.setProperty("--x", `${h}px`), E = h), y(z, A) || (r.style.setProperty("--y", `${A}px`), z = A), n.hideWhenDetached && (((S = u.middlewareData.hide) == null ? void 0 : S.referenceHidden) ? (r.style.setProperty("visibility", "hidden"), r.style.setProperty("pointer-events", "none")) : (r.style.removeProperty("visibility"), r.style.removeProperty("pointer-events"))), !w) {
167
+ const M = r.firstElementChild;
168
+ M && (r.style.setProperty("--z-index", ne(M).zIndex), w = !0);
180
169
  }
181
170
  }
182
- async function S() {
183
- i.updatePosition ? (await i.updatePosition({ updatePosition: O, floatingElement: o() }), y == null || y({ placed: !0 })) : await O();
171
+ async function O() {
172
+ i.updatePosition ? (await i.updatePosition({ updatePosition: D, floatingElement: o() }), m == null || m({ placed: !0 })) : await D();
184
173
  }
185
- return S(), () => {
186
- A(), l == null || l(), s == null || s(), y == null || y({ placed: !1 });
174
+ return O(), () => {
175
+ P(), a == null || a(), l == null || l(), m == null || m({ placed: !1 });
187
176
  };
188
177
  }
189
178
  function Re(e, t, i = {}) {
190
- const { defer: o, ...f } = i, u = o ? ee : (c) => c(), n = [];
179
+ const { defer: o, ...f } = i, p = o ? ee : (s) => s(), n = [];
191
180
  return n.push(
192
- u(() => {
181
+ p(() => {
193
182
  n.push(ge(e, t, f));
194
183
  })
195
184
  ), () => {
196
- n.forEach((c) => c == null ? void 0 : c());
185
+ n.forEach((s) => s == null ? void 0 : s());
197
186
  };
198
187
  }
199
188
  export {