@cryptlex/web-components 3.2.1 → 3.2.2

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 (31) hide show
  1. package/dist/components/ui/tabs.es.js +30 -30
  2. package/dist/components/ui/tabs.es.js.map +1 -1
  3. package/dist/node_modules/.pnpm/{@floating-ui_core@1.7.0 → @floating-ui_core@1.7.1}/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +126 -128
  4. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -0
  5. package/dist/node_modules/.pnpm/{@floating-ui_dom@1.7.0 → @floating-ui_dom@1.7.1}/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +1 -1
  6. package/dist/node_modules/.pnpm/{@floating-ui_dom@1.7.0 → @floating-ui_dom@1.7.1}/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -1
  7. package/dist/node_modules/.pnpm/{@floating-ui_react-dom@2.1.2_react-dom@19.1.0_react@19.1.0 → @floating-ui_react-dom@2.1.3_react-dom@19.1.0_react@19.1.0}/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +70 -69
  8. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.3_react-dom@19.1.0_react@19.1.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js.map +1 -0
  9. package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-dialog/dist/index.es.js +1 -1
  10. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.15_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-menu/dist/index.es.js +1 -1
  11. package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.14_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-popover/dist/index.es.js +1 -1
  12. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-popper/dist/index.es.js +2 -2
  13. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/Combination.es.js.map +1 -1
  14. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.es.js.map +1 -1
  15. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/UI.es.js.map +1 -1
  16. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.es.js.map +1 -1
  17. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.es.js +69 -0
  18. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.es.js.map +1 -0
  19. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/medium.es.js.map +1 -1
  20. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/sidecar.es.js.map +1 -1
  21. package/package.json +1 -1
  22. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.0/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +0 -1
  23. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.2_react-dom@19.1.0_react@19.1.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js.map +0 -1
  24. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.es.js +0 -65
  25. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.es.js.map +0 -1
  26. /package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/Combination.es.js +0 -0
  27. /package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.es.js +0 -0
  28. /package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/UI.es.js +0 -0
  29. /package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.es.js +0 -0
  30. /package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/medium.es.js +0 -0
  31. /package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.0_@types_react@19.1.0_react@19.1.0 → react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0}/node_modules/react-remove-scroll/dist/es2015/sidecar.es.js +0 -0
@@ -1,56 +1,56 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Root as o, List as r, Trigger as s, Content as a } from "../../node_modules/.pnpm/@radix-ui_react-tabs@1.1.12_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-tabs/dist/index.es.js";
3
- import { cn as n } from "../../utils/index.es.js";
4
- const g = o;
5
- function b({
6
- className: e,
7
- ...i
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { Root as r, List as o, Trigger as s, Content as a } from "../../node_modules/.pnpm/@radix-ui_react-tabs@1.1.12_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-tabs/dist/index.es.js";
3
+ import { cn as i } from "../../utils/index.es.js";
4
+ const m = r;
5
+ function f({
6
+ className: t,
7
+ ...e
8
8
  }) {
9
- return /* @__PURE__ */ t(
10
- r,
9
+ return /* @__PURE__ */ n(
10
+ o,
11
11
  {
12
- className: n(
13
- "inline-flex h-9 items-center justify-center bg-background p-1 text-muted-foreground",
14
- e
12
+ className: i(
13
+ "inline-flex h-input items-center bg-background border-b",
14
+ t
15
15
  ),
16
- ...i
16
+ ...e
17
17
  }
18
18
  );
19
19
  }
20
- function d({
21
- className: e,
22
- ...i
20
+ function g({
21
+ className: t,
22
+ ...e
23
23
  }) {
24
- return /* @__PURE__ */ t(
24
+ return /* @__PURE__ */ n(
25
25
  s,
26
26
  {
27
- className: n(
28
- "inline-flex items-center justify-center whitespace-nowrap px-3 py-1 body font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",
29
- e
27
+ className: i(
28
+ "btn btn-ghost h-input truncate inline-flex items-center justify-center text-accent whitespace-nowrap px-3 py-2 body font-medium transition-all data-[state=active]:bg-primary/20 data-[state=active]:text-primary",
29
+ t
30
30
  ),
31
- ...i
31
+ ...e
32
32
  }
33
33
  );
34
34
  }
35
35
  function l({
36
- className: e,
37
- ...i
36
+ className: t,
37
+ ...e
38
38
  }) {
39
- return /* @__PURE__ */ t(
39
+ return /* @__PURE__ */ n(
40
40
  a,
41
41
  {
42
- className: n(
42
+ className: i(
43
43
  "mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
44
- e
44
+ t
45
45
  ),
46
- ...i
46
+ ...e
47
47
  }
48
48
  );
49
49
  }
50
50
  export {
51
- g as Tabs,
51
+ m as Tabs,
52
52
  l as TabsContent,
53
- b as TabsList,
54
- d as TabsTrigger
53
+ f as TabsList,
54
+ g as TabsTrigger
55
55
  };
56
56
  //# sourceMappingURL=tabs.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.es.js","sources":["../../../lib/components/ui/tabs.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport function TabsList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex h-9 items-center justify-center bg-background p-1 text-muted-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function TabsTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 body font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n};\n\nexport function TabsContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n\treturn (\n\t\t<TabsPrimitive.Content\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}"],"names":["Tabs","TabsPrimitive.Root","TabsList","className","props","jsx","TabsPrimitive.List","cn","TabsTrigger","TabsPrimitive.Trigger","TabsContent","TabsPrimitive.Content"],"mappings":";;;AAKO,MAAMA,IAAOC;AAEb,SAASC,EAAS;AAAA,EACxB,WAAAC;AAAA,EACA,GAAGC;AACJ,GAAoD;AAElD,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASI,EAAY;AAAA,EAC3B,WAAAL;AAAA,EACA,GAAGC;AACJ,GAAuD;AAErD,SAAA,gBAAAC;AAAA,IAACI;AAAAA,IAAA;AAAA,MACA,WAAWF;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASM,EAAY;AAAA,EAC3B,WAAAP;AAAA,EACA,GAAGC;AACJ,GAAuD;AAErD,SAAA,gBAAAC;AAAA,IAACM;AAAAA,IAAA;AAAA,MACA,WAAWJ;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;"}
1
+ {"version":3,"file":"tabs.es.js","sources":["../../../lib/components/ui/tabs.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport function TabsList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex h-input items-center bg-background border-b\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function TabsTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tclassName={cn(\n\t\t\t\t\"btn btn-ghost h-input truncate inline-flex items-center justify-center text-accent whitespace-nowrap px-3 py-2 body font-medium transition-all data-[state=active]:bg-primary/20 data-[state=active]:text-primary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n};\n\nexport function TabsContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n\treturn (\n\t\t<TabsPrimitive.Content\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}"],"names":["Tabs","TabsPrimitive.Root","TabsList","className","props","jsx","TabsPrimitive.List","cn","TabsTrigger","TabsPrimitive.Trigger","TabsContent","TabsPrimitive.Content"],"mappings":";;;AAKO,MAAMA,IAAOC;AAEb,SAASC,EAAS;AAAA,EACxB,WAAAC;AAAA,EACA,GAAGC;AACJ,GAAoD;AAElD,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASI,EAAY;AAAA,EAC3B,WAAAL;AAAA,EACA,GAAGC;AACJ,GAAuD;AAErD,SAAA,gBAAAC;AAAA,IAACI;AAAAA,IAAA;AAAA,MACA,WAAWF;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASM,EAAY;AAAA,EAC3B,WAAAP;AAAA,EACA,GAAGC;AACJ,GAAuD;AAErD,SAAA,gBAAAC;AAAA,IAACM;AAAAA,IAAA;AAAA,MACA,WAAWJ;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;"}
@@ -1,10 +1,10 @@
1
- import { evaluate as T, getSideAxis as B, getSide as W, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as I, min as $, max as Y, getPaddingObject as K, rectToClientRect as _, getOppositeAxis as N, getAlignmentAxis as Q, sides as se, getAxisLength as U } from "../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js";
2
- function q(t, e, d) {
1
+ import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as ie, getAxisLength as Q } from "../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js";
2
+ function I(t, e, d) {
3
3
  let {
4
4
  reference: a,
5
5
  floating: r
6
6
  } = t;
7
- const n = B(e), o = Q(e), m = U(o), u = W(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
7
+ const n = T(e), o = N(e), m = Q(o), u = j(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
8
8
  let i;
9
9
  switch (u) {
10
10
  case "top":
@@ -37,7 +37,7 @@ function q(t, e, d) {
37
37
  y: a.y
38
38
  };
39
39
  }
40
- switch (I(e)) {
40
+ switch (z(e)) {
41
41
  case "start":
42
42
  i[o] -= f * (d && h ? -1 : 1);
43
43
  break;
@@ -47,7 +47,7 @@ function q(t, e, d) {
47
47
  }
48
48
  return i;
49
49
  }
50
- const ce = async (t, e, d) => {
50
+ const ae = async (t, e, d) => {
51
51
  const {
52
52
  placement: a = "bottom",
53
53
  strategy: r = "absolute",
@@ -61,17 +61,17 @@ const ce = async (t, e, d) => {
61
61
  }), {
62
62
  x: c,
63
63
  y: s
64
- } = q(h, a, u), f = a, i = {}, l = 0;
64
+ } = I(h, a, u), f = a, i = {}, l = 0;
65
65
  for (let g = 0; g < m.length; g++) {
66
66
  const {
67
67
  name: x,
68
- fn: A
68
+ fn: y
69
69
  } = m[g], {
70
- x: v,
70
+ x: A,
71
71
  y: p,
72
- data: y,
72
+ data: v,
73
73
  reset: w
74
- } = await A({
74
+ } = await y({
75
75
  x: c,
76
76
  y: s,
77
77
  initialPlacement: a,
@@ -85,11 +85,11 @@ const ce = async (t, e, d) => {
85
85
  floating: e
86
86
  }
87
87
  });
88
- c = v ?? c, s = p ?? s, i = {
88
+ c = A ?? c, s = p ?? s, i = {
89
89
  ...i,
90
90
  [x]: {
91
91
  ...i[x],
92
- ...y
92
+ ...v
93
93
  }
94
94
  }, w && l <= 50 && (l++, typeof w == "object" && (w.placement && (f = w.placement), w.rects && (h = w.rects === !0 ? await o.getElementRects({
95
95
  reference: t,
@@ -98,7 +98,7 @@ const ce = async (t, e, d) => {
98
98
  }) : w.rects), {
99
99
  x: c,
100
100
  y: s
101
- } = q(h, f, u)), g = -1);
101
+ } = I(h, f, u)), g = -1);
102
102
  }
103
103
  return {
104
104
  x: c,
@@ -108,7 +108,7 @@ const ce = async (t, e, d) => {
108
108
  middlewareData: i
109
109
  };
110
110
  };
111
- async function z(t, e) {
111
+ async function Y(t, e) {
112
112
  var d;
113
113
  e === void 0 && (e = {});
114
114
  const {
@@ -124,17 +124,17 @@ async function z(t, e) {
124
124
  elementContext: s = "floating",
125
125
  altBoundary: f = !1,
126
126
  padding: i = 0
127
- } = T(e, t), l = K(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], A = _(await n.getClippingRect({
127
+ } = L(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
128
128
  element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
129
129
  boundary: h,
130
130
  rootBoundary: c,
131
131
  strategy: u
132
- })), v = s === "floating" ? {
132
+ })), A = s === "floating" ? {
133
133
  x: a,
134
134
  y: r,
135
135
  width: o.floating.width,
136
136
  height: o.floating.height
137
- } : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), y = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
137
+ } : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), v = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
138
138
  x: 1,
139
139
  y: 1
140
140
  } : {
@@ -142,18 +142,18 @@ async function z(t, e) {
142
142
  y: 1
143
143
  }, w = _(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
144
144
  elements: m,
145
- rect: v,
145
+ rect: A,
146
146
  offsetParent: p,
147
147
  strategy: u
148
- }) : v);
148
+ }) : A);
149
149
  return {
150
- top: (A.top - w.top + l.top) / y.y,
151
- bottom: (w.bottom - A.bottom + l.bottom) / y.y,
152
- left: (A.left - w.left + l.left) / y.x,
153
- right: (w.right - A.right + l.right) / y.x
150
+ top: (y.top - w.top + l.top) / v.y,
151
+ bottom: (w.bottom - y.bottom + l.bottom) / v.y,
152
+ left: (y.left - w.left + l.left) / v.x,
153
+ right: (w.right - y.right + l.right) / v.x
154
154
  };
155
155
  }
156
- const le = (t) => ({
156
+ const ce = (t) => ({
157
157
  name: "arrow",
158
158
  options: t,
159
159
  async fn(e) {
@@ -168,29 +168,29 @@ const le = (t) => ({
168
168
  } = e, {
169
169
  element: h,
170
170
  padding: c = 0
171
- } = T(t, e) || {};
171
+ } = L(t, e) || {};
172
172
  if (h == null)
173
173
  return {};
174
- const s = K(c), f = {
174
+ const s = J(c), f = {
175
175
  x: d,
176
176
  y: a
177
- }, i = Q(r), l = U(i), g = await o.getDimensions(h), x = i === "y", A = x ? "top" : "left", v = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", y = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
178
- let P = O ? O[p] : 0;
179
- (!P || !await (o.isElement == null ? void 0 : o.isElement(O))) && (P = m.floating[p] || n.floating[l]);
180
- const M = y / 2 - w / 2, R = P / 2 - g[l] / 2 - 1, b = $(s[A], R), L = $(s[v], R), S = b, H = P - g[l] - L, k = P / 2 - g[l] / 2 + M, C = X(S, k, H), j = !u.arrow && I(r) != null && k !== C && n.reference[l] / 2 - (k < S ? b : L) - g[l] / 2 < 0, E = j ? k < S ? k - S : k - H : 0;
177
+ }, i = N(r), l = Q(i), g = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
178
+ let C = P ? P[p] : 0;
179
+ (!C || !await (o.isElement == null ? void 0 : o.isElement(P))) && (C = m.floating[p] || n.floating[l]);
180
+ const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0, R = E ? b < D ? b - D : b - F : 0;
181
181
  return {
182
- [i]: f[i] + E,
182
+ [i]: f[i] + R,
183
183
  data: {
184
- [i]: C,
185
- centerOffset: k - C - E,
186
- ...j && {
187
- alignmentOffset: E
184
+ [i]: B,
185
+ centerOffset: b - B - R,
186
+ ...E && {
187
+ alignmentOffset: R
188
188
  }
189
189
  },
190
- reset: j
190
+ reset: E
191
191
  };
192
192
  }
193
- }), re = function(t) {
193
+ }), le = function(t) {
194
194
  return t === void 0 && (t = {}), {
195
195
  name: "flip",
196
196
  options: t,
@@ -211,52 +211,50 @@ const le = (t) => ({
211
211
  fallbackAxisSideDirection: l = "none",
212
212
  flipAlignment: g = !0,
213
213
  ...x
214
- } = T(t, e);
214
+ } = L(t, e);
215
215
  if ((d = n.arrow) != null && d.alignmentOffset)
216
216
  return {};
217
- const A = W(r), v = B(m), p = W(m) === m, y = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [ee(m)] : te(m)), O = l !== "none";
218
- !f && O && w.push(...ne(m, g, l, y));
219
- const P = [m, ...w], M = await z(e, x), R = [];
220
- let b = ((a = n.flip) == null ? void 0 : a.overflows) || [];
221
- if (c && R.push(M[A]), s) {
222
- const C = ie(r, o, y);
223
- R.push(M[C[0]], M[C[1]]);
217
+ const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [Z(m)] : ee(m)), P = l !== "none";
218
+ !f && P && w.push(...te(m, g, l, v));
219
+ const C = [m, ...w], M = await Y(e, x), k = [];
220
+ let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
221
+ if (c && k.push(M[y]), s) {
222
+ const b = ne(r, o, v);
223
+ k.push(M[b[0]], M[b[1]]);
224
224
  }
225
- if (b = [...b, {
225
+ if (O = [...O, {
226
226
  placement: r,
227
- overflows: R
228
- }], !R.every((C) => C <= 0)) {
229
- var L, S;
230
- const C = (((L = n.flip) == null ? void 0 : L.index) || 0) + 1, j = P[C];
231
- if (j) {
232
- var H;
233
- const F = s === "alignment" ? v !== B(j) : !1, D = ((H = b[0]) == null ? void 0 : H.overflows[0]) > 0;
234
- if (!F || D)
235
- return {
236
- data: {
237
- index: C,
238
- overflows: b
239
- },
240
- reset: {
241
- placement: j
242
- }
243
- };
244
- }
245
- let E = (S = b.filter((F) => F.overflows[0] <= 0).sort((F, D) => F.overflows[1] - D.overflows[1])[0]) == null ? void 0 : S.placement;
227
+ overflows: k
228
+ }], !k.every((b) => b <= 0)) {
229
+ var H, D;
230
+ const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
231
+ if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
232
+ // overflows the main axis.
233
+ O.every((S) => S.overflows[0] > 0 && T(S.placement) === A)))
234
+ return {
235
+ data: {
236
+ index: b,
237
+ overflows: O
238
+ },
239
+ reset: {
240
+ placement: B
241
+ }
242
+ };
243
+ let E = (D = O.filter((R) => R.overflows[0] <= 0).sort((R, S) => R.overflows[1] - S.overflows[1])[0]) == null ? void 0 : D.placement;
246
244
  if (!E)
247
245
  switch (i) {
248
246
  case "bestFit": {
249
- var k;
250
- const F = (k = b.filter((D) => {
251
- if (O) {
252
- const V = B(D.placement);
253
- return V === v || // Create a bias to the `y` side axis due to horizontal
247
+ var F;
248
+ const R = (F = O.filter((S) => {
249
+ if (P) {
250
+ const V = T(S.placement);
251
+ return V === A || // Create a bias to the `y` side axis due to horizontal
254
252
  // reading directions favoring greater width.
255
253
  V === "y";
256
254
  }
257
255
  return !0;
258
- }).map((D) => [D.placement, D.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((D, V) => D[1] - V[1])[0]) == null ? void 0 : k[0];
259
- F && (E = F);
256
+ }).map((S) => [S.placement, S.overflows.filter((V) => V > 0).reduce((V, U) => V + U, 0)]).sort((S, V) => S[1] - V[1])[0]) == null ? void 0 : F[0];
257
+ R && (E = R);
260
258
  break;
261
259
  }
262
260
  case "initialPlacement":
@@ -274,7 +272,7 @@ const le = (t) => ({
274
272
  }
275
273
  };
276
274
  };
277
- function G(t, e) {
275
+ function q(t, e) {
278
276
  return {
279
277
  top: t.top - e.height,
280
278
  right: t.right - e.width,
@@ -282,10 +280,10 @@ function G(t, e) {
282
280
  left: t.left - e.width
283
281
  };
284
282
  }
285
- function J(t) {
286
- return se.some((e) => t[e] >= 0);
283
+ function G(t) {
284
+ return ie.some((e) => t[e] >= 0);
287
285
  }
288
- const fe = function(t) {
286
+ const re = function(t) {
289
287
  return t === void 0 && (t = {}), {
290
288
  name: "hide",
291
289
  options: t,
@@ -295,29 +293,29 @@ const fe = function(t) {
295
293
  } = e, {
296
294
  strategy: a = "referenceHidden",
297
295
  ...r
298
- } = T(t, e);
296
+ } = L(t, e);
299
297
  switch (a) {
300
298
  case "referenceHidden": {
301
- const n = await z(e, {
299
+ const n = await Y(e, {
302
300
  ...r,
303
301
  elementContext: "reference"
304
- }), o = G(n, d.reference);
302
+ }), o = q(n, d.reference);
305
303
  return {
306
304
  data: {
307
305
  referenceHiddenOffsets: o,
308
- referenceHidden: J(o)
306
+ referenceHidden: G(o)
309
307
  }
310
308
  };
311
309
  }
312
310
  case "escaped": {
313
- const n = await z(e, {
311
+ const n = await Y(e, {
314
312
  ...r,
315
313
  altBoundary: !0
316
- }), o = G(n, d.floating);
314
+ }), o = q(n, d.floating);
317
315
  return {
318
316
  data: {
319
317
  escapedOffsets: o,
320
- escaped: J(o)
318
+ escaped: G(o)
321
319
  }
322
320
  };
323
321
  }
@@ -327,12 +325,12 @@ const fe = function(t) {
327
325
  }
328
326
  };
329
327
  };
330
- async function oe(t, e) {
328
+ async function se(t, e) {
331
329
  const {
332
330
  placement: d,
333
331
  platform: a,
334
332
  elements: r
335
- } = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = W(d), m = I(d), u = B(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && u ? -1 : 1, s = T(e, t);
333
+ } = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
336
334
  let {
337
335
  mainAxis: f,
338
336
  crossAxis: i,
@@ -354,7 +352,7 @@ async function oe(t, e) {
354
352
  y: i * c
355
353
  };
356
354
  }
357
- const me = function(t) {
355
+ const fe = function(t) {
358
356
  return t === void 0 && (t = 0), {
359
357
  name: "offset",
360
358
  options: t,
@@ -365,7 +363,7 @@ const me = function(t) {
365
363
  y: n,
366
364
  placement: o,
367
365
  middlewareData: m
368
- } = e, u = await oe(e, t);
366
+ } = e, u = await se(e, t);
369
367
  return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
370
368
  x: r + u.x,
371
369
  y: n + u.y,
@@ -376,7 +374,7 @@ const me = function(t) {
376
374
  };
377
375
  }
378
376
  };
379
- }, de = function(t) {
377
+ }, me = function(t) {
380
378
  return t === void 0 && (t = {}), {
381
379
  name: "shift",
382
380
  options: t,
@@ -391,28 +389,28 @@ const me = function(t) {
391
389
  limiter: m = {
392
390
  fn: (x) => {
393
391
  let {
394
- x: A,
395
- y: v
392
+ x: y,
393
+ y: A
396
394
  } = x;
397
395
  return {
398
- x: A,
399
- y: v
396
+ x: y,
397
+ y: A
400
398
  };
401
399
  }
402
400
  },
403
401
  ...u
404
- } = T(t, e), h = {
402
+ } = L(t, e), h = {
405
403
  x: d,
406
404
  y: a
407
- }, c = await z(e, u), s = B(W(r)), f = N(s);
405
+ }, c = await Y(e, u), s = T(j(r)), f = K(s);
408
406
  let i = h[f], l = h[s];
409
407
  if (n) {
410
- const x = f === "y" ? "top" : "left", A = f === "y" ? "bottom" : "right", v = i + c[x], p = i - c[A];
411
- i = X(v, i, p);
408
+ const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", A = i + c[x], p = i - c[y];
409
+ i = X(A, i, p);
412
410
  }
413
411
  if (o) {
414
- const x = s === "y" ? "top" : "left", A = s === "y" ? "bottom" : "right", v = l + c[x], p = l - c[A];
415
- l = X(v, l, p);
412
+ const x = s === "y" ? "top" : "left", y = s === "y" ? "bottom" : "right", A = l + c[x], p = l - c[y];
413
+ l = X(A, l, p);
416
414
  }
417
415
  const g = m.fn({
418
416
  ...e,
@@ -432,7 +430,7 @@ const me = function(t) {
432
430
  };
433
431
  }
434
432
  };
435
- }, xe = function(t) {
433
+ }, de = function(t) {
436
434
  return t === void 0 && (t = {}), {
437
435
  options: t,
438
436
  fn(e) {
@@ -446,12 +444,12 @@ const me = function(t) {
446
444
  offset: m = 0,
447
445
  mainAxis: u = !0,
448
446
  crossAxis: h = !0
449
- } = T(t, e), c = {
447
+ } = L(t, e), c = {
450
448
  x: d,
451
449
  y: a
452
- }, s = B(r), f = N(s);
450
+ }, s = T(r), f = K(s);
453
451
  let i = c[f], l = c[s];
454
- const g = T(m, e), x = typeof g == "number" ? {
452
+ const g = L(m, e), x = typeof g == "number" ? {
455
453
  mainAxis: g,
456
454
  crossAxis: 0
457
455
  } : {
@@ -460,13 +458,13 @@ const me = function(t) {
460
458
  ...g
461
459
  };
462
460
  if (u) {
463
- const p = f === "y" ? "height" : "width", y = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
464
- i < y ? i = y : i > w && (i = w);
461
+ const p = f === "y" ? "height" : "width", v = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
462
+ i < v ? i = v : i > w && (i = w);
465
463
  }
466
464
  if (h) {
467
- var A, v;
468
- const p = f === "y" ? "width" : "height", y = ["top", "left"].includes(W(r)), w = n.reference[s] - n.floating[p] + (y && ((A = o.offset) == null ? void 0 : A[s]) || 0) + (y ? 0 : x.crossAxis), O = n.reference[s] + n.reference[p] + (y ? 0 : ((v = o.offset) == null ? void 0 : v[s]) || 0) - (y ? x.crossAxis : 0);
469
- l < w ? l = w : l > O && (l = O);
465
+ var y, A;
466
+ const p = f === "y" ? "width" : "height", v = ["top", "left"].includes(j(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), P = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
467
+ l < w ? l = w : l > P && (l = P);
470
468
  }
471
469
  return {
472
470
  [f]: i,
@@ -474,7 +472,7 @@ const me = function(t) {
474
472
  };
475
473
  }
476
474
  };
477
- }, ge = function(t) {
475
+ }, xe = function(t) {
478
476
  return t === void 0 && (t = {}), {
479
477
  name: "size",
480
478
  options: t,
@@ -489,25 +487,25 @@ const me = function(t) {
489
487
  apply: u = () => {
490
488
  },
491
489
  ...h
492
- } = T(t, e), c = await z(e, h), s = W(r), f = I(r), i = B(r) === "y", {
490
+ } = L(t, e), c = await Y(e, h), s = j(r), f = z(r), i = T(r) === "y", {
493
491
  width: l,
494
492
  height: g
495
493
  } = n.floating;
496
- let x, A;
497
- s === "top" || s === "bottom" ? (x = s, A = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (A = s, x = f === "end" ? "top" : "bottom");
498
- const v = g - c.top - c.bottom, p = l - c.left - c.right, y = $(g - c[x], v), w = $(l - c[A], p), O = !e.middlewareData.shift;
499
- let P = y, M = w;
500
- if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (P = v), O && !f) {
501
- const b = Y(c.left, 0), L = Y(c.right, 0), S = Y(c.top, 0), H = Y(c.bottom, 0);
502
- i ? M = l - 2 * (b !== 0 || L !== 0 ? b + L : Y(c.left, c.right)) : P = g - 2 * (S !== 0 || H !== 0 ? S + H : Y(c.top, c.bottom));
494
+ let x, y;
495
+ s === "top" || s === "bottom" ? (x = s, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (y = s, x = f === "end" ? "top" : "bottom");
496
+ const A = g - c.top - c.bottom, p = l - c.left - c.right, v = $(g - c[x], A), w = $(l - c[y], p), P = !e.middlewareData.shift;
497
+ let C = v, M = w;
498
+ if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (C = A), P && !f) {
499
+ const O = W(c.left, 0), H = W(c.right, 0), D = W(c.top, 0), F = W(c.bottom, 0);
500
+ i ? M = l - 2 * (O !== 0 || H !== 0 ? O + H : W(c.left, c.right)) : C = g - 2 * (D !== 0 || F !== 0 ? D + F : W(c.top, c.bottom));
503
501
  }
504
502
  await u({
505
503
  ...e,
506
504
  availableWidth: M,
507
- availableHeight: P
505
+ availableHeight: C
508
506
  });
509
- const R = await o.getDimensions(m.floating);
510
- return l !== R.width || g !== R.height ? {
507
+ const k = await o.getDimensions(m.floating);
508
+ return l !== k.width || g !== k.height ? {
511
509
  reset: {
512
510
  rects: !0
513
511
  }
@@ -516,15 +514,15 @@ const me = function(t) {
516
514
  };
517
515
  };
518
516
  export {
519
- le as arrow,
520
- ce as computePosition,
521
- z as detectOverflow,
522
- re as flip,
523
- fe as hide,
524
- xe as limitShift,
525
- me as offset,
517
+ ce as arrow,
518
+ ae as computePosition,
519
+ Y as detectOverflow,
520
+ le as flip,
521
+ re as hide,
522
+ de as limitShift,
523
+ fe as offset,
526
524
  _ as rectToClientRect,
527
- de as shift,
528
- ge as size
525
+ me as shift,
526
+ xe as size
529
527
  };
530
528
  //# sourceMappingURL=floating-ui.core.es.js.map