bitboss-ui 2.0.105 → 2.0.107
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/BaseDialog/BaseDialog.vue.d.ts +0 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -7
- package/dist/components/BbAlert/BbAlert.vue.d.ts +0 -1
- package/dist/components/BbChip/BbChip.vue.d.ts +0 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbRows/BbRows.vue.d.ts +1 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -7
- package/dist/components/BbTable/types.d.ts +13 -0
- package/dist/components/ListBox.vue.d.ts +0 -2
- package/dist/composables/useLocale.d.ts +1 -1
- package/dist/i18n/en.d.ts +45 -0
- package/dist/i18n/it.d.ts +45 -0
- package/dist/index100.js +46 -45
- package/dist/index111.js +223 -205
- package/dist/index119.js +2 -2
- package/dist/index121.js +55 -54
- package/dist/index123.js +1 -1
- package/dist/index125.js +14 -13
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index133.js +2 -2
- package/dist/index15.js +36 -35
- package/dist/index17.js +3 -3
- package/dist/index19.js +63 -64
- package/dist/index207.js +8 -2
- package/dist/index208.js +3 -4
- package/dist/index209.js +53 -2
- package/dist/index21.js +110 -103
- package/dist/index211.js +13 -16
- package/dist/index212.js +3 -16
- package/dist/index213.js +40 -18
- package/dist/index214.js +6 -19
- package/dist/index215.js +7 -27
- package/dist/index216.js +12 -3
- package/dist/index217.js +13 -2
- package/dist/index218.js +2 -8
- package/dist/index219.js +4 -250
- package/dist/index220.js +2 -52
- package/dist/index221.js +3 -44
- package/dist/index222.js +20 -5
- package/dist/index223.js +4 -60
- package/dist/index224.js +281 -84
- package/dist/index225.js +18 -0
- package/dist/index226.js +16 -8
- package/dist/index227.js +18 -24
- package/dist/index228.js +14 -16
- package/dist/index229.js +18 -47
- package/dist/index23.js +127 -119
- package/dist/index230.js +27 -15
- package/dist/index231.js +2 -12
- package/dist/index232.js +250 -16
- package/dist/index233.js +52 -3
- package/dist/index234.js +44 -41
- package/dist/index235.js +5 -6
- package/dist/index236.js +60 -7
- package/dist/index237.js +126 -12
- package/dist/index238.js +124 -52
- package/dist/index239.js +4 -0
- package/dist/index240.js +4 -12
- package/dist/index241.js +369 -3
- package/dist/index242.js +85 -125
- package/dist/index244.js +25 -2
- package/dist/index245.js +16 -19
- package/dist/index246.js +48 -5
- package/dist/index247.js +12 -366
- package/dist/index248.js +12 -4
- package/dist/index249.js +16 -2
- package/dist/index25.js +44 -41
- package/dist/index250.js +2 -2
- package/dist/index251.js +18 -2
- package/dist/index252.js +105 -17
- package/dist/{index255.js → index254.js} +2 -2
- package/dist/index256.js +14 -0
- package/dist/index257.js +2 -12
- package/dist/index258.js +2 -10
- package/dist/index259.js +9 -2
- package/dist/index260.js +3 -6
- package/dist/index261.js +8 -15
- package/dist/index262.js +23 -9
- package/dist/index263.js +88 -8
- package/dist/index265.js +6 -89
- package/dist/index266.js +18 -0
- package/dist/index267.js +9 -4
- package/dist/index268.js +9 -6
- package/dist/index269.js +8 -2
- package/dist/index27.js +1 -1
- package/dist/index270.js +28 -2
- package/dist/index271.js +3 -2
- package/dist/index273.js +7 -2
- package/dist/index274.js +431 -2
- package/dist/index275.js +1 -1
- package/dist/index276.js +89 -2
- package/dist/index277.js +7 -2
- package/dist/index278.js +11 -2
- package/dist/index279.js +4 -28
- package/dist/index280.js +224 -22
- package/dist/index281.js +202 -0
- package/dist/index282.js +175 -6
- package/dist/index283.js +6 -3
- package/dist/index284.js +2 -7
- package/dist/index285.js +2 -11
- package/dist/index286.js +2 -17
- package/dist/index287.js +2 -9
- package/dist/index288.js +2 -431
- package/dist/index289.js +2 -2
- package/dist/index29.js +2 -2
- package/dist/index290.js +2 -89
- package/dist/index291.js +2 -3
- package/dist/index292.js +4 -0
- package/dist/index293.js +2 -224
- package/dist/index294.js +2 -200
- package/dist/index295.js +22 -2
- package/dist/index297.js +2 -176
- package/dist/index298.js +125 -21
- package/dist/index299.js +24 -0
- package/dist/index301.js +3 -436
- package/dist/index302.js +16 -126
- package/dist/index303.js +436 -3
- package/dist/index304.js +127 -3
- package/dist/index305.js +3 -213
- package/dist/index306.js +3 -3
- package/dist/index307.js +214 -3
- package/dist/index308.js +3 -58
- package/dist/index309.js +3 -7
- package/dist/index31.js +2 -2
- package/dist/index310.js +3 -19
- package/dist/index311.js +56 -64
- package/dist/index312.js +2 -7
- package/dist/index313.js +67 -2
- package/dist/index314.js +5 -5
- package/dist/index315.js +32 -7
- package/dist/index316.js +7 -8
- package/dist/index317.js +18 -7
- package/dist/index318.js +53 -5
- package/dist/index319.js +53 -3
- package/dist/index320.js +46 -3
- package/dist/index321.js +6 -32
- package/dist/index322.js +4 -46
- package/dist/index323.js +8 -2
- package/dist/index324.js +2 -2
- package/dist/index325.js +6 -0
- package/dist/index326.js +2 -424
- package/dist/index328.js +424 -2
- package/dist/index33.js +45 -45
- package/dist/index35.js +56 -55
- package/dist/index37.js +166 -165
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +70 -71
- package/dist/index45.js +7 -7
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index53.js +28 -27
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +32 -31
- package/dist/index75.js +3 -3
- package/dist/index77.js +87 -86
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +45 -44
- package/dist/index86.js +67 -66
- package/dist/index88.js +69 -67
- package/package.json +1 -1
- package/dist/index210.js +0 -283
- package/dist/index243.js +0 -127
- package/dist/index253.js +0 -108
- package/dist/index264.js +0 -25
- package/dist/index296.js +0 -128
- package/dist/index300.js +0 -10
- /package/dist/{index327.js → index329.js} +0 -0
- /package/dist/{index272.js → index330.js} +0 -0
package/dist/index86.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { debounce as
|
1
|
+
import { defineComponent as E, computed as h, ref as g, onMounted as P, onBeforeUnmount as W, openBlock as k, createElementBlock as V, normalizeClass as $, createElementVNode as i, createVNode as S, unref as v, withCtx as w, renderSlot as c, toDisplayString as m, Fragment as R, renderList as F, nextTick as x } from "vue";
|
2
|
+
import { debounce as T } from "./index267.js";
|
3
3
|
/* empty css */
|
4
4
|
/* empty css */
|
5
|
-
import
|
5
|
+
import z from "./index13.js";
|
6
6
|
/* empty css */
|
7
|
-
|
7
|
+
import { useLocale as D } from "./index217.js";
|
8
|
+
const G = ["aria-label"], I = { class: "bb-pagination__page-label sr-only" }, O = { class: "bb-pagination__page-label" }, j = { class: "bb-pagination__page-label" }, q = { class: "bb-pagination__page-label sr-only" }, Z = /* @__PURE__ */ E({
|
8
9
|
__name: "BbPagination",
|
9
10
|
props: {
|
10
11
|
disabled: { type: Boolean },
|
@@ -17,75 +18,75 @@ const T = ["aria-label"], D = { class: "bb-pagination__page-label" }, G = { clas
|
|
17
18
|
totalPages: { default: 1 }
|
18
19
|
},
|
19
20
|
emits: ["update:modelValue"],
|
20
|
-
setup(B, { emit:
|
21
|
-
const
|
22
|
-
|
23
|
-
|
21
|
+
setup(B, { emit: L }) {
|
22
|
+
const a = B, f = L, { t: C } = D(), s = h(() => +a.totalPages), r = g(1), t = g(+a.maxSize), u = g(), d = g(), M = g(1 / 0), _ = () => {
|
23
|
+
u.value && d.value && (u.value.clientWidth < d.value.clientWidth ? t.value - 1 > 3 ? (t.value--, x(_)) : t.value = 3 : t.value < +a.maxSize && /* If there is enough space to fit one */
|
24
|
+
u.value.clientWidth - d.value.clientWidth > M.value && (t.value = Math.min(t.value + 1, +a.maxSize), x(_)));
|
24
25
|
};
|
25
26
|
if (globalThis.ResizeObserver) {
|
26
|
-
const e = new ResizeObserver(
|
27
|
-
|
28
|
-
if (
|
29
|
-
const
|
27
|
+
const e = new ResizeObserver(T(_, 200));
|
28
|
+
P(() => {
|
29
|
+
if (u.value && d.value) {
|
30
|
+
const l = u.value.querySelectorAll(
|
30
31
|
".bb-pagination__page"
|
31
32
|
)[1];
|
32
|
-
if (
|
33
|
+
if (l) {
|
33
34
|
const p = getComputedStyle(d.value).columnGap.replaceAll(/\D/g, ""), o = Number(p);
|
34
|
-
|
35
|
+
M.value = l.clientWidth + o;
|
35
36
|
}
|
36
|
-
e.observe(
|
37
|
+
e.observe(u.value);
|
37
38
|
}
|
38
|
-
}),
|
39
|
+
}), W(() => {
|
39
40
|
e.disconnect();
|
40
41
|
});
|
41
42
|
}
|
42
|
-
const
|
43
|
+
const N = h(() => {
|
43
44
|
if (s.value <= 0 || isNaN(s.value) || s.value > Number.MAX_SAFE_INTEGER)
|
44
45
|
return [];
|
45
|
-
if (t.value <= 1) return [
|
46
|
+
if (t.value <= 1) return [a.modelValue];
|
46
47
|
if (s.value <= t.value)
|
47
|
-
return b(s.value,
|
48
|
-
const e = t.value % 2 === 0,
|
49
|
-
if (n -
|
48
|
+
return b(s.value, r.value);
|
49
|
+
const e = t.value % 2 === 0, l = e ? t.value / 2 : Math.floor(t.value / 2), n = e ? l : l + 1, p = s.value - l;
|
50
|
+
if (n - a.modelValue >= 0)
|
50
51
|
return [
|
51
|
-
...b(Math.max(1, t.value - 1),
|
52
|
-
|
52
|
+
...b(Math.max(1, t.value - 1), r.value),
|
53
|
+
a.ellipsis,
|
53
54
|
s.value
|
54
55
|
];
|
55
|
-
if (
|
56
|
-
const o = t.value - 1,
|
56
|
+
if (a.modelValue - p >= (e ? 1 : 0)) {
|
57
|
+
const o = t.value - 1, y = s.value - o + r.value;
|
57
58
|
return [
|
58
|
-
|
59
|
-
|
60
|
-
...b(o,
|
59
|
+
r.value,
|
60
|
+
a.ellipsis,
|
61
|
+
...b(o, y)
|
61
62
|
];
|
62
63
|
} else {
|
63
|
-
const o = Math.max(1, t.value - 3),
|
64
|
+
const o = Math.max(1, t.value - 3), y = o === 1 ? a.modelValue : a.modelValue - Math.ceil(o / 2) + r.value;
|
64
65
|
return [
|
65
|
-
|
66
|
-
|
67
|
-
...b(o,
|
68
|
-
|
66
|
+
r.value,
|
67
|
+
a.ellipsis,
|
68
|
+
...b(o, y),
|
69
|
+
a.ellipsis,
|
69
70
|
s.value
|
70
71
|
];
|
71
72
|
}
|
72
|
-
}),
|
73
|
+
}), A = h(() => N.value.map((e, l) => typeof e == "string" ? {
|
73
74
|
active: !1,
|
74
|
-
key: `ellipsis-${
|
75
|
+
key: `ellipsis-${l}`,
|
75
76
|
page: e,
|
76
77
|
ellipsis: !0,
|
77
78
|
disabled: !0
|
78
79
|
} : {
|
79
|
-
active: e ===
|
80
|
+
active: e === a.modelValue,
|
80
81
|
key: e,
|
81
82
|
page: e,
|
82
83
|
ellipsis: !1,
|
83
|
-
disabled: !!
|
84
|
-
})), b = (e,
|
85
|
-
return (e,
|
84
|
+
disabled: !!a.disabled || +a.totalPages < 2 || a.loading
|
85
|
+
})), b = (e, l = 0) => Array.from({ length: e }, (n, p) => l + p);
|
86
|
+
return (e, l) => (k(), V("div", {
|
86
87
|
ref_key: "outercontainer",
|
87
|
-
ref:
|
88
|
-
class:
|
88
|
+
ref: u,
|
89
|
+
class: $(["bb-pagination", {
|
89
90
|
[`bb-pagination--${e.align}`]: !0,
|
90
91
|
"bb-pagination--disabled": e.disabled
|
91
92
|
}])
|
@@ -97,15 +98,15 @@ const T = ["aria-label"], D = { class: "bb-pagination__page-label" }, G = { clas
|
|
97
98
|
class: "bb-pagination__pages"
|
98
99
|
}, [
|
99
100
|
i("li", null, [
|
100
|
-
|
101
|
+
S(v(z), {
|
101
102
|
class: "bb-pagination__page bb-pagination__page--previous",
|
102
|
-
disabled:
|
103
|
-
onClick:
|
103
|
+
disabled: a.modelValue <= 1 || e.loading || e.disabled,
|
104
|
+
onClick: l[0] || (l[0] = (n) => f("update:modelValue", a.modelValue - 1))
|
104
105
|
}, {
|
105
|
-
default:
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
default: w(() => [
|
107
|
+
c(e.$slots, "previous", {}, () => [
|
108
|
+
i("span", I, m(v(C)("pagination.previous").value), 1),
|
109
|
+
l[2] || (l[2] = i("svg", {
|
109
110
|
class: "bb-pagination__page-chevron",
|
110
111
|
viewBox: "0 0 24 24",
|
111
112
|
xmlns: "http://www.w3.org/2000/svg"
|
@@ -120,42 +121,42 @@ const T = ["aria-label"], D = { class: "bb-pagination__page-label" }, G = { clas
|
|
120
121
|
_: 3
|
121
122
|
}, 8, ["disabled"])
|
122
123
|
]),
|
123
|
-
(
|
124
|
+
(k(!0), V(R, null, F(A.value, (n) => (k(), V("li", {
|
124
125
|
key: n.key
|
125
126
|
}, [
|
126
|
-
|
127
|
-
class:
|
127
|
+
S(v(z), {
|
128
|
+
class: $(["bb-pagination__page", {
|
128
129
|
"bb-pagination__page--active": n.active,
|
129
130
|
"bb-pagination__page--ellipsis": n.ellipsis
|
130
131
|
}]),
|
131
132
|
disabled: n.disabled,
|
132
|
-
onClick: (p) =>
|
133
|
+
onClick: (p) => f("update:modelValue", n.key)
|
133
134
|
}, {
|
134
|
-
default:
|
135
|
-
n.ellipsis === !0 ?
|
136
|
-
i("span",
|
137
|
-
]) :
|
135
|
+
default: w(() => [
|
136
|
+
n.ellipsis === !0 ? c(e.$slots, "ellipsis", { key: 0 }, () => [
|
137
|
+
i("span", O, m(a.ellipsis), 1)
|
138
|
+
]) : c(e.$slots, "item", {
|
138
139
|
key: 1,
|
139
140
|
active: n.active,
|
140
141
|
disabled: n.disabled,
|
141
142
|
item: n.key
|
142
143
|
}, () => [
|
143
|
-
i("span",
|
144
|
+
i("span", j, m(n.key), 1)
|
144
145
|
])
|
145
146
|
]),
|
146
147
|
_: 2
|
147
148
|
}, 1032, ["class", "disabled", "onClick"])
|
148
149
|
]))), 128)),
|
149
150
|
i("li", null, [
|
150
|
-
|
151
|
+
S(v(z), {
|
151
152
|
class: "bb-pagination__page bb-pagination__page--next",
|
152
|
-
disabled:
|
153
|
-
onClick:
|
153
|
+
disabled: a.modelValue >= +s.value || e.loading || e.disabled,
|
154
|
+
onClick: l[1] || (l[1] = (n) => f("update:modelValue", a.modelValue + 1))
|
154
155
|
}, {
|
155
|
-
default:
|
156
|
-
|
157
|
-
|
158
|
-
|
156
|
+
default: w(() => [
|
157
|
+
c(e.$slots, "next", {}, () => [
|
158
|
+
i("span", q, m(v(C)("pagination.next").value), 1),
|
159
|
+
l[3] || (l[3] = i("svg", {
|
159
160
|
class: "bb-pagination__page-chevron",
|
160
161
|
viewBox: "0 0 24 24",
|
161
162
|
xmlns: "http://www.w3.org/2000/svg"
|
@@ -171,10 +172,10 @@ const T = ["aria-label"], D = { class: "bb-pagination__page-label" }, G = { clas
|
|
171
172
|
}, 8, ["disabled"])
|
172
173
|
])
|
173
174
|
], 512)
|
174
|
-
], 8,
|
175
|
+
], 8, G)
|
175
176
|
], 2));
|
176
177
|
}
|
177
178
|
});
|
178
179
|
export {
|
179
|
-
|
180
|
+
Z as default
|
180
181
|
};
|
package/dist/index88.js
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { useFocusTrap as
|
3
|
-
import { useId as
|
4
|
-
import { useIntersectionObserver as
|
5
|
-
import { waitFor as
|
6
|
-
import
|
1
|
+
import { defineComponent as O, ref as n, computed as v, openBlock as y, createElementBlock as S, mergeProps as F, createElementVNode as c, renderSlot as k, normalizeProps as H, guardReactiveProps as V, createVNode as q, withCtx as _, createBlock as I, toDisplayString as W, unref as z, createCommentVNode as A, nextTick as R } from "vue";
|
2
|
+
import { useFocusTrap as j } from "./index213.js";
|
3
|
+
import { useId as G } from "./index8.js";
|
4
|
+
import { useIntersectionObserver as J } from "./index132.js";
|
5
|
+
import { waitFor as K } from "./index214.js";
|
6
|
+
import Q from "./index13.js";
|
7
7
|
/* empty css */
|
8
|
-
import
|
8
|
+
import U from "./index263.js";
|
9
9
|
/* empty css */
|
10
|
-
import {
|
11
|
-
|
10
|
+
import { useLocale as X } from "./index217.js";
|
11
|
+
import { useDebounceFn as Y } from "./index205.js";
|
12
|
+
const Z = { class: "bb-popover__close-label sr-only" }, pe = /* @__PURE__ */ O({
|
12
13
|
__name: "BbPopover",
|
13
14
|
props: {
|
14
15
|
arrowPadding: { default: 10 },
|
16
|
+
closeLabel: {},
|
15
17
|
block: { type: Boolean },
|
16
18
|
disabled: { type: Boolean },
|
17
19
|
eager: { type: Boolean },
|
@@ -25,8 +27,8 @@ const re = /* @__PURE__ */ M({
|
|
25
27
|
width: {}
|
26
28
|
},
|
27
29
|
emits: ["shown", "hidden"],
|
28
|
-
setup(
|
29
|
-
const
|
30
|
+
setup($, { expose: C, emit: T }) {
|
31
|
+
const o = $, s = T, { t: B } = X(), { id: L } = G(), p = `bbp_${L.value}`, r = n(), l = n(), { activate: P, deactivate: m } = j(l, {
|
30
32
|
/**
|
31
33
|
* This traps all clicks outside so we are pressing
|
32
34
|
* the trigger we just allow and process that in its
|
@@ -36,11 +38,11 @@ const re = /* @__PURE__ */ M({
|
|
36
38
|
*/
|
37
39
|
clickOutsideDeactivates: (e) => {
|
38
40
|
var h;
|
39
|
-
const
|
40
|
-
return
|
41
|
+
const t = e.target;
|
42
|
+
return t instanceof HTMLElement && (h = r.value) != null && h.contains(t) || (i(), s("hidden")), !0;
|
41
43
|
},
|
42
|
-
escapeDeactivates: () => (
|
43
|
-
await
|
44
|
+
escapeDeactivates: () => (R(async () => {
|
45
|
+
await i(), u(), s("hidden");
|
44
46
|
}), !0),
|
45
47
|
/* We don't return focus so that when
|
46
48
|
* we press a button on tyhe page we can focus
|
@@ -48,77 +50,77 @@ const re = /* @__PURE__ */ M({
|
|
48
50
|
*/
|
49
51
|
returnFocusOnDeactivate: !1
|
50
52
|
});
|
51
|
-
|
53
|
+
J(
|
52
54
|
r,
|
53
55
|
async ([{ intersectionRatio: e }]) => {
|
54
|
-
e !== 1 && a.value && (m(), await
|
56
|
+
e !== 1 && a.value && (m(), await i(), s("hidden"));
|
55
57
|
},
|
56
58
|
{ threshold: [0, 1] }
|
57
59
|
);
|
58
|
-
const
|
60
|
+
const D = v(() => ({
|
59
61
|
class: {
|
60
|
-
"bb-popover--block":
|
61
|
-
[`bb-popover--${
|
62
|
+
"bb-popover--block": o.block,
|
63
|
+
[`bb-popover--${o.theme}`]: !0
|
62
64
|
}
|
63
|
-
})),
|
64
|
-
|
65
|
-
},
|
65
|
+
})), N = n(!1), d = n(!1), a = n(!1), b = n(!1), g = n(!0), E = async () => {
|
66
|
+
N.value = !0, await K(() => !!l.value), a.value = !0;
|
67
|
+
}, i = async () => {
|
66
68
|
a.value = !1;
|
67
|
-
},
|
69
|
+
}, w = async () => {
|
68
70
|
if (a.value) {
|
69
|
-
await
|
71
|
+
await i(), u(), s("hidden");
|
70
72
|
return;
|
71
73
|
}
|
72
|
-
if (d.value ||
|
74
|
+
if (d.value || o.disabled) return;
|
73
75
|
await E();
|
74
|
-
let e =
|
76
|
+
let e = o.focusTarget ?? ".bb-popover__close";
|
75
77
|
P({
|
76
|
-
onPostActivate:
|
77
|
-
if (
|
78
|
-
const
|
79
|
-
|
78
|
+
onPostActivate: Y(() => {
|
79
|
+
if (l.value) {
|
80
|
+
const t = l.value.querySelector(e);
|
81
|
+
t instanceof HTMLElement && (t.focus(), s("shown"));
|
80
82
|
}
|
81
83
|
}, 150)
|
82
84
|
});
|
83
85
|
}, u = () => {
|
84
|
-
var
|
85
|
-
const e = (
|
86
|
+
var t;
|
87
|
+
const e = (t = r.value) == null ? void 0 : t.querySelector(`[aria-controls=popover_${p}]`);
|
86
88
|
e instanceof HTMLElement && e.focus({ preventScroll: !0 });
|
87
89
|
}, f = async () => {
|
88
|
-
m(), await
|
89
|
-
},
|
90
|
-
if (
|
90
|
+
m(), await i(), u(), s("hidden");
|
91
|
+
}, M = v(() => {
|
92
|
+
if (o.width) {
|
91
93
|
let e;
|
92
|
-
if (typeof
|
93
|
-
if (
|
94
|
+
if (typeof o.width == "string" && Number.isNaN(Number(o.width)))
|
95
|
+
if (o.width.includes("%")) {
|
94
96
|
if (!r.value) return;
|
95
|
-
e = `${r.value.clientWidth * (+
|
97
|
+
e = `${r.value.clientWidth * (+o.width.replace("%", "") / 100)}`;
|
96
98
|
} else
|
97
|
-
e =
|
99
|
+
e = o.width;
|
98
100
|
else
|
99
|
-
e = `${
|
101
|
+
e = `${o.width}`;
|
100
102
|
return `${e}px`;
|
101
103
|
}
|
102
104
|
});
|
103
|
-
return
|
104
|
-
open:
|
105
|
+
return C({
|
106
|
+
open: w,
|
105
107
|
close: f,
|
106
108
|
closed: v(() => !a.value)
|
107
|
-
}), (e,
|
108
|
-
|
109
|
+
}), (e, t) => (y(), S("span", F({ class: "bb-popover" }, D.value), [
|
110
|
+
c("span", {
|
109
111
|
ref_key: "wrapper",
|
110
112
|
ref: r,
|
111
113
|
class: "bb-popover__wrapper"
|
112
114
|
}, [
|
113
|
-
|
115
|
+
k(e.$slots, "activator", H(V({
|
114
116
|
props: {
|
115
|
-
"aria-controls": `popover_${
|
117
|
+
"aria-controls": `popover_${p}`,
|
116
118
|
"aria-expanded": a.value,
|
117
|
-
onClick:
|
118
|
-
id:
|
119
|
+
onClick: w,
|
120
|
+
id: p,
|
119
121
|
disabled: !!e.disabled
|
120
122
|
},
|
121
|
-
closed:
|
123
|
+
closed: g.value,
|
122
124
|
closing: b.value,
|
123
125
|
disabled: !!e.disabled,
|
124
126
|
open: a.value,
|
@@ -126,12 +128,12 @@ const re = /* @__PURE__ */ M({
|
|
126
128
|
placement: e.placement
|
127
129
|
})))
|
128
130
|
], 512),
|
129
|
-
|
131
|
+
q(U, {
|
130
132
|
"arrow-padding": e.arrowPadding,
|
131
133
|
"base-class": "bb-popover",
|
132
134
|
"container-attributes": {
|
133
|
-
id: `popover_${
|
134
|
-
style: { width:
|
135
|
+
id: `popover_${p}`,
|
136
|
+
style: { width: M.value }
|
135
137
|
},
|
136
138
|
eager: e.eager,
|
137
139
|
offset: e.offset,
|
@@ -142,37 +144,37 @@ const re = /* @__PURE__ */ M({
|
|
142
144
|
"transition-duration": e.transitionDuration,
|
143
145
|
wrapper: r.value
|
144
146
|
}, {
|
145
|
-
default:
|
146
|
-
|
147
|
+
default: _(() => [
|
148
|
+
c("div", {
|
147
149
|
ref_key: "content",
|
148
|
-
ref:
|
150
|
+
ref: l,
|
149
151
|
class: "bb-popover__content"
|
150
152
|
}, [
|
151
|
-
e.showClose ? (
|
153
|
+
e.showClose ? (y(), I(Q, {
|
152
154
|
key: 0,
|
153
155
|
class: "bb-popover__close",
|
154
156
|
onClick: f
|
155
157
|
}, {
|
156
|
-
default:
|
157
|
-
|
158
|
-
|
158
|
+
default: _(() => [
|
159
|
+
c("span", Z, W(e.closeLabel || z(B)("common.closeLabel").value), 1),
|
160
|
+
t[0] || (t[0] = c("svg", {
|
159
161
|
fill: "none",
|
160
162
|
viewBox: "0 0 24 24",
|
161
163
|
xmlns: "http://www.w3.org/2000/svg"
|
162
164
|
}, [
|
163
|
-
|
165
|
+
c("path", {
|
164
166
|
d: "M23 23L1 1M23 1L1 23",
|
165
167
|
stroke: "currentColor",
|
166
168
|
"stroke-linecap": "round",
|
167
169
|
"stroke-width": "2"
|
168
170
|
})
|
169
|
-
], -1)
|
170
|
-
])
|
171
|
+
], -1))
|
172
|
+
]),
|
171
173
|
_: 1
|
172
|
-
})) :
|
173
|
-
|
174
|
+
})) : A("", !0),
|
175
|
+
k(e.$slots, "default", {
|
174
176
|
close: f,
|
175
|
-
closed:
|
177
|
+
closed: g.value,
|
176
178
|
closing: b.value,
|
177
179
|
disabled: !!e.disabled,
|
178
180
|
open: a.value,
|
@@ -187,5 +189,5 @@ const re = /* @__PURE__ */ M({
|
|
187
189
|
}
|
188
190
|
});
|
189
191
|
export {
|
190
|
-
|
192
|
+
pe as default
|
191
193
|
};
|