bitboss-ui 2.0.72 → 2.0.74

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 (142) hide show
  1. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +5 -0
  2. package/dist/components/BbPagination/BbPagination.vue.d.ts +5 -0
  3. package/dist/index106.js +16 -16
  4. package/dist/index108.js +52 -57
  5. package/dist/index110.js +59 -60
  6. package/dist/index118.js +1 -1
  7. package/dist/index120.js +56 -57
  8. package/dist/index122.js +1 -1
  9. package/dist/index126.js +21 -19
  10. package/dist/index127.js +1 -1
  11. package/dist/index128.js +1 -1
  12. package/dist/index13.js +1 -1
  13. package/dist/index130.js +1 -1
  14. package/dist/index132.js +2 -2
  15. package/dist/index15.js +4 -4
  16. package/dist/index17.js +3 -3
  17. package/dist/index19.js +2 -2
  18. package/dist/index204.js +2 -81
  19. package/dist/index205.js +53 -2
  20. package/dist/index207.js +13 -2
  21. package/dist/index208.js +20 -4
  22. package/dist/index209.js +4 -2
  23. package/dist/index21.js +14 -14
  24. package/dist/index210.js +3 -53
  25. package/dist/index211.js +83 -0
  26. package/dist/index212.js +5 -13
  27. package/dist/index213.js +15 -19
  28. package/dist/index214.js +16 -4
  29. package/dist/index215.js +17 -162
  30. package/dist/index216.js +19 -84
  31. package/dist/index217.js +29 -0
  32. package/dist/index218.js +3 -3
  33. package/dist/index219.js +2 -41
  34. package/dist/index220.js +7 -5
  35. package/dist/index221.js +249 -7
  36. package/dist/index222.js +49 -123
  37. package/dist/index223.js +44 -5
  38. package/dist/index224.js +5 -125
  39. package/dist/index225.js +60 -19
  40. package/dist/index226.js +2 -16
  41. package/dist/index227.js +4 -16
  42. package/dist/index228.js +2 -2
  43. package/dist/index229.js +126 -2
  44. package/dist/index23.js +15 -15
  45. package/dist/index230.js +125 -5
  46. package/dist/index231.js +2 -369
  47. package/dist/index232.js +41 -3
  48. package/dist/index233.js +6 -19
  49. package/dist/index234.js +5 -27
  50. package/dist/index235.js +369 -3
  51. package/dist/index236.js +3 -249
  52. package/dist/index237.js +7 -52
  53. package/dist/index238.js +163 -43
  54. package/dist/index239.js +84 -5
  55. package/dist/index241.js +1 -1
  56. package/dist/index243.js +1 -1
  57. package/dist/index245.js +1 -1
  58. package/dist/index25.js +5 -5
  59. package/dist/index252.js +1 -1
  60. package/dist/index255.js +3 -9
  61. package/dist/index257.js +7 -3
  62. package/dist/index258.js +178 -0
  63. package/dist/index259.js +224 -7
  64. package/dist/index260.js +8 -175
  65. package/dist/index261.js +281 -66
  66. package/dist/index262.js +6 -2
  67. package/dist/index263.js +2 -9
  68. package/dist/index264.js +2 -3
  69. package/dist/index265.js +2 -12
  70. package/dist/index266.js +2 -9
  71. package/dist/index267.js +2 -17
  72. package/dist/index268.js +2 -4
  73. package/dist/index269.js +2 -431
  74. package/dist/index27.js +1 -1
  75. package/dist/index270.js +2 -89
  76. package/dist/index271.js +2 -281
  77. package/dist/index272.js +2 -6
  78. package/dist/index273.js +28 -2
  79. package/dist/index274.js +22 -2
  80. package/dist/index276.js +4 -2
  81. package/dist/index277.js +2 -2
  82. package/dist/index279.js +429 -20
  83. package/dist/index280.js +24 -0
  84. package/dist/index282.js +83 -218
  85. package/dist/index283.js +3 -436
  86. package/dist/index284.js +11 -126
  87. package/dist/index285.js +9 -2
  88. package/dist/index286.js +9 -2
  89. package/dist/index287.js +17 -2
  90. package/dist/index288.js +4 -2
  91. package/dist/index289.js +200 -2
  92. package/dist/index29.js +18 -19
  93. package/dist/index290.js +436 -2
  94. package/dist/index291.js +125 -26
  95. package/dist/index292.js +3 -22
  96. package/dist/index293.js +5 -0
  97. package/dist/index294.js +211 -5
  98. package/dist/index295.js +65 -2
  99. package/dist/index296.js +5 -3
  100. package/dist/index297.js +2 -211
  101. package/dist/index301.js +1 -1
  102. package/dist/index302.js +1 -1
  103. package/dist/index303.js +33 -79
  104. package/dist/index304.js +86 -0
  105. package/dist/index306.js +4 -2
  106. package/dist/index307.js +6 -32
  107. package/dist/index31.js +2 -2
  108. package/dist/index310.js +46 -6
  109. package/dist/index311.js +2 -11
  110. package/dist/index312.js +10 -46
  111. package/dist/{index313.js → index314.js} +2 -2
  112. package/dist/index315.js +1 -1
  113. package/dist/index316.js +47 -2
  114. package/dist/index317.js +2 -47
  115. package/dist/index33.js +2 -2
  116. package/dist/index35.js +3 -3
  117. package/dist/index37.js +9 -9
  118. package/dist/index39.js +3 -3
  119. package/dist/index41.js +2 -2
  120. package/dist/index43.js +2 -2
  121. package/dist/index45.js +4 -4
  122. package/dist/index47.js +2 -2
  123. package/dist/index49.js +2 -2
  124. package/dist/index55.js +1 -1
  125. package/dist/index57.js +1 -1
  126. package/dist/index59.js +21 -20
  127. package/dist/index61.js +21 -23
  128. package/dist/index75.js +45 -46
  129. package/dist/index79.js +2 -5
  130. package/dist/index81.js +1 -1
  131. package/dist/index84.js +2 -2
  132. package/dist/index86.js +27 -26
  133. package/dist/index88.js +85 -85
  134. package/dist/index90.js +1 -1
  135. package/dist/style.css +1 -1
  136. package/package.json +1 -1
  137. package/dist/index206.js +0 -10
  138. package/dist/index240.js +0 -62
  139. package/dist/index256.js +0 -6
  140. package/dist/index275.js +0 -4
  141. package/dist/index281.js +0 -202
  142. package/dist/index305.js +0 -6
package/dist/index61.js CHANGED
@@ -1,19 +1,18 @@
1
- import { defineComponent as f, ref as g, computed as c, useAttrs as v, toRef as B, openBlock as t, createBlock as a, unref as p, mergeProps as k, withCtx as C, createVNode as h, createCommentVNode as l, createElementVNode as L, normalizeClass as S, renderSlot as A, createTextVNode as V, toDisplayString as x, createElementBlock as F } from "vue";
1
+ import { defineComponent as _, ref as f, computed as c, useAttrs as g, toRef as v, openBlock as t, createBlock as a, unref as p, mergeProps as B, withCtx as k, createVNode as C, createCommentVNode as l, createElementVNode as h, normalizeClass as L, renderSlot as S, createTextVNode as V, toDisplayString as x, createElementBlock as F } from "vue";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import N from "./index13.js";
5
5
  /* empty css */
6
6
  import r from "./index126.js";
7
7
  /* empty css */
8
- import $ from "./index128.js";
8
+ import P from "./index128.js";
9
9
  /* empty css */
10
- import { pickBy as P } from "./index248.js";
11
- import { noop as T } from "./index249.js";
12
- const W = {
10
+ import { pickBy as $ } from "./index248.js";
11
+ import { noop as A } from "./index249.js";
12
+ const T = {
13
13
  key: 2,
14
14
  class: "bb-button__loading-label sr-only"
15
- }, J = /* @__PURE__ */ f({
16
- inheritAttrs: !1,
15
+ }, H = /* @__PURE__ */ _({
17
16
  __name: "BbButton",
18
17
  props: {
19
18
  autoLoading: { type: Boolean },
@@ -51,12 +50,12 @@ const W = {
51
50
  type: {}
52
51
  },
53
52
  setup(d) {
54
- const e = d, i = g(0), n = c(
53
+ const e = d, i = f(0), n = c(
55
54
  () => e.loading || !!i.value && e.autoLoading
56
- ), u = c(() => e.disabled), { onClick: b = T, ...m } = v(), y = async (...o) => {
57
- n.value && e.disabledWhileLoading || (i.value++, await b(...o), i.value--);
58
- }, _ = B(() => ({
59
- ...P(
55
+ ), u = c(() => e.disabled), { onClick: b = A } = g(), m = async (o) => {
56
+ o.stopImmediatePropagation(), !(n.value && e.disabledWhileLoading) && (i.value++, await b(o), i.value--);
57
+ }, y = v(() => ({
58
+ ...$(
60
59
  e,
61
60
  (o, s) => ![
62
61
  "append:icon",
@@ -67,10 +66,9 @@ const W = {
67
66
  "loading",
68
67
  "prepend:icon"
69
68
  ].includes(s)
70
- ),
71
- ...m
69
+ )
72
70
  }));
73
- return (o, s) => (t(), a(p(N), k(_.value, {
71
+ return (o, s) => (t(), a(p(N), B(y.value, {
74
72
  "aria-disabled": n.value ? !0 : void 0,
75
73
  class: {
76
74
  "bb-button": !0,
@@ -79,10 +77,10 @@ const W = {
79
77
  },
80
78
  disabled: u.value,
81
79
  tabindex: n.value ? -1 : void 0,
82
- onClick: y
80
+ onClick: m
83
81
  }), {
84
- default: C(() => [
85
- h(p($), { class: "bb-button__spinner" }),
82
+ default: k(() => [
83
+ C(p(P), { class: "bb-button__spinner" }),
86
84
  e.icon ? (t(), a(r, {
87
85
  key: 0,
88
86
  class: "bb-button__icon",
@@ -92,14 +90,14 @@ const W = {
92
90
  class: "bb-button__prepend-icon",
93
91
  type: e["prepend:icon"]
94
92
  }, null, 8, ["type"])) : l("", !0),
95
- L("span", {
96
- class: S(["bb-button__content", { "sr-only": !!o.icon }])
93
+ h("span", {
94
+ class: L(["bb-button__content", { "sr-only": !!o.icon }])
97
95
  }, [
98
- A(o.$slots, "default", {}, () => [
96
+ S(o.$slots, "default", {}, () => [
99
97
  V(x(o.text), 1)
100
98
  ])
101
99
  ], 2),
102
- n.value ? (t(), F("span", W, "caricamento")) : l("", !0),
100
+ n.value ? (t(), F("span", T, "caricamento")) : l("", !0),
103
101
  !o.icon && e["append:icon"] ? (t(), a(r, {
104
102
  key: 3,
105
103
  class: "bb-button__append-icon",
@@ -111,5 +109,5 @@ const W = {
111
109
  }
112
110
  });
113
111
  export {
114
- J as default
112
+ H as default
115
113
  };
package/dist/index75.js CHANGED
@@ -1,12 +1,12 @@
1
- import { defineComponent as Q, defineAsyncComponent as W, computed as A, ref as g, openBlock as $, createElementBlock as D, mergeProps as B, createElementVNode as O, renderSlot as w, normalizeProps as X, guardReactiveProps as Y, unref as h, createBlock as Z, withCtx as K, normalizeStyle as _, Fragment as P, renderList as x, createVNode as ee, createCommentVNode as te } from "vue";
1
+ import { defineComponent as W, defineAsyncComponent as X, computed as A, ref as w, openBlock as T, createElementBlock as D, mergeProps as C, createElementVNode as B, renderSlot as g, normalizeProps as Y, guardReactiveProps as Z, unref as h, createVNode as O, withCtx as K, normalizeStyle as _, Fragment as P, renderList as x } from "vue";
2
2
  import { findRightIndex as H } from "./index253.js";
3
- import { useId as ne } from "./index8.js";
4
- import { wait as oe } from "./index131.js";
5
- import { useIntersectionObserver as ae } from "./index132.js";
6
- import le from "./index13.js";
3
+ import { useId as ee } from "./index8.js";
4
+ import { wait as te } from "./index131.js";
5
+ import { useIntersectionObserver as ne } from "./index132.js";
6
+ import oe from "./index13.js";
7
7
  /* empty css */
8
- import N from "./index254.js";
9
- const me = /* @__PURE__ */ Q({
8
+ import j from "./index254.js";
9
+ const fe = /* @__PURE__ */ W({
10
10
  __name: "BbDropdown",
11
11
  props: {
12
12
  arrowPadding: { default: 10 },
@@ -22,44 +22,44 @@ const me = /* @__PURE__ */ Q({
22
22
  items: {},
23
23
  width: { default: 200 }
24
24
  },
25
- setup(V) {
26
- const j = W(
25
+ setup(z) {
26
+ const N = X(
27
27
  () => import("./index252.js")
28
- ), r = V, d = r.id ?? `bb_${ne().id.value}`, m = A(() => {
28
+ ), r = z, d = r.id ?? `bb_${ee().id.value}`, m = A(() => {
29
29
  let e = r.items.findIndex((t) => !t.disabled), o = H(
30
30
  r.items,
31
31
  (t) => !t.disabled
32
32
  );
33
33
  return r.items.map((t, n) => {
34
- const i = `${d}-item-${t.key}`, { onClick: F, ...q } = t, G = async () => {
34
+ const i = `${d}-item-${t.key}`, { onClick: F, ...q } = t, J = async () => {
35
35
  await b();
36
36
  const s = document.querySelector(`#${d}`);
37
37
  if (s) s instanceof HTMLElement && s.focus();
38
38
  else return;
39
39
  F && F();
40
- }, J = (s) => {
40
+ }, Q = (s) => {
41
41
  if (s.target instanceof HTMLElement && s.target.dataset.dropdownItem) {
42
42
  if (!a.value) return;
43
43
  if (s.key === "ArrowDown") {
44
44
  if (s.preventDefault(), a.value && n !== o) {
45
45
  const u = a.value.querySelector(
46
- N.map((y) => `#${i} ~ ${y}`).join(",")
46
+ j.map((y) => `#${i} ~ ${y}`).join(",")
47
47
  );
48
48
  u && u instanceof HTMLElement && u.focus();
49
49
  }
50
50
  } else if (s.key === "ArrowUp") {
51
51
  if (s.preventDefault(), a.value && n !== e) {
52
- const u = H(r.items, (E, T) => T < n && !E.disabled), k = Array.from(
52
+ const u = H(r.items, (E, L) => L < n && !E.disabled), k = Array.from(
53
53
  a.value.querySelectorAll(".bb-dropdown__item")
54
54
  )[u];
55
55
  k && k instanceof HTMLElement && k.focus();
56
56
  }
57
57
  } else if (s.key === "Tab") {
58
58
  if (n === o && !s.shiftKey) {
59
- const u = N.join(","), y = Array.from(
59
+ const u = j.join(","), y = Array.from(
60
60
  document.querySelectorAll(u)
61
61
  ), k = y.findIndex(
62
- (T) => T.id === d
62
+ (L) => L.id === d
63
63
  ), E = y[k + 1];
64
64
  if (E) E instanceof HTMLElement && (s.preventDefault(), b(), E.focus());
65
65
  else return;
@@ -75,34 +75,34 @@ const me = /* @__PURE__ */ Q({
75
75
  ...q,
76
76
  disabled: q.disabled || r.disabled,
77
77
  id: i,
78
- onClick: G,
79
- onKeydown: J
78
+ onClick: J,
79
+ onKeydown: Q
80
80
  };
81
81
  });
82
- }), v = g(), a = g();
83
- ae(
82
+ }), v = w(), a = w();
83
+ ne(
84
84
  v,
85
85
  ([{ intersectionRatio: e }]) => {
86
86
  e !== 1 && l.value && b();
87
87
  },
88
88
  { threshold: [0, 1] }
89
89
  );
90
- const c = g(!1), l = g(!1), f = g(!1), p = g(!0), z = () => {
91
- c.value || f.value || (l.value ? b() : L());
92
- }, R = async (e) => {
90
+ const c = w(!1), l = w(!1), f = w(!1), p = w(!0), R = () => {
91
+ c.value || f.value || (l.value ? b() : $());
92
+ }, U = async (e) => {
93
93
  let o = r.items.findIndex((n) => !n.disabled), t = H(
94
94
  r.items,
95
95
  (n) => !n.disabled
96
96
  );
97
97
  if (e.key === "ArrowDown") {
98
98
  if (e.preventDefault(), f.value || c.value) return;
99
- if (p.value && await L(), a.value && m.value.length && o !== -1) {
99
+ if (p.value && await $(), a.value && m.value.length && o !== -1) {
100
100
  const n = m.value[o].id, i = a.value.querySelector(`#${n}`);
101
101
  i && i instanceof HTMLElement && i.focus();
102
102
  }
103
103
  } else if (e.key === "ArrowUp") {
104
104
  if (e.preventDefault(), f.value || c.value) return;
105
- if (p.value && await L(), a.value && m.value.length && t !== -1) {
105
+ if (p.value && await $(), a.value && m.value.length && t !== -1) {
106
106
  const n = m.value[t].id, i = a.value.querySelector(`#${n}`);
107
107
  i && i instanceof HTMLElement && i.focus();
108
108
  }
@@ -131,29 +131,29 @@ const me = /* @__PURE__ */ Q({
131
131
  }
132
132
  b();
133
133
  }
134
- }, C = g(!1), L = async () => {
135
- C.value = !0, await oe(50), l.value = !0, document.addEventListener("click", I, { passive: !0 }), document.addEventListener("focusin", M, { passive: !0 }), document.addEventListener("keydown", S, { passive: !0 });
134
+ }, V = w(!1), $ = async () => {
135
+ V.value = !0, await te(50), l.value = !0, document.addEventListener("click", I, { passive: !0 }), document.addEventListener("focusin", M, { passive: !0 }), document.addEventListener("keydown", S, { passive: !0 });
136
136
  }, b = async () => {
137
137
  l.value = !1, document.removeEventListener("click", I), document.removeEventListener("focusin", M), document.removeEventListener("keydown", S);
138
- }, U = A(() => ({
138
+ }, G = A(() => ({
139
139
  class: {
140
140
  "bb-dropdown--block": r.block,
141
141
  [`bb-dropdown--theme-${r.theme}`]: r.theme
142
142
  }
143
143
  }));
144
- return (e, o) => ($(), D("span", B({ class: "bb-dropdown" }, U.value), [
145
- O("span", {
144
+ return (e, o) => (T(), D("span", C({ class: "bb-dropdown" }, G.value), [
145
+ B("span", {
146
146
  ref_key: "wrapper",
147
147
  ref: v,
148
148
  class: "bb-dropdown__wrapper"
149
149
  }, [
150
- w(e.$slots, "activator", X(Y({
150
+ g(e.$slots, "activator", Y(Z({
151
151
  props: {
152
152
  "aria-expanded": l.value,
153
153
  "aria-controls": `menu_${h(d)}`,
154
154
  id: h(d),
155
- onClick: z,
156
- onKeydown: R,
155
+ onClick: R,
156
+ onKeydown: U,
157
157
  disabled: e.disabled
158
158
  },
159
159
  closed: p.value,
@@ -164,8 +164,7 @@ const me = /* @__PURE__ */ Q({
164
164
  placement: e.placement
165
165
  })))
166
166
  ], 512),
167
- C.value || e.eager ? ($(), Z(h(j), {
168
- key: 0,
167
+ O(h(N), {
169
168
  "arrow-padding": e.arrowPadding,
170
169
  "base-class": "bb-dropdown",
171
170
  "container-attributes": {
@@ -183,13 +182,13 @@ const me = /* @__PURE__ */ Q({
183
182
  wrapper: v.value
184
183
  }, {
185
184
  default: K(() => [
186
- O("span", {
185
+ B("span", {
187
186
  ref_key: "content",
188
187
  ref: a,
189
188
  class: "bb-dropdown__items-container",
190
189
  style: _({ width: `${e.width}px` })
191
190
  }, [
192
- w(e.$slots, "prepend", {
191
+ g(e.$slots, "prepend", {
193
192
  closed: p.value,
194
193
  closing: f.value,
195
194
  disabled: e.disabled,
@@ -197,10 +196,10 @@ const me = /* @__PURE__ */ Q({
197
196
  opening: c.value,
198
197
  placement: e.placement
199
198
  }),
200
- ($(!0), D(P, null, x(m.value, (t, n) => ($(), D(P, {
199
+ (T(!0), D(P, null, x(m.value, (t, n) => (T(), D(P, {
201
200
  key: t.key
202
201
  }, [
203
- w(e.$slots, "item:prepend", {
202
+ g(e.$slots, "item:prepend", {
204
203
  closed: p.value,
205
204
  closing: f.value,
206
205
  disabled: t.disabled,
@@ -211,7 +210,7 @@ const me = /* @__PURE__ */ Q({
211
210
  placement: e.placement,
212
211
  text: t.text
213
212
  }),
214
- ee(le, B({
213
+ O(oe, C({
215
214
  "aria-role": "menuitem",
216
215
  class: ["bb-dropdown__item", {
217
216
  "bb-dropdown__item--first": n === 0,
@@ -221,7 +220,7 @@ const me = /* @__PURE__ */ Q({
221
220
  ref_for: !0
222
221
  }, t), {
223
222
  default: K(() => [
224
- w(e.$slots, t.key, {
223
+ g(e.$slots, t.key, {
225
224
  closed: p.value,
226
225
  closing: f.value,
227
226
  disabled: t.disabled,
@@ -232,7 +231,7 @@ const me = /* @__PURE__ */ Q({
232
231
  placement: e.placement,
233
232
  text: t.text
234
233
  }, () => [
235
- w(e.$slots, "item", {
234
+ g(e.$slots, "item", {
236
235
  closed: p.value,
237
236
  closing: f.value,
238
237
  disabled: t.disabled,
@@ -247,7 +246,7 @@ const me = /* @__PURE__ */ Q({
247
246
  ]),
248
247
  _: 2
249
248
  }, 1040, ["class"]),
250
- w(e.$slots, "item:append", {
249
+ g(e.$slots, "item:append", {
251
250
  closed: p.value,
252
251
  closing: f.value,
253
252
  disabled: t.disabled,
@@ -259,7 +258,7 @@ const me = /* @__PURE__ */ Q({
259
258
  text: t.text
260
259
  })
261
260
  ], 64))), 128)),
262
- w(e.$slots, "append", {
261
+ g(e.$slots, "append", {
263
262
  closed: p.value,
264
263
  closing: f.value,
265
264
  disabled: e.disabled,
@@ -270,10 +269,10 @@ const me = /* @__PURE__ */ Q({
270
269
  ], 4)
271
270
  ]),
272
271
  _: 3
273
- }, 8, ["arrow-padding", "container-attributes", "eager", "offset", "open", "padding", "placement", "theme", "transition-duration", "wrapper"])) : te("", !0)
272
+ }, 8, ["arrow-padding", "container-attributes", "eager", "offset", "open", "padding", "placement", "theme", "transition-duration", "wrapper"])
274
273
  ], 16));
275
274
  }
276
275
  });
277
276
  export {
278
- me as default
277
+ fe as default
279
278
  };
package/dist/index79.js CHANGED
@@ -3,10 +3,7 @@ import { findInTree as ae } from "./index251.js";
3
3
  import { useId as re } from "./index8.js";
4
4
  import oe from "./index127.js";
5
5
  /* empty css */
6
- const le = ["accept", "autofocus", "disabled", "multiple"], se = {
7
- "aria-hidden": "true",
8
- class: "bb-dropzone__submittable-label"
9
- }, ne = ["id", "disabled", "multiple", "name"], ie = { class: "bb-dropzone__errors" }, fe = /* @__PURE__ */ j({
6
+ const le = ["accept", "autofocus", "disabled", "multiple"], se = { class: "bb-dropzone__submittable-label" }, ne = ["id", "disabled", "multiple", "name"], ie = { class: "bb-dropzone__errors" }, fe = /* @__PURE__ */ j({
10
7
  __name: "BbDropzone",
11
8
  props: {
12
9
  autofocus: {},
@@ -196,7 +193,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
196
193
  id: Q(z),
197
194
  ref_key: "submittable",
198
195
  ref: d,
199
- class: "bb-dropzone__submittable-input sr-only",
196
+ class: "bb-dropzone__submittable-input",
200
197
  disabled: e.disabled,
201
198
  multiple: e.multiple,
202
199
  name: e.name,
package/dist/index81.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, openBlock as g, createBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
2
- import { throttle as c } from "./index218.js";
2
+ import { throttle as c } from "./index236.js";
3
3
  const M = /* @__PURE__ */ h({
4
4
  __name: "BbIntersection",
5
5
  props: {
package/dist/index84.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as te, ref as l, useAttrs as oe, getCurrentInstance as le, computed as p, nextTick as se, onBeforeUnmount as x, onMounted as ae, watch as ne, openBlock as g, createBlock as ie, Teleport as re, createElementVNode as s, mergeProps as O, createElementBlock as V, renderSlot as n, createTextVNode as ue, toDisplayString as S, createCommentVNode as z } from "vue";
2
- import { useFocusTrap as ce } from "./index219.js";
2
+ import { useFocusTrap as ce } from "./index232.js";
3
3
  import { useId as A } from "./index8.js";
4
4
  import { wait as E } from "./index131.js";
5
- import { useModalsState as b } from "./index221.js";
5
+ import { useModalsState as b } from "./index237.js";
6
6
  const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"], ge = /* @__PURE__ */ te({
7
7
  __name: "BbOffCanvas",
8
8
  props: {
package/dist/index86.js CHANGED
@@ -1,29 +1,30 @@
1
- import { defineComponent as A, computed as _, ref as g, onMounted as E, onBeforeUnmount as P, openBlock as y, createElementBlock as k, normalizeClass as C, createElementVNode as i, createVNode as V, unref as S, withCtx as h, renderSlot as b, Fragment as W, renderList as R, toDisplayString as M, nextTick as $ } from "vue";
2
- import { debounce as F } from "./index255.js";
1
+ import { defineComponent as P, computed as _, ref as g, onMounted as A, onBeforeUnmount as E, openBlock as y, createElementBlock as k, normalizeClass as C, createElementVNode as i, createVNode as V, unref as S, withCtx as h, renderSlot as v, Fragment as W, renderList as R, toDisplayString as M, nextTick as $ } from "vue";
2
+ import { debounce as F } from "./index260.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import w from "./index13.js";
6
6
  /* empty css */
7
- const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-label" }, G = { class: "bb-pagination__page-label" }, H = /* @__PURE__ */ A({
7
+ const T = ["aria-label"], D = { class: "bb-pagination__page-label" }, G = { class: "bb-pagination__page-label" }, H = /* @__PURE__ */ P({
8
8
  __name: "BbPagination",
9
9
  props: {
10
10
  disabled: { type: Boolean },
11
11
  loading: { type: Boolean },
12
12
  align: { default: "right" },
13
13
  ellipsis: { default: "..." },
14
+ label: { default: "Paginazione" },
14
15
  maxSize: { default: 6 },
15
16
  modelValue: { default: 1 },
16
17
  totalPages: { default: 1 }
17
18
  },
18
19
  emits: ["update:modelValue"],
19
- setup(x, { emit: B }) {
20
- const l = x, c = B, s = _(() => +l.totalPages), u = g(1), t = g(+l.maxSize), r = g(), d = g(), z = g(1 / 0), m = () => {
21
- r.value && d.value && (r.value.clientWidth < d.value.clientWidth ? t.value - 1 > 3 ? (t.value--, $(m)) : t.value = 3 : t.value < +l.maxSize && /* If there is enough space to fit one */
22
- r.value.clientWidth - d.value.clientWidth > z.value && (t.value = Math.min(t.value + 1, +l.maxSize), $(m)));
20
+ setup(B, { emit: x }) {
21
+ const l = B, c = x, s = _(() => +l.totalPages), u = g(1), t = g(+l.maxSize), r = g(), d = g(), z = g(1 / 0), f = () => {
22
+ r.value && d.value && (r.value.clientWidth < d.value.clientWidth ? t.value - 1 > 3 ? (t.value--, $(f)) : t.value = 3 : t.value < +l.maxSize && /* If there is enough space to fit one */
23
+ r.value.clientWidth - d.value.clientWidth > z.value && (t.value = Math.min(t.value + 1, +l.maxSize), $(f)));
23
24
  };
24
25
  if (globalThis.ResizeObserver) {
25
- const e = new ResizeObserver(F(m, 200));
26
- E(() => {
26
+ const e = new ResizeObserver(F(f, 200));
27
+ A(() => {
27
28
  if (r.value && d.value) {
28
29
  const a = r.value.querySelectorAll(
29
30
  ".bb-pagination__page"
@@ -34,41 +35,41 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
34
35
  }
35
36
  e.observe(r.value);
36
37
  }
37
- }), P(() => {
38
+ }), E(() => {
38
39
  e.disconnect();
39
40
  });
40
41
  }
41
- const N = _(() => {
42
+ const L = _(() => {
42
43
  if (s.value <= 0 || isNaN(s.value) || s.value > Number.MAX_SAFE_INTEGER)
43
44
  return [];
44
45
  if (t.value <= 1) return [l.modelValue];
45
46
  if (s.value <= t.value)
46
- return v(s.value, u.value);
47
+ return b(s.value, u.value);
47
48
  const e = t.value % 2 === 0, a = e ? t.value / 2 : Math.floor(t.value / 2), n = e ? a : a + 1, p = s.value - a;
48
49
  if (n - l.modelValue >= 0)
49
50
  return [
50
- ...v(Math.max(1, t.value - 1), u.value),
51
+ ...b(Math.max(1, t.value - 1), u.value),
51
52
  l.ellipsis,
52
53
  s.value
53
54
  ];
54
55
  if (l.modelValue - p >= (e ? 1 : 0)) {
55
- const o = t.value - 1, f = s.value - o + u.value;
56
+ const o = t.value - 1, m = s.value - o + u.value;
56
57
  return [
57
58
  u.value,
58
59
  l.ellipsis,
59
- ...v(o, f)
60
+ ...b(o, m)
60
61
  ];
61
62
  } else {
62
- const o = Math.max(1, t.value - 3), f = o === 1 ? l.modelValue : l.modelValue - Math.ceil(o / 2) + u.value;
63
+ const o = Math.max(1, t.value - 3), m = o === 1 ? l.modelValue : l.modelValue - Math.ceil(o / 2) + u.value;
63
64
  return [
64
65
  u.value,
65
66
  l.ellipsis,
66
- ...v(o, f),
67
+ ...b(o, m),
67
68
  l.ellipsis,
68
69
  s.value
69
70
  ];
70
71
  }
71
- }), L = _(() => N.value.map((e, a) => typeof e == "string" ? {
72
+ }), N = _(() => L.value.map((e, a) => typeof e == "string" ? {
72
73
  active: !1,
73
74
  key: `ellipsis-${a}`,
74
75
  page: e,
@@ -80,7 +81,7 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
80
81
  page: e,
81
82
  ellipsis: !1,
82
83
  disabled: !!l.disabled || +l.totalPages < 2 || l.loading
83
- })), v = (e, a = 0) => Array.from({ length: e }, (n, p) => a + p);
84
+ })), b = (e, a = 0) => Array.from({ length: e }, (n, p) => a + p);
84
85
  return (e, a) => (y(), k("div", {
85
86
  ref_key: "outercontainer",
86
87
  ref: r,
@@ -89,7 +90,7 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
89
90
  "bb-pagination--disabled": e.disabled
90
91
  }])
91
92
  }, [
92
- i("nav", T, [
93
+ i("nav", { "aria-label": e.label }, [
93
94
  i("ul", {
94
95
  ref_key: "innercontainer",
95
96
  ref: d,
@@ -102,7 +103,7 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
102
103
  onClick: a[0] || (a[0] = (n) => c("update:modelValue", l.modelValue - 1))
103
104
  }, {
104
105
  default: h(() => [
105
- b(e.$slots, "previous", {}, () => [
106
+ v(e.$slots, "previous", {}, () => [
106
107
  a[2] || (a[2] = i("span", { class: "bb-pagination__page-label sr-only" }, "Precedente", -1)),
107
108
  a[3] || (a[3] = i("svg", {
108
109
  class: "bb-pagination__page-chevron",
@@ -119,7 +120,7 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
119
120
  _: 3
120
121
  }, 8, ["disabled"])
121
122
  ]),
122
- (y(!0), k(W, null, R(L.value, (n) => (y(), k("li", {
123
+ (y(!0), k(W, null, R(N.value, (n) => (y(), k("li", {
123
124
  key: n.key
124
125
  }, [
125
126
  V(S(w), {
@@ -131,9 +132,9 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
131
132
  onClick: (p) => c("update:modelValue", n.key)
132
133
  }, {
133
134
  default: h(() => [
134
- n.ellipsis === !0 ? b(e.$slots, "ellipsis", { key: 0 }, () => [
135
+ n.ellipsis === !0 ? v(e.$slots, "ellipsis", { key: 0 }, () => [
135
136
  i("span", D, M(l.ellipsis), 1)
136
- ]) : b(e.$slots, "item", {
137
+ ]) : v(e.$slots, "item", {
137
138
  key: 1,
138
139
  active: n.active,
139
140
  disabled: n.disabled,
@@ -152,7 +153,7 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
152
153
  onClick: a[1] || (a[1] = (n) => c("update:modelValue", l.modelValue + 1))
153
154
  }, {
154
155
  default: h(() => [
155
- b(e.$slots, "next", {}, () => [
156
+ v(e.$slots, "next", {}, () => [
156
157
  a[4] || (a[4] = i("span", { class: "bb-pagination__page-label sr-only" }, "Successivo", -1)),
157
158
  a[5] || (a[5] = i("svg", {
158
159
  class: "bb-pagination__page-chevron",
@@ -170,7 +171,7 @@ const T = { "aria-label": "Navigazione" }, D = { class: "bb-pagination__page-lab
170
171
  }, 8, ["disabled"])
171
172
  ])
172
173
  ], 512)
173
- ])
174
+ ], 8, T)
174
175
  ], 2));
175
176
  }
176
177
  });