@tedi-design-system/react 18.0.0-rc.3 → 18.0.0-rc.5
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/bundle-stats.html +1 -1
- package/external/@floating-ui/core/dist/floating-ui.core.cjs.js +1 -1
- package/external/@floating-ui/core/dist/floating-ui.core.es.js +275 -271
- package/external/@floating-ui/dom/dist/floating-ui.dom.cjs.js +1 -1
- package/external/@floating-ui/dom/dist/floating-ui.dom.es.js +189 -188
- package/external/@floating-ui/react/dist/floating-ui.react.cjs.js +1 -1
- package/external/@floating-ui/react/dist/floating-ui.react.es.js +1419 -1538
- package/external/@floating-ui/react/dist/floating-ui.react.utils.cjs.js +1 -1
- package/external/@floating-ui/react/dist/floating-ui.react.utils.es.js +348 -81
- package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js +1 -1
- package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +113 -93
- package/external/@floating-ui/utils/dist/floating-ui.utils.cjs.js +1 -1
- package/external/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +1 -1
- package/external/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +97 -97
- package/external/@floating-ui/utils/dist/floating-ui.utils.es.js +66 -68
- package/external/lodash-es/_baseUnset.cjs.js +1 -1
- package/external/lodash-es/_baseUnset.es.js +12 -19
- package/external/tabbable/dist/index.esm.cjs.js +1 -1
- package/external/tabbable/dist/index.esm.es.js +72 -63
- package/index.css +1 -1
- package/package.json +4 -4
- package/src/community/components/modal/modal-closer.d.ts +6 -0
- package/src/community/components/modal/modal-provider.d.ts +6 -0
- package/src/community/components/modal/modal-trigger.d.ts +6 -0
- package/src/community/components/modal/modal.d.ts +6 -0
- package/src/tedi/components/buttons/button-group/button-group.cjs.js +1 -1
- package/src/tedi/components/buttons/button-group/button-group.es.js +4 -4
- package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
- package/src/tedi/components/buttons/collapse/collapse.d.ts +15 -0
- package/src/tedi/components/buttons/collapse/collapse.es.js +55 -54
- package/src/tedi/components/content/table/index.d.ts +6 -0
- package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.cjs.js +1 -0
- package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.d.ts +15 -0
- package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.es.js +37 -0
- package/src/tedi/components/content/table/table-context.cjs.js +1 -0
- package/src/tedi/components/content/table/table-context.d.ts +3 -0
- package/src/tedi/components/content/table/table-context.es.js +11 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.cjs.js +1 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.d.ts +51 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.es.js +42 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.es.js +7 -0
- package/src/tedi/components/content/table/table-toolbar/table-toolbar.cjs.js +1 -0
- package/src/tedi/components/content/table/table-toolbar/table-toolbar.d.ts +21 -0
- package/src/tedi/components/content/table/table-toolbar/table-toolbar.es.js +9 -0
- package/src/tedi/components/content/table/table.cjs.js +1 -0
- package/src/tedi/components/content/table/table.d.ts +519 -0
- package/src/tedi/components/content/table/table.es.js +856 -0
- package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/table/table.module.scss.es.js +54 -0
- package/src/tedi/components/content/table/use-table-persistence.cjs.js +1 -0
- package/src/tedi/components/content/table/use-table-persistence.d.ts +13 -0
- package/src/tedi/components/content/table/use-table-persistence.es.js +53 -0
- package/src/tedi/components/form/time-field/time-field.es.js +3 -3
- package/src/tedi/components/navigation/pagination/pagination.cjs.js +1 -1
- package/src/tedi/components/navigation/pagination/pagination.d.ts +7 -0
- package/src/tedi/components/navigation/pagination/pagination.es.js +132 -91
- package/src/tedi/components/navigation/pagination/pagination.module.scss.cjs.js +1 -1
- package/src/tedi/components/navigation/pagination/pagination.module.scss.es.js +7 -1
- package/src/tedi/components/navigation/pagination/pagination.types.d.ts +100 -0
- package/src/tedi/components/overlays/modal/index.d.ts +8 -0
- package/src/tedi/components/overlays/modal/modal-body/modal-body.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-body/modal-body.d.ts +22 -0
- package/src/tedi/components/overlays/modal/modal-body/modal-body.es.js +21 -0
- package/src/tedi/components/overlays/modal/modal-closer/modal-closer.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-closer/modal-closer.d.ts +15 -0
- package/src/tedi/components/overlays/modal/modal-closer/modal-closer.es.js +16 -0
- package/src/tedi/components/overlays/modal/modal-content/modal-content.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-content/modal-content.d.ts +108 -0
- package/src/tedi/components/overlays/modal/modal-content/modal-content.es.js +81 -0
- package/src/tedi/components/overlays/modal/modal-context.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-context.d.ts +59 -0
- package/src/tedi/components/overlays/modal/modal-context.es.js +15 -0
- package/src/tedi/components/overlays/modal/modal-footer/modal-footer.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-footer/modal-footer.d.ts +22 -0
- package/src/tedi/components/overlays/modal/modal-footer/modal-footer.es.js +25 -0
- package/src/tedi/components/overlays/modal/modal-header/modal-header.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-header/modal-header.d.ts +58 -0
- package/src/tedi/components/overlays/modal/modal-header/modal-header.es.js +25 -0
- package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.d.ts +13 -0
- package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.es.js +14 -0
- package/src/tedi/components/overlays/modal/modal.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal.d.ts +68 -0
- package/src/tedi/components/overlays/modal/modal.es.js +76 -0
- package/src/tedi/components/overlays/modal/modal.module.scss.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal.module.scss.es.js +36 -0
- package/src/tedi/components/overlays/tooltip/tooltip.cjs.js +1 -1
- package/src/tedi/components/overlays/tooltip/tooltip.es.js +14 -6
- package/src/tedi/helpers/hooks/use-sidenav-state.d.ts +1 -1
- package/src/tedi/index.d.ts +2 -0
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +132 -6
- package/src/tedi/providers/label-provider/labels-map.es.js +146 -11
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +203 -171
|
@@ -1,416 +1,420 @@
|
|
|
1
|
-
import { evaluate as
|
|
2
|
-
function
|
|
1
|
+
import { evaluate as j, getSide as W, getSideAxis as _, getOppositePlacement as G, getExpandedPlacements as J, getOppositeAxisPlacements as K, getAlignmentSides as Q, clamp as z, getAlignment as Y, min as H, max as F, getOppositeAxis as Z, getPaddingObject as I, getAlignmentAxis as N, rectToClientRect as B, getAxisLength as U } from "../../utils/dist/floating-ui.utils.es.js";
|
|
2
|
+
function X(l, t, d) {
|
|
3
3
|
let {
|
|
4
|
-
reference:
|
|
4
|
+
reference: i,
|
|
5
5
|
floating: f
|
|
6
|
-
} =
|
|
7
|
-
const
|
|
8
|
-
let
|
|
6
|
+
} = l;
|
|
7
|
+
const e = _(t), o = N(t), r = U(o), g = W(t), u = e === "y", a = i.x + i.width / 2 - f.width / 2, c = i.y + i.height / 2 - f.height / 2, m = i[r] / 2 - f[r] / 2;
|
|
8
|
+
let n;
|
|
9
9
|
switch (g) {
|
|
10
10
|
case "top":
|
|
11
|
-
|
|
12
|
-
x:
|
|
13
|
-
y:
|
|
11
|
+
n = {
|
|
12
|
+
x: a,
|
|
13
|
+
y: i.y - f.height
|
|
14
14
|
};
|
|
15
15
|
break;
|
|
16
16
|
case "bottom":
|
|
17
|
-
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
17
|
+
n = {
|
|
18
|
+
x: a,
|
|
19
|
+
y: i.y + i.height
|
|
20
20
|
};
|
|
21
21
|
break;
|
|
22
22
|
case "right":
|
|
23
|
-
|
|
24
|
-
x:
|
|
25
|
-
y:
|
|
23
|
+
n = {
|
|
24
|
+
x: i.x + i.width,
|
|
25
|
+
y: c
|
|
26
26
|
};
|
|
27
27
|
break;
|
|
28
28
|
case "left":
|
|
29
|
-
|
|
30
|
-
x:
|
|
31
|
-
y:
|
|
29
|
+
n = {
|
|
30
|
+
x: i.x - f.width,
|
|
31
|
+
y: c
|
|
32
32
|
};
|
|
33
33
|
break;
|
|
34
34
|
default:
|
|
35
|
-
|
|
36
|
-
x:
|
|
37
|
-
y:
|
|
35
|
+
n = {
|
|
36
|
+
x: i.x,
|
|
37
|
+
y: i.y
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
switch (Y(
|
|
40
|
+
switch (Y(t)) {
|
|
41
41
|
case "start":
|
|
42
|
-
|
|
42
|
+
n[o] -= m * (d && u ? -1 : 1);
|
|
43
43
|
break;
|
|
44
44
|
case "end":
|
|
45
|
-
|
|
45
|
+
n[o] += m * (d && u ? -1 : 1);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return n;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
async function tt(l, t) {
|
|
51
|
+
var d;
|
|
52
|
+
t === void 0 && (t = {});
|
|
53
|
+
const {
|
|
54
|
+
x: i,
|
|
55
|
+
y: f,
|
|
56
|
+
platform: e,
|
|
57
|
+
rects: o,
|
|
58
|
+
elements: r,
|
|
59
|
+
strategy: g
|
|
60
|
+
} = l, {
|
|
61
|
+
boundary: u = "clippingAncestors",
|
|
62
|
+
rootBoundary: a = "viewport",
|
|
63
|
+
elementContext: c = "floating",
|
|
64
|
+
altBoundary: m = !1,
|
|
65
|
+
padding: n = 0
|
|
66
|
+
} = j(t, l), s = I(n), p = r[m ? c === "floating" ? "reference" : "floating" : c], w = B(await e.getClippingRect({
|
|
67
|
+
element: (d = await (e.isElement == null ? void 0 : e.isElement(p))) == null || d ? p : p.contextElement || await (e.getDocumentElement == null ? void 0 : e.getDocumentElement(r.floating)),
|
|
68
|
+
boundary: u,
|
|
69
|
+
rootBoundary: a,
|
|
70
|
+
strategy: g
|
|
71
|
+
})), v = c === "floating" ? {
|
|
72
|
+
x: i,
|
|
73
|
+
y: f,
|
|
74
|
+
width: o.floating.width,
|
|
75
|
+
height: o.floating.height
|
|
76
|
+
} : o.reference, h = await (e.getOffsetParent == null ? void 0 : e.getOffsetParent(r.floating)), y = await (e.isElement == null ? void 0 : e.isElement(h)) ? await (e.getScale == null ? void 0 : e.getScale(h)) || {
|
|
77
|
+
x: 1,
|
|
78
|
+
y: 1
|
|
79
|
+
} : {
|
|
80
|
+
x: 1,
|
|
81
|
+
y: 1
|
|
82
|
+
}, O = B(e.convertOffsetParentRelativeRectToViewportRelativeRect ? await e.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
83
|
+
elements: r,
|
|
84
|
+
rect: v,
|
|
85
|
+
offsetParent: h,
|
|
86
|
+
strategy: g
|
|
87
|
+
}) : v);
|
|
88
|
+
return {
|
|
89
|
+
top: (w.top - O.top + s.top) / y.y,
|
|
90
|
+
bottom: (O.bottom - w.bottom + s.bottom) / y.y,
|
|
91
|
+
left: (w.left - O.left + s.left) / y.x,
|
|
92
|
+
right: (O.right - w.right + s.right) / y.x
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const et = 50, st = async (l, t, d) => {
|
|
51
96
|
const {
|
|
52
|
-
placement:
|
|
97
|
+
placement: i = "bottom",
|
|
53
98
|
strategy: f = "absolute",
|
|
54
|
-
middleware:
|
|
55
|
-
platform:
|
|
56
|
-
} = d, r =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
99
|
+
middleware: e = [],
|
|
100
|
+
platform: o
|
|
101
|
+
} = d, r = o.detectOverflow ? o : {
|
|
102
|
+
...o,
|
|
103
|
+
detectOverflow: tt
|
|
104
|
+
}, g = await (o.isRTL == null ? void 0 : o.isRTL(t));
|
|
105
|
+
let u = await o.getElementRects({
|
|
106
|
+
reference: l,
|
|
107
|
+
floating: t,
|
|
60
108
|
strategy: f
|
|
61
109
|
}), {
|
|
62
|
-
x:
|
|
63
|
-
y:
|
|
64
|
-
} =
|
|
65
|
-
|
|
110
|
+
x: a,
|
|
111
|
+
y: c
|
|
112
|
+
} = X(u, i, g), m = i, n = 0;
|
|
113
|
+
const s = {};
|
|
114
|
+
for (let x = 0; x < e.length; x++) {
|
|
115
|
+
const p = e[x];
|
|
116
|
+
if (!p)
|
|
117
|
+
continue;
|
|
66
118
|
const {
|
|
67
119
|
name: w,
|
|
68
|
-
fn:
|
|
69
|
-
} =
|
|
120
|
+
fn: v
|
|
121
|
+
} = p, {
|
|
70
122
|
x: h,
|
|
71
123
|
y,
|
|
72
|
-
data:
|
|
73
|
-
reset:
|
|
74
|
-
} = await
|
|
75
|
-
x:
|
|
76
|
-
y:
|
|
77
|
-
initialPlacement:
|
|
124
|
+
data: O,
|
|
125
|
+
reset: A
|
|
126
|
+
} = await v({
|
|
127
|
+
x: a,
|
|
128
|
+
y: c,
|
|
129
|
+
initialPlacement: i,
|
|
78
130
|
placement: m,
|
|
79
131
|
strategy: f,
|
|
80
|
-
middlewareData:
|
|
81
|
-
rects:
|
|
82
|
-
platform:
|
|
132
|
+
middlewareData: s,
|
|
133
|
+
rects: u,
|
|
134
|
+
platform: r,
|
|
83
135
|
elements: {
|
|
84
|
-
reference:
|
|
85
|
-
floating:
|
|
136
|
+
reference: l,
|
|
137
|
+
floating: t
|
|
86
138
|
}
|
|
87
139
|
});
|
|
88
|
-
|
|
89
|
-
...
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}, v && l <= 50 && (l++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (x = v.rects === !0 ? await c.getElementRects({
|
|
95
|
-
reference: a,
|
|
96
|
-
floating: e,
|
|
140
|
+
a = h ?? a, c = y ?? c, s[w] = {
|
|
141
|
+
...s[w],
|
|
142
|
+
...O
|
|
143
|
+
}, A && n < et && (n++, typeof A == "object" && (A.placement && (m = A.placement), A.rects && (u = A.rects === !0 ? await o.getElementRects({
|
|
144
|
+
reference: l,
|
|
145
|
+
floating: t,
|
|
97
146
|
strategy: f
|
|
98
|
-
}) :
|
|
99
|
-
x:
|
|
100
|
-
y:
|
|
101
|
-
} =
|
|
147
|
+
}) : A.rects), {
|
|
148
|
+
x: a,
|
|
149
|
+
y: c
|
|
150
|
+
} = X(u, m, g)), x = -1);
|
|
102
151
|
}
|
|
103
152
|
return {
|
|
104
|
-
x:
|
|
105
|
-
y:
|
|
153
|
+
x: a,
|
|
154
|
+
y: c,
|
|
106
155
|
placement: m,
|
|
107
156
|
strategy: f,
|
|
108
|
-
middlewareData:
|
|
157
|
+
middlewareData: s
|
|
109
158
|
};
|
|
110
|
-
}
|
|
111
|
-
async function z(a, e) {
|
|
112
|
-
var d;
|
|
113
|
-
e === void 0 && (e = {});
|
|
114
|
-
const {
|
|
115
|
-
x: o,
|
|
116
|
-
y: f,
|
|
117
|
-
platform: n,
|
|
118
|
-
rects: c,
|
|
119
|
-
elements: r,
|
|
120
|
-
strategy: g
|
|
121
|
-
} = a, {
|
|
122
|
-
boundary: x = "clippingAncestors",
|
|
123
|
-
rootBoundary: i = "viewport",
|
|
124
|
-
elementContext: s = "floating",
|
|
125
|
-
altBoundary: m = !1,
|
|
126
|
-
padding: t = 0
|
|
127
|
-
} = H(e, a), l = q(t), w = r[m ? s === "floating" ? "reference" : "floating" : s], p = X(await n.getClippingRect({
|
|
128
|
-
element: (d = await (n.isElement == null ? void 0 : n.isElement(w))) == null || d ? w : w.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(r.floating)),
|
|
129
|
-
boundary: x,
|
|
130
|
-
rootBoundary: i,
|
|
131
|
-
strategy: g
|
|
132
|
-
})), h = s === "floating" ? {
|
|
133
|
-
x: o,
|
|
134
|
-
y: f,
|
|
135
|
-
width: c.floating.width,
|
|
136
|
-
height: c.floating.height
|
|
137
|
-
} : c.reference, y = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(r.floating)), b = await (n.isElement == null ? void 0 : n.isElement(y)) ? await (n.getScale == null ? void 0 : n.getScale(y)) || {
|
|
138
|
-
x: 1,
|
|
139
|
-
y: 1
|
|
140
|
-
} : {
|
|
141
|
-
x: 1,
|
|
142
|
-
y: 1
|
|
143
|
-
}, v = X(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
144
|
-
elements: r,
|
|
145
|
-
rect: h,
|
|
146
|
-
offsetParent: y,
|
|
147
|
-
strategy: g
|
|
148
|
-
}) : h);
|
|
149
|
-
return {
|
|
150
|
-
top: (p.top - v.top + l.top) / b.y,
|
|
151
|
-
bottom: (v.bottom - p.bottom + l.bottom) / b.y,
|
|
152
|
-
left: (p.left - v.left + l.left) / b.x,
|
|
153
|
-
right: (v.right - p.right + l.right) / b.x
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
const st = (a) => ({
|
|
159
|
+
}, at = (l) => ({
|
|
157
160
|
name: "arrow",
|
|
158
|
-
options:
|
|
159
|
-
async fn(
|
|
161
|
+
options: l,
|
|
162
|
+
async fn(t) {
|
|
160
163
|
const {
|
|
161
164
|
x: d,
|
|
162
|
-
y:
|
|
165
|
+
y: i,
|
|
163
166
|
placement: f,
|
|
164
|
-
rects:
|
|
165
|
-
platform:
|
|
167
|
+
rects: e,
|
|
168
|
+
platform: o,
|
|
166
169
|
elements: r,
|
|
167
170
|
middlewareData: g
|
|
168
|
-
} =
|
|
169
|
-
element:
|
|
170
|
-
padding:
|
|
171
|
-
} =
|
|
172
|
-
if (
|
|
171
|
+
} = t, {
|
|
172
|
+
element: u,
|
|
173
|
+
padding: a = 0
|
|
174
|
+
} = j(l, t) || {};
|
|
175
|
+
if (u == null)
|
|
173
176
|
return {};
|
|
174
|
-
const
|
|
177
|
+
const c = I(a), m = {
|
|
175
178
|
x: d,
|
|
176
|
-
y:
|
|
177
|
-
},
|
|
178
|
-
let
|
|
179
|
-
(!
|
|
180
|
-
const
|
|
179
|
+
y: i
|
|
180
|
+
}, n = N(f), s = U(n), x = await o.getDimensions(u), p = n === "y", w = p ? "top" : "left", v = p ? "bottom" : "right", h = p ? "clientHeight" : "clientWidth", y = e.reference[s] + e.reference[n] - m[n] - e.floating[s], O = m[n] - e.reference[n], A = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(u));
|
|
181
|
+
let R = A ? A[h] : 0;
|
|
182
|
+
(!R || !await (o.isElement == null ? void 0 : o.isElement(A))) && (R = r.floating[h] || e.floating[s]);
|
|
183
|
+
const E = y / 2 - O / 2, C = R / 2 - x[s] / 2 - 1, P = H(c[w], C), L = H(c[v], C), k = P, M = R - x[s] - L, b = R / 2 - x[s] / 2 + E, $ = z(k, b, M), T = !g.arrow && Y(f) != null && b !== $ && e.reference[s] / 2 - (b < k ? P : L) - x[s] / 2 < 0, D = T ? b < k ? b - k : b - M : 0;
|
|
181
184
|
return {
|
|
182
|
-
[
|
|
185
|
+
[n]: m[n] + D,
|
|
183
186
|
data: {
|
|
184
|
-
[
|
|
185
|
-
centerOffset:
|
|
186
|
-
...
|
|
187
|
-
alignmentOffset:
|
|
187
|
+
[n]: $,
|
|
188
|
+
centerOffset: b - $ - D,
|
|
189
|
+
...T && {
|
|
190
|
+
alignmentOffset: D
|
|
188
191
|
}
|
|
189
192
|
},
|
|
190
|
-
reset:
|
|
193
|
+
reset: T
|
|
191
194
|
};
|
|
192
195
|
}
|
|
193
|
-
}),
|
|
194
|
-
return
|
|
196
|
+
}), lt = function(l) {
|
|
197
|
+
return l === void 0 && (l = {}), {
|
|
195
198
|
name: "flip",
|
|
196
|
-
options:
|
|
197
|
-
async fn(
|
|
198
|
-
var d,
|
|
199
|
+
options: l,
|
|
200
|
+
async fn(t) {
|
|
201
|
+
var d, i;
|
|
199
202
|
const {
|
|
200
203
|
placement: f,
|
|
201
|
-
middlewareData:
|
|
202
|
-
rects:
|
|
204
|
+
middlewareData: e,
|
|
205
|
+
rects: o,
|
|
203
206
|
initialPlacement: r,
|
|
204
207
|
platform: g,
|
|
205
|
-
elements:
|
|
206
|
-
} =
|
|
207
|
-
mainAxis:
|
|
208
|
-
crossAxis:
|
|
208
|
+
elements: u
|
|
209
|
+
} = t, {
|
|
210
|
+
mainAxis: a = !0,
|
|
211
|
+
crossAxis: c = !0,
|
|
209
212
|
fallbackPlacements: m,
|
|
210
|
-
fallbackStrategy:
|
|
211
|
-
fallbackAxisSideDirection:
|
|
212
|
-
flipAlignment:
|
|
213
|
-
...
|
|
214
|
-
} =
|
|
215
|
-
if ((d =
|
|
213
|
+
fallbackStrategy: n = "bestFit",
|
|
214
|
+
fallbackAxisSideDirection: s = "none",
|
|
215
|
+
flipAlignment: x = !0,
|
|
216
|
+
...p
|
|
217
|
+
} = j(l, t);
|
|
218
|
+
if ((d = e.arrow) != null && d.alignmentOffset)
|
|
216
219
|
return {};
|
|
217
|
-
const
|
|
218
|
-
!m &&
|
|
219
|
-
const
|
|
220
|
-
let P = ((
|
|
221
|
-
if (
|
|
222
|
-
const
|
|
223
|
-
|
|
220
|
+
const w = W(f), v = _(r), h = W(r) === r, y = await (g.isRTL == null ? void 0 : g.isRTL(u.floating)), O = m || (h || !x ? [G(r)] : J(r)), A = s !== "none";
|
|
221
|
+
!m && A && O.push(...K(r, x, s, y));
|
|
222
|
+
const R = [r, ...O], E = await g.detectOverflow(t, p), C = [];
|
|
223
|
+
let P = ((i = e.flip) == null ? void 0 : i.overflows) || [];
|
|
224
|
+
if (a && C.push(E[w]), c) {
|
|
225
|
+
const b = Q(f, o, y);
|
|
226
|
+
C.push(E[b[0]], E[b[1]]);
|
|
224
227
|
}
|
|
225
228
|
if (P = [...P, {
|
|
226
229
|
placement: f,
|
|
227
|
-
overflows:
|
|
228
|
-
}], !
|
|
229
|
-
var L,
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
230
|
+
overflows: C
|
|
231
|
+
}], !C.every((b) => b <= 0)) {
|
|
232
|
+
var L, k;
|
|
233
|
+
const b = (((L = e.flip) == null ? void 0 : L.index) || 0) + 1, $ = R[b];
|
|
234
|
+
if ($ && (!(c === "alignment" ? v !== _($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
235
|
// overflows the main axis.
|
|
233
|
-
P.every((
|
|
236
|
+
P.every((S) => _(S.placement) === v ? S.overflows[0] > 0 : !0)))
|
|
234
237
|
return {
|
|
235
238
|
data: {
|
|
236
|
-
index:
|
|
239
|
+
index: b,
|
|
237
240
|
overflows: P
|
|
238
241
|
},
|
|
239
242
|
reset: {
|
|
240
|
-
placement:
|
|
243
|
+
placement: $
|
|
241
244
|
}
|
|
242
245
|
};
|
|
243
|
-
let
|
|
244
|
-
if (!
|
|
245
|
-
switch (
|
|
246
|
+
let T = (k = P.filter((D) => D.overflows[0] <= 0).sort((D, S) => D.overflows[1] - S.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
247
|
+
if (!T)
|
|
248
|
+
switch (n) {
|
|
246
249
|
case "bestFit": {
|
|
247
250
|
var M;
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const V =
|
|
251
|
-
return V ===
|
|
251
|
+
const D = (M = P.filter((S) => {
|
|
252
|
+
if (A) {
|
|
253
|
+
const V = _(S.placement);
|
|
254
|
+
return V === v || // Create a bias to the `y` side axis due to horizontal
|
|
252
255
|
// reading directions favoring greater width.
|
|
253
256
|
V === "y";
|
|
254
257
|
}
|
|
255
258
|
return !0;
|
|
256
|
-
}).map((
|
|
257
|
-
|
|
259
|
+
}).map((S) => [S.placement, S.overflows.filter((V) => V > 0).reduce((V, q) => V + q, 0)]).sort((S, V) => S[1] - V[1])[0]) == null ? void 0 : M[0];
|
|
260
|
+
D && (T = D);
|
|
258
261
|
break;
|
|
259
262
|
}
|
|
260
263
|
case "initialPlacement":
|
|
261
|
-
|
|
264
|
+
T = r;
|
|
262
265
|
break;
|
|
263
266
|
}
|
|
264
|
-
if (f !==
|
|
267
|
+
if (f !== T)
|
|
265
268
|
return {
|
|
266
269
|
reset: {
|
|
267
|
-
placement:
|
|
270
|
+
placement: T
|
|
268
271
|
}
|
|
269
272
|
};
|
|
270
273
|
}
|
|
271
274
|
return {};
|
|
272
275
|
}
|
|
273
276
|
};
|
|
274
|
-
},
|
|
275
|
-
async function
|
|
277
|
+
}, nt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
278
|
+
async function it(l, t) {
|
|
276
279
|
const {
|
|
277
280
|
placement: d,
|
|
278
|
-
platform:
|
|
281
|
+
platform: i,
|
|
279
282
|
elements: f
|
|
280
|
-
} =
|
|
283
|
+
} = l, e = await (i.isRTL == null ? void 0 : i.isRTL(f.floating)), o = W(d), r = Y(d), g = _(d) === "y", u = nt.has(o) ? -1 : 1, a = e && g ? -1 : 1, c = j(t, l);
|
|
281
284
|
let {
|
|
282
285
|
mainAxis: m,
|
|
283
|
-
crossAxis:
|
|
284
|
-
alignmentAxis:
|
|
285
|
-
} = typeof
|
|
286
|
-
mainAxis:
|
|
286
|
+
crossAxis: n,
|
|
287
|
+
alignmentAxis: s
|
|
288
|
+
} = typeof c == "number" ? {
|
|
289
|
+
mainAxis: c,
|
|
287
290
|
crossAxis: 0,
|
|
288
291
|
alignmentAxis: null
|
|
289
292
|
} : {
|
|
290
|
-
mainAxis:
|
|
291
|
-
crossAxis:
|
|
292
|
-
alignmentAxis:
|
|
293
|
+
mainAxis: c.mainAxis || 0,
|
|
294
|
+
crossAxis: c.crossAxis || 0,
|
|
295
|
+
alignmentAxis: c.alignmentAxis
|
|
293
296
|
};
|
|
294
|
-
return r && typeof
|
|
295
|
-
x:
|
|
296
|
-
y: m *
|
|
297
|
+
return r && typeof s == "number" && (n = r === "end" ? s * -1 : s), g ? {
|
|
298
|
+
x: n * a,
|
|
299
|
+
y: m * u
|
|
297
300
|
} : {
|
|
298
|
-
x: m *
|
|
299
|
-
y:
|
|
301
|
+
x: m * u,
|
|
302
|
+
y: n * a
|
|
300
303
|
};
|
|
301
304
|
}
|
|
302
|
-
const
|
|
303
|
-
return
|
|
305
|
+
const ct = function(l) {
|
|
306
|
+
return l === void 0 && (l = 0), {
|
|
304
307
|
name: "offset",
|
|
305
|
-
options:
|
|
306
|
-
async fn(
|
|
307
|
-
var d,
|
|
308
|
+
options: l,
|
|
309
|
+
async fn(t) {
|
|
310
|
+
var d, i;
|
|
308
311
|
const {
|
|
309
312
|
x: f,
|
|
310
|
-
y:
|
|
311
|
-
placement:
|
|
313
|
+
y: e,
|
|
314
|
+
placement: o,
|
|
312
315
|
middlewareData: r
|
|
313
|
-
} =
|
|
314
|
-
return
|
|
316
|
+
} = t, g = await it(t, l);
|
|
317
|
+
return o === ((d = r.offset) == null ? void 0 : d.placement) && (i = r.arrow) != null && i.alignmentOffset ? {} : {
|
|
315
318
|
x: f + g.x,
|
|
316
|
-
y:
|
|
319
|
+
y: e + g.y,
|
|
317
320
|
data: {
|
|
318
321
|
...g,
|
|
319
|
-
placement:
|
|
322
|
+
placement: o
|
|
320
323
|
}
|
|
321
324
|
};
|
|
322
325
|
}
|
|
323
326
|
};
|
|
324
|
-
},
|
|
325
|
-
return
|
|
327
|
+
}, rt = function(l) {
|
|
328
|
+
return l === void 0 && (l = {}), {
|
|
326
329
|
name: "shift",
|
|
327
|
-
options:
|
|
328
|
-
async fn(
|
|
330
|
+
options: l,
|
|
331
|
+
async fn(t) {
|
|
329
332
|
const {
|
|
330
333
|
x: d,
|
|
331
|
-
y:
|
|
332
|
-
placement: f
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
y: i,
|
|
335
|
+
placement: f,
|
|
336
|
+
platform: e
|
|
337
|
+
} = t, {
|
|
338
|
+
mainAxis: o = !0,
|
|
339
|
+
crossAxis: r = !1,
|
|
340
|
+
limiter: g = {
|
|
337
341
|
fn: (w) => {
|
|
338
342
|
let {
|
|
339
|
-
x:
|
|
343
|
+
x: v,
|
|
340
344
|
y: h
|
|
341
345
|
} = w;
|
|
342
346
|
return {
|
|
343
|
-
x:
|
|
347
|
+
x: v,
|
|
344
348
|
y: h
|
|
345
349
|
};
|
|
346
350
|
}
|
|
347
351
|
},
|
|
348
|
-
...
|
|
349
|
-
} =
|
|
352
|
+
...u
|
|
353
|
+
} = j(l, t), a = {
|
|
350
354
|
x: d,
|
|
351
|
-
y:
|
|
352
|
-
},
|
|
353
|
-
let
|
|
354
|
-
if (
|
|
355
|
-
const w =
|
|
356
|
-
|
|
355
|
+
y: i
|
|
356
|
+
}, c = await e.detectOverflow(t, u), m = _(W(f)), n = Z(m);
|
|
357
|
+
let s = a[n], x = a[m];
|
|
358
|
+
if (o) {
|
|
359
|
+
const w = n === "y" ? "top" : "left", v = n === "y" ? "bottom" : "right", h = s + c[w], y = s - c[v];
|
|
360
|
+
s = z(h, s, y);
|
|
357
361
|
}
|
|
358
|
-
if (
|
|
359
|
-
const w =
|
|
360
|
-
|
|
362
|
+
if (r) {
|
|
363
|
+
const w = m === "y" ? "top" : "left", v = m === "y" ? "bottom" : "right", h = x + c[w], y = x - c[v];
|
|
364
|
+
x = z(h, x, y);
|
|
361
365
|
}
|
|
362
|
-
const
|
|
363
|
-
...
|
|
364
|
-
[
|
|
365
|
-
[
|
|
366
|
+
const p = g.fn({
|
|
367
|
+
...t,
|
|
368
|
+
[n]: s,
|
|
369
|
+
[m]: x
|
|
366
370
|
});
|
|
367
371
|
return {
|
|
368
|
-
...
|
|
372
|
+
...p,
|
|
369
373
|
data: {
|
|
370
|
-
x:
|
|
371
|
-
y:
|
|
374
|
+
x: p.x - d,
|
|
375
|
+
y: p.y - i,
|
|
372
376
|
enabled: {
|
|
373
|
-
[
|
|
374
|
-
[
|
|
377
|
+
[n]: o,
|
|
378
|
+
[m]: r
|
|
375
379
|
}
|
|
376
380
|
}
|
|
377
381
|
};
|
|
378
382
|
}
|
|
379
383
|
};
|
|
380
|
-
},
|
|
381
|
-
return
|
|
384
|
+
}, ft = function(l) {
|
|
385
|
+
return l === void 0 && (l = {}), {
|
|
382
386
|
name: "size",
|
|
383
|
-
options:
|
|
384
|
-
async fn(
|
|
385
|
-
var d,
|
|
387
|
+
options: l,
|
|
388
|
+
async fn(t) {
|
|
389
|
+
var d, i;
|
|
386
390
|
const {
|
|
387
391
|
placement: f,
|
|
388
|
-
rects:
|
|
389
|
-
platform:
|
|
392
|
+
rects: e,
|
|
393
|
+
platform: o,
|
|
390
394
|
elements: r
|
|
391
|
-
} =
|
|
395
|
+
} = t, {
|
|
392
396
|
apply: g = () => {
|
|
393
397
|
},
|
|
394
|
-
...
|
|
395
|
-
} =
|
|
396
|
-
width:
|
|
397
|
-
height:
|
|
398
|
-
} =
|
|
399
|
-
let
|
|
400
|
-
|
|
401
|
-
const
|
|
402
|
-
let
|
|
403
|
-
if ((d =
|
|
404
|
-
const P =
|
|
405
|
-
|
|
398
|
+
...u
|
|
399
|
+
} = j(l, t), a = await o.detectOverflow(t, u), c = W(f), m = Y(f), n = _(f) === "y", {
|
|
400
|
+
width: s,
|
|
401
|
+
height: x
|
|
402
|
+
} = e.floating;
|
|
403
|
+
let p, w;
|
|
404
|
+
c === "top" || c === "bottom" ? (p = c, w = m === (await (o.isRTL == null ? void 0 : o.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (w = c, p = m === "end" ? "top" : "bottom");
|
|
405
|
+
const v = x - a.top - a.bottom, h = s - a.left - a.right, y = H(x - a[p], v), O = H(s - a[w], h), A = !t.middlewareData.shift;
|
|
406
|
+
let R = y, E = O;
|
|
407
|
+
if ((d = t.middlewareData.shift) != null && d.enabled.x && (E = h), (i = t.middlewareData.shift) != null && i.enabled.y && (R = v), A && !m) {
|
|
408
|
+
const P = F(a.left, 0), L = F(a.right, 0), k = F(a.top, 0), M = F(a.bottom, 0);
|
|
409
|
+
n ? E = s - 2 * (P !== 0 || L !== 0 ? P + L : F(a.left, a.right)) : R = x - 2 * (k !== 0 || M !== 0 ? k + M : F(a.top, a.bottom));
|
|
406
410
|
}
|
|
407
411
|
await g({
|
|
408
|
-
...
|
|
409
|
-
availableWidth:
|
|
410
|
-
availableHeight:
|
|
412
|
+
...t,
|
|
413
|
+
availableWidth: E,
|
|
414
|
+
availableHeight: R
|
|
411
415
|
});
|
|
412
|
-
const
|
|
413
|
-
return
|
|
416
|
+
const C = await o.getDimensions(r.floating);
|
|
417
|
+
return s !== C.width || x !== C.height ? {
|
|
414
418
|
reset: {
|
|
415
419
|
rects: !0
|
|
416
420
|
}
|
|
@@ -419,12 +423,12 @@ const lt = function(a) {
|
|
|
419
423
|
};
|
|
420
424
|
};
|
|
421
425
|
export {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
426
|
+
at as arrow,
|
|
427
|
+
st as computePosition,
|
|
428
|
+
tt as detectOverflow,
|
|
429
|
+
lt as flip,
|
|
430
|
+
ct as offset,
|
|
431
|
+
B as rectToClientRect,
|
|
432
|
+
rt as shift,
|
|
433
|
+
ft as size
|
|
430
434
|
};
|