@v1nt1248/3nclient-lib 0.2.95 → 0.2.96
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/ui3n-menu/types.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +8 -4
- package/package.json +1 -1
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +0 -1
- package/src/components/ui3n-menu/types.ts +1 -0
- package/src/components/ui3n-menu/ui3n-menu.vue +15 -22
package/dist/ui3n-components.js
CHANGED
|
@@ -18771,6 +18771,7 @@ var fc = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
|
18771
18771
|
offsetX: { default: 0 },
|
|
18772
18772
|
offsetY: { default: 0 },
|
|
18773
18773
|
contentBorderRadius: { default: 4 },
|
|
18774
|
+
contentStyles: {},
|
|
18774
18775
|
zIndex: { default: 1e3 },
|
|
18775
18776
|
closeOnClick: {
|
|
18776
18777
|
type: Boolean,
|
|
@@ -18795,8 +18796,8 @@ var fc = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
|
18795
18796
|
],
|
|
18796
18797
|
setup(e, { expose: t, emit: n }) {
|
|
18797
18798
|
M((e) => ({
|
|
18798
|
-
|
|
18799
|
-
|
|
18799
|
+
v05c72248: h.value,
|
|
18800
|
+
v69f43a2f: _.value
|
|
18800
18801
|
}));
|
|
18801
18802
|
let r = e, a = n, l = P("menu-trigger-element"), u = P("menu-content-element"), d = C(!1), f = C(r.triggerElement || null), p = i(() => f.value || l.value), h = i(() => {
|
|
18802
18803
|
if (typeof r.contentBorderRadius == "number") return `${r.contentBorderRadius}px`;
|
|
@@ -18846,7 +18847,10 @@ var fc = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
|
18846
18847
|
}, [T(t.$slots, "default")], 2), d.value ? R((x(), s("div", m({
|
|
18847
18848
|
key: 0,
|
|
18848
18849
|
ref: "menu-content-element",
|
|
18849
|
-
style:
|
|
18850
|
+
style: {
|
|
18851
|
+
...A(y),
|
|
18852
|
+
...e.contentStyles && { ...e.contentStyles }
|
|
18853
|
+
},
|
|
18850
18854
|
class: t.$style.ui3nMenuContent
|
|
18851
18855
|
}, O(e.closeOnClick ? { click: E } : {}, !0)), [T(t.$slots, "menu")], 16)), [[A(Hr), D]]) : o("", !0)], 2));
|
|
18852
18856
|
}
|
|
@@ -19788,7 +19792,7 @@ var fc = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
|
19788
19792
|
}
|
|
19789
19793
|
function re() {
|
|
19790
19794
|
if (y.value === null && !m.value) {
|
|
19791
|
-
m.value = !0, y.value = 0, v.value && v.value.focus()
|
|
19795
|
+
m.value = !0, y.value = 0, v.value && v.value.focus();
|
|
19792
19796
|
return;
|
|
19793
19797
|
}
|
|
19794
19798
|
if (y.value === null && m.value && p.value) {
|
package/package.json
CHANGED
|
@@ -55,19 +55,12 @@
|
|
|
55
55
|
|
|
56
56
|
middleware.push(shift());
|
|
57
57
|
|
|
58
|
-
const {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
menuContentElement,
|
|
65
|
-
{
|
|
66
|
-
placement: 'bottom-start',
|
|
67
|
-
strategy: props.positionStrategy,
|
|
68
|
-
middleware,
|
|
69
|
-
whileElementsMounted: props.positionAutoupdate || props.positionStrategy === 'fixed' ? autoUpdate : undefined,
|
|
70
|
-
});
|
|
58
|
+
const { floatingStyles, isPositioned, update } = useFloating(usedTriggerElement, menuContentElement, {
|
|
59
|
+
placement: 'bottom-start',
|
|
60
|
+
strategy: props.positionStrategy,
|
|
61
|
+
middleware,
|
|
62
|
+
whileElementsMounted: props.positionAutoupdate || props.positionStrategy === 'fixed' ? autoUpdate : undefined,
|
|
63
|
+
});
|
|
71
64
|
|
|
72
65
|
function toggleMenu() {
|
|
73
66
|
if (props.disabled) {
|
|
@@ -118,14 +111,11 @@
|
|
|
118
111
|
},
|
|
119
112
|
);
|
|
120
113
|
|
|
121
|
-
watch(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
);
|
|
114
|
+
watch([() => props.offsetX, () => props.offsetY], ([offsetX, offsetY], [oldOffsetX, oldOffsetY]) => {
|
|
115
|
+
if (offsetX !== oldOffsetX || offsetY !== oldOffsetY) {
|
|
116
|
+
update();
|
|
117
|
+
}
|
|
118
|
+
});
|
|
129
119
|
|
|
130
120
|
defineExpose<Ui3nMenuExpose>({
|
|
131
121
|
isPositioned,
|
|
@@ -150,7 +140,10 @@
|
|
|
150
140
|
v-if="isShow"
|
|
151
141
|
ref="menu-content-element"
|
|
152
142
|
v-click-outside="onClickOutside"
|
|
153
|
-
:style="
|
|
143
|
+
:style="{
|
|
144
|
+
...floatingStyles,
|
|
145
|
+
...(contentStyles && { ...contentStyles }),
|
|
146
|
+
}"
|
|
154
147
|
:class="$style.ui3nMenuContent"
|
|
155
148
|
v-on="closeOnClick ? { click: onContentClick } : {}"
|
|
156
149
|
>
|