bitboss-ui 2.1.136 → 2.1.137
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/ai/BaseNumberInput.md +87 -10
- package/dist/ai/BbNumberInput.md +6 -0
- package/dist/components/BaseNumberInput/types.d.ts +4 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +2 -0
- package/dist/components/BbNumberInput/types.d.ts +4 -0
- package/dist/index109.js +9 -9
- package/dist/index110.js +18 -18
- package/dist/index118.js +1 -1
- package/dist/index124.js +3 -3
- package/dist/index126.js +14 -14
- package/dist/index134.js +2 -2
- package/dist/index136.js +4 -4
- package/dist/index138.js +1 -1
- package/dist/index14.js +1 -1
- package/dist/index142.js +2 -2
- package/dist/index146.js +1 -1
- package/dist/index148.js +2 -2
- package/dist/index150.js +1 -1
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +9 -9
- package/dist/index22.js +14 -14
- package/dist/index224.js +2 -138
- package/dist/index225.js +138 -2
- package/dist/index226.js +2 -2
- package/dist/index227.js +1 -1
- package/dist/index228.js +1 -1
- package/dist/index229.js +3 -86
- package/dist/index230.js +88 -0
- package/dist/index232.js +28 -15
- package/dist/index233.js +15 -49
- package/dist/index234.js +48 -15
- package/dist/index235.js +18 -3
- package/dist/index236.js +3 -12
- package/dist/index237.js +11 -17
- package/dist/index238.js +18 -8
- package/dist/index239.js +8 -4
- package/dist/index24.js +10 -10
- package/dist/index240.js +2 -13
- package/dist/index241.js +2 -20
- package/dist/index242.js +3 -34
- package/dist/index243.js +5 -2
- package/dist/index244.js +5 -2
- package/dist/index245.js +5 -3
- package/dist/index246.js +5 -5
- package/dist/index247.js +2 -5
- package/dist/index248.js +6 -5
- package/dist/index249.js +268 -5
- package/dist/index250.js +52 -5
- package/dist/index251.js +52 -5
- package/dist/index252.js +32 -3
- package/dist/index253.js +57 -157
- package/dist/index254.js +15 -0
- package/dist/index255.js +188 -5
- package/dist/index256.js +3 -2
- package/dist/index257.js +3 -5
- package/dist/index258.js +18 -266
- package/dist/index259.js +25 -52
- package/dist/index26.js +4 -4
- package/dist/index260.js +8 -52
- package/dist/index261.js +12 -31
- package/dist/index262.js +13 -60
- package/dist/index263.js +160 -7
- package/dist/index265.js +4 -3
- package/dist/index266.js +23 -4
- package/dist/index267.js +33 -9
- package/dist/index268.js +28 -44
- package/dist/index270.js +9 -25
- package/dist/index271.js +2 -188
- package/dist/index272.js +2 -3
- package/dist/index273.js +7 -2
- package/dist/index274.js +7 -3
- package/dist/index275.js +2 -4
- package/dist/index276.js +5 -373
- package/dist/index278.js +3 -8
- package/dist/index279.js +5 -13
- package/dist/index28.js +1 -1
- package/dist/index280.js +5 -13
- package/dist/index281.js +5 -11
- package/dist/index282.js +3 -18
- package/dist/index283.js +6 -11
- package/dist/index284.js +61 -100
- package/dist/index285.js +11 -0
- package/dist/index286.js +20 -99
- package/dist/index287.js +6 -0
- package/dist/index288.js +100 -101
- package/dist/index290.js +100 -33
- package/dist/index292.js +5 -0
- package/dist/index293.js +33 -8
- package/dist/index294.js +18 -23
- package/dist/index295.js +11 -7
- package/dist/index296.js +107 -6
- package/dist/index297.js +11 -16
- package/dist/index298.js +373 -9
- package/dist/index30.js +134 -105
- package/dist/index300.js +44 -3
- package/dist/index301.js +52 -20
- package/dist/index302.js +5 -66
- package/dist/index303.js +6 -2
- package/dist/index304.js +16 -7
- package/dist/index305.js +9 -7
- package/dist/index306.js +23 -6
- package/dist/index307.js +8 -5
- package/dist/index308.js +3 -2
- package/dist/index309.js +17 -3
- package/dist/index310.js +25 -14
- package/dist/index311.js +5 -28
- package/dist/index32.js +2 -2
- package/dist/index321.js +1 -1
- package/dist/index322.js +1 -1
- package/dist/index323.js +1 -1
- package/dist/index324.js +1 -1
- package/dist/index325.js +1 -1
- package/dist/index326.js +3 -5
- package/dist/index328.js +7 -125
- package/dist/index329.js +3 -2
- package/dist/index330.js +2 -15
- package/dist/index331.js +125 -2
- package/dist/index332.js +2 -19
- package/dist/index333.js +15 -2
- package/dist/index334.js +2 -3
- package/dist/index335.js +19 -3
- package/dist/index336.js +2 -5
- package/dist/index337.js +4 -4
- package/dist/index338.js +5 -0
- package/dist/index339.js +3 -7
- package/dist/index34.js +8 -8
- package/dist/index340.js +5 -3
- package/dist/index341.js +2 -3
- package/dist/index342.js +1 -1
- package/dist/index343.js +1 -1
- package/dist/index344.js +4 -719
- package/dist/index345.js +716 -363
- package/dist/index346.js +366 -57
- package/dist/index347.js +57 -2
- package/dist/index349.js +5 -7
- package/dist/index350.js +7 -5
- package/dist/index353.js +1 -1
- package/dist/index354.js +1 -1
- package/dist/index358.js +221 -86
- package/dist/index36.js +4 -4
- package/dist/index361.js +86 -221
- package/dist/index365.js +4 -4
- package/dist/index366.js +3 -3
- package/dist/index372.js +1 -1
- package/dist/index38.js +21 -21
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +8 -8
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index60.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index68.js +1 -1
- package/dist/index74.js +4 -4
- package/dist/index82.js +7 -7
- package/dist/index84.js +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index91.js +8 -6
- package/dist/index93.js +4 -4
- package/dist/index95.js +2 -2
- package/dist/index97.js +5 -5
- package/dist/index99.js +1 -1
- package/package.json +1 -1
- package/dist/index231.js +0 -32
- package/dist/index264.js +0 -4
- package/dist/index269.js +0 -55
- package/dist/index289.js +0 -25
- package/dist/index291.js +0 -30
- package/dist/index327.js +0 -6
- /package/dist/{index299.js → index277.js} +0 -0
package/dist/index30.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { clamp as
|
|
3
|
-
import { clampPrecision as
|
|
4
|
-
import { isNil as
|
|
5
|
-
import { isNotNil as
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as U, computed as z, ref as O, watchPostEffect as j, createBlock as x, openBlock as k, normalizeClass as H, withCtx as d, createVNode as X, unref as N, createElementVNode as J, createElementBlock as Q, createCommentVNode as Y, mergeProps as Z, withModifiers as _, renderSlot as m } from "vue";
|
|
2
|
+
import { clamp as g } from "./index226.js";
|
|
3
|
+
import { clampPrecision as ee } from "./index283.js";
|
|
4
|
+
import { isNil as y } from "./index272.js";
|
|
5
|
+
import { isNotNil as w } from "./index152.js";
|
|
6
|
+
import ne from "./index142.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
8
|
+
import te from "./index144.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
const
|
|
10
|
+
const oe = ["id", "aria-describedby", "aria-valuemax", "aria-valuemin", "aria-valuenow", "autocomplete", "autofocus", "disabled", "name", "placeholder", "readonly", "required"], ae = ["name", "value"], fe = /* @__PURE__ */ U({
|
|
11
11
|
__name: "BaseNumberInput",
|
|
12
12
|
props: {
|
|
13
13
|
"append:icon": {},
|
|
@@ -17,6 +17,7 @@ const H = ["id", "aria-describedby", "aria-valuemax", "aria-valuemin", "aria-val
|
|
|
17
17
|
clearable: { type: Boolean },
|
|
18
18
|
compact: { type: Boolean },
|
|
19
19
|
disabled: { type: Boolean },
|
|
20
|
+
enableFormatting: { type: Boolean },
|
|
20
21
|
hasErrors: { type: Boolean },
|
|
21
22
|
id: {},
|
|
22
23
|
loading: { type: Boolean },
|
|
@@ -32,139 +33,167 @@ const H = ["id", "aria-describedby", "aria-valuemax", "aria-valuemin", "aria-val
|
|
|
32
33
|
step: { default: 1 }
|
|
33
34
|
},
|
|
34
35
|
emits: ["blur", "change", "click", "decrease", "focus", "increase", "input", "keydown", "keyup", "mousedown", "mouseup", "update:modelValue"],
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
36
|
+
setup(E, { expose: v, emit: B }) {
|
|
37
|
+
const n = E, r = B, S = z(() => ({
|
|
37
38
|
"bb-base-number-input": !0,
|
|
38
|
-
"bb-base-number-input--disabled":
|
|
39
|
-
"bb-base-number-input--errors":
|
|
40
|
-
"bb-base-number-input--loading":
|
|
41
|
-
"bb-base-number-input--readonly":
|
|
42
|
-
"bb-base-number-input--compact":
|
|
43
|
-
})),
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
48
|
-
const e =
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
if (
|
|
52
|
-
const e =
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
a
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
39
|
+
"bb-base-number-input--disabled": n.disabled,
|
|
40
|
+
"bb-base-number-input--errors": n.hasErrors,
|
|
41
|
+
"bb-base-number-input--loading": n.loading,
|
|
42
|
+
"bb-base-number-input--readonly": n.readonly,
|
|
43
|
+
"bb-base-number-input--compact": n.compact
|
|
44
|
+
})), i = O(null), h = (e) => {
|
|
45
|
+
const a = Number(n.modelValue || 0);
|
|
46
|
+
return g(a + e, n.min, n.max);
|
|
47
|
+
}, s = () => {
|
|
48
|
+
if (n.disabled || n.readonly) return;
|
|
49
|
+
const e = h(n.step * -1);
|
|
50
|
+
r("decrease", e), r("update:modelValue", e);
|
|
51
|
+
}, u = () => {
|
|
52
|
+
if (n.disabled || n.readonly) return;
|
|
53
|
+
const e = h(n.step);
|
|
54
|
+
r("increase", e), r("update:modelValue", e);
|
|
55
|
+
}, F = (e) => {
|
|
56
|
+
if (i.value && e.target instanceof HTMLInputElement) {
|
|
57
|
+
const a = e.target;
|
|
58
|
+
let t = a.value;
|
|
59
|
+
r("input", e);
|
|
60
|
+
let p = 0;
|
|
61
|
+
if (n.enableFormatting) {
|
|
62
|
+
const l = a.selectionStart ?? t.length, { data: K, inputType: R } = e;
|
|
63
|
+
K === "." && !t.includes(",") ? t = `${t.slice(0, l - 1)},${t.slice(l)}` : R !== "insertText" && !t.includes(",") && /^[^.]*\.[^.]*$/.test(t) && !/\.\d{3}$/.test(t) && (t = t.replace(".", ",")), p = V(t.slice(0, l)), t = t.replaceAll(".", "");
|
|
64
|
+
}
|
|
65
|
+
let o = t;
|
|
66
|
+
o = M(o), o = A(o), o = T(o), o = I(o), $(o) && (o = C(o));
|
|
67
|
+
let c = null;
|
|
68
|
+
if (o) {
|
|
69
|
+
const l = D(o);
|
|
70
|
+
c = g(Number(l), n.min, n.max);
|
|
71
|
+
}
|
|
72
|
+
r("update:modelValue", c);
|
|
73
|
+
const G = ee(o, n.maxPrecision), b = f(G);
|
|
74
|
+
if (i.value.value = b, n.enableFormatting) {
|
|
75
|
+
let l = 0;
|
|
76
|
+
for (; l < b.length && V(b.slice(0, l)) < p; )
|
|
77
|
+
l++;
|
|
78
|
+
a.setSelectionRange(l, l);
|
|
64
79
|
}
|
|
65
|
-
a("update:modelValue", p);
|
|
66
|
-
const u = U(n, o.maxPrecision);
|
|
67
|
-
s.value.value = u;
|
|
68
80
|
}
|
|
69
|
-
},
|
|
70
|
-
e.key === "ArrowUp" ? (e.preventDefault(),
|
|
71
|
-
},
|
|
72
|
-
let [
|
|
73
|
-
return
|
|
74
|
-
},
|
|
75
|
-
onBlur: (e) =>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
}, V = (e) => e.replaceAll(/[^\d,-]/g, "").length, P = (e) => {
|
|
82
|
+
e.key === "ArrowUp" ? (e.preventDefault(), u()) : e.key === "ArrowDown" && (e.preventDefault(), s());
|
|
83
|
+
}, A = (e) => e.replaceAll(",", "."), T = (e) => [...e[0] + e.slice(1).replaceAll("-", "")].reduce((o, c) => (c === "." && o.includes(".") || o.push(c), o), []).join("").replaceAll(/[^\d.-]/g, ""), I = (e) => e.startsWith(".") && e.length === 1 ? "0." : e.startsWith("-.") && e.length === 2 ? "-0." : e, M = (e) => e.slice(0, 20), C = (e) => g(Number(e), n.min, n.max).toString(), $ = (e) => !(e.length === 0 || e.endsWith(".") || e.endsWith("-") || e.endsWith("-0") || /\.\d*0+$/.test(e)), D = (e) => {
|
|
84
|
+
let [a, t] = e.split(".");
|
|
85
|
+
return a = a || "0", t ? (t = t?.slice(0, n.maxPrecision) || "0", `${a}.${t}`) : a;
|
|
86
|
+
}, W = {
|
|
87
|
+
onBlur: (e) => {
|
|
88
|
+
n.enableFormatting && i.value && (i.value.value = f(n.modelValue)), r("blur", e);
|
|
89
|
+
},
|
|
90
|
+
onChange: (e) => r("change", e),
|
|
91
|
+
onClick: (e) => r("click", e),
|
|
92
|
+
onFocus: (e) => r("focus", e),
|
|
79
93
|
onKeydown: (e) => {
|
|
80
|
-
|
|
94
|
+
P(e), r("keydown", e);
|
|
81
95
|
},
|
|
82
|
-
onKeyup: (e) =>
|
|
83
|
-
onMousedown: (e) =>
|
|
84
|
-
onMouseup: (e) =>
|
|
85
|
-
},
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
onKeyup: (e) => r("keyup", e),
|
|
97
|
+
onMousedown: (e) => r("mousedown", e),
|
|
98
|
+
onMouseup: (e) => r("mouseup", e)
|
|
99
|
+
}, f = (e) => {
|
|
100
|
+
if (y(e)) return "";
|
|
101
|
+
if (!n.enableFormatting) return e.toString();
|
|
102
|
+
const a = typeof e == "number" ? e.toLocaleString("en-US", {
|
|
103
|
+
useGrouping: !1,
|
|
104
|
+
maximumFractionDigits: Math.min(n.maxPrecision, 20)
|
|
105
|
+
}) : e, [t, p] = a.split("."), o = t.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
106
|
+
return p === void 0 ? o : `${o},${p}`;
|
|
107
|
+
}, q = (e) => n.enableFormatting ? e.replaceAll(".", "").replace(",", ".") : e, L = (e) => {
|
|
108
|
+
if (y(i.value)) return;
|
|
109
|
+
if (n.enableFormatting && document.activeElement !== i.value) {
|
|
110
|
+
i.value.value = f(e);
|
|
89
111
|
return;
|
|
90
|
-
|
|
91
|
-
|
|
112
|
+
}
|
|
113
|
+
const a = q(i.value.value);
|
|
114
|
+
!y(e) && !$(a) && a.length > 0 || (i.value.value = f(e));
|
|
92
115
|
};
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
}),
|
|
96
|
-
increase:
|
|
97
|
-
decrease:
|
|
98
|
-
}), (e,
|
|
99
|
-
class:
|
|
116
|
+
return j(() => {
|
|
117
|
+
L(n.modelValue);
|
|
118
|
+
}), v({
|
|
119
|
+
increase: u,
|
|
120
|
+
decrease: s
|
|
121
|
+
}), (e, a) => (k(), x(te, {
|
|
122
|
+
class: H(S.value)
|
|
100
123
|
}, {
|
|
101
|
-
"prepend-outer":
|
|
102
|
-
|
|
103
|
-
decrease:
|
|
104
|
-
increase:
|
|
124
|
+
"prepend-outer": d(() => [
|
|
125
|
+
m(e.$slots, "prepend-outer", {
|
|
126
|
+
decrease: s,
|
|
127
|
+
increase: u
|
|
105
128
|
})
|
|
106
129
|
]),
|
|
107
|
-
"append-outer":
|
|
108
|
-
|
|
109
|
-
decrease:
|
|
110
|
-
increase:
|
|
130
|
+
"append-outer": d(() => [
|
|
131
|
+
m(e.$slots, "append-outer", {
|
|
132
|
+
decrease: s,
|
|
133
|
+
increase: u
|
|
111
134
|
})
|
|
112
135
|
]),
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
"append:icon":
|
|
116
|
-
clearable:
|
|
117
|
-
"prepend:icon":
|
|
118
|
-
"onClick:clear":
|
|
136
|
+
default: d(() => [
|
|
137
|
+
X(ne, {
|
|
138
|
+
"append:icon": n["append:icon"],
|
|
139
|
+
clearable: n.clearable && N(w)(e.modelValue),
|
|
140
|
+
"prepend:icon": n["prepend:icon"],
|
|
141
|
+
"onClick:clear": a[0] || (a[0] = (t) => e.$emit("update:modelValue", null))
|
|
119
142
|
}, {
|
|
120
|
-
prepend:
|
|
121
|
-
|
|
122
|
-
decrease:
|
|
123
|
-
increase:
|
|
143
|
+
prepend: d(() => [
|
|
144
|
+
m(e.$slots, "prepend", {
|
|
145
|
+
decrease: s,
|
|
146
|
+
increase: u
|
|
124
147
|
})
|
|
125
148
|
]),
|
|
126
|
-
prefix:
|
|
127
|
-
|
|
128
|
-
decrease:
|
|
129
|
-
increase:
|
|
149
|
+
prefix: d(() => [
|
|
150
|
+
m(e.$slots, "prefix", {
|
|
151
|
+
decrease: s,
|
|
152
|
+
increase: u
|
|
130
153
|
})
|
|
131
154
|
]),
|
|
132
|
-
append:
|
|
133
|
-
|
|
134
|
-
decrease:
|
|
135
|
-
increase:
|
|
155
|
+
append: d(() => [
|
|
156
|
+
m(e.$slots, "append", {
|
|
157
|
+
decrease: s,
|
|
158
|
+
increase: u
|
|
136
159
|
})
|
|
137
160
|
]),
|
|
138
|
-
suffix:
|
|
139
|
-
|
|
140
|
-
decrease:
|
|
141
|
-
increase:
|
|
161
|
+
suffix: d(() => [
|
|
162
|
+
m(e.$slots, "suffix", {
|
|
163
|
+
decrease: s,
|
|
164
|
+
increase: u
|
|
142
165
|
})
|
|
143
166
|
]),
|
|
144
|
-
default:
|
|
145
|
-
|
|
167
|
+
default: d(() => [
|
|
168
|
+
J("input", Z({
|
|
146
169
|
id: e.id,
|
|
147
170
|
ref_key: "input",
|
|
148
|
-
ref:
|
|
171
|
+
ref: i,
|
|
149
172
|
"aria-describedby": e.ariaDescribedby,
|
|
150
173
|
"aria-valuemax": e.max,
|
|
151
174
|
"aria-valuemin": e.min,
|
|
152
|
-
"aria-valuenow":
|
|
175
|
+
"aria-valuenow": N(w)(e.modelValue) ? e.modelValue : void 0,
|
|
153
176
|
autocomplete: e.autocomplete,
|
|
154
177
|
autofocus: e.autofocus,
|
|
155
178
|
class: "bb-base-number-input__input",
|
|
156
179
|
disabled: e.disabled,
|
|
157
180
|
inputmode: "decimal",
|
|
158
|
-
name: e.name,
|
|
181
|
+
name: e.enableFormatting ? void 0 : e.name,
|
|
159
182
|
placeholder: e.placeholder,
|
|
160
183
|
readonly: e.readonly,
|
|
161
184
|
required: e.required,
|
|
162
185
|
role: "spinbutton",
|
|
163
186
|
size: "1",
|
|
164
187
|
type: "text"
|
|
165
|
-
},
|
|
166
|
-
onInput:
|
|
167
|
-
}), null, 16,
|
|
188
|
+
}, W, {
|
|
189
|
+
onInput: _(F, ["stop"])
|
|
190
|
+
}), null, 16, oe),
|
|
191
|
+
e.enableFormatting && e.name ? (k(), Q("input", {
|
|
192
|
+
key: 0,
|
|
193
|
+
name: e.name,
|
|
194
|
+
type: "hidden",
|
|
195
|
+
value: e.modelValue ?? ""
|
|
196
|
+
}, null, 8, ae)) : Y("", !0)
|
|
168
197
|
]),
|
|
169
198
|
_: 3
|
|
170
199
|
}, 8, ["append:icon", "clearable", "prepend:icon"])
|
|
@@ -174,5 +203,5 @@ const H = ["id", "aria-describedby", "aria-valuemax", "aria-valuemin", "aria-val
|
|
|
174
203
|
}
|
|
175
204
|
});
|
|
176
205
|
export {
|
|
177
|
-
|
|
206
|
+
fe as default
|
|
178
207
|
};
|
package/dist/index300.js
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
};
|
|
1
|
+
import { computed as u, toValue as s, ref as m, reactive as v, watchEffect as I, onMounted as T, watch as h, onBeforeUnmount as w } from "vue";
|
|
2
|
+
import { useId as E } from "./index8.js";
|
|
3
|
+
const o = v(/* @__PURE__ */ new Map()), b = "[data-bb-table-id]";
|
|
4
|
+
function y(c) {
|
|
5
|
+
const p = E().id, r = u(() => s(c.id) || p.value), t = m(null), l = v({
|
|
6
|
+
id: r.value,
|
|
7
|
+
parentId: null,
|
|
8
|
+
tracks: {}
|
|
9
|
+
});
|
|
10
|
+
I(() => {
|
|
11
|
+
l.id = r.value, l.parentId = t.value, o.set(r.value, l);
|
|
12
|
+
});
|
|
13
|
+
const d = () => {
|
|
14
|
+
const e = s(c.container), a = s(c.inheritFrom);
|
|
15
|
+
let n = e?.parentElement?.closest(b) ?? null;
|
|
16
|
+
if (a)
|
|
17
|
+
for (; n && n.dataset.bbTableId !== a; )
|
|
18
|
+
n = n.parentElement?.closest(b) ?? null;
|
|
19
|
+
t.value = n?.dataset.bbTableId ?? null;
|
|
20
|
+
};
|
|
21
|
+
T(d), h(() => s(c.inheritFrom), d), w(() => o.delete(r.value));
|
|
22
|
+
const i = u(
|
|
23
|
+
() => t.value ? o.get(t.value) ?? null : null
|
|
24
|
+
), f = (e) => {
|
|
25
|
+
l.tracks = e;
|
|
26
|
+
}, k = u(() => {
|
|
27
|
+
const e = {};
|
|
28
|
+
for (const [a, n] of Object.entries(l.tracks))
|
|
29
|
+
e[`--bb-table-${r.value}-track-${a}`] = n;
|
|
30
|
+
return e;
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
id: r,
|
|
34
|
+
parentId: t,
|
|
35
|
+
parentNode: i,
|
|
36
|
+
parentHasTrack: (e) => !!i.value?.tracks[e],
|
|
37
|
+
parentVar: (e, a = "auto") => t.value ? `var(--bb-table-${t.value}-track-${e}, ${a})` : a,
|
|
38
|
+
node: l,
|
|
39
|
+
registry: o,
|
|
40
|
+
setTracks: f,
|
|
41
|
+
cssVars: k
|
|
42
|
+
};
|
|
43
|
+
}
|
|
3
44
|
export {
|
|
4
|
-
|
|
45
|
+
y as useTableWidthContext
|
|
5
46
|
};
|
package/dist/index301.js
CHANGED
|
@@ -1,23 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
l
|
|
1
|
+
import { useLogger as y } from "./index239.js";
|
|
2
|
+
const g = (t, i) => {
|
|
3
|
+
if (!i.length) return;
|
|
4
|
+
const n = Array.from(
|
|
5
|
+
t.querySelectorAll(":scope > thead th")
|
|
6
|
+
);
|
|
7
|
+
if (!n.length) return;
|
|
8
|
+
const { error: r } = y(), p = n.length, u = i.map((e) => ({
|
|
9
|
+
index: typeof e == "number" ? e : e.index,
|
|
10
|
+
position: typeof e == "number" ? "left" : e.position
|
|
11
|
+
})).sort((e, o) => e.position !== o.position ? e.position === "left" ? -1 : 1 : e.position === "left" ? e.index - o.index : o.index - e.index).reduce((e, o) => {
|
|
12
|
+
const l = n[o.index];
|
|
13
|
+
if (!l)
|
|
14
|
+
return r(
|
|
15
|
+
`BbTable fixedColumns: Cannot affix column at index ${o.index}. Table has ${p} columns (valid indices: 0–${p - 1}).`
|
|
16
|
+
), e;
|
|
17
|
+
const { width: c } = l.getBoundingClientRect(), m = e.filter((h) => h.position === o.position).reduce((h, x) => h + x.width, 0);
|
|
18
|
+
return e.push({
|
|
19
|
+
index: o.index,
|
|
20
|
+
position: o.position,
|
|
21
|
+
width: Math.floor(c),
|
|
22
|
+
offset: m
|
|
23
|
+
}), e;
|
|
24
|
+
}, []);
|
|
25
|
+
Array.from(
|
|
26
|
+
t.querySelectorAll(":scope > thead > tr, :scope > tbody > tr")
|
|
27
|
+
).forEach((e) => {
|
|
28
|
+
u.forEach((o) => {
|
|
29
|
+
const l = e.querySelector(
|
|
30
|
+
`:scope > :nth-child(${o.index + 1})`
|
|
31
|
+
);
|
|
32
|
+
l && (l.style.position = "sticky", l.style[o.position] = `${o.offset}px`);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}, d = (t) => Array.isArray(t) ? t : [t], w = (t) => t.split(/\W+/g).join("_").toLowerCase(), A = (t, i, n) => {
|
|
36
|
+
const r = [...d(t)];
|
|
37
|
+
return i && r.push(...d(i)), n && r.push(...d(n)), r;
|
|
38
|
+
}, $ = (t, i, n, r, p, a) => {
|
|
39
|
+
const f = [...d(t)], u = (s) => typeof s == "function" ? s(r, p, a) : s;
|
|
40
|
+
if (i) {
|
|
41
|
+
const s = u(i);
|
|
42
|
+
s && f.push(...d(s));
|
|
18
43
|
}
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
if (n) {
|
|
45
|
+
const s = u(n);
|
|
46
|
+
s && f.push(...d(s));
|
|
47
|
+
}
|
|
48
|
+
return f;
|
|
49
|
+
};
|
|
21
50
|
export {
|
|
22
|
-
|
|
51
|
+
g as applyFixedTableColumns,
|
|
52
|
+
w as columnKeyToSlotName,
|
|
53
|
+
$ as mergeCellClasses,
|
|
54
|
+
A as mergeHeaderClasses
|
|
23
55
|
};
|
package/dist/index302.js
CHANGED
|
@@ -1,69 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import C from "./index88.js";
|
|
6
|
-
/* empty css */
|
|
7
|
-
const w = { class: "bb-toast-message__icon-container" }, v = { class: "bb-toast-message__content" }, y = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "bb-toast-message__title"
|
|
10
|
-
}, B = { class: "bb-toast-message__text" }, z = /* @__PURE__ */ d({
|
|
11
|
-
__name: "BbToastMessage",
|
|
12
|
-
props: {
|
|
13
|
-
title: {},
|
|
14
|
-
text: {},
|
|
15
|
-
icon: {},
|
|
16
|
-
theme: { default: "default" },
|
|
17
|
-
id: {},
|
|
18
|
-
showClose: { type: Boolean }
|
|
19
|
-
},
|
|
20
|
-
emits: ["click:close"],
|
|
21
|
-
setup(r, { emit: c }) {
|
|
22
|
-
const m = r, p = c, { t: _ } = k(), b = () => {
|
|
23
|
-
p("click:close", m.id);
|
|
24
|
-
};
|
|
25
|
-
return (e, a) => (o(), l("div", {
|
|
26
|
-
"aria-atomic": "true",
|
|
27
|
-
"aria-live": "polite",
|
|
28
|
-
"aria-role": "alert",
|
|
29
|
-
class: u(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
|
|
30
|
-
}, [
|
|
31
|
-
t("div", w, [
|
|
32
|
-
e.icon ? (o(), i(C, {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "bb-toast-message__icon",
|
|
35
|
-
type: e.icon
|
|
36
|
-
}, null, 8, ["type"])) : s("", !0)
|
|
37
|
-
]),
|
|
38
|
-
t("div", v, [
|
|
39
|
-
e.showClose ? (o(), i(h, {
|
|
40
|
-
key: 0,
|
|
41
|
-
"aria-label": f(_)("common.closeLabel").value,
|
|
42
|
-
class: "bb-toast-message__close",
|
|
43
|
-
onClick: b
|
|
44
|
-
}, {
|
|
45
|
-
default: g(() => a[0] || (a[0] = [
|
|
46
|
-
t("svg", {
|
|
47
|
-
fill: "none",
|
|
48
|
-
viewBox: "0 0 24 24",
|
|
49
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
50
|
-
}, [
|
|
51
|
-
t("path", {
|
|
52
|
-
d: "M23 23L1 1M23 1L1 23",
|
|
53
|
-
stroke: "currentColor",
|
|
54
|
-
"stroke-linecap": "round",
|
|
55
|
-
"stroke-width": "2"
|
|
56
|
-
})
|
|
57
|
-
], -1)
|
|
58
|
-
])),
|
|
59
|
-
_: 1
|
|
60
|
-
}, 8, ["aria-label"])) : s("", !0),
|
|
61
|
-
e.title ? (o(), l("p", y, n(e.title), 1)) : s("", !0),
|
|
62
|
-
t("p", B, n(e.text), 1)
|
|
63
|
-
])
|
|
64
|
-
], 2));
|
|
65
|
-
}
|
|
1
|
+
const o = (e, t = 50) => new Promise((r) => {
|
|
2
|
+
const n = setInterval(() => {
|
|
3
|
+
e() && (clearInterval(n), r());
|
|
4
|
+
}, t);
|
|
66
5
|
});
|
|
67
6
|
export {
|
|
68
|
-
|
|
7
|
+
o as waitFor
|
|
69
8
|
};
|
package/dist/index303.js
CHANGED
package/dist/index304.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
const
|
|
2
|
-
if (
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const e = (o, r, f) => o.reduce((t, n) => {
|
|
2
|
+
if (t) return t;
|
|
3
|
+
if (f(n))
|
|
4
|
+
return n;
|
|
5
|
+
if (r in n) {
|
|
6
|
+
const i = e(
|
|
7
|
+
[].concat(n[r]),
|
|
8
|
+
r,
|
|
9
|
+
f
|
|
10
|
+
);
|
|
11
|
+
if (i)
|
|
12
|
+
return i;
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
}, null);
|
|
7
16
|
export {
|
|
8
|
-
|
|
17
|
+
e as findInTree
|
|
9
18
|
};
|
package/dist/index305.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
const o = (n, t) => {
|
|
2
|
+
for (let e = n.length - 1; e >= 0; e--) {
|
|
3
|
+
const i = n[e];
|
|
4
|
+
if (t(i, e, n))
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
return -1;
|
|
8
|
+
};
|
|
7
9
|
export {
|
|
8
|
-
o as
|
|
10
|
+
o as findRightIndex
|
|
9
11
|
};
|
package/dist/index306.js
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
const e = {
|
|
2
|
+
inert: ":not([inert]):not([inert] *)",
|
|
3
|
+
negTabIndex: ':not([tabindex^="-"])',
|
|
4
|
+
disabled: ":not(:disabled)"
|
|
5
|
+
}, n = [
|
|
6
|
+
`a[href]${e.inert}${e.negTabIndex}`,
|
|
7
|
+
`area[href]${e.inert}${e.negTabIndex}`,
|
|
8
|
+
`input:not([type="hidden"]):not([type="radio"])${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
9
|
+
`input[type="radio"]${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
10
|
+
`select${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
11
|
+
`textarea${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
12
|
+
`button${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
13
|
+
`details${e.inert} > summary:first-of-type${e.negTabIndex}`,
|
|
14
|
+
// Discard until Firefox supports `:has()`
|
|
15
|
+
// See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
|
|
16
|
+
// `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
|
|
17
|
+
`iframe${e.inert}${e.negTabIndex}`,
|
|
18
|
+
`audio[controls]${e.inert}${e.negTabIndex}`,
|
|
19
|
+
`video[controls]${e.inert}${e.negTabIndex}`,
|
|
20
|
+
`[contenteditable]${e.inert}${e.negTabIndex}`,
|
|
21
|
+
`[tabindex]${e.inert}${e.negTabIndex}`
|
|
22
|
+
];
|
|
6
23
|
export {
|
|
7
|
-
|
|
24
|
+
n as default
|
|
8
25
|
};
|
package/dist/index307.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const t = (o) => {
|
|
2
|
+
const r = [];
|
|
3
|
+
let e = [];
|
|
4
|
+
for (const s of o)
|
|
5
|
+
Array.isArray(s) ? (e.length && (r.push(e), e = []), s.length && r.push(s)) : e.push(s);
|
|
6
|
+
return e.length && r.push(e), r;
|
|
7
|
+
};
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
t as normalizeItemGroups
|
|
7
10
|
};
|
package/dist/index308.js
CHANGED
package/dist/index309.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { get as t } from "./index297.js";
|
|
2
|
+
const o = () => ({
|
|
3
|
+
getItemText(r, n) {
|
|
4
|
+
if (typeof r == "string" && !n) return r;
|
|
5
|
+
if (n) {
|
|
6
|
+
if (typeof n == "function") {
|
|
7
|
+
let f = n(r);
|
|
8
|
+
return typeof f != "string" && (f = JSON.stringify(f)), f;
|
|
9
|
+
} else if (typeof n == "string") {
|
|
10
|
+
const f = t(r, n);
|
|
11
|
+
return typeof f == "string" ? f : JSON.stringify(f);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return JSON.stringify(r);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
3
17
|
export {
|
|
4
|
-
o as
|
|
18
|
+
o as useItemText
|
|
5
19
|
};
|