bitboss-ui 2.0.92 → 2.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +2 -2
- package/dist/index110.js +4 -4
- package/dist/index118.js +2 -2
- package/dist/index120.js +5 -5
- package/dist/index122.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index130.js +1 -1
- package/dist/index132.js +2 -2
- package/dist/index133.js +2 -2
- package/dist/index15.js +4 -4
- package/dist/index17.js +3 -3
- package/dist/index19.js +2 -2
- package/dist/index204.js +5 -81
- package/dist/index205.js +16 -2
- package/dist/index206.js +15 -52
- package/dist/index207.js +21 -0
- package/dist/index208.js +19 -13
- package/dist/index209.js +26 -19
- package/dist/index21.js +14 -14
- package/dist/index210.js +3 -4
- package/dist/index211.js +2 -126
- package/dist/index212.js +8 -5
- package/dist/index213.js +244 -120
- package/dist/index214.js +52 -19
- package/dist/index215.js +44 -16
- package/dist/index216.js +5 -16
- package/dist/index217.js +60 -2
- package/dist/index218.js +2 -2
- package/dist/index219.js +4 -41
- package/dist/index220.js +2 -6
- package/dist/index221.js +126 -5
- package/dist/index222.js +125 -12
- package/dist/index223.js +2 -369
- package/dist/index224.js +40 -18
- package/dist/index225.js +19 -26
- package/dist/index226.js +6 -3
- package/dist/index227.js +51 -6
- package/dist/index229.js +13 -52
- package/dist/index23.js +16 -16
- package/dist/index230.js +5 -44
- package/dist/index231.js +11 -4
- package/dist/index232.js +368 -59
- package/dist/index233.js +2 -164
- package/dist/index234.js +80 -83
- package/dist/index235.js +166 -0
- package/dist/index236.js +84 -3
- package/dist/index238.js +3 -2
- package/dist/index239.js +3 -4
- package/dist/index240.js +7 -2
- package/dist/index241.js +4 -3
- package/dist/index242.js +2 -2
- package/dist/index243.js +18 -2
- package/dist/index244.js +105 -17
- package/dist/{index247.js → index246.js} +1 -1
- package/dist/index248.js +4 -0
- package/dist/index25.js +108 -105
- package/dist/index251.js +4 -6
- package/dist/index252.js +281 -16
- package/dist/index253.js +6 -9
- package/dist/index254.js +2 -23
- package/dist/index255.js +2 -89
- package/dist/index257.js +2 -3
- package/dist/index258.js +4 -0
- package/dist/index259.js +2 -7
- package/dist/index260.js +2 -176
- package/dist/index261.js +2 -281
- package/dist/index262.js +2 -6
- package/dist/index263.js +2 -2
- package/dist/index264.js +28 -2
- package/dist/index265.js +22 -2
- package/dist/index267.js +7 -2
- package/dist/index268.js +2 -2
- package/dist/index269.js +126 -2
- package/dist/index27.js +1 -1
- package/dist/index270.js +431 -2
- package/dist/index271.js +176 -2
- package/dist/index272.js +3 -2
- package/dist/index274.js +6 -6
- package/dist/index276.js +2 -2
- package/dist/index277.js +8 -125
- package/dist/index278.js +23 -431
- package/dist/index279.js +83 -16
- package/dist/index281.js +5 -1
- package/dist/index282.js +16 -9
- package/dist/index283.js +1 -1
- package/dist/index289.js +9 -200
- package/dist/index29.js +3 -3
- package/dist/index292.js +199 -3
- package/dist/index293.js +1 -1
- package/dist/index294.js +1 -1
- package/dist/index295.js +1 -1
- package/dist/index296.js +1 -1
- package/dist/index297.js +1 -1
- package/dist/index299.js +66 -3
- package/dist/index300.js +5 -3
- package/dist/index301.js +4 -57
- package/dist/index302.js +8 -3
- package/dist/index303.js +6 -6
- package/dist/index304.js +3 -19
- package/dist/index305.js +6 -6
- package/dist/index306.js +18 -65
- package/dist/index307.js +4 -5
- package/dist/index308.js +2 -32
- package/dist/index309.js +3 -5
- package/dist/index31.js +2 -2
- package/dist/index310.js +57 -7
- package/dist/index311.js +32 -3
- package/dist/index314.js +1 -1
- package/dist/{index316.js → index315.js} +1 -1
- package/dist/index33.js +2 -2
- package/dist/index35.js +3 -3
- package/dist/index37.js +14 -14
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +2 -2
- package/dist/index45.js +6 -6
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index55.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index73.js +3 -3
- package/dist/index75.js +3 -3
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +75 -72
- package/dist/index86.js +1 -1
- package/dist/index88.js +4 -4
- package/dist/index90.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index228.js +0 -251
- package/dist/index237.js +0 -9
- package/dist/index245.js +0 -108
- package/dist/index273.js +0 -30
- /package/dist/{index266.js → index256.js} +0 -0
package/dist/index25.js
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { throttle as
|
3
|
-
import { useFocusTrap as
|
4
|
-
import { useId as
|
1
|
+
import { defineComponent as ie, ref as o, computed as u, getCurrentInstance as ne, nextTick as N, useAttrs as re, onMounted as ue, onBeforeUnmount as G, watch as de, openBlock as k, createBlock as ce, withCtx as ve, createElementVNode as a, mergeProps as P, createElementBlock as $, renderSlot as d, createTextVNode as fe, toDisplayString as K, createCommentVNode as z } from "vue";
|
2
|
+
import { throttle as be } from "./index239.js";
|
3
|
+
import { useFocusTrap as pe } from "./index224.js";
|
4
|
+
import { useId as U } from "./index8.js";
|
5
5
|
import { wait as H } from "./index131.js";
|
6
|
-
import { waitFor as
|
7
|
-
import { useModalsState as _ } from "./
|
8
|
-
import { useLogger as
|
9
|
-
import
|
10
|
-
|
6
|
+
import { waitFor as me } from "./index226.js";
|
7
|
+
import { useModalsState as _ } from "./index240.js";
|
8
|
+
import { useLogger as ge } from "./index212.js";
|
9
|
+
import { useMobile as ye } from "./index9.js";
|
10
|
+
import he from "./index231.js";
|
11
|
+
const we = { class: "bb-base-dialog-close" }, ke = ["aria-label"], Le = /* @__PURE__ */ ie({
|
11
12
|
__name: "BaseDialog",
|
12
13
|
props: {
|
13
14
|
closeLabel: { default: "Chiudi modale" },
|
@@ -24,158 +25,160 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
24
25
|
size: { default: "sm" },
|
25
26
|
description: {},
|
26
27
|
focusTarget: {},
|
27
|
-
fullscreen: { type: Boolean },
|
28
|
+
fullscreen: { type: [Boolean, String] },
|
28
29
|
modelValue: { type: [Boolean, null] }
|
29
30
|
},
|
30
31
|
emits: ["shown", "hidden", "update:modelValue"],
|
31
|
-
setup(
|
32
|
-
var
|
33
|
-
const
|
32
|
+
setup(j, { emit: q }) {
|
33
|
+
var R, W;
|
34
|
+
const l = j, c = q, C = `title_${U().id.value}`, B = `description_${U().id.value}`, { isMobile: J } = ye(), g = o(null), v = o(null), T = o(null), y = o(null), f = o(null), s = o(null), b = o(null), Q = o(null), M = u(
|
35
|
+
() => l.fullscreen === !0 || l.fullscreen === "mobile" && J.value
|
36
|
+
), L = !!((W = (R = ne()) == null ? void 0 : R.proxy) != null && W.$nuxt), h = o(0), X = u(() => {
|
34
37
|
const { openedModals: e } = _();
|
35
38
|
return e.value && e.value === h.value;
|
36
|
-
}), { activate:
|
37
|
-
initialFocus:
|
38
|
-
clickOutsideDeactivates: (e) => e.target ===
|
39
|
+
}), { activate: Y, deactivate: x } = pe(T, {
|
40
|
+
initialFocus: l.focusTarget ?? void 0,
|
41
|
+
clickOutsideDeactivates: (e) => e.target === v.value,
|
39
42
|
allowOutsideClick: !0,
|
40
43
|
/* On esc deactivate the trap, return focus and then close the modal */
|
41
44
|
escapeDeactivates: () => (N(() => {
|
42
|
-
|
45
|
+
c("update:modelValue", !1);
|
43
46
|
}), !0)
|
44
|
-
}),
|
45
|
-
|
46
|
-
s.value && (g.value = new ResizeObserver(r), g.value.observe(s.value)), window.addEventListener("resize", r), r(), !(!
|
47
|
-
}),
|
47
|
+
}), Z = re(), ee = u(() => l.closeLabel);
|
48
|
+
ue(async () => {
|
49
|
+
s.value && (g.value = new ResizeObserver(r), g.value.observe(s.value)), window.addEventListener("resize", r), r(), !(!l.modelValue && !n.value) && (L && !globalThis.document || A());
|
50
|
+
}), G(() => {
|
48
51
|
window.removeEventListener("resize", r);
|
49
52
|
});
|
50
|
-
const V = o(!1),
|
53
|
+
const V = o(!1), p = o(!1), D = o(!0), m = o(!1), n = o(l.eager || l.modelValue), O = u(() => p.value || m.value), le = () => {
|
51
54
|
if (!globalThis.document) return;
|
52
55
|
const e = window.innerWidth - document.documentElement.clientWidth;
|
53
56
|
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${e}px`;
|
54
|
-
},
|
57
|
+
}, S = () => {
|
55
58
|
globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
|
56
59
|
};
|
57
|
-
|
58
|
-
if (
|
59
|
-
const { openedModals: e, modalHasClosed:
|
60
|
-
e.value && (
|
60
|
+
G(() => {
|
61
|
+
if (l.modelValue) {
|
62
|
+
const { openedModals: e, modalHasClosed: t } = _();
|
63
|
+
e.value && (t(), h.value = 0, S());
|
61
64
|
}
|
62
65
|
});
|
63
|
-
const
|
64
|
-
if (
|
65
|
-
|
66
|
-
const { modalHasOpened: e, openedModals:
|
67
|
-
e(), h.value =
|
66
|
+
const A = async () => {
|
67
|
+
if (l.modelValue) {
|
68
|
+
n.value || (n.value = !0, await me(() => !!s.value), await N(), s.value && (g.value = new ResizeObserver(r), g.value.observe(s.value))), D.value = !1, m.value = !1, p.value = !0;
|
69
|
+
const { modalHasOpened: e, openedModals: t } = _();
|
70
|
+
e(), h.value = t.value, le(), await H(l.transitionDuration), p.value = !1, V.value = !0, c("shown"), Y();
|
68
71
|
} else {
|
69
|
-
|
70
|
-
const { modalHasClosed: e, openedModals:
|
71
|
-
e(), h.value = 0,
|
72
|
+
x(), p.value = !1, V.value = !1, m.value = !0, await H(l.transitionDuration), m.value = !1, D.value = !0;
|
73
|
+
const { modalHasClosed: e, openedModals: t } = _();
|
74
|
+
e(), h.value = 0, t.value || S(), c("hidden");
|
72
75
|
}
|
73
76
|
};
|
74
|
-
|
75
|
-
() =>
|
77
|
+
de(
|
78
|
+
() => l.modelValue,
|
76
79
|
() => {
|
77
|
-
!
|
80
|
+
!l.modelValue && !n.value || L && !globalThis.document || A();
|
78
81
|
},
|
79
82
|
{ flush: "post" }
|
80
83
|
);
|
81
84
|
const w = (e) => {
|
82
|
-
e.target ===
|
83
|
-
},
|
84
|
-
|
85
|
-
},
|
86
|
-
|
87
|
-
},
|
85
|
+
e.target === v.value && e.preventDefault();
|
86
|
+
}, te = (e) => {
|
87
|
+
l.disabled || O.value || v.value && e.target === v.value && (l.persistent || c("update:modelValue", !1));
|
88
|
+
}, E = () => {
|
89
|
+
l.disabled || O.value || (x(), c("update:modelValue", !1));
|
90
|
+
}, oe = u(() => {
|
88
91
|
const e = [
|
89
92
|
{
|
90
93
|
"bb-base-dialog bb-base-dialog__overlay": !0,
|
91
|
-
"bb-base-dialog--fullscreen":
|
92
|
-
"bb-base-dialog--faded": !
|
94
|
+
"bb-base-dialog--fullscreen": M.value,
|
95
|
+
"bb-base-dialog--faded": !X.value,
|
93
96
|
"bb-base-dialog--open": V.value,
|
94
|
-
"bb-base-dialog--opening":
|
97
|
+
"bb-base-dialog--opening": p.value,
|
95
98
|
"bb-base-dialog--closed": D.value,
|
96
|
-
"bb-base-dialog--closing":
|
97
|
-
[`bb-base-dialog--transition-${
|
99
|
+
"bb-base-dialog--closing": m.value,
|
100
|
+
[`bb-base-dialog--transition-${l.transition}`]: !0
|
98
101
|
},
|
99
|
-
|
100
|
-
].flat(),
|
101
|
-
onClick:
|
102
|
+
l.overlayClasses
|
103
|
+
].flat(), t = {
|
104
|
+
onClick: te,
|
102
105
|
onScroll: w,
|
103
106
|
onTouchmove: w,
|
104
107
|
onWheel: w,
|
105
108
|
onKeydown: w
|
106
|
-
},
|
107
|
-
transitionDuration:
|
109
|
+
}, i = {
|
110
|
+
transitionDuration: l.transitionDuration / 1e3 + "s"
|
108
111
|
};
|
109
112
|
return {
|
110
113
|
class: e,
|
111
|
-
style:
|
112
|
-
...
|
113
|
-
...
|
114
|
+
style: i,
|
115
|
+
...t,
|
116
|
+
...Z
|
114
117
|
};
|
115
|
-
}),
|
118
|
+
}), ae = u(() => {
|
116
119
|
const e = [
|
117
120
|
{
|
118
121
|
"bb-base-dialog__panel": !0,
|
119
|
-
"bb-base-dialog__panel--compact":
|
122
|
+
"bb-base-dialog__panel--compact": l.compact
|
120
123
|
},
|
121
|
-
|
122
|
-
].flat(),
|
124
|
+
l.panelClasses
|
125
|
+
].flat(), t = {
|
123
126
|
role: "dialog",
|
124
127
|
"aria-modal": !0
|
125
128
|
};
|
126
|
-
|
127
|
-
let
|
128
|
-
const
|
129
|
+
n.value && (l.title && (t["aria-labelledby"] = C), l.description && (t["aria-describedby"] = B));
|
130
|
+
let i;
|
131
|
+
const F = {
|
129
132
|
sm: 384,
|
130
133
|
md: 652,
|
131
134
|
lg: 896
|
132
135
|
};
|
133
|
-
|
134
|
-
const
|
135
|
-
maxWidth:
|
136
|
-
transitionDuration:
|
136
|
+
M.value ? i = "100%" : typeof l.size == "number" ? i = l.size + "px" : l.size in F ? i = F[l.size] + "px" : i = l.size + "px";
|
137
|
+
const se = {
|
138
|
+
maxWidth: i,
|
139
|
+
transitionDuration: l.transitionDuration / 1e3 + "s"
|
137
140
|
};
|
138
141
|
return {
|
139
142
|
class: e,
|
140
|
-
style:
|
141
|
-
...
|
143
|
+
style: se,
|
144
|
+
...t
|
142
145
|
};
|
143
146
|
});
|
144
|
-
let
|
145
|
-
const r =
|
147
|
+
let I = 0;
|
148
|
+
const r = be(
|
146
149
|
async () => {
|
147
|
-
if (
|
148
|
-
const { error: e } =
|
150
|
+
if (I++, I === 100) {
|
151
|
+
const { error: e } = ge();
|
149
152
|
e(
|
150
153
|
"Dialog is updating its height too often. Please check the content is reliably sized."
|
151
154
|
);
|
152
155
|
}
|
153
|
-
if (
|
154
|
-
|
156
|
+
if (l.fullscreen) {
|
157
|
+
Q.value = window.innerHeight;
|
155
158
|
return;
|
156
159
|
}
|
157
|
-
if (
|
158
|
-
const e =
|
159
|
-
if (y.value && (y.value.style.height = "0px", y.value.style.height = `${e + 2}px`, await H(30),
|
160
|
-
const
|
161
|
-
e !==
|
160
|
+
if (f.value && s.value && b.value) {
|
161
|
+
const e = f.value.scrollHeight + s.value.scrollHeight + b.value.scrollHeight + 2;
|
162
|
+
if (y.value && (y.value.style.height = "0px", y.value.style.height = `${e + 2}px`, await H(30), f.value && s.value && b.value)) {
|
163
|
+
const t = f.value.scrollHeight + s.value.scrollHeight + b.value.scrollHeight + 2;
|
164
|
+
e !== t && r();
|
162
165
|
}
|
163
166
|
}
|
164
167
|
},
|
165
168
|
200,
|
166
169
|
{ trailing: !0 }
|
167
170
|
);
|
168
|
-
return (e,
|
169
|
-
default:
|
170
|
-
a("div",
|
171
|
+
return (e, t) => (k(), ce(he, null, {
|
172
|
+
default: ve(() => [
|
173
|
+
a("div", P(oe.value, {
|
171
174
|
ref_key: "overlay",
|
172
|
-
ref:
|
175
|
+
ref: v
|
173
176
|
}), [
|
174
|
-
a("div",
|
177
|
+
a("div", P(ae.value, {
|
175
178
|
ref_key: "panel",
|
176
179
|
ref: T
|
177
180
|
}), [
|
178
|
-
|
181
|
+
n.value ? (k(), $("div", {
|
179
182
|
key: 0,
|
180
183
|
ref_key: "content",
|
181
184
|
ref: y,
|
@@ -183,11 +186,11 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
183
186
|
}, [
|
184
187
|
a("div", {
|
185
188
|
ref_key: "header",
|
186
|
-
ref:
|
189
|
+
ref: f,
|
187
190
|
class: "bb-base-dialog__header"
|
188
191
|
}, [
|
189
|
-
|
190
|
-
close:
|
192
|
+
d(e.$slots, "header", {
|
193
|
+
close: E,
|
191
194
|
title: e.title,
|
192
195
|
titleId: C
|
193
196
|
}, () => [
|
@@ -195,19 +198,19 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
195
198
|
id: C,
|
196
199
|
class: "bb-base-dialog__title"
|
197
200
|
}, [
|
198
|
-
|
199
|
-
|
201
|
+
d(e.$slots, "title", { text: e.title }, () => [
|
202
|
+
fe(K(e.title), 1)
|
200
203
|
])
|
201
204
|
]),
|
202
|
-
a("span",
|
205
|
+
a("span", we, [
|
203
206
|
e.showClose ? (k(), $("button", {
|
204
207
|
key: 0,
|
205
|
-
"aria-label":
|
208
|
+
"aria-label": ee.value,
|
206
209
|
type: "button",
|
207
|
-
onClick:
|
210
|
+
onClick: E
|
208
211
|
}, [
|
209
|
-
|
210
|
-
|
212
|
+
d(e.$slots, "close", {}, () => [
|
213
|
+
t[0] || (t[0] = a("span", { class: "bb-base-dialog-close__icon" }, [
|
211
214
|
a("svg", {
|
212
215
|
"aria-hidden": "true",
|
213
216
|
fill: "none",
|
@@ -223,7 +226,7 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
223
226
|
])
|
224
227
|
], -1))
|
225
228
|
])
|
226
|
-
], 8,
|
229
|
+
], 8, ke)) : z("", !0)
|
227
230
|
])
|
228
231
|
])
|
229
232
|
], 512),
|
@@ -232,7 +235,7 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
232
235
|
ref: s,
|
233
236
|
class: "bb-base-dialog__body scrollbar-border"
|
234
237
|
}, [
|
235
|
-
|
238
|
+
d(e.$slots, "description", {
|
236
239
|
descriptionId: B,
|
237
240
|
text: e.description
|
238
241
|
}, () => [
|
@@ -240,17 +243,17 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
240
243
|
key: 0,
|
241
244
|
id: B,
|
242
245
|
class: "bb-base-dialog__description sr-only"
|
243
|
-
},
|
246
|
+
}, K(e.description), 1)) : z("", !0)
|
244
247
|
]),
|
245
|
-
|
248
|
+
d(e.$slots, "default")
|
246
249
|
], 512),
|
247
|
-
|
250
|
+
t[1] || (t[1] = a("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
|
248
251
|
a("div", {
|
249
252
|
ref_key: "footer",
|
250
|
-
ref:
|
253
|
+
ref: b,
|
251
254
|
class: "bb-base-dialog__footer"
|
252
255
|
}, [
|
253
|
-
|
256
|
+
d(e.$slots, "footer")
|
254
257
|
], 512)
|
255
258
|
], 512)) : z("", !0)
|
256
259
|
], 16)
|
@@ -261,5 +264,5 @@ const ge = { class: "bb-base-dialog-close" }, ye = ["aria-label"], ze = /* @__PU
|
|
261
264
|
}
|
262
265
|
});
|
263
266
|
export {
|
264
|
-
|
267
|
+
Le as default
|
265
268
|
};
|
package/dist/index251.js
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const f = new r(o, e)._freeze();
|
1
|
+
const e = function(t) {
|
2
|
+
return (...n) => n.length >= t.length ? t(...n) : e(t.bind(void 0, ...n));
|
3
|
+
};
|
5
4
|
export {
|
6
|
-
|
7
|
-
f as default
|
5
|
+
e as curry
|
8
6
|
};
|