bitboss-ui 0.1.76 → 0.1.78
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/BaseTag/BaseTag.vue.d.ts +83 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +0 -1
- package/dist/components/BbTag/BbTag.vue.d.ts +64 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +119 -116
- package/dist/index.js.map +1 -1
- package/dist/index100.js +46 -41
- package/dist/index100.js.map +1 -1
- package/dist/index102.js +29 -31
- package/dist/index102.js.map +1 -1
- package/dist/index104.js +82 -22
- package/dist/index104.js.map +1 -1
- package/dist/index106.js +22 -115
- package/dist/index106.js.map +1 -1
- package/dist/index108.js +112 -90
- package/dist/index108.js.map +1 -1
- package/dist/index110.js +93 -39
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +2 -38
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +40 -40
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +33 -42
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +30 -29
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +47 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +43 -21
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +2 -2
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +20 -9
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +2 -18
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +9 -9
- package/dist/index120.js +10 -13
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +18 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +10 -221
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -3
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +224 -3
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index126.js +2 -2
- package/dist/index127.js +2 -2
- package/dist/index128.js +2 -2
- package/dist/index129.js +2 -2
- package/dist/index130.js +2 -2
- package/dist/index131.js +2 -2
- package/dist/index132.js +2 -2
- package/dist/index133.js +2 -2
- package/dist/index134.js +2 -2
- package/dist/index135.js +2 -2
- package/dist/index136.js +2 -2
- package/dist/index137.js +2 -2
- package/dist/index138.js +2 -2
- package/dist/index139.js +2 -2
- package/dist/index14.js +11 -11
- package/dist/index140.js +2 -2
- package/dist/index141.js +2 -2
- package/dist/index142.js +2 -2
- package/dist/index143.js +2 -2
- package/dist/index144.js +2 -2
- package/dist/index145.js +2 -2
- package/dist/index146.js +2 -2
- package/dist/index147.js +2 -2
- package/dist/index148.js +2 -2
- package/dist/index149.js +3 -2
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index152.js +2 -2
- package/dist/index153.js +2 -3
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +2 -2
- package/dist/index155.js +2 -2
- package/dist/index156.js +2 -2
- package/dist/index157.js +2 -2
- package/dist/index158.js +3 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index16.js +5 -5
- package/dist/index160.js +2 -2
- package/dist/index161.js +3 -2
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +2 -3
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +2 -3
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +2 -2
- package/dist/index165.js +2 -2
- package/dist/index166.js +2 -2
- package/dist/index167.js +2 -2
- package/dist/index168.js +2 -2
- package/dist/index169.js +2 -2
- package/dist/index170.js +2 -2
- package/dist/index171.js +2 -2
- package/dist/index172.js +2 -2
- package/dist/index173.js +2 -2
- package/dist/index174.js +3 -2
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index177.js +2 -2
- package/dist/index178.js +2 -3
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +2 -2
- package/dist/index18.js +6 -6
- package/dist/index180.js +2 -2
- package/dist/index181.js +2 -2
- package/dist/index182.js +2 -2
- package/dist/index183.js +2 -2
- package/dist/index184.js +2 -2
- package/dist/index185.js +2 -2
- package/dist/index186.js +3 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +3 -350
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +3 -134
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -5
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -19
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -2
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +4 -2
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +3 -186
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +3 -23
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +3 -331
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +35 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +6 -3
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +348 -33
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +134 -6
- package/dist/index199.js.map +1 -1
- package/dist/index2.js +1 -1
- package/dist/index20.js +1 -1
- package/dist/index200.js +295 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +19 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -16
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +184 -14
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +23 -20
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +329 -27
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +235 -3
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +16 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +16 -235
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +20 -9
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +27 -94
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +8 -28
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +8 -12
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +89 -72
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +27 -5
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +13 -2
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +78 -294
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +2 -2
- package/dist/index220.js +4 -2
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +224 -2
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +246 -105
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -105
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +434 -10
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +7 -433
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +87 -7
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -88
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +2 -4
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +2 -200
- package/dist/index229.js.map +1 -1
- package/dist/index231.js +117 -2
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +106 -2
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +200 -2
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -9
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -6
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -224
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -258
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +9 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +6 -69
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +158 -36
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +2 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +38 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +5 -0
- package/dist/index245.js.map +1 -0
- package/dist/index246.js +72 -0
- package/dist/index246.js.map +1 -0
- package/dist/index247.js +5 -0
- package/dist/index247.js.map +1 -0
- package/dist/index248.js +6 -0
- package/dist/index248.js.map +1 -0
- package/dist/index249.js +5 -0
- package/dist/index249.js.map +1 -0
- package/dist/index250.js +5 -0
- package/dist/index250.js.map +1 -0
- package/dist/index26.js +4 -4
- package/dist/index28.js +69 -70
- package/dist/index28.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +4 -4
- package/dist/index32.js +2 -2
- package/dist/index4.js +2 -2
- package/dist/index40.js +3 -3
- package/dist/index42.js +4 -4
- package/dist/index44.js +1 -1
- package/dist/index46.js +2 -2
- package/dist/index5.js +4 -4
- package/dist/index56.js +2 -2
- package/dist/index62.js +7 -7
- package/dist/index66.js +5 -5
- package/dist/index69.js +1 -1
- package/dist/index72.js +3 -3
- package/dist/index74.js +1 -1
- package/dist/index76.js +6 -6
- package/dist/index78.js +2 -2
- package/dist/index8.js +2 -2
- package/dist/index88.js +6 -8
- package/dist/index88.js.map +1 -1
- package/dist/index96.js +4 -4
- package/dist/index98.js +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index108.js
CHANGED
|
@@ -1,101 +1,123 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { defineComponent as D, ref as o, computed as z, openBlock as f, createElementBlock as F, mergeProps as O, createElementVNode as l, renderSlot as k, normalizeProps as P, guardReactiveProps as S, unref as b, createBlock as y, Teleport as N, normalizeClass as V, normalizeStyle as H, withCtx as I, createCommentVNode as R } from "vue";
|
|
2
|
+
import { useFloating as U } from "./index216.js";
|
|
3
|
+
import { useId as j } from "./index120.js";
|
|
4
|
+
import { wait as C } from "./index119.js";
|
|
5
|
+
import q from "./index6.js";
|
|
6
|
+
import "./index7.js";
|
|
7
|
+
import { autoUpdate as A } from "./index198.js";
|
|
8
|
+
import { flip as G, shift as J } from "./index206.js";
|
|
9
|
+
const K = /* @__PURE__ */ l("span", { class: "bb-tooltip__arrow" }, null, -1), Q = { class: "bb-tooltip__bubble" }, W = /* @__PURE__ */ l("svg", {
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, [
|
|
14
|
+
/* @__PURE__ */ l("path", {
|
|
15
|
+
d: "M23 23L1 1M23 1L1 23",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
"stroke-width": "2",
|
|
18
|
+
"stroke-linecap": "round"
|
|
19
|
+
})
|
|
20
|
+
], -1), ae = /* @__PURE__ */ D({
|
|
21
|
+
__name: "BbTooltip",
|
|
4
22
|
props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
block: { type: Boolean },
|
|
24
|
+
disabled: { type: Boolean },
|
|
25
|
+
id: {},
|
|
26
|
+
padding: { default: 10 },
|
|
27
|
+
placement: { default: "top" },
|
|
28
|
+
showClose: { type: Boolean, default: !0 },
|
|
29
|
+
theme: { default: "default" },
|
|
30
|
+
transitionDuration: { default: 150 }
|
|
10
31
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
32
|
+
setup(E) {
|
|
33
|
+
const t = E, m = `bb_${t.id ?? j().id.value}`, r = o(), u = o(), { floatingStyles: B, placement: v } = U(r, u, {
|
|
34
|
+
placement: t.placement,
|
|
35
|
+
whileElementsMounted: A,
|
|
36
|
+
middleware: [G(), J({ padding: t.padding })]
|
|
37
|
+
}), _ = o(!0), n = o(!1), a = o(!1), s = o(!1), c = o(!0), h = () => {
|
|
38
|
+
a.value || n.value || t.disabled || (M(), document.addEventListener("mouseover", w, { passive: !0 }), document.addEventListener("keydown", g, { passive: !0 }));
|
|
39
|
+
}, $ = h, w = (e) => {
|
|
40
|
+
const i = e.target;
|
|
41
|
+
if (i && i instanceof HTMLElement) {
|
|
42
|
+
let d = !0;
|
|
43
|
+
r.value && r.value.contains(i) && (d = !1), u.value && u.value.contains(i) && (d = !1), d && p();
|
|
44
|
+
}
|
|
45
|
+
}, g = (e) => {
|
|
46
|
+
a.value && e.key === "Escape" && p();
|
|
47
|
+
}, L = () => {
|
|
48
|
+
_.value = !1, p();
|
|
49
|
+
}, M = async () => {
|
|
50
|
+
_.value && (c.value = !1, s.value = !1, n.value = !0, await C(50), a.value = !0, n.value = !1);
|
|
51
|
+
}, p = async () => {
|
|
52
|
+
a.value = !1, n.value = !1, s.value = !0, await C(t.transitionDuration), s.value = !1, c.value = !0, document.removeEventListener("mouseover", w), document.removeEventListener("keydown", g);
|
|
53
|
+
}, T = z(() => ({
|
|
54
|
+
class: {
|
|
55
|
+
"bb-tooltip--block": t.block,
|
|
56
|
+
[`bb-tooltip--theme-${t.theme}`]: t.theme
|
|
57
|
+
}
|
|
24
58
|
}));
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"bb-tree--open": e.open
|
|
31
|
-
}]),
|
|
32
|
-
key: e.identifier
|
|
59
|
+
return (e, i) => (f(), F("span", O({ class: "bb-tooltip" }, T.value), [
|
|
60
|
+
l("span", {
|
|
61
|
+
class: "bb-tooltip__wrapper",
|
|
62
|
+
ref_key: "wrapper",
|
|
63
|
+
ref: r
|
|
33
64
|
}, [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
k(e.$slots, "activator", P(S({
|
|
66
|
+
props: {
|
|
67
|
+
"aria-describedby": m,
|
|
68
|
+
onMouseenter: h,
|
|
69
|
+
onFocus: b($),
|
|
70
|
+
onBlur: p,
|
|
71
|
+
disabled: e.disabled
|
|
72
|
+
},
|
|
73
|
+
closed: c.value,
|
|
74
|
+
closing: s.value,
|
|
75
|
+
disabled: e.disabled,
|
|
76
|
+
open: a.value,
|
|
77
|
+
opening: n.value,
|
|
78
|
+
placement: b(v)
|
|
79
|
+
})))
|
|
80
|
+
], 512),
|
|
81
|
+
(f(), y(N, { to: "body" }, [
|
|
82
|
+
l("span", {
|
|
83
|
+
class: V(["bb-tooltip__bubble-container", {
|
|
84
|
+
[`bb-tooltip__bubble-container--${b(v)}`]: !0,
|
|
85
|
+
[`bb-tooltip__bubble-container--${e.theme}`]: e.theme,
|
|
86
|
+
"bb-tooltip__bubble-container--hidden": c.value,
|
|
87
|
+
"bb-tooltip__bubble-container--closing": s.value,
|
|
88
|
+
"bb-tooltip__bubble-container--opening": n.value,
|
|
89
|
+
"bb-tooltip__bubble-container--open": a.value
|
|
90
|
+
}]),
|
|
91
|
+
ref_key: "content",
|
|
92
|
+
ref: u,
|
|
93
|
+
style: H({
|
|
94
|
+
...b(B),
|
|
95
|
+
transitionDuration: `${t.transitionDuration}ms`
|
|
96
|
+
}),
|
|
97
|
+
id: m
|
|
62
98
|
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
depth: e.depth + 1,
|
|
79
|
-
items: e.children,
|
|
80
|
-
parent: e,
|
|
81
|
-
identifier: r.identifier,
|
|
82
|
-
expandable: n.expandable
|
|
83
|
-
}, k({ _: 2 }, [
|
|
84
|
-
s(n.$slots, (w, i) => ({
|
|
85
|
-
name: i,
|
|
86
|
-
fn: B((c) => [
|
|
87
|
-
d(n.$slots, i, C(_(c)))
|
|
88
|
-
])
|
|
89
|
-
}))
|
|
90
|
-
]), 1032, ["depth", "items", "parent", "identifier", "expandable"])
|
|
91
|
-
])
|
|
99
|
+
K,
|
|
100
|
+
l("span", Q, [
|
|
101
|
+
e.showClose ? (f(), y(q, {
|
|
102
|
+
key: 0,
|
|
103
|
+
tabindex: "-1",
|
|
104
|
+
"aria-hidden": "true",
|
|
105
|
+
class: "bb-tooltip__close",
|
|
106
|
+
onClick: L
|
|
107
|
+
}, {
|
|
108
|
+
default: I(() => [
|
|
109
|
+
W
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})) : R("", !0),
|
|
113
|
+
k(e.$slots, "default")
|
|
92
114
|
])
|
|
93
|
-
],
|
|
94
|
-
]
|
|
95
|
-
|
|
115
|
+
], 6)
|
|
116
|
+
]))
|
|
117
|
+
], 16));
|
|
96
118
|
}
|
|
97
119
|
});
|
|
98
120
|
export {
|
|
99
|
-
|
|
121
|
+
ae as default
|
|
100
122
|
};
|
|
101
123
|
//# sourceMappingURL=index108.js.map
|
package/dist/index108.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index108.js","sources":["../src/components/BbTree/BbTree.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, resolveComponent as _resolveComponent, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-tree-row\" }\nconst _hoisted_2 = { class: \"bb-tree-main-content\" }\n\nimport { computed } from \"vue\";\nimport { Item } from \"../BbBreadcrumbs/BbBreadcrumbs.vue\";\n\nexport type TreeItem = {\n children?: TreeItem[];\n open?: boolean;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n [key: symbol | string]: any;\n};\n\nexport type BbTreeProps = {\n items: TreeItem[];\n parent?: TreeItem;\n identifier?: string | number;\n depth?: number;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n};\nexport type BbTreeSlots = {\n [key: string]: (props: {\n item: any,\n parent?: any,\n depth: number,\n identifier?: string | number,\n expandable: boolean,\n }) => any\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTree',\n props: {\n items: { default: () => [] as TreeItem[] },\n parent: {},\n identifier: { default: \"id\" },\n depth: { default: 0 },\n expandable: { type: [Boolean, Function] }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst itemIsOpen = (item: TreeItem) => {\n /* If the item is not expandable it must be open */\n if (typeof item.open === \"undefined\") return true;\n return item.open;\n};\n\nconst internalItems = computed(() => {\n return props.items.map((item: TreeItem) => {\n const open = itemIsOpen(item);\n const expandableProp = item.expandable ?? props.expandable;\n let expandable = false;\n if (typeof expandableProp !== \"undefined\") {\n if (typeof expandableProp === \"function\")\n expandable = expandableProp(item, props.depth, props.parent);\n else expandable = expandableProp;\n }\n return {\n children: item.children,\n depth: props.depth,\n expandable: expandable,\n identifier: item[props.identifier],\n open,\n original: item,\n parent: props.parent,\n };\n });\n});\n\nreturn (_ctx: any,_cache: any) => {\n const _component_BbTree = _resolveComponent(\"BbTree\", true)!\n\n return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(internalItems.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"bb-tree\", {\n [`bb-tree--depth-${item.depth}`]: true,\n 'bb-tree--open': item.open,\n }]),\n key: item.identifier\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.$slots[item.identifier])\n ? _renderSlot(_ctx.$slots, item.identifier, {\n key: 0,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n })\n : (_ctx.$slots[item.depth])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 1,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n })\n : _renderSlot(_ctx.$slots, \"default\", {\n key: 2,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass(`bb-tree--depth-${item.depth}-children`)\n }, [\n _renderSlot(_ctx.$slots, `${item.depth}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n }, () => [\n _renderSlot(_ctx.$slots, `${item.identifier}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n }, () => [\n _createVNode(_component_BbTree, {\n depth: item.depth + 1,\n items: item.children,\n parent: item,\n identifier: props.identifier,\n expandable: _ctx.expandable\n }, _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1032, [\"depth\", \"items\", \"parent\", \"identifier\", \"expandable\"])\n ])\n ])\n ], 2)\n ], 2))\n }), 128))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","itemIsOpen","item","internalItems","computed","open","expandableProp","expandable","_ctx","_cache","_component_BbTree","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createElementVN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Q,GAAGN,EAAK,UAAU,aAAa;AAAA,cACtD,MAAMA,EAAK;AAAA,cACX,QAAQA,EAAK;AAAA,cACb,OAAOA,EAAK;AAAA,cACZ,YAAYA,EAAK;AAAA,cACjB,YAAYA,EAAK;AAAA,YAAA,GAChB,MAAM;AAAA,cACPiB,EAAaT,GAAmB;AAAA,gBAC9B,OAAOR,EAAK,QAAQ;AAAA,gBACpB,OAAOA,EAAK;AAAA,gBACZ,QAAQA;AAAA,gBACR,YAAYF,EAAM;AAAA,gBAClB,YAAYQ,EAAK;AAAA,cAChB,GAAAY,EAAa,EAAE,GAAG,KAAK;AAAA,gBACxBL,EAAYP,EAAK,QAAQ,CAACa,GAAGC,OACpB;AAAA,kBACL,MAAAA;AAAA,kBACA,IAAIC,EAAS,CAACC,MAAS;AAAA,oBACrBN,EAAYV,EAAK,QAAQc,GAAMG,EAAgBC,EAAoBF,CAAI,CAAC,CAAC;AAAA,kBAAA,CAC1E;AAAA,gBAAA,EAEJ;AAAA,cAAA,CACF,GAAG,MAAM,CAAC,SAAS,SAAS,UAAU,cAAc,YAAY,CAAC;AAAA,YAAA,CACnE;AAAA,UAAA,CACF;AAAA,WACA,CAAC;AAAA,SACH,CAAC,EACL,GAAG,GAAG;AAAA,IAAA;AAAA,EAET;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index108.js","sources":["../src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport, mergeProps as _mergeProps, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-tooltip__arrow\" }, null, -1)\nconst _hoisted_2 = { class: \"bb-tooltip__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, ref } from \"vue\";\nimport {\n useFloating,\n autoUpdate,\n flip,\n shift,\n Placement,\n} from \"@floating-ui/vue\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\n\nexport type BbTooltipProps = {\n block?: boolean;\n disabled?: boolean;\n id?: string;\n padding?: number;\n placement?:\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\";\n showClose?: boolean;\n theme?: string;\n transitionDuration?: number;\n};\n\ntype BbTooltipSlots = {\n activator?: (props: {\n props: {\n \"aria-describedby\": string;\n onMouseenter: typeof onMouseenter;\n onFocus: typeof onFocus;\n onBlur: typeof closeTooltip;\n };\n closed: boolean;\n closing: boolean;\n disabled?: boolean;\n open: boolean;\n opening: boolean;\n placement: Placement;\n }) => any;\n default?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTooltip',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n id: {},\n padding: { default: 10 },\n placement: { default: \"top\" },\n showClose: { type: Boolean, default: true },\n theme: { default: \"default\" },\n transitionDuration: { default: 150 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst id = `bb_${props.id ?? useId().id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\n\nconst { floatingStyles, placement } = useFloating(wrapper, content, {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [flip(), shift({ padding: props.padding })],\n});\n\nconst canOpen = ref(true);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst onMouseenter = () => {\n if (open.value || opening.value || props.disabled) return;\n openTooltip();\n document.addEventListener(\"mouseover\", onMouseOver, { passive: true });\n document.addEventListener(\"keydown\", onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = (event: Event) => {\n const target = event.target;\n if (!target) return;\n if (target instanceof HTMLElement) {\n let isOutside = true;\n\n if (wrapper.value) {\n if (wrapper.value.contains(target)) {\n isOutside = false;\n }\n }\n if (content.value) {\n if (content.value.contains(target)) {\n isOutside = false;\n }\n }\n\n if (isOutside) {\n closeTooltip();\n }\n }\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n if (open.value) {\n if (event.key === \"Escape\") {\n closeTooltip();\n }\n }\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n canOpen.value = false;\n closeTooltip();\n};\n\nconst openTooltip = async () => {\n if (!canOpen.value) return;\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closeTooltip = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n document.removeEventListener(\"mouseover\", onMouseOver);\n document.removeEventListener(\"keydown\", onEsc);\n};\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-tooltip--block\": props.block,\n [`bb-tooltip--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-tooltip\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-tooltip__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-describedby': id,\n onMouseenter: onMouseenter,\n onFocus: _unref(onFocus),\n onBlur: closeTooltip,\n disabled: _ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bb-tooltip__bubble-container\", {\n [`bb-tooltip__bubble-container--${_unref(placement)}`]: true,\n [`bb-tooltip__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-tooltip__bubble-container--hidden': closed.value,\n 'bb-tooltip__bubble-container--closing': closing.value,\n 'bb-tooltip__bubble-container--opening': opening.value,\n 'bb-tooltip__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle({\n ..._unref(floatingStyles),\n transitionDuration: `${props.transitionDuration}ms`,\n }),\n id: id\n }, [\n _hoisted_1,\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n tabindex: \"-1\",\n \"aria-hidden\": \"true\",\n class: \"bb-tooltip__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 6)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","props","id","useId","wrapper","ref","content","floatingStyles","placement","useFloating","autoUpdate","flip","shift","canOpen","opening","open","closing","closed","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","event","target","isOutside","closeTooltip","onClickClose","wait","attributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;AAGA,MAAMA,sBAA8C,QAAQ,EAAE,OAAO,uBAAuB,MAAM,EAAE,GAC9FC,IAAa,EAAE,OAAO,wBACtBC,sBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EAAA,CACnB;AACH,GAAG,EAAE,GAwDuBC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,IAAI,CAAC;AAAA,IACL,SAAS,EAAE,SAAS,GAAG;AAAA,IACvB,WAAW,EAAE,SAAS,MAAM;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,oBAAoB,EAAE,SAAS,IAAI;AAAA,EACrC;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAK,MAAMD,EAAM,MAAME,IAAQ,GAAG,KAAK,IAEvCC,IAAUC,KACVC,IAAUD,KAEV,EAAE,gBAAAE,GAAgB,WAAAC,EAAA,IAAcC,EAAYL,GAASE,GAAS;AAAA,MAClE,WAAWL,EAAM;AAAA,MACjB,sBAAsBS;AAAA,MACtB,YAAY,CAACC,EAAA,GAAQC,EAAM,EAAE,SAASX,EAAM,QAAQ,CAAC,CAAC;AAAA,IAAA,CACvD,GAEKY,IAAUR,EAAI,EAAI,GAElBS,IAAUT,EAAI,EAAK,GACnBU,IAAOV,EAAI,EAAK,GAChBW,IAAUX,EAAI,EAAK,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C,GAAY;AAAA,YACrCmC,EAAK,aACDE,KAAcQ,EAAaI,GAAY;AAAA,cACtC,KAAK;AAAA,cACL,UAAU;AAAA,cACV,eAAe;AAAA,cACf,OAAO;AAAA,cACP,SAASlB;AAAA,YAAA,GACR;AAAA,cACD,SAASmB,EAAS,MAAM;AAAA,gBACtBjD;AAAA,cAAA,CACD;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDkD,EAAoB,IAAI,EAAI;AAAA,YAChCV,EAAYN,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,WACA,CAAC;AAAA,MAAA,CACL;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
|
package/dist/index110.js
CHANGED
|
@@ -1,47 +1,101 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
viewBox: "0 0 20 20",
|
|
5
|
-
role: "img",
|
|
6
|
-
"aria-hidden": "true",
|
|
7
|
-
class: "v-icon__svg",
|
|
8
|
-
style: { height: "20px", width: "20px" }
|
|
9
|
-
}, u = /* @__PURE__ */ l("path", {
|
|
10
|
-
d: "M15 6.375L14.125 5.5L10 9.625L5.875 5.5L5 6.375L9.125 10.5L5 14.625L5.875 15.5L10 11.375L14.125 15.5L15 14.625L10.875 10.5L15 6.375Z",
|
|
11
|
-
fill: "currentColor"
|
|
12
|
-
}, null, -1), f = [
|
|
13
|
-
u
|
|
14
|
-
], C = /* @__PURE__ */ c({
|
|
15
|
-
__name: "BbChip",
|
|
1
|
+
import { defineComponent as $, computed as x, resolveComponent as g, openBlock as l, createElementBlock as o, Fragment as y, renderList as s, normalizeClass as f, createElementVNode as a, renderSlot as d, createVNode as v, createSlots as k, withCtx as B, normalizeProps as C, guardReactiveProps as _ } from "vue";
|
|
2
|
+
const P = { class: "bb-tree-row" }, T = { class: "bb-tree-main-content" }, E = /* @__PURE__ */ $({
|
|
3
|
+
__name: "BbTree",
|
|
16
4
|
props: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
items: { default: () => [] },
|
|
6
|
+
parent: {},
|
|
7
|
+
identifier: { default: "id" },
|
|
8
|
+
depth: { default: 0 },
|
|
9
|
+
expandable: { type: [Boolean, Function] }
|
|
20
10
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
11
|
+
setup(h) {
|
|
12
|
+
const r = h, b = (n) => typeof n.open > "u" ? !0 : n.open, u = x(() => r.items.map((n) => {
|
|
13
|
+
const p = b(n), t = n.expandable ?? r.expandable;
|
|
14
|
+
let e = !1;
|
|
15
|
+
return typeof t < "u" && (typeof t == "function" ? e = t(n, r.depth, r.parent) : e = t), {
|
|
16
|
+
children: n.children,
|
|
17
|
+
depth: r.depth,
|
|
18
|
+
expandable: e,
|
|
19
|
+
identifier: n[r.identifier],
|
|
20
|
+
open: p,
|
|
21
|
+
original: n,
|
|
22
|
+
parent: r.parent
|
|
23
|
+
};
|
|
24
|
+
}));
|
|
25
|
+
return (n, p) => {
|
|
26
|
+
const t = g("BbTree", !0);
|
|
27
|
+
return l(!0), o(y, null, s(u.value, (e) => (l(), o("div", {
|
|
28
|
+
class: f(["bb-tree", {
|
|
29
|
+
[`bb-tree--depth-${e.depth}`]: !0,
|
|
30
|
+
"bb-tree--open": e.open
|
|
31
|
+
}]),
|
|
32
|
+
key: e.identifier
|
|
38
33
|
}, [
|
|
39
|
-
(
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
a("div", P, [
|
|
35
|
+
a("div", T, [
|
|
36
|
+
n.$slots[e.identifier] ? d(n.$slots, e.identifier, {
|
|
37
|
+
key: 0,
|
|
38
|
+
item: e.original,
|
|
39
|
+
parent: e.parent,
|
|
40
|
+
depth: e.depth,
|
|
41
|
+
identifier: e.identifier,
|
|
42
|
+
expandable: e.expandable
|
|
43
|
+
}) : n.$slots[e.depth] ? d(n.$slots, e.depth, {
|
|
44
|
+
key: 1,
|
|
45
|
+
item: e.original,
|
|
46
|
+
parent: e.parent,
|
|
47
|
+
depth: e.depth,
|
|
48
|
+
identifier: e.identifier,
|
|
49
|
+
expandable: e.expandable
|
|
50
|
+
}) : d(n.$slots, "default", {
|
|
51
|
+
key: 2,
|
|
52
|
+
item: e.original,
|
|
53
|
+
parent: e.parent,
|
|
54
|
+
depth: e.depth,
|
|
55
|
+
identifier: e.identifier,
|
|
56
|
+
expandable: e.expandable
|
|
57
|
+
})
|
|
58
|
+
])
|
|
59
|
+
]),
|
|
60
|
+
a("div", {
|
|
61
|
+
class: f(`bb-tree--depth-${e.depth}-children`)
|
|
62
|
+
}, [
|
|
63
|
+
d(n.$slots, `${e.depth}-children`, {
|
|
64
|
+
item: e.original,
|
|
65
|
+
parent: e.parent,
|
|
66
|
+
depth: e.depth,
|
|
67
|
+
identifier: e.identifier,
|
|
68
|
+
expandable: e.expandable
|
|
69
|
+
}, () => [
|
|
70
|
+
d(n.$slots, `${e.identifier}-children`, {
|
|
71
|
+
item: e.original,
|
|
72
|
+
parent: e.parent,
|
|
73
|
+
depth: e.depth,
|
|
74
|
+
identifier: e.identifier,
|
|
75
|
+
expandable: e.expandable
|
|
76
|
+
}, () => [
|
|
77
|
+
v(t, {
|
|
78
|
+
depth: e.depth + 1,
|
|
79
|
+
items: e.children,
|
|
80
|
+
parent: e,
|
|
81
|
+
identifier: r.identifier,
|
|
82
|
+
expandable: n.expandable
|
|
83
|
+
}, k({ _: 2 }, [
|
|
84
|
+
s(n.$slots, (w, i) => ({
|
|
85
|
+
name: i,
|
|
86
|
+
fn: B((c) => [
|
|
87
|
+
d(n.$slots, i, C(_(c)))
|
|
88
|
+
])
|
|
89
|
+
}))
|
|
90
|
+
]), 1032, ["depth", "items", "parent", "identifier", "expandable"])
|
|
91
|
+
])
|
|
92
|
+
])
|
|
93
|
+
], 2)
|
|
94
|
+
], 2))), 128);
|
|
95
|
+
};
|
|
42
96
|
}
|
|
43
97
|
});
|
|
44
98
|
export {
|
|
45
|
-
|
|
99
|
+
E as default
|
|
46
100
|
};
|
|
47
101
|
//# sourceMappingURL=index110.js.map
|
package/dist/index110.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index110.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index110.js","sources":["../src/components/BbTree/BbTree.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, resolveComponent as _resolveComponent, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-tree-row\" }\nconst _hoisted_2 = { class: \"bb-tree-main-content\" }\n\nimport { computed } from \"vue\";\nimport { Item } from \"../BbBreadcrumbs/BbBreadcrumbs.vue\";\n\nexport type TreeItem = {\n children?: TreeItem[];\n open?: boolean;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n [key: symbol | string]: any;\n};\n\nexport type BbTreeProps = {\n items: TreeItem[];\n parent?: TreeItem;\n identifier?: string | number;\n depth?: number;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n};\nexport type BbTreeSlots = {\n [key: string]: (props: {\n item: any,\n parent?: any,\n depth: number,\n identifier?: string | number,\n expandable: boolean,\n }) => any\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTree',\n props: {\n items: { default: () => [] as TreeItem[] },\n parent: {},\n identifier: { default: \"id\" },\n depth: { default: 0 },\n expandable: { type: [Boolean, Function] }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst itemIsOpen = (item: TreeItem) => {\n /* If the item is not expandable it must be open */\n if (typeof item.open === \"undefined\") return true;\n return item.open;\n};\n\nconst internalItems = computed(() => {\n return props.items.map((item: TreeItem) => {\n const open = itemIsOpen(item);\n const expandableProp = item.expandable ?? props.expandable;\n let expandable = false;\n if (typeof expandableProp !== \"undefined\") {\n if (typeof expandableProp === \"function\")\n expandable = expandableProp(item, props.depth, props.parent);\n else expandable = expandableProp;\n }\n return {\n children: item.children,\n depth: props.depth,\n expandable: expandable,\n identifier: item[props.identifier],\n open,\n original: item,\n parent: props.parent,\n };\n });\n});\n\nreturn (_ctx: any,_cache: any) => {\n const _component_BbTree = _resolveComponent(\"BbTree\", true)!\n\n return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(internalItems.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"bb-tree\", {\n [`bb-tree--depth-${item.depth}`]: true,\n 'bb-tree--open': item.open,\n }]),\n key: item.identifier\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.$slots[item.identifier])\n ? _renderSlot(_ctx.$slots, item.identifier, {\n key: 0,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n })\n : (_ctx.$slots[item.depth])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 1,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n })\n : _renderSlot(_ctx.$slots, \"default\", {\n key: 2,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass(`bb-tree--depth-${item.depth}-children`)\n }, [\n _renderSlot(_ctx.$slots, `${item.depth}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n }, () => [\n _renderSlot(_ctx.$slots, `${item.identifier}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n identifier: item.identifier,\n expandable: item.expandable\n }, () => [\n _createVNode(_component_BbTree, {\n depth: item.depth + 1,\n items: item.children,\n parent: item,\n identifier: props.identifier,\n expandable: _ctx.expandable\n }, _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1032, [\"depth\", \"items\", \"parent\", \"identifier\", \"expandable\"])\n ])\n ])\n ], 2)\n ], 2))\n }), 128))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","itemIsOpen","item","internalItems","computed","open","expandableProp","expandable","_ctx","_cache","_component_BbTree","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createElementVNode","_renderSlot","_createVNode","_createSlots","_","name","_withCtx","data","_normalizeProps","_guardReactiveProps"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,iBACtBC,IAAa,EAAE,OAAO,0BAiCAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,SAAS,MAAM,GAAiB;AAAA,IACzC,QAAQ,CAAC;AAAA,IACT,YAAY,EAAE,SAAS,KAAK;AAAA,IAC5B,OAAO,EAAE,SAAS,EAAE;AAAA,IACpB,YAAY,EAAE,MAAM,CAAC,SAAS,QAAQ,EAAE;AAAA,EAC1C;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAa,CAACC,MAEd,OAAOA,EAAK,OAAS,MAAoB,KACtCA,EAAK,MAGRC,IAAgBC,EAAS,MACtBJ,EAAM,MAAM,IAAI,CAACE,MAAmB;AACnC,YAAAG,IAAOJ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BAAA,EAEJ;AAAA,cAAA,CACF,GAAG,MAAM,CAAC,SAAS,SAAS,UAAU,cAAc,YAAY,CAAC;AAAA,YAAA,CACnE;AAAA,UAAA,CACF;AAAA,WACA,CAAC;AAAA,SACH,CAAC,EACL,GAAG,GAAG;AAAA,IAAA;AAAA,EAET;AAEA,CAAC;"}
|
package/dist/index111.js
CHANGED
|
@@ -1,41 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { wait as V } from "./index117.js";
|
|
3
|
-
import { throttle as _ } from "./index197.js";
|
|
4
|
-
const h = { class: "bb-collapsible__content" }, k = /* @__PURE__ */ i({
|
|
5
|
-
__name: "BbCollapsible",
|
|
6
|
-
props: {
|
|
7
|
-
eager: { type: Boolean },
|
|
8
|
-
transitionDuration: { default: 250 },
|
|
9
|
-
modelValue: { type: Boolean }
|
|
10
|
-
},
|
|
11
|
-
setup(n) {
|
|
12
|
-
const e = n, l = a(e.modelValue), t = a(l.value);
|
|
13
|
-
s(
|
|
14
|
-
() => e.modelValue,
|
|
15
|
-
_(async (o) => {
|
|
16
|
-
o ? (t.value = !0, l.value = !0) : (await V(e.transitionDuration), l.value = !1);
|
|
17
|
-
}, e.transitionDuration)
|
|
18
|
-
);
|
|
19
|
-
const r = u(() => ({
|
|
20
|
-
"aria-expanded": e.modelValue,
|
|
21
|
-
class: {
|
|
22
|
-
"bb-collapsible": !0,
|
|
23
|
-
"bb-collapsible--open": e.modelValue,
|
|
24
|
-
"bb-collapsible--closed": !e.modelValue,
|
|
25
|
-
"bb-collapsible--invisible": !l.value
|
|
26
|
-
},
|
|
27
|
-
style: {
|
|
28
|
-
transitionDuration: e.transitionDuration + "ms"
|
|
29
|
-
}
|
|
30
|
-
}));
|
|
31
|
-
return (o, y) => (c(), p("div", d(m(r.value)), [
|
|
32
|
-
b("div", h, [
|
|
33
|
-
o.eager || t.value ? v(o.$slots, "default", { key: 0 }) : f("", !0)
|
|
34
|
-
])
|
|
35
|
-
], 16));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
1
|
+
const e = "";
|
|
38
2
|
export {
|
|
39
|
-
|
|
3
|
+
e as default
|
|
40
4
|
};
|
|
41
5
|
//# sourceMappingURL=index111.js.map
|
package/dist/index111.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index111.js","sources":[
|
|
1
|
+
{"version":3,"file":"index111.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index112.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as c, openBlock as t, createElementBlock as o, createElementVNode as l, renderSlot as i, createTextVNode as r, toDisplayString as p, withModifiers as _, createCommentVNode as d } from "vue";
|
|
2
|
+
const b = { class: "bb-chip" }, h = { class: "bb-chip__content" }, m = ["aria-label", "onClick"], L = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
viewBox: "0 0 20 20",
|
|
5
|
+
role: "img",
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
class: "v-icon__svg",
|
|
8
|
+
style: { height: "20px", width: "20px" }
|
|
9
|
+
}, u = /* @__PURE__ */ l("path", {
|
|
10
|
+
d: "M15 6.375L14.125 5.5L10 9.625L5.875 5.5L5 6.375L9.125 10.5L5 14.625L5.875 15.5L10 11.375L14.125 15.5L15 14.625L10.875 10.5L15 6.375Z",
|
|
11
|
+
fill: "currentColor"
|
|
12
|
+
}, null, -1), f = [
|
|
13
|
+
u
|
|
14
|
+
], C = /* @__PURE__ */ c({
|
|
15
|
+
__name: "BbChip",
|
|
5
16
|
props: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
text: {},
|
|
18
|
+
clearable: { type: Boolean },
|
|
19
|
+
clearableLabel: { default: "Elimina" }
|
|
9
20
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"bb-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class: o,
|
|
32
|
-
style: r
|
|
33
|
-
};
|
|
34
|
-
}), n = y(null);
|
|
35
|
-
return _(async () => {
|
|
36
|
-
if (t) {
|
|
37
|
-
if (typeof t[e.type] > "u")
|
|
38
|
-
throw new Error(`Icon "${e.type}" does not exist.`);
|
|
39
|
-
n.value = await t[e.type]();
|
|
40
|
-
}
|
|
41
|
-
}), (o, f) => (h(), w("i", b(a.value, { innerHTML: n.value }), null, 16, g));
|
|
21
|
+
emits: ["click:clear"],
|
|
22
|
+
setup(g, { emit: a }) {
|
|
23
|
+
const s = a, n = (e) => {
|
|
24
|
+
s("click:clear", e);
|
|
25
|
+
};
|
|
26
|
+
return (e, k) => (t(), o("span", b, [
|
|
27
|
+
l("span", h, [
|
|
28
|
+
i(e.$slots, "default", {}, () => [
|
|
29
|
+
r(p(e.text), 1)
|
|
30
|
+
])
|
|
31
|
+
]),
|
|
32
|
+
e.clearable ? (t(), o("button", {
|
|
33
|
+
key: 0,
|
|
34
|
+
"aria-label": e.clearableLabel,
|
|
35
|
+
class: "bb-chip__clear-button",
|
|
36
|
+
onClick: _(n, ["stop", "prevent"]),
|
|
37
|
+
type: "button"
|
|
38
|
+
}, [
|
|
39
|
+
(t(), o("svg", L, f))
|
|
40
|
+
], 8, m)) : d("", !0)
|
|
41
|
+
]));
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
C as default
|
|
46
46
|
};
|
|
47
47
|
//# sourceMappingURL=index112.js.map
|