bitboss-ui 0.2.25 → 0.2.27

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.
Files changed (129) hide show
  1. package/dist/composables/useConfirm.d.ts +6 -0
  2. package/dist/index101.js +1 -1
  3. package/dist/index103.js +2 -2
  4. package/dist/index109.js +1 -1
  5. package/dist/index111.js +3 -3
  6. package/dist/index113.js +1 -1
  7. package/dist/index116.js +1 -1
  8. package/dist/index118.js +1 -1
  9. package/dist/index125.js +1 -1
  10. package/dist/index126.js +1 -1
  11. package/dist/index127.js +1 -1
  12. package/dist/index131.js +2 -2
  13. package/dist/index15.js +8 -8
  14. package/dist/index17.js +9 -9
  15. package/dist/index19.js +87 -92
  16. package/dist/index19.js.map +1 -1
  17. package/dist/index199.js +3 -5
  18. package/dist/index199.js.map +1 -1
  19. package/dist/index200.js +3 -16
  20. package/dist/index200.js.map +1 -1
  21. package/dist/index201.js +2 -16
  22. package/dist/index201.js.map +1 -1
  23. package/dist/index202.js +2 -19
  24. package/dist/index202.js.map +1 -1
  25. package/dist/index203.js +3 -20
  26. package/dist/index203.js.map +1 -1
  27. package/dist/index204.js +34 -28
  28. package/dist/index204.js.map +1 -1
  29. package/dist/index205.js +6 -8
  30. package/dist/index205.js.map +1 -1
  31. package/dist/index206.js +5 -2
  32. package/dist/index206.js.map +1 -1
  33. package/dist/index207.js +16 -235
  34. package/dist/index207.js.map +1 -1
  35. package/dist/index208.js +16 -10
  36. package/dist/index208.js.map +1 -1
  37. package/dist/index209.js +19 -3
  38. package/dist/index209.js.map +1 -1
  39. package/dist/index21.js +2 -2
  40. package/dist/index210.js +20 -3
  41. package/dist/index210.js.map +1 -1
  42. package/dist/index211.js +29 -3
  43. package/dist/index211.js.map +1 -1
  44. package/dist/index212.js +8 -35
  45. package/dist/index212.js.map +1 -1
  46. package/dist/index213.js +2 -6
  47. package/dist/index213.js.map +1 -1
  48. package/dist/index214.js +8 -376
  49. package/dist/index214.js.map +1 -1
  50. package/dist/index215.js +375 -131
  51. package/dist/index215.js.map +1 -1
  52. package/dist/index216.js +2 -2
  53. package/dist/index216.js.map +1 -1
  54. package/dist/index217.js +363 -164
  55. package/dist/index217.js.map +1 -1
  56. package/dist/index218.js +134 -23
  57. package/dist/index218.js.map +1 -1
  58. package/dist/index219.js +164 -363
  59. package/dist/index219.js.map +1 -1
  60. package/dist/index220.js +23 -2
  61. package/dist/index220.js.map +1 -1
  62. package/dist/index221.js +235 -2
  63. package/dist/index221.js.map +1 -1
  64. package/dist/index223.js +2 -2
  65. package/dist/index224.js +25 -76
  66. package/dist/index224.js.map +1 -1
  67. package/dist/index225.js +12 -27
  68. package/dist/index225.js.map +1 -1
  69. package/dist/index226.js +79 -13
  70. package/dist/index226.js.map +1 -1
  71. package/dist/index228.js +224 -2
  72. package/dist/index228.js.map +1 -1
  73. package/dist/index229.js +257 -294
  74. package/dist/index229.js.map +1 -1
  75. package/dist/index230.js +434 -5
  76. package/dist/index230.js.map +1 -1
  77. package/dist/index231.js +89 -2
  78. package/dist/index231.js.map +1 -1
  79. package/dist/index232.js +200 -2
  80. package/dist/index232.js.map +1 -1
  81. package/dist/index233.js +295 -2
  82. package/dist/index233.js.map +1 -1
  83. package/dist/index234.js +6 -2
  84. package/dist/index234.js.map +1 -1
  85. package/dist/index235.js +2 -2
  86. package/dist/index237.js +2 -224
  87. package/dist/index237.js.map +1 -1
  88. package/dist/index238.js +2 -258
  89. package/dist/index238.js.map +1 -1
  90. package/dist/index239.js +2 -435
  91. package/dist/index239.js.map +1 -1
  92. package/dist/index240.js +2 -89
  93. package/dist/index240.js.map +1 -1
  94. package/dist/index244.js +2 -200
  95. package/dist/index244.js.map +1 -1
  96. package/dist/index245.js +2 -162
  97. package/dist/index245.js.map +1 -1
  98. package/dist/index246.js +162 -2
  99. package/dist/index246.js.map +1 -1
  100. package/dist/index247.js +2 -2
  101. package/dist/index247.js.map +1 -1
  102. package/dist/index248.js +69 -2
  103. package/dist/index248.js.map +1 -1
  104. package/dist/index249.js +15 -69
  105. package/dist/index249.js.map +1 -1
  106. package/dist/index250.js +37 -14
  107. package/dist/index250.js.map +1 -1
  108. package/dist/index251.js +2 -38
  109. package/dist/index251.js.map +1 -1
  110. package/dist/index252.js +2 -2
  111. package/dist/index252.js.map +1 -1
  112. package/dist/index253.js +2 -2
  113. package/dist/index253.js.map +1 -1
  114. package/dist/index254.js +2 -2
  115. package/dist/index255.js +1 -1
  116. package/dist/index29.js +2 -2
  117. package/dist/index3.js +39 -40
  118. package/dist/index3.js.map +1 -1
  119. package/dist/index31.js +5 -5
  120. package/dist/index59.js +23 -23
  121. package/dist/index59.js.map +1 -1
  122. package/dist/index65.js +3 -3
  123. package/dist/index69.js +2 -2
  124. package/dist/index72.js +1 -1
  125. package/dist/index75.js +1 -1
  126. package/dist/index77.js +1 -1
  127. package/dist/index79.js +3 -3
  128. package/dist/style.css +1 -1
  129. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import type { Sizes } from '../components/BaseDialog/BaseDialog.vue';
2
2
  type State = {
3
3
  description: string;
4
+ theme: string;
4
5
  loading: boolean;
5
6
  noText: string;
6
7
  open: boolean;
@@ -34,6 +35,10 @@ type UserOptions = {
34
35
  * Text content of the modal.
35
36
  */
36
37
  text: State["text"];
38
+ /**
39
+ * The name of the theme it applies a css class to BbConfirm for styling.
40
+ */
41
+ theme?: State["theme"];
37
42
  /**
38
43
  * Tittle of the modal
39
44
  */
@@ -53,6 +58,7 @@ type UserOptions = {
53
58
  };
54
59
  export declare const state: {
55
60
  description: string;
61
+ theme: string;
56
62
  loading: boolean;
57
63
  noText: string;
58
64
  open: boolean;
package/dist/index101.js CHANGED
@@ -1,5 +1,5 @@
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 "./index228.js";
2
+ import { add as me } from "./index244.js";
3
3
  import { clamp as ye } from "./index196.js";
4
4
  import { deepEqual as he } from "./index123.js";
5
5
  import { isNil as j } from "./index120.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 "./index245.js";
5
- import "./index246.js";
4
+ import v from "./index246.js";
5
+ import "./index247.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 "./index249.js";
3
+ import B from "./index248.js";
4
4
  const N = /* @__PURE__ */ s({
5
5
  __name: "BbToast",
6
6
  props: {
package/dist/index111.js CHANGED
@@ -4,9 +4,9 @@ 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 "./index211.js";
8
- import { waitFor as W } from "./index213.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index214.js";
7
+ import { throttle as v } from "./index203.js";
8
+ import { waitFor as W } from "./index205.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index215.js";
10
10
  const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
11
11
  viewBox: "0 0 24 24",
12
12
  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 "./index247.js";
2
+ import { flattenTree as P } from "./index245.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 "./index211.js";
3
+ import { throttle as _ } from "./index203.js";
4
4
  const h = { class: "bb-collapsible__content" }, k = /* @__PURE__ */ i({
5
5
  __name: "BbCollapsible",
6
6
  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 "./index211.js";
2
+ import { throttle as g } from "./index203.js";
3
3
  const O = /* @__PURE__ */ v({
4
4
  __name: "BbSmoothHeight",
5
5
  props: {
package/dist/index125.js CHANGED
@@ -1,4 +1,4 @@
1
- import t from "./index207.js";
1
+ import t from "./index221.js";
2
2
  const e = () => ({
3
3
  getItemText(r, n) {
4
4
  if (typeof r == "string" && !n)
package/dist/index126.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index207.js";
1
+ import o from "./index221.js";
2
2
  const e = () => ({
3
3
  getItemValue(n, f) {
4
4
  if (typeof f > "u")
package/dist/index127.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isArray as b, isPlainObject as m } from "./index250.js";
1
+ import { isArray as b, isPlainObject as m } from "./index249.js";
2
2
  function i(e, n, l, o, r) {
3
3
  const u = {}.propertyIsEnumerable.call(o, n) ? "enumerable" : "nonenumerable";
4
4
  u === "enumerable" && (e[n] = l), r && u === "nonenumerable" && Object.defineProperty(e, n, {
package/dist/index131.js CHANGED
@@ -1,5 +1,5 @@
1
- import { toValue as B } from "./index208.js";
2
- import { tryOnScopeDispose as E } from "./index208.js";
1
+ import { toValue as B } from "./index214.js";
2
+ import { tryOnScopeDispose as E } from "./index214.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 "./index199.js";
3
- import fe from "./index200.js";
4
- import pe from "./index201.js";
5
- import he from "./index202.js";
6
- import ye from "./index203.js";
7
- import _e from "./index204.js";
8
- import { groupBy as W } from "./index205.js";
2
+ import c from "./index206.js";
3
+ import fe from "./index207.js";
4
+ import pe from "./index208.js";
5
+ import he from "./index209.js";
6
+ import ye from "./index210.js";
7
+ import _e from "./index211.js";
8
+ import { groupBy as W } from "./index212.js";
9
9
  import { isNil as ve } from "./index120.js";
10
- import { last as $ } from "./index206.js";
10
+ import { last as $ } from "./index213.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, flip as ce, shift as fe } from "./index214.js";
3
- import pe from "./index215.js";
4
- import c from "./index199.js";
5
- import me from "./index202.js";
6
- import { identity as be } from "./index216.js";
7
- import { last as ve } from "./index206.js";
2
+ import { autoUpdate as ue, computePosition as de, flip as ce, shift as fe } from "./index215.js";
3
+ import pe from "./index218.js";
4
+ import c from "./index206.js";
5
+ import me from "./index209.js";
6
+ import { identity as be } from "./index202.js";
7
+ import { last as ve } from "./index213.js";
8
8
  import { useId as ye } from "./index7.js";
9
- import { vMaska as ge } from "./index217.js";
9
+ import { vMaska as ge } from "./index219.js";
10
10
  import { wait as I } from "./index122.js";
11
11
  import he from "./index15.js";
12
12
  import "./index16.js";
13
- import O from "./index218.js";
14
- import { offset as ke } from "./index219.js";
13
+ import O from "./index220.js";
14
+ import { offset as ke } from "./index217.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 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 "./index211.js";
3
- import { useFocusTrap as oe } from "./index212.js";
4
- import { useId as R } from "./index7.js";
1
+ import { defineComponent as J, ref as o, useAttrs as Q, computed as h, onMounted as X, onBeforeUnmount as E, watchPostEffect as Y, openBlock as _, createBlock as Z, Teleport as ee, createElementVNode as l, mergeProps as N, createElementBlock as B, renderSlot as i, createTextVNode as te, toDisplayString as V, createCommentVNode as D, nextTick as T } from "vue";
2
+ import { throttle as oe } from "./index203.js";
3
+ import { useFocusTrap as le } from "./index204.js";
4
+ import { useId as A } from "./index7.js";
5
5
  import { wait as L } from "./index122.js";
6
- import { waitFor as ae } from "./index213.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", {
6
+ import { waitFor as ae } from "./index205.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__ */ l("span", { class: "bb-base-dialog-close__icon" }, [
8
+ /* @__PURE__ */ l("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__ */ o("path", {
14
+ /* @__PURE__ */ l("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__ */ o("div", { style: { flex: "10000 10000 0%" } }, null, -1), me = /* @__PURE__ */ Q({
21
+ ], -1), de = /* @__PURE__ */ l("div", { style: { flex: "10000 10000 0%" } }, null, -1), me = /* @__PURE__ */ J({
22
22
  __name: "BaseDialog",
23
23
  props: {
24
24
  closeLabel: { default: "Chiudi modale" },
@@ -38,75 +38,72 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
38
38
  modelValue: { type: [Boolean, null] }
39
39
  },
40
40
  emits: ["shown", "hidden", "update:modelValue"],
41
- setup(I, { emit: F }) {
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($, {
41
+ setup(W, { emit: R }) {
42
+ const t = W, r = R, w = `title_${A().id.value}`, k = `description_${A().id.value}`, p = o(null), m = o(null), $ = o(null), y = o(null), d = o(null), a = o(null), u = o(null), I = o(null), { activate: F, deactivate: z } = le($, {
43
43
  clickOutsideDeactivates: !0,
44
44
  /* On esc deactivate the trap, return focus and then close the modal */
45
- escapeDeactivates: () => (E(() => {
46
- d("update:modelValue", !1);
45
+ escapeDeactivates: () => (T(() => {
46
+ r("update:modelValue", !1);
47
47
  }), !0)
48
- }), P = X(), H = _(() => t.closeLabel);
49
- T(async () => {
50
- a.value && (p.value = new MutationObserver(v), p.value.observe(a.value, { childList: !0, subtree: !0 })), window.addEventListener("resize", v);
51
- }), A(() => {
52
- window.removeEventListener("resize", v);
48
+ }), P = Q(), H = h(() => t.closeLabel);
49
+ X(async () => {
50
+ a.value && (p.value = new MutationObserver(f), p.value.observe(a.value, { childList: !0, subtree: !0 })), window.addEventListener("resize", f);
51
+ }), E(() => {
52
+ window.removeEventListener("resize", f);
53
53
  });
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
- T(() => {
56
- t.modelValue && !(y.value || i.value) && S();
57
- }), A(() => {
54
+ const C = o(!1), c = o(!1), M = o(!0), b = o(!1), v = o(t.eager || t.modelValue), O = h(() => c.value || b.value);
55
+ E(() => {
58
56
  if (t.modelValue) {
59
57
  let e = Number(
60
58
  document.body.dataset.openModals ?? "0"
61
59
  );
62
60
  e--, document.body.dataset.openModals = e.toString(), e || (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
63
61
  }
64
- }), Y(
65
- () => t.modelValue,
66
- () => {
67
- S();
68
- }
69
- );
70
- const S = async () => {
62
+ });
63
+ const G = async () => {
71
64
  if (t.modelValue) {
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;
65
+ v.value || (v.value = !0, await ae(() => !!a.value), await T(), a.value && (p.value = new MutationObserver(f), p.value.observe(a.value, { childList: !0, subtree: !0 }))), M.value = !1, b.value = !1, c.value = !0;
73
66
  let e = Number(
74
67
  document.body.dataset.openModals ?? "0"
75
68
  );
76
69
  e++, document.body.dataset.openModals = e.toString();
77
70
  const s = window.innerWidth - document.documentElement.clientWidth;
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();
71
+ document.body.style.overflow = "hidden", document.body.style.paddingRight = `${s}px`, await L(t.transitionDuration), c.value = !1, C.value = !0, r("shown"), F();
79
72
  } else {
80
- z(), i.value = !1, y.value = !1, b.value = !0, await L(t.transitionDuration);
73
+ z(), c.value = !1, C.value = !1, b.value = !0, await L(t.transitionDuration);
81
74
  let e = Number(
82
75
  document.body.dataset.openModals ?? "0"
83
76
  );
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");
77
+ e--, document.body.dataset.openModals = e.toString(), e || (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px"), b.value = !1, M.value = !0, r("hidden");
85
78
  }
86
- }, h = (e) => {
87
- e.target === f.value && e.preventDefault();
88
- }, U = (e) => {
89
- t.disabled || O.value || f.value && e.target === f.value && (t.persistent || d("update:modelValue", !1));
90
- }, x = () => {
91
- t.disabled || O.value || (z(), d("update:modelValue", !1));
92
- }, j = _(() => {
79
+ };
80
+ Y(() => {
81
+ !t.modelValue && !v.value || G();
82
+ });
83
+ const g = (e) => {
84
+ e.target === m.value && e.preventDefault();
85
+ }, K = (e) => {
86
+ t.disabled || O.value || m.value && e.target === m.value && (t.persistent || r("update:modelValue", !1));
87
+ }, S = () => {
88
+ t.disabled || O.value || (z(), r("update:modelValue", !1));
89
+ }, U = h(() => {
93
90
  const e = [
94
91
  {
95
92
  "bb-base-dialog bb-base-dialog__overlay": !0,
96
93
  "bb-base-dialog--fullscreen": t.fullscreen,
97
- "bb-base-dialog--open": y.value,
98
- "bb-base-dialog--opening": i.value,
94
+ "bb-base-dialog--open": C.value,
95
+ "bb-base-dialog--opening": c.value,
99
96
  "bb-base-dialog--closed": M.value,
100
97
  "bb-base-dialog--closing": b.value,
101
98
  [`bb-base-dialog--transition-${t.transition}`]: !0
102
99
  },
103
100
  t.overlayClasses
104
101
  ].flat(), s = {
105
- onClick: U,
106
- onScroll: h,
107
- onTouchmove: h,
108
- onWheel: h,
109
- onKeydown: h
102
+ onClick: K,
103
+ onScroll: g,
104
+ onTouchmove: g,
105
+ onWheel: g,
106
+ onKeydown: g
110
107
  }, n = {
111
108
  transitionDuration: t.transitionDuration / 1e3 + "s"
112
109
  };
@@ -116,7 +113,7 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
116
113
  ...s,
117
114
  ...P
118
115
  };
119
- }), q = _(() => {
116
+ }), j = h(() => {
120
117
  const e = [
121
118
  {
122
119
  "bb-base-dialog__panel": !0,
@@ -127,80 +124,78 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
127
124
  role: "dialog",
128
125
  "aria-modal": !0
129
126
  };
130
- g.value && (s["aria-labelledby"] = k, t.description && (s["aria-describedby"] = C));
127
+ v.value && (s["aria-labelledby"] = w, t.description && (s["aria-describedby"] = k));
131
128
  let n;
132
- const N = {
129
+ const x = {
133
130
  sm: 384,
134
131
  md: 652,
135
132
  lg: 896
136
133
  };
137
- t.fullscreen ? n = "100%" : typeof t.size == "number" ? n = t.size + "px" : t.size in N ? n = N[t.size] + "px" : n = t.size + "px";
138
- const J = {
134
+ t.fullscreen ? n = "100%" : typeof t.size == "number" ? n = t.size + "px" : t.size in x ? n = x[t.size] + "px" : n = t.size + "px";
135
+ const q = {
139
136
  maxWidth: n,
140
137
  transitionDuration: t.transitionDuration / 1e3 + "s"
141
138
  };
142
139
  return {
143
140
  class: e,
144
- style: J,
141
+ style: q,
145
142
  ...s
146
143
  };
147
- }), v = le(() => {
144
+ }), f = oe(async () => {
148
145
  if (t.fullscreen) {
149
- G.value = window.innerHeight;
146
+ I.value = window.innerHeight;
150
147
  return;
151
148
  }
152
- if (u.value && a.value && c.value) {
153
- const e = u.value.scrollHeight + a.value.scrollHeight + c.value.scrollHeight + 2;
154
- m.value && (m.value.style.height = "0px", m.value.style.height = `${e}px`, L(30).then(() => {
155
- if (u.value && a.value && c.value) {
156
- const s = u.value.scrollHeight + a.value.scrollHeight + c.value.scrollHeight + 2;
157
- e !== s && v();
158
- }
159
- }));
149
+ if (d.value && a.value && u.value) {
150
+ const e = d.value.scrollHeight + a.value.scrollHeight + u.value.scrollHeight + 2;
151
+ if (y.value && (y.value.style.height = "0px", y.value.style.height = `${e + 10}px`, await L(30), d.value && a.value && u.value)) {
152
+ const s = d.value.scrollHeight + a.value.scrollHeight + u.value.scrollHeight + 20;
153
+ e !== s && f();
154
+ }
160
155
  }
161
156
  }, 200);
162
- return (e, s) => (w(), Z(ee, { to: "body" }, [
163
- o("div", W(j.value, {
157
+ return (e, s) => (_(), Z(ee, { to: "body" }, [
158
+ l("div", N(U.value, {
164
159
  ref_key: "overlay",
165
- ref: f
160
+ ref: m
166
161
  }), [
167
- o("div", W(q.value, {
162
+ l("div", N(j.value, {
168
163
  ref_key: "panel",
169
164
  ref: $
170
165
  }), [
171
- g.value ? (w(), B("div", {
166
+ v.value ? (_(), B("div", {
172
167
  key: 0,
173
168
  class: "bb-base-dialog__content",
174
169
  ref_key: "content",
175
- ref: m
170
+ ref: y
176
171
  }, [
177
- o("div", {
172
+ l("div", {
178
173
  class: "bb-base-dialog__header",
179
174
  ref_key: "header",
180
- ref: u
175
+ ref: d
181
176
  }, [
182
- r(e.$slots, "header", {
183
- titleId: k,
184
- close: x,
177
+ i(e.$slots, "header", {
178
+ titleId: w,
179
+ close: S,
185
180
  title: e.title
186
181
  }, () => [
187
- o("span", {
182
+ l("span", {
188
183
  class: "bb-base-dialog__title",
189
- id: k
184
+ id: w
190
185
  }, [
191
- r(e.$slots, "title", { text: e.title }, () => [
186
+ i(e.$slots, "title", { text: e.title }, () => [
192
187
  te(V(e.title), 1)
193
188
  ])
194
189
  ]),
195
- o("span", se, [
196
- e.showClose ? (w(), B("button", {
190
+ l("span", se, [
191
+ e.showClose ? (_(), B("button", {
197
192
  key: 0,
198
- onClick: x,
193
+ onClick: S,
199
194
  type: "button"
200
195
  }, [
201
- r(e.$slots, "close", { text: H.value }, () => [
202
- o("span", ne, [
203
- o("span", ie, V(H.value), 1),
196
+ i(e.$slots, "close", { text: H.value }, () => [
197
+ l("span", ne, [
198
+ l("span", ie, V(H.value), 1),
204
199
  re
205
200
  ])
206
201
  ])
@@ -208,30 +203,30 @@ const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-clos
208
203
  ])
209
204
  ])
210
205
  ], 512),
211
- o("div", {
206
+ l("div", {
212
207
  class: "bb-base-dialog__body",
213
208
  ref_key: "body",
214
209
  ref: a
215
210
  }, [
216
- r(e.$slots, "description", {
217
- descriptionId: C,
211
+ i(e.$slots, "description", {
212
+ descriptionId: k,
218
213
  text: e.description
219
214
  }, () => [
220
- e.description ? (w(), B("div", {
215
+ e.description ? (_(), B("div", {
221
216
  key: 0,
222
- id: C,
217
+ id: k,
223
218
  class: "bb-base-dialog__description"
224
219
  }, V(e.description), 1)) : D("", !0)
225
220
  ]),
226
- r(e.$slots, "default")
221
+ i(e.$slots, "default")
227
222
  ], 512),
228
223
  de,
229
- o("div", {
224
+ l("div", {
230
225
  class: "bb-base-dialog__footer",
231
226
  ref_key: "footer",
232
- ref: c
227
+ ref: u
233
228
  }, [
234
- r(e.$slots, "footer")
229
+ i(e.$slots, "footer")
235
230
  ], 512)
236
231
  ], 512)) : D("", !0)
237
232
  ], 16)
@@ -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 /**\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,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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;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;"}
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 watchPostEffect,\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\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 * 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 * Every time modelValue changes align the display to it\n */\nwatchPostEffect(() => {\n if (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n alignToModelValue();\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(async () => {\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 + 10}px`;\n /**\n * Run until all transitions inside have completed\n */\n await wait(30);\n if (header.value && body.value && footer.value) {\n const contentHeight2 =\n header.value.scrollHeight +\n body.value.scrollHeight +\n footer.value.scrollHeight +\n 20;\n if (contentHeight !== contentHeight2) onContentGrow();\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","currentlyOpenModals","alignToModelValue","waitFor","scrollBarWidth","wait","watchPostEffect","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,GA6E7EE,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;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,OAAO,CAAC;AAAA,IACR,YAAY,EAAE,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