bitboss-ui 2.1.92 → 2.1.93

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 (181) hide show
  1. package/dist/components/BbTab/BbTab.vue.d.ts +120 -91
  2. package/dist/index107.js +7 -7
  3. package/dist/index114.js +1 -1
  4. package/dist/index120.js +239 -167
  5. package/dist/index122.js +10 -10
  6. package/dist/index13.js +2 -2
  7. package/dist/index130.js +1 -1
  8. package/dist/index132.js +4 -4
  9. package/dist/index134.js +1 -1
  10. package/dist/index136.js +2 -2
  11. package/dist/index143.js +2 -2
  12. package/dist/index15.js +5 -5
  13. package/dist/index17.js +3 -3
  14. package/dist/index19.js +6 -6
  15. package/dist/index21.js +14 -14
  16. package/dist/index217.js +4 -32
  17. package/dist/index218.js +8 -28
  18. package/dist/index219.js +6 -0
  19. package/dist/index220.js +13 -5
  20. package/dist/index221.js +20 -8
  21. package/dist/index222.js +201 -2
  22. package/dist/index224.js +135 -17
  23. package/dist/index226.js +9 -0
  24. package/dist/index227.js +2 -100
  25. package/dist/index228.js +4 -0
  26. package/dist/index229.js +188 -3
  27. package/dist/index23.js +11 -11
  28. package/dist/index230.js +3 -13
  29. package/dist/index231.js +13 -13
  30. package/dist/index233.js +1 -1
  31. package/dist/index234.js +4 -9
  32. package/dist/index235.js +8 -186
  33. package/dist/index236.js +3 -3
  34. package/dist/index237.js +4 -3
  35. package/dist/index238.js +3 -18
  36. package/dist/index239.js +9 -12
  37. package/dist/index240.js +8 -15
  38. package/dist/index241.js +3 -12
  39. package/dist/index244.js +17 -4
  40. package/dist/index245.js +49 -133
  41. package/dist/index246.js +14 -0
  42. package/dist/index247.js +33 -229
  43. package/dist/index248.js +28 -2
  44. package/dist/index25.js +2 -2
  45. package/dist/index251.js +5 -2
  46. package/dist/index252.js +5 -3
  47. package/dist/index253.js +5 -10
  48. package/dist/index254.js +5 -3
  49. package/dist/index255.js +2 -4
  50. package/dist/index256.js +6 -5
  51. package/dist/index257.js +8 -5
  52. package/dist/index258.js +268 -5
  53. package/dist/index259.js +52 -5
  54. package/dist/index260.js +52 -6
  55. package/dist/index261.js +30 -6
  56. package/dist/index262.js +53 -261
  57. package/dist/index263.js +78 -44
  58. package/dist/index265.js +15 -32
  59. package/dist/index266.js +32 -58
  60. package/dist/index267.js +9 -5
  61. package/dist/index268.js +9 -5
  62. package/dist/index269.js +23 -5
  63. package/dist/index270.js +6 -2
  64. package/dist/index271.js +15 -19
  65. package/dist/index272.js +52 -6
  66. package/dist/index273.js +2 -2
  67. package/dist/index274.js +7 -34
  68. package/dist/index275.js +6 -8
  69. package/dist/index276.js +9 -3
  70. package/dist/index277.js +2 -5
  71. package/dist/index278.js +2 -4
  72. package/dist/index279.js +3 -201
  73. package/dist/index280.js +20 -0
  74. package/dist/index281.js +11 -8
  75. package/dist/index282.js +106 -23
  76. package/dist/index284.js +100 -6
  77. package/dist/index286.js +229 -11
  78. package/dist/index287.js +33 -2
  79. package/dist/index288.js +3 -7
  80. package/dist/index289.js +67 -7
  81. package/dist/index29.js +2 -2
  82. package/dist/index290.js +11 -9
  83. package/dist/index291.js +5 -8
  84. package/dist/index292.js +5 -67
  85. package/dist/index293.js +5 -53
  86. package/dist/index294.js +7 -0
  87. package/dist/index295.js +1 -1
  88. package/dist/index296.js +3 -7
  89. package/dist/index297.js +7 -3
  90. package/dist/index299.js +3 -17
  91. package/dist/index300.js +5 -4
  92. package/dist/index301.js +4 -5
  93. package/dist/index302.js +1 -1
  94. package/dist/index303.js +14 -25
  95. package/dist/index304.js +28 -3
  96. package/dist/index305.js +280 -2
  97. package/dist/index306.js +2 -280
  98. package/dist/index307.js +16 -2
  99. package/dist/index308.js +2 -16
  100. package/dist/index309.js +16 -2
  101. package/dist/index31.js +2 -2
  102. package/dist/index310.js +2 -16
  103. package/dist/index311.js +27 -2
  104. package/dist/index312.js +2 -27
  105. package/dist/index313.js +2 -2
  106. package/dist/index314.js +1 -1
  107. package/dist/index315.js +1 -1
  108. package/dist/index316.js +1 -1
  109. package/dist/index317.js +1 -1
  110. package/dist/index318.js +1 -1
  111. package/dist/index319.js +719 -2
  112. package/dist/index320.js +366 -5
  113. package/dist/index321.js +57 -3
  114. package/dist/index322.js +3 -124
  115. package/dist/index323.js +3 -2
  116. package/dist/index324.js +3 -15
  117. package/dist/index325.js +2 -2
  118. package/dist/index326.js +5 -18
  119. package/dist/index327.js +5 -2
  120. package/dist/index328.js +2 -719
  121. package/dist/index329.js +8 -366
  122. package/dist/index33.js +6 -6
  123. package/dist/index330.js +5 -56
  124. package/dist/index331.js +8 -2
  125. package/dist/index332.js +5 -58
  126. package/dist/index333.js +7 -58
  127. package/dist/index334.js +6 -227
  128. package/dist/index335.js +18 -5
  129. package/dist/index336.js +8 -34
  130. package/dist/index337.js +15 -6
  131. package/dist/index338.js +222 -123
  132. package/dist/index339.js +30 -393
  133. package/dist/index340.js +6 -47
  134. package/dist/index341.js +128 -3
  135. package/dist/index342.js +397 -6
  136. package/dist/index343.js +57 -18
  137. package/dist/index344.js +58 -9
  138. package/dist/index345.js +124 -14
  139. package/dist/index346.js +2 -5
  140. package/dist/index347.js +14 -6
  141. package/dist/index348.js +2 -8
  142. package/dist/index349.js +18 -5
  143. package/dist/index35.js +4 -4
  144. package/dist/index350.js +2 -8
  145. package/dist/index351.js +21 -92
  146. package/dist/index353.js +129 -515
  147. package/dist/index354.js +47 -22
  148. package/dist/index355.js +95 -0
  149. package/dist/index356.js +503 -424
  150. package/dist/index357.js +427 -114
  151. package/dist/index358.js +126 -48
  152. package/dist/index359.js +52 -0
  153. package/dist/index37.js +15 -15
  154. package/dist/index39.js +6 -6
  155. package/dist/index41.js +2 -2
  156. package/dist/index43.js +6 -6
  157. package/dist/index45.js +6 -6
  158. package/dist/index49.js +2 -2
  159. package/dist/index53.js +1 -1
  160. package/dist/index55.js +1 -1
  161. package/dist/index57.js +2 -2
  162. package/dist/index61.js +5 -5
  163. package/dist/index67.js +1 -1
  164. package/dist/index80.js +5 -5
  165. package/dist/index82.js +1 -1
  166. package/dist/index84.js +2 -2
  167. package/dist/index86.js +3 -3
  168. package/dist/index88.js +1 -1
  169. package/dist/index91.js +2 -2
  170. package/dist/index93.js +2 -2
  171. package/dist/index95.js +4 -4
  172. package/dist/utilities/functions/merge.d.ts +11 -1
  173. package/package.json +2 -2
  174. package/dist/index223.js +0 -53
  175. package/dist/index225.js +0 -108
  176. package/dist/index249.js +0 -88
  177. package/dist/index264.js +0 -54
  178. package/dist/index285.js +0 -18
  179. package/dist/index298.js +0 -5
  180. package/dist/index352.js +0 -136
  181. /package/dist/{index283.js → index250.js} +0 -0
package/dist/index269.js CHANGED
@@ -1,7 +1,25 @@
1
- import { getDefaultExportFromCjs as r } from "./index335.js";
2
- import { __require as t } from "./index326.js";
3
- var o = t();
4
- const a = /* @__PURE__ */ r(o);
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
+ ];
5
23
  export {
6
- a as default
24
+ n as default
7
25
  };
package/dist/index270.js CHANGED
@@ -1,4 +1,8 @@
1
- const e = (t) => t;
1
+ import e from "./index319.js";
2
+ import o from "./index320.js";
3
+ import r from "./index321.js";
4
+ const f = new r(o, e)._freeze();
2
5
  export {
3
- e as identity
6
+ r as Mime,
7
+ f as default
4
8
  };
package/dist/index271.js CHANGED
@@ -1,22 +1,18 @@
1
- import { MaskInput as r } from "./index235.js";
2
- const u = /* @__PURE__ */ new WeakMap(), p = (a, n) => {
3
- if (a.arg == null || a.instance == null) return;
4
- const s = "setup" in a.instance.$.type;
5
- a.arg in a.instance ? a.instance[a.arg] = n : s && console.warn("Maska: please expose `%s` using defineExpose", a.arg);
6
- }, k = (a, n) => {
7
- var s;
8
- const t = a instanceof HTMLInputElement ? a : a.querySelector("input");
9
- if (t == null || t?.type === "file") return;
10
- let e = {};
11
- if (n.value != null && (e = typeof n.value == "string" ? { mask: n.value } : { ...n.value }), n.arg != null) {
12
- const l = (o) => {
13
- const i = n.modifiers.unmasked ? o.unmasked : n.modifiers.completed ? o.completed : o.masked;
14
- p(n, i);
15
- };
16
- e.onMaska = e.onMaska == null ? l : Array.isArray(e.onMaska) ? [...e.onMaska, l] : [e.onMaska, l];
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;
17
13
  }
18
- u.has(t) ? (s = u.get(t)) == null || s.update(e) : u.set(t, new r(t, e));
19
- };
14
+ return t;
15
+ }, null);
20
16
  export {
21
- k as vMaska
17
+ e as findInTree
22
18
  };
package/dist/index272.js CHANGED
@@ -1,9 +1,55 @@
1
- const s = (r, t) => {
2
- if (r.endsWith("."))
3
- return t === 0 ? r.slice(0, -1) : r;
4
- const [n, i] = r.split(".");
5
- return i ? `${n}.${i.slice(0, t)}` : r;
1
+ import { useLogger as y } from "./index257.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));
43
+ }
44
+ if (n) {
45
+ const s = u(n);
46
+ s && f.push(...d(s));
47
+ }
48
+ return f;
6
49
  };
7
50
  export {
8
- s as clampPrecision
51
+ g as applyFixedTableColumns,
52
+ w as columnKeyToSlotName,
53
+ $ as mergeCellClasses,
54
+ A as mergeHeaderClasses
9
55
  };
package/dist/index273.js CHANGED
@@ -1,4 +1,4 @@
1
- const r = (e) => typeof e > "u" || e === null;
1
+ const o = (e) => e[0];
2
2
  export {
3
- r as isNil
3
+ o as head
4
4
  };
package/dist/index274.js CHANGED
@@ -1,36 +1,9 @@
1
- import { defineComponent as a, resolveComponent as o, createBlock as u, openBlock as l, resolveDynamicComponent as m, unref as c, withCtx as p, renderSlot as f } from "vue";
2
- import { _config as e } from "./index4.js";
3
- import { useLogger as i } from "./index261.js";
4
- import { useFrameworkDetection as k } from "./index234.js";
5
- const y = /* @__PURE__ */ a({
6
- __name: "RouterComponent",
7
- setup(g) {
8
- const { isInertia: r, isNuxt: s } = k();
9
- let t;
10
- if (r) {
11
- if (t = o(e.inertiaLinkName), typeof t == "string") {
12
- const { warn: n } = i();
13
- n(
14
- `Inertia link component "${e.inertiaLinkName}" could not be resolved. Ensure you app registers a link component with the name "${e.inertiaLinkName}" or set bitboss-ui config key "inertiaLinkName" to the correct value globally. Please visit ${e.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
15
- );
16
- }
17
- } else if (s) {
18
- if (t = o(e.nuxtLinkName), typeof t == "string") {
19
- const { warn: n } = i();
20
- n(
21
- `Nuxt link component "${e.nuxtLinkName}" could not be resolved. Ensure you app registers a link component with the name "${e.nuxtLinkName}" or set bitboss-ui config key "nuxtLinkName" to the correct value globally. Please visit ${e.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
22
- );
23
- }
24
- } else
25
- t = "router-link";
26
- return (n, d) => (l(), u(m(c(t)), null, {
27
- default: p(() => [
28
- f(n.$slots, "default")
29
- ]),
30
- _: 3
31
- }));
32
- }
33
- });
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
+ };
34
7
  export {
35
- y as default
8
+ s as snapToStep
36
9
  };
package/dist/index275.js CHANGED
@@ -1,11 +1,9 @@
1
- function u(e, i) {
2
- let t;
3
- return function(...o) {
4
- t !== void 0 && clearTimeout(t), t = setTimeout(() => {
5
- e.apply(this, o);
6
- }, i);
7
- };
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);
8
6
  }
9
7
  export {
10
- u as debounce
8
+ o as transpose
11
9
  };
package/dist/index276.js CHANGED
@@ -1,5 +1,11 @@
1
- import t from "./index320.js";
2
- const r = t;
1
+ function u(e, i) {
2
+ let t;
3
+ return function(...o) {
4
+ t !== void 0 && clearTimeout(t), t = setTimeout(() => {
5
+ e.apply(this, o);
6
+ }, i);
7
+ };
8
+ }
3
9
  export {
4
- r as throttle
10
+ u as debounce
5
11
  };
package/dist/index277.js CHANGED
@@ -1,7 +1,4 @@
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 o = (e) => typeof e == "boolean" ? e : e === "true";
5
2
  export {
6
- o as flattenTree
3
+ o as booleanishToBoolean
7
4
  };
package/dist/index278.js CHANGED
@@ -1,6 +1,4 @@
1
- function x(e) {
2
- return /^#([A-Fa-f0-9]{6})$/.test(e);
3
- }
1
+ const e = (t) => t;
4
2
  export {
5
- x as isHex
3
+ e as identity
6
4
  };
package/dist/index279.js CHANGED
@@ -1,203 +1,5 @@
1
- import { defineComponent as j, ref as s, onMounted as J, watch as Q, createElementBlock as M, openBlock as S, createElementVNode as x, createTextVNode as L, createCommentVNode as B, toDisplayString as y, unref as w } from "vue";
2
- import { hexToRgb as K } from "./index348.js";
3
- import { getHueFromRGB as F } from "./index349.js";
4
- import { hslToHex as b } from "./index350.js";
5
- import { useLocale as Z } from "./index231.js";
6
- const ee = {
7
- id: "mainCanvasDesc",
8
- "aria-live": "polite",
9
- class: "sr-only"
10
- }, te = { key: 0 }, ae = {
11
- id: "hueCanvasDesc",
12
- "aria-live": "polite",
13
- class: "sr-only"
14
- }, ne = { key: 0 }, ue = /* @__PURE__ */ j({
15
- __name: "ColorPallette",
16
- props: {
17
- modelValue: {}
18
- },
19
- emits: ["update:modelValue"],
20
- setup(N, { emit: O }) {
21
- const _ = N, f = O, { t: h } = Z(), o = s(_.modelValue), d = s(
22
- b(F(...K(o.value ?? "#ff0000")), 100, 50)
23
- ), T = s(null), i = s(null), r = s(null), l = s({ x: 0, y: 0 }), u = s({ x: 0 }), p = s(!1), P = s(!1), q = () => {
24
- const e = i.value, t = r.value;
25
- !e || !t || (e.width = e.offsetWidth, e.height = e.offsetHeight, t.width = t.offsetWidth, t.height = t.offsetHeight, v(), g());
26
- }, R = () => {
27
- const e = i.value;
28
- return e ? e.getContext("2d", { willReadFrequently: !0 }) : null;
29
- }, v = () => {
30
- const e = i.value;
31
- if (!e) return;
32
- const t = R();
33
- if (!t) return;
34
- t.clearRect(0, 0, e.width, e.height);
35
- const a = t.createLinearGradient(0, 0, e.width, 0);
36
- a.addColorStop(0, d.value), a.addColorStop(1, "#ffffff");
37
- const n = t.createLinearGradient(0, 0, 0, e.height);
38
- n.addColorStop(0, "transparent"), n.addColorStop(1, "#000000"), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height), t.fillStyle = n, t.globalCompositeOperation = "multiply", t.fillRect(0, 0, e.width, e.height), t.globalCompositeOperation = "source-over", t.fillStyle = "#000000", t.strokeStyle = "#000000", t.lineWidth = 1;
39
- }, m = () => {
40
- const e = R();
41
- e && (e.beginPath(), e.arc(
42
- l.value.x,
43
- l.value.y,
44
- 8,
45
- 0,
46
- 2 * Math.PI
47
- ), e.strokeStyle = "#ffffff", e.lineWidth = 2, e.stroke(), e.beginPath(), e.arc(
48
- l.value.x,
49
- l.value.y,
50
- 7,
51
- 0,
52
- 2 * Math.PI
53
- ), e.strokeStyle = "#000000", e.lineWidth = 1, e.stroke(), e.globalCompositeOperation = "source-over");
54
- }, D = () => {
55
- const e = r.value;
56
- return e ? e.getContext("2d", { willReadFrequently: !0 }) : null;
57
- }, g = () => {
58
- const e = r.value;
59
- if (!e) return;
60
- const t = D();
61
- if (!t) return;
62
- const a = t.createLinearGradient(0, 0, e.width, 0);
63
- for (let n = 0; n <= 360; n += 60)
64
- a.addColorStop(n / 360, `hsl(${n}, 100%, 50%)`);
65
- a.addColorStop(1, "hsl(360, 100%, 50%)"), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height), H(), t.fillStyle = "#000000", t.strokeStyle = "#000000", t.lineWidth = 1;
66
- }, H = () => {
67
- const e = r.value;
68
- if (!e) return;
69
- const t = D();
70
- if (!t) return;
71
- const a = 10, n = 16, c = u.value.x - a / 2, k = e.height / 2 - n / 2;
72
- t.beginPath(), t.roundRect(c, k, a, n, 2), t.strokeStyle = "lightgray", t.stroke(), t.fillStyle = "#ffffff", t.fill();
73
- }, E = (e) => {
74
- const t = i.value;
75
- t && (t.setPointerCapture(e.pointerId), p.value = !0, I(e));
76
- }, U = (e) => {
77
- const t = r.value;
78
- t && (t.setPointerCapture(e.pointerId), P.value = !0, V(e));
79
- }, I = (e) => {
80
- const t = i.value;
81
- if (!t) return;
82
- const a = t.getBoundingClientRect(), n = Math.max(0, Math.min(t.width - 1, e.clientX - a.left)), c = Math.max(0, Math.min(t.height - 1, e.clientY - a.top));
83
- l.value = { x: n, y: c }, v(), m(), o.value = C(), f("update:modelValue", o.value);
84
- }, V = (e) => {
85
- const t = r.value;
86
- if (!t) return;
87
- const a = t.getBoundingClientRect(), n = Math.max(0, Math.min(t.width - 1, e.clientX - a.left));
88
- u.value = { x: n };
89
- const c = n / t.width * 360;
90
- d.value = b(c, 100, 50), g(), v(), m(), o.value = C(), f("update:modelValue", o.value);
91
- }, G = (e) => {
92
- p.value ? I(e) : P.value && V(e);
93
- }, W = (e) => {
94
- const t = p.value ? i.value : r.value;
95
- t && t.releasePointerCapture(e.pointerId), p.value = !1, P.value = !1;
96
- }, X = (e) => {
97
- switch (e.key) {
98
- case "ArrowUp":
99
- l.value.y = Math.max(0, l.value.y - 5);
100
- break;
101
- case "ArrowDown":
102
- l.value.y = Math.min(
103
- i.value?.height ?? 0,
104
- l.value.y + 5
105
- );
106
- break;
107
- case "ArrowLeft":
108
- l.value.x = Math.max(0, l.value.x - 5);
109
- break;
110
- case "ArrowRight":
111
- l.value.x = Math.min(
112
- i.value?.width ?? 0,
113
- l.value.x + 5
114
- );
115
- break;
116
- default:
117
- return;
118
- }
119
- v(), m(), o.value = C(), f("update:modelValue", o.value), e.preventDefault();
120
- }, $ = (e) => {
121
- switch (e.key) {
122
- case "ArrowLeft":
123
- u.value.x = Math.max(0, u.value.x - 5);
124
- break;
125
- case "ArrowRight":
126
- u.value.x = Math.min(
127
- r.value?.width ?? 0,
128
- u.value.x + 5
129
- );
130
- break;
131
- default:
132
- return;
133
- }
134
- const a = u.value.x / (r.value?.width ?? 1) * 360;
135
- d.value = b(a, 100, 50), g(), H(), v(), m(), o.value = C(), f("update:modelValue", o.value), e.preventDefault();
136
- };
137
- J(() => {
138
- q(), A(o.value ?? "#ff0000");
139
- }), Q(
140
- () => _.modelValue,
141
- (e) => {
142
- !e || e === o.value || (o.value = e, A(e), g(), v());
143
- }
144
- );
145
- const C = () => {
146
- const e = i.value;
147
- if (!e) return "#ffffff";
148
- const t = e.getContext("2d");
149
- if (!t) return "#ffffff";
150
- const { x: a, y: n } = l.value, c = t.getImageData(a, n, 1, 1).data, [k, z, Y] = c;
151
- return `#${((1 << 24) + (k << 16) + (z << 8) + Y).toString(16).slice(1)}`;
152
- };
153
- function A(e) {
154
- const t = F(...K(e));
155
- d.value = b(t, 100, 50), u.value.x = t / 360 * (r.value?.width ?? 0);
156
- }
157
- return (e, t) => (S(), M("span", {
158
- ref_key: "paletteRef",
159
- ref: T,
160
- "aria-label": "Color Picker",
161
- class: "bb-color-palette",
162
- role: "application"
163
- }, [
164
- x("canvas", {
165
- ref_key: "mainCanvasRef",
166
- ref: i,
167
- "aria-describedby": "mainCanvasDesc",
168
- "aria-label": "Main Color Selection",
169
- class: "bb-color-palette__canvas",
170
- role: "application",
171
- tabindex: "0",
172
- onKeydown: X,
173
- onPointerdown: E,
174
- onPointermove: G,
175
- onPointerup: W
176
- }, null, 544),
177
- x("span", ee, [
178
- L(y(w(h)("colorInput.mainCanvasDesc")) + " ", 1),
179
- o.value ? (S(), M("span", te, y(w(h)("colorInput.mainCanvasSelectedColor", o.value)), 1)) : B("", !0)
180
- ]),
181
- x("canvas", {
182
- ref_key: "hueCanvasRef",
183
- ref: r,
184
- "aria-describedby": "hueCanvasDesc",
185
- "aria-label": "Hue Selection",
186
- class: "bb-color-palette__hue-canvas",
187
- role: "application",
188
- tabindex: "0",
189
- onKeydown: $,
190
- onPointerdown: U,
191
- onPointermove: G,
192
- onPointerup: W
193
- }, null, 544),
194
- x("span", ae, [
195
- L(y(w(h)("colorInput.hueCanvasDesc")) + " ", 1),
196
- d.value ? (S(), M("span", ne, y(w(h)("colorInput.hueCanvasSelectedHue", d.value)), 1)) : B("", !0)
197
- ])
198
- ], 512));
199
- }
200
- });
1
+ import { isNil as r } from "./index227.js";
2
+ const e = (t) => r(t) ? !0 : Array.isArray(t) || typeof t == "string" ? t.length === 0 : t instanceof Map || t instanceof Set ? t.size === 0 : typeof t == "number" ? Number.isNaN(t) : typeof t == "boolean" || typeof t == "function" ? !1 : typeof t == "object" ? "length" in t && typeof t.length == "number" ? t.length === 0 : Object.keys(t).length === 0 : !1;
201
3
  export {
202
- ue as default
4
+ e as isEmpty
203
5
  };
@@ -0,0 +1,20 @@
1
+ import { isNil as c } from "./index227.js";
2
+ const a = (t, r) => {
3
+ if (!Object.prototype.hasOwnProperty.call(t, r))
4
+ throw new Error(
5
+ `Object ${JSON.stringify(t, null, 2)} has no property named "${r.toString()}"`
6
+ );
7
+ }, l = (t) => typeof t == "string" ? t.toLocaleLowerCase() : JSON.stringify(t).toLowerCase(), y = (t, r, s) => {
8
+ const i = s.toLocaleLowerCase();
9
+ for (let e = 0; e < r.length; e++) {
10
+ const n = r[e];
11
+ a(t, n);
12
+ const o = t[n];
13
+ if (c(o)) continue;
14
+ if (l(o).includes(i)) return !0;
15
+ }
16
+ return !1;
17
+ };
18
+ export {
19
+ y as matchAnyKey
20
+ };
package/dist/index281.js CHANGED
@@ -1,11 +1,14 @@
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;
1
+ import { ref as t } from "vue";
2
+ const n = () => {
3
+ const e = t([]);
4
+ return { array: e, set: (...r) => {
5
+ e.value = r;
6
+ }, add: (...r) => {
7
+ e.value.push(...r);
8
+ }, remove: (r) => {
9
+ e.value = e.value.filter(r);
10
+ } };
8
11
  };
9
12
  export {
10
- o as findRightIndex
13
+ n as useArray
11
14
  };
package/dist/index282.js CHANGED
@@ -1,25 +1,108 @@
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
- ];
1
+ import { defineComponent as y, ref as F, computed as H, watch as N, createElementBlock as L, openBlock as p, Fragment as S, renderList as V, createBlock as A, withModifiers as O, normalizeClass as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
2
+ import { hash as d } from "./index241.js";
3
+ import { isNil as l } from "./index227.js";
4
+ import E from "./index67.js";
5
+ /* empty css */
6
+ const K = /* @__PURE__ */ y({
7
+ __name: "ChipsBox",
8
+ props: {
9
+ options: {}
10
+ },
11
+ emits: ["option:unselected"],
12
+ setup(f, { expose: v, emit: h }) {
13
+ const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
14
+ const s = l(n.value) ? -1 : n.value;
15
+ let o = (s + e) % t.options.length;
16
+ for (; t.options[o].disabled && o !== s; )
17
+ o = a(e + 1);
18
+ return o;
19
+ }, x = () => {
20
+ if (!i.value) return;
21
+ const e = a();
22
+ n.value = e;
23
+ }, c = (e = 1) => {
24
+ const s = l(n.value) ? 0 : n.value;
25
+ let o = (s - e + t.options.length) % t.options.length;
26
+ for (; t.options[o].disabled && o !== s; )
27
+ o = c(e + 1);
28
+ return o;
29
+ }, m = async () => {
30
+ if (!i.value) return;
31
+ const e = c();
32
+ n.value = e;
33
+ }, w = () => {
34
+ if (!i.value) return;
35
+ let e = 0;
36
+ for (; t.options[e].disabled; )
37
+ e++;
38
+ n.value = e;
39
+ }, b = () => {
40
+ if (!i.value) return;
41
+ let e = t.options.length - 1;
42
+ for (; t.options[e].disabled && e !== 0; )
43
+ e--;
44
+ n.value = e;
45
+ }, I = () => {
46
+ if (!i.value) return;
47
+ let e = 0;
48
+ for (; !t.options[e].selected && t.options.length !== e; )
49
+ e++;
50
+ n.value = e;
51
+ }, g = () => {
52
+ if (!i.value) return;
53
+ let e = t.options.length - 1;
54
+ for (; t.options[e].selected && e !== 0; )
55
+ e--;
56
+ n.value = e;
57
+ }, _ = (e) => {
58
+ if (!i.value) return;
59
+ const s = t.options.findIndex(
60
+ (o) => o.valueHash === e
61
+ );
62
+ s >= 0 && (n.value = s);
63
+ }, r = () => {
64
+ n.value = null;
65
+ }, k = () => {
66
+ if (l(n.value)) return;
67
+ const e = t.options[n.value];
68
+ e.selected && u("option:unselected", e);
69
+ }, C = () => l(n.value) ? void 0 : t.options[n.value];
70
+ return N(
71
+ () => t.options,
72
+ (e, s) => {
73
+ d(e) !== d(s) && r();
74
+ },
75
+ {
76
+ flush: "post"
77
+ }
78
+ ), v({
79
+ focusNext: x,
80
+ focusPrevious: m,
81
+ focusFirst: w,
82
+ focusFirstSelected: I,
83
+ focusLast: b,
84
+ focusLastSelected: g,
85
+ blur: r,
86
+ confirmOption: k,
87
+ focusByHash: _,
88
+ getHighlighted: C
89
+ }), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
90
+ key: o.valueHash,
91
+ class: P({
92
+ "bb-chipsbox-item": !0,
93
+ "bb-chipsbox-item--focused": B === n.value
94
+ }),
95
+ clearable: !0,
96
+ text: o.text,
97
+ "onClick:clear": O((M) => u("option:unselected", o), ["stop"])
98
+ }, {
99
+ default: $(() => [
100
+ z(D(o.text), 1)
101
+ ]),
102
+ _: 2
103
+ }, 1032, ["class", "text", "onClick:clear"]))), 128));
104
+ }
105
+ });
23
106
  export {
24
- n as default
107
+ K as default
25
108
  };