bitboss-ui 0.2.7 → 0.2.9
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 +4 -35
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +2 -6
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +5 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +16 -2
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +16 -4
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +18 -234
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +18 -349
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +25 -130
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -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 +351 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -2
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +6 -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 +35 -16
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +10 -16
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +131 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +2 -29
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +186 -8
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +23 -3
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +2 -3
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +235 -2
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +3 -2
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +3 -10
- package/dist/index220.js.map +1 -1
- package/dist/index222.js +4 -4
- package/dist/index223.js +4 -4
- package/dist/index225.js +1 -1
- package/dist/index226.js +3 -434
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +294 -88
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +6 -2
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +2 -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 +2 -6
- 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 +2 -2
- package/dist/index235.js +117 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +100 -111
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +68 -105
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +2 -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 +430 -219
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +83 -252
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +197 -159
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +2 -2
- package/dist/index246.js +224 -69
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +258 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +38 -2
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -38
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +2 -2
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -2
- package/dist/index251.js.map +1 -1
- 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/index8.js +53 -54
- package/dist/index8.js.map +1 -1
- package/dist/index81.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index101.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ie, ref as O, computed as p, onMounted as de, watch as q, openBlock as c, createBlock as be, resolveDynamicComponent as re, normalizeClass as f, withCtx as ue, createElementBlock as d, toDisplayString as m, createCommentVNode as v, createElementVNode as o, renderSlot as y, createVNode as J, unref as C, Fragment as N, renderList as T, createTextVNode as pe, mergeProps as fe } from "vue";
|
|
2
|
-
import { add as me } from "./
|
|
3
|
-
import { clamp as ye } from "./
|
|
2
|
+
import { add as me } from "./index239.js";
|
|
3
|
+
import { clamp as ye } from "./index197.js";
|
|
4
4
|
import { deepEqual as he } from "./index123.js";
|
|
5
5
|
import { isNil as j } from "./index120.js";
|
|
6
6
|
import { isNotNil as _e } from "./index124.js";
|
|
7
7
|
import { useId as ke } from "./index7.js";
|
|
8
8
|
import { useItemValue as ge } from "./index126.js";
|
|
9
|
-
import { when as ve } from "./
|
|
9
|
+
import { when as ve } from "./index196.js";
|
|
10
10
|
import G from "./index11.js";
|
|
11
11
|
import "./index12.js";
|
|
12
12
|
import Ce from "./index25.js";
|
package/dist/index103.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as m, openBlock as c, createBlock as b, withCtx as a, renderSlot as r, normalizeProps as i, guardReactiveProps as n, createVNode as h, mergeProps as y } from "vue";
|
|
2
2
|
import f from "./index21.js";
|
|
3
3
|
import "./index22.js";
|
|
4
|
-
import v from "./
|
|
5
|
-
import "./
|
|
4
|
+
import v from "./index240.js";
|
|
5
|
+
import "./index241.js";
|
|
6
6
|
const w = /* @__PURE__ */ m({
|
|
7
7
|
__name: "BbTag",
|
|
8
8
|
props: {
|
package/dist/index109.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as d, Fragment as f, renderList as _, unref as r, mergeProps as b } from "vue";
|
|
2
2
|
import { state as k, useToast as C } from "./index5.js";
|
|
3
|
-
import B from "./
|
|
3
|
+
import B from "./index237.js";
|
|
4
4
|
const N = /* @__PURE__ */ s({
|
|
5
5
|
__name: "BbToast",
|
|
6
6
|
props: {
|
package/dist/index11.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as B, ref as h, computed as n, watch as L, openBlock as c, createElementBlock as i, normalizeClass as E, normalizeProps as p, mergeProps as d, createCommentVNode as I, createElementVNode as l, renderSlot as F, guardReactiveProps as M } from "vue";
|
|
2
|
-
import { isCssColor as f } from "./
|
|
3
|
-
import { when as N } from "./
|
|
2
|
+
import { isCssColor as f } from "./index195.js";
|
|
3
|
+
import { when as N } from "./index196.js";
|
|
4
4
|
const A = {
|
|
5
5
|
class: "bb-base-checkbox-container",
|
|
6
6
|
"aria-hidden": "true"
|
package/dist/index111.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useId as K } from "./index7.js";
|
|
|
4
4
|
import { wait as P } from "./index122.js";
|
|
5
5
|
import Q from "./index9.js";
|
|
6
6
|
import "./index10.js";
|
|
7
|
-
import { throttle as v } from "./
|
|
8
|
-
import { waitFor as W } from "./
|
|
9
|
-
import { autoUpdate as X } from "./
|
|
10
|
-
import { flip as Y, shift as Z } from "./
|
|
7
|
+
import { throttle as v } from "./index210.js";
|
|
8
|
+
import { waitFor as W } from "./index208.js";
|
|
9
|
+
import { autoUpdate as X } from "./index206.js";
|
|
10
|
+
import { flip as Y, shift as Z } from "./index209.js";
|
|
11
11
|
const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
|
|
12
12
|
viewBox: "0 0 24 24",
|
|
13
13
|
fill: "none",
|
package/dist/index113.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, computed as g, resolveComponent as y, openBlock as f, createElementBlock as i, Fragment as v, renderList as h, normalizeClass as b, createElementVNode as s, renderSlot as p, createVNode as k, createSlots as B, withCtx as C, normalizeProps as T, guardReactiveProps as _ } from "vue";
|
|
2
|
-
import { flattenTree as P } from "./
|
|
2
|
+
import { flattenTree as P } from "./index238.js";
|
|
3
3
|
const w = { class: "bb-tree-row" }, z = { class: "bb-tree-main-content" }, I = /* @__PURE__ */ $({
|
|
4
4
|
__name: "BbTree",
|
|
5
5
|
props: {
|
package/dist/index116.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, ref as a, watch as s, computed as u, openBlock as c, createElementBlock as p, normalizeProps as d, guardReactiveProps as m, createElementVNode as b, renderSlot as v, createCommentVNode as f } from "vue";
|
|
2
2
|
import { wait as V } from "./index122.js";
|
|
3
|
-
import { throttle as _ } from "./
|
|
3
|
+
import { throttle as _ } from "./index210.js";
|
|
4
4
|
const h = { class: "bb-collapsible__content" }, k = /* @__PURE__ */ i({
|
|
5
5
|
__name: "BbCollapsible",
|
|
6
6
|
props: {
|
package/dist/index117.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
|
|
2
|
-
import { isCssColor as z } from "./
|
|
2
|
+
import { isCssColor as z } from "./index195.js";
|
|
3
3
|
const g = ["innerHTML"], $ = /* @__PURE__ */ m({
|
|
4
4
|
__name: "BbIcon",
|
|
5
5
|
props: {
|
package/dist/index118.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
|
|
2
|
-
import { throttle as g } from "./
|
|
2
|
+
import { throttle as g } from "./index210.js";
|
|
3
3
|
const O = /* @__PURE__ */ v({
|
|
4
4
|
__name: "BbSmoothHeight",
|
|
5
5
|
props: {
|
package/dist/index119.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
|
|
2
|
-
import { isCssColor as f } from "./
|
|
2
|
+
import { isCssColor as f } from "./index195.js";
|
|
3
3
|
const _ = /* @__PURE__ */ c("svg", {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5
5
|
viewBox: "0 0 512 512"
|
package/dist/index121.js
CHANGED
package/dist/index125.js
CHANGED
package/dist/index126.js
CHANGED
package/dist/index128.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toValue as B } from "./
|
|
2
|
-
import { tryOnScopeDispose as E } from "./
|
|
1
|
+
import { toValue as B } from "./index212.js";
|
|
2
|
+
import { tryOnScopeDispose as E } from "./index212.js";
|
|
3
3
|
import { ref as c, computed as t } from "vue";
|
|
4
4
|
function h(a) {
|
|
5
5
|
var l;
|
package/dist/index15.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as de, ref as k, computed as h, watch as ue, openBlock as d, createElementBlock as u, mergeProps as ce, createElementVNode as i, createTextVNode as be, toDisplayString as f, unref as p, withDirectives as L, createVNode as g, Transition as V, withCtx as w, vShow as z, createCommentVNode as A, normalizeClass as x, Fragment as O, renderList as S, renderSlot as R, nextTick as me } from "vue";
|
|
2
|
-
import c from "./
|
|
3
|
-
import fe from "./
|
|
4
|
-
import pe from "./
|
|
5
|
-
import he from "./
|
|
6
|
-
import ye from "./
|
|
7
|
-
import _e from "./
|
|
8
|
-
import { groupBy as W } from "./
|
|
2
|
+
import c from "./index198.js";
|
|
3
|
+
import fe from "./index199.js";
|
|
4
|
+
import pe from "./index200.js";
|
|
5
|
+
import he from "./index201.js";
|
|
6
|
+
import ye from "./index202.js";
|
|
7
|
+
import _e from "./index203.js";
|
|
8
|
+
import { groupBy as W } from "./index204.js";
|
|
9
9
|
import { isNil as ve } from "./index120.js";
|
|
10
|
-
import { last as $ } from "./
|
|
10
|
+
import { last as $ } from "./index205.js";
|
|
11
11
|
const ke = { class: "bb-base-date-picker__header" }, ge = ["disabled"], Ve = /* @__PURE__ */ i("span", null, null, -1), we = {
|
|
12
12
|
class: "bb-base-date-picker__selected-day-label",
|
|
13
13
|
"aria-live": "polite"
|
package/dist/index17.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as R, ref as l, computed as Y, watch as J, onMounted as Q, onBeforeUnmount as X, openBlock as B, createElementBlock as Z, normalizeClass as C, renderSlot as u, createElementVNode as g, withDirectives as x, mergeProps as T, unref as d, toDisplayString as ee, createBlock as ae, Teleport as te, createVNode as ne, createSlots as oe, renderList as le, withCtx as ie, normalizeProps as re, guardReactiveProps as se } from "vue";
|
|
2
|
-
import { autoUpdate as ue, computePosition as de } from "./
|
|
3
|
-
import ce from "./
|
|
4
|
-
import c from "./
|
|
5
|
-
import fe from "./
|
|
6
|
-
import { identity as pe } from "./
|
|
7
|
-
import { last as me } from "./
|
|
2
|
+
import { autoUpdate as ue, computePosition as de } from "./index206.js";
|
|
3
|
+
import ce from "./index213.js";
|
|
4
|
+
import c from "./index198.js";
|
|
5
|
+
import fe from "./index201.js";
|
|
6
|
+
import { identity as pe } from "./index214.js";
|
|
7
|
+
import { last as me } from "./index205.js";
|
|
8
8
|
import { useId as be } from "./index7.js";
|
|
9
|
-
import { vMaska as ve } from "./
|
|
9
|
+
import { vMaska as ve } from "./index215.js";
|
|
10
10
|
import { wait as I } from "./index122.js";
|
|
11
11
|
import ye from "./index15.js";
|
|
12
12
|
import "./index16.js";
|
|
13
|
-
import O from "./
|
|
14
|
-
import { offset as ge, flip as he, shift as ke } from "./
|
|
13
|
+
import O from "./index216.js";
|
|
14
|
+
import { offset as ge, flip as he, shift as ke } from "./index209.js";
|
|
15
15
|
const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name", "placeholder", "readonly", "value", "aria-describedby"], Ee = ["id"], Pe = /* @__PURE__ */ R({
|
|
16
16
|
__name: "BaseDatePickerInput",
|
|
17
17
|
props: {
|
package/dist/index19.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as
|
|
2
|
-
import { throttle as
|
|
3
|
-
import { useFocusTrap as
|
|
1
|
+
import { defineComponent as Q, ref as l, useAttrs as X, computed as _, onMounted as T, onBeforeUnmount as A, watch as Y, nextTick as E, openBlock as w, createBlock as Z, Teleport as ee, createElementVNode as o, mergeProps as W, createElementBlock as B, renderSlot as r, createTextVNode as te, toDisplayString as V, createCommentVNode as D } from "vue";
|
|
2
|
+
import { throttle as le } from "./index210.js";
|
|
3
|
+
import { useFocusTrap as oe } from "./index211.js";
|
|
4
4
|
import { useId as R } from "./index7.js";
|
|
5
5
|
import { wait as L } from "./index122.js";
|
|
6
|
-
import { waitFor as ae } from "./
|
|
7
|
-
const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-close__content" }, ie = { class: "bb-base-dialog-close__label" }, re = /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
6
|
+
import { waitFor as ae } from "./index208.js";
|
|
7
|
+
const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-close__content" }, ie = { class: "bb-base-dialog-close__label" }, re = /* @__PURE__ */ o("span", { class: "bb-base-dialog-close__icon" }, [
|
|
8
|
+
/* @__PURE__ */ o("svg", {
|
|
9
9
|
viewBox: "0 0 24 24",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
"aria-hidden": "true"
|
|
13
13
|
}, [
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ o("path", {
|
|
15
15
|
d: "M23 23L1 1M23 1L1 23",
|
|
16
16
|
stroke: "currentColor",
|
|
17
17
|
"stroke-width": "2",
|
|
18
18
|
"stroke-linecap": "round"
|
|
19
19
|
})
|
|
20
20
|
])
|
|
21
|
-
], -1), de = /* @__PURE__ */
|
|
21
|
+
], -1), de = /* @__PURE__ */ o("div", { style: { flex: "10000 10000 0%" } }, null, -1), me = /* @__PURE__ */ Q({
|
|
22
22
|
__name: "BaseDialog",
|
|
23
23
|
props: {
|
|
24
24
|
closeLabel: { default: "Chiudi modale" },
|
|
@@ -39,21 +39,21 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
39
39
|
},
|
|
40
40
|
emits: ["shown", "hidden", "update:modelValue"],
|
|
41
41
|
setup(I, { emit: F }) {
|
|
42
|
-
const t = I,
|
|
42
|
+
const t = I, d = F, k = `title_${R().id.value}`, C = `description_${R().id.value}`, p = l(null), f = l(null), $ = l(null), m = l(null), u = l(null), a = l(null), c = l(null), G = l(null), { activate: K, deactivate: z } = oe($, {
|
|
43
43
|
clickOutsideDeactivates: !0,
|
|
44
44
|
/* On esc deactivate the trap, return focus and then close the modal */
|
|
45
45
|
escapeDeactivates: () => (E(() => {
|
|
46
|
-
|
|
46
|
+
d("update:modelValue", !1);
|
|
47
47
|
}), !0)
|
|
48
|
-
}), P = X(), H =
|
|
48
|
+
}), P = X(), H = _(() => t.closeLabel);
|
|
49
49
|
T(async () => {
|
|
50
50
|
a.value && (p.value = new MutationObserver(v), p.value.observe(a.value, { childList: !0, subtree: !0 })), window.addEventListener("resize", v);
|
|
51
51
|
}), A(() => {
|
|
52
52
|
window.removeEventListener("resize", v);
|
|
53
53
|
});
|
|
54
|
-
const
|
|
54
|
+
const y = l(!1), i = l(!1), M = l(!0), b = l(!1), g = l(t.eager || t.modelValue), O = _(() => i.value || b.value);
|
|
55
55
|
T(() => {
|
|
56
|
-
t.modelValue && S();
|
|
56
|
+
t.modelValue && !(y.value || i.value) && S();
|
|
57
57
|
}), A(() => {
|
|
58
58
|
if (t.modelValue) {
|
|
59
59
|
let e = Number(
|
|
@@ -69,33 +69,33 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
69
69
|
);
|
|
70
70
|
const S = async () => {
|
|
71
71
|
if (t.modelValue) {
|
|
72
|
-
|
|
72
|
+
g.value || (g.value = !0, await ae(() => !!a.value), await E(), a.value && (p.value = new MutationObserver(v), p.value.observe(a.value, { childList: !0, subtree: !0 }))), M.value = !1, b.value = !1, i.value = !0;
|
|
73
73
|
let e = Number(
|
|
74
74
|
document.body.dataset.openModals ?? "0"
|
|
75
75
|
);
|
|
76
76
|
e++, document.body.dataset.openModals = e.toString();
|
|
77
77
|
const s = window.innerWidth - document.documentElement.clientWidth;
|
|
78
|
-
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${s}px`, await L(t.transitionDuration),
|
|
78
|
+
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${s}px`, await L(t.transitionDuration), i.value = !1, y.value = !0, d("shown"), K();
|
|
79
79
|
} else {
|
|
80
|
-
z(),
|
|
80
|
+
z(), i.value = !1, y.value = !1, b.value = !0, await L(t.transitionDuration);
|
|
81
81
|
let e = Number(
|
|
82
82
|
document.body.dataset.openModals ?? "0"
|
|
83
83
|
);
|
|
84
|
-
e--, document.body.dataset.openModals = e.toString(), e || (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px"), b.value = !1, M.value = !0,
|
|
84
|
+
e--, document.body.dataset.openModals = e.toString(), e || (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px"), b.value = !1, M.value = !0, d("hidden");
|
|
85
85
|
}
|
|
86
|
-
},
|
|
86
|
+
}, h = (e) => {
|
|
87
87
|
e.target === f.value && e.preventDefault();
|
|
88
88
|
}, U = (e) => {
|
|
89
|
-
t.disabled || O.value || f.value && e.target === f.value && (t.persistent ||
|
|
89
|
+
t.disabled || O.value || f.value && e.target === f.value && (t.persistent || d("update:modelValue", !1));
|
|
90
90
|
}, x = () => {
|
|
91
|
-
t.disabled || O.value || (z(),
|
|
92
|
-
}, j =
|
|
91
|
+
t.disabled || O.value || (z(), d("update:modelValue", !1));
|
|
92
|
+
}, j = _(() => {
|
|
93
93
|
const e = [
|
|
94
94
|
{
|
|
95
95
|
"bb-base-dialog bb-base-dialog__overlay": !0,
|
|
96
96
|
"bb-base-dialog--fullscreen": t.fullscreen,
|
|
97
|
-
"bb-base-dialog--open":
|
|
98
|
-
"bb-base-dialog--opening":
|
|
97
|
+
"bb-base-dialog--open": y.value,
|
|
98
|
+
"bb-base-dialog--opening": i.value,
|
|
99
99
|
"bb-base-dialog--closed": M.value,
|
|
100
100
|
"bb-base-dialog--closing": b.value,
|
|
101
101
|
[`bb-base-dialog--transition-${t.transition}`]: !0
|
|
@@ -103,10 +103,10 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
103
103
|
t.overlayClasses
|
|
104
104
|
].flat(), s = {
|
|
105
105
|
onClick: U,
|
|
106
|
-
onScroll:
|
|
107
|
-
onTouchmove:
|
|
108
|
-
onWheel:
|
|
109
|
-
onKeydown:
|
|
106
|
+
onScroll: h,
|
|
107
|
+
onTouchmove: h,
|
|
108
|
+
onWheel: h,
|
|
109
|
+
onKeydown: h
|
|
110
110
|
}, n = {
|
|
111
111
|
transitionDuration: t.transitionDuration / 1e3 + "s"
|
|
112
112
|
};
|
|
@@ -116,7 +116,7 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
116
116
|
...s,
|
|
117
117
|
...P
|
|
118
118
|
};
|
|
119
|
-
}), q =
|
|
119
|
+
}), q = _(() => {
|
|
120
120
|
const e = [
|
|
121
121
|
{
|
|
122
122
|
"bb-base-dialog__panel": !0,
|
|
@@ -127,7 +127,7 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
127
127
|
role: "dialog",
|
|
128
128
|
"aria-modal": !0
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
g.value && (s["aria-labelledby"] = k, t.description && (s["aria-describedby"] = C));
|
|
131
131
|
let n;
|
|
132
132
|
const N = {
|
|
133
133
|
sm: 384,
|
|
@@ -144,63 +144,63 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
144
144
|
style: J,
|
|
145
145
|
...s
|
|
146
146
|
};
|
|
147
|
-
}), v =
|
|
147
|
+
}), v = le(() => {
|
|
148
148
|
if (t.fullscreen) {
|
|
149
149
|
G.value = window.innerHeight;
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
if (
|
|
153
|
-
const e =
|
|
152
|
+
if (u.value && a.value && c.value) {
|
|
153
|
+
const e = u.value.scrollHeight + a.value.scrollHeight + c.value.scrollHeight + 2;
|
|
154
154
|
m.value && (m.value.style.height = "0px", m.value.style.height = `${e}px`, L(30).then(() => {
|
|
155
|
-
if (
|
|
156
|
-
const s =
|
|
155
|
+
if (u.value && a.value && c.value) {
|
|
156
|
+
const s = u.value.scrollHeight + a.value.scrollHeight + c.value.scrollHeight + 2;
|
|
157
157
|
e !== s && v();
|
|
158
158
|
}
|
|
159
159
|
}));
|
|
160
160
|
}
|
|
161
161
|
}, 200);
|
|
162
|
-
return (e, s) => (
|
|
163
|
-
|
|
162
|
+
return (e, s) => (w(), Z(ee, { to: "body" }, [
|
|
163
|
+
o("div", W(j.value, {
|
|
164
164
|
ref_key: "overlay",
|
|
165
165
|
ref: f
|
|
166
166
|
}), [
|
|
167
|
-
|
|
167
|
+
o("div", W(q.value, {
|
|
168
168
|
ref_key: "panel",
|
|
169
169
|
ref: $
|
|
170
170
|
}), [
|
|
171
|
-
|
|
171
|
+
g.value ? (w(), B("div", {
|
|
172
172
|
key: 0,
|
|
173
173
|
class: "bb-base-dialog__content",
|
|
174
174
|
ref_key: "content",
|
|
175
175
|
ref: m
|
|
176
176
|
}, [
|
|
177
|
-
|
|
177
|
+
o("div", {
|
|
178
178
|
class: "bb-base-dialog__header",
|
|
179
179
|
ref_key: "header",
|
|
180
|
-
ref:
|
|
180
|
+
ref: u
|
|
181
181
|
}, [
|
|
182
|
-
|
|
183
|
-
titleId:
|
|
182
|
+
r(e.$slots, "header", {
|
|
183
|
+
titleId: k,
|
|
184
184
|
close: x,
|
|
185
185
|
title: e.title
|
|
186
186
|
}, () => [
|
|
187
|
-
|
|
187
|
+
o("span", {
|
|
188
188
|
class: "bb-base-dialog__title",
|
|
189
|
-
id:
|
|
189
|
+
id: k
|
|
190
190
|
}, [
|
|
191
|
-
|
|
191
|
+
r(e.$slots, "title", { text: e.title }, () => [
|
|
192
192
|
te(V(e.title), 1)
|
|
193
193
|
])
|
|
194
194
|
]),
|
|
195
|
-
|
|
196
|
-
e.showClose ? (
|
|
195
|
+
o("span", se, [
|
|
196
|
+
e.showClose ? (w(), B("button", {
|
|
197
197
|
key: 0,
|
|
198
198
|
onClick: x,
|
|
199
199
|
type: "button"
|
|
200
200
|
}, [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
r(e.$slots, "close", { text: H.value }, () => [
|
|
202
|
+
o("span", ne, [
|
|
203
|
+
o("span", ie, V(H.value), 1),
|
|
204
204
|
re
|
|
205
205
|
])
|
|
206
206
|
])
|
|
@@ -208,30 +208,30 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
|
|
|
208
208
|
])
|
|
209
209
|
])
|
|
210
210
|
], 512),
|
|
211
|
-
|
|
211
|
+
o("div", {
|
|
212
212
|
class: "bb-base-dialog__body",
|
|
213
213
|
ref_key: "body",
|
|
214
214
|
ref: a
|
|
215
215
|
}, [
|
|
216
|
-
|
|
217
|
-
descriptionId:
|
|
216
|
+
r(e.$slots, "description", {
|
|
217
|
+
descriptionId: C,
|
|
218
218
|
text: e.description
|
|
219
219
|
}, () => [
|
|
220
|
-
e.description ? (
|
|
220
|
+
e.description ? (w(), B("div", {
|
|
221
221
|
key: 0,
|
|
222
|
-
id:
|
|
222
|
+
id: C,
|
|
223
223
|
class: "bb-base-dialog__description"
|
|
224
224
|
}, V(e.description), 1)) : D("", !0)
|
|
225
225
|
]),
|
|
226
|
-
|
|
226
|
+
r(e.$slots, "default")
|
|
227
227
|
], 512),
|
|
228
228
|
de,
|
|
229
|
-
|
|
229
|
+
o("div", {
|
|
230
230
|
class: "bb-base-dialog__footer",
|
|
231
231
|
ref_key: "footer",
|
|
232
|
-
ref:
|
|
232
|
+
ref: c
|
|
233
233
|
}, [
|
|
234
|
-
|
|
234
|
+
r(e.$slots, "footer")
|
|
235
235
|
], 512)
|
|
236
236
|
], 512)) : D("", !0)
|
|
237
237
|
], 16)
|
package/dist/index19.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index19.js","sources":["../src/components/BaseDialog/BaseDialog.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-base-dialog-close\" }\nconst _hoisted_2 = { class: \"bb-base-dialog-close__content\" }\nconst _hoisted_3 = { class: \"bb-base-dialog-close__label\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-base-dialog-close__icon\" }, [\n /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\"\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 {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useAttrs,\n watch,\n nextTick,\n} from \"vue\";\nimport { throttle } from \"@/utilities/functions/throttle\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport { waitFor } from \"@/utilities/functions/waitFor\";\nimport type { CommonProps, Size } from \"@/types/CommonProps\";\n\nexport type Sizes = {\n sm: number;\n md: number;\n lg: number;\n};\n\nexport type BaseDialogProps = 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\nexport type BaseDialogSlots = {\n header?: (props: {\n titleId: typeof titleId;\n close: typeof onCloseClick;\n title: BaseDialogProps[\"title\"];\n }) => any;\n title?: (props: { text: BaseDialogProps[\"title\"] }) => any;\n close?: (props: { text: BaseDialogProps[\"closeLabel\"] }) => any;\n description?: (props: {\n descriptionId: typeof descriptionId;\n text: BaseDialogProps[\"description\"];\n }) => any;\n default?: (props: {}) => any;\n footer?: (props: {}) => any;\n};\n\nexport type BaseDialogEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n (e: \"update:modelValue\", value: boolean): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseDialog',\n props: {\n closeLabel: { default: \"Chiudi modale\" },\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 },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\n\n\nconst emit = __emit;\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst observer = ref<MutationObserver | null>(null);\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 height = ref<number | null>(null);\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 attrs = useAttrs();\n\nconst closeLabel = computed(() => props.closeLabel);\n\nonMounted(async () => {\n if (body.value) {\n observer.value = new MutationObserver(onContentGrow);\n observer.value.observe(body.value, { childList: true, subtree: true });\n }\n window.addEventListener(\"resize\", onContentGrow);\n});\nonBeforeUnmount(() => {\n window.removeEventListener(\"resize\", onContentGrow);\n});\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\n\nconst busy = computed(() => opening.value || closing.value);\n\nonMounted(() => {\n if (props.modelValue) {\n alignToModelValue();\n }\n});\nonBeforeUnmount(() => {\n if (props.modelValue) {\n let currentlyOpenModals = Number(\n document.body.dataset[\"openModals\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenModals--;\n document.body.dataset[\"openModals\"] = currentlyOpenModals.toString();\n if (!currentlyOpenModals) {\n document.body.style.overflow = \"auto\";\n document.body.style.paddingRight = \"0px\";\n }\n }\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n () => props.modelValue,\n () => {\n alignToModelValue();\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 await waitFor(() => !!body.value);\n await nextTick();\n if (body.value) {\n observer.value = new MutationObserver(onContentGrow);\n observer.value.observe(body.value, { childList: true, subtree: true });\n }\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 currentlyOpenModals = Number(\n document.body.dataset[\"openModals\"] ?? \"0\"\n );\n currentlyOpenModals++;\n document.body.dataset[\"openModals\"] = currentlyOpenModals.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 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 currentlyOpenModals = Number(\n document.body.dataset[\"openModals\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenModals--;\n document.body.dataset[\"openModals\"] = currentlyOpenModals.toString();\n if (!currentlyOpenModals) {\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 }\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 || busy.value) return;\n deactivate();\n emit(\"update:modelValue\", false);\n};\n\nconst overlayAttributes = computed(() => {\n const classes = [\n {\n \"bb-base-dialog bb-base-dialog__overlay\": true,\n \"bb-base-dialog--fullscreen\": props.fullscreen,\n \"bb-base-dialog--open\": open.value,\n \"bb-base-dialog--opening\": opening.value,\n \"bb-base-dialog--closed\": closed.value,\n \"bb-base-dialog--closing\": closing.value,\n [`bb-base-dialog--transition-${props.transition}`]: 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-base-dialog__panel\": true,\n \"bb-base-dialog__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 const sizes: Sizes = {\n sm: 384,\n md: 652,\n lg: 896,\n };\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\n const style = {\n maxWidth,\n transitionDuration: props.transitionDuration / 1000 + \"s\",\n };\n\n return {\n class: classes,\n style,\n ...accessibilityAttrs,\n };\n});\n\n/**\n * This is called when content inside body changes.\n * Gets the total height the panel needs to be\n * It could be called numerous times so throttle every 300ms\n */\nconst onContentGrow = throttle(() => {\n if (props.fullscreen) {\n height.value = window.innerHeight;\n return;\n }\n if (header.value && body.value && footer.value) {\n const contentHeight =\n header.value.scrollHeight +\n body.value.scrollHeight +\n footer.value.scrollHeight +\n 2;\n /* Add two so renderless elements at the bottom are not cut off */\n if (content.value) {\n content.value.style.height = \"0px\";\n content.value.style.height = `${contentHeight}px`;\n /**\n * Run until all transitions inside have completed\n */\n wait(30).then(() => {\n if (header.value && body.value && footer.value) {\n const contentHeight2 =\n header.value.scrollHeight +\n body.value.scrollHeight +\n footer.value.scrollHeight +\n 2;\n if (contentHeight !== contentHeight2) onContentGrow();\n }\n });\n }\n }\n}, 200);\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-base-dialog__content\",\n ref_key: \"content\",\n ref: content\n }, [\n _createElementVNode(\"div\", {\n class: \"bb-base-dialog__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-base-dialog__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-base-dialog__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-base-dialog__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-base-dialog__footer\",\n ref_key: \"footer\",\n ref: footer\n }, [\n _renderSlot(_ctx.$slots, \"footer\")\n ], 512)\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","observer","ref","overlay","panel","content","header","body","footer","height","activate","deactivate","useFocusTrap","nextTick","attrs","useAttrs","closeLabel","computed","onMounted","onContentGrow","onBeforeUnmount","open","opening","closed","closing","hasRenderedAtLeastOnce","busy","alignToModelValue","currentlyOpenModals","watch","waitFor","scrollBarWidth","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","sizes","throttle","contentHeight","contentHeight2","_ctx","_cache","_openBlock","_createBlock","_Teleport","_mergeProps","_createElementBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;;;AAGA,MAAMA,KAAa,EAAE,OAAO,0BACtBC,KAAa,EAAE,OAAO,mCACtBC,KAAa,EAAE,OAAO,iCACtBC,KAA8CC,gBAAAA,EAAA,QAAQ,EAAE,OAAO,gCAAgC;AAAA,oBAClE,OAAO;AAAA,IACtC,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,eAAe;AAAA,EAAA,GACd;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,GA4E7EE,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,gBAAgB;AAAA,IACvC,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;A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A,YAAA,GACJ;AAAA,cACD+C,EAAYP,EAAK,QAAQ,QAAQ;AAAA,eAChC,GAAG;AAAA,UACL,GAAA,GAAG,KACNU,EAAoB,IAAI,EAAI;AAAA,WAC/B,EAAE;AAAA,SACJ,EAAE;AAAA,IAAA,CACN;AAAA,EAEH;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index19.js","sources":["../src/components/BaseDialog/BaseDialog.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-base-dialog-close\" }\nconst _hoisted_2 = { class: \"bb-base-dialog-close__content\" }\nconst _hoisted_3 = { class: \"bb-base-dialog-close__label\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-base-dialog-close__icon\" }, [\n /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\"\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 {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useAttrs,\n watch,\n nextTick,\n} from \"vue\";\nimport { throttle } from \"@/utilities/functions/throttle\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport { waitFor } from \"@/utilities/functions/waitFor\";\nimport type { CommonProps, Size } from \"@/types/CommonProps\";\n\nexport type Sizes = {\n sm: number;\n md: number;\n lg: number;\n};\n\nexport type BaseDialogProps = 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\nexport type BaseDialogSlots = {\n header?: (props: {\n titleId: typeof titleId;\n close: typeof onCloseClick;\n title: BaseDialogProps[\"title\"];\n }) => any;\n title?: (props: { text: BaseDialogProps[\"title\"] }) => any;\n close?: (props: { text: BaseDialogProps[\"closeLabel\"] }) => any;\n description?: (props: {\n descriptionId: typeof descriptionId;\n text: BaseDialogProps[\"description\"];\n }) => any;\n default?: (props: {}) => any;\n footer?: (props: {}) => any;\n};\n\nexport type BaseDialogEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n (e: \"update:modelValue\", value: boolean): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseDialog',\n props: {\n closeLabel: { default: \"Chiudi modale\" },\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 },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\n\n\nconst emit = __emit;\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst observer = ref<MutationObserver | null>(null);\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 height = ref<number | null>(null);\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 attrs = useAttrs();\n\nconst closeLabel = computed(() => props.closeLabel);\n\nonMounted(async () => {\n if (body.value) {\n observer.value = new MutationObserver(onContentGrow);\n observer.value.observe(body.value, { childList: true, subtree: true });\n }\n window.addEventListener(\"resize\", onContentGrow);\n});\nonBeforeUnmount(() => {\n window.removeEventListener(\"resize\", onContentGrow);\n});\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\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});\nonBeforeUnmount(() => {\n if (props.modelValue) {\n let currentlyOpenModals = Number(\n document.body.dataset[\"openModals\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenModals--;\n document.body.dataset[\"openModals\"] = currentlyOpenModals.toString();\n if (!currentlyOpenModals) {\n document.body.style.overflow = \"auto\";\n document.body.style.paddingRight = \"0px\";\n }\n }\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n () => props.modelValue,\n () => {\n alignToModelValue();\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 await waitFor(() => !!body.value);\n await nextTick();\n if (body.value) {\n observer.value = new MutationObserver(onContentGrow);\n observer.value.observe(body.value, { childList: true, subtree: true });\n }\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 currentlyOpenModals = Number(\n document.body.dataset[\"openModals\"] ?? \"0\"\n );\n currentlyOpenModals++;\n document.body.dataset[\"openModals\"] = currentlyOpenModals.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 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 currentlyOpenModals = Number(\n document.body.dataset[\"openModals\"] ?? \"0\"\n );\n // This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n currentlyOpenModals--;\n document.body.dataset[\"openModals\"] = currentlyOpenModals.toString();\n if (!currentlyOpenModals) {\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 }\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 || busy.value) return;\n deactivate();\n emit(\"update:modelValue\", false);\n};\n\nconst overlayAttributes = computed(() => {\n const classes = [\n {\n \"bb-base-dialog bb-base-dialog__overlay\": true,\n \"bb-base-dialog--fullscreen\": props.fullscreen,\n \"bb-base-dialog--open\": open.value,\n \"bb-base-dialog--opening\": opening.value,\n \"bb-base-dialog--closed\": closed.value,\n \"bb-base-dialog--closing\": closing.value,\n [`bb-base-dialog--transition-${props.transition}`]: 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-base-dialog__panel\": true,\n \"bb-base-dialog__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 const sizes: Sizes = {\n sm: 384,\n md: 652,\n lg: 896,\n };\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\n const style = {\n maxWidth,\n transitionDuration: props.transitionDuration / 1000 + \"s\",\n };\n\n return {\n class: classes,\n style,\n ...accessibilityAttrs,\n };\n});\n\n/**\n * This is called when content inside body changes.\n * Gets the total height the panel needs to be\n * It could be called numerous times so throttle every 300ms\n */\nconst onContentGrow = throttle(() => {\n if (props.fullscreen) {\n height.value = window.innerHeight;\n return;\n }\n if (header.value && body.value && footer.value) {\n const contentHeight =\n header.value.scrollHeight +\n body.value.scrollHeight +\n footer.value.scrollHeight +\n 2;\n /* Add two so renderless elements at the bottom are not cut off */\n if (content.value) {\n content.value.style.height = \"0px\";\n content.value.style.height = `${contentHeight}px`;\n /**\n * Run until all transitions inside have completed\n */\n wait(30).then(() => {\n if (header.value && body.value && footer.value) {\n const contentHeight2 =\n header.value.scrollHeight +\n body.value.scrollHeight +\n footer.value.scrollHeight +\n 2;\n if (contentHeight !== contentHeight2) onContentGrow();\n }\n });\n }\n }\n}, 200);\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-base-dialog__content\",\n ref_key: \"content\",\n ref: content\n }, [\n _createElementVNode(\"div\", {\n class: \"bb-base-dialog__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-base-dialog__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-base-dialog__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-base-dialog__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-base-dialog__footer\",\n ref_key: \"footer\",\n ref: footer\n }, [\n _renderSlot(_ctx.$slots, \"footer\")\n ], 512)\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","observer","ref","overlay","panel","content","header","body","footer","height","activate","deactivate","useFocusTrap","nextTick","attrs","useAttrs","closeLabel","computed","onMounted","onContentGrow","onBeforeUnmount","open","opening","closed","closing","hasRenderedAtLeastOnce","busy","alignToModelValue","currentlyOpenModals","watch","waitFor","scrollBarWidth","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","sizes","throttle","contentHeight","contentHeight2","_ctx","_cache","_openBlock","_createBlock","_Teleport","_mergeProps","_createElementBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;;;AAGA,MAAMA,KAAa,EAAE,OAAO,0BACtBC,KAAa,EAAE,OAAO,mCACtBC,KAAa,EAAE,OAAO,iCACtBC,KAA8CC,gBAAAA,EAAA,QAAQ,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,EAAW,KAAK,GAAG,CAAC;AAAA,wBAC7E3B;AAAA,sBAAA,CACD;AAAA,oBAAA,CACF;AAAA,kBAAA,CACF,KACDqE,EAAoB,IAAI,EAAI;AAAA,gBAAA,CACjC;AAAA,cAAA,CACF;AAAA,eACA,GAAG;AAAA,YACNpE,EAAoB,OAAO;AAAA,cACzB,OAAO;AAAA,cACP,SAAS;AAAA,cACT,KAAKiB;AAAA,YAAA,GACJ;AAAA,cACDgD,EAAYP,EAAK,QAAQ,eAAe;AAAA,gBACtC,eAAAhD;AAAA,gBACA,MAAMgD,EAAK;AAAA,cAAA,GACV,MAAM;AAAA,gBACNA,EAAK,eACDE,KAAcI,EAAoB,OAAO;AAAA,kBACxC,KAAK;AAAA,kBACL,IAAItD;AAAA,kBACJ,OAAO;AAAA,gBAAA,GACNyD,EAAiBT,EAAK,WAAW,GAAG,CAAC,KACxCU,EAAoB,IAAI,EAAI;AAAA,cAAA,CACjC;AAAA,cACDH,EAAYP,EAAK,QAAQ,SAAS;AAAA,eACjC,GAAG;AAAA,YACNzD;AAAA,YACAD,EAAoB,OAAO;AAAA,cACzB,OAAO;AAAA,cACP,SAAS;AAAA,cACT,KAAKkB;AAAA,YAAA,GACJ;AAAA,cACD+C,EAAYP,EAAK,QAAQ,QAAQ;AAAA,eAChC,GAAG;AAAA,UACL,GAAA,GAAG,KACNU,EAAoB,IAAI,EAAI;AAAA,WAC/B,EAAE;AAAA,SACJ,EAAE;AAAA,IAAA,CACN;AAAA,EAEH;AAEA,CAAC;"}
|
package/dist/index195.js
CHANGED
package/dist/index195.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index195.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index195.js","sources":["../src/utilities/functions/isCssColor.ts"],"sourcesContent":["/**\n * Taken from vuetify colorable mixin\n * https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/mixins/colorable/index.ts\n */\nexport const isCssColor = (color: string): boolean => {\n return !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n};\n"],"names":["isCssColor","color"],"mappings":"AAIa,MAAAA,IAAa,CAACC,MAClB,CAAC,CAACA,KAAS,CAAC,CAACA,EAAM,MAAM,4BAA4B;"}
|