bitboss-ui 0.1.2 → 0.1.4
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/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +151 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +96 -0
- package/dist/components/BbRatio/BbRatio.vue.d.ts +12 -0
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +104 -98
- package/dist/index.js.map +1 -1
- package/dist/index10.js +123 -95
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +43 -3
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +2 -2
- package/dist/index102.js +2 -2
- package/dist/index103.js +2 -2
- package/dist/index104.js +2 -2
- package/dist/index105.js +2 -2
- package/dist/index106.js +2 -2
- package/dist/index107.js +2 -2
- package/dist/index108.js +2 -2
- package/dist/index109.js +2 -2
- package/dist/index110.js +2 -2
- package/dist/index111.js +2 -2
- package/dist/index112.js +2 -2
- package/dist/index113.js +2 -2
- package/dist/index114.js +2 -2
- package/dist/index115.js +2 -2
- package/dist/index116.js +2 -2
- package/dist/index117.js +2 -2
- package/dist/index118.js +2 -2
- package/dist/index119.js +3 -2
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +4 -4
- package/dist/index120.js +2 -2
- package/dist/index121.js +3 -2
- package/dist/index121.js.map +1 -1
- package/dist/index123.js +2 -2
- package/dist/index124.js +2 -3
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index126.js +2 -3
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index128.js +2 -2
- package/dist/index129.js +3 -2
- package/dist/index129.js.map +1 -1
- 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 -3
- package/dist/index134.js.map +1 -1
- 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 +6 -6
- package/dist/index140.js +3 -2
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +2 -2
- package/dist/index142.js +3 -2
- package/dist/index142.js.map +1 -1
- package/dist/index145.js +2 -2
- package/dist/index146.js +2 -3
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +2 -2
- package/dist/index148.js +2 -3
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +2 -2
- package/dist/index150.js +2 -2
- package/dist/index151.js +3 -2
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +3 -4
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +3 -8
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +3 -2
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +3 -2
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +3 -5
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +348 -17
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +131 -17
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +5 -29
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +1 -1
- package/dist/index160.js +19 -2
- package/dist/index160.js.map +1 -1
- package/dist/index162.js +2 -2
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +184 -14
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +2 -13
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +23 -2
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +328 -3
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +16 -2
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +12 -5
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +2 -350
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +2 -134
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +2 -186
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +4 -23
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +8 -328
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +20 -2
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +29 -21
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +2 -3
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +3 -3
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +6 -38
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +2 -28
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +2 -2
- package/dist/index180.js +2 -13
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +20 -8
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +3 -96
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +3 -4
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +38 -295
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +9 -6
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +96 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +28 -2
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +13 -2
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +6 -2
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -235
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +294 -88
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +2 -2
- package/dist/index193.js +2 -117
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +111 -100
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +105 -78
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +4 -224
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +226 -249
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -38
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +2 -2
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +4 -4
- package/dist/index200.js +89 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +79 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +49 -8
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +223 -5
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +261 -0
- package/dist/index204.js.map +1 -0
- package/dist/index205.js +41 -0
- package/dist/index205.js.map +1 -0
- package/dist/index206.js +5 -0
- package/dist/index206.js.map +1 -0
- package/dist/index207.js +5 -0
- package/dist/index207.js.map +1 -0
- package/dist/index208.js +12 -0
- package/dist/index208.js.map +1 -0
- package/dist/index209.js +9 -0
- package/dist/index209.js.map +1 -0
- package/dist/index210.js +5 -0
- package/dist/index210.js.map +1 -0
- package/dist/index211.js +14 -0
- package/dist/index211.js.map +1 -0
- package/dist/index212.js +434 -0
- package/dist/index212.js.map +1 -0
- package/dist/index213.js +12 -0
- package/dist/index213.js.map +1 -0
- package/dist/index214.js +203 -0
- package/dist/index214.js.map +1 -0
- package/dist/index22.js +14 -14
- package/dist/index24.js +4 -4
- package/dist/index26.js +2 -2
- package/dist/index28.js +4 -4
- package/dist/index34.js +2 -2
- package/dist/index36.js +50 -37
- package/dist/index36.js.map +1 -1
- package/dist/index38.js +39 -39
- package/dist/index38.js.map +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.js +36 -82
- package/dist/index40.js.map +1 -1
- package/dist/index42.js +44 -57
- package/dist/index42.js.map +1 -1
- package/dist/index44.js +98 -79
- package/dist/index44.js.map +1 -1
- package/dist/index46.js +79 -81
- package/dist/index46.js.map +1 -1
- package/dist/index48.js +80 -40
- package/dist/index48.js.map +1 -1
- package/dist/index50.js +40 -283
- package/dist/index50.js.map +1 -1
- package/dist/index52.js +279 -95
- package/dist/index52.js.map +1 -1
- package/dist/index54.js +98 -212
- package/dist/index54.js.map +1 -1
- package/dist/index56.js +213 -44
- package/dist/index56.js.map +1 -1
- package/dist/index58.js +45 -40
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +2 -96
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.js +44 -2
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +89 -211
- package/dist/index61.js.map +1 -1
- package/dist/index63.js +210 -130
- package/dist/index63.js.map +1 -1
- package/dist/index65.js +134 -18
- package/dist/index65.js.map +1 -1
- package/dist/index67.js +145 -74
- package/dist/index67.js.map +1 -1
- package/dist/index69.js +18 -98
- package/dist/index69.js.map +1 -1
- package/dist/index71.js +77 -17
- package/dist/index71.js.map +1 -1
- package/dist/index73.js +48 -66
- package/dist/index73.js.map +1 -1
- package/dist/index75.js +21 -78
- package/dist/index75.js.map +1 -1
- package/dist/index77.js +77 -46
- package/dist/index77.js.map +1 -1
- package/dist/index79.js +44 -61
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +188 -181
- package/dist/index8.js.map +1 -1
- package/dist/index81.js +82 -106
- package/dist/index81.js.map +1 -1
- package/dist/index83.js +88 -370
- package/dist/index83.js.map +1 -1
- package/dist/index85.js +106 -74
- package/dist/index85.js.map +1 -1
- package/dist/index87.js +371 -68
- package/dist/index87.js.map +1 -1
- package/dist/index89.js +75 -111
- package/dist/index89.js.map +1 -1
- package/dist/index91.js +76 -87
- package/dist/index91.js.map +1 -1
- package/dist/index93.js +111 -32
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +2 -37
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +87 -42
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +2 -43
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +38 -3
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +37 -3
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +47 -3
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index89.js
CHANGED
|
@@ -1,120 +1,84 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { flip as G, shift as I } from "./index173.js";
|
|
9
|
-
const J = /* @__PURE__ */ l("span", { class: "bb-tooltip__arrow" }, null, -1), K = { class: "bb-tooltip__bubble" }, Q = /* @__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",
|
|
1
|
+
import { defineComponent as m, openBlock as b, createBlock as h, withCtx as r, renderSlot as n, normalizeProps as s, guardReactiveProps as i, createVNode as c, mergeProps as f, createSlots as y, renderList as B } from "vue";
|
|
2
|
+
import P from "./index14.js";
|
|
3
|
+
import "./index15.js";
|
|
4
|
+
import V from "./index30.js";
|
|
5
|
+
import "./index31.js";
|
|
6
|
+
const G = /* @__PURE__ */ m({
|
|
7
|
+
__name: "BbTextarea",
|
|
22
8
|
props: {
|
|
23
|
-
|
|
9
|
+
autoGrow: { type: Boolean },
|
|
10
|
+
autofocus: { type: Boolean },
|
|
11
|
+
direction: {},
|
|
24
12
|
disabled: { type: Boolean },
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
errors: {},
|
|
14
|
+
hasErrors: { type: Boolean },
|
|
15
|
+
hideLabel: { type: Boolean },
|
|
16
|
+
id: {},
|
|
17
|
+
inputPosition: {},
|
|
18
|
+
label: {},
|
|
19
|
+
labelPosition: {},
|
|
20
|
+
labelTag: {},
|
|
21
|
+
modelValue: {},
|
|
22
|
+
name: {},
|
|
23
|
+
placeholder: {},
|
|
24
|
+
readonly: { type: Boolean },
|
|
25
|
+
reverse: { type: Boolean },
|
|
26
|
+
tag: {}
|
|
29
27
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
g(e.$slots, "activator", P(S({
|
|
64
|
-
props: {
|
|
65
|
-
"aria-describedby": m,
|
|
66
|
-
onMouseenter: h,
|
|
67
|
-
onFocus: b($),
|
|
68
|
-
onBlur: p
|
|
69
|
-
},
|
|
70
|
-
closed: c.value,
|
|
71
|
-
closing: s.value,
|
|
28
|
+
emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
|
29
|
+
setup(w, { emit: o }) {
|
|
30
|
+
const u = {
|
|
31
|
+
onBlur: (e) => o("blur", e),
|
|
32
|
+
onChange: (e) => o("change", e),
|
|
33
|
+
onClick: (e) => o("click", e),
|
|
34
|
+
onFocus: (e) => o("focus", e),
|
|
35
|
+
onInput: (e) => o("input", e),
|
|
36
|
+
onMousedown: (e) => o("mousedown", e),
|
|
37
|
+
onMouseup: (e) => o("mouseup", e),
|
|
38
|
+
"onUpdate:modelValue": (e) => o("update:modelValue", e)
|
|
39
|
+
};
|
|
40
|
+
return (e, g) => (b(), h(P, {
|
|
41
|
+
class: "bb-textarea",
|
|
42
|
+
direction: e.direction,
|
|
43
|
+
errors: e.errors,
|
|
44
|
+
hasErrors: e.hasErrors,
|
|
45
|
+
hideLabel: e.hideLabel,
|
|
46
|
+
id: e.id,
|
|
47
|
+
inputPosition: e.inputPosition,
|
|
48
|
+
label: e.label,
|
|
49
|
+
labelPosition: e.labelPosition,
|
|
50
|
+
modelValue: e.modelValue,
|
|
51
|
+
name: e.name,
|
|
52
|
+
reverse: e.reverse
|
|
53
|
+
}, {
|
|
54
|
+
label: r((a) => [
|
|
55
|
+
n(e.$slots, "label", s(i(a)))
|
|
56
|
+
]),
|
|
57
|
+
input: r(({ id: a, name: d, hasErrors: t }) => [
|
|
58
|
+
c(V, f({
|
|
59
|
+
autoGrow: e.autoGrow,
|
|
60
|
+
autofocus: e.autofocus,
|
|
72
61
|
disabled: e.disabled,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
style: H({
|
|
91
|
-
...b(B),
|
|
92
|
-
transitionDuration: `${t.transitionDuration}ms`
|
|
93
|
-
}),
|
|
94
|
-
id: m
|
|
95
|
-
}, [
|
|
96
|
-
J,
|
|
97
|
-
l("span", K, [
|
|
98
|
-
e.showClose ? (f(), y(x, {
|
|
99
|
-
key: 0,
|
|
100
|
-
tabindex: "-1",
|
|
101
|
-
"aria-hidden": "true",
|
|
102
|
-
class: "bb-tooltip__close",
|
|
103
|
-
onClick: L
|
|
104
|
-
}, {
|
|
105
|
-
default: R(() => [
|
|
106
|
-
Q
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
})) : U("", !0),
|
|
110
|
-
g(e.$slots, "default")
|
|
111
|
-
])
|
|
112
|
-
], 6)
|
|
113
|
-
]))
|
|
114
|
-
], 16));
|
|
62
|
+
hasErrors: t,
|
|
63
|
+
id: a,
|
|
64
|
+
modelValue: e.modelValue,
|
|
65
|
+
name: d,
|
|
66
|
+
placeholder: e.placeholder,
|
|
67
|
+
readonly: e.readonly
|
|
68
|
+
}, u), y({ _: 2 }, [
|
|
69
|
+
B(e.$slots, (k, l) => ({
|
|
70
|
+
name: l,
|
|
71
|
+
fn: r((p) => [
|
|
72
|
+
n(e.$slots, l, s(i(p)))
|
|
73
|
+
])
|
|
74
|
+
}))
|
|
75
|
+
]), 1040, ["autoGrow", "autofocus", "disabled", "hasErrors", "id", "modelValue", "name", "placeholder", "readonly"])
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "inputPosition", "label", "labelPosition", "modelValue", "name", "reverse"]));
|
|
115
79
|
}
|
|
116
80
|
});
|
|
117
81
|
export {
|
|
118
|
-
|
|
82
|
+
G as default
|
|
119
83
|
};
|
|
120
84
|
//# sourceMappingURL=index89.js.map
|
package/dist/index89.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index89.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 { useFloating, autoUpdate, flip, shift } from \"@floating-ui/vue\";\nimport { nanoid } from \"nanoid\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BbIcon from \"../BbIcon/BbIcon.vue\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\n\nexport type BbTooltipProps = {\n block?: boolean;\n disabled?: boolean;\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 theme?: string;\n showClose?: boolean;\n transitionDuration?: number;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTooltip',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n placement: { default: \"top\" },\n theme: { default: \"default\" },\n showClose: { type: Boolean, default: true },\n transitionDuration: { default: 150 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst id = `bb_${nanoid()}`;\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: 10 })],\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 },\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","nanoid","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,GA+BuBC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAA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oB,QAAQ;AAAA,UAC1B,OAAOO,EAAgB,CAAC,gCAAgC;AAAA,YACtD,CAAC,iCAAiCH,EAAOhC,CAAS,CAAC,EAAE,GAAG;AAAA,YACxD,CAAC,iCAAiCuB,EAAK,KAAK,EAAE,GAAGA,EAAK;AAAA,YACtD,wCAAwCd,EAAO;AAAA,YAC/C,yCAAyCD,EAAQ;AAAA,YACjD,yCAAyCF,EAAQ;AAAA,YACjD,sCAAsCC,EAAK;AAAA,UAAA,CAC5C,CAAC;AAAA,UACF,SAAS;AAAA,UACT,KAAKT;AAAA,UACL,OAAOsC,EAAgB;AAAA,YACrB,GAAGJ,EAAOjC,CAAc;AAAA,YACxB,oBAAoB,GAAGN,EAAM,kBAAkB;AAAA,UAAA,CAChD;AAAA,UACD,IAAAC;AAAA,QAAA,GACC;AAAA,UACDP;AAAA,UACAyC,EAAoB,QAAQxC,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;"}
|
|
1
|
+
{"version":3,"file":"index89.js","sources":["../src/components/BbTextarea/BbTextarea.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseTextarea from \"../BaseTextarea/BaseTextarea.vue\";\nimport type { BaseTextareaEvents } from \"../BaseTextarea/BaseTextarea.vue\";\n\nexport interface BbTextareaProps {\n autoGrow?: boolean;\n autofocus?: boolean;\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n disabled?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n label: string;\n labelPosition?: \"left\" | \"center\" | \"right\";\n labelTag?: string;\n modelValue?: string | null;\n name?: string;\n placeholder?: string;\n readonly?: boolean;\n reverse?: boolean;\n tag?: string;\n}\n\nexport type BbTextareaEvents = BaseTextareaEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTextarea',\n props: {\n autoGrow: { type: Boolean },\n autofocus: { type: Boolean },\n direction: {},\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n label: {},\n labelPosition: {},\n labelTag: {},\n modelValue: {},\n name: {},\n placeholder: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean },\n tag: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: string | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-textarea\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseTextarea, _mergeProps({\n autoGrow: _ctx.autoGrow,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly\n }, eventListeners), _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 ]), 1040, [\"autoGrow\", \"autofocus\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"placeholder\", \"readonly\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseTextarea","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA8BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,EAAE,MAAM,QAAQ;AAAA,I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84 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { defineComponent as m, openBlock as b, createBlock as c, withCtx as r, renderSlot as n, normalizeProps as s, guardReactiveProps as i, createVNode as h, mergeProps as f, createSlots as y, renderList as P } from "vue";
|
|
2
|
+
import V from "./index14.js";
|
|
3
|
+
import "./index15.js";
|
|
4
|
+
import B from "./index32.js";
|
|
5
|
+
import "./index33.js";
|
|
6
|
+
const I = /* @__PURE__ */ m({
|
|
7
|
+
__name: "BbTextInput",
|
|
4
8
|
props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
autocomplete: {},
|
|
10
|
+
autofocus: { type: Boolean },
|
|
11
|
+
direction: {},
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
errors: {},
|
|
14
|
+
hasErrors: { type: Boolean },
|
|
15
|
+
hideLabel: { type: Boolean },
|
|
16
|
+
id: {},
|
|
17
|
+
inputPosition: {},
|
|
18
|
+
label: {},
|
|
19
|
+
labelPosition: {},
|
|
20
|
+
modelValue: {},
|
|
21
|
+
name: {},
|
|
22
|
+
placeholder: {},
|
|
23
|
+
readonly: { type: Boolean },
|
|
24
|
+
reverse: { type: Boolean },
|
|
25
|
+
type: {}
|
|
10
26
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}));
|
|
24
|
-
return (n, p) => {
|
|
25
|
-
const c = g("BbTree", !0);
|
|
26
|
-
return l(!0), o(v, null, s(u.value, (e) => (l(), o("div", {
|
|
27
|
-
class: i(["bb-tree", {
|
|
28
|
-
[`bb-tree--depth-${e.depth}`]: !0,
|
|
29
|
-
"bb-tree--open": e.open
|
|
30
|
-
}]),
|
|
31
|
-
key: e.identifier
|
|
32
|
-
}, [
|
|
33
|
-
t("div", T, [
|
|
34
|
-
t("div", w, [
|
|
35
|
-
n.$slots[e.identifier] ? r(n.$slots, e.depth, {
|
|
36
|
-
key: 0,
|
|
37
|
-
item: e.original,
|
|
38
|
-
parent: e.parent,
|
|
39
|
-
depth: e.depth,
|
|
40
|
-
expandable: e.expandable
|
|
41
|
-
}) : n.$slots[e.depth] ? r(n.$slots, e.depth, {
|
|
42
|
-
key: 1,
|
|
43
|
-
item: e.original,
|
|
44
|
-
parent: e.parent,
|
|
45
|
-
depth: e.depth,
|
|
46
|
-
expandable: e.expandable
|
|
47
|
-
}) : r(n.$slots, "default", {
|
|
48
|
-
key: 2,
|
|
49
|
-
item: e.original,
|
|
50
|
-
parent: e.parent,
|
|
51
|
-
depth: e.depth,
|
|
52
|
-
expandable: e.expandable
|
|
53
|
-
})
|
|
54
|
-
])
|
|
55
|
-
]),
|
|
56
|
-
t("div", {
|
|
57
|
-
class: i(`bb-tree--depth-${e.depth}-children`)
|
|
58
|
-
}, [
|
|
59
|
-
r(n.$slots, `${e.depth}-children`, {
|
|
60
|
-
item: e.original,
|
|
61
|
-
parent: e.parent,
|
|
62
|
-
depth: e.depth,
|
|
63
|
-
expandable: e.expandable
|
|
64
|
-
}, () => [
|
|
65
|
-
r(n.$slots, `${e.identifier}-children`, {
|
|
66
|
-
item: e.original,
|
|
67
|
-
parent: e.parent,
|
|
68
|
-
depth: e.depth,
|
|
69
|
-
expandable: e.expandable
|
|
70
|
-
}, () => [
|
|
71
|
-
k(c, {
|
|
72
|
-
depth: e.depth + 1,
|
|
73
|
-
items: e.children,
|
|
74
|
-
parent: e,
|
|
75
|
-
identifier: e.identifier,
|
|
76
|
-
expandable: n.expandable
|
|
77
|
-
}, y({ _: 2 }, [
|
|
78
|
-
s(n.$slots, (z, d) => ({
|
|
79
|
-
name: d,
|
|
80
|
-
fn: B((f) => [
|
|
81
|
-
r(n.$slots, d, C(_(f)))
|
|
82
|
-
])
|
|
83
|
-
}))
|
|
84
|
-
]), 1032, ["depth", "items", "parent", "identifier", "expandable"])
|
|
85
|
-
])
|
|
86
|
-
])
|
|
87
|
-
], 2)
|
|
88
|
-
], 2))), 128);
|
|
27
|
+
emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
|
28
|
+
setup(k, { emit: o }) {
|
|
29
|
+
const u = {
|
|
30
|
+
onBlur: (e) => o("blur", e),
|
|
31
|
+
onChange: (e) => o("change", e),
|
|
32
|
+
onClick: (e) => o("click", e),
|
|
33
|
+
onFocus: (e) => o("focus", e),
|
|
34
|
+
onInput: (e) => o("input", e),
|
|
35
|
+
onMousedown: (e) => o("mousedown", e),
|
|
36
|
+
onMouseup: (e) => o("mouseup", e),
|
|
37
|
+
"onUpdate:modelValue": (e) => o("update:modelValue", e)
|
|
89
38
|
};
|
|
39
|
+
return (e, v) => (b(), c(V, {
|
|
40
|
+
class: "bb-text-input",
|
|
41
|
+
direction: e.direction,
|
|
42
|
+
errors: e.errors,
|
|
43
|
+
hasErrors: e.hasErrors,
|
|
44
|
+
hideLabel: e.hideLabel,
|
|
45
|
+
id: e.id,
|
|
46
|
+
inputPosition: e.inputPosition,
|
|
47
|
+
label: e.label,
|
|
48
|
+
labelPosition: e.labelPosition,
|
|
49
|
+
modelValue: e.modelValue,
|
|
50
|
+
name: e.name,
|
|
51
|
+
reverse: e.reverse
|
|
52
|
+
}, {
|
|
53
|
+
label: r((l) => [
|
|
54
|
+
n(e.$slots, "label", s(i(l)))
|
|
55
|
+
]),
|
|
56
|
+
input: r(({ id: l, name: d, hasErrors: t }) => [
|
|
57
|
+
h(B, f({
|
|
58
|
+
autocomplete: e.autocomplete,
|
|
59
|
+
autofocus: e.autofocus,
|
|
60
|
+
disabled: e.disabled,
|
|
61
|
+
hasErrors: t,
|
|
62
|
+
id: l,
|
|
63
|
+
modelValue: e.modelValue,
|
|
64
|
+
name: d,
|
|
65
|
+
placeholder: e.placeholder,
|
|
66
|
+
readonly: e.readonly,
|
|
67
|
+
type: e.type
|
|
68
|
+
}, u), y({ _: 2 }, [
|
|
69
|
+
P(e.$slots, (L, a) => ({
|
|
70
|
+
name: a,
|
|
71
|
+
fn: r((p) => [
|
|
72
|
+
n(e.$slots, a, s(i(p)))
|
|
73
|
+
])
|
|
74
|
+
}))
|
|
75
|
+
]), 1040, ["autocomplete", "autofocus", "disabled", "hasErrors", "id", "modelValue", "name", "placeholder", "readonly", "type"])
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "inputPosition", "label", "labelPosition", "modelValue", "name", "reverse"]));
|
|
90
79
|
}
|
|
91
80
|
});
|
|
92
81
|
export {
|
|
93
|
-
|
|
82
|
+
I as default
|
|
94
83
|
};
|
|
95
84
|
//# sourceMappingURL=index91.js.map
|
package/dist/index91.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index91.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index91.js","sources":["../src/components/BbTextInput/BbTextInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseTextInput from \"../BaseTextInput/BaseTextInput.vue\";\nimport type { BaseTextInputEvents } from \"../BaseTextInput/BaseTextInput.vue\";\n\nexport interface BbTextInputProps {\n autocomplete?: string;\n autofocus?: boolean;\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n disabled?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n label: string;\n labelPosition?: \"left\" | \"center\" | \"right\";\n modelValue?: any;\n name?: string;\n placeholder?: string;\n readonly?: boolean;\n reverse?: boolean;\n type?: \"text\" | \"number\" | \"date\" | \"datetime-local\" | \"email\" | \"password\";\n}\n\nexport type BbTextInputEvents = BaseTextInputEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTextInput',\n props: {\n autocomplete: {},\n autofocus: { type: Boolean },\n direction: {},\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n label: {},\n labelPosition: {},\n modelValue: {},\n name: {},\n placeholder: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean },\n type: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: string | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-text-input\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseTextInput, _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n type: _ctx.type\n }, eventListeners), _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 ]), 1040, [\"autocomplete\", \"autofocus\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"placeholder\", \"readonly\", \"type\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseTextInput","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA6BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,CAAC;AAAA,IAChB,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,aAAa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AAK,GAAI,MAAAC,GAAM,WAAAC,QAAgB;AAAA,QAC3CC,EAAaC,GAAeC,EAAY;AAAA,UACtC,cAAcf,EAAK;AAAA,UACnB,WAAWA,EAAK;AAAA,UAChB,UAAUA,EAAK;AAAA,UACf,WAAAY;AAAA,UACA,IAAAF;AAAA,UACA,YAAYV,EAAK;AAAA,UACjB,MAAAW;AAAA,UACA,aAAaX,EAAK;AAAA,UAClB,UAAUA,EAAK;AAAA,UACf,MAAMA,EAAK;AAAA,WACVH,CAAc,GAAGmB,EAAa,EAAE,GAAG,KAAK;AAAA,UACzCC,EAAYjB,EAAK,QAAQ,CAACkB,GAAGP,OACpB;AAAA,YACL,MAAMA;AAAAA,YACN,IAAIN,EAAS,CAACC,MAAS;AAAA,cACrBC,EAAYP,EAAK,QAAQW,GAAMH,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,YAAA,CAC1E;AAAA,UAAA,EAEJ;AAAA,QACF,CAAA,GAAG,MAAM,CAAC,gBAAgB,aAAa,YAAY,aAAa,MAAM,cAAc,QAAQ,eAAe,YAAY,MAAM,CAAC;AAAA,MAAA,CAChI;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,iBAAiB,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE3I;AAEA,CAAC;"}
|
package/dist/index93.js
CHANGED
|
@@ -1,41 +1,120 @@
|
|
|
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 g, normalizeProps as P, guardReactiveProps as S, unref as b, createBlock as y, Teleport as N, normalizeClass as V, normalizeStyle as H, withCtx as R, createCommentVNode as U } from "vue";
|
|
2
|
+
import { useFloating as j } from "./index186.js";
|
|
3
|
+
import { nanoid as q } from "./index176.js";
|
|
4
|
+
import { wait as C } from "./index164.js";
|
|
5
|
+
import x from "./index2.js";
|
|
6
|
+
import "./index3.js";
|
|
7
|
+
import { autoUpdate as A } from "./index157.js";
|
|
8
|
+
import { flip as G, shift as I } from "./index166.js";
|
|
9
|
+
const J = /* @__PURE__ */ l("span", { class: "bb-tooltip__arrow" }, null, -1), K = { class: "bb-tooltip__bubble" }, Q = /* @__PURE__ */ l("svg", {
|
|
4
10
|
viewBox: "0 0 24 24",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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",
|
|
13
22
|
props: {
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
block: { type: Boolean },
|
|
24
|
+
disabled: { type: Boolean },
|
|
25
|
+
placement: { default: "top" },
|
|
26
|
+
theme: { default: "default" },
|
|
27
|
+
showClose: { type: Boolean, default: !0 },
|
|
28
|
+
transitionDuration: { default: 150 }
|
|
16
29
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
setup(E) {
|
|
31
|
+
const t = E, m = `bb_${q()}`, i = o(), u = o(), { floatingStyles: B, placement: v } = j(i, u, {
|
|
32
|
+
placement: t.placement,
|
|
33
|
+
whileElementsMounted: A,
|
|
34
|
+
middleware: [G(), I({ padding: 10 })]
|
|
35
|
+
}), _ = o(!0), n = o(!1), a = o(!1), s = o(!1), c = o(!0), h = () => {
|
|
36
|
+
a.value || n.value || t.disabled || (M(), document.addEventListener("mouseover", w, { passive: !0 }), document.addEventListener("keydown", k, { passive: !0 }));
|
|
37
|
+
}, $ = h, w = (e) => {
|
|
38
|
+
const r = e.target;
|
|
39
|
+
if (r && r instanceof HTMLElement) {
|
|
40
|
+
let d = !0;
|
|
41
|
+
i.value && i.value.contains(r) && (d = !1), u.value && u.value.contains(r) && (d = !1), d && p();
|
|
42
|
+
}
|
|
43
|
+
}, k = (e) => {
|
|
44
|
+
a.value && e.key === "Escape" && p();
|
|
45
|
+
}, L = () => {
|
|
46
|
+
_.value = !1, p();
|
|
47
|
+
}, M = async () => {
|
|
48
|
+
_.value && (c.value = !1, s.value = !1, n.value = !0, await C(50), a.value = !0, n.value = !1);
|
|
49
|
+
}, p = async () => {
|
|
50
|
+
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", k);
|
|
51
|
+
}, T = z(() => ({
|
|
52
|
+
class: {
|
|
53
|
+
"bb-tooltip--block": t.block,
|
|
54
|
+
[`bb-tooltip--theme-${t.theme}`]: t.theme
|
|
55
|
+
}
|
|
56
|
+
}));
|
|
57
|
+
return (e, r) => (f(), F("span", O({ class: "bb-tooltip" }, T.value), [
|
|
58
|
+
l("span", {
|
|
59
|
+
class: "bb-tooltip__wrapper",
|
|
60
|
+
ref_key: "wrapper",
|
|
61
|
+
ref: i
|
|
32
62
|
}, [
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
63
|
+
g(e.$slots, "activator", P(S({
|
|
64
|
+
props: {
|
|
65
|
+
"aria-describedby": m,
|
|
66
|
+
onMouseenter: h,
|
|
67
|
+
onFocus: b($),
|
|
68
|
+
onBlur: p
|
|
69
|
+
},
|
|
70
|
+
closed: c.value,
|
|
71
|
+
closing: s.value,
|
|
72
|
+
disabled: e.disabled,
|
|
73
|
+
open: a.value,
|
|
74
|
+
opening: n.value,
|
|
75
|
+
placement: b(v)
|
|
76
|
+
})))
|
|
77
|
+
], 512),
|
|
78
|
+
(f(), y(N, { to: "body" }, [
|
|
79
|
+
l("span", {
|
|
80
|
+
class: V(["bb-tooltip__bubble-container", {
|
|
81
|
+
[`bb-tooltip__bubble-container--${b(v)}`]: !0,
|
|
82
|
+
[`bb-tooltip__bubble-container--${e.theme}`]: e.theme,
|
|
83
|
+
"bb-tooltip__bubble-container--hidden": c.value,
|
|
84
|
+
"bb-tooltip__bubble-container--closing": s.value,
|
|
85
|
+
"bb-tooltip__bubble-container--opening": n.value,
|
|
86
|
+
"bb-tooltip__bubble-container--open": a.value
|
|
87
|
+
}]),
|
|
88
|
+
ref_key: "content",
|
|
89
|
+
ref: u,
|
|
90
|
+
style: H({
|
|
91
|
+
...b(B),
|
|
92
|
+
transitionDuration: `${t.transitionDuration}ms`
|
|
93
|
+
}),
|
|
94
|
+
id: m
|
|
95
|
+
}, [
|
|
96
|
+
J,
|
|
97
|
+
l("span", K, [
|
|
98
|
+
e.showClose ? (f(), y(x, {
|
|
99
|
+
key: 0,
|
|
100
|
+
tabindex: "-1",
|
|
101
|
+
"aria-hidden": "true",
|
|
102
|
+
class: "bb-tooltip__close",
|
|
103
|
+
onClick: L
|
|
104
|
+
}, {
|
|
105
|
+
default: R(() => [
|
|
106
|
+
Q
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
})) : U("", !0),
|
|
110
|
+
g(e.$slots, "default")
|
|
111
|
+
])
|
|
112
|
+
], 6)
|
|
113
|
+
]))
|
|
114
|
+
], 16));
|
|
36
115
|
}
|
|
37
116
|
});
|
|
38
117
|
export {
|
|
39
|
-
|
|
118
|
+
ae as default
|
|
40
119
|
};
|
|
41
120
|
//# sourceMappingURL=index93.js.map
|