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.
Files changed (176) hide show
  1. package/dist/ai/BaseNumberInput.md +87 -10
  2. package/dist/ai/BbNumberInput.md +6 -0
  3. package/dist/components/BaseNumberInput/types.d.ts +4 -0
  4. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +2 -0
  5. package/dist/components/BbNumberInput/types.d.ts +4 -0
  6. package/dist/index109.js +9 -9
  7. package/dist/index110.js +18 -18
  8. package/dist/index118.js +1 -1
  9. package/dist/index124.js +3 -3
  10. package/dist/index126.js +14 -14
  11. package/dist/index134.js +2 -2
  12. package/dist/index136.js +4 -4
  13. package/dist/index138.js +1 -1
  14. package/dist/index14.js +1 -1
  15. package/dist/index142.js +2 -2
  16. package/dist/index146.js +1 -1
  17. package/dist/index148.js +2 -2
  18. package/dist/index150.js +1 -1
  19. package/dist/index16.js +3 -3
  20. package/dist/index18.js +3 -3
  21. package/dist/index20.js +9 -9
  22. package/dist/index22.js +14 -14
  23. package/dist/index224.js +2 -138
  24. package/dist/index225.js +138 -2
  25. package/dist/index226.js +2 -2
  26. package/dist/index227.js +1 -1
  27. package/dist/index228.js +1 -1
  28. package/dist/index229.js +3 -86
  29. package/dist/index230.js +88 -0
  30. package/dist/index232.js +28 -15
  31. package/dist/index233.js +15 -49
  32. package/dist/index234.js +48 -15
  33. package/dist/index235.js +18 -3
  34. package/dist/index236.js +3 -12
  35. package/dist/index237.js +11 -17
  36. package/dist/index238.js +18 -8
  37. package/dist/index239.js +8 -4
  38. package/dist/index24.js +10 -10
  39. package/dist/index240.js +2 -13
  40. package/dist/index241.js +2 -20
  41. package/dist/index242.js +3 -34
  42. package/dist/index243.js +5 -2
  43. package/dist/index244.js +5 -2
  44. package/dist/index245.js +5 -3
  45. package/dist/index246.js +5 -5
  46. package/dist/index247.js +2 -5
  47. package/dist/index248.js +6 -5
  48. package/dist/index249.js +268 -5
  49. package/dist/index250.js +52 -5
  50. package/dist/index251.js +52 -5
  51. package/dist/index252.js +32 -3
  52. package/dist/index253.js +57 -157
  53. package/dist/index254.js +15 -0
  54. package/dist/index255.js +188 -5
  55. package/dist/index256.js +3 -2
  56. package/dist/index257.js +3 -5
  57. package/dist/index258.js +18 -266
  58. package/dist/index259.js +25 -52
  59. package/dist/index26.js +4 -4
  60. package/dist/index260.js +8 -52
  61. package/dist/index261.js +12 -31
  62. package/dist/index262.js +13 -60
  63. package/dist/index263.js +160 -7
  64. package/dist/index265.js +4 -3
  65. package/dist/index266.js +23 -4
  66. package/dist/index267.js +33 -9
  67. package/dist/index268.js +28 -44
  68. package/dist/index270.js +9 -25
  69. package/dist/index271.js +2 -188
  70. package/dist/index272.js +2 -3
  71. package/dist/index273.js +7 -2
  72. package/dist/index274.js +7 -3
  73. package/dist/index275.js +2 -4
  74. package/dist/index276.js +5 -373
  75. package/dist/index278.js +3 -8
  76. package/dist/index279.js +5 -13
  77. package/dist/index28.js +1 -1
  78. package/dist/index280.js +5 -13
  79. package/dist/index281.js +5 -11
  80. package/dist/index282.js +3 -18
  81. package/dist/index283.js +6 -11
  82. package/dist/index284.js +61 -100
  83. package/dist/index285.js +11 -0
  84. package/dist/index286.js +20 -99
  85. package/dist/index287.js +6 -0
  86. package/dist/index288.js +100 -101
  87. package/dist/index290.js +100 -33
  88. package/dist/index292.js +5 -0
  89. package/dist/index293.js +33 -8
  90. package/dist/index294.js +18 -23
  91. package/dist/index295.js +11 -7
  92. package/dist/index296.js +107 -6
  93. package/dist/index297.js +11 -16
  94. package/dist/index298.js +373 -9
  95. package/dist/index30.js +134 -105
  96. package/dist/index300.js +44 -3
  97. package/dist/index301.js +52 -20
  98. package/dist/index302.js +5 -66
  99. package/dist/index303.js +6 -2
  100. package/dist/index304.js +16 -7
  101. package/dist/index305.js +9 -7
  102. package/dist/index306.js +23 -6
  103. package/dist/index307.js +8 -5
  104. package/dist/index308.js +3 -2
  105. package/dist/index309.js +17 -3
  106. package/dist/index310.js +25 -14
  107. package/dist/index311.js +5 -28
  108. package/dist/index32.js +2 -2
  109. package/dist/index321.js +1 -1
  110. package/dist/index322.js +1 -1
  111. package/dist/index323.js +1 -1
  112. package/dist/index324.js +1 -1
  113. package/dist/index325.js +1 -1
  114. package/dist/index326.js +3 -5
  115. package/dist/index328.js +7 -125
  116. package/dist/index329.js +3 -2
  117. package/dist/index330.js +2 -15
  118. package/dist/index331.js +125 -2
  119. package/dist/index332.js +2 -19
  120. package/dist/index333.js +15 -2
  121. package/dist/index334.js +2 -3
  122. package/dist/index335.js +19 -3
  123. package/dist/index336.js +2 -5
  124. package/dist/index337.js +4 -4
  125. package/dist/index338.js +5 -0
  126. package/dist/index339.js +3 -7
  127. package/dist/index34.js +8 -8
  128. package/dist/index340.js +5 -3
  129. package/dist/index341.js +2 -3
  130. package/dist/index342.js +1 -1
  131. package/dist/index343.js +1 -1
  132. package/dist/index344.js +4 -719
  133. package/dist/index345.js +716 -363
  134. package/dist/index346.js +366 -57
  135. package/dist/index347.js +57 -2
  136. package/dist/index349.js +5 -7
  137. package/dist/index350.js +7 -5
  138. package/dist/index353.js +1 -1
  139. package/dist/index354.js +1 -1
  140. package/dist/index358.js +221 -86
  141. package/dist/index36.js +4 -4
  142. package/dist/index361.js +86 -221
  143. package/dist/index365.js +4 -4
  144. package/dist/index366.js +3 -3
  145. package/dist/index372.js +1 -1
  146. package/dist/index38.js +21 -21
  147. package/dist/index40.js +7 -7
  148. package/dist/index42.js +2 -2
  149. package/dist/index44.js +8 -8
  150. package/dist/index46.js +6 -6
  151. package/dist/index50.js +2 -2
  152. package/dist/index54.js +1 -1
  153. package/dist/index56.js +1 -1
  154. package/dist/index58.js +2 -2
  155. package/dist/index60.js +2 -2
  156. package/dist/index62.js +5 -5
  157. package/dist/index68.js +1 -1
  158. package/dist/index74.js +4 -4
  159. package/dist/index82.js +7 -7
  160. package/dist/index84.js +1 -1
  161. package/dist/index86.js +2 -2
  162. package/dist/index88.js +3 -3
  163. package/dist/index90.js +1 -1
  164. package/dist/index91.js +8 -6
  165. package/dist/index93.js +4 -4
  166. package/dist/index95.js +2 -2
  167. package/dist/index97.js +5 -5
  168. package/dist/index99.js +1 -1
  169. package/package.json +1 -1
  170. package/dist/index231.js +0 -32
  171. package/dist/index264.js +0 -4
  172. package/dist/index269.js +0 -55
  173. package/dist/index289.js +0 -25
  174. package/dist/index291.js +0 -30
  175. package/dist/index327.js +0 -6
  176. /package/dist/{index299.js → index277.js} +0 -0
package/dist/index30.js CHANGED
@@ -1,13 +1,13 @@
1
- import { defineComponent as M, computed as T, ref as W, watchPostEffect as q, createBlock as F, openBlock as K, normalizeClass as L, withCtx as i, createVNode as z, unref as h, createElementVNode as G, mergeProps as O, withModifiers as R, renderSlot as d } from "vue";
2
- import { clamp as c } from "./index225.js";
3
- import { clampPrecision as U } from "./index263.js";
4
- import { isNil as f } from "./index264.js";
5
- import { isNotNil as g } from "./index152.js";
6
- import j from "./index142.js";
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 x from "./index144.js";
8
+ import te from "./index144.js";
9
9
  /* empty css */
10
- const H = ["id", "aria-describedby", "aria-valuemax", "aria-valuemin", "aria-valuenow", "autocomplete", "autofocus", "disabled", "name", "placeholder", "readonly", "required"], re = /* @__PURE__ */ M({
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(V, { expose: N, emit: w }) {
36
- const o = V, a = w, k = T(() => ({
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": o.disabled,
39
- "bb-base-number-input--errors": o.hasErrors,
40
- "bb-base-number-input--loading": o.loading,
41
- "bb-base-number-input--readonly": o.readonly,
42
- "bb-base-number-input--compact": o.compact
43
- })), s = W(null), b = (e) => {
44
- const r = Number(o.modelValue || 0);
45
- return c(r + e, o.min, o.max);
46
- }, t = () => {
47
- if (o.disabled || o.readonly) return;
48
- const e = b(o.step * -1);
49
- a("decrease", e), a("update:modelValue", e);
50
- }, l = () => {
51
- if (o.disabled || o.readonly) return;
52
- const e = b(o.step);
53
- a("increase", e), a("update:modelValue", e);
54
- }, E = (e) => {
55
- if (s.value && e.target instanceof HTMLInputElement) {
56
- const r = e.target.value;
57
- a("input", e);
58
- let n = r;
59
- n = S(n), n = v(n), n = B(n), n = P(n), y(n) && (n = I(n));
60
- let p = null;
61
- if (n) {
62
- const m = A(n);
63
- p = c(Number(m), o.min, o.max);
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
- }, $ = (e) => {
70
- e.key === "ArrowUp" ? (e.preventDefault(), l()) : e.key === "ArrowDown" && (e.preventDefault(), t());
71
- }, v = (e) => e.replaceAll(",", "."), B = (e) => [...e[0] + e.slice(1).replaceAll("-", "")].reduce((u, m) => (m === "." && u.includes(".") || u.push(m), u), []).join("").replaceAll(/[^\d.-]/g, ""), P = (e) => e.startsWith(".") && e.length === 1 ? "0." : e.startsWith("-.") && e.length === 2 ? "-0." : e, S = (e) => e.slice(0, 20), I = (e) => c(Number(e), o.min, o.max).toString(), y = (e) => !(e.length === 0 || e.endsWith(".") || e.endsWith("-") || e.endsWith("-0") || /\.\d*0+$/.test(e)), A = (e) => {
72
- let [r, n] = e.split(".");
73
- return r = r || "0", n ? (n = n?.slice(0, o.maxPrecision) || "0", `${r}.${n}`) : r;
74
- }, C = {
75
- onBlur: (e) => a("blur", e),
76
- onChange: (e) => a("change", e),
77
- onClick: (e) => a("click", e),
78
- onFocus: (e) => a("focus", e),
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
- $(e), a("keydown", e);
94
+ P(e), r("keydown", e);
81
95
  },
82
- onKeyup: (e) => a("keyup", e),
83
- onMousedown: (e) => a("mousedown", e),
84
- onMouseup: (e) => a("mouseup", e)
85
- }, D = (e) => {
86
- if (f(s.value)) return;
87
- const r = s.value.value;
88
- if (!f(e) && !y(r) && r.length > 0)
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
- let n = e;
91
- f(n) && (n = ""), s.value.value = n?.toString() || "";
112
+ }
113
+ const a = q(i.value.value);
114
+ !y(e) && !$(a) && a.length > 0 || (i.value.value = f(e));
92
115
  };
93
- return q(() => {
94
- D(o.modelValue);
95
- }), N({
96
- increase: l,
97
- decrease: t
98
- }), (e, r) => (K(), F(x, {
99
- class: L(k.value)
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": i(() => [
102
- d(e.$slots, "prepend-outer", {
103
- decrease: t,
104
- increase: l
124
+ "prepend-outer": d(() => [
125
+ m(e.$slots, "prepend-outer", {
126
+ decrease: s,
127
+ increase: u
105
128
  })
106
129
  ]),
107
- "append-outer": i(() => [
108
- d(e.$slots, "append-outer", {
109
- decrease: t,
110
- increase: l
130
+ "append-outer": d(() => [
131
+ m(e.$slots, "append-outer", {
132
+ decrease: s,
133
+ increase: u
111
134
  })
112
135
  ]),
113
- default: i(() => [
114
- z(j, {
115
- "append:icon": o["append:icon"],
116
- clearable: o.clearable && h(g)(e.modelValue),
117
- "prepend:icon": o["prepend:icon"],
118
- "onClick:clear": r[0] || (r[0] = (n) => e.$emit("update:modelValue", null))
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: i(() => [
121
- d(e.$slots, "prepend", {
122
- decrease: t,
123
- increase: l
143
+ prepend: d(() => [
144
+ m(e.$slots, "prepend", {
145
+ decrease: s,
146
+ increase: u
124
147
  })
125
148
  ]),
126
- prefix: i(() => [
127
- d(e.$slots, "prefix", {
128
- decrease: t,
129
- increase: l
149
+ prefix: d(() => [
150
+ m(e.$slots, "prefix", {
151
+ decrease: s,
152
+ increase: u
130
153
  })
131
154
  ]),
132
- append: i(() => [
133
- d(e.$slots, "append", {
134
- decrease: t,
135
- increase: l
155
+ append: d(() => [
156
+ m(e.$slots, "append", {
157
+ decrease: s,
158
+ increase: u
136
159
  })
137
160
  ]),
138
- suffix: i(() => [
139
- d(e.$slots, "suffix", {
140
- decrease: t,
141
- increase: l
161
+ suffix: d(() => [
162
+ m(e.$slots, "suffix", {
163
+ decrease: s,
164
+ increase: u
142
165
  })
143
166
  ]),
144
- default: i(() => [
145
- G("input", O({
167
+ default: d(() => [
168
+ J("input", Z({
146
169
  id: e.id,
147
170
  ref_key: "input",
148
- ref: s,
171
+ ref: i,
149
172
  "aria-describedby": e.ariaDescribedby,
150
173
  "aria-valuemax": e.max,
151
174
  "aria-valuemin": e.min,
152
- "aria-valuenow": h(g)(e.modelValue) ? e.modelValue : void 0,
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
- }, C, {
166
- onInput: R(E, ["stop"])
167
- }), null, 16, H)
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
- re as default
206
+ fe as default
178
207
  };
package/dist/index300.js CHANGED
@@ -1,5 +1,46 @@
1
- const o = () => {
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
- o as noop
45
+ y as useTableWidthContext
5
46
  };
package/dist/index301.js CHANGED
@@ -1,23 +1,55 @@
1
- function i(e, o) {
2
- const l = {}, u = e.length;
3
- for (let n = 0; n < u; n++) {
4
- const s = e[n];
5
- let f;
6
- if (typeof o == "function")
7
- f = o(s, n, e);
8
- else {
9
- const t = s[o];
10
- if (typeof t == "string" || typeof t == "number" || typeof t == "symbol")
11
- f = t;
12
- else
13
- throw new Error(
14
- `Property "${String(o)}" must be of type string, number, or symbol`
15
- );
16
- }
17
- l[f] = s;
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
- return l;
20
- }
44
+ if (n) {
45
+ const s = u(n);
46
+ s && f.push(...d(s));
47
+ }
48
+ return f;
49
+ };
21
50
  export {
22
- i as indexBy
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
- import { defineComponent as d, createElementBlock as l, openBlock as o, normalizeClass as u, createElementVNode as t, createBlock as i, createCommentVNode as s, unref as f, withCtx as g, toDisplayString as n } from "vue";
2
- import { useLocale as k } from "./index240.js";
3
- import h from "./index14.js";
4
- /* empty css */
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
- z as default
7
+ o as waitFor
69
8
  };
package/dist/index303.js CHANGED
@@ -1,4 +1,8 @@
1
- const o = (e) => e[0];
1
+ import e from "./index345.js";
2
+ import o from "./index346.js";
3
+ import r from "./index347.js";
4
+ const f = new r(o, e)._freeze();
2
5
  export {
3
- o as head
6
+ r as Mime,
7
+ f as default
4
8
  };
package/dist/index304.js CHANGED
@@ -1,9 +1,18 @@
1
- const s = (e, t, o, r) => {
2
- if (r <= 0) throw new Error("Step must be a positive number");
3
- if (t > o) throw new Error("Min must be less than or equal to Max");
4
- const n = Math.max(t, Math.min(o, e)), a = Math.round((n - t) / r);
5
- return t + a * r;
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
- s as snapToStep
17
+ e as findInTree
9
18
  };
package/dist/index305.js CHANGED
@@ -1,9 +1,11 @@
1
- function o(t, e, n, r, a) {
2
- if (n === e)
3
- throw new Error("Original boundaries cannot be equal.");
4
- const c = (t - e) / (n - e);
5
- return r + c * (a - r);
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 transpose
10
+ o as findRightIndex
9
11
  };
package/dist/index306.js CHANGED
@@ -1,8 +1,25 @@
1
- const o = (e, t = 50) => new Promise((r) => {
2
- const n = setInterval(() => {
3
- e() && (clearInterval(n), r());
4
- }, t);
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
- o as waitFor
24
+ n as default
8
25
  };
package/dist/index307.js CHANGED
@@ -1,7 +1,10 @@
1
- const o = (l, n, f = (r) => r, u) => l.map((r) => Array.isArray(r[n]) ? [
2
- f(r, u),
3
- ...o(r[n], n, f, f(r, u))
4
- ] : [f(r, u)]).flat();
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
- o as flattenTree
9
+ t as normalizeItemGroups
7
10
  };
package/dist/index308.js CHANGED
@@ -1,4 +1,5 @@
1
- import f from "./index242.js";
1
+ import o from "./index230.js";
2
+ /* empty css */
2
3
  export {
3
- f as default
4
+ o as default
4
5
  };
package/dist/index309.js CHANGED
@@ -1,5 +1,19 @@
1
- import o from "./index229.js";
2
- /* empty css */
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 default
18
+ o as useItemText
5
19
  };