@serendie/ui 2.1.3 → 2.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.
- package/dist/client.js +79 -74
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +22 -21
- package/dist/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/components/DatePicker/DatePicker.js +203 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +6 -0
- package/dist/components/DatePicker/parseDate.d.ts +1 -0
- package/dist/components/DatePicker/styles.d.ts +1 -0
- package/dist/components/DatePicker/styles.js +224 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
- package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
- package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
- package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
- package/dist/components/ProgressIndicator/index.d.ts +4 -1
- package/dist/components/ProgressIndicator/index.js +3 -2
- package/dist/components/ProgressIndicator/util.d.ts +1 -0
- package/dist/components/ProgressIndicator/util.js +13 -0
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/TextField/TextField.js +59 -156
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +80 -75
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
- package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
- package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
- package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
- package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
- package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
- package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
- package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
- package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
- package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
- package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
- package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
- package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
- package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
- package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
- package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
- package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
- package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
- package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
- package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
- package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
- package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
- package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
- package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
- package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
- package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
- package/dist/preset.d.ts +11 -1
- package/dist/recipes/index.d.ts +3 -2
- package/dist/recipes/index.js +5 -2
- package/dist/recipes/textFieldRecipe.d.ts +6 -0
- package/dist/recipes/textFieldRecipe.js +107 -0
- package/dist/styled-system/css/cva.js +43 -38
- package/dist/styled-system/recipes/create-recipe.js +37 -0
- package/dist/styled-system/recipes/text-field-recipe.js +61 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/keyframes/index.d.ts +8 -0
- package/dist/tokens/keyframes/index.js +6 -2
- package/package.json +3 -3
- package/styled-system/recipes/create-recipe.js +82 -0
- package/styled-system/recipes/index.d.ts +2 -0
- package/styled-system/recipes/index.js +1 -0
- package/styled-system/recipes/text-field-recipe.d.ts +28 -0
- package/styled-system/recipes/text-field-recipe.js +72 -0
- package/styled-system/types/prop-type.d.ts +1 -1
- package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
- package/dist/node_modules/proxy-compare/dist/index.js +0 -7
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { connect as m, machine as s } from "../../../../../@zag-js/date-picker/dist/index.js";
|
|
2
|
+
import { useMachine as p, normalizeProps as a } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
|
+
import { useId as u } from "react";
|
|
4
|
+
import { useEnvironmentContext as f } from "../../providers/environment/use-environment-context.js";
|
|
5
|
+
import { useLocaleContext as d } from "../../providers/locale/use-locale-context.js";
|
|
6
|
+
const C = (o) => {
|
|
7
|
+
const e = u(), { getRootNode: t } = f(), { dir: r, locale: n } = d(), c = {
|
|
8
|
+
id: e,
|
|
9
|
+
dir: r,
|
|
10
|
+
locale: n,
|
|
11
|
+
getRootNode: t,
|
|
12
|
+
...o
|
|
13
|
+
}, i = p(s, c);
|
|
14
|
+
return m(i, a);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
C as useDatePicker
|
|
18
|
+
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { mergeProps as f } from "../../../../@zag-js/core/dist/index.js";
|
|
2
|
-
import { memo as l, forwardRef as g, createElement as m,
|
|
2
|
+
import { memo as l, forwardRef as g, createElement as m, isValidElement as u, Children as d, cloneElement as h } from "react";
|
|
3
3
|
import { composeRefs as y } from "../utils/compose-refs.js";
|
|
4
4
|
function R(r) {
|
|
5
5
|
var e, s;
|
|
6
6
|
let t = (e = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : e.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
7
7
|
return n ? r.ref : (t = (s = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? r.props.ref : r.props.ref || r.ref);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const a = (r) => {
|
|
10
10
|
const t = l(
|
|
11
11
|
g((n, e) => {
|
|
12
|
-
const { asChild: s, children:
|
|
12
|
+
const { asChild: s, children: i, ...c } = n;
|
|
13
13
|
if (!s)
|
|
14
|
-
return m(r, { ...c, ref: e },
|
|
15
|
-
|
|
16
|
-
if (!d(i))
|
|
14
|
+
return m(r, { ...c, ref: e }, i);
|
|
15
|
+
if (!u(i))
|
|
17
16
|
return null;
|
|
18
|
-
const p = R(
|
|
19
|
-
return h(
|
|
20
|
-
...f(c,
|
|
17
|
+
const o = d.only(i), p = R(o);
|
|
18
|
+
return h(o, {
|
|
19
|
+
...f(c, o.props),
|
|
21
20
|
ref: e ? y(e, p) : p
|
|
22
21
|
});
|
|
23
22
|
})
|
|
@@ -25,13 +24,13 @@ const o = (r) => {
|
|
|
25
24
|
return t.displayName = r.displayName || r.name, t;
|
|
26
25
|
}, w = () => {
|
|
27
26
|
const r = /* @__PURE__ */ new Map();
|
|
28
|
-
return new Proxy(
|
|
27
|
+
return new Proxy(a, {
|
|
29
28
|
apply(t, n, e) {
|
|
30
|
-
return
|
|
29
|
+
return a(e[0]);
|
|
31
30
|
},
|
|
32
31
|
get(t, n) {
|
|
33
32
|
const e = n;
|
|
34
|
-
return r.has(e) || r.set(e,
|
|
33
|
+
return r.has(e) || r.set(e, a(e)), r.get(e);
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
}, O = w();
|
|
@@ -9,8 +9,8 @@ import { useMenu as M } from "./use-menu.js";
|
|
|
9
9
|
import { useMenuContext as v, MenuProvider as C } from "./use-menu-context.js";
|
|
10
10
|
import { useMenuMachineContext as O, MenuMachineProvider as x } from "./use-menu-machine-context.js";
|
|
11
11
|
import { MenuTriggerItemProvider as I } from "./use-menu-trigger-item-context.js";
|
|
12
|
-
import { mergeProps as
|
|
13
|
-
const
|
|
12
|
+
import { mergeProps as D } from "../../../../../@zag-js/core/dist/index.js";
|
|
13
|
+
const q = (i) => {
|
|
14
14
|
const [s, p] = g(i), [c, u] = d()(p, [
|
|
15
15
|
"anchorPoint",
|
|
16
16
|
"aria-label",
|
|
@@ -29,11 +29,12 @@ const R = (i) => {
|
|
|
29
29
|
"onInteractOutside",
|
|
30
30
|
"onOpenChange",
|
|
31
31
|
"onPointerDownOutside",
|
|
32
|
+
"onRequestDismiss",
|
|
32
33
|
"onSelect",
|
|
33
34
|
"open",
|
|
34
35
|
"positioning",
|
|
35
36
|
"typeahead"
|
|
36
|
-
]), e = v(), t = O(), { api: o, service: n } = M(c), m = h(
|
|
37
|
+
]), e = v(), t = O(), { api: o, service: n } = M(c), m = h(D({ present: o.open }, s));
|
|
37
38
|
f(() => {
|
|
38
39
|
t && e && (e.setChild(n), o.setParent(t));
|
|
39
40
|
});
|
|
@@ -41,5 +42,5 @@ const R = (i) => {
|
|
|
41
42
|
return /* @__PURE__ */ r(I, { value: a, children: /* @__PURE__ */ r(x, { value: n, children: /* @__PURE__ */ r(C, { value: o, children: /* @__PURE__ */ r(P, { value: m, ...u }) }) }) });
|
|
42
43
|
};
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
q as MenuRoot
|
|
45
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { evaluate as L, getSide as j, getSideAxis as T, getOppositePlacement as
|
|
1
|
+
import { evaluate as L, getSide as j, getSideAxis as T, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, clamp as X, getPaddingObject as J, getAlignmentAxis as K, getAlignment as z, min as $, max as W, rectToClientRect as _, getOppositeAxis as N, getAxisLength as Q, sides as se } from "../../utils/dist/floating-ui.utils.js";
|
|
2
2
|
function I(t, e, d) {
|
|
3
3
|
let {
|
|
4
4
|
reference: a,
|
|
@@ -47,7 +47,7 @@ function I(t, e, d) {
|
|
|
47
47
|
}
|
|
48
48
|
return i;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const ce = async (t, e, d) => {
|
|
51
51
|
const {
|
|
52
52
|
placement: a = "bottom",
|
|
53
53
|
strategy: r = "absolute",
|
|
@@ -153,7 +153,7 @@ async function Y(t, e) {
|
|
|
153
153
|
right: (w.right - y.right + l.right) / v.x
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const le = (t) => ({
|
|
157
157
|
name: "arrow",
|
|
158
158
|
options: t,
|
|
159
159
|
async fn(e) {
|
|
@@ -177,20 +177,20 @@ const ce = (t) => ({
|
|
|
177
177
|
}, i = K(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
178
|
let C = P ? P[p] : 0;
|
|
179
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,
|
|
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, S = E ? b < D ? b - D : b - F : 0;
|
|
181
181
|
return {
|
|
182
|
-
[i]: f[i] +
|
|
182
|
+
[i]: f[i] + S,
|
|
183
183
|
data: {
|
|
184
184
|
[i]: B,
|
|
185
|
-
centerOffset: b - B -
|
|
185
|
+
centerOffset: b - B - S,
|
|
186
186
|
...E && {
|
|
187
|
-
alignmentOffset:
|
|
187
|
+
alignmentOffset: S
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
reset: E
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
}),
|
|
193
|
+
}), re = function(t) {
|
|
194
194
|
return t === void 0 && (t = {}), {
|
|
195
195
|
name: "flip",
|
|
196
196
|
options: t,
|
|
@@ -214,12 +214,12 @@ const ce = (t) => ({
|
|
|
214
214
|
} = L(t, e);
|
|
215
215
|
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
216
|
return {};
|
|
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 ? [
|
|
218
|
-
!f && P && w.push(...
|
|
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 ? [ee(m)] : te(m)), P = l !== "none";
|
|
218
|
+
!f && P && w.push(...ne(m, g, l, v));
|
|
219
219
|
const C = [m, ...w], M = await Y(e, x), k = [];
|
|
220
220
|
let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
221
221
|
if (c && k.push(M[y]), s) {
|
|
222
|
-
const b =
|
|
222
|
+
const b = ie(r, o, v);
|
|
223
223
|
k.push(M[b[0]], M[b[1]]);
|
|
224
224
|
}
|
|
225
225
|
if (O = [...O, {
|
|
@@ -230,7 +230,7 @@ const ce = (t) => ({
|
|
|
230
230
|
const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
|
|
231
231
|
if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
232
|
// overflows the main axis.
|
|
233
|
-
O.every((
|
|
233
|
+
O.every((R) => T(R.placement) === A ? R.overflows[0] > 0 : !0)))
|
|
234
234
|
return {
|
|
235
235
|
data: {
|
|
236
236
|
index: b,
|
|
@@ -240,21 +240,21 @@ const ce = (t) => ({
|
|
|
240
240
|
placement: B
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
|
-
let E = (D = O.filter((
|
|
243
|
+
let E = (D = O.filter((S) => S.overflows[0] <= 0).sort((S, R) => S.overflows[1] - R.overflows[1])[0]) == null ? void 0 : D.placement;
|
|
244
244
|
if (!E)
|
|
245
245
|
switch (i) {
|
|
246
246
|
case "bestFit": {
|
|
247
247
|
var F;
|
|
248
|
-
const
|
|
248
|
+
const S = (F = O.filter((R) => {
|
|
249
249
|
if (P) {
|
|
250
|
-
const V = T(
|
|
250
|
+
const V = T(R.placement);
|
|
251
251
|
return V === A || // Create a bias to the `y` side axis due to horizontal
|
|
252
252
|
// reading directions favoring greater width.
|
|
253
253
|
V === "y";
|
|
254
254
|
}
|
|
255
255
|
return !0;
|
|
256
|
-
}).map((
|
|
257
|
-
|
|
256
|
+
}).map((R) => [R.placement, R.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((R, V) => R[1] - V[1])[0]) == null ? void 0 : F[0];
|
|
257
|
+
S && (E = S);
|
|
258
258
|
break;
|
|
259
259
|
}
|
|
260
260
|
case "initialPlacement":
|
|
@@ -281,9 +281,9 @@ function q(t, e) {
|
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
function G(t) {
|
|
284
|
-
return
|
|
284
|
+
return se.some((e) => t[e] >= 0);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const fe = function(t) {
|
|
287
287
|
return t === void 0 && (t = {}), {
|
|
288
288
|
name: "hide",
|
|
289
289
|
options: t,
|
|
@@ -324,13 +324,13 @@ const re = function(t) {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
|
-
};
|
|
328
|
-
async function
|
|
327
|
+
}, U = /* @__PURE__ */ new Set(["left", "top"]);
|
|
328
|
+
async function oe(t, e) {
|
|
329
329
|
const {
|
|
330
330
|
placement: d,
|
|
331
331
|
platform: a,
|
|
332
332
|
elements: r
|
|
333
|
-
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h =
|
|
333
|
+
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = U.has(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
|
|
334
334
|
let {
|
|
335
335
|
mainAxis: f,
|
|
336
336
|
crossAxis: i,
|
|
@@ -352,7 +352,7 @@ async function se(t, e) {
|
|
|
352
352
|
y: i * c
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
const
|
|
355
|
+
const me = function(t) {
|
|
356
356
|
return t === void 0 && (t = 0), {
|
|
357
357
|
name: "offset",
|
|
358
358
|
options: t,
|
|
@@ -363,7 +363,7 @@ const fe = function(t) {
|
|
|
363
363
|
y: n,
|
|
364
364
|
placement: o,
|
|
365
365
|
middlewareData: m
|
|
366
|
-
} = e, u = await
|
|
366
|
+
} = e, u = await oe(e, t);
|
|
367
367
|
return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
|
|
368
368
|
x: r + u.x,
|
|
369
369
|
y: n + u.y,
|
|
@@ -374,7 +374,7 @@ const fe = function(t) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
|
-
},
|
|
377
|
+
}, de = function(t) {
|
|
378
378
|
return t === void 0 && (t = {}), {
|
|
379
379
|
name: "shift",
|
|
380
380
|
options: t,
|
|
@@ -430,7 +430,7 @@ const fe = function(t) {
|
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
},
|
|
433
|
+
}, xe = function(t) {
|
|
434
434
|
return t === void 0 && (t = {}), {
|
|
435
435
|
options: t,
|
|
436
436
|
fn(e) {
|
|
@@ -463,7 +463,7 @@ const fe = function(t) {
|
|
|
463
463
|
}
|
|
464
464
|
if (h) {
|
|
465
465
|
var y, A;
|
|
466
|
-
const p = f === "y" ? "width" : "height", v =
|
|
466
|
+
const p = f === "y" ? "width" : "height", v = U.has(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
467
|
l < w ? l = w : l > P && (l = P);
|
|
468
468
|
}
|
|
469
469
|
return {
|
|
@@ -472,7 +472,7 @@ const fe = function(t) {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
|
-
},
|
|
475
|
+
}, ge = function(t) {
|
|
476
476
|
return t === void 0 && (t = {}), {
|
|
477
477
|
name: "size",
|
|
478
478
|
options: t,
|
|
@@ -514,14 +514,14 @@ const fe = function(t) {
|
|
|
514
514
|
};
|
|
515
515
|
};
|
|
516
516
|
export {
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
le as arrow,
|
|
518
|
+
ce as computePosition,
|
|
519
519
|
Y as detectOverflow,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
re as flip,
|
|
521
|
+
fe as hide,
|
|
522
|
+
xe as limitShift,
|
|
523
|
+
me as offset,
|
|
524
524
|
_ as rectToClientRect,
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
de as shift,
|
|
526
|
+
ge as size
|
|
527
527
|
};
|