@serendie/ui 0.1.16 → 0.2.0

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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -9
  3. package/dist/components/{Accordion.d.ts → Accordion/Accordion.d.ts} +2 -2
  4. package/dist/components/{Accordion.js → Accordion/Accordion.js} +10 -10
  5. package/dist/components/Accordion/index.d.ts +1 -0
  6. package/dist/components/AccordionGroup.js +4 -4
  7. package/dist/components/Avatar.js +4 -4
  8. package/dist/components/Badge.js +4 -4
  9. package/dist/components/Banner.js +4 -4
  10. package/dist/components/BottomNavigation.js +3 -3
  11. package/dist/components/BottomNavigationItem.js +4 -4
  12. package/dist/components/Button.js +7 -7
  13. package/dist/components/CheckBox.js +4 -4
  14. package/dist/components/ChoiceBox.js +10 -10
  15. package/dist/components/DashboardWidget.js +4 -4
  16. package/dist/components/Divider.js +4 -4
  17. package/dist/components/Drawer.js +4 -4
  18. package/dist/components/DropdownMenu.js +4 -4
  19. package/dist/components/IconButton.js +4 -4
  20. package/dist/components/ListItem.js +4 -4
  21. package/dist/components/ModalDialog.js +4 -4
  22. package/dist/components/NotificationBadge.js +4 -4
  23. package/dist/components/ProgressIndicator.js +4 -4
  24. package/dist/components/RadioButton.js +4 -4
  25. package/dist/components/Search.js +6 -6
  26. package/dist/components/Select.js +4 -4
  27. package/dist/components/Switch.js +4 -4
  28. package/dist/components/TabItem.js +4 -4
  29. package/dist/components/Tabs.js +4 -4
  30. package/dist/components/TextArea.js +4 -4
  31. package/dist/components/TextField.js +4 -4
  32. package/dist/components/Toast.js +3 -3
  33. package/dist/components/TopAppBar.js +4 -4
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +89 -89
  36. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +3 -4
  37. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -5
  38. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +0 -1
  39. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +3 -4
  40. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root.js +2 -3
  41. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-fallback.js +6 -7
  42. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-image.js +5 -6
  43. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +2 -3
  44. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js +5 -6
  45. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +0 -1
  46. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js +0 -1
  47. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js +4 -5
  48. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +8 -9
  49. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root.js +0 -1
  50. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +3 -4
  51. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-control.js +5 -6
  52. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-input.js +6 -7
  53. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +0 -1
  54. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-text.js +3 -4
  55. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item.js +0 -1
  56. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +5 -6
  57. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +4 -5
  58. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +5 -6
  59. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +4 -5
  60. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +5 -6
  61. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +0 -1
  62. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +0 -1
  63. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js +5 -6
  64. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js +4 -5
  65. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js +0 -1
  66. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +3 -4
  67. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +0 -1
  68. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +2 -3
  69. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js +3 -4
  70. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +2 -3
  71. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js +3 -4
  72. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +3 -4
  73. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-hidden-input.js +0 -1
  74. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -5
  75. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +3 -4
  76. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root.js +3 -4
  77. package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +3 -4
  78. package/dist/node_modules/@ark-ui/react/dist/components/select/select-control.js +6 -7
  79. package/dist/node_modules/@ark-ui/react/dist/components/select/select-item.js +0 -1
  80. package/dist/node_modules/@ark-ui/react/dist/components/select/select-label.js +4 -5
  81. package/dist/node_modules/@ark-ui/react/dist/components/select/select-positioner.js +4 -5
  82. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +7 -7
  83. package/dist/node_modules/@ark-ui/react/dist/components/select/select-trigger.js +5 -6
  84. package/dist/node_modules/@ark-ui/react/dist/components/select/select-value-text.js +5 -6
  85. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +35 -31
  86. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-control.js +4 -5
  87. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -5
  88. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-label.js +4 -5
  89. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root.js +8 -9
  90. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js +4 -5
  91. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-list.js +3 -4
  92. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js +3 -4
  93. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +10 -10
  94. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-root.js +0 -1
  95. package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-title.js +0 -1
  96. package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +4 -4
  97. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +361 -303
  98. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +229 -216
  99. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +19 -19
  100. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +39 -38
  101. package/dist/node_modules/@serendie/design-token/dist/panda-tokens.js +823 -20
  102. package/dist/node_modules/@serendie/design-token/dist/tokens.js +346 -25
  103. package/dist/node_modules/@zag-js/accordion/dist/index.js +12 -12
  104. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +13 -62
  105. package/dist/node_modules/@zag-js/avatar/dist/index.js +12 -10
  106. package/dist/node_modules/@zag-js/checkbox/dist/index.js +99 -92
  107. package/dist/node_modules/@zag-js/collapsible/dist/index.js +5 -5
  108. package/dist/node_modules/@zag-js/collection/dist/index.js +21 -21
  109. package/dist/node_modules/@zag-js/combobox/dist/index.js +30 -31
  110. package/dist/node_modules/@zag-js/core/dist/index.js +285 -320
  111. package/dist/node_modules/@zag-js/dialog/dist/index.js +56 -62
  112. package/dist/node_modules/@zag-js/dismissable/dist/index.js +3 -3
  113. package/dist/node_modules/@zag-js/dom-event/dist/index.js +88 -115
  114. package/dist/node_modules/@zag-js/dom-query/dist/index.js +2 -2
  115. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +73 -0
  116. package/dist/node_modules/@zag-js/interact-outside/dist/index.js +33 -33
  117. package/dist/node_modules/@zag-js/menu/dist/index.js +81 -77
  118. package/dist/node_modules/@zag-js/popper/dist/index.js +86 -79
  119. package/dist/node_modules/@zag-js/radio-group/dist/index.js +116 -109
  120. package/dist/node_modules/@zag-js/react/dist/index.js +44 -43
  121. package/dist/node_modules/@zag-js/select/dist/index.js +203 -231
  122. package/dist/node_modules/@zag-js/store/dist/index.js +110 -110
  123. package/dist/node_modules/@zag-js/switch/dist/index.js +62 -55
  124. package/dist/node_modules/@zag-js/tabs/dist/index.js +64 -61
  125. package/dist/node_modules/@zag-js/toast/dist/index.js +174 -173
  126. package/dist/node_modules/@zag-js/utils/dist/index.js +93 -71
  127. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  128. package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +217 -219
  129. package/dist/preset.d.ts +807 -4
  130. package/dist/{ui/styled-system → styled-system}/css/css.js +5 -6
  131. package/dist/{ui/styled-system → styled-system}/css/cva.js +4 -4
  132. package/dist/{ui/styled-system → styled-system}/css/sva.js +3 -3
  133. package/dist/styled-system/jsx/is-valid-prop.js +6 -0
  134. package/dist/styles.css +1 -1
  135. package/dist/tokens/getToken.d.ts +324 -3
  136. package/dist/tokens/index.d.ts +806 -3
  137. package/package.json +31 -5
  138. package/styled-system/css/css.js +1 -1
  139. package/styled-system/jsx/is-valid-prop.js +1 -1
  140. package/styled-system/themes/theme-asagi.json +1 -1
  141. package/styled-system/themes/theme-kurikawa.json +1 -1
  142. package/styled-system/themes/theme-sumire.json +1 -1
  143. package/styled-system/themes/theme-tsutsuji.json +1 -1
  144. package/styled-system/tokens/index.js +1238 -54
  145. package/styled-system/tokens/tokens.d.ts +3 -3
  146. package/styled-system/types/conditions.d.ts +2 -2
  147. package/styled-system/types/prop-type.d.ts +1 -1
  148. package/dist/ui/styled-system/jsx/is-valid-prop.js +0 -6
  149. /package/dist/{ui/styled-system → styled-system}/css/conditions.js +0 -0
  150. /package/dist/{ui/styled-system → styled-system}/css/cx.js +0 -0
  151. /package/dist/{ui/styled-system → styled-system}/helpers.js +0 -0
  152. /package/dist/{ui/styled-system → styled-system}/jsx/box.js +0 -0
  153. /package/dist/{ui/styled-system → styled-system}/jsx/factory-helper.js +0 -0
  154. /package/dist/{ui/styled-system → styled-system}/jsx/factory.js +0 -0
  155. /package/dist/{ui/styled-system → styled-system}/patterns/box.js +0 -0
@@ -1,372 +1,385 @@
1
- import { offset as tt, shift as et, flip as it, size as nt, arrow as ot, limitShift as st, computePosition as rt } from "../../core/dist/floating-ui.core.js";
2
- import { createCoords as b, rectToClientRect as P, round as A, floor as z, max as T, min as V } from "../../utils/dist/floating-ui.utils.js";
3
- import { getOverflowAncestors as S, isElement as x, getWindow as E, getComputedStyle as y, getDocumentElement as C, isHTMLElement as R, isWebKit as X, isTopLayer as $, getNodeName as M, isOverflowElement as _, getNodeScroll as N, getParentNode as W, isLastTraversableNode as D, isTableElement as ct, isContainingBlock as j, getContainingBlock as lt } from "../../utils/dist/floating-ui.utils.dom.js";
4
- function G(t) {
5
- const e = y(t);
6
- let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
7
- const o = R(t), c = o ? t.offsetWidth : n, s = o ? t.offsetHeight : i, r = A(n) !== c || A(i) !== s;
8
- return r && (n = c, i = s), {
9
- width: n,
10
- height: i,
1
+ import { offset as et, flip as it, shift as nt, arrow as ot, size as st, hide as rt, computePosition as ct, limitShift as lt } from "../../core/dist/floating-ui.core.js";
2
+ import { createCoords as R, rectToClientRect as Y, floor as z, max as E, round as D, min as S } from "../../utils/dist/floating-ui.utils.js";
3
+ import { getOverflowAncestors as V, isElement as y, getDocumentElement as b, getWindow as L, getFrameElement as U, getComputedStyle as x, isHTMLElement as C, isWebKit as j, isTopLayer as M, getParentNode as W, isLastTraversableNode as A, isTableElement as ft, isContainingBlock as G, getContainingBlock as ut, getNodeName as _, isOverflowElement as k, getNodeScroll as N } from "../../utils/dist/floating-ui.utils.dom.js";
4
+ function J(t) {
5
+ const e = x(t);
6
+ let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
7
+ const o = C(t), c = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, r = D(i) !== c || D(n) !== s;
8
+ return r && (i = c, n = s), {
9
+ width: i,
10
+ height: n,
11
11
  $: r
12
12
  };
13
13
  }
14
- function k(t) {
15
- return x(t) ? t : t.contextElement;
14
+ function q(t) {
15
+ return y(t) ? t : t.contextElement;
16
16
  }
17
17
  function F(t) {
18
- const e = k(t);
19
- if (!R(e))
20
- return b(1);
21
- const n = e.getBoundingClientRect(), {
22
- width: i,
18
+ const e = q(t);
19
+ if (!C(e))
20
+ return R(1);
21
+ const i = e.getBoundingClientRect(), {
22
+ width: n,
23
23
  height: o,
24
24
  $: c
25
- } = G(e);
26
- let s = (c ? A(n.width) : n.width) / i, r = (c ? A(n.height) : n.height) / o;
25
+ } = J(e);
26
+ let s = (c ? D(i.width) : i.width) / n, r = (c ? D(i.height) : i.height) / o;
27
27
  return (!s || !Number.isFinite(s)) && (s = 1), (!r || !Number.isFinite(r)) && (r = 1), {
28
28
  x: s,
29
29
  y: r
30
30
  };
31
31
  }
32
- const ft = /* @__PURE__ */ b(0);
33
- function J(t) {
34
- const e = E(t);
35
- return !X() || !e.visualViewport ? ft : {
32
+ const ht = /* @__PURE__ */ R(0);
33
+ function Q(t) {
34
+ const e = L(t);
35
+ return !j() || !e.visualViewport ? ht : {
36
36
  x: e.visualViewport.offsetLeft,
37
37
  y: e.visualViewport.offsetTop
38
38
  };
39
39
  }
40
- function ut(t, e, n) {
41
- return e === void 0 && (e = !1), !n || e && n !== E(t) ? !1 : e;
40
+ function at(t, e, i) {
41
+ return e === void 0 && (e = !1), !i || e && i !== L(t) ? !1 : e;
42
42
  }
43
- function L(t, e, n, i) {
44
- e === void 0 && (e = !1), n === void 0 && (n = !1);
45
- const o = t.getBoundingClientRect(), c = k(t);
46
- let s = b(1);
47
- e && (i ? x(i) && (s = F(i)) : s = F(t));
48
- const r = ut(c, n, i) ? J(c) : b(0);
49
- let l = (o.left + r.x) / s.x, f = (o.top + r.y) / s.y, u = o.width / s.x, h = o.height / s.y;
43
+ function T(t, e, i, n) {
44
+ e === void 0 && (e = !1), i === void 0 && (i = !1);
45
+ const o = t.getBoundingClientRect(), c = q(t);
46
+ let s = R(1);
47
+ e && (n ? y(n) && (s = F(n)) : s = F(t));
48
+ const r = at(c, i, n) ? Q(c) : R(0);
49
+ let f = (o.left + r.x) / s.x, l = (o.top + r.y) / s.y, u = o.width / s.x, a = o.height / s.y;
50
50
  if (c) {
51
- const w = E(c), g = i && x(i) ? E(i) : i;
52
- let v = w, a = v.frameElement;
53
- for (; a && i && g !== v; ) {
54
- const p = F(a), d = a.getBoundingClientRect(), m = y(a), O = d.left + (a.clientLeft + parseFloat(m.paddingLeft)) * p.x, B = d.top + (a.clientTop + parseFloat(m.paddingTop)) * p.y;
55
- l *= p.x, f *= p.y, u *= p.x, h *= p.y, l += O, f += B, v = E(a), a = v.frameElement;
51
+ const p = L(c), h = n && y(n) ? L(n) : n;
52
+ let v = p, d = U(v);
53
+ for (; d && n && h !== v; ) {
54
+ const m = F(d), g = d.getBoundingClientRect(), w = x(d), O = g.left + (d.clientLeft + parseFloat(w.paddingLeft)) * m.x, B = g.top + (d.clientTop + parseFloat(w.paddingTop)) * m.y;
55
+ f *= m.x, l *= m.y, u *= m.x, a *= m.y, f += O, l += B, v = L(d), d = U(v);
56
56
  }
57
57
  }
58
- return P({
58
+ return Y({
59
59
  width: u,
60
- height: h,
61
- x: l,
62
- y: f
60
+ height: a,
61
+ x: f,
62
+ y: l
63
63
  });
64
64
  }
65
- function ht(t) {
65
+ function dt(t) {
66
66
  let {
67
67
  elements: e,
68
- rect: n,
69
- offsetParent: i,
68
+ rect: i,
69
+ offsetParent: n,
70
70
  strategy: o
71
71
  } = t;
72
- const c = o === "fixed", s = C(i), r = e ? $(e.floating) : !1;
73
- if (i === s || r && c)
74
- return n;
75
- let l = {
72
+ const c = o === "fixed", s = b(n), r = e ? M(e.floating) : !1;
73
+ if (n === s || r && c)
74
+ return i;
75
+ let f = {
76
76
  scrollLeft: 0,
77
77
  scrollTop: 0
78
- }, f = b(1);
79
- const u = b(0), h = R(i);
80
- if ((h || !h && !c) && ((M(i) !== "body" || _(s)) && (l = N(i)), R(i))) {
81
- const w = L(i);
82
- f = F(i), u.x = w.x + i.clientLeft, u.y = w.y + i.clientTop;
78
+ }, l = R(1);
79
+ const u = R(0), a = C(n);
80
+ if ((a || !a && !c) && ((_(n) !== "body" || k(s)) && (f = N(n)), C(n))) {
81
+ const p = T(n);
82
+ l = F(n), u.x = p.x + n.clientLeft, u.y = p.y + n.clientTop;
83
83
  }
84
84
  return {
85
- width: n.width * f.x,
86
- height: n.height * f.y,
87
- x: n.x * f.x - l.scrollLeft * f.x + u.x,
88
- y: n.y * f.y - l.scrollTop * f.y + u.y
85
+ width: i.width * l.x,
86
+ height: i.height * l.y,
87
+ x: i.x * l.x - f.scrollLeft * l.x + u.x,
88
+ y: i.y * l.y - f.scrollTop * l.y + u.y
89
89
  };
90
90
  }
91
- function at(t) {
91
+ function gt(t) {
92
92
  return Array.from(t.getClientRects());
93
93
  }
94
- function Q(t) {
95
- return L(C(t)).left + N(t).scrollLeft;
94
+ function $(t, e) {
95
+ const i = N(t).scrollLeft;
96
+ return e ? e.left + i : T(b(t)).left + i;
96
97
  }
97
- function dt(t) {
98
- const e = C(t), n = N(t), i = t.ownerDocument.body, o = T(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), c = T(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
99
- let s = -n.scrollLeft + Q(t);
100
- const r = -n.scrollTop;
101
- return y(i).direction === "rtl" && (s += T(e.clientWidth, i.clientWidth) - o), {
98
+ function pt(t) {
99
+ const e = b(t), i = N(t), n = t.ownerDocument.body, o = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), c = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
100
+ let s = -i.scrollLeft + $(t);
101
+ const r = -i.scrollTop;
102
+ return x(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - o), {
102
103
  width: o,
103
104
  height: c,
104
105
  x: s,
105
106
  y: r
106
107
  };
107
108
  }
108
- function gt(t, e) {
109
- const n = E(t), i = C(t), o = n.visualViewport;
110
- let c = i.clientWidth, s = i.clientHeight, r = 0, l = 0;
109
+ function mt(t, e) {
110
+ const i = L(t), n = b(t), o = i.visualViewport;
111
+ let c = n.clientWidth, s = n.clientHeight, r = 0, f = 0;
111
112
  if (o) {
112
113
  c = o.width, s = o.height;
113
- const f = X();
114
- (!f || f && e === "fixed") && (r = o.offsetLeft, l = o.offsetTop);
114
+ const l = j();
115
+ (!l || l && e === "fixed") && (r = o.offsetLeft, f = o.offsetTop);
115
116
  }
116
117
  return {
117
118
  width: c,
118
119
  height: s,
119
120
  x: r,
120
- y: l
121
+ y: f
121
122
  };
122
123
  }
123
- function pt(t, e) {
124
- const n = L(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, c = R(t) ? F(t) : b(1), s = t.clientWidth * c.x, r = t.clientHeight * c.y, l = o * c.x, f = i * c.y;
124
+ function wt(t, e) {
125
+ const i = T(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, c = C(t) ? F(t) : R(1), s = t.clientWidth * c.x, r = t.clientHeight * c.y, f = o * c.x, l = n * c.y;
125
126
  return {
126
127
  width: s,
127
128
  height: r,
128
- x: l,
129
- y: f
129
+ x: f,
130
+ y: l
130
131
  };
131
132
  }
132
- function U(t, e, n) {
133
- let i;
133
+ function X(t, e, i) {
134
+ let n;
134
135
  if (e === "viewport")
135
- i = gt(t, n);
136
+ n = mt(t, i);
136
137
  else if (e === "document")
137
- i = dt(C(t));
138
- else if (x(e))
139
- i = pt(e, n);
138
+ n = pt(b(t));
139
+ else if (y(e))
140
+ n = wt(e, i);
140
141
  else {
141
- const o = J(t);
142
- i = {
142
+ const o = Q(t);
143
+ n = {
143
144
  ...e,
144
145
  x: e.x - o.x,
145
146
  y: e.y - o.y
146
147
  };
147
148
  }
148
- return P(i);
149
+ return Y(n);
149
150
  }
150
- function Y(t, e) {
151
- const n = W(t);
152
- return n === e || !x(n) || D(n) ? !1 : y(n).position === "fixed" || Y(n, e);
151
+ function Z(t, e) {
152
+ const i = W(t);
153
+ return i === e || !y(i) || A(i) ? !1 : x(i).position === "fixed" || Z(i, e);
153
154
  }
154
- function mt(t, e) {
155
- const n = e.get(t);
156
- if (n)
157
- return n;
158
- let i = S(t, [], !1).filter((r) => x(r) && M(r) !== "body"), o = null;
159
- const c = y(t).position === "fixed";
155
+ function vt(t, e) {
156
+ const i = e.get(t);
157
+ if (i)
158
+ return i;
159
+ let n = V(t, [], !1).filter((r) => y(r) && _(r) !== "body"), o = null;
160
+ const c = x(t).position === "fixed";
160
161
  let s = c ? W(t) : t;
161
- for (; x(s) && !D(s); ) {
162
- const r = y(s), l = j(s);
163
- !l && r.position === "fixed" && (o = null), (c ? !l && !o : !l && r.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || _(s) && !l && Y(t, s)) ? i = i.filter((u) => u !== s) : o = r, s = W(s);
162
+ for (; y(s) && !A(s); ) {
163
+ const r = x(s), f = G(s);
164
+ !f && r.position === "fixed" && (o = null), (c ? !f && !o : !f && r.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || k(s) && !f && Z(t, s)) ? n = n.filter((u) => u !== s) : o = r, s = W(s);
164
165
  }
165
- return e.set(t, i), i;
166
+ return e.set(t, n), n;
166
167
  }
167
- function wt(t) {
168
+ function yt(t) {
168
169
  let {
169
170
  element: e,
170
- boundary: n,
171
- rootBoundary: i,
171
+ boundary: i,
172
+ rootBoundary: n,
172
173
  strategy: o
173
174
  } = t;
174
- const s = [...n === "clippingAncestors" ? $(e) ? [] : mt(e, this._c) : [].concat(n), i], r = s[0], l = s.reduce((f, u) => {
175
- const h = U(e, u, o);
176
- return f.top = T(h.top, f.top), f.right = V(h.right, f.right), f.bottom = V(h.bottom, f.bottom), f.left = T(h.left, f.left), f;
177
- }, U(e, r, o));
175
+ const s = [...i === "clippingAncestors" ? M(e) ? [] : vt(e, this._c) : [].concat(i), n], r = s[0], f = s.reduce((l, u) => {
176
+ const a = X(e, u, o);
177
+ return l.top = E(a.top, l.top), l.right = S(a.right, l.right), l.bottom = S(a.bottom, l.bottom), l.left = E(a.left, l.left), l;
178
+ }, X(e, r, o));
178
179
  return {
179
- width: l.right - l.left,
180
- height: l.bottom - l.top,
181
- x: l.left,
182
- y: l.top
180
+ width: f.right - f.left,
181
+ height: f.bottom - f.top,
182
+ x: f.left,
183
+ y: f.top
183
184
  };
184
185
  }
185
- function vt(t) {
186
+ function xt(t) {
186
187
  const {
187
188
  width: e,
188
- height: n
189
- } = G(t);
189
+ height: i
190
+ } = J(t);
190
191
  return {
191
192
  width: e,
192
- height: n
193
+ height: i
193
194
  };
194
195
  }
195
- function xt(t, e, n) {
196
- const i = R(e), o = C(e), c = n === "fixed", s = L(t, !0, c, e);
196
+ function bt(t, e, i) {
197
+ const n = C(e), o = b(e), c = i === "fixed", s = T(t, !0, c, e);
197
198
  let r = {
198
199
  scrollLeft: 0,
199
200
  scrollTop: 0
200
201
  };
201
- const l = b(0);
202
- if (i || !i && !c)
203
- if ((M(e) !== "body" || _(o)) && (r = N(e)), i) {
204
- const h = L(e, !0, c, e);
205
- l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
206
- } else o && (l.x = Q(o));
207
- const f = s.left + r.scrollLeft - l.x, u = s.top + r.scrollTop - l.y;
202
+ const f = R(0);
203
+ if (n || !n && !c)
204
+ if ((_(e) !== "body" || k(o)) && (r = N(e)), n) {
205
+ const h = T(e, !0, c, e);
206
+ f.x = h.x + e.clientLeft, f.y = h.y + e.clientTop;
207
+ } else o && (f.x = $(o));
208
+ let l = 0, u = 0;
209
+ if (o && !n && !c) {
210
+ const h = o.getBoundingClientRect();
211
+ u = h.top + r.scrollTop, l = h.left + r.scrollLeft - // RTL <body> scrollbar.
212
+ $(o, h);
213
+ }
214
+ const a = s.left + r.scrollLeft - f.x - l, p = s.top + r.scrollTop - f.y - u;
208
215
  return {
209
- x: f,
210
- y: u,
216
+ x: a,
217
+ y: p,
211
218
  width: s.width,
212
219
  height: s.height
213
220
  };
214
221
  }
215
222
  function I(t) {
216
- return y(t).position === "static";
223
+ return x(t).position === "static";
217
224
  }
218
225
  function K(t, e) {
219
- return !R(t) || y(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
226
+ if (!C(t) || x(t).position === "fixed")
227
+ return null;
228
+ if (e)
229
+ return e(t);
230
+ let i = t.offsetParent;
231
+ return b(t) === i && (i = i.ownerDocument.body), i;
220
232
  }
221
- function Z(t, e) {
222
- const n = E(t);
223
- if ($(t))
224
- return n;
225
- if (!R(t)) {
233
+ function tt(t, e) {
234
+ const i = L(t);
235
+ if (M(t))
236
+ return i;
237
+ if (!C(t)) {
226
238
  let o = W(t);
227
- for (; o && !D(o); ) {
228
- if (x(o) && !I(o))
239
+ for (; o && !A(o); ) {
240
+ if (y(o) && !I(o))
229
241
  return o;
230
242
  o = W(o);
231
243
  }
232
- return n;
244
+ return i;
233
245
  }
234
- let i = K(t, e);
235
- for (; i && ct(i) && I(i); )
236
- i = K(i, e);
237
- return i && D(i) && I(i) && !j(i) ? n : i || lt(t) || n;
246
+ let n = K(t, e);
247
+ for (; n && ft(n) && I(n); )
248
+ n = K(n, e);
249
+ return n && A(n) && I(n) && !G(n) ? i : n || ut(t) || i;
238
250
  }
239
- const yt = async function(t) {
240
- const e = this.getOffsetParent || Z, n = this.getDimensions, i = await n(t.floating);
251
+ const Rt = async function(t) {
252
+ const e = this.getOffsetParent || tt, i = this.getDimensions, n = await i(t.floating);
241
253
  return {
242
- reference: xt(t.reference, await e(t.floating), t.strategy),
254
+ reference: bt(t.reference, await e(t.floating), t.strategy),
243
255
  floating: {
244
256
  x: 0,
245
257
  y: 0,
246
- width: i.width,
247
- height: i.height
258
+ width: n.width,
259
+ height: n.height
248
260
  }
249
261
  };
250
262
  };
251
- function bt(t) {
252
- return y(t).direction === "rtl";
263
+ function Ct(t) {
264
+ return x(t).direction === "rtl";
253
265
  }
254
- const Rt = {
255
- convertOffsetParentRelativeRectToViewportRelativeRect: ht,
256
- getDocumentElement: C,
257
- getClippingRect: wt,
258
- getOffsetParent: Z,
259
- getElementRects: yt,
260
- getClientRects: at,
261
- getDimensions: vt,
266
+ const Ot = {
267
+ convertOffsetParentRelativeRectToViewportRelativeRect: dt,
268
+ getDocumentElement: b,
269
+ getClippingRect: yt,
270
+ getOffsetParent: tt,
271
+ getElementRects: Rt,
272
+ getClientRects: gt,
273
+ getDimensions: xt,
262
274
  getScale: F,
263
- isElement: x,
264
- isRTL: bt
275
+ isElement: y,
276
+ isRTL: Ct
265
277
  };
266
- function Ct(t, e) {
267
- let n = null, i;
268
- const o = C(t);
278
+ function Lt(t, e) {
279
+ let i = null, n;
280
+ const o = b(t);
269
281
  function c() {
270
282
  var r;
271
- clearTimeout(i), (r = n) == null || r.disconnect(), n = null;
283
+ clearTimeout(n), (r = i) == null || r.disconnect(), i = null;
272
284
  }
273
- function s(r, l) {
274
- r === void 0 && (r = !1), l === void 0 && (l = 1), c();
285
+ function s(r, f) {
286
+ r === void 0 && (r = !1), f === void 0 && (f = 1), c();
275
287
  const {
276
- left: f,
288
+ left: l,
277
289
  top: u,
278
- width: h,
279
- height: w
290
+ width: a,
291
+ height: p
280
292
  } = t.getBoundingClientRect();
281
- if (r || e(), !h || !w)
293
+ if (r || e(), !a || !p)
282
294
  return;
283
- const g = z(u), v = z(o.clientWidth - (f + h)), a = z(o.clientHeight - (u + w)), p = z(f), m = {
284
- rootMargin: -g + "px " + -v + "px " + -a + "px " + -p + "px",
285
- threshold: T(0, V(1, l)) || 1
295
+ const h = z(u), v = z(o.clientWidth - (l + a)), d = z(o.clientHeight - (u + p)), m = z(l), w = {
296
+ rootMargin: -h + "px " + -v + "px " + -d + "px " + -m + "px",
297
+ threshold: E(0, S(1, f)) || 1
286
298
  };
287
299
  let O = !0;
288
- function B(q) {
289
- const H = q[0].intersectionRatio;
290
- if (H !== l) {
300
+ function B(P) {
301
+ const H = P[0].intersectionRatio;
302
+ if (H !== f) {
291
303
  if (!O)
292
304
  return s();
293
- H ? s(!1, H) : i = setTimeout(() => {
305
+ H ? s(!1, H) : n = setTimeout(() => {
294
306
  s(!1, 1e-7);
295
307
  }, 1e3);
296
308
  }
297
309
  O = !1;
298
310
  }
299
311
  try {
300
- n = new IntersectionObserver(B, {
301
- ...m,
312
+ i = new IntersectionObserver(B, {
313
+ ...w,
302
314
  // Handle <iframe>s
303
315
  root: o.ownerDocument
304
316
  });
305
317
  } catch {
306
- n = new IntersectionObserver(B, m);
318
+ i = new IntersectionObserver(B, w);
307
319
  }
308
- n.observe(t);
320
+ i.observe(t);
309
321
  }
310
322
  return s(!0), c;
311
323
  }
312
- function Tt(t, e, n, i) {
313
- i === void 0 && (i = {});
324
+ function Wt(t, e, i, n) {
325
+ n === void 0 && (n = {});
314
326
  const {
315
327
  ancestorScroll: o = !0,
316
328
  ancestorResize: c = !0,
317
329
  elementResize: s = typeof ResizeObserver == "function",
318
330
  layoutShift: r = typeof IntersectionObserver == "function",
319
- animationFrame: l = !1
320
- } = i, f = k(t), u = o || c ? [...f ? S(f) : [], ...S(e)] : [];
321
- u.forEach((d) => {
322
- o && d.addEventListener("scroll", n, {
331
+ animationFrame: f = !1
332
+ } = n, l = q(t), u = o || c ? [...l ? V(l) : [], ...V(e)] : [];
333
+ u.forEach((g) => {
334
+ o && g.addEventListener("scroll", i, {
323
335
  passive: !0
324
- }), c && d.addEventListener("resize", n);
336
+ }), c && g.addEventListener("resize", i);
325
337
  });
326
- const h = f && r ? Ct(f, n) : null;
327
- let w = -1, g = null;
328
- s && (g = new ResizeObserver((d) => {
329
- let [m] = d;
330
- m && m.target === f && g && (g.unobserve(e), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
338
+ const a = l && r ? Lt(l, i) : null;
339
+ let p = -1, h = null;
340
+ s && (h = new ResizeObserver((g) => {
341
+ let [w] = g;
342
+ w && w.target === l && h && (h.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
331
343
  var O;
332
- (O = g) == null || O.observe(e);
333
- })), n();
334
- }), f && !l && g.observe(f), g.observe(e));
335
- let v, a = l ? L(t) : null;
336
- l && p();
337
- function p() {
338
- const d = L(t);
339
- a && (d.x !== a.x || d.y !== a.y || d.width !== a.width || d.height !== a.height) && n(), a = d, v = requestAnimationFrame(p);
344
+ (O = h) == null || O.observe(e);
345
+ })), i();
346
+ }), l && !f && h.observe(l), h.observe(e));
347
+ let v, d = f ? T(t) : null;
348
+ f && m();
349
+ function m() {
350
+ const g = T(t);
351
+ d && (g.x !== d.x || g.y !== d.y || g.width !== d.width || g.height !== d.height) && i(), d = g, v = requestAnimationFrame(m);
340
352
  }
341
- return n(), () => {
342
- var d;
343
- u.forEach((m) => {
344
- o && m.removeEventListener("scroll", n), c && m.removeEventListener("resize", n);
345
- }), h == null || h(), (d = g) == null || d.disconnect(), g = null, l && cancelAnimationFrame(v);
353
+ return i(), () => {
354
+ var g;
355
+ u.forEach((w) => {
356
+ o && w.removeEventListener("scroll", i), c && w.removeEventListener("resize", i);
357
+ }), a == null || a(), (g = h) == null || g.disconnect(), h = null, f && cancelAnimationFrame(v);
346
358
  };
347
359
  }
348
- const Ft = tt, Wt = et, Bt = it, zt = nt, At = ot, Dt = st, Nt = (t, e, n) => {
349
- const i = /* @__PURE__ */ new Map(), o = {
350
- platform: Rt,
351
- ...n
360
+ const Bt = et, zt = nt, Dt = it, At = st, Nt = rt, Ht = ot, It = lt, St = (t, e, i) => {
361
+ const n = /* @__PURE__ */ new Map(), o = {
362
+ platform: Ot,
363
+ ...i
352
364
  }, c = {
353
365
  ...o.platform,
354
- _c: i
366
+ _c: n
355
367
  };
356
- return rt(t, e, {
368
+ return ct(t, e, {
357
369
  ...o,
358
370
  platform: c
359
371
  });
360
372
  };
361
373
  export {
362
- At as arrow,
363
- Tt as autoUpdate,
364
- Nt as computePosition,
365
- Bt as flip,
366
- S as getOverflowAncestors,
367
- Dt as limitShift,
368
- Ft as offset,
369
- Rt as platform,
370
- Wt as shift,
371
- zt as size
374
+ Ht as arrow,
375
+ Wt as autoUpdate,
376
+ St as computePosition,
377
+ Dt as flip,
378
+ V as getOverflowAncestors,
379
+ Nt as hide,
380
+ It as limitShift,
381
+ Bt as offset,
382
+ Ot as platform,
383
+ zt as shift,
384
+ At as size
372
385
  };