@serendie/ui 0.1.16 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -9
- package/dist/components/{Accordion.d.ts → Accordion/Accordion.d.ts} +2 -2
- package/dist/components/{Accordion.js → Accordion/Accordion.js} +10 -10
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/AccordionGroup.js +4 -4
- package/dist/components/Avatar.js +4 -4
- package/dist/components/Badge.js +4 -4
- package/dist/components/Banner.js +4 -4
- package/dist/components/BottomNavigation.js +3 -3
- package/dist/components/BottomNavigationItem.js +4 -4
- package/dist/components/Button.js +7 -7
- package/dist/components/CheckBox.js +4 -4
- package/dist/components/ChoiceBox.js +10 -10
- package/dist/components/DashboardWidget.js +4 -4
- package/dist/components/Divider.js +4 -4
- package/dist/components/Drawer.js +4 -4
- package/dist/components/DropdownMenu.js +4 -4
- package/dist/components/IconButton.js +4 -4
- package/dist/components/ListItem.js +4 -4
- package/dist/components/ModalDialog.js +4 -4
- package/dist/components/NotificationBadge.js +4 -4
- package/dist/components/ProgressIndicator.js +4 -4
- package/dist/components/RadioButton.js +4 -4
- package/dist/components/Search.js +6 -6
- package/dist/components/Select.js +4 -4
- package/dist/components/Switch.js +4 -4
- package/dist/components/TabItem.js +4 -4
- package/dist/components/Tabs.js +4 -4
- package/dist/components/TextArea.js +4 -4
- package/dist/components/TextField.js +4 -4
- package/dist/components/Toast.js +3 -3
- package/dist/components/TopAppBar.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +89 -89
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-fallback.js +6 -7
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-image.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +8 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-control.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-input.js +6 -7
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-text.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-hidden-input.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-control.js +6 -7
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-label.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-positioner.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +7 -7
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-trigger.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-value-text.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +35 -31
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-control.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-label.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root.js +8 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-list.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +10 -10
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-root.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-title.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +4 -4
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +361 -303
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +229 -216
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +19 -19
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +39 -38
- package/dist/node_modules/@serendie/design-token/dist/panda-tokens.js +823 -20
- package/dist/node_modules/@serendie/design-token/dist/tokens.js +346 -25
- package/dist/node_modules/@zag-js/accordion/dist/index.js +12 -12
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +13 -62
- package/dist/node_modules/@zag-js/avatar/dist/index.js +12 -10
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +99 -92
- package/dist/node_modules/@zag-js/collapsible/dist/index.js +5 -5
- package/dist/node_modules/@zag-js/collection/dist/index.js +21 -21
- package/dist/node_modules/@zag-js/combobox/dist/index.js +30 -31
- package/dist/node_modules/@zag-js/core/dist/index.js +285 -320
- package/dist/node_modules/@zag-js/dialog/dist/index.js +56 -62
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +3 -3
- package/dist/node_modules/@zag-js/dom-event/dist/index.js +88 -115
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +2 -2
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +73 -0
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +33 -33
- package/dist/node_modules/@zag-js/menu/dist/index.js +81 -77
- package/dist/node_modules/@zag-js/popper/dist/index.js +86 -79
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +116 -109
- package/dist/node_modules/@zag-js/react/dist/index.js +44 -43
- package/dist/node_modules/@zag-js/select/dist/index.js +203 -231
- package/dist/node_modules/@zag-js/store/dist/index.js +110 -110
- package/dist/node_modules/@zag-js/switch/dist/index.js +62 -55
- package/dist/node_modules/@zag-js/tabs/dist/index.js +64 -61
- package/dist/node_modules/@zag-js/toast/dist/index.js +174 -173
- package/dist/node_modules/@zag-js/utils/dist/index.js +93 -71
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +217 -219
- package/dist/preset.d.ts +807 -4
- package/dist/{ui/styled-system → styled-system}/css/css.js +5 -6
- package/dist/{ui/styled-system → styled-system}/css/cva.js +4 -4
- package/dist/{ui/styled-system → styled-system}/css/sva.js +3 -3
- package/dist/styled-system/jsx/is-valid-prop.js +6 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/getToken.d.ts +324 -3
- package/dist/tokens/index.d.ts +806 -3
- package/package.json +31 -5
- package/styled-system/css/css.js +1 -1
- package/styled-system/jsx/is-valid-prop.js +1 -1
- package/styled-system/themes/theme-asagi.json +1 -1
- package/styled-system/themes/theme-kurikawa.json +1 -1
- package/styled-system/themes/theme-sumire.json +1 -1
- package/styled-system/themes/theme-tsutsuji.json +1 -1
- package/styled-system/tokens/index.js +1238 -54
- package/styled-system/tokens/tokens.d.ts +3 -3
- package/styled-system/types/conditions.d.ts +2 -2
- package/styled-system/types/prop-type.d.ts +1 -1
- package/dist/ui/styled-system/jsx/is-valid-prop.js +0 -6
- /package/dist/{ui/styled-system → styled-system}/css/conditions.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/css/cx.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/helpers.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/jsx/box.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/jsx/factory-helper.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/jsx/factory.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/patterns/box.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { autoUpdate as
|
|
2
|
-
import { raf as
|
|
3
|
-
import { noop as
|
|
4
|
-
function
|
|
1
|
+
import { autoUpdate as S, offset as A, flip as D, shift as R, arrow as W, size as I, hide as B, computePosition as H, limitShift as T } from "../../../@floating-ui/dom/dist/floating-ui.dom.js";
|
|
2
|
+
import { raf as V, isHTMLElement as k, getWindow as C } from "../../dom-query/dist/index.js";
|
|
3
|
+
import { noop as L, isNull as N, runIfFn as j, compact as U } from "../../utils/dist/index.js";
|
|
4
|
+
function v(t = 0, e = 0, r = 0, i = 0) {
|
|
5
5
|
if (typeof DOMRect == "function")
|
|
6
6
|
return new DOMRect(t, e, r, i);
|
|
7
7
|
const n = {
|
|
@@ -16,27 +16,27 @@ function w(t = 0, e = 0, r = 0, i = 0) {
|
|
|
16
16
|
};
|
|
17
17
|
return { ...n, toJSON: () => n };
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
if (!t) return
|
|
19
|
+
function _(t) {
|
|
20
|
+
if (!t) return v();
|
|
21
21
|
const { x: e, y: r, width: i, height: n } = t;
|
|
22
|
-
return
|
|
22
|
+
return v(e, r, i, n);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function q(t, e) {
|
|
25
25
|
return {
|
|
26
|
-
contextElement:
|
|
26
|
+
contextElement: k(t) ? t : void 0,
|
|
27
27
|
getBoundingClientRect: () => {
|
|
28
28
|
const r = t, i = e == null ? void 0 : e(r);
|
|
29
|
-
return i || !r ?
|
|
29
|
+
return i || !r ? _(i) : r.getBoundingClientRect();
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
var
|
|
34
|
-
arrowSize:
|
|
35
|
-
arrowSizeHalf:
|
|
36
|
-
arrowBg:
|
|
37
|
-
transformOrigin:
|
|
38
|
-
arrowOffset:
|
|
39
|
-
},
|
|
33
|
+
var u = (t) => ({ variable: t, reference: `var(${t})` }), c = {
|
|
34
|
+
arrowSize: u("--arrow-size"),
|
|
35
|
+
arrowSizeHalf: u("--arrow-size-half"),
|
|
36
|
+
arrowBg: u("--arrow-background"),
|
|
37
|
+
transformOrigin: u("--transform-origin"),
|
|
38
|
+
arrowOffset: u("--arrow-offset")
|
|
39
|
+
}, G = (t) => ({
|
|
40
40
|
top: "bottom center",
|
|
41
41
|
"top-start": t ? `${t.x}px bottom` : "left bottom",
|
|
42
42
|
"top-end": t ? `${t.x}px bottom` : "right bottom",
|
|
@@ -49,22 +49,22 @@ var d = (t) => ({ variable: t, reference: `var(${t})` }), c = {
|
|
|
49
49
|
right: "left center",
|
|
50
50
|
"right-start": t ? `left ${t.y}px` : "left top",
|
|
51
51
|
"right-end": t ? `left ${t.y}px` : "left bottom"
|
|
52
|
-
}),
|
|
52
|
+
}), J = {
|
|
53
53
|
name: "transformOrigin",
|
|
54
54
|
fn({ placement: t, elements: e, middlewareData: r }) {
|
|
55
|
-
const { arrow: i } = r, n =
|
|
55
|
+
const { arrow: i } = r, n = G(i)[t], { floating: o } = e;
|
|
56
56
|
return o.style.setProperty(c.transformOrigin.variable, n), {
|
|
57
57
|
data: { transformOrigin: n }
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, Y = {
|
|
61
61
|
name: "rects",
|
|
62
62
|
fn({ rects: t }) {
|
|
63
63
|
return {
|
|
64
64
|
data: t
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
},
|
|
67
|
+
}, E = (t) => {
|
|
68
68
|
if (t)
|
|
69
69
|
return {
|
|
70
70
|
name: "shiftArrow",
|
|
@@ -79,14 +79,14 @@ var d = (t) => ({ variable: t, reference: `var(${t})` }), c = {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
function
|
|
82
|
+
function K(t) {
|
|
83
83
|
const [e, r] = t.split("-");
|
|
84
84
|
return { side: e, align: r, hasAlign: r != null };
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ct(t) {
|
|
87
87
|
return t.split("-")[0];
|
|
88
88
|
}
|
|
89
|
-
var
|
|
89
|
+
var Q = {
|
|
90
90
|
strategy: "absolute",
|
|
91
91
|
placement: "bottom",
|
|
92
92
|
listeners: !0,
|
|
@@ -99,52 +99,52 @@ var E = {
|
|
|
99
99
|
overflowPadding: 8,
|
|
100
100
|
arrowPadding: 4
|
|
101
101
|
};
|
|
102
|
-
function
|
|
102
|
+
function b(t, e) {
|
|
103
103
|
const r = t.devicePixelRatio || 1;
|
|
104
104
|
return Math.round(e * r) / r;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
106
|
+
function P(t) {
|
|
107
|
+
return j(t.boundary);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function X(t, e) {
|
|
110
110
|
if (t)
|
|
111
|
-
return
|
|
111
|
+
return W({
|
|
112
112
|
element: t,
|
|
113
113
|
padding: e.arrowPadding
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
if (!
|
|
116
|
+
function Z(t, e) {
|
|
117
|
+
if (!N(e.offset ?? e.gutter))
|
|
118
118
|
return A(({ placement: r }) => {
|
|
119
|
-
var
|
|
120
|
-
const i = ((t == null ? void 0 : t.clientHeight) || 0) / 2, n = ((
|
|
121
|
-
return
|
|
122
|
-
crossAxis:
|
|
119
|
+
var d, a;
|
|
120
|
+
const i = ((t == null ? void 0 : t.clientHeight) || 0) / 2, n = ((d = e.offset) == null ? void 0 : d.mainAxis) ?? e.gutter, o = typeof n == "number" ? n + i : n ?? i, { hasAlign: f } = K(r), s = f ? void 0 : e.shift, l = ((a = e.offset) == null ? void 0 : a.crossAxis) ?? s;
|
|
121
|
+
return U({
|
|
122
|
+
crossAxis: l,
|
|
123
123
|
mainAxis: o,
|
|
124
124
|
alignmentAxis: e.shift
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function F(t) {
|
|
129
129
|
if (t.flip)
|
|
130
|
-
return
|
|
131
|
-
boundary:
|
|
130
|
+
return D({
|
|
131
|
+
boundary: P(t),
|
|
132
132
|
padding: t.overflowPadding,
|
|
133
133
|
fallbackPlacements: t.flip === !0 ? void 0 : t.flip
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function tt(t) {
|
|
137
137
|
if (!(!t.slide && !t.overlap))
|
|
138
|
-
return
|
|
139
|
-
boundary:
|
|
138
|
+
return R({
|
|
139
|
+
boundary: P(t),
|
|
140
140
|
mainAxis: t.slide,
|
|
141
141
|
crossAxis: t.overlap,
|
|
142
142
|
padding: t.overflowPadding,
|
|
143
|
-
limiter:
|
|
143
|
+
limiter: T()
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function et(t) {
|
|
147
|
+
return I({
|
|
148
148
|
padding: t.overflowPadding,
|
|
149
149
|
apply({ elements: e, rects: r, availableHeight: i, availableWidth: n }) {
|
|
150
150
|
const o = e.floating, f = Math.round(r.reference.width);
|
|
@@ -152,61 +152,68 @@ function F(t) {
|
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function rt(t) {
|
|
156
|
+
var e;
|
|
157
|
+
if (t.hideWhenDetached)
|
|
158
|
+
return B({ strategy: "referenceHidden", boundary: ((e = t.boundary) == null ? void 0 : e.call(t)) ?? "clippingAncestors" });
|
|
159
|
+
}
|
|
160
|
+
function nt(t) {
|
|
156
161
|
return t ? t === !0 ? { ancestorResize: !0, ancestorScroll: !0, elementResize: !0, layoutShift: !0 } : t : {};
|
|
157
162
|
}
|
|
158
|
-
function
|
|
159
|
-
const i =
|
|
163
|
+
function it(t, e, r = {}) {
|
|
164
|
+
const i = q(t, r.getAnchorRect);
|
|
160
165
|
if (!e || !i) return;
|
|
161
|
-
const n = Object.assign({},
|
|
162
|
-
|
|
163
|
-
X(n),
|
|
164
|
-
Z(n),
|
|
165
|
-
K(o, n),
|
|
166
|
-
J(o),
|
|
167
|
-
q,
|
|
166
|
+
const n = Object.assign({}, Q, r), o = e.querySelector("[data-part=arrow]"), f = [
|
|
167
|
+
Z(o, n),
|
|
168
168
|
F(n),
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
tt(n),
|
|
170
|
+
X(o, n),
|
|
171
|
+
E(o),
|
|
172
|
+
J,
|
|
173
|
+
et(n),
|
|
174
|
+
rt(n),
|
|
175
|
+
Y
|
|
176
|
+
], { placement: s, strategy: l, onComplete: d, onPositioned: a } = n, m = async () => {
|
|
177
|
+
var w;
|
|
171
178
|
if (!i || !e) return;
|
|
172
|
-
const
|
|
179
|
+
const p = await H(i, e, {
|
|
173
180
|
placement: s,
|
|
174
181
|
middleware: f,
|
|
175
|
-
strategy:
|
|
182
|
+
strategy: l
|
|
176
183
|
});
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
e.style.setProperty("--x", `${
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
const $ =
|
|
184
|
+
d == null || d(p), a == null || a({ placed: !0 });
|
|
185
|
+
const h = C(e), M = b(h, p.x), O = b(h, p.y);
|
|
186
|
+
e.style.setProperty("--x", `${M}px`), e.style.setProperty("--y", `${O}px`), n.hideWhenDetached && ((w = p.middlewareData.hide) != null && w.referenceHidden) && e.style.setProperty("visibility", "hidden");
|
|
187
|
+
const x = e.firstElementChild;
|
|
188
|
+
if (x) {
|
|
189
|
+
const $ = h.getComputedStyle(x).zIndex;
|
|
183
190
|
e.style.setProperty("--z-index", $);
|
|
184
191
|
}
|
|
185
|
-
},
|
|
186
|
-
r.updatePosition ? (await r.updatePosition({ updatePosition:
|
|
187
|
-
}, z =
|
|
188
|
-
return
|
|
189
|
-
|
|
192
|
+
}, y = async () => {
|
|
193
|
+
r.updatePosition ? (await r.updatePosition({ updatePosition: m }), a == null || a({ placed: !0 })) : await m();
|
|
194
|
+
}, z = nt(n.listeners), g = n.listeners ? S(i, e, y, z) : L;
|
|
195
|
+
return y(), () => {
|
|
196
|
+
g == null || g(), a == null || a({ placed: !1 });
|
|
190
197
|
};
|
|
191
198
|
}
|
|
192
|
-
function
|
|
193
|
-
const { defer: i, ...n } = r, o = i ?
|
|
199
|
+
function dt(t, e, r = {}) {
|
|
200
|
+
const { defer: i, ...n } = r, o = i ? V : (s) => s(), f = [];
|
|
194
201
|
return f.push(
|
|
195
202
|
o(() => {
|
|
196
|
-
const s = typeof t == "function" ? t() : t,
|
|
197
|
-
f.push(
|
|
203
|
+
const s = typeof t == "function" ? t() : t, l = typeof e == "function" ? e() : e;
|
|
204
|
+
f.push(it(s, l, n));
|
|
198
205
|
})
|
|
199
206
|
), () => {
|
|
200
207
|
f.forEach((s) => s == null ? void 0 : s());
|
|
201
208
|
};
|
|
202
209
|
}
|
|
203
|
-
var
|
|
210
|
+
var ot = {
|
|
204
211
|
bottom: "rotate(45deg)",
|
|
205
212
|
left: "rotate(135deg)",
|
|
206
213
|
top: "rotate(225deg)",
|
|
207
214
|
right: "rotate(315deg)"
|
|
208
215
|
};
|
|
209
|
-
function
|
|
216
|
+
function lt(t = {}) {
|
|
210
217
|
const { placement: e, sameWidth: r, fitViewport: i, strategy: n = "absolute" } = t;
|
|
211
218
|
return {
|
|
212
219
|
arrow: {
|
|
@@ -218,7 +225,7 @@ function ft(t = {}) {
|
|
|
218
225
|
},
|
|
219
226
|
arrowTip: {
|
|
220
227
|
// @ts-expect-error - Fix this
|
|
221
|
-
transform: e ?
|
|
228
|
+
transform: e ? ot[e.split("-")[0]] : void 0,
|
|
222
229
|
background: c.arrowBg.reference,
|
|
223
230
|
top: "0",
|
|
224
231
|
left: "0",
|
|
@@ -243,7 +250,7 @@ function ft(t = {}) {
|
|
|
243
250
|
};
|
|
244
251
|
}
|
|
245
252
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
dt as getPlacement,
|
|
254
|
+
ct as getPlacementSide,
|
|
255
|
+
lt as getPlacementStyles
|
|
249
256
|
};
|