bitboss-ui 2.0.161 → 2.0.163
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/BbPagination/BbPagination.vue.d.ts +19 -7
- package/dist/index100.js +9 -9
- package/dist/index111.js +11 -11
- package/dist/index119.js +2 -2
- package/dist/index121.js +6 -6
- package/dist/index123.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index133.js +1 -1
- package/dist/index134.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index208.js +5 -2
- package/dist/index209.js +16 -5
- package/dist/index21.js +16 -16
- package/dist/index210.js +10 -10
- package/dist/index211.js +18 -15
- package/dist/index212.js +12 -16
- package/dist/index213.js +17 -13
- package/dist/index214.js +22 -14
- package/dist/index215.js +3 -27
- package/dist/index216.js +2 -3
- package/dist/index217.js +8 -2
- package/dist/index218.js +248 -6
- package/dist/index219.js +42 -240
- package/dist/index220.js +35 -43
- package/dist/index221.js +5 -44
- package/dist/index222.js +60 -5
- package/dist/index223.js +12 -59
- package/dist/index224.js +125 -13
- package/dist/index225.js +2 -41
- package/dist/index226.js +41 -6
- package/dist/index227.js +20 -7
- package/dist/index228.js +5 -14
- package/dist/index229.js +92 -123
- package/dist/index23.js +26 -25
- package/dist/index231.js +64 -18
- package/dist/index233.js +15 -0
- package/dist/index234.js +2 -66
- package/dist/index235.js +11 -0
- package/dist/index236.js +3 -13
- package/dist/index237.js +86 -2
- package/dist/index239.js +26 -197
- package/dist/index240.js +19 -0
- package/dist/index241.js +49 -32
- package/dist/index242.js +15 -2
- package/dist/index243.js +12 -4
- package/dist/index244.js +16 -2
- package/dist/index245.js +4 -86
- package/dist/index246.js +202 -0
- package/dist/index248.js +2 -17
- package/dist/index249.js +4 -51
- package/dist/index25.js +5 -5
- package/dist/index250.js +2 -15
- package/dist/index251.js +34 -12
- package/dist/index252.js +7 -16
- package/dist/index253.js +15 -3
- package/dist/index254.js +2 -18
- package/dist/index255.js +2 -126
- package/dist/index256.js +2 -106
- package/dist/index257.js +20 -0
- package/dist/index258.js +124 -98
- package/dist/index259.js +108 -0
- package/dist/index261.js +83 -211
- package/dist/index263.js +11 -175
- package/dist/index264.js +228 -2
- package/dist/index265.js +369 -2
- package/dist/index266.js +174 -8
- package/dist/index267.js +9 -2
- package/dist/index268.js +3 -6
- package/dist/index269.js +8 -15
- package/dist/index27.js +1 -1
- package/dist/index270.js +23 -3
- package/dist/index271.js +3 -9
- package/dist/index272.js +6 -23
- package/dist/index273.js +16 -9
- package/dist/index283.js +1 -1
- package/dist/index284.js +1 -1
- package/dist/index285.js +1 -1
- package/dist/index286.js +1 -1
- package/dist/index29.js +2 -2
- package/dist/index291.js +2 -2
- package/dist/index293.js +2 -431
- package/dist/index294.js +431 -2
- package/dist/index295.js +3 -2
- package/dist/index296.js +1 -1
- package/dist/index298.js +226 -0
- package/dist/index299.js +1 -1
- package/dist/index300.js +14 -197
- package/dist/index301.js +9 -2
- package/dist/index302.js +199 -3
- package/dist/index303.js +3 -9
- package/dist/index304.js +4 -8
- package/dist/index305.js +2 -3
- package/dist/index306.js +8 -17
- package/dist/index307.js +2 -224
- package/dist/index309.js +1 -1
- package/dist/index31.js +2 -2
- package/dist/index310.js +1 -1
- package/dist/index311.js +1 -1
- package/dist/index314.js +5 -3
- package/dist/index315.js +2 -3
- package/dist/index316.js +65 -56
- package/dist/index317.js +88 -66
- package/dist/index318.js +3 -2
- package/dist/index319.js +3 -89
- package/dist/index320.js +57 -6
- package/dist/index321.js +6 -18
- package/dist/index322.js +17 -5
- package/dist/index323.js +58 -5
- package/dist/index324.js +58 -5
- package/dist/index325.js +479 -7
- package/dist/index326.js +8 -58
- package/dist/index327.js +6 -58
- package/dist/index328.js +7 -32
- package/dist/index329.js +5 -28
- package/dist/index33.js +8 -8
- package/dist/index330.js +10 -0
- package/dist/index331.js +7 -480
- package/dist/index332.js +32 -7
- package/dist/index333.js +28 -6
- package/dist/index336.js +2 -2
- package/dist/index337.js +1 -1
- package/dist/index339.js +1 -1
- package/dist/index340.js +2 -424
- package/dist/index341.js +424 -2
- package/dist/index35.js +4 -4
- package/dist/index37.js +22 -22
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +8 -8
- package/dist/index47.js +2 -2
- package/dist/index49.js +33 -26
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +3 -3
- package/dist/index75.js +3 -3
- package/dist/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +4 -4
- package/dist/index86.js +146 -91
- package/dist/index88.js +4 -4
- package/package.json +1 -1
- package/dist/index230.js +0 -4
- package/dist/index232.js +0 -96
- package/dist/index238.js +0 -6
- package/dist/index247.js +0 -31
- package/dist/index260.js +0 -14
- package/dist/index262.js +0 -371
- package/dist/index297.js +0 -5
- package/dist/index334.js +0 -10
package/dist/index49.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import
|
1
|
+
import { defineComponent as h, ref as V, computed as v, onMounted as B, onBeforeUnmount as M, watch as g, openBlock as i, createElementBlock as r, Fragment as w, createVNode as m, normalizeClass as $, withCtx as n, renderSlot as d, unref as C, mergeProps as b, createElementVNode as q } from "vue";
|
2
|
+
import E from "./index231.js";
|
3
3
|
/* empty css */
|
4
|
-
import
|
5
|
-
import { isNotNil as
|
6
|
-
import { MaskInput as
|
7
|
-
const
|
4
|
+
import I from "./index233.js";
|
5
|
+
import { isNotNil as N } from "./index135.js";
|
6
|
+
import { MaskInput as z } from "./index266.js";
|
7
|
+
const D = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type"], L = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type", "value"], U = /* @__PURE__ */ h({
|
8
8
|
__name: "BaseTextInput",
|
9
9
|
props: {
|
10
10
|
"append:icon": {},
|
@@ -29,8 +29,8 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
29
29
|
type: { default: "text" }
|
30
30
|
},
|
31
31
|
emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
32
|
-
setup(
|
33
|
-
const a =
|
32
|
+
setup(c, { emit: f }) {
|
33
|
+
const a = c, o = f, t = V(), y = v(() => ({
|
34
34
|
"bb-base-text-input": !0,
|
35
35
|
"bb-base-text-input--disabled": a.disabled,
|
36
36
|
"bb-base-text-input--errors": a.hasErrors,
|
@@ -38,15 +38,22 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
38
38
|
"bb-base-text-input--readonly": a.readonly,
|
39
39
|
"bb-base-text-input--compact": a.compact
|
40
40
|
}));
|
41
|
-
let
|
42
|
-
const
|
41
|
+
let u;
|
42
|
+
const k = (e) => {
|
43
43
|
a.mask && (e.detail.unmasked ? a.emitMasked ? o("update:modelValue", e.detail.masked) : o("update:modelValue", e.detail.unmasked) : o("update:modelValue", null));
|
44
|
+
}, s = (e) => {
|
45
|
+
t.value.value = e ?? "", u.updateValue(t.value);
|
44
46
|
};
|
45
|
-
|
46
|
-
a.mask && (
|
47
|
-
}),
|
48
|
-
a.mask && (
|
49
|
-
})
|
47
|
+
B(() => {
|
48
|
+
a.mask && (u = new z(t.value, a.mask), s(a.modelValue));
|
49
|
+
}), M(() => {
|
50
|
+
a.mask && (u == null || u.destroy());
|
51
|
+
}), g(
|
52
|
+
() => a.modelValue,
|
53
|
+
(e) => {
|
54
|
+
a.mask && s(e);
|
55
|
+
}
|
56
|
+
);
|
50
57
|
const p = {
|
51
58
|
onBlur: (e) => o("blur", e),
|
52
59
|
onChange: (e) => o("change", e),
|
@@ -63,9 +70,9 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
63
70
|
onMousedown: (e) => o("mousedown", e),
|
64
71
|
onMouseup: (e) => o("mouseup", e)
|
65
72
|
};
|
66
|
-
return (e, l) => (
|
67
|
-
|
68
|
-
class:
|
73
|
+
return (e, l) => (i(), r(w, null, [
|
74
|
+
m(I, {
|
75
|
+
class: $(y.value)
|
69
76
|
}, {
|
70
77
|
"prepend-outer": n(() => [
|
71
78
|
d(e.$slots, "prepend-outer")
|
@@ -74,11 +81,11 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
74
81
|
d(e.$slots, "append-outer")
|
75
82
|
]),
|
76
83
|
default: n(() => [
|
77
|
-
|
84
|
+
m(E, {
|
78
85
|
"append:icon": a["append:icon"],
|
79
|
-
clearable: a.clearable &&
|
86
|
+
clearable: a.clearable && C(N)(a.modelValue),
|
80
87
|
"prepend:icon": a["prepend:icon"],
|
81
|
-
"onClick:clear": l[0] || (l[0] = (
|
88
|
+
"onClick:clear": l[0] || (l[0] = (F) => e.$emit("update:modelValue", null))
|
82
89
|
}, {
|
83
90
|
prepend: n(() => [
|
84
91
|
d(e.$slots, "prepend")
|
@@ -93,7 +100,7 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
93
100
|
d(e.$slots, "suffix")
|
94
101
|
]),
|
95
102
|
default: n(() => [
|
96
|
-
e.mask ? (
|
103
|
+
e.mask ? (i(), r("input", b({
|
97
104
|
key: 0,
|
98
105
|
id: e.id,
|
99
106
|
ref_key: "input",
|
@@ -111,7 +118,7 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
111
118
|
required: e.required,
|
112
119
|
size: "1",
|
113
120
|
type: e.type
|
114
|
-
}, p, { onMaska:
|
121
|
+
}, p, { onMaska: k }), null, 16, D)) : (i(), r("input", b({
|
115
122
|
key: 1,
|
116
123
|
id: e.id,
|
117
124
|
ref_key: "input",
|
@@ -130,17 +137,17 @@ const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus"
|
|
130
137
|
size: "1",
|
131
138
|
type: e.type,
|
132
139
|
value: e.modelValue
|
133
|
-
}, p), null, 16,
|
140
|
+
}, p), null, 16, L))
|
134
141
|
]),
|
135
142
|
_: 3
|
136
143
|
}, 8, ["append:icon", "clearable", "prepend:icon"])
|
137
144
|
]),
|
138
145
|
_: 3
|
139
146
|
}, 8, ["class"]),
|
140
|
-
l[1] || (l[1] =
|
147
|
+
l[1] || (l[1] = q("span", null, null, -1))
|
141
148
|
], 64));
|
142
149
|
}
|
143
150
|
});
|
144
151
|
export {
|
145
|
-
|
152
|
+
U as default
|
146
153
|
};
|
package/dist/index53.js
CHANGED
package/dist/index55.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as b, computed as z, ref as o, onMounted as g, openBlock as l, createElementBlock as i, normalizeProps as _, guardReactiveProps as h, renderSlot as k } from "vue";
|
2
|
-
import { isCssColor as y } from "./
|
2
|
+
import { isCssColor as y } from "./index248.js";
|
3
3
|
import { wait as C } from "./index130.js";
|
4
4
|
const w = ["alt", "sizes", "src", "srcset"], B = {
|
5
5
|
key: 1,
|
package/dist/index57.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as p, useSlots as d, computed as n, openBlock as m, createElementBlock as u, normalizeClass as g, createElementVNode as s, renderSlot as l, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
|
2
|
-
import { isCssColor as r } from "./
|
3
|
-
import { isNil as B } from "./
|
2
|
+
import { isCssColor as r } from "./index248.js";
|
3
|
+
import { isNil as B } from "./index256.js";
|
4
4
|
const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, S = /* @__PURE__ */ p({
|
5
5
|
__name: "BbBadge",
|
6
6
|
props: {
|
package/dist/index61.js
CHANGED
@@ -7,9 +7,9 @@ import p from "./index127.js";
|
|
7
7
|
/* empty css */
|
8
8
|
import T from "./index129.js";
|
9
9
|
/* empty css */
|
10
|
-
import { pickBy as W } from "./
|
11
|
-
import { noop as w } from "./
|
12
|
-
import { useLocale as D } from "./
|
10
|
+
import { pickBy as W } from "./index267.js";
|
11
|
+
import { noop as w } from "./index268.js";
|
12
|
+
import { useLocale as D } from "./index223.js";
|
13
13
|
const E = {
|
14
14
|
key: 2,
|
15
15
|
class: "bb-button__loading-label sr-only"
|
package/dist/index75.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as X, computed as F, ref as y, openBlock as h, createElementBlock as D, mergeProps as A, createElementVNode as _, renderSlot as g, normalizeProps as Y, guardReactiveProps as Z, unref as $, createVNode as B, withCtx as O, normalizeStyle as x, Fragment as K, renderList as ee, createBlock as P, createCommentVNode as j, toDisplayString as te } from "vue";
|
2
|
-
import { findRightIndex as H } from "./
|
2
|
+
import { findRightIndex as H } from "./index269.js";
|
3
3
|
import { useId as ne } from "./index8.js";
|
4
4
|
import { wait as oe } from "./index130.js";
|
5
5
|
import { useIntersectionObserver as ae } from "./index132.js";
|
6
6
|
import le from "./index13.js";
|
7
7
|
/* empty css */
|
8
|
-
import N from "./
|
9
|
-
import se from "./
|
8
|
+
import N from "./index270.js";
|
9
|
+
import se from "./index229.js";
|
10
10
|
/* empty css */
|
11
11
|
import V from "./index127.js";
|
12
12
|
/* empty css */
|
package/dist/index77.js
CHANGED
@@ -9,7 +9,7 @@ import S from "./index127.js";
|
|
9
9
|
/* empty css */
|
10
10
|
import R from "./index129.js";
|
11
11
|
/* empty css */
|
12
|
-
import { useLocale as T } from "./
|
12
|
+
import { useLocale as T } from "./index223.js";
|
13
13
|
const Z = { class: "bb-dropdown-button__content" }, q = {
|
14
14
|
key: 1,
|
15
15
|
class: "bb-dropdown-button__loading-label sr-only"
|
package/dist/index79.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as j, ref as g, watch as x, computed as m, openBlock as V, createBlock as G, resolveDynamicComponent as K, normalizeClass as O, withCtx as M, createElementVNode as c, withModifiers as y, renderSlot as U, normalizeProps as Y, guardReactiveProps as Z, createTextVNode as J, unref as Q, createVNode as W, createElementBlock as F, Fragment as X, renderList as ee, toDisplayString as te } from "vue";
|
2
|
-
import { findInTree as ae } from "./
|
2
|
+
import { findInTree as ae } from "./index273.js";
|
3
3
|
import { useId as re } from "./index8.js";
|
4
4
|
import oe from "./index128.js";
|
5
5
|
/* empty css */
|
@@ -53,7 +53,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = { class: "bb-dr
|
|
53
53
|
const r = a.accept[t];
|
54
54
|
if (r.includes("/")) e.push(r);
|
55
55
|
else {
|
56
|
-
b || (b = (await import("./
|
56
|
+
b || (b = (await import("./index272.js")).default);
|
57
57
|
const o = b.getType(r);
|
58
58
|
if (!o)
|
59
59
|
throw new Error(
|
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 "./
|
2
|
+
import { throttle as c } from "./index271.js";
|
3
3
|
const M = /* @__PURE__ */ h({
|
4
4
|
__name: "BbIntersection",
|
5
5
|
props: {
|
package/dist/index84.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as ae, ref as l, useAttrs as ne, computed as u, getCurrentInstance as ie, nextTick as re, onBeforeUnmount as A, onMounted as ue, watch as ce, openBlock as g, createBlock as de, withCtx as fe, createElementVNode as s, mergeProps as E, createElementBlock as $, renderSlot as n, createTextVNode as ve, toDisplayString as H, unref as pe, createCommentVNode as T } from "vue";
|
2
|
-
import { useFocusTrap as be } from "./
|
2
|
+
import { useFocusTrap as be } from "./index226.js";
|
3
3
|
import { useId as I } from "./index8.js";
|
4
4
|
import { wait as D } from "./index130.js";
|
5
|
-
import { useModalsState as b } from "./
|
6
|
-
import me from "./
|
5
|
+
import { useModalsState as b } from "./index252.js";
|
6
|
+
import me from "./index253.js";
|
7
7
|
import { useMobile as ye } from "./index9.js";
|
8
|
-
import { useLocale as he } from "./
|
8
|
+
import { useLocale as he } from "./index223.js";
|
9
9
|
const ge = ["inert"], _e = { class: "bb-offcanvas-close" }, ke = ["aria-label"], De = /* @__PURE__ */ ae({
|
10
10
|
__name: "BbOffCanvas",
|
11
11
|
props: {
|
package/dist/index86.js
CHANGED
@@ -1,117 +1,183 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { debounce as T } from "./index273.js";
|
1
|
+
import { defineComponent as F, mergeModels as D, useModel as G, getCurrentInstance as O, computed as d, ref as f, onMounted as j, onBeforeUnmount as X, openBlock as w, createElementBlock as x, normalizeClass as H, createElementVNode as p, createVNode as P, unref as m, normalizeProps as $, guardReactiveProps as N, withCtx as q, renderSlot as h, toDisplayString as _, Fragment as J, renderList as K, mergeProps as Q, nextTick as E } from "vue";
|
3
2
|
/* empty css */
|
4
3
|
/* empty css */
|
5
|
-
import
|
4
|
+
import M from "./index13.js";
|
6
5
|
/* empty css */
|
7
|
-
import {
|
8
|
-
|
6
|
+
import { debounce as Y } from "./index235.js";
|
7
|
+
import { useLocale as Z } from "./index223.js";
|
8
|
+
import { useRoute as ee } from "./index137.js";
|
9
|
+
const ae = ["aria-label"], le = { class: "bb-pagination__page-label sr-only" }, te = { class: "bb-pagination__page-label" }, ne = { class: "bb-pagination__page-label" }, ie = { class: "bb-pagination__page-label sr-only" }, be = /* @__PURE__ */ F({
|
9
10
|
__name: "BbPagination",
|
10
|
-
props: {
|
11
|
+
props: /* @__PURE__ */ D({
|
11
12
|
disabled: { type: Boolean },
|
12
13
|
loading: { type: Boolean },
|
13
14
|
align: { default: "right" },
|
14
15
|
ellipsis: { default: "..." },
|
15
16
|
label: { default: "Paginazione" },
|
16
17
|
maxSize: { default: 6 },
|
17
|
-
|
18
|
+
navigation: { type: Boolean },
|
19
|
+
replace: { type: Boolean },
|
20
|
+
querykey: { default: "page" },
|
18
21
|
totalPages: { default: 1 }
|
19
|
-
},
|
22
|
+
}, {
|
23
|
+
modelValue: { default: 1 },
|
24
|
+
modelModifiers: {}
|
25
|
+
}),
|
20
26
|
emits: ["update:modelValue"],
|
21
|
-
setup(
|
22
|
-
|
23
|
-
|
24
|
-
|
27
|
+
setup(z) {
|
28
|
+
var C, A;
|
29
|
+
const a = z, { t: L } = Z(), n = G(z, "modelValue"), k = !!((A = (C = O()) == null ? void 0 : C.proxy) != null && A.$inertia), r = ee(), v = d(() => +a.totalPages), g = f(1), s = f(+a.maxSize), c = f(), b = f(), B = f(1 / 0), S = () => {
|
30
|
+
c.value && b.value && (c.value.clientWidth < b.value.clientWidth ? s.value - 1 > 3 ? (s.value--, E(S)) : s.value = 3 : s.value < +a.maxSize && /* If there is enough space to fit one */
|
31
|
+
c.value.clientWidth - b.value.clientWidth > B.value && (s.value = Math.min(s.value + 1, +a.maxSize), E(S)));
|
25
32
|
};
|
26
33
|
if (globalThis.ResizeObserver) {
|
27
|
-
const e = new ResizeObserver(
|
28
|
-
|
29
|
-
if (
|
30
|
-
const l =
|
34
|
+
const e = new ResizeObserver(Y(S, 200));
|
35
|
+
j(() => {
|
36
|
+
if (c.value && b.value) {
|
37
|
+
const l = c.value.querySelectorAll(
|
31
38
|
".bb-pagination__page"
|
32
39
|
)[1];
|
33
40
|
if (l) {
|
34
|
-
const
|
35
|
-
|
41
|
+
const o = getComputedStyle(b.value).columnGap.replaceAll(/\D/g, ""), i = Number(o);
|
42
|
+
B.value = l.clientWidth + i;
|
36
43
|
}
|
37
|
-
e.observe(
|
44
|
+
e.observe(c.value);
|
38
45
|
}
|
39
|
-
}),
|
46
|
+
}), X(() => {
|
40
47
|
e.disconnect();
|
41
48
|
});
|
42
49
|
}
|
43
|
-
const
|
44
|
-
if (
|
50
|
+
const T = d(() => {
|
51
|
+
if (v.value <= 0 || isNaN(v.value) || v.value > Number.MAX_SAFE_INTEGER)
|
45
52
|
return [];
|
46
|
-
if (
|
47
|
-
if (
|
48
|
-
return
|
49
|
-
const e =
|
50
|
-
if (
|
53
|
+
if (s.value <= 1) return [n.value];
|
54
|
+
if (v.value <= s.value)
|
55
|
+
return y(v.value, g.value);
|
56
|
+
const e = s.value % 2 === 0, l = e ? s.value / 2 : Math.floor(s.value / 2), t = e ? l : l + 1, o = v.value - l;
|
57
|
+
if (t - n.value >= 0)
|
51
58
|
return [
|
52
|
-
...
|
59
|
+
...y(Math.max(1, s.value - 1), g.value),
|
53
60
|
a.ellipsis,
|
54
|
-
|
61
|
+
v.value
|
55
62
|
];
|
56
|
-
if (
|
57
|
-
const
|
63
|
+
if (n.value - o >= (e ? 1 : 0)) {
|
64
|
+
const i = s.value - 1, u = v.value - i + g.value;
|
58
65
|
return [
|
59
|
-
|
66
|
+
g.value,
|
60
67
|
a.ellipsis,
|
61
|
-
...
|
68
|
+
...y(i, u)
|
62
69
|
];
|
63
70
|
} else {
|
64
|
-
const
|
71
|
+
const i = Math.max(1, s.value - 3), u = i === 1 ? n.value : n.value - Math.ceil(i / 2) + g.value;
|
65
72
|
return [
|
66
|
-
|
73
|
+
g.value,
|
67
74
|
a.ellipsis,
|
68
|
-
...
|
75
|
+
...y(i, u),
|
69
76
|
a.ellipsis,
|
70
|
-
|
77
|
+
v.value
|
71
78
|
];
|
72
79
|
}
|
73
|
-
}),
|
80
|
+
}), V = d(() => T.value.map((e, l) => typeof e == "string" ? {
|
74
81
|
active: !1,
|
75
82
|
key: `ellipsis-${l}`,
|
76
83
|
page: e,
|
77
84
|
ellipsis: !0,
|
78
85
|
disabled: !0
|
79
86
|
} : {
|
80
|
-
active: e ===
|
87
|
+
active: e === n.value,
|
81
88
|
key: e,
|
82
89
|
page: e,
|
83
90
|
ellipsis: !1,
|
84
91
|
disabled: !!a.disabled || +a.totalPages < 2 || a.loading
|
85
|
-
})),
|
86
|
-
|
92
|
+
})), y = (e, l = 0) => Array.from({ length: e }, (t, o) => l + o), W = d(() => {
|
93
|
+
var l, t, o;
|
94
|
+
const e = {
|
95
|
+
disabled: n.value <= 1 || a.loading || a.disabled,
|
96
|
+
onClick: () => {
|
97
|
+
n.value > 1 && (n.value = n.value - 1);
|
98
|
+
},
|
99
|
+
class: "bb-pagination__page bb-pagination__page--previous"
|
100
|
+
};
|
101
|
+
if (a.navigation) {
|
102
|
+
const i = (n.value - 1).toString();
|
103
|
+
if (k) {
|
104
|
+
const u = new URL(globalThis.location.href);
|
105
|
+
u.searchParams.set(a.querykey, i), e.href = u.toString();
|
106
|
+
} else r.value && (e.to = {
|
107
|
+
path: (l = r.value) == null ? void 0 : l.path,
|
108
|
+
params: (t = r.value) == null ? void 0 : t.params,
|
109
|
+
query: { ...(o = r.value) == null ? void 0 : o.query, [a.querykey]: i }
|
110
|
+
}, e.replace = a.replace);
|
111
|
+
}
|
112
|
+
return e;
|
113
|
+
}), I = (e) => {
|
114
|
+
var t, o, i;
|
115
|
+
const l = {
|
116
|
+
class: ["bb-pagination__page"],
|
117
|
+
disabled: e.disabled,
|
118
|
+
onClick: () => {
|
119
|
+
typeof e.key == "number" && (n.value = e.key);
|
120
|
+
}
|
121
|
+
};
|
122
|
+
if (e.active && l.class.push("bb-pagination__page--active"), e.ellipsis && l.class.push("bb-pagination__page--ellipsis"), a.navigation) {
|
123
|
+
const u = e.key.toString();
|
124
|
+
if (k) {
|
125
|
+
const R = new URL(globalThis.location.href);
|
126
|
+
R.searchParams.set(a.querykey, u), l.href = R.toString();
|
127
|
+
} else r.value && (l.to = {
|
128
|
+
path: (t = r.value) == null ? void 0 : t.path,
|
129
|
+
params: (o = r.value) == null ? void 0 : o.params,
|
130
|
+
query: { ...(i = r.value) == null ? void 0 : i.query, [a.querykey]: u }
|
131
|
+
}, l.replace = a.replace);
|
132
|
+
}
|
133
|
+
return l;
|
134
|
+
}, U = d(() => {
|
135
|
+
var l, t, o;
|
136
|
+
const e = {
|
137
|
+
disabled: n.value >= v.value || a.loading || a.disabled,
|
138
|
+
onClick: () => {
|
139
|
+
n.value < v.value && (n.value = n.value + 1);
|
140
|
+
},
|
141
|
+
class: "bb-pagination__page bb-pagination__page--next"
|
142
|
+
};
|
143
|
+
if (a.navigation) {
|
144
|
+
const i = (n.value + 1).toString();
|
145
|
+
if (k) {
|
146
|
+
const u = new URL(globalThis.location.href);
|
147
|
+
u.searchParams.set(a.querykey, i), e.href = u.toString();
|
148
|
+
} else r.value && (e.to = {
|
149
|
+
path: (l = r.value) == null ? void 0 : l.path,
|
150
|
+
params: (t = r.value) == null ? void 0 : t.params,
|
151
|
+
query: { ...(o = r.value) == null ? void 0 : o.query, [a.querykey]: i }
|
152
|
+
}, e.replace = a.replace);
|
153
|
+
}
|
154
|
+
return e;
|
155
|
+
});
|
156
|
+
return (e, l) => (w(), x("div", {
|
87
157
|
ref_key: "outercontainer",
|
88
|
-
ref:
|
89
|
-
class:
|
158
|
+
ref: c,
|
159
|
+
class: H(["bb-pagination", {
|
90
160
|
[`bb-pagination--${e.align}`]: !0,
|
91
161
|
"bb-pagination--disabled": e.disabled
|
92
162
|
}])
|
93
163
|
}, [
|
94
|
-
|
95
|
-
|
164
|
+
p("nav", { "aria-label": e.label }, [
|
165
|
+
p("ul", {
|
96
166
|
ref_key: "innercontainer",
|
97
|
-
ref:
|
167
|
+
ref: b,
|
98
168
|
class: "bb-pagination__pages"
|
99
169
|
}, [
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
default: w(() => [
|
107
|
-
c(e.$slots, "previous", {}, () => [
|
108
|
-
i("span", I, m(v(C)("pagination.previous").value), 1),
|
109
|
-
l[2] || (l[2] = i("svg", {
|
170
|
+
p("li", null, [
|
171
|
+
P(m(M), $(N(W.value)), {
|
172
|
+
default: q(() => [
|
173
|
+
h(e.$slots, "previous", {}, () => [
|
174
|
+
p("span", le, _(m(L)("pagination.previous").value), 1),
|
175
|
+
l[0] || (l[0] = p("svg", {
|
110
176
|
class: "bb-pagination__page-chevron",
|
111
177
|
viewBox: "0 0 24 24",
|
112
178
|
xmlns: "http://www.w3.org/2000/svg"
|
113
179
|
}, [
|
114
|
-
|
180
|
+
p("path", {
|
115
181
|
d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
|
116
182
|
fill: "currentColor"
|
117
183
|
})
|
@@ -119,49 +185,38 @@ const G = ["aria-label"], I = { class: "bb-pagination__page-label sr-only" }, O
|
|
119
185
|
])
|
120
186
|
]),
|
121
187
|
_: 3
|
122
|
-
},
|
188
|
+
}, 16)
|
123
189
|
]),
|
124
|
-
(
|
125
|
-
key:
|
190
|
+
(w(!0), x(J, null, K(V.value, (t) => (w(), x("li", {
|
191
|
+
key: t.key
|
126
192
|
}, [
|
127
|
-
|
128
|
-
|
129
|
-
"
|
130
|
-
|
131
|
-
|
132
|
-
disabled: n.disabled,
|
133
|
-
onClick: (p) => f("update:modelValue", n.key)
|
134
|
-
}, {
|
135
|
-
default: w(() => [
|
136
|
-
n.ellipsis === !0 ? c(e.$slots, "ellipsis", { key: 0 }, () => [
|
137
|
-
i("span", O, m(a.ellipsis), 1)
|
138
|
-
]) : c(e.$slots, "item", {
|
193
|
+
P(m(M), Q({ ref_for: !0 }, I(t)), {
|
194
|
+
default: q(() => [
|
195
|
+
t.ellipsis === !0 ? h(e.$slots, "ellipsis", { key: 0 }, () => [
|
196
|
+
p("span", te, _(a.ellipsis), 1)
|
197
|
+
]) : h(e.$slots, "item", {
|
139
198
|
key: 1,
|
140
|
-
active:
|
141
|
-
disabled:
|
142
|
-
item:
|
199
|
+
active: t.active,
|
200
|
+
disabled: t.disabled,
|
201
|
+
item: t.key
|
143
202
|
}, () => [
|
144
|
-
|
203
|
+
p("span", ne, _(t.key), 1)
|
145
204
|
])
|
146
205
|
]),
|
147
206
|
_: 2
|
148
|
-
},
|
207
|
+
}, 1040)
|
149
208
|
]))), 128)),
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
default: w(() => [
|
157
|
-
c(e.$slots, "next", {}, () => [
|
158
|
-
i("span", q, m(v(C)("pagination.next").value), 1),
|
159
|
-
l[3] || (l[3] = i("svg", {
|
209
|
+
p("li", null, [
|
210
|
+
P(m(M), $(N(U.value)), {
|
211
|
+
default: q(() => [
|
212
|
+
h(e.$slots, "next", {}, () => [
|
213
|
+
p("span", ie, _(m(L)("pagination.next").value), 1),
|
214
|
+
l[1] || (l[1] = p("svg", {
|
160
215
|
class: "bb-pagination__page-chevron",
|
161
216
|
viewBox: "0 0 24 24",
|
162
217
|
xmlns: "http://www.w3.org/2000/svg"
|
163
218
|
}, [
|
164
|
-
|
219
|
+
p("path", {
|
165
220
|
d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
|
166
221
|
fill: "currentColor"
|
167
222
|
})
|
@@ -169,13 +224,13 @@ const G = ["aria-label"], I = { class: "bb-pagination__page-label sr-only" }, O
|
|
169
224
|
])
|
170
225
|
]),
|
171
226
|
_: 3
|
172
|
-
},
|
227
|
+
}, 16)
|
173
228
|
])
|
174
229
|
], 512)
|
175
|
-
], 8,
|
230
|
+
], 8, ae)
|
176
231
|
], 2));
|
177
232
|
}
|
178
233
|
});
|
179
234
|
export {
|
180
|
-
|
235
|
+
be as default
|
181
236
|
};
|
package/dist/index88.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { defineComponent as O, ref as n, computed as v, openBlock as y, createElementBlock as S, mergeProps as F, createElementVNode as p, renderSlot as k, normalizeProps as H, guardReactiveProps as V, createVNode as q, withCtx as T, createBlock as I, toDisplayString as W, unref as z, createCommentVNode as A, nextTick as R } from "vue";
|
2
|
-
import { useFocusTrap as j } from "./
|
2
|
+
import { useFocusTrap as j } from "./index226.js";
|
3
3
|
import { useId as G } from "./index8.js";
|
4
4
|
import { useIntersectionObserver as J } from "./index132.js";
|
5
|
-
import { waitFor as K } from "./
|
5
|
+
import { waitFor as K } from "./index228.js";
|
6
6
|
import Q from "./index13.js";
|
7
7
|
/* empty css */
|
8
|
-
import U from "./
|
8
|
+
import U from "./index229.js";
|
9
9
|
/* empty css */
|
10
|
-
import { useLocale as X } from "./
|
10
|
+
import { useLocale as X } from "./index223.js";
|
11
11
|
import { useDebounceFn as Y } from "./index206.js";
|
12
12
|
const Z = { class: "bb-popover__close-label sr-only" }, ce = /* @__PURE__ */ O({
|
13
13
|
__name: "BbPopover",
|
package/package.json
CHANGED
package/dist/index230.js
DELETED