bitboss-ui 2.1.122 → 2.1.124
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/ai/BaseSelect.md +26 -4
- package/dist/ai/BbDropdown.md +20 -5
- package/dist/ai/BbSelect.md +8 -2
- package/dist/ai/BbTooltip.md +83 -13
- package/dist/ai/CommonPopover.md +45 -2
- package/dist/components/BaseSelect/types.d.ts +15 -2
- package/dist/components/BbSelect/types.d.ts +2 -0
- package/dist/components/BbTooltip/types.d.ts +1 -1
- package/dist/components/CommonPopover/types.d.ts +11 -0
- package/dist/directives/bbDropdown.d.ts +38 -0
- package/dist/directives/bbTooltip.d.ts +36 -0
- package/dist/directives/createPopoverDirective.d.ts +25 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -1
- package/dist/index186.js +4 -2
- package/dist/index232.js +68 -67
- package/dist/index270.js +1 -1
- package/dist/index343.js +116 -89
- package/dist/index350.js +53 -837
- package/dist/index351.js +23 -473
- package/dist/index352.js +21 -50
- package/dist/index353.js +838 -6
- package/dist/index354.js +474 -0
- package/dist/index355.js +52 -0
- package/dist/index356.js +7 -0
- package/dist/index58.js +54 -43
- package/package.json +2 -2
package/dist/index58.js
CHANGED
|
@@ -4,12 +4,12 @@ import { useUntil as n } from "./index50.js";
|
|
|
4
4
|
import { waitFor as r } from "./index51.js";
|
|
5
5
|
import { autoUpdate as i, flip as a, hide as o, offset as s, shift as c, size as l } from "./index55.js";
|
|
6
6
|
import { arrow as u, useFloating as d } from "./index57.js";
|
|
7
|
-
import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, defineComponent as _, mergeModels as v, mergeProps as y, nextTick as b,
|
|
7
|
+
import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, defineComponent as _, mergeModels as v, mergeProps as y, nextTick as b, onBeforeUnmount as x, onMounted as S, openBlock as C, ref as w, renderSlot as T, resolveDynamicComponent as E, unref as D, useModel as O, watch as k, withCtx as A, withModifiers as j } from "vue";
|
|
8
8
|
//#region src/components/CommonPopover/CommonPopover.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var M = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "bb-common-popover__bubble scrollbar-border"
|
|
12
|
-
},
|
|
12
|
+
}, N = /* @__PURE__ */ _({
|
|
13
13
|
__name: "CommonPopover",
|
|
14
14
|
props: /* @__PURE__ */ v({
|
|
15
15
|
arrowPadding: {},
|
|
@@ -30,7 +30,8 @@ var j = {
|
|
|
30
30
|
scrollable: {
|
|
31
31
|
type: Boolean,
|
|
32
32
|
default: !1
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
forceAutoUpdate: { type: Boolean }
|
|
34
35
|
}, {
|
|
35
36
|
modelValue: {
|
|
36
37
|
type: Boolean,
|
|
@@ -40,13 +41,13 @@ var j = {
|
|
|
40
41
|
}),
|
|
41
42
|
emits: ["update:modelValue"],
|
|
42
43
|
setup(_) {
|
|
43
|
-
let v = _,
|
|
44
|
+
let v = _, N = O(_, "modelValue"), P = w(N.value), F = f(() => v.dialog ? "dialog" : "span"), I = w(), L = w(), R = f(() => {
|
|
44
45
|
let t = v.anchor;
|
|
45
46
|
return t && typeof t == "object" && "getBoundingClientRect" in t && !(t instanceof Element) ? t : e(t);
|
|
46
|
-
}),
|
|
47
|
+
}), z = n(N, { initialValue: v.eager }), B = f(() => {
|
|
47
48
|
if (v.boundary) return typeof v.boundary == "string" ? document.querySelector(v.boundary) ?? void 0 : e(v.boundary) ?? void 0;
|
|
48
|
-
}),
|
|
49
|
-
let e =
|
|
49
|
+
}), V = f(() => {
|
|
50
|
+
let e = B.value;
|
|
50
51
|
return [
|
|
51
52
|
...v.flip ? [a(e ? { boundary: e } : void 0)] : [],
|
|
52
53
|
s(v.offset),
|
|
@@ -63,40 +64,50 @@ var j = {
|
|
|
63
64
|
}
|
|
64
65
|
})] : [],
|
|
65
66
|
...v.hideArrow ? [] : [u({
|
|
66
|
-
element:
|
|
67
|
+
element: L,
|
|
67
68
|
padding: v.arrowPadding
|
|
68
69
|
})]
|
|
69
70
|
];
|
|
70
|
-
}), { floatingStyles:
|
|
71
|
+
}), { floatingStyles: H, placement: U, middlewareData: W, update: G } = d(R, I, {
|
|
71
72
|
placement: v.placement,
|
|
72
|
-
|
|
73
|
-
middleware: B,
|
|
73
|
+
middleware: V,
|
|
74
74
|
strategy: "fixed"
|
|
75
|
-
}),
|
|
75
|
+
}), K = null;
|
|
76
|
+
k([
|
|
77
|
+
P,
|
|
78
|
+
R,
|
|
79
|
+
I,
|
|
80
|
+
() => v.forceAutoUpdate
|
|
81
|
+
], ([e, t, n, r]) => {
|
|
82
|
+
K?.(), K = null, (e || r) && t && n && (K = i(t, n, G));
|
|
83
|
+
}, { immediate: !0 }), x(() => {
|
|
84
|
+
K?.(), K = null;
|
|
85
|
+
});
|
|
86
|
+
let { execute: q } = t(({ signal: e }, t) => new Promise((n) => {
|
|
76
87
|
let i, a = () => {
|
|
77
88
|
i && clearTimeout(i);
|
|
78
89
|
};
|
|
79
|
-
e.addEventListener("abort", a), t ? (
|
|
80
|
-
|
|
81
|
-
})) : (
|
|
90
|
+
e.addEventListener("abort", a), t ? (J(), G(), r(() => !!I.value).then(() => {
|
|
91
|
+
P.value = !0, e.removeEventListener("abort", a), n(void 0);
|
|
92
|
+
})) : (P.value = !1, i = setTimeout(() => {
|
|
82
93
|
b(() => {
|
|
83
|
-
|
|
94
|
+
I.value && (v.dialog ? I.value.close() : I.value.hidePopover()), e.removeEventListener("abort", a), G(), n(void 0);
|
|
84
95
|
});
|
|
85
96
|
}, v.transitionDuration));
|
|
86
|
-
})),
|
|
87
|
-
if (
|
|
88
|
-
if (!v.dialog) return
|
|
89
|
-
|
|
97
|
+
})), J = () => {
|
|
98
|
+
if (I.value) {
|
|
99
|
+
if (!v.dialog) return I.value.showPopover();
|
|
100
|
+
I.value.showModal();
|
|
90
101
|
}
|
|
91
102
|
};
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
k(N, q), S(() => {
|
|
104
|
+
N.value && q(N.value);
|
|
94
105
|
});
|
|
95
|
-
let
|
|
96
|
-
let e =
|
|
106
|
+
let Y = f(() => {
|
|
107
|
+
let e = N.value ? void 0 : -1, t = W.value.arrow?.x, n = v.hideArrow || t == null ? "50%" : `${Math.round(t)}px`, r = v.dialog ? void 0 : "manual";
|
|
97
108
|
return {
|
|
98
109
|
style: {
|
|
99
|
-
...
|
|
110
|
+
...H.value,
|
|
100
111
|
"--transition-duration": `${v.transitionDuration}ms`,
|
|
101
112
|
"--page-padding": `${v.padding}px`,
|
|
102
113
|
"--arrow-offset-x": n
|
|
@@ -104,43 +115,43 @@ var j = {
|
|
|
104
115
|
popover: r,
|
|
105
116
|
tabindex: e
|
|
106
117
|
};
|
|
107
|
-
}),
|
|
108
|
-
if (
|
|
109
|
-
let { x: e, y: t } =
|
|
118
|
+
}), X = f(() => {
|
|
119
|
+
if (W.value.arrow) {
|
|
120
|
+
let { x: e, y: t } = W.value.arrow;
|
|
110
121
|
return { style: {
|
|
111
122
|
left: `${e}px`,
|
|
112
123
|
top: `${t}px`
|
|
113
124
|
} };
|
|
114
125
|
}
|
|
115
|
-
}),
|
|
116
|
-
|
|
126
|
+
}), Z = () => {
|
|
127
|
+
N.value = !1;
|
|
117
128
|
};
|
|
118
|
-
return (e, t) => (
|
|
129
|
+
return (e, t) => (C(), p(E(F.value), y({
|
|
119
130
|
ref_key: "wrapper",
|
|
120
|
-
ref:
|
|
131
|
+
ref: I,
|
|
121
132
|
class: ["bb-common-popover", {
|
|
122
|
-
"bb-common-popover--open":
|
|
133
|
+
"bb-common-popover--open": P.value,
|
|
123
134
|
"bb-common-popover--no-arrow": e.hideArrow,
|
|
124
135
|
"bb-common-popover--scrollable": e.scrollable,
|
|
125
|
-
[`bb-common-popover--${
|
|
136
|
+
[`bb-common-popover--${D(U)}`]: !0
|
|
126
137
|
}]
|
|
127
|
-
},
|
|
128
|
-
onClick:
|
|
129
|
-
onContextmenu:
|
|
138
|
+
}, Y.value, {
|
|
139
|
+
onClick: j(Z, ["self", "stop"]),
|
|
140
|
+
onContextmenu: j(Z, [
|
|
130
141
|
"self",
|
|
131
142
|
"stop",
|
|
132
143
|
"prevent"
|
|
133
144
|
]),
|
|
134
|
-
onClose:
|
|
145
|
+
onClose: Z
|
|
135
146
|
}), {
|
|
136
|
-
default:
|
|
147
|
+
default: A(() => [g("span", y({
|
|
137
148
|
ref_key: "bubblearrow",
|
|
138
|
-
ref:
|
|
149
|
+
ref: L,
|
|
139
150
|
class: "bb-common-popover__arrow"
|
|
140
|
-
},
|
|
151
|
+
}, X.value), null, 16), D(z) ? (C(), h("span", M, [T(e.$slots, "default")])) : m("", !0)]),
|
|
141
152
|
_: 3
|
|
142
153
|
}, 16, ["class"]));
|
|
143
154
|
}
|
|
144
155
|
});
|
|
145
156
|
//#endregion
|
|
146
|
-
export {
|
|
157
|
+
export { N as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitboss-ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.124",
|
|
4
4
|
"description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -113,4 +113,4 @@
|
|
|
113
113
|
"lint-staged": {
|
|
114
114
|
"*.{js,css,md,html,json,vue,ts}": "prettier --write"
|
|
115
115
|
}
|
|
116
|
-
}
|
|
116
|
+
}
|