bitboss-ui 0.2.7 → 0.2.8
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/index101.js +3 -3
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +4 -4
- package/dist/index113.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index128.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +9 -9
- package/dist/index19.js +59 -59
- package/dist/index19.js.map +1 -1
- package/dist/index195.js +2 -3
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -35
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -6
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +3 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +35 -2
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +6 -4
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +324 -208
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +131 -348
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +5 -134
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +19 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -19
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +2 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +186 -2
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +23 -186
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +369 -23
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +3 -369
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +3 -16
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +235 -16
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +2 -20
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +10 -29
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +2 -8
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +16 -3
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +16 -3
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +20 -2
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +29 -2
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +8 -10
- package/dist/index220.js.map +1 -1
- package/dist/index222.js +4 -4
- package/dist/index223.js +1 -1
- package/dist/index225.js +1 -1
- package/dist/index226.js +3 -434
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +428 -82
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +89 -2
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +6 -200
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +2 -4
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +294 -5
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -2
- package/dist/index233.js +2 -295
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +117 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +106 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +199 -116
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -106
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +69 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +162 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index242.js +1 -1
- package/dist/index243.js +1 -1
- package/dist/index244.js +2 -162
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +2 -2
- package/dist/index246.js +2 -69
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +2 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +1 -1
- package/dist/index25.js +2 -2
- package/dist/index252.js +1 -1
- package/dist/index253.js +2 -2
- package/dist/index29.js +3 -3
- package/dist/index31.js +6 -6
- package/dist/index33.js +2 -2
- package/dist/index35.js +2 -2
- package/dist/index47.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index65.js +3 -3
- package/dist/index72.js +1 -1
- package/dist/index75.js +34 -34
- package/dist/index75.js.map +1 -1
- package/dist/index79.js +3 -3
- package/dist/index81.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index246.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index246.js","sources":[
|
|
1
|
+
{"version":3,"file":"index246.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index247.js
CHANGED
package/dist/index247.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index247.js","sources":[
|
|
1
|
+
{"version":3,"file":"index247.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index248.js
CHANGED
package/dist/index25.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, computed as n, ref as _, openBlock as w, createElementBlock as B, normalizeClass as C, createElementVNode as l, normalizeProps as t, guardReactiveProps as u, renderSlot as V } from "vue";
|
|
2
|
-
import { isCssColor as i } from "./
|
|
3
|
-
import { when as E } from "./
|
|
2
|
+
import { isCssColor as i } from "./index196.js";
|
|
3
|
+
import { when as E } from "./index197.js";
|
|
4
4
|
const N = {
|
|
5
5
|
class: "bb-base-radio-container",
|
|
6
6
|
"aria-hidden": "true"
|
package/dist/index252.js
CHANGED
package/dist/index253.js
CHANGED
package/dist/index29.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as C, ref as b, computed as f, openBlock as l, createElementBlock as i, mergeProps as g, createElementVNode as r, Fragment as I, renderList as V, normalizeClass as B, toDisplayString as h, renderSlot as x } from "vue";
|
|
2
|
-
import { booleanishToBoolean as M } from "./
|
|
3
|
-
import { identity as F } from "./
|
|
4
|
-
import { isCssColor as p } from "./
|
|
2
|
+
import { booleanishToBoolean as M } from "./index213.js";
|
|
3
|
+
import { identity as F } from "./index205.js";
|
|
4
|
+
import { isCssColor as p } from "./index196.js";
|
|
5
5
|
import { isNotNil as T } from "./index124.js";
|
|
6
6
|
const H = { class: "bb-base-rating__inner-container" }, D = { class: "bb-base-rating__label-text" }, N = ["autofocus", "checked", "disabled", "id", "name", "value"], j = ["width", "height"], A = /* @__PURE__ */ r("path", {
|
|
7
7
|
"stroke-linecap": "round",
|
package/dist/index31.js
CHANGED
|
@@ -3,17 +3,17 @@ import Pe from "./index115.js";
|
|
|
3
3
|
import "./index157.js";
|
|
4
4
|
import He from "./index119.js";
|
|
5
5
|
import "./index184.js";
|
|
6
|
-
import { autoUpdate as je, computePosition as Qe } from "./
|
|
6
|
+
import { autoUpdate as je, computePosition as Qe } from "./index201.js";
|
|
7
7
|
import { deepEqual as re } from "./index123.js";
|
|
8
|
-
import { head as le } from "./
|
|
8
|
+
import { head as le } from "./index215.js";
|
|
9
9
|
import { isNotNil as I } from "./index124.js";
|
|
10
|
-
import { last as Ue } from "./
|
|
10
|
+
import { last as Ue } from "./index206.js";
|
|
11
11
|
import { useItemText as We } from "./index125.js";
|
|
12
12
|
import { useItemValue as Ke } from "./index126.js";
|
|
13
13
|
import { wait as q } from "./index122.js";
|
|
14
|
-
import { waitFor as Re } from "./
|
|
15
|
-
import { when as Ye } from "./
|
|
16
|
-
import { offset as Ze, flip as Ge, shift as Xe } from "./
|
|
14
|
+
import { waitFor as Re } from "./index200.js";
|
|
15
|
+
import { when as Ye } from "./index197.js";
|
|
16
|
+
import { offset as Ze, flip as Ge, shift as Xe } from "./index209.js";
|
|
17
17
|
const el = { class: "bb-base-select__input-container" }, ll = ["autofocus", "disabled", "id", "placeholder", "readonly", "onBlur", "onFocus", "onChange", "onInput", "onKeydown"], tl = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "bb-base-select__loading-container"
|
package/dist/index33.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as R, ref as l, onMounted as S, watchEffect as z, computed as y, openBlock as D, createElementBlock as F, mergeProps as h, renderSlot as g, createElementVNode as t, normalizeProps as H, guardReactiveProps as T, normalizeStyle as E, unref as X } from "vue";
|
|
2
|
-
import { clamp as K } from "./
|
|
3
|
-
import { isCssColor as w } from "./
|
|
2
|
+
import { clamp as K } from "./index195.js";
|
|
3
|
+
import { isCssColor as w } from "./index196.js";
|
|
4
4
|
import { isNil as O } from "./index120.js";
|
|
5
5
|
import { transposeValue as L } from "./index121.js";
|
|
6
6
|
const Y = { class: "bb-base-slider__slider-container" }, j = ["disabled", "id", "name", "readonly", "value"], q = ["aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], W = /* @__PURE__ */ R({
|
package/dist/index35.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as I, ref as b, computed as n, watch as F, openBlock as m, createElementBlock as p, normalizeClass as N, normalizeProps as c, mergeProps as h, createCommentVNode as S, createElementVNode as l, renderSlot as x, guardReactiveProps as f } from "vue";
|
|
2
|
-
import { isCssColor as V } from "./
|
|
3
|
-
import { when as A } from "./
|
|
2
|
+
import { isCssColor as V } from "./index196.js";
|
|
3
|
+
import { when as A } from "./index197.js";
|
|
4
4
|
const J = { class: "bb-base-switch-container" }, M = /* @__PURE__ */ l("span", { class: "bb-base-switch-container__icon-thumb" }, null, -1), O = [
|
|
5
5
|
M
|
|
6
6
|
], H = /* @__PURE__ */ I({
|
package/dist/index47.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, computed as u, ref as d, watch as f, openBlock as a, createElementBlock as l, normalizeProps as b, guardReactiveProps as z, createElementVNode as v, renderSlot as g, createCommentVNode as h } from "vue";
|
|
2
|
-
import { isCssColor as _ } from "./
|
|
2
|
+
import { isCssColor as _ } from "./index196.js";
|
|
3
3
|
const k = { class: "bb-avatar__fallback" }, C = ["alt", "src", "srcset", "sizes"], B = /* @__PURE__ */ p({
|
|
4
4
|
__name: "BbAvatar",
|
|
5
5
|
props: {
|
package/dist/index49.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, useSlots as d, computed as n, openBlock as m, createElementBlock as u, normalizeClass as g, createElementVNode as s, renderSlot as l, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
|
|
2
|
-
import { isCssColor as r } from "./
|
|
2
|
+
import { isCssColor as r } from "./index196.js";
|
|
3
3
|
import { isNil as B } from "./index120.js";
|
|
4
4
|
const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, S = /* @__PURE__ */ p({
|
|
5
5
|
__name: "BbBadge",
|
package/dist/index65.js
CHANGED
|
@@ -5,9 +5,9 @@ import { useId as de } from "./index7.js";
|
|
|
5
5
|
import { wait as U } from "./index122.js";
|
|
6
6
|
import ce from "./index9.js";
|
|
7
7
|
import "./index10.js";
|
|
8
|
-
import V from "./
|
|
9
|
-
import { autoUpdate as fe } from "./
|
|
10
|
-
import { flip as pe, offset as be, shift as me } from "./
|
|
8
|
+
import V from "./index208.js";
|
|
9
|
+
import { autoUpdate as fe } from "./index201.js";
|
|
10
|
+
import { flip as pe, offset as be, shift as me } from "./index209.js";
|
|
11
11
|
const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-container" }, Me = /* @__PURE__ */ Y({
|
|
12
12
|
__name: "BbDropdown",
|
|
13
13
|
props: {
|
package/dist/index72.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, openBlock as g, createBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
|
|
2
|
-
import { throttle as c } from "./
|
|
2
|
+
import { throttle as c } from "./index198.js";
|
|
3
3
|
const M = /* @__PURE__ */ h({
|
|
4
4
|
__name: "BbIntersection",
|
|
5
5
|
props: {
|
package/dist/index75.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as q, ref as s, useAttrs as G, computed as
|
|
2
|
-
import { useFocusTrap as oe } from "./
|
|
1
|
+
import { defineComponent as q, ref as s, useAttrs as G, computed as m, onMounted as J, watch as Q, onBeforeUnmount as X, openBlock as y, createBlock as Y, Teleport as Z, createElementVNode as o, mergeProps as N, createElementBlock as w, renderSlot as l, createTextVNode as ee, toDisplayString as z, createCommentVNode as B, nextTick as te } from "vue";
|
|
2
|
+
import { useFocusTrap as oe } from "./index199.js";
|
|
3
3
|
import { useId as L } from "./index7.js";
|
|
4
4
|
import { wait as O } from "./index122.js";
|
|
5
5
|
const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__content" }, ne = { class: "bb-offcanvas-close__label" }, le = /* @__PURE__ */ o("span", { class: "bb-offcanvas-close__icon" }, [
|
|
@@ -37,15 +37,15 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["shown", "hidden", "update:modelValue"],
|
|
39
39
|
setup(x, { emit: E }) {
|
|
40
|
-
const e = x,
|
|
40
|
+
const e = x, c = E, h = `title_${L().id.value}`, _ = `description_${L().id.value}`, d = s(null), V = s(null), S = s(null), T = s(null), A = s(null), M = s(null), W = G(), { activate: R, deactivate: I } = oe(V, {
|
|
41
41
|
clickOutsideDeactivates: !0,
|
|
42
42
|
/* On esc deactivate the trap, return focus and then close the modal */
|
|
43
43
|
escapeDeactivates: () => (te(() => {
|
|
44
|
-
|
|
44
|
+
c("update:modelValue", !1);
|
|
45
45
|
}), !0)
|
|
46
|
-
}), $ =
|
|
46
|
+
}), $ = m(() => e.closeLabel), f = s(!1), i = s(!1), g = s(!0), u = s(!1), v = s(e.eager || e.modelValue), C = s(null), F = m(() => i.value || u.value);
|
|
47
47
|
J(() => {
|
|
48
|
-
e.modelValue && D();
|
|
48
|
+
e.modelValue && !(f.value || i.value) && D();
|
|
49
49
|
}), Q(
|
|
50
50
|
() => e.modelValue,
|
|
51
51
|
() => {
|
|
@@ -61,33 +61,33 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
61
61
|
});
|
|
62
62
|
const D = async () => {
|
|
63
63
|
if (e.modelValue) {
|
|
64
|
-
|
|
64
|
+
v.value || (v.value = !0), document.activeElement && (C.value = document.activeElement), g.value = !1, u.value = !1, i.value = !0;
|
|
65
65
|
let t = Number(
|
|
66
66
|
document.body.dataset.openCanvases ?? "0"
|
|
67
67
|
);
|
|
68
68
|
t++, document.body.dataset.openCanvases = t.toString();
|
|
69
69
|
const a = window.innerWidth - document.documentElement.clientWidth;
|
|
70
|
-
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${a}px`, await O(e.transitionDuration),
|
|
70
|
+
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${a}px`, await O(e.transitionDuration), i.value = !1, f.value = !0, c("shown"), R();
|
|
71
71
|
} else {
|
|
72
|
-
I(),
|
|
72
|
+
I(), i.value = !1, f.value = !1, u.value = !0, await O(e.transitionDuration);
|
|
73
73
|
let t = Number(
|
|
74
74
|
document.body.dataset.openCanvases ?? "0"
|
|
75
75
|
);
|
|
76
|
-
t--, document.body.dataset.openCanvases = t.toString(), t || (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px"), u.value = !1, g.value = !0,
|
|
76
|
+
t--, document.body.dataset.openCanvases = t.toString(), t || (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px"), u.value = !1, g.value = !0, c("hidden"), C.value instanceof HTMLElement && C.value.focus();
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, p = (t) => {
|
|
79
79
|
t.target === d.value && t.preventDefault();
|
|
80
80
|
}, H = (t) => {
|
|
81
|
-
e.disabled || F.value || d.value && t.target === d.value && (e.persistent ||
|
|
81
|
+
e.disabled || F.value || d.value && t.target === d.value && (e.persistent || c("update:modelValue", !1));
|
|
82
82
|
}, k = () => {
|
|
83
|
-
e.disabled ||
|
|
84
|
-
}, K =
|
|
83
|
+
e.disabled || c("update:modelValue", !1);
|
|
84
|
+
}, K = m(() => {
|
|
85
85
|
const t = [
|
|
86
86
|
{
|
|
87
87
|
"bb-offcanvas bb-offcanvas__overlay": !0,
|
|
88
88
|
"bb-offcanvas--fullscreen": e.fullscreen,
|
|
89
|
-
"bb-offcanvas--open":
|
|
90
|
-
"bb-offcanvas--opening":
|
|
89
|
+
"bb-offcanvas--open": f.value,
|
|
90
|
+
"bb-offcanvas--opening": i.value,
|
|
91
91
|
"bb-offcanvas--closed": g.value,
|
|
92
92
|
"bb-offcanvas--closing": u.value,
|
|
93
93
|
[`bb-offcanvas--transition-${e.transition}`]: !0,
|
|
@@ -96,10 +96,10 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
96
96
|
e.overlayClasses
|
|
97
97
|
].flat(), a = {
|
|
98
98
|
onClick: H,
|
|
99
|
-
onScroll:
|
|
100
|
-
onTouchmove:
|
|
101
|
-
onWheel:
|
|
102
|
-
onKeydown:
|
|
99
|
+
onScroll: p,
|
|
100
|
+
onTouchmove: p,
|
|
101
|
+
onWheel: p,
|
|
102
|
+
onKeydown: p
|
|
103
103
|
}, n = {
|
|
104
104
|
transitionDuration: e.transitionDuration / 1e3 + "s"
|
|
105
105
|
};
|
|
@@ -109,7 +109,7 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
109
109
|
...a,
|
|
110
110
|
...W
|
|
111
111
|
};
|
|
112
|
-
}), P =
|
|
112
|
+
}), P = m(() => {
|
|
113
113
|
const t = [
|
|
114
114
|
{
|
|
115
115
|
"bb-offcanvas__panel": !0,
|
|
@@ -120,18 +120,18 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
120
120
|
role: "dialog",
|
|
121
121
|
"aria-modal": !0
|
|
122
122
|
};
|
|
123
|
-
|
|
124
|
-
let n, U,
|
|
125
|
-
const
|
|
123
|
+
v.value && (a["aria-labelledby"] = h, e.description && (a["aria-describedby"] = _));
|
|
124
|
+
let n, U, r;
|
|
125
|
+
const b = {
|
|
126
126
|
sm: 384,
|
|
127
127
|
md: 652,
|
|
128
128
|
lg: 896
|
|
129
129
|
};
|
|
130
|
-
e.direction === "left" || e.direction === "right" ? e.fullscreen ? n = "100%" : typeof e.size == "number" ? n = e.size + "px" : e.size in
|
|
130
|
+
e.direction === "left" || e.direction === "right" ? e.fullscreen ? n = "100%" : typeof e.size == "number" ? n = e.size + "px" : e.size in b ? n = b[e.size] + "px" : n = e.size + "px" : e.fullscreen ? r = "100%" : typeof e.size == "number" ? r = e.size + "px" : e.size in b ? r = b[e.size] + "px" : Number.isNaN(Number(e.size)) ? e.size === "auto" && (r = "auto") : r = e.size + "px";
|
|
131
131
|
const j = {
|
|
132
132
|
maxWidth: n,
|
|
133
133
|
maxHeight: U,
|
|
134
|
-
height:
|
|
134
|
+
height: r,
|
|
135
135
|
transitionDuration: e.transitionDuration / 1e3 + "s"
|
|
136
136
|
};
|
|
137
137
|
return {
|
|
@@ -140,7 +140,7 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
140
140
|
...a
|
|
141
141
|
};
|
|
142
142
|
});
|
|
143
|
-
return (t, a) => (
|
|
143
|
+
return (t, a) => (y(), Y(Z, { to: "body" }, [
|
|
144
144
|
o("div", N(K.value, {
|
|
145
145
|
ref_key: "overlay",
|
|
146
146
|
ref: d
|
|
@@ -149,7 +149,7 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
149
149
|
ref_key: "panel",
|
|
150
150
|
ref: V
|
|
151
151
|
}), [
|
|
152
|
-
|
|
152
|
+
v.value ? (y(), w("div", {
|
|
153
153
|
key: 0,
|
|
154
154
|
class: "bb-offcanvas__content",
|
|
155
155
|
ref_key: "content",
|
|
@@ -162,20 +162,20 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
162
162
|
ref: T
|
|
163
163
|
}, [
|
|
164
164
|
l(t.$slots, "header", {
|
|
165
|
-
titleId:
|
|
165
|
+
titleId: h,
|
|
166
166
|
close: k,
|
|
167
167
|
title: t.title
|
|
168
168
|
}, () => [
|
|
169
169
|
o("span", {
|
|
170
170
|
class: "bb-offcanvas__title",
|
|
171
|
-
id:
|
|
171
|
+
id: h
|
|
172
172
|
}, [
|
|
173
173
|
l(t.$slots, "title", { text: t.title }, () => [
|
|
174
174
|
ee(z(t.title), 1)
|
|
175
175
|
])
|
|
176
176
|
]),
|
|
177
177
|
o("span", se, [
|
|
178
|
-
t.showClose ? (
|
|
178
|
+
t.showClose ? (y(), w("button", {
|
|
179
179
|
key: 0,
|
|
180
180
|
onClick: k,
|
|
181
181
|
type: "button"
|
|
@@ -196,12 +196,12 @@ const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__c
|
|
|
196
196
|
ref: A
|
|
197
197
|
}, [
|
|
198
198
|
l(t.$slots, "description", {
|
|
199
|
-
descriptionId:
|
|
199
|
+
descriptionId: _,
|
|
200
200
|
text: t.description
|
|
201
201
|
}, () => [
|
|
202
|
-
t.description ? (
|
|
202
|
+
t.description ? (y(), w("div", {
|
|
203
203
|
key: 0,
|
|
204
|
-
id:
|
|
204
|
+
id: _,
|
|
205
205
|
class: "bb-offcanvas__description"
|
|
206
206
|
}, z(t.description), 1)) : B("", !0)
|
|
207
207
|
]),
|
package/dist/index75.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index75.js","sources":["../src/components/BbOffCanvas/BbOffCanvas.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-offcanvas-close\" }\nconst _hoisted_2 = { class: \"bb-offcanvas-close__content\" }\nconst _hoisted_3 = { class: \"bb-offcanvas-close__label\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-offcanvas-close__icon\" }, [\n /*#__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 ])\n], -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex\":\"10000 10000 0%\"} }, null, -1)\n\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useAttrs, watch } from \"vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport type { CommonProps, Size } from \"@/types/CommonProps\";\n\nexport type Sizes = {\n sm: number;\n md: number;\n lg: number;\n};\n\nexport type BbOffCanvasProps = Pick<\n CommonProps,\n | \"closeLabel\"\n | \"compact\"\n | \"disabled\"\n | \"eager\"\n | \"panelClasses\"\n | \"overlayClasses\"\n | \"persistent\"\n | \"showClose\"\n | \"title\"\n | \"transition\"\n | \"transitionDuration\"\n> &\n Size<Sizes> & {\n /**\n * Description of the content of the modal. Extremely useful for accessibility reasons.\n */\n description?: string;\n /**\n * Displays the modala as fulscreen with no margin to the page\n */\n fullscreen?: boolean;\n /**\n * Defines the state open / closed of the modal.\n */\n modelValue?: boolean | null;\n /**\n * Defines the direction the offcanvas should appear from\n */\n direction?: \"left\" | \"top\" | \"right\" | \"bottom\";\n };\n\nexport type BbOffCanvasEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n (e: \"update:modelValue\", value: boolean): void;\n};\n\nexport type BbOffCanvasSlots = {\n header?: (props: {\n titleId: typeof titleId;\n close: typeof onCloseClick;\n title: BbOffCanvasProps[\"title\"];\n }) => any;\n title?: (props: { text: BbOffCanvasProps[\"title\"] }) => any;\n close?: (props: { text: BbOffCanvasProps[\"closeLabel\"] }) => any;\n description?: (props: {\n descriptionId: typeof descriptionId;\n text: BbOffCanvasProps[\"description\"];\n }) => any;\n default?: (props: {}) => any;\n content?: (props: { close: typeof onCloseClick }) => any;\n footer?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbOffCanvas',\n props: {\n closeLabel: { default: \"Chiudi\" },\n compact: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n panelClasses: { default: () => [] },\n overlayClasses: { default: () => [] },\n persistent: { type: Boolean },\n showClose: { type: Boolean, default: true },\n title: {},\n transition: { default: \"fade\" },\n transitionDuration: { default: 350 },\n size: { default: \"sm\" },\n description: {},\n fullscreen: { type: Boolean },\n modelValue: { type: [Boolean, null] },\n direction: { default: \"left\" }\n },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst attrs = useAttrs();\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n clickOutsideDeactivates: true,\n /* On esc deactivate the trap, return focus and then close the modal */\n escapeDeactivates: () => {\n nextTick(() => {\n emit(\"update:modelValue\", false);\n });\n return true;\n },\n});\n\nconst closeLabel = computed(() => props.closeLabel);\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\nconst lastFocusedElement = ref<Element | null>(null);\n\nconst busy = computed(() => opening.value || closing.value);\n\nonMounted(() => {\n if (props.modelValue) {\n alignToModelValue();\n }\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n () => props.modelValue,\n () => {\n alignToModelValue();\n }\n);\nonBeforeUnmount(() => {\n if (props.modelValue) {\n let currentlyOpenCanvases = Number(\n document.body.dataset[\"openCanvases\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenCanvases--;\n document.body.dataset[\"openCanvases\"] = currentlyOpenCanvases.toString();\n if (!currentlyOpenCanvases) {\n document.body.style.overflow = \"auto\";\n document.body.style.paddingRight = \"0px\";\n }\n }\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n if (props.modelValue) {\n if (!hasRenderedAtLeastOnce.value) {\n hasRenderedAtLeastOnce.value = true;\n }\n if (document.activeElement) {\n lastFocusedElement.value = document.activeElement;\n }\n\n closed.value = false;\n closing.value = false;\n opening.value = true;\n\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\n let currentlyOpenCanvases = Number(\n document.body.dataset[\"openCanvases\"] ?? \"0\"\n );\n currentlyOpenCanvases++;\n document.body.dataset[\"openCanvases\"] = currentlyOpenCanvases.toString();\n const scrollBarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n document.body.style.overflow = \"hidden\";\n document.body.style.paddingRight = `${scrollBarWidth}px`;\n\n await wait(props.transitionDuration);\n\n opening.value = false;\n open.value = true;\n emit(\"shown\");\n activate();\n } else {\n deactivate();\n opening.value = false;\n open.value = false;\n closing.value = true;\n\n await wait(props.transitionDuration);\n\n let currentlyOpenCanvases = Number(\n document.body.dataset[\"openCanvases\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenCanvases--;\n document.body.dataset[\"openCanvases\"] = currentlyOpenCanvases.toString();\n if (!currentlyOpenCanvases) {\n document.body.style.overflow = \"auto\";\n document.body.style.paddingRight = \"0px\";\n }\n closing.value = false;\n closed.value = true;\n emit(\"hidden\");\n if (lastFocusedElement.value instanceof HTMLElement) {\n lastFocusedElement.value.focus();\n }\n }\n};\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: UIEvent) => {\n if (event.target === overlay.value) {\n event.preventDefault();\n }\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n if (props.disabled || busy.value) return;\n if (overlay.value) {\n if (event.target === overlay.value) {\n if (!props.persistent) {\n emit(\"update:modelValue\", false);\n }\n }\n }\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n if (props.disabled) return;\n emit(\"update:modelValue\", false);\n};\n\nconst overlayAttributes = computed(() => {\n const classes = [\n {\n \"bb-offcanvas bb-offcanvas__overlay\": true,\n \"bb-offcanvas--fullscreen\": props.fullscreen,\n \"bb-offcanvas--open\": open.value,\n \"bb-offcanvas--opening\": opening.value,\n \"bb-offcanvas--closed\": closed.value,\n \"bb-offcanvas--closing\": closing.value,\n [`bb-offcanvas--transition-${props.transition}`]: true,\n [`bb-offcanvas--${props.direction}`]: true,\n },\n props.overlayClasses,\n ].flat();\n const eventListeners = {\n onClick: onOverlayClick,\n onScroll: onOverlayScroll,\n onTouchmove: onOverlayScroll,\n onWheel: onOverlayScroll,\n onKeydown: onOverlayScroll,\n };\n\n const style = {\n transitionDuration: props.transitionDuration / 1000 + \"s\",\n };\n return {\n class: classes,\n style,\n ...eventListeners,\n ...attrs,\n };\n});\n\nconst panelAttributes = computed(() => {\n const classes = [\n {\n \"bb-offcanvas__panel\": true,\n \"bb-offcanvas__panel--compact\": props.compact,\n },\n props.panelClasses,\n ].flat();\n\n const accessibilityAttrs: {\n [key: string]: string | boolean;\n } = {\n role: \"dialog\",\n \"aria-modal\": true,\n };\n\n if (hasRenderedAtLeastOnce.value) {\n accessibilityAttrs[\"aria-labelledby\"] = titleId;\n\n if (props.description)\n accessibilityAttrs[\"aria-describedby\"] = descriptionId;\n }\n\n let maxWidth;\n let maxHeight;\n let height;\n const sizes: Sizes = {\n sm: 384,\n md: 652,\n lg: 896,\n };\n if (props.direction === \"left\" || props.direction === \"right\") {\n if (props.fullscreen) maxWidth = \"100%\";\n else if (typeof props.size === \"number\") maxWidth = props.size + \"px\";\n else if (props.size in sizes)\n maxWidth = sizes[props.size as keyof Sizes] + \"px\";\n else maxWidth = props.size + \"px\";\n } else {\n if (props.fullscreen) height = \"100%\";\n else if (typeof props.size === \"number\") height = props.size + \"px\";\n else if (props.size in sizes)\n height = sizes[props.size as keyof Sizes] + \"px\";\n else if (!Number.isNaN(Number(props.size))) height = props.size + \"px\";\n else if (props.size === \"auto\") height = \"auto\";\n }\n\n const style = {\n maxWidth,\n maxHeight,\n height,\n transitionDuration: props.transitionDuration / 1000 + \"s\",\n };\n\n return {\n class: classes,\n style,\n ...accessibilityAttrs,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"div\", _mergeProps(overlayAttributes.value, {\n ref_key: \"overlay\",\n ref: overlay\n }), [\n _createElementVNode(\"div\", _mergeProps(panelAttributes.value, {\n ref_key: \"panel\",\n ref: panel\n }), [\n (hasRenderedAtLeastOnce.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"bb-offcanvas__content\",\n ref_key: \"content\",\n ref: content\n }, [\n _renderSlot(_ctx.$slots, \"content\", { close: onCloseClick }, () => [\n _createElementVNode(\"div\", {\n class: \"bb-offcanvas__header\",\n ref_key: \"header\",\n ref: header\n }, [\n _renderSlot(_ctx.$slots, \"header\", {\n titleId: titleId,\n close: onCloseClick,\n title: _ctx.title\n }, () => [\n _createElementVNode(\"span\", {\n class: \"bb-offcanvas__title\",\n id: titleId\n }, [\n _renderSlot(_ctx.$slots, \"title\", { text: _ctx.title }, () => [\n _createTextVNode(_toDisplayString(_ctx.title), 1)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.showClose)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: onCloseClick,\n type: \"button\"\n }, [\n _renderSlot(_ctx.$slots, \"close\", { text: closeLabel.value }, () => [\n _createElementVNode(\"span\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(closeLabel.value), 1),\n _hoisted_4\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ], 512),\n _createElementVNode(\"div\", {\n class: \"bb-offcanvas__body\",\n ref_key: \"body\",\n ref: body\n }, [\n _renderSlot(_ctx.$slots, \"description\", {\n descriptionId: descriptionId,\n text: _ctx.description\n }, () => [\n (_ctx.description)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n id: descriptionId,\n class: \"bb-offcanvas__description\"\n }, _toDisplayString(_ctx.description), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _renderSlot(_ctx.$slots, \"default\")\n ], 512),\n _hoisted_5,\n _createElementVNode(\"div\", {\n class: \"bb-offcanvas__footer\",\n ref_key: \"footer\",\n ref: footer\n }, [\n _renderSlot(_ctx.$slots, \"footer\")\n ], 512)\n ])\n ], 512))\n : _createCommentVNode(\"\", true)\n ], 16)\n ], 16)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_createElementVNode","_hoisted_5","_sfc_main","_defineComponent","__props","__emit","props","emit","titleId","useId","descriptionId","overlay","ref","panel","content","header","body","footer","attrs","useAttrs","activate","deactivate","useFocusTrap","nextTick","closeLabel","computed","open","opening","closed","closing","hasRenderedAtLeastOnce","lastFocusedElement","busy","onMounted","alignToModelValue","watch","onBeforeUnmount","currentlyOpenCanvases","scrollBarWidth","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","maxHeight","height","sizes","_ctx","_cache","_openBlock","_createBlock","_Teleport","_mergeProps","_createElementBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;AAGA,MAAMA,KAAa,EAAE,OAAO,wBACtBC,KAAa,EAAE,OAAO,iCACtBC,KAAa,EAAE,OAAO,+BACtBC,KAA8CC,gBAAAA,EAAA,QAAQ,EAAE,OAAO,8BAA8B;AAAA,oBAChE,OAAO;AAAA,IACtC,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EAAA,GACN;AAAA,sBACgC,QAAQ;AAAA,MACvC,GAAG;AAAA,MACH,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,IAAA,CACnB;AAAA,EAAA,CACF;AACH,GAAG,EAAE,GACCC,KAA8CD,gBAAAA,EAAA,OAAO,EAAE,OAAO,EAAC,MAAO,mBAAqB,GAAA,MAAM,EAAE,GAuE7EE,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,SAAS;AAAA,IAChC,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,cAAc,EAAE,SAAS,MAAM,GAAG;AAAA,IAClC,gBAAgB,EAAE,SAAS,MAAM,GAAG;AAAA,IACpC,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,OAAO,CAAC;AAAA,IACR,YAAY,EAAE,SAAS,OAAO;AAAA,IAC9B,oBAAoB,E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A,GAAG;AAAA,cACNhE,EAAoB,OAAO;AAAA,gBACzB,OAAO;AAAA,gBACP,SAAS;AAAA,gBACT,KAAKgB;AAAA,cAAA,GACJ;AAAA,gBACD6C,EAAYP,EAAK,QAAQ,eAAe;AAAA,kBACtC,eAAA5C;AAAA,kBACA,MAAM4C,EAAK;AAAA,gBAAA,GACV,MAAM;AAAA,kBACNA,EAAK,eACDE,KAAcI,EAAoB,OAAO;AAAA,oBACxC,KAAK;AAAA,oBACL,IAAIlD;AAAA,oBACJ,OAAO;AAAA,kBAAA,GACNqD,EAAiBT,EAAK,WAAW,GAAG,CAAC,KACxCU,EAAoB,IAAI,EAAI;AAAA,gBAAA,CACjC;AAAA,gBACDH,EAAYP,EAAK,QAAQ,SAAS;AAAA,iBACjC,GAAG;AAAA,cACNrD;AAAA,cACAD,EAAoB,OAAO;AAAA,gBACzB,OAAO;AAAA,gBACP,SAAS;AAAA,gBACT,KAAKiB;AAAA,cAAA,GACJ;AAAA,gBACD4C,EAAYP,EAAK,QAAQ,QAAQ;AAAA,iBAChC,GAAG;AAAA,YAAA,CACP;AAAA,UACA,GAAA,GAAG,KACNU,EAAoB,IAAI,EAAI;AAAA,WAC/B,EAAE;AAAA,SACJ,EAAE;AAAA,IAAA,CACN;AAAA,EAEH;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index75.js","sources":["../src/components/BbOffCanvas/BbOffCanvas.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-offcanvas-close\" }\nconst _hoisted_2 = { class: \"bb-offcanvas-close__content\" }\nconst _hoisted_3 = { class: \"bb-offcanvas-close__label\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-offcanvas-close__icon\" }, [\n /*#__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 ])\n], -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex\":\"10000 10000 0%\"} }, null, -1)\n\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useAttrs, watch } from \"vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport type { CommonProps, Size } from \"@/types/CommonProps\";\n\nexport type Sizes = {\n sm: number;\n md: number;\n lg: number;\n};\n\nexport type BbOffCanvasProps = Pick<\n CommonProps,\n | \"closeLabel\"\n | \"compact\"\n | \"disabled\"\n | \"eager\"\n | \"panelClasses\"\n | \"overlayClasses\"\n | \"persistent\"\n | \"showClose\"\n | \"title\"\n | \"transition\"\n | \"transitionDuration\"\n> &\n Size<Sizes> & {\n /**\n * Description of the content of the modal. Extremely useful for accessibility reasons.\n */\n description?: string;\n /**\n * Displays the modala as fulscreen with no margin to the page\n */\n fullscreen?: boolean;\n /**\n * Defines the state open / closed of the modal.\n */\n modelValue?: boolean | null;\n /**\n * Defines the direction the offcanvas should appear from\n */\n direction?: \"left\" | \"top\" | \"right\" | \"bottom\";\n };\n\nexport type BbOffCanvasEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n (e: \"update:modelValue\", value: boolean): void;\n};\n\nexport type BbOffCanvasSlots = {\n header?: (props: {\n titleId: typeof titleId;\n close: typeof onCloseClick;\n title: BbOffCanvasProps[\"title\"];\n }) => any;\n title?: (props: { text: BbOffCanvasProps[\"title\"] }) => any;\n close?: (props: { text: BbOffCanvasProps[\"closeLabel\"] }) => any;\n description?: (props: {\n descriptionId: typeof descriptionId;\n text: BbOffCanvasProps[\"description\"];\n }) => any;\n default?: (props: {}) => any;\n content?: (props: { close: typeof onCloseClick }) => any;\n footer?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbOffCanvas',\n props: {\n closeLabel: { default: \"Chiudi\" },\n compact: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n panelClasses: { default: () => [] },\n overlayClasses: { default: () => [] },\n persistent: { type: Boolean },\n showClose: { type: Boolean, default: true },\n title: {},\n transition: { default: \"fade\" },\n transitionDuration: { default: 350 },\n size: { default: \"sm\" },\n description: {},\n fullscreen: { type: Boolean },\n modelValue: { type: [Boolean, null] },\n direction: { default: \"left\" }\n },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst attrs = useAttrs();\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n clickOutsideDeactivates: true,\n /* On esc deactivate the trap, return focus and then close the modal */\n escapeDeactivates: () => {\n nextTick(() => {\n emit(\"update:modelValue\", false);\n });\n return true;\n },\n});\n\nconst closeLabel = computed(() => props.closeLabel);\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\nconst lastFocusedElement = ref<Element | null>(null);\n\nconst busy = computed(() => opening.value || closing.value);\n\nonMounted(() => {\n /**\n * Do not realign if open or opening\n */\n if (props.modelValue && !(open.value || opening.value)) {\n alignToModelValue();\n }\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n () => props.modelValue,\n () => {\n alignToModelValue();\n }\n);\nonBeforeUnmount(() => {\n if (props.modelValue) {\n let currentlyOpenCanvases = Number(\n document.body.dataset[\"openCanvases\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenCanvases--;\n document.body.dataset[\"openCanvases\"] = currentlyOpenCanvases.toString();\n if (!currentlyOpenCanvases) {\n document.body.style.overflow = \"auto\";\n document.body.style.paddingRight = \"0px\";\n }\n }\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n if (props.modelValue) {\n if (!hasRenderedAtLeastOnce.value) {\n hasRenderedAtLeastOnce.value = true;\n }\n if (document.activeElement) {\n lastFocusedElement.value = document.activeElement;\n }\n\n closed.value = false;\n closing.value = false;\n opening.value = true;\n\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\n let currentlyOpenCanvases = Number(\n document.body.dataset[\"openCanvases\"] ?? \"0\"\n );\n currentlyOpenCanvases++;\n document.body.dataset[\"openCanvases\"] = currentlyOpenCanvases.toString();\n const scrollBarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n document.body.style.overflow = \"hidden\";\n document.body.style.paddingRight = `${scrollBarWidth}px`;\n\n await wait(props.transitionDuration);\n\n opening.value = false;\n open.value = true;\n emit(\"shown\");\n activate();\n } else {\n deactivate();\n opening.value = false;\n open.value = false;\n closing.value = true;\n\n await wait(props.transitionDuration);\n\n let currentlyOpenCanvases = Number(\n document.body.dataset[\"openCanvases\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenCanvases--;\n document.body.dataset[\"openCanvases\"] = currentlyOpenCanvases.toString();\n if (!currentlyOpenCanvases) {\n document.body.style.overflow = \"auto\";\n document.body.style.paddingRight = \"0px\";\n }\n closing.value = false;\n closed.value = true;\n emit(\"hidden\");\n if (lastFocusedElement.value instanceof HTMLElement) {\n lastFocusedElement.value.focus();\n }\n }\n};\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: UIEvent) => {\n if (event.target === overlay.value) {\n event.preventDefault();\n }\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n if (props.disabled || busy.value) return;\n if (overlay.value) {\n if (event.target === overlay.value) {\n if (!props.persistent) {\n emit(\"update:modelValue\", false);\n }\n }\n }\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n if (props.disabled) return;\n emit(\"update:modelValue\", false);\n};\n\nconst overlayAttributes = computed(() => {\n const classes = [\n {\n \"bb-offcanvas bb-offcanvas__overlay\": true,\n \"bb-offcanvas--fullscreen\": props.fullscreen,\n \"bb-offcanvas--open\": open.value,\n \"bb-offcanvas--opening\": opening.value,\n \"bb-offcanvas--closed\": closed.value,\n \"bb-offcanvas--closing\": closing.value,\n [`bb-offcanvas--transition-${props.transition}`]: true,\n [`bb-offcanvas--${props.direction}`]: true,\n },\n props.overlayClasses,\n ].flat();\n const eventListeners = {\n onClick: onOverlayClick,\n onScroll: onOverlayScroll,\n onTouchmove: onOverlayScroll,\n onWheel: onOverlayScroll,\n onKeydown: onOverlayScroll,\n };\n\n const style = {\n transitionDuration: props.transitionDuration / 1000 + \"s\",\n };\n return {\n class: classes,\n style,\n ...eventListeners,\n ...attrs,\n };\n});\n\nconst panelAttributes = computed(() => {\n const classes = [\n {\n \"bb-offcanvas__panel\": true,\n \"bb-offcanvas__panel--compact\": props.compact,\n },\n props.panelClasses,\n ].flat();\n\n const accessibilityAttrs: {\n [key: string]: string | boolean;\n } = {\n role: \"dialog\",\n \"aria-modal\": true,\n };\n\n if (hasRenderedAtLeastOnce.value) {\n accessibilityAttrs[\"aria-labelledby\"] = titleId;\n\n if (props.description)\n accessibilityAttrs[\"aria-describedby\"] = descriptionId;\n }\n\n let maxWidth;\n let maxHeight;\n let height;\n const sizes: Sizes = {\n sm: 384,\n md: 652,\n lg: 896,\n };\n if (props.direction === \"left\" || props.direction === \"right\") {\n if (props.fullscreen) maxWidth = \"100%\";\n else if (typeof props.size === \"number\") maxWidth = props.size + \"px\";\n else if (props.size in sizes)\n maxWidth = sizes[props.size as keyof Sizes] + \"px\";\n else maxWidth = props.size + \"px\";\n } else {\n if (props.fullscreen) height = \"100%\";\n else if (typeof props.size === \"number\") height = props.size + \"px\";\n else if (props.size in sizes)\n height = sizes[props.size as keyof Sizes] + \"px\";\n else if (!Number.isNaN(Number(props.size))) height = props.size + \"px\";\n else if (props.size === \"auto\") height = \"auto\";\n }\n\n const style = {\n maxWidth,\n maxHeight,\n height,\n transitionDuration: props.transitionDuration / 1000 + \"s\",\n };\n\n return {\n class: classes,\n style,\n ...accessibilityAttrs,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"div\", _mergeProps(overlayAttributes.value, {\n ref_key: \"overlay\",\n ref: overlay\n }), [\n _createElementVNode(\"div\", _mergeProps(panelAttributes.value, {\n ref_key: \"panel\",\n ref: panel\n }), [\n (hasRenderedAtLeastOnce.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"bb-offcanvas__content\",\n ref_key: \"content\",\n ref: content\n }, [\n _renderSlot(_ctx.$slots, \"content\", { close: onCloseClick }, () => [\n _createElementVNode(\"div\", {\n class: \"bb-offcanvas__header\",\n ref_key: \"header\",\n ref: header\n }, [\n _renderSlot(_ctx.$slots, \"header\", {\n titleId: titleId,\n close: onCloseClick,\n title: _ctx.title\n }, () => [\n _createElementVNode(\"span\", {\n class: \"bb-offcanvas__title\",\n id: titleId\n }, [\n _renderSlot(_ctx.$slots, \"title\", { text: _ctx.title }, () => [\n _createTextVNode(_toDisplayString(_ctx.title), 1)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.showClose)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: onCloseClick,\n type: \"button\"\n }, [\n _renderSlot(_ctx.$slots, \"close\", { text: closeLabel.value }, () => [\n _createElementVNode(\"span\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(closeLabel.value), 1),\n _hoisted_4\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ], 512),\n _createElementVNode(\"div\", {\n class: \"bb-offcanvas__body\",\n ref_key: \"body\",\n ref: body\n }, [\n _renderSlot(_ctx.$slots, \"description\", {\n descriptionId: descriptionId,\n text: _ctx.description\n }, () => [\n (_ctx.description)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n id: descriptionId,\n class: \"bb-offcanvas__description\"\n }, _toDisplayString(_ctx.description), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _renderSlot(_ctx.$slots, \"default\")\n ], 512),\n _hoisted_5,\n _createElementVNode(\"div\", {\n class: \"bb-offcanvas__footer\",\n ref_key: \"footer\",\n ref: footer\n }, [\n _renderSlot(_ctx.$slots, \"footer\")\n ], 512)\n ])\n ], 512))\n : _createCommentVNode(\"\", true)\n ], 16)\n ], 16)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_createElementVNode","_hoisted_5","_sfc_main","_defineComponent","__props","__emit","props","emit","titleId","useId","descriptionId","overlay","ref","panel","content","header","body","footer","attrs","useAttrs","activate","deactivate","useFocusTrap","nextTick","closeLabel","computed","open","opening","closed","closing","hasRenderedAtLeastOnce","lastFocusedElement","busy","onMounted","alignToModelValue","watch","onBeforeUnmount","currentlyOpenCanvases","scrollBarWidth","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","maxHeight","height","sizes","_ctx","_cache","_openBlock","_createBlock","_Teleport","_mergeProps","_createElementBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;AAGA,MAAMA,KAAa,EAAE,OAAO,wBACtBC,KAAa,EAAE,OAAO,iCACtBC,KAAa,EAAE,OAAO,+BACtBC,KAA8CC,gBAAAA,EAAA,QAAQ,EAAE,OAAO,8BAA8B;AAAA,oBAChE,OAAO;AAAA,IACtC,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EAAA,GACN;AAAA,sBACgC,QAAQ;AAAA,MACvC,GAAG;AAAA,MACH,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,IAAA,CACnB;AAAA,EAAA,CACF;AACH,GAAG,EAAE,GACCC,KAA8CD,gBAAAA,EAAA,OAAO,EAAE,OAAO,EAAC,MAAO,mBAAqB,GAAA,MAAM,EAAE,GAuE7EE,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,SAAS;AAAA,IAChC,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,cAAc,EAAE,SAAS,MAAM,GAAG;AAAA,IAClC,gBAAgB,EAAE,SAAS,MAAM,GAAG;AAAA,IACpC,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,OAAO,CAAC;AAAA,IACR,YAAY,EAAE,SAAS,OAAO;AAAA,IAC9B,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,MAAM,EAAE,SAAS,KAAK;AAAA,IACtB,aAAa,CAAC;AAAA,IACd,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,YAA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AA,cAAA,GACJ;AAAA,gBACD6C,EAAYP,EAAK,QAAQ,eAAe;AAAA,kBACtC,eAAA5C;AAAA,kBACA,MAAM4C,EAAK;AAAA,gBAAA,GACV,MAAM;AAAA,kBACNA,EAAK,eACDE,KAAcI,EAAoB,OAAO;AAAA,oBACxC,KAAK;AAAA,oBACL,IAAIlD;AAAA,oBACJ,OAAO;AAAA,kBAAA,GACNqD,EAAiBT,EAAK,WAAW,GAAG,CAAC,KACxCU,EAAoB,IAAI,EAAI;AAAA,gBAAA,CACjC;AAAA,gBACDH,EAAYP,EAAK,QAAQ,SAAS;AAAA,iBACjC,GAAG;AAAA,cACNrD;AAAA,cACAD,EAAoB,OAAO;AAAA,gBACzB,OAAO;AAAA,gBACP,SAAS;AAAA,gBACT,KAAKiB;AAAA,cAAA,GACJ;AAAA,gBACD4C,EAAYP,EAAK,QAAQ,QAAQ;AAAA,iBAChC,GAAG;AAAA,YAAA,CACP;AAAA,UACA,GAAA,GAAG,KACNU,EAAoB,IAAI,EAAI;AAAA,WAC/B,EAAE;AAAA,SACJ,EAAE;AAAA,IAAA,CACN;AAAA,EAEH;AAEA,CAAC;"}
|
package/dist/index79.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as N, ref as a, computed as C, openBlock as f, createElementBlock as $, mergeProps as T, createElementVNode as s, renderSlot as B, normalizeProps as V, guardReactiveProps as I, unref as m, createBlock as P, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as G, createCommentVNode as D, nextTick as J } from "vue";
|
|
2
2
|
import { useFloating as K, arrow as Q } from "./index222.js";
|
|
3
|
-
import { useFocusTrap as W } from "./
|
|
3
|
+
import { useFocusTrap as W } from "./index199.js";
|
|
4
4
|
import { useId as X } from "./index7.js";
|
|
5
5
|
import { wait as E } from "./index122.js";
|
|
6
6
|
import Y from "./index9.js";
|
|
7
7
|
import "./index10.js";
|
|
8
|
-
import { autoUpdate as Z } from "./
|
|
9
|
-
import { flip as ee, offset as oe, shift as te } from "./
|
|
8
|
+
import { autoUpdate as Z } from "./index201.js";
|
|
9
|
+
import { flip as ee, offset as oe, shift as te } from "./index209.js";
|
|
10
10
|
const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s("span", { class: "bb-popover__close-label" }, "Chiudi", -1), se = /* @__PURE__ */ s("svg", {
|
|
11
11
|
viewBox: "0 0 24 24",
|
|
12
12
|
fill: "none",
|
package/dist/index81.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as a, computed as l, openBlock as s, createElementBlock as n, normalizeClass as m, createElementVNode as i, normalizeStyle as c } from "vue";
|
|
2
|
-
import { clamp as p } from "./
|
|
2
|
+
import { clamp as p } from "./index195.js";
|
|
3
3
|
import { getAsPercentageBetween as d } from "./index121.js";
|
|
4
4
|
const v = /* @__PURE__ */ a({
|
|
5
5
|
__name: "BbProgress",
|