bitboss-ui 2.0.175 → 2.1.0

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 (206) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +1 -1
  2. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +1 -4
  3. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -4
  4. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +34 -27
  5. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +0 -4
  6. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +1 -1
  7. package/dist/components/BbDialog/BbDialog.vue.d.ts +8 -3
  8. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -1
  9. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +32 -28
  10. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
  11. package/dist/components/BbSelect/BbSelect.vue.d.ts +0 -4
  12. package/dist/components/BbToast/BbToast.vue.d.ts +1 -1
  13. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
  14. package/dist/index.css +1 -1
  15. package/dist/index106.js +9 -9
  16. package/dist/index107.js +29 -31
  17. package/dist/index111.js +1 -1
  18. package/dist/index113.js +1 -1
  19. package/dist/index121.js +12 -12
  20. package/dist/index129.js +20 -26
  21. package/dist/index13.js +1 -1
  22. package/dist/index131.js +13 -14
  23. package/dist/index133.js +1 -1
  24. package/dist/index136.js +1 -1
  25. package/dist/index137.js +3 -3
  26. package/dist/index139.js +2 -2
  27. package/dist/index15.js +14 -15
  28. package/dist/index17.js +3 -3
  29. package/dist/index19.js +8 -8
  30. package/dist/index206.js +2 -138
  31. package/dist/index207.js +138 -2
  32. package/dist/index209.js +2 -86
  33. package/dist/index21.js +16 -16
  34. package/dist/index210.js +6 -0
  35. package/dist/index211.js +2 -29
  36. package/dist/index212.js +66 -17
  37. package/dist/index214.js +13 -15
  38. package/dist/index215.js +13 -3
  39. package/dist/index216.js +13 -12
  40. package/dist/index217.js +10 -15
  41. package/dist/index218.js +5 -2
  42. package/dist/index219.js +5 -2
  43. package/dist/index220.js +5 -18
  44. package/dist/index221.js +5 -12
  45. package/dist/index222.js +5 -13
  46. package/dist/index223.js +5 -6
  47. package/dist/index224.js +2 -4
  48. package/dist/index225.js +2 -106
  49. package/dist/index226.js +4 -0
  50. package/dist/index227.js +19 -99
  51. package/dist/index228.js +115 -0
  52. package/dist/index23.js +45 -46
  53. package/dist/index230.js +88 -0
  54. package/dist/index232.js +28 -119
  55. package/dist/index233.js +18 -0
  56. package/dist/index234.js +17 -228
  57. package/dist/index235.js +51 -2
  58. package/dist/index236.js +15 -2
  59. package/dist/index237.js +3 -2
  60. package/dist/index238.js +11 -40
  61. package/dist/index239.js +4 -7
  62. package/dist/index240.js +193 -11
  63. package/dist/index242.js +5 -3
  64. package/dist/index243.js +5 -3
  65. package/dist/index244.js +6 -32
  66. package/dist/index245.js +247 -174
  67. package/dist/index246.js +52 -5
  68. package/dist/index247.js +44 -5
  69. package/dist/index248.js +4 -4
  70. package/dist/index249.js +60 -5
  71. package/dist/index25.js +155 -224
  72. package/dist/index250.js +18 -5
  73. package/dist/index251.js +12 -5
  74. package/dist/index252.js +6 -5
  75. package/dist/index253.js +104 -6
  76. package/dist/index255.js +95 -47
  77. package/dist/index257.js +228 -5
  78. package/dist/index258.js +176 -59
  79. package/dist/index259.js +2 -4
  80. package/dist/index260.js +3 -11
  81. package/dist/index261.js +33 -19
  82. package/dist/index262.js +2 -200
  83. package/dist/index264.js +3 -5
  84. package/dist/index265.js +6 -2
  85. package/dist/index266.js +16 -2
  86. package/dist/index267.js +3 -6
  87. package/dist/index268.js +9 -16
  88. package/dist/index269.js +9 -3
  89. package/dist/index27.js +1 -1
  90. package/dist/index270.js +23 -9
  91. package/dist/index271.js +9 -23
  92. package/dist/index272.js +8 -9
  93. package/dist/index273.js +5 -9
  94. package/dist/index274.js +8 -8
  95. package/dist/index275.js +2 -67
  96. package/dist/index276.js +67 -5
  97. package/dist/index277.js +5 -2
  98. package/dist/index278.js +4 -5
  99. package/dist/index279.js +3 -8
  100. package/dist/index281.js +7 -17
  101. package/dist/index282.js +7 -28
  102. package/dist/index283.js +10 -470
  103. package/dist/index284.js +4 -2
  104. package/dist/index285.js +3 -7
  105. package/dist/index286.js +3 -11
  106. package/dist/index287.js +3 -4
  107. package/dist/index288.js +17 -4
  108. package/dist/index289.js +28 -5
  109. package/dist/index29.js +3 -3
  110. package/dist/index290.js +278 -198
  111. package/dist/index291.js +2 -3
  112. package/dist/index292.js +125 -3
  113. package/dist/index293.js +2 -3
  114. package/dist/index294.js +17 -0
  115. package/dist/index295.js +2 -7
  116. package/dist/index296.js +16 -3
  117. package/dist/index297.js +2 -2
  118. package/dist/index298.js +16 -3
  119. package/dist/index299.js +2 -280
  120. package/dist/index300.js +19 -2
  121. package/dist/index301.js +2 -16
  122. package/dist/index302.js +19 -2
  123. package/dist/index303.js +2 -16
  124. package/dist/index304.js +27 -2
  125. package/dist/index305.js +2 -19
  126. package/dist/index306.js +2 -2
  127. package/dist/index307.js +2 -15
  128. package/dist/index308.js +2 -2
  129. package/dist/index309.js +2 -19
  130. package/dist/index31.js +2 -2
  131. package/dist/index310.js +22 -2
  132. package/dist/index312.js +3 -2
  133. package/dist/index313.js +3 -2
  134. package/dist/index314.js +1 -1
  135. package/dist/index315.js +6 -2
  136. package/dist/index316.js +1 -1
  137. package/dist/index317.js +5 -22
  138. package/dist/index318.js +7 -0
  139. package/dist/index319.js +701 -6
  140. package/dist/index320.js +354 -125
  141. package/dist/index321.js +58 -2
  142. package/dist/index322.js +33 -2
  143. package/dist/index323.js +28 -5
  144. package/dist/index325.js +2 -354
  145. package/dist/index326.js +122 -51
  146. package/dist/index327.js +369 -2
  147. package/dist/index328.js +7 -227
  148. package/dist/index329.js +5 -128
  149. package/dist/index33.js +8 -8
  150. package/dist/index330.js +6 -367
  151. package/dist/index331.js +46 -6
  152. package/dist/index332.js +6 -18
  153. package/dist/index333.js +17 -5
  154. package/dist/index334.js +58 -47
  155. package/dist/index335.js +58 -8
  156. package/dist/index336.js +227 -5
  157. package/dist/index337.js +7 -8
  158. package/dist/index338.js +92 -57
  159. package/dist/index340.js +2 -32
  160. package/dist/index341.js +128 -27
  161. package/dist/index342.js +438 -0
  162. package/dist/index343.js +125 -91
  163. package/dist/index344.js +476 -123
  164. package/dist/index345.js +40 -429
  165. package/dist/index35.js +4 -4
  166. package/dist/index37.js +20 -21
  167. package/dist/index39.js +5 -5
  168. package/dist/index41.js +2 -2
  169. package/dist/index43.js +8 -8
  170. package/dist/index45.js +8 -8
  171. package/dist/index47.js +2 -2
  172. package/dist/index49.js +3 -3
  173. package/dist/index53.js +1 -1
  174. package/dist/index55.js +1 -1
  175. package/dist/index57.js +2 -2
  176. package/dist/index61.js +3 -3
  177. package/dist/index67.js +1 -1
  178. package/dist/index73.js +23 -26
  179. package/dist/index77.js +32 -34
  180. package/dist/index79.js +18 -19
  181. package/dist/index81.js +1 -1
  182. package/dist/index83.js +2 -2
  183. package/dist/index85.js +1 -1
  184. package/dist/index87.js +1 -1
  185. package/dist/index90.js +159 -225
  186. package/dist/index92.js +2 -2
  187. package/dist/index94.js +15 -15
  188. package/dist/index96.js +1 -1
  189. package/dist/types/CommonProps.d.ts +0 -4
  190. package/dist/utilities/functions/parseSize.d.ts +2 -0
  191. package/package.json +2 -3
  192. package/dist/components/BbTeleport.vue.d.ts +0 -20
  193. package/dist/index213.js +0 -53
  194. package/dist/index229.js +0 -68
  195. package/dist/index231.js +0 -15
  196. package/dist/index254.js +0 -252
  197. package/dist/index256.js +0 -46
  198. package/dist/index280.js +0 -5
  199. package/dist/index311.js +0 -29
  200. package/dist/index324.js +0 -703
  201. package/dist/index339.js +0 -60
  202. package/dist/index346.js +0 -129
  203. package/dist/index347.js +0 -484
  204. package/dist/index349.js +0 -5
  205. package/dist/index350.js +0 -49
  206. /package/dist/{index241.js → index263.js} +0 -0
package/dist/index25.js CHANGED
@@ -1,248 +1,179 @@
1
- import { defineComponent as ae, ref as a, computed as i, getCurrentInstance as oe, useAttrs as se, onMounted as ne, onBeforeUnmount as ie, nextTick as N, watch as re, createBlock as ue, openBlock as y, withCtx as W, createElementVNode as o, mergeProps as F, createElementBlock as B, createCommentVNode as V, renderSlot as r, createTextVNode as de, toDisplayString as E, createVNode as ce } from "vue";
2
- import { useFocusTrap as fe } from "./index238.js";
3
- import { useId as H } from "./index8.js";
4
- import { wait as g } from "./index135.js";
5
- import { waitFor as be } from "./index223.js";
6
- import { useModalsState as h } from "./index239.js";
7
- import { useMobile as pe } from "./index9.js";
8
- import ve from "./index240.js";
9
- import { useLocale as me } from "./index222.js";
10
- import ye from "./index111.js";
1
+ import { defineComponent as P, mergeModels as D, useModel as q, computed as p, ref as E, watch as A, onMounted as H, createElementBlock as d, openBlock as u, withModifiers as K, normalizeStyle as O, normalizeClass as R, unref as v, createCommentVNode as g, Fragment as U, createElementVNode as l, renderSlot as s, createTextVNode as j, toDisplayString as T, createVNode as G, withCtx as J, nextTick as Q } from "vue";
2
+ import { parseSize as X } from "./index215.js";
3
+ import { useId as V } from "./index8.js";
4
+ import { useLocale as Y } from "./index216.js";
5
+ import { useMobile as Z } from "./index9.js";
6
+ import { useUntil as x } from "./index217.js";
7
+ import { wait as h } from "./index135.js";
8
+ import ee from "./index111.js";
11
9
  /* empty css */
12
- const ge = { class: "bb-base-dialog-close" }, he = ["aria-label"], Se = /* @__PURE__ */ ae({
10
+ const oe = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], te = {
11
+ ref: "header",
12
+ class: "bb-base-dialog__header"
13
+ }, le = { class: "bb-base-dialog__close" }, se = ["aria-label", "disabled"], ae = {
14
+ ref: "body",
15
+ class: "bb-base-dialog__body scrollbar-border"
16
+ }, ie = {
17
+ ref: "footer",
18
+ class: "bb-base-dialog__footer"
19
+ }, ve = /* @__PURE__ */ P({
13
20
  __name: "BaseDialog",
14
- props: {
21
+ props: /* @__PURE__ */ D({
15
22
  closeLabel: {},
16
23
  compact: { type: Boolean },
17
24
  disabled: { type: Boolean },
18
25
  eager: { type: Boolean },
19
- panelClasses: { default: () => [] },
20
- overlayClasses: { default: () => [] },
21
26
  persistent: { type: Boolean },
22
27
  showClose: { type: Boolean, default: !0 },
23
28
  title: {},
24
- transition: { default: "fade" },
25
- transitionDuration: { default: 200 },
29
+ transitionDuration: { default: 300 },
26
30
  size: { default: "sm" },
27
31
  description: {},
28
32
  focusTarget: {},
29
33
  fullscreen: { type: [Boolean, String] },
30
- modelValue: { type: [Boolean, null] }
31
- },
32
- emits: ["shown", "hidden", "update:modelValue"],
33
- setup(R, { emit: K }) {
34
- var O, A;
35
- const l = R, u = K, _ = `title_${H().id.value}`, w = `description_${H().id.value}`, { isMobile: P } = pe(), d = a(null), k = a(null), U = a(null), j = a(null), $ = a(null), q = a(null), M = i(
36
- () => l.fullscreen === !0 || l.fullscreen === "mobile" && P.value
37
- ), T = !!((A = (O = oe()) == null ? void 0 : O.proxy) != null && A.$nuxt), p = a(0), G = i(() => {
38
- const { openedModals: e } = h();
39
- return e.value && e.value === p.value;
40
- }), { activate: J, deactivate: D } = fe(k, {
41
- initialFocus: l.focusTarget ?? void 0,
42
- clickOutsideDeactivates: (e) => !l.persistent && e.target === d.value,
43
- allowOutsideClick: !0,
44
- /* On esc deactivate the trap, return focus and then close the modal */
45
- escapeDeactivates: () => (N(async () => {
46
- l.persistent ? (b.value = !0, await g(100), b.value = !1) : u("update:modelValue", !1);
47
- }), !l.persistent)
48
- }), Q = se(), { t: X } = me(), Y = i(
49
- () => l.closeLabel || X("dialog.closeLabel").value
50
- );
51
- ne(async () => {
52
- !l.modelValue && !n.value || T && !globalThis.document || S();
53
- });
54
- const v = a(!1), c = a(!1), C = a(!0), f = a(!1), n = a(l.eager || l.modelValue), L = i(() => c.value || f.value), Z = () => {
55
- if (!globalThis.document) return;
56
- const e = window.innerWidth - document.documentElement.clientWidth;
57
- document.body.style.overflow = "hidden", document.body.style.paddingRight = `${e}px`;
58
- }, z = () => {
59
- globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
60
- };
61
- ie(() => {
62
- if (l.modelValue) {
63
- const { openedModals: e, modalHasClosed: t } = h();
64
- e.value && (t(), p.value = 0, z());
65
- }
66
- });
67
- const S = async () => {
68
- if (l.modelValue) {
69
- n.value || (n.value = !0, await be(() => !!$.value), await N()), C.value = !1, f.value = !1, c.value = !0;
70
- const { modalHasOpened: e, openedModals: t } = h();
71
- e(), p.value = t.value, Z(), await g(l.transitionDuration), c.value = !1, v.value = !0, u("shown"), J();
72
- } else {
73
- D(), c.value = !1, v.value = !1, f.value = !0, await g(l.transitionDuration), f.value = !1, C.value = !0;
74
- const { modalHasClosed: e, openedModals: t } = h();
75
- e(), p.value = 0, t.value || z(), u("hidden");
34
+ panelClasses: { default: () => [] },
35
+ overlayClasses: { default: () => [] }
36
+ }, {
37
+ modelValue: { type: Boolean, default: !1 },
38
+ modelModifiers: {}
39
+ }),
40
+ emits: /* @__PURE__ */ D(["shown", "hidden"], ["update:modelValue"]),
41
+ setup(y, { emit: S }) {
42
+ const o = y, w = S, t = q(y, "modelValue"), { t: z } = Y(), N = p(
43
+ () => o.closeLabel || z("dialog.closeLabel").value
44
+ ), n = E(null), c = x(
45
+ () => t.value || o.eager,
46
+ {
47
+ initialValue: t.value || o.eager
76
48
  }
49
+ ), b = `title_${V().id.value}`, f = `description_${V().id.value}`, C = (e) => {
50
+ if (e.key === "Escape" && (o.disabled || o.persistent))
51
+ return e.preventDefault(), a.value = !0, h(200).then(() => {
52
+ a.value = !1;
53
+ }), !1;
54
+ }, _ = async (e) => {
55
+ var i, B, L, M;
56
+ e ? ((i = window.globalThis) != null && i.document && !document.documentElement.style.getPropertyValue("--scrollbar-width") && (document.documentElement.style.setProperty(
57
+ "--scrollbar-width",
58
+ `${I()}px`
59
+ ), document.addEventListener("keydown", C)), (B = n.value) == null || B.showModal(), o.focusTarget && Q(() => {
60
+ var $;
61
+ const m = ($ = n.value) == null ? void 0 : $.querySelector(o.focusTarget);
62
+ m && m instanceof HTMLElement && m.focus();
63
+ }), w("shown")) : (await h(o.transitionDuration), (L = window.globalThis) != null && L.document && document.removeEventListener("keydown", C), (M = n.value) == null || M.close(), w("hidden"));
77
64
  };
78
- re(
79
- () => l.modelValue,
80
- () => {
81
- !l.modelValue && !n.value || T && !globalThis.document || S();
82
- },
83
- { flush: "post" }
84
- );
85
- const m = (e) => {
86
- e.target === d.value && e.preventDefault();
87
- }, b = a(!1), ee = async (e) => {
88
- l.disabled || L.value || d.value && e.target === d.value && (l.persistent ? k.value && (b.value = !0, await g(100), b.value = !1) : u("update:modelValue", !1));
89
- }, x = () => {
90
- l.disabled || L.value || (D(), u("update:modelValue", !1));
91
- }, le = i(() => {
92
- const e = [
93
- {
94
- "bb-base-dialog bb-base-dialog__overlay": !0,
95
- "bb-base-dialog--fullscreen": M.value,
96
- "bb-base-dialog--faded": !G.value,
97
- "bb-base-dialog--open": v.value,
98
- "bb-base-dialog--opening": c.value,
99
- "bb-base-dialog--closed": C.value,
100
- "bb-base-dialog--closing": f.value,
101
- "bb-base-dialog--attempted-closing": b.value
102
- },
103
- l.overlayClasses
104
- ].flat(), t = {
105
- onClick: ee,
106
- onScroll: m,
107
- onTouchmove: m,
108
- onWheel: m,
109
- onKeydown: m
110
- }, s = {
111
- "--transition-duration": l.transitionDuration / 1e3 + "s"
112
- };
113
- return {
114
- class: e,
115
- style: s,
116
- ...t,
117
- ...Q
118
- };
119
- }), te = i(() => {
120
- const e = [
121
- {
122
- "bb-base-dialog__panel": !0,
123
- "bb-base-dialog__panel--compact": l.compact
124
- },
125
- l.panelClasses
126
- ].flat(), t = {
127
- role: "dialog",
128
- "aria-modal": !0,
129
- "aria-live": v.value ? "polite" : "off"
130
- };
131
- n.value && (l.title && (t["aria-labelledby"] = _), l.description && (t["aria-describedby"] = w));
132
- let s;
133
- const I = {
134
- sm: 384,
135
- md: 652,
136
- lg: 896
137
- };
138
- return M.value ? s = "100%" : typeof l.size == "number" ? s = l.size + "px" : l.size in I ? s = I[l.size] + "px" : s = l.size + "px", {
139
- class: e,
140
- style: {
141
- maxWidth: s
142
- },
143
- ...t
144
- };
65
+ A(t, _), H(() => {
66
+ t.value && _(!0);
145
67
  });
146
- return (e, t) => (y(), ue(ve, null, {
147
- default: W(() => [
148
- o("div", F(le.value, {
149
- ref_key: "overlay",
150
- ref: d
151
- }), [
152
- o("div", F(te.value, {
153
- ref_key: "panel",
154
- ref: k
155
- }), [
156
- n.value ? (y(), B("div", {
157
- key: 0,
158
- ref_key: "content",
159
- ref: U,
160
- class: "bb-base-dialog__content"
68
+ const W = p(() => k.value ? "100%" : X(o.size, {
69
+ sm: 384,
70
+ md: 652,
71
+ lg: 896
72
+ })), r = (e) => {
73
+ if (e.preventDefault(), o.disabled || o.persistent)
74
+ return a.value = !0, h(300).then(() => {
75
+ a.value = !1;
76
+ }), !1;
77
+ t.value = !1;
78
+ }, a = E(!1), I = () => globalThis.document ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: F } = Z(), k = p(
79
+ () => o.fullscreen === !0 || o.fullscreen === "mobile" && F.value
80
+ );
81
+ return (e, i) => (u(), d("dialog", {
82
+ ref_key: "dialog",
83
+ ref: n,
84
+ "aria-describedby": v(c) && e.description ? f : void 0,
85
+ "aria-labelledby": v(c) && e.title ? b : void 0,
86
+ "aria-live": t.value ? "polite" : "off",
87
+ class: R([
88
+ "bb-base-dialog",
89
+ [
90
+ {
91
+ "bb-base-dialog--open": t.value,
92
+ "bb-base-dialog--fullscreen": k.value,
93
+ "bb-base-dialog--compact": e.compact,
94
+ "bb-base-dialog--deny-close": a.value
95
+ },
96
+ e.overlayClasses,
97
+ e.panelClasses
98
+ ].flat()
99
+ ]),
100
+ inert: !t.value,
101
+ style: O({
102
+ "--max-width": W.value,
103
+ "--transition-duration": `${o.transitionDuration}ms`
104
+ }),
105
+ onCancel: r,
106
+ onClick: K(r, ["self"])
107
+ }, [
108
+ v(c) ? (u(), d(U, { key: 0 }, [
109
+ l("div", te, [
110
+ s(e.$slots, "header", {
111
+ close: r,
112
+ title: e.title,
113
+ titleId: b
114
+ }, () => [
115
+ l("span", {
116
+ id: b,
117
+ class: "bb-base-dialog__title"
161
118
  }, [
162
- o("div", {
163
- ref_key: "header",
164
- ref: j,
165
- class: "bb-base-dialog__header"
119
+ s(e.$slots, "title", { text: e.title }, () => [
120
+ j(T(e.title), 1)
121
+ ])
122
+ ]),
123
+ l("span", le, [
124
+ e.showClose ? (u(), d("button", {
125
+ key: 0,
126
+ "aria-label": N.value,
127
+ disabled: o.disabled,
128
+ type: "button",
129
+ onClick: r
166
130
  }, [
167
- r(e.$slots, "header", {
168
- close: x,
169
- title: e.title,
170
- titleId: _
171
- }, () => [
172
- o("span", {
173
- id: _,
174
- class: "bb-base-dialog__title"
175
- }, [
176
- r(e.$slots, "title", { text: e.title }, () => [
177
- de(E(e.title), 1)
178
- ])
179
- ]),
180
- o("span", ge, [
181
- e.showClose ? (y(), B("button", {
182
- key: 0,
183
- "aria-label": Y.value,
184
- type: "button",
185
- onClick: x
131
+ s(e.$slots, "close", {}, () => [
132
+ i[0] || (i[0] = l("span", { class: "bb-base-dialog__close-icon" }, [
133
+ l("svg", {
134
+ "aria-hidden": "true",
135
+ fill: "none",
136
+ viewBox: "0 0 24 24",
137
+ xmlns: "http://www.w3.org/2000/svg"
186
138
  }, [
187
- r(e.$slots, "close", {}, () => [
188
- t[0] || (t[0] = o("span", { class: "bb-base-dialog-close__icon" }, [
189
- o("svg", {
190
- "aria-hidden": "true",
191
- fill: "none",
192
- viewBox: "0 0 24 24",
193
- xmlns: "http://www.w3.org/2000/svg"
194
- }, [
195
- o("path", {
196
- d: "M23 23L1 1M23 1L1 23",
197
- stroke: "currentColor",
198
- "stroke-linecap": "round",
199
- "stroke-width": "3"
200
- })
201
- ])
202
- ], -1))
203
- ])
204
- ], 8, he)) : V("", !0)
205
- ])
139
+ l("path", {
140
+ d: "M23 23L1 1M23 1L1 23",
141
+ stroke: "currentColor",
142
+ "stroke-linecap": "round",
143
+ "stroke-width": "3"
144
+ })
145
+ ])
146
+ ], -1))
206
147
  ])
207
- ], 512),
208
- o("div", {
209
- ref_key: "body",
210
- ref: $,
211
- class: "bb-base-dialog__body scrollbar-border"
212
- }, [
213
- r(e.$slots, "description", {
214
- descriptionId: w,
215
- text: e.description
216
- }, () => [
217
- e.description ? (y(), B("div", {
218
- key: 0,
219
- id: w,
220
- class: "bb-base-dialog__description sr-only"
221
- }, E(e.description), 1)) : V("", !0)
222
- ]),
223
- ce(ye, { "transition-duration": 500 }, {
224
- default: W(() => [
225
- r(e.$slots, "default")
226
- ]),
227
- _: 3
228
- })
229
- ], 512),
230
- t[1] || (t[1] = o("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
231
- o("div", {
232
- ref_key: "footer",
233
- ref: q,
234
- class: "bb-base-dialog__footer"
235
- }, [
236
- r(e.$slots, "footer")
237
- ], 512)
238
- ], 512)) : V("", !0)
239
- ], 16)
240
- ], 16)
241
- ]),
242
- _: 3
243
- }));
148
+ ], 8, se)) : g("", !0)
149
+ ])
150
+ ])
151
+ ], 512),
152
+ l("div", ae, [
153
+ s(e.$slots, "description", {
154
+ descriptionId: f,
155
+ text: e.description
156
+ }, () => [
157
+ e.description ? (u(), d("div", {
158
+ key: 0,
159
+ id: f,
160
+ class: "bb-base-dialog__description sr-only"
161
+ }, T(e.description), 1)) : g("", !0)
162
+ ]),
163
+ G(ee, { "transition-duration": 500 }, {
164
+ default: J(() => [
165
+ s(e.$slots, "default")
166
+ ]),
167
+ _: 3
168
+ })
169
+ ], 512),
170
+ l("div", ie, [
171
+ s(e.$slots, "footer")
172
+ ], 512)
173
+ ], 64)) : g("", !0)
174
+ ], 46, oe));
244
175
  }
245
176
  });
246
177
  export {
247
- Se as default
178
+ ve as default
248
179
  };
package/dist/index250.js CHANGED
@@ -1,7 +1,20 @@
1
- import { getDefaultExportFromCjs as r } from "./index319.js";
2
- import { __require as e } from "./index307.js";
3
- var o = e();
4
- const m = /* @__PURE__ */ r(o);
1
+ import { isNil as c } from "./index259.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
+ };
5
18
  export {
6
- m as default
19
+ y as matchAnyKey
7
20
  };
package/dist/index251.js CHANGED
@@ -1,7 +1,14 @@
1
- import { getDefaultExportFromCjs as e } from "./index319.js";
2
- import { __require as r } from "./index309.js";
3
- var o = r();
4
- const p = /* @__PURE__ */ e(o);
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
+ } };
11
+ };
5
12
  export {
6
- p as default
13
+ n as useArray
7
14
  };
package/dist/index252.js CHANGED
@@ -1,7 +1,8 @@
1
- import { getDefaultExportFromCjs as e } from "./index319.js";
2
- import { __require as r } from "./index311.js";
3
- var o = r();
4
- const f = /* @__PURE__ */ e(o);
1
+ const o = (e, t = 50) => new Promise((r) => {
2
+ const n = setInterval(() => {
3
+ e() && (clearInterval(n), r());
4
+ }, t);
5
+ });
5
6
  export {
6
- f as default
7
+ o as waitFor
7
8
  };
package/dist/index253.js CHANGED
@@ -1,10 +1,108 @@
1
- const o = "bitboss-ui | ", e = () => ({
2
- warn: (r) => console.warn(`${o}${r}`),
3
- error: (r) => console.error(`${o}${r}`),
4
- throw: (r) => {
5
- throw new Error(`${o}${r}`);
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 "./index237.js";
3
+ import { isNil as l } from "./index259.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));
6
104
  }
7
105
  });
8
106
  export {
9
- e as useLogger
107
+ K as default
10
108
  };