@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.
- package/dist/components/ui/tabs.es.js +30 -30
- package/dist/components/ui/tabs.es.js.map +1 -1
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/package.json +1 -1
- 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
- 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
- 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
- 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
- /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
- /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
- /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
- /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
- /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
- /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
|
|
2
|
-
import { Root as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
className:
|
|
7
|
-
...
|
|
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__ */
|
|
10
|
-
|
|
9
|
+
return /* @__PURE__ */ n(
|
|
10
|
+
o,
|
|
11
11
|
{
|
|
12
|
-
className:
|
|
13
|
-
"inline-flex h-
|
|
14
|
-
|
|
12
|
+
className: i(
|
|
13
|
+
"inline-flex h-input items-center bg-background border-b",
|
|
14
|
+
t
|
|
15
15
|
),
|
|
16
|
-
...
|
|
16
|
+
...e
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
className:
|
|
22
|
-
...
|
|
20
|
+
function g({
|
|
21
|
+
className: t,
|
|
22
|
+
...e
|
|
23
23
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ n(
|
|
25
25
|
s,
|
|
26
26
|
{
|
|
27
|
-
className:
|
|
28
|
-
"inline-flex items-center justify-center whitespace-nowrap px-3 py-
|
|
29
|
-
|
|
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
|
-
...
|
|
31
|
+
...e
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
function l({
|
|
36
|
-
className:
|
|
37
|
-
...
|
|
36
|
+
className: t,
|
|
37
|
+
...e
|
|
38
38
|
}) {
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ n(
|
|
40
40
|
a,
|
|
41
41
|
{
|
|
42
|
-
className:
|
|
42
|
+
className: i(
|
|
43
43
|
"mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
|
|
44
|
-
|
|
44
|
+
t
|
|
45
45
|
),
|
|
46
|
-
...
|
|
46
|
+
...e
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
m as Tabs,
|
|
52
52
|
l as TabsContent,
|
|
53
|
-
|
|
54
|
-
|
|
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-
|
|
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
|
|
2
|
-
function
|
|
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 =
|
|
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 (
|
|
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
|
|
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
|
-
} =
|
|
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:
|
|
68
|
+
fn: y
|
|
69
69
|
} = m[g], {
|
|
70
|
-
x:
|
|
70
|
+
x: A,
|
|
71
71
|
y: p,
|
|
72
|
-
data:
|
|
72
|
+
data: v,
|
|
73
73
|
reset: w
|
|
74
|
-
} = await
|
|
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 =
|
|
88
|
+
c = A ?? c, s = p ?? s, i = {
|
|
89
89
|
...i,
|
|
90
90
|
[x]: {
|
|
91
91
|
...i[x],
|
|
92
|
-
...
|
|
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
|
-
} =
|
|
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
|
|
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
|
-
} =
|
|
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
|
-
})),
|
|
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)),
|
|
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:
|
|
145
|
+
rect: A,
|
|
146
146
|
offsetParent: p,
|
|
147
147
|
strategy: u
|
|
148
|
-
}) :
|
|
148
|
+
}) : A);
|
|
149
149
|
return {
|
|
150
|
-
top: (
|
|
151
|
-
bottom: (w.bottom -
|
|
152
|
-
left: (
|
|
153
|
-
right: (w.right -
|
|
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
|
|
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
|
-
} =
|
|
171
|
+
} = L(t, e) || {};
|
|
172
172
|
if (h == null)
|
|
173
173
|
return {};
|
|
174
|
-
const s =
|
|
174
|
+
const s = J(c), f = {
|
|
175
175
|
x: d,
|
|
176
176
|
y: a
|
|
177
|
-
}, i =
|
|
178
|
-
let
|
|
179
|
-
(!
|
|
180
|
-
const M =
|
|
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] +
|
|
182
|
+
[i]: f[i] + R,
|
|
183
183
|
data: {
|
|
184
|
-
[i]:
|
|
185
|
-
centerOffset:
|
|
186
|
-
...
|
|
187
|
-
alignmentOffset:
|
|
184
|
+
[i]: B,
|
|
185
|
+
centerOffset: b - B - R,
|
|
186
|
+
...E && {
|
|
187
|
+
alignmentOffset: R
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
reset:
|
|
190
|
+
reset: E
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
}),
|
|
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
|
-
} =
|
|
214
|
+
} = L(t, e);
|
|
215
215
|
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
216
|
return {};
|
|
217
|
-
const
|
|
218
|
-
!f &&
|
|
219
|
-
const
|
|
220
|
-
let
|
|
221
|
-
if (c &&
|
|
222
|
-
const
|
|
223
|
-
|
|
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 (
|
|
225
|
+
if (O = [...O, {
|
|
226
226
|
placement: r,
|
|
227
|
-
overflows:
|
|
228
|
-
}], !
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
252
|
-
const V =
|
|
253
|
-
return V ===
|
|
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((
|
|
259
|
-
|
|
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
|
|
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
|
|
286
|
-
return
|
|
283
|
+
function G(t) {
|
|
284
|
+
return ie.some((e) => t[e] >= 0);
|
|
287
285
|
}
|
|
288
|
-
const
|
|
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
|
-
} =
|
|
296
|
+
} = L(t, e);
|
|
299
297
|
switch (a) {
|
|
300
298
|
case "referenceHidden": {
|
|
301
|
-
const n = await
|
|
299
|
+
const n = await Y(e, {
|
|
302
300
|
...r,
|
|
303
301
|
elementContext: "reference"
|
|
304
|
-
}), o =
|
|
302
|
+
}), o = q(n, d.reference);
|
|
305
303
|
return {
|
|
306
304
|
data: {
|
|
307
305
|
referenceHiddenOffsets: o,
|
|
308
|
-
referenceHidden:
|
|
306
|
+
referenceHidden: G(o)
|
|
309
307
|
}
|
|
310
308
|
};
|
|
311
309
|
}
|
|
312
310
|
case "escaped": {
|
|
313
|
-
const n = await
|
|
311
|
+
const n = await Y(e, {
|
|
314
312
|
...r,
|
|
315
313
|
altBoundary: !0
|
|
316
|
-
}), o =
|
|
314
|
+
}), o = q(n, d.floating);
|
|
317
315
|
return {
|
|
318
316
|
data: {
|
|
319
317
|
escapedOffsets: o,
|
|
320
|
-
escaped:
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
-
},
|
|
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:
|
|
395
|
-
y:
|
|
392
|
+
x: y,
|
|
393
|
+
y: A
|
|
396
394
|
} = x;
|
|
397
395
|
return {
|
|
398
|
-
x:
|
|
399
|
-
y:
|
|
396
|
+
x: y,
|
|
397
|
+
y: A
|
|
400
398
|
};
|
|
401
399
|
}
|
|
402
400
|
},
|
|
403
401
|
...u
|
|
404
|
-
} =
|
|
402
|
+
} = L(t, e), h = {
|
|
405
403
|
x: d,
|
|
406
404
|
y: a
|
|
407
|
-
}, c = await
|
|
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",
|
|
411
|
-
i = X(
|
|
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",
|
|
415
|
-
l = X(
|
|
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
|
-
},
|
|
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
|
-
} =
|
|
447
|
+
} = L(t, e), c = {
|
|
450
448
|
x: d,
|
|
451
449
|
y: a
|
|
452
|
-
}, s =
|
|
450
|
+
}, s = T(r), f = K(s);
|
|
453
451
|
let i = c[f], l = c[s];
|
|
454
|
-
const g =
|
|
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",
|
|
464
|
-
i <
|
|
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
|
|
468
|
-
const p = f === "y" ? "width" : "height",
|
|
469
|
-
l < w ? l = w : l >
|
|
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
|
-
},
|
|
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
|
-
} =
|
|
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,
|
|
497
|
-
s === "top" || s === "bottom" ? (x = s,
|
|
498
|
-
const
|
|
499
|
-
let
|
|
500
|
-
if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (
|
|
501
|
-
const
|
|
502
|
-
i ? M = l - 2 * (
|
|
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:
|
|
505
|
+
availableHeight: C
|
|
508
506
|
});
|
|
509
|
-
const
|
|
510
|
-
return l !==
|
|
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
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
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
|
-
|
|
528
|
-
|
|
525
|
+
me as shift,
|
|
526
|
+
xe as size
|
|
529
527
|
};
|
|
530
528
|
//# sourceMappingURL=floating-ui.core.es.js.map
|