bitboss-ui 2.1.97 → 2.1.99

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 (183) hide show
  1. package/README.md +138 -11
  2. package/dist/composables/useConfirm.d.ts +59 -10
  3. package/dist/index108.js +9 -9
  4. package/dist/index115.js +1 -1
  5. package/dist/index121.js +4 -4
  6. package/dist/index123.js +12 -12
  7. package/dist/index131.js +1 -1
  8. package/dist/index133.js +5 -5
  9. package/dist/index135.js +1 -1
  10. package/dist/index137.js +2 -2
  11. package/dist/index14.js +1 -1
  12. package/dist/index145.js +2 -2
  13. package/dist/index16.js +5 -5
  14. package/dist/index18.js +3 -3
  15. package/dist/index20.js +8 -8
  16. package/dist/index219.js +4 -32
  17. package/dist/index22.js +14 -14
  18. package/dist/index220.js +8 -28
  19. package/dist/index221.js +5 -0
  20. package/dist/index222.js +3 -5
  21. package/dist/index223.js +2 -8
  22. package/dist/index224.js +18 -2
  23. package/dist/index225.js +12 -4
  24. package/dist/index226.js +49 -32
  25. package/dist/index227.js +15 -2
  26. package/dist/index228.js +12 -3
  27. package/dist/index229.js +17 -2
  28. package/dist/index230.js +29 -13
  29. package/dist/index231.js +13 -3
  30. package/dist/index232.js +15 -187
  31. package/dist/index233.js +4 -3
  32. package/dist/index234.js +106 -9
  33. package/dist/index236.js +99 -19
  34. package/dist/{index239.js → index238.js} +6 -6
  35. package/dist/index24.js +11 -11
  36. package/dist/index240.js +106 -0
  37. package/dist/index241.js +13 -2
  38. package/dist/index242.js +2 -51
  39. package/dist/index243.js +11 -17
  40. package/dist/index244.js +81 -101
  41. package/dist/index246.js +10 -100
  42. package/dist/index247.js +5 -0
  43. package/dist/index248.js +4 -3
  44. package/dist/index249.js +3 -86
  45. package/dist/index250.js +4 -0
  46. package/dist/index251.js +5 -29
  47. package/dist/index252.js +5 -16
  48. package/dist/index253.js +5 -15
  49. package/dist/index254.js +5 -3
  50. package/dist/index255.js +5 -12
  51. package/dist/index256.js +5 -13
  52. package/dist/index257.js +2 -4
  53. package/dist/index258.js +18 -21
  54. package/dist/index259.js +8 -32
  55. package/dist/index26.js +3 -3
  56. package/dist/index260.js +21 -2
  57. package/dist/index261.js +32 -6
  58. package/dist/index262.js +32 -8
  59. package/dist/index263.js +28 -23
  60. package/dist/index265.js +21 -11
  61. package/dist/index266.js +8 -8
  62. package/dist/index267.js +23 -53
  63. package/dist/index268.js +6 -9
  64. package/dist/index269.js +5 -3
  65. package/dist/index270.js +6 -67
  66. package/dist/index271.js +8 -5
  67. package/dist/index272.js +268 -2
  68. package/dist/index273.js +52 -7
  69. package/dist/index274.js +52 -7
  70. package/dist/index275.js +31 -17
  71. package/dist/index276.js +60 -12
  72. package/dist/index277.js +3 -104
  73. package/dist/index278.js +33 -11
  74. package/dist/index279.js +188 -5
  75. package/dist/index28.js +1 -1
  76. package/dist/index280.js +3 -5
  77. package/dist/index281.js +53 -5
  78. package/dist/index282.js +2 -5
  79. package/dist/index283.js +2 -6
  80. package/dist/index284.js +7 -268
  81. package/dist/index285.js +7 -52
  82. package/dist/index286.js +4 -52
  83. package/dist/index287.js +195 -26
  84. package/dist/index289.js +67 -7
  85. package/dist/index290.js +13 -5
  86. package/dist/index291.js +5 -5
  87. package/dist/index292.js +3 -5
  88. package/dist/index293.js +3 -3
  89. package/dist/index295.js +8 -20
  90. package/dist/index297.js +1 -1
  91. package/dist/index298.js +2 -4
  92. package/dist/index299.js +3 -7
  93. package/dist/index30.js +2 -2
  94. package/dist/index300.js +17 -2
  95. package/dist/index301.js +28 -5
  96. package/dist/index302.js +1 -1
  97. package/dist/index303.js +1 -1
  98. package/dist/index304.js +1 -1
  99. package/dist/index305.js +7 -3
  100. package/dist/index306.js +2 -17
  101. package/dist/index307.js +4 -3
  102. package/dist/index308.js +3 -27
  103. package/dist/index309.js +280 -5
  104. package/dist/index310.js +2 -2
  105. package/dist/index311.js +125 -2
  106. package/dist/index312.js +2 -280
  107. package/dist/index313.js +15 -2
  108. package/dist/index314.js +2 -16
  109. package/dist/index315.js +16 -2
  110. package/dist/index316.js +2 -16
  111. package/dist/index317.js +16 -2
  112. package/dist/index318.js +2 -27
  113. package/dist/index319.js +19 -2
  114. package/dist/index32.js +2 -2
  115. package/dist/index320.js +2 -2
  116. package/dist/index321.js +5 -2
  117. package/dist/index322.js +27 -2
  118. package/dist/index323.js +2 -2
  119. package/dist/index324.js +1 -1
  120. package/dist/index325.js +2 -4
  121. package/dist/index326.js +2 -719
  122. package/dist/index327.js +2 -366
  123. package/dist/index328.js +2 -57
  124. package/dist/index329.js +2 -125
  125. package/dist/index330.js +3 -2
  126. package/dist/index331.js +5 -15
  127. package/dist/index332.js +719 -2
  128. package/dist/index333.js +366 -19
  129. package/dist/index334.js +57 -2
  130. package/dist/index335.js +35 -58
  131. package/dist/index336.js +6 -58
  132. package/dist/index337.js +123 -222
  133. package/dist/index338.js +397 -5
  134. package/dist/index339.js +191 -91
  135. package/dist/index34.js +8 -8
  136. package/dist/index340.js +258 -8
  137. package/dist/index341.js +58 -6
  138. package/dist/index342.js +57 -7
  139. package/dist/index343.js +5 -34
  140. package/dist/index344.js +7 -6
  141. package/dist/index345.js +17 -127
  142. package/dist/index346.js +7 -396
  143. package/dist/index347.js +12 -131
  144. package/dist/index348.js +5 -193
  145. package/dist/index349.js +7 -258
  146. package/dist/index350.js +92 -6
  147. package/dist/index351.js +132 -17
  148. package/dist/index352.js +2 -9
  149. package/dist/index353.js +2 -15
  150. package/dist/index354.js +22 -5
  151. package/dist/index356.js +8 -2
  152. package/dist/index357.js +6 -2
  153. package/dist/index358.js +8 -22
  154. package/dist/index359.js +230 -0
  155. package/dist/index36.js +4 -4
  156. package/dist/index363.js +1 -1
  157. package/dist/index38.js +20 -20
  158. package/dist/index40.js +6 -6
  159. package/dist/index42.js +2 -2
  160. package/dist/index44.js +8 -8
  161. package/dist/index46.js +6 -6
  162. package/dist/index50.js +2 -2
  163. package/dist/index54.js +1 -1
  164. package/dist/index56.js +1 -1
  165. package/dist/index58.js +2 -2
  166. package/dist/index6.js +33 -32
  167. package/dist/index62.js +5 -5
  168. package/dist/index68.js +1 -1
  169. package/dist/index74.js +1 -1
  170. package/dist/index76.js +5 -5
  171. package/dist/index81.js +6 -6
  172. package/dist/index83.js +1 -1
  173. package/dist/index87.js +3 -3
  174. package/dist/index89.js +1 -1
  175. package/dist/index92.js +3 -3
  176. package/dist/index94.js +2 -2
  177. package/dist/index96.js +5 -5
  178. package/package.json +13 -2
  179. package/dist/index235.js +0 -6
  180. package/dist/index237.js +0 -203
  181. package/dist/index264.js +0 -5
  182. package/dist/index288.js +0 -62
  183. package/dist/index355.js +0 -9
package/dist/index50.js CHANGED
@@ -2,8 +2,8 @@ import { defineComponent as V, ref as h, computed as v, onMounted as B, onBefore
2
2
  import q from "./index137.js";
3
3
  /* empty css */
4
4
  import I from "./index139.js";
5
- import { MaskInput as z } from "./index232.js";
6
- import { isNotEmpty as D } from "./index233.js";
5
+ import { MaskInput as z } from "./index279.js";
6
+ import { isNotEmpty as D } from "./index280.js";
7
7
  const N = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type"], F = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type", "value"], U = /* @__PURE__ */ V({
8
8
  __name: "BaseTextInput",
9
9
  props: {
package/dist/index54.js CHANGED
@@ -3,7 +3,7 @@ import B from "./index70.js";
3
3
  /* empty css */
4
4
  import L from "./index87.js";
5
5
  /* empty css */
6
- import { useLocale as g } from "./index230.js";
6
+ import { useLocale as g } from "./index231.js";
7
7
  const $ = {
8
8
  class: "bb-alert__inner-container",
9
9
  role: "alert"
package/dist/index56.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, computed as z, ref as o, onMounted as g, createElementBlock as l, openBlock as i, normalizeProps as _, guardReactiveProps as h, renderSlot as k } from "vue";
2
- import { isCssColor as y } from "./index224.js";
2
+ import { isCssColor as y } from "./index250.js";
3
3
  import { wait as C } from "./index141.js";
4
4
  const w = ["alt", "sizes", "src", "srcset"], B = {
5
5
  key: 1,
package/dist/index58.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as p, useSlots as d, computed as s, createElementBlock as m, openBlock as u, normalizeClass as g, createElementVNode as n, renderSlot as r, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
2
- import { isCssColor as l } from "./index224.js";
3
- import { isNil as B } from "./index260.js";
2
+ import { isCssColor as l } from "./index250.js";
3
+ import { isNil as B } from "./index242.js";
4
4
  const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, N = /* @__PURE__ */ p({
5
5
  __name: "BbBadge",
6
6
  props: {
package/dist/index6.js CHANGED
@@ -1,61 +1,62 @@
1
- import { ref as y } from "vue";
2
- const c = [], i = {
1
+ import { ref as T } from "vue";
2
+ const c = [], f = {
3
3
  current: null,
4
4
  processing: !1,
5
5
  yesBusy: !1,
6
6
  noBusy: !1,
7
7
  loading: !1
8
- }, t = y({ ...i }), A = t, T = 300;
9
- let u, a;
10
- const f = () => {
11
- clearTimeout(a), clearTimeout(u), t.value = { ...i };
12
- }, m = () => {
8
+ }, t = T({ ...f }), N = t, g = 300;
9
+ let u, l;
10
+ const m = () => {
11
+ clearTimeout(l), clearTimeout(u), t.value = { ...f };
12
+ }, y = () => {
13
13
  const e = c.shift();
14
- e && (f(), t.value.current = e, t.value.processing = !0, e.timeout && (t.value.current.autoClose = !0, u = setTimeout(() => {
15
- g(!1);
14
+ e && (m(), t.value.current = e, t.value.processing = !0, e.timeout && (t.value.current.autoClose = !0, u = setTimeout(() => {
15
+ p(!1);
16
16
  }, e.timeout)));
17
- }, l = () => {
18
- clearTimeout(u), t.value.yesBusy = !1, t.value.noBusy = !1, t.value.processing = !1, clearTimeout(a), a = setTimeout(f, T);
19
- }, r = (e, s) => {
20
- e === "yes" ? t.value.yesBusy = s : t.value.noBusy = s;
21
- }, g = async (e) => {
17
+ }, i = () => {
18
+ clearTimeout(u), t.value.yesBusy = !1, t.value.noBusy = !1, t.value.processing = !1, clearTimeout(l), l = setTimeout(m, g);
19
+ }, r = (e, o) => {
20
+ e === "yes" ? t.value.yesBusy = o : t.value.noBusy = o;
21
+ }, p = async (e, o = !1) => {
22
22
  const { current: s } = t.value;
23
23
  if (!s) return;
24
24
  clearTimeout(u);
25
- let o = e;
25
+ let a = e;
26
26
  try {
27
27
  if (e && s.onYes) {
28
28
  r("yes", !0);
29
29
  const n = await s.onYes();
30
- o = s.returning ? n : e;
31
- } else if (!e && s.onNo) {
30
+ a = s.returning ? n : e;
31
+ } else if (!e && s.onNo && (o || s.dismissAsNo)) {
32
32
  r("no", !0);
33
33
  const n = await s.onNo();
34
- o = s.returning ? n : e;
34
+ a = s.returning ? n : e;
35
35
  }
36
- s.resolve(o), c.length ? m() : s.autoClose && l();
36
+ s.resolve(a), c.length ? y() : s.autoClose && i();
37
37
  } catch (n) {
38
- s.reject(n), l();
38
+ s.reject(n), i();
39
39
  } finally {
40
40
  r("yes", !1), r("no", !1);
41
41
  }
42
- }, p = (e) => new Promise((s, o) => {
42
+ }, v = (e) => new Promise((o, s) => {
43
43
  c.push({
44
44
  yesText: "OK",
45
45
  noText: "Annulla",
46
+ dismissAsNo: !0,
46
47
  ...e,
47
- resolve: s,
48
- reject: o
49
- }), m();
50
- }), v = (e) => {
48
+ resolve: o,
49
+ reject: s
50
+ }), y();
51
+ }), A = (e) => {
51
52
  t.value.loading = e;
52
- }, N = () => ({
53
- confirm: p,
54
- close: l,
55
- setLoading: v
53
+ }, d = () => ({
54
+ confirm: v,
55
+ close: i,
56
+ setLoading: A
56
57
  });
57
58
  export {
58
- A as confirmState,
59
- g as processMessage,
60
- N as useConfirm
59
+ N as confirmState,
60
+ p as processMessage,
61
+ d as useConfirm
61
62
  };
package/dist/index62.js CHANGED
@@ -7,11 +7,11 @@ import f from "./index87.js";
7
7
  /* empty css */
8
8
  import J from "./index115.js";
9
9
  /* empty css */
10
- import { pickBy as K } from "./index268.js";
11
- import { noop as Q } from "./index269.js";
12
- import { useLocale as U } from "./index230.js";
13
- import { extractDomContainer as X } from "./index257.js";
14
- import { isEqual as $ } from "./index228.js";
10
+ import { pickBy as K } from "./index246.js";
11
+ import { noop as Q } from "./index247.js";
12
+ import { useLocale as U } from "./index231.js";
13
+ import { extractDomContainer as X } from "./index248.js";
14
+ import { isEqual as $ } from "./index249.js";
15
15
  const Y = {
16
16
  key: 2,
17
17
  class: "bb-button__loading-label sr-only"
package/dist/index68.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as i, createElementBlock as o, openBlock as a, createElementVNode as t, createCommentVNode as p, renderSlot as b, createTextVNode as m, toDisplayString as u, withModifiers as d, unref as _ } from "vue";
2
- import { useLocale as f } from "./index230.js";
2
+ import { useLocale as f } from "./index231.js";
3
3
  const h = { class: "bb-chip" }, L = { class: "bb-chip__content" }, k = ["aria-label"], B = /* @__PURE__ */ i({
4
4
  __name: "BbChip",
5
5
  props: {
package/dist/index74.js CHANGED
@@ -23,7 +23,7 @@ const S = { class: "bb-confirm__content" }, V = {
23
23
  `bb-confirm--${e.value.current?.theme ?? "default"}`
24
24
  ]), y = (u) => {
25
25
  u || i(!1);
26
- }, h = () => i(!0), g = () => i(!1);
26
+ }, h = () => i(!0), g = () => i(!1, !0);
27
27
  return (u, E) => (s(), n(T, {
28
28
  class: B(b.value),
29
29
  "hide-header": t(e).current?.hideHeader,
package/dist/index76.js CHANGED
@@ -3,15 +3,15 @@ import { confirmState as l, processMessage as e } from "./index6.js";
3
3
  const b = /* @__PURE__ */ n({
4
4
  __name: "BbConfirmPortal",
5
5
  setup(u) {
6
- const o = () => e(!0), r = () => e(!1);
7
- return (t, _) => a(l).current ? (f(), s(m, {
6
+ const r = () => e(!0), t = () => e(!1, !0);
7
+ return (o, _) => a(l).current ? (f(), s(m, {
8
8
  key: 0,
9
9
  to: ".bb-confirm__teleport",
10
10
  defer: ""
11
11
  }, [
12
- p(t.$slots, "default", {
13
- yes: o,
14
- no: r
12
+ p(o.$slots, "default", {
13
+ yes: r,
14
+ no: t
15
15
  })
16
16
  ])) : c("", !0);
17
17
  }
package/dist/index81.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as fe, ref as C, computed as p, useTemplateRef as ve, watch as $, onBeforeUnmount as be, createElementBlock as M, openBlock as E, Fragment as B, renderSlot as v, createCommentVNode as V, createVNode as x, normalizeProps as ye, mergeProps as q, withCtx as G, createElementVNode as J, normalizeStyle as we, unref as Q, renderList as ge, createBlock as Z, toDisplayString as he } from "vue";
2
- import { findRightIndex as R } from "./index262.js";
2
+ import { findRightIndex as R } from "./index266.js";
3
3
  import { useId as Ee } from "./index8.js";
4
- import { useUntil as Le } from "./index256.js";
4
+ import { useUntil as Le } from "./index241.js";
5
5
  import { wait as ke } from "./index141.js";
6
6
  import De from "./index14.js";
7
7
  /* empty css */
8
8
  import ee from "./index87.js";
9
9
  /* empty css */
10
- import $e from "./index239.js";
10
+ import $e from "./index238.js";
11
11
  /* empty css */
12
- import te from "./index263.js";
13
- import { extractDomContainer as H } from "./index257.js";
12
+ import te from "./index267.js";
13
+ import { extractDomContainer as H } from "./index248.js";
14
14
  import { useIntersectionObserver as Ae, useElementSize as Se } from "./index142.js";
15
- import { parseWidthString as Pe } from "./index258.js";
15
+ import { parseWidthString as Pe } from "./index265.js";
16
16
  const Ie = ["id", "aria-labelledby", "inert"], Te = { class: "item__content" }, Oe = 500, _e = 10, ze = /* @__PURE__ */ fe({
17
17
  inheritAttrs: !1,
18
18
  __name: "BbDropdown",
package/dist/index83.js CHANGED
@@ -9,7 +9,7 @@ import z from "./index87.js";
9
9
  /* empty css */
10
10
  import I from "./index115.js";
11
11
  /* empty css */
12
- import { useLocale as M } from "./index230.js";
12
+ import { useLocale as M } from "./index231.js";
13
13
  const O = { class: "bb-dropdown-button__content" }, R = {
14
14
  key: 1,
15
15
  class: "bb-dropdown-button__loading-label sr-only"
package/dist/index87.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as $, ref as f, computed as a, getCurrentInstance as d, onServerPrefetch as I, onBeforeMount as _, watch as L, createElementBlock as M, openBlock as B, mergeProps as k, inject as A } from "vue";
2
- import { isCssColor as C } from "./index224.js";
3
- import { get as m } from "./index278.js";
4
- import { useLogger as N } from "./index261.js";
2
+ import { isCssColor as C } from "./index250.js";
3
+ import { get as m } from "./index243.js";
4
+ import { useLogger as N } from "./index271.js";
5
5
  const S = ["innerHTML"], E = /* @__PURE__ */ $({
6
6
  __name: "BbIcon",
7
7
  props: {
package/dist/index89.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, createBlock as g, openBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
2
- import { throttle as c } from "./index264.js";
2
+ import { throttle as c } from "./index277.js";
3
3
  const M = /* @__PURE__ */ h({
4
4
  __name: "BbIntersection",
5
5
  props: {
package/dist/index92.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as I, mergeModels as B, useModel as N, computed as p, ref as L, watch as P, onMounted as W, createElementBlock as d, openBlock as c, withModifiers as F, normalizeStyle as O, normalizeClass as q, unref as v, createCommentVNode as h, Fragment as A, createElementVNode as t, renderSlot as l, createTextVNode as H, toDisplayString as M, nextTick as K } from "vue";
2
- import { parseSize as R } from "./index265.js";
2
+ import { parseSize as R } from "./index290.js";
3
3
  import { useId as $ } from "./index8.js";
4
- import { useLocale as U } from "./index230.js";
4
+ import { useLocale as U } from "./index231.js";
5
5
  import { useMobile as j } from "./index9.js";
6
- import { useUntil as G } from "./index256.js";
6
+ import { useUntil as G } from "./index241.js";
7
7
  import { wait as y } from "./index141.js";
8
8
  import { _config as J } from "./index4.js";
9
9
  const Q = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], X = {
package/dist/index94.js CHANGED
@@ -3,8 +3,8 @@ import { defineComponent as V, mergeModels as W, useModel as U, computed as b, r
3
3
  /* empty css */
4
4
  import P from "./index14.js";
5
5
  /* empty css */
6
- import { debounce as X } from "./index234.js";
7
- import { useLocale as H } from "./index230.js";
6
+ import { debounce as X } from "./index295.js";
7
+ import { useLocale as H } from "./index231.js";
8
8
  import { useRoute as J } from "./index148.js";
9
9
  const K = ["aria-label"], Q = { class: "bb-pagination__page-label sr-only" }, Y = { class: "bb-pagination__page-label" }, Z = { class: "bb-pagination__page-label" }, ee = { class: "bb-pagination__page-label sr-only" }, ue = /* @__PURE__ */ V({
10
10
  __name: "BbPagination",
package/dist/index96.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as re, mergeModels as I, ref as N, useTemplateRef as ae, computed as s, useModel as ie, watch as C, createElementBlock as se, openBlock as Y, Fragment as le, renderSlot as G, createCommentVNode as W, createVNode as ue, normalizeProps as de, mergeProps as X, unref as S, withCtx as F, createElementVNode as B, createBlock as ce, nextTick as pe } from "vue";
2
2
  import { useId as me } from "./index8.js";
3
3
  import { useIntersectionObserver as ve, useElementSize as fe } from "./index142.js";
4
- import { useLocale as be } from "./index230.js";
5
- import { useUntil as he } from "./index256.js";
4
+ import { useLocale as be } from "./index231.js";
5
+ import { useUntil as he } from "./index241.js";
6
6
  import ge from "./index14.js";
7
7
  /* empty css */
8
- import we from "./index239.js";
8
+ import we from "./index238.js";
9
9
  /* empty css */
10
- import { extractDomContainer as H } from "./index257.js";
11
- import { parseWidthString as U } from "./index258.js";
10
+ import { extractDomContainer as H } from "./index248.js";
11
+ import { parseWidthString as U } from "./index265.js";
12
12
  const Ee = ["inert"], Le = 500, ye = 10, De = /* @__PURE__ */ re({
13
13
  inheritAttrs: !1,
14
14
  __name: "BbPopover",
package/package.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "2.1.97",
3
+ "version": "2.1.99",
4
+ "description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
4
5
  "type": "module",
5
6
  "sideEffects": false,
7
+ "homepage": "https://ui-components-docs.vercel.app/",
8
+ "keywords": [
9
+ "vue",
10
+ "vue3",
11
+ "components",
12
+ "ui",
13
+ "bitboss",
14
+ "typescript"
15
+ ],
6
16
  "scripts": {
7
17
  "dev": "vite",
8
18
  "build": "vue-tsc --project tsconfig.build.json --emitDeclarationOnly && vite build",
@@ -86,7 +96,8 @@
86
96
  "vue-tsc": "^3.1.8"
87
97
  },
88
98
  "files": [
89
- "dist"
99
+ "dist",
100
+ "README.md"
90
101
  ],
91
102
  "exports": {
92
103
  ".": {
package/dist/index235.js DELETED
@@ -1,6 +0,0 @@
1
- function x(e) {
2
- return /^#([A-Fa-f0-9]{6})$/.test(e);
3
- }
4
- export {
5
- x as isHex
6
- };
package/dist/index237.js DELETED
@@ -1,203 +0,0 @@
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 "./index340.js";
3
- import { getHueFromRGB as F } from "./index341.js";
4
- import { hslToHex as b } from "./index342.js";
5
- import { useLocale as Z } from "./index230.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
- });
201
- export {
202
- ue as default
203
- };
package/dist/index264.js DELETED
@@ -1,5 +0,0 @@
1
- import t from "./index309.js";
2
- const r = t;
3
- export {
4
- r as throttle
5
- };
package/dist/index288.js DELETED
@@ -1,62 +0,0 @@
1
- import { defineComponent as g, ref as i, computed as d, onMounted as h, createElementBlock as m, openBlock as u, createElementVNode as y, Fragment as x, renderList as B, createBlock as C, normalizeClass as S, withCtx as T, createTextVNode as E, toDisplayString as w } from "vue";
2
- import { range as H } from "./index355.js";
3
- import M from "./index14.js";
4
- /* empty css */
5
- const n = 10, l = 3, V = /* @__PURE__ */ g({
6
- __name: "BaseDatePickerYearSelector",
7
- props: {
8
- cursor: {},
9
- disabled: { type: Boolean }
10
- },
11
- emits: ["update:year"],
12
- setup(p, { emit: _ }) {
13
- const f = p, b = _, o = i(), r = d(() => f.cursor.year()), c = i(r.value - n * l), s = i(r.value + n * l), v = d(
14
- () => H(c.value, s.value).map((e) => ({
15
- text: e,
16
- key: e,
17
- selected: e === r.value,
18
- handler: () => b("update:year", e)
19
- }))
20
- ), k = (e) => {
21
- const t = e.target;
22
- t.scrollTop <= 100 ? c.value = Math.max(
23
- c.value - n * l,
24
- r.value - 200
25
- ) : t.scrollHeight - t.scrollTop === t.clientHeight && (s.value = Math.min(s.value + n * l, 2101));
26
- };
27
- return h(() => {
28
- if (!o.value) return;
29
- const e = o.value.querySelector(
30
- ".content__btn--selected"
31
- );
32
- e && (e.parentElement.scrollTop = e.offsetTop - e.parentElement.clientHeight / 2 + 16);
33
- }), (e, t) => (u(), m("div", {
34
- ref_key: "container",
35
- ref: o,
36
- class: "bb-base-date-picker__button-menu bb-base-date-picker__year-selector scrollbar-border"
37
- }, [
38
- y("div", {
39
- class: "content",
40
- onScrollPassive: k
41
- }, [
42
- (u(!0), m(x, null, B(v.value, (a) => (u(), C(M, {
43
- key: a.key,
44
- class: S({
45
- content__btn: !0,
46
- "content__btn--selected": a.selected
47
- }),
48
- disabled: e.disabled,
49
- onClick: a.handler
50
- }, {
51
- default: T(() => [
52
- E(w(a.text), 1)
53
- ]),
54
- _: 2
55
- }, 1032, ["class", "disabled", "onClick"]))), 128))
56
- ], 32)
57
- ], 512));
58
- }
59
- });
60
- export {
61
- V as default
62
- };
package/dist/index355.js DELETED
@@ -1,9 +0,0 @@
1
- function l(n, c, r = 1) {
2
- const o = Math.max(Math.ceil((c - n) / r), 0), t = new Array(o);
3
- for (let e = 0; e < o; e++, n += r)
4
- t[e] = n;
5
- return t;
6
- }
7
- export {
8
- l as range
9
- };