bitboss-ui 0.2.19 → 0.2.20
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/BbPopover/BbPopover.vue.d.ts +12 -0
- package/dist/index101.js +2 -2
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +3 -3
- 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/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index15.js +5 -5
- package/dist/index17.js +9 -9
- package/dist/index19.js +3 -3
- package/dist/index197.js +357 -214
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +134 -3
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +5 -35
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +19 -6
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -4
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +172 -8
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +23 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +371 -14
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +10 -10
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +15 -18
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -2
- package/dist/index209.js +2 -2
- package/dist/index21.js +2 -2
- package/dist/index211.js +2 -2
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +3 -3
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +35 -3
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +6 -378
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +2 -134
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +4 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -174
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +3 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +2 -373
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +10 -2
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +235 -2
- package/dist/index221.js.map +1 -1
- package/dist/index223.js +4 -4
- package/dist/index224.js +1 -1
- package/dist/index226.js +1 -1
- package/dist/index227.js +6 -2
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +2 -4
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +291 -431
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +2 -89
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +2 -162
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +117 -2
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +105 -68
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -2
- package/dist/index236.js +2 -200
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -295
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +434 -5
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +89 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +224 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +258 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +4 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +200 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +12 -221
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +161 -257
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +2 -2
- package/dist/index248.js +2 -117
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +68 -105
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index253.js +2 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +3 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +6 -6
- package/dist/index33.js +1 -1
- 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 +1 -1
- package/dist/index79.js +60 -52
- package/dist/index79.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index79.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as V, ref as a, computed as
|
|
1
|
+
import { defineComponent as V, ref as a, computed as w, openBlock as f, createElementBlock as C, mergeProps as T, createElementVNode as l, renderSlot as B, normalizeProps as I, guardReactiveProps as R, unref as _, createBlock as P, Teleport as U, normalizeClass as W, normalizeStyle as j, withCtx as G, createCommentVNode as D, nextTick as J } from "vue";
|
|
2
2
|
import { useFloating as K, arrow as Q } from "./index223.js";
|
|
3
|
-
import { useFocusTrap as X } from "./
|
|
3
|
+
import { useFocusTrap as X } from "./index213.js";
|
|
4
4
|
import { useId as Y } from "./index7.js";
|
|
5
5
|
import { wait as E } from "./index122.js";
|
|
6
6
|
import Z from "./index9.js";
|
|
7
7
|
import "./index10.js";
|
|
8
|
-
import { autoUpdate as ee, flip as oe, shift as te } from "./
|
|
9
|
-
import { offset as ae } from "./
|
|
10
|
-
const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */
|
|
8
|
+
import { autoUpdate as ee, flip as oe, shift as te } from "./index197.js";
|
|
9
|
+
import { offset as ae } from "./index205.js";
|
|
10
|
+
const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ l("span", { class: "bb-popover__close-label" }, "Chiudi", -1), le = /* @__PURE__ */ l("svg", {
|
|
11
11
|
viewBox: "0 0 24 24",
|
|
12
12
|
fill: "none",
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14
14
|
}, [
|
|
15
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ l("path", {
|
|
16
16
|
d: "M23 23L1 1M23 1L1 23",
|
|
17
17
|
stroke: "currentColor",
|
|
18
18
|
"stroke-width": "2",
|
|
@@ -36,7 +36,7 @@ const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ s(
|
|
|
36
36
|
},
|
|
37
37
|
emits: ["shown", "hidden"],
|
|
38
38
|
setup(M, { emit: N }) {
|
|
39
|
-
const o = M,
|
|
39
|
+
const o = M, i = N, { id: S } = Y(), d = `bbp_${S.value}`, c = a(), p = a(), h = a(), { activate: L, deactivate: O } = X(p, {
|
|
40
40
|
/**
|
|
41
41
|
* This traps all clicks outside so we are pressing
|
|
42
42
|
* the trigger we just allow and process that in its
|
|
@@ -45,21 +45,21 @@ const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ s(
|
|
|
45
45
|
* close the popover and be done
|
|
46
46
|
*/
|
|
47
47
|
clickOutsideDeactivates: (e) => {
|
|
48
|
-
var
|
|
48
|
+
var $;
|
|
49
49
|
const t = e.target;
|
|
50
|
-
return t instanceof HTMLElement && (
|
|
50
|
+
return t instanceof HTMLElement && ($ = c.value) != null && $.contains(t) || (b(), i("hidden")), !0;
|
|
51
51
|
},
|
|
52
52
|
escapeDeactivates: () => (J(async () => {
|
|
53
|
-
await b(),
|
|
53
|
+
await b(), m(), i("hidden");
|
|
54
54
|
}), !0),
|
|
55
55
|
/* We don't return focus so that when
|
|
56
56
|
* we press a button on tyhe page we can focus
|
|
57
57
|
* THAT button and not the current trigger
|
|
58
58
|
*/
|
|
59
59
|
returnFocusOnDeactivate: !1
|
|
60
|
-
}), { floatingStyles:
|
|
61
|
-
i,
|
|
60
|
+
}), { floatingStyles: x, placement: v, middlewareData: g } = K(
|
|
62
61
|
c,
|
|
62
|
+
p,
|
|
63
63
|
{
|
|
64
64
|
placement: o.placement,
|
|
65
65
|
whileElementsMounted: ee,
|
|
@@ -68,19 +68,19 @@ const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ s(
|
|
|
68
68
|
ae(o.offset),
|
|
69
69
|
te({ padding: o.padding }),
|
|
70
70
|
Q({
|
|
71
|
-
element:
|
|
71
|
+
element: h,
|
|
72
72
|
padding: o.arrowPadding
|
|
73
73
|
})
|
|
74
74
|
]
|
|
75
75
|
}
|
|
76
|
-
), z =
|
|
76
|
+
), z = w(() => ({
|
|
77
77
|
class: {
|
|
78
78
|
"bb-popover--block": o.block,
|
|
79
79
|
[`bb-popover--theme-${o.theme}`]: o.theme
|
|
80
80
|
}
|
|
81
|
-
})), r = a(!1), n = a(!1),
|
|
82
|
-
if (
|
|
83
|
-
const { x: e, y: t } =
|
|
81
|
+
})), r = a(!1), n = a(!1), s = a(!1), u = a(!0), F = w(() => {
|
|
82
|
+
if (g.value.arrow) {
|
|
83
|
+
const { x: e, y: t } = g.value.arrow;
|
|
84
84
|
return {
|
|
85
85
|
style: {
|
|
86
86
|
left: `${e}px`,
|
|
@@ -88,92 +88,92 @@ const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ s(
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
}), H =
|
|
91
|
+
}), H = w(() => {
|
|
92
92
|
const e = {
|
|
93
|
-
...
|
|
93
|
+
...x.value,
|
|
94
94
|
transitionDuration: `${o.transitionDuration}ms`
|
|
95
95
|
};
|
|
96
96
|
if (o.width) {
|
|
97
97
|
let t;
|
|
98
|
-
typeof o.width == "string" && Number.isNaN(Number(o.width)) ? o.width.includes("%") ? t = `${
|
|
98
|
+
typeof o.width == "string" && Number.isNaN(Number(o.width)) ? o.width.includes("%") ? t = `${c.value.clientWidth * (+o.width.replace("%", "") / 100)}px` : t = o.width : t = `${o.width}px`, e.width = t;
|
|
99
99
|
}
|
|
100
100
|
return e;
|
|
101
101
|
}), q = async () => {
|
|
102
|
-
|
|
102
|
+
u.value = !1, s.value = !1, r.value = !0, await E(50), n.value = !0, r.value = !1;
|
|
103
103
|
}, b = async () => {
|
|
104
|
-
n.value = !1, r.value = !1,
|
|
105
|
-
},
|
|
104
|
+
n.value = !1, r.value = !1, s.value = !0, await E(o.transitionDuration), s.value = !1, u.value = !0;
|
|
105
|
+
}, y = a(!1), A = async () => {
|
|
106
106
|
if (n.value) {
|
|
107
|
-
await b(),
|
|
107
|
+
await b(), m(), i("hidden");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (r.value || o.disabled)
|
|
111
111
|
return;
|
|
112
|
-
|
|
112
|
+
y.value = !0, await q();
|
|
113
113
|
let e = o.focusTarget ?? ".bb-popover__close";
|
|
114
114
|
L({
|
|
115
115
|
onPostActivate: () => {
|
|
116
|
-
if (
|
|
117
|
-
const t =
|
|
118
|
-
t instanceof HTMLElement && (t.focus(),
|
|
116
|
+
if (p.value) {
|
|
117
|
+
const t = p.value.querySelector(e);
|
|
118
|
+
t instanceof HTMLElement && (t.focus(), i("shown"));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
},
|
|
122
|
+
}, m = () => {
|
|
123
123
|
var t;
|
|
124
|
-
const e = (t =
|
|
124
|
+
const e = (t = c.value) == null ? void 0 : t.querySelector(`[aria-controls=popover_${d}]`);
|
|
125
125
|
e instanceof HTMLElement && e.focus();
|
|
126
|
-
},
|
|
127
|
-
|
|
126
|
+
}, k = async () => {
|
|
127
|
+
O(), await b(), m(), i("hidden");
|
|
128
128
|
};
|
|
129
|
-
return (e, t) => (f(),
|
|
130
|
-
|
|
129
|
+
return (e, t) => (f(), C("span", T({ class: "bb-popover" }, z.value), [
|
|
130
|
+
l("span", {
|
|
131
131
|
class: "bb-popover__wrapper",
|
|
132
132
|
ref_key: "wrapper",
|
|
133
|
-
ref:
|
|
133
|
+
ref: c
|
|
134
134
|
}, [
|
|
135
|
-
|
|
135
|
+
B(e.$slots, "activator", I(R({
|
|
136
136
|
props: {
|
|
137
|
-
"aria-controls": `popover_${
|
|
137
|
+
"aria-controls": `popover_${d}`,
|
|
138
138
|
"aria-expanded": n.value,
|
|
139
139
|
onClick: A,
|
|
140
|
-
id:
|
|
140
|
+
id: d,
|
|
141
141
|
disabled: !!e.disabled
|
|
142
142
|
},
|
|
143
|
-
closed:
|
|
144
|
-
closing:
|
|
143
|
+
closed: u.value,
|
|
144
|
+
closing: s.value,
|
|
145
145
|
disabled: !!e.disabled,
|
|
146
146
|
open: n.value,
|
|
147
147
|
opening: r.value,
|
|
148
|
-
placement:
|
|
148
|
+
placement: _(v)
|
|
149
149
|
})))
|
|
150
150
|
], 512),
|
|
151
151
|
(f(), P(U, { to: "body" }, [
|
|
152
|
-
|
|
152
|
+
y.value || e.eager ? (f(), C("span", {
|
|
153
153
|
key: 0,
|
|
154
154
|
class: W(["bb-popover__bubble-container", {
|
|
155
|
-
[`bb-popover__bubble-container--${
|
|
155
|
+
[`bb-popover__bubble-container--${_(v)}`]: !0,
|
|
156
156
|
[`bb-popover__bubble-container--${e.theme}`]: e.theme,
|
|
157
|
-
"bb-popover__bubble-container--hidden":
|
|
158
|
-
"bb-popover__bubble-container--closing":
|
|
157
|
+
"bb-popover__bubble-container--hidden": u.value,
|
|
158
|
+
"bb-popover__bubble-container--closing": s.value,
|
|
159
159
|
"bb-popover__bubble-container--opening": r.value,
|
|
160
160
|
"bb-popover__bubble-container--open": n.value
|
|
161
161
|
}]),
|
|
162
162
|
ref_key: "content",
|
|
163
|
-
ref:
|
|
163
|
+
ref: p,
|
|
164
164
|
style: j(H.value),
|
|
165
|
-
id: `popover_${
|
|
165
|
+
id: `popover_${d}`
|
|
166
166
|
}, [
|
|
167
|
-
|
|
167
|
+
l("span", T({
|
|
168
168
|
class: "bb-popover__arrow",
|
|
169
169
|
ref_key: "bubblearrow",
|
|
170
|
-
ref:
|
|
170
|
+
ref: h
|
|
171
171
|
}, F.value), null, 16),
|
|
172
|
-
|
|
172
|
+
l("span", ne, [
|
|
173
173
|
e.showClose ? (f(), P(Z, {
|
|
174
174
|
key: 0,
|
|
175
175
|
class: "bb-popover__close",
|
|
176
|
-
onClick:
|
|
176
|
+
onClick: k
|
|
177
177
|
}, {
|
|
178
178
|
default: G(() => [
|
|
179
179
|
se,
|
|
@@ -181,7 +181,15 @@ const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ s(
|
|
|
181
181
|
]),
|
|
182
182
|
_: 1
|
|
183
183
|
})) : D("", !0),
|
|
184
|
-
|
|
184
|
+
B(e.$slots, "default", {
|
|
185
|
+
close: k,
|
|
186
|
+
closed: u.value,
|
|
187
|
+
closing: s.value,
|
|
188
|
+
disabled: !!e.disabled,
|
|
189
|
+
open: n.value,
|
|
190
|
+
opening: r.value,
|
|
191
|
+
placement: _(v)
|
|
192
|
+
})
|
|
185
193
|
])
|
|
186
194
|
], 14, re)) : D("", !0)
|
|
187
195
|
]))
|
package/dist/index79.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index79.js","sources":["../src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"bb-popover__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, nextTick, ref } from \"vue\";\nimport {\n useFloating,\n autoUpdate,\n flip,\n shift,\n offset,\n arrow,\n} from \"@floating-ui/vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Placement } from \"@floating-ui/vue\";\n\nexport type BbPopoverProps = Pick<\n CommonProps,\n | \"arrowPadding\"\n | \"block\"\n | \"disabled\"\n | \"eager\"\n | \"offset\"\n | \"padding\"\n | \"placement\"\n | \"showClose\"\n | \"theme\"\n | \"transitionDuration\"\n> & {\n /**\n * Elements that obtains focus immediately after opening the popover.\n * By default it's the first tabbable item.\n */\n focusTarget?: string;\n /**\n * Width of the dropdown in pixels.\n */\n width?: number | string;\n};\n\nexport type BbPopoverEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPopover',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n offset: { default: 3 },\n padding: { default: 10 },\n placement: { default: \"bottom\" },\n showClose: { type: Boolean, default: true },\n theme: { default: \"default\" },\n transitionDuration: { default: 150 },\n focusTarget: {},\n width: {}\n },\n emits: [\"shown\", \"hidden\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n /**\n * This traps all clicks outside so we are pressing\n * the trigger we just allow and process that in its\n * own click handler.\n * If we are pressing anything random on the page\n * close the popover and be done\n */\n clickOutsideDeactivates: (event) => {\n const target = event.target;\n if (target instanceof HTMLElement) {\n if (wrapper.value?.contains(target)) {\n return true;\n }\n }\n closePopover();\n emit(\"hidden\");\n return true;\n },\n escapeDeactivates: () => {\n nextTick(async () => {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n });\n return true;\n },\n /* We don't return focus so that when\n * we press a button on tyhe page we can focus\n * THAT button and not the current trigger\n */\n returnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n wrapper,\n content,\n {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [\n flip(),\n offset(props.offset),\n shift({ padding: props.padding }),\n arrow({\n element: bubblearrow,\n padding: props.arrowPadding,\n }),\n ],\n }\n);\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-popover--block\": props.block,\n [`bb-popover--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n if (middlewareData.value.arrow) {\n const { x, y } = middlewareData.value.arrow;\n return {\n style: {\n left: `${x}px`,\n top: `${y}px`,\n },\n };\n }\n});\n\nconst containerStyle = computed(() => {\n const base: Record<string, any> = {\n ...floatingStyles.value,\n transitionDuration: `${props.transitionDuration}ms`,\n };\n if (props.width) {\n let width: string;\n // If the width is a css unit string use it, if it is a number or number string add px\n if (typeof props.width === \"string\" && Number.isNaN(Number(props.width))) {\n if (props.width.includes(\"%\")) {\n width = `${\n wrapper.value!.clientWidth * (+props.width.replace(\"%\", \"\") / 100)\n }px`;\n } else {\n width = props.width;\n }\n } else {\n width = `${props.width}px`;\n }\n base.width = width;\n }\n return base;\n});\n\nconst openPopover = async () => {\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closePopover = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n if (open.value) {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n return;\n }\n if (opening.value || props.disabled) return;\n hasOpenedOnce.value = true;\n await openPopover();\n let focusTarget = props.focusTarget ?? \".bb-popover__close\";\n\n activate({\n onPostActivate: () => {\n if (content.value) {\n const target = content.value.querySelector(focusTarget);\n if (target instanceof HTMLElement) {\n target.focus();\n emit(\"shown\");\n }\n }\n },\n });\n};\n\nconst focusTrigger = () => {\n const trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n if (trigger instanceof HTMLElement) {\n trigger.focus();\n }\n};\n\nconst onClickClose = async () => {\n deactivate();\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-popover__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-controls': `popover_${id}`,\n 'aria-expanded': open.value,\n onClick: onTriggerClick,\n id: id,\n disabled: !!_ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: !!_ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n [`bb-popover__bubble-container--${_unref(placement)}`]: true,\n [`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-popover__bubble-container--hidden': closed.value,\n 'bb-popover__bubble-container--closing': closing.value,\n 'bb-popover__bubble-container--opening': opening.value,\n 'bb-popover__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle(containerStyle.value),\n id: `popover_${id}`\n }, [\n _createElementVNode(\"span\", _mergeProps({\n class: \"bb-popover__arrow\",\n ref_key: \"bubblearrow\",\n ref: bubblearrow\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-popover__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3,\n _hoisted_4\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\", { close: onClickClose })\n ])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","props","emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;AAGA,MAAMA,KAAa,CAAC,IAAI,GAClBC,KAAa,EAAE,OAAO,wBACtBC,uBAA8C,QAAQ,EAAE,OAAO,6BAA6B,UAAU,EAAE,GACxGC,uBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GAAG;AAAA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;AAAA,UACL,OAAOoD,EAAgBvB,EAAe,KAAK;AAAA,UAC3C,IAAI,WAAWhC,CAAE;AAAA,QAAA,GAChB;AAAA,UACD+C,EAAoB,QAAQD,EAAY;AAAA,YACtC,OAAO;AAAA,YACP,SAAS;AAAA,YACT,KAAK1C;AAAA,UACJ,GAAAyB,EAAgB,KAAK,GAAG,MAAM,EAAE;AAAA,UACnCkB,EAAoB,QAAQ1D,IAAY;AAAA,YACrCqD,EAAK,aACDE,KAAcQ,EAAaI,GAAY;AAAA,cACtC,KAAK;AAAA,cACL,OAAO;AAAA,cACP,SAASf;AAAA,YAAA,GACR;AAAA,cACD,SAASgB,EAAS,MAAM;AAAA,gBACtBnE;AAAA,gBACAC;AAAA,cAAA,CACD;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDmE,EAAoB,IAAI,EAAI;AAAA,YAChCV,EAAYN,EAAK,QAAQ,WAAW,EAAE,OAAOD,GAAc;AAAA,UAAA,CAC5D;AAAA,WACA,IAAIrD,EAAU,KACjBsE,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index79.js","sources":["../src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"bb-popover__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, nextTick, ref } from \"vue\";\nimport {\n useFloating,\n autoUpdate,\n flip,\n shift,\n offset,\n arrow,\n} from \"@floating-ui/vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Placement } from \"@floating-ui/vue\";\n\nexport type BbPopoverProps = Pick<\n CommonProps,\n | \"arrowPadding\"\n | \"block\"\n | \"disabled\"\n | \"eager\"\n | \"offset\"\n | \"padding\"\n | \"placement\"\n | \"showClose\"\n | \"theme\"\n | \"transitionDuration\"\n> & {\n /**\n * Elements that obtains focus immediately after opening the popover.\n * By default it's the first tabbable item.\n */\n focusTarget?: string;\n /**\n * Width of the dropdown in pixels.\n */\n width?: number | string;\n};\n\nexport type BbPopoverEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPopover',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n offset: { default: 3 },\n padding: { default: 10 },\n placement: { default: \"bottom\" },\n showClose: { type: Boolean, default: true },\n theme: { default: \"default\" },\n transitionDuration: { default: 150 },\n focusTarget: {},\n width: {}\n },\n emits: [\"shown\", \"hidden\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n /**\n * This traps all clicks outside so we are pressing\n * the trigger we just allow and process that in its\n * own click handler.\n * If we are pressing anything random on the page\n * close the popover and be done\n */\n clickOutsideDeactivates: (event) => {\n const target = event.target;\n if (target instanceof HTMLElement) {\n if (wrapper.value?.contains(target)) {\n return true;\n }\n }\n closePopover();\n emit(\"hidden\");\n return true;\n },\n escapeDeactivates: () => {\n nextTick(async () => {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n });\n return true;\n },\n /* We don't return focus so that when\n * we press a button on tyhe page we can focus\n * THAT button and not the current trigger\n */\n returnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n wrapper,\n content,\n {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [\n flip(),\n offset(props.offset),\n shift({ padding: props.padding }),\n arrow({\n element: bubblearrow,\n padding: props.arrowPadding,\n }),\n ],\n }\n);\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-popover--block\": props.block,\n [`bb-popover--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n if (middlewareData.value.arrow) {\n const { x, y } = middlewareData.value.arrow;\n return {\n style: {\n left: `${x}px`,\n top: `${y}px`,\n },\n };\n }\n});\n\nconst containerStyle = computed(() => {\n const base: Record<string, any> = {\n ...floatingStyles.value,\n transitionDuration: `${props.transitionDuration}ms`,\n };\n if (props.width) {\n let width: string;\n // If the width is a css unit string use it, if it is a number or number string add px\n if (typeof props.width === \"string\" && Number.isNaN(Number(props.width))) {\n if (props.width.includes(\"%\")) {\n width = `${\n wrapper.value!.clientWidth * (+props.width.replace(\"%\", \"\") / 100)\n }px`;\n } else {\n width = props.width;\n }\n } else {\n width = `${props.width}px`;\n }\n base.width = width;\n }\n return base;\n});\n\nconst openPopover = async () => {\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closePopover = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n if (open.value) {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n return;\n }\n if (opening.value || props.disabled) return;\n hasOpenedOnce.value = true;\n await openPopover();\n let focusTarget = props.focusTarget ?? \".bb-popover__close\";\n\n activate({\n onPostActivate: () => {\n if (content.value) {\n const target = content.value.querySelector(focusTarget);\n if (target instanceof HTMLElement) {\n target.focus();\n emit(\"shown\");\n }\n }\n },\n });\n};\n\nconst focusTrigger = () => {\n const trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n if (trigger instanceof HTMLElement) {\n trigger.focus();\n }\n};\n\nconst onClickClose = async () => {\n deactivate();\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-popover__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-controls': `popover_${id}`,\n 'aria-expanded': open.value,\n onClick: onTriggerClick,\n id: id,\n disabled: !!_ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: !!_ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n [`bb-popover__bubble-container--${_unref(placement)}`]: true,\n [`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-popover__bubble-container--hidden': closed.value,\n 'bb-popover__bubble-container--closing': closing.value,\n 'bb-popover__bubble-container--opening': opening.value,\n 'bb-popover__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle(containerStyle.value),\n id: `popover_${id}`\n }, [\n _createElementVNode(\"span\", _mergeProps({\n class: \"bb-popover__arrow\",\n ref_key: \"bubblearrow\",\n ref: bubblearrow\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-popover__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3,\n _hoisted_4\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\", {\n close: onClickClose,\n closed: closed.value,\n closing: closing.value,\n disabled: !!_ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement)\n })\n ])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","props","emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;AAGA,MAA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