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/index90.js CHANGED
@@ -1,247 +1,181 @@
1
- import { defineComponent as ae, ref as l, useAttrs as ne, computed as u, getCurrentInstance as ie, onBeforeUnmount as A, onMounted as re, watch as ue, createBlock as ce, openBlock as g, withCtx as de, createElementVNode as s, mergeProps as E, createElementBlock as $, createCommentVNode as T, renderSlot as n, createTextVNode as fe, toDisplayString as H, unref as ve, nextTick as pe } from "vue";
2
- import { useFocusTrap as be } from "./index238.js";
3
- import { useId as I } from "./index8.js";
4
- import { wait as D } from "./index135.js";
5
- import { useModalsState as b } from "./index239.js";
6
- import me from "./index240.js";
7
- import { useMobile as ye } from "./index9.js";
8
- import { useLocale as he } from "./index222.js";
9
- const ge = ["inert"], _e = { class: "bb-offcanvas-close" }, ke = ["aria-label"], De = /* @__PURE__ */ ae({
1
+ import { defineComponent as O, mergeModels as E, useModel as P, computed as p, ref as T, watch as q, onMounted as A, createElementBlock as d, openBlock as c, withModifiers as H, normalizeStyle as K, normalizeClass as R, unref as v, createCommentVNode as y, Fragment as U, createElementVNode as s, renderSlot as l, createTextVNode as j, toDisplayString as V, createVNode as G, withCtx as J, nextTick as Q } from "vue";
2
+ import { parseSize as X } from "./index215.js";
3
+ import { useId as z } 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";
9
+ /* empty css */
10
+ const te = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], oe = {
11
+ ref: "header",
12
+ class: "bb-offcanvas__header"
13
+ }, se = { class: "bb-offcanvas__close" }, le = ["aria-label", "disabled"], ae = {
14
+ ref: "body",
15
+ class: "bb-offcanvas__body scrollbar-border"
16
+ }, ne = {
17
+ ref: "footer",
18
+ class: "bb-offcanvas__footer"
19
+ }, ve = /* @__PURE__ */ O({
10
20
  __name: "BbOffCanvas",
11
- props: {
21
+ props: /* @__PURE__ */ E({
12
22
  closeLabel: {},
13
23
  compact: { type: Boolean },
14
24
  disabled: { type: Boolean },
15
25
  eager: { type: Boolean },
16
- panelClasses: { default: () => [] },
17
- overlayClasses: { default: () => [] },
18
26
  persistent: { type: Boolean },
19
27
  showClose: { type: Boolean, default: !0 },
20
28
  title: {},
21
- transition: { default: "fade" },
22
- transitionDuration: { default: 350 },
29
+ transitionDuration: { default: 300 },
23
30
  size: { default: "sm" },
24
31
  description: {},
25
32
  focusTarget: {},
26
33
  fullscreen: { type: [Boolean, String] },
27
- modelValue: { type: [Boolean, null] },
34
+ panelClasses: { default: () => [] },
35
+ overlayClasses: { default: () => [] },
28
36
  direction: { default: "left" }
29
- },
30
- emits: ["shown", "hidden", "update:modelValue"],
31
- setup(W, { emit: F }) {
32
- var O, S;
33
- const e = W, c = F, { t: R } = he(), _ = `title_${I().id.value}`, k = `description_${I().id.value}`, { isMobile: K } = ye(), d = l(null), C = l(null), P = l(null), U = l(null), j = l(null), q = l(null), G = ne(), w = u(
34
- () => e.fullscreen === !0 || e.fullscreen === "mobile" && K.value
35
- ), L = !!((S = (O = ie()) == null ? void 0 : O.proxy) != null && S.$nuxt), f = l(0), J = u(() => {
36
- const { openedModals: t } = b();
37
- return !t.value || t.value === f.value;
38
- }), { activate: Q, deactivate: X } = be(C, {
39
- initialFocus: e.focusTarget ?? void 0,
40
- clickOutsideDeactivates: (t) => t.target === d.value,
41
- allowOutsideClick: !0,
42
- /* On esc deactivate the trap, return focus and then close the modal */
43
- escapeDeactivates: () => (pe(() => {
44
- c("update:modelValue", !1);
45
- }), !0)
46
- }), Y = u(() => e.closeLabel), B = l(!1), v = l(!1), m = l(!0), p = l(!1), i = l(e.eager || e.modelValue), x = l(null), Z = u(() => v.value || p.value), ee = () => {
47
- if (!globalThis.document) return;
48
- const t = window.innerWidth - document.documentElement.clientWidth;
49
- document.body.style.overflow = "hidden", document.body.style.paddingRight = `${t}px`;
50
- }, V = () => {
51
- globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
52
- };
53
- A(() => {
54
- if (e.modelValue) {
55
- const { openedModals: t, modalHasClosed: o } = b();
56
- t.value && (o(), f.value = 0, V());
57
- }
58
- }), re(() => {
59
- !e.modelValue && !i.value || L && !globalThis.document || N();
60
- }), A(() => {
61
- if (e.modelValue) {
62
- const { openedModals: t, modalHasClosed: o } = b();
63
- t.value && (o(), f.value = 0, V());
64
- }
65
- }), ue(
66
- () => e.modelValue,
67
- () => {
68
- !e.modelValue && !i.value || L && !globalThis.document || N();
69
- },
70
- { flush: "post" }
71
- );
72
- const N = async () => {
73
- if (e.modelValue) {
74
- i.value || (i.value = !0), m.value = !1, p.value = !1, v.value = !0;
75
- const { modalHasOpened: t, openedModals: o } = b();
76
- t(), f.value = o.value, ee(), await D(e.transitionDuration), v.value = !1, B.value = !0, c("shown"), Q();
77
- } else {
78
- X(), v.value = !1, B.value = !1, p.value = !0;
79
- const { modalHasClosed: t, openedModals: o } = b();
80
- t(), f.value = 0, o.value || V(), await D(e.transitionDuration), p.value = !1, m.value = !0, c("hidden"), x.value instanceof HTMLElement && x.value.focus();
37
+ }, {
38
+ modelValue: { type: Boolean, default: !1 },
39
+ modelModifiers: {}
40
+ }),
41
+ emits: /* @__PURE__ */ E(["shown", "hidden"], ["update:modelValue"]),
42
+ setup(w, { emit: D }) {
43
+ const t = w, g = D, o = P(w, "modelValue"), { t: S } = Y(), N = p(
44
+ () => t.closeLabel || S("dialog.closeLabel").value
45
+ ), i = T(null), u = x(
46
+ () => o.value || t.eager,
47
+ {
48
+ initialValue: o.value || t.eager
81
49
  }
82
- }, y = (t) => {
83
- t.target === d.value && t.preventDefault();
84
- }, z = l(!1), te = async (t) => {
85
- e.disabled || Z.value || d.value && t.target === d.value && (e.persistent ? C.value && (z.value = !0, await D(100), z.value = !1) : c("update:modelValue", !1));
86
- }, M = () => {
87
- e.disabled || c("update:modelValue", !1);
88
- }, oe = u(() => {
89
- const t = [
90
- {
91
- "bb-offcanvas bb-offcanvas__overlay": !0,
92
- "bb-offcanvas--fullscreen": w.value,
93
- "bb-offcanvas--faded": !J.value,
94
- "bb-offcanvas--open": B.value,
95
- "bb-offcanvas--opening": v.value,
96
- "bb-offcanvas--closed": m.value,
97
- "bb-offcanvas--closing": p.value,
98
- "bb-offcanvas--attempted-closing": z.value,
99
- [`bb-offcanvas--${e.direction}`]: !0
100
- },
101
- e.overlayClasses
102
- ].flat(), o = {
103
- onClick: te,
104
- onScroll: y,
105
- onTouchmove: y,
106
- onWheel: y,
107
- onKeydown: y
108
- }, a = {
109
- transitionDuration: e.transitionDuration / 1e3 + "s"
110
- };
111
- return {
112
- class: t,
113
- style: a,
114
- ...o,
115
- ...G
116
- };
117
- }), le = u(() => {
118
- const t = [
119
- {
120
- "bb-offcanvas__panel": !0,
121
- "bb-offcanvas__panel--compact": e.compact
122
- },
123
- e.panelClasses
124
- ].flat(), o = {
125
- role: "dialog",
126
- "aria-modal": !0
127
- };
128
- i.value && (o["aria-labelledby"] = _, e.description && (o["aria-describedby"] = k));
129
- let a, r;
130
- const h = {
131
- sm: 384,
132
- md: 652,
133
- lg: 896
134
- };
135
- e.direction === "left" || e.direction === "right" ? w.value ? a = "100%" : typeof e.size == "number" ? a = e.size + "px" : e.size in h ? a = h[e.size] + "px" : a = e.size + "px" : w.value ? r = "100%" : typeof e.size == "number" ? r = e.size + "px" : e.size in h ? r = h[e.size] + "px" : Number.isNaN(Number(e.size)) ? e.size === "auto" && (r = "auto") : r = e.size + "px";
136
- const se = {
137
- maxWidth: a,
138
- height: r,
139
- transitionDuration: e.transitionDuration / 1e3 + "s"
140
- };
141
- return {
142
- class: t,
143
- style: se,
144
- ...o
145
- };
50
+ ), f = `title_${z().id.value}`, m = `description_${z().id.value}`, C = (e) => {
51
+ if (e.key === "Escape" && (t.disabled || t.persistent))
52
+ return e.preventDefault(), a.value = !0, h(200).then(() => {
53
+ a.value = !1;
54
+ }), !1;
55
+ }, _ = async (e) => {
56
+ var n, B, $, L;
57
+ e ? ((n = window.globalThis) != null && n.document && !document.documentElement.style.getPropertyValue("--scrollbar-width") && (document.documentElement.style.setProperty(
58
+ "--scrollbar-width",
59
+ `${W()}px`
60
+ ), document.addEventListener("keydown", C)), (B = i.value) == null || B.showModal(), t.focusTarget && Q(() => {
61
+ var M;
62
+ const b = (M = i.value) == null ? void 0 : M.querySelector(t.focusTarget);
63
+ b && b instanceof HTMLElement && b.focus();
64
+ }), g("shown")) : (await h(t.transitionDuration), ($ = window.globalThis) != null && $.document && document.removeEventListener("keydown", C), (L = i.value) == null || L.close(), g("hidden"));
65
+ };
66
+ q(o, _), A(() => {
67
+ o.value && _(!0);
146
68
  });
147
- return (t, o) => (g(), ce(me, null, {
148
- default: de(() => [
149
- s("div", E(oe.value, {
150
- ref_key: "overlay",
151
- ref: d,
152
- inert: m.value
153
- }), [
154
- s("div", E(le.value, {
155
- ref_key: "panel",
156
- ref: C
157
- }), [
158
- i.value ? (g(), $("div", {
159
- key: 0,
160
- ref_key: "content",
161
- ref: P,
162
- class: "bb-offcanvas__content"
69
+ const I = p(() => k.value ? "100%" : t.size === "auto" ? "fit-content" : X(t.size, {
70
+ sm: 384,
71
+ md: 652,
72
+ lg: 896
73
+ })), r = (e) => {
74
+ if (e.preventDefault(), t.disabled || t.persistent)
75
+ return a.value = !0, h(300).then(() => {
76
+ a.value = !1;
77
+ }), !1;
78
+ o.value = !1;
79
+ }, a = T(!1), W = () => globalThis.document ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: F } = Z(), k = p(
80
+ () => t.fullscreen === !0 || t.fullscreen === "mobile" && F.value
81
+ );
82
+ return (e, n) => (c(), d("dialog", {
83
+ ref_key: "dialog",
84
+ ref: i,
85
+ "aria-describedby": v(u) && e.description ? m : void 0,
86
+ "aria-labelledby": v(u) && e.title ? f : void 0,
87
+ "aria-live": o.value ? "polite" : "off",
88
+ class: R([
89
+ "bb-offcanvas",
90
+ [
91
+ {
92
+ "bb-offcanvas--open": o.value,
93
+ "bb-offcanvas--fullscreen": k.value,
94
+ "bb-offcanvas--compact": e.compact,
95
+ "bb-offcanvas--deny-close": a.value,
96
+ [`bb-offcanvas--${t.direction}`]: !0
97
+ },
98
+ e.overlayClasses,
99
+ e.panelClasses
100
+ ].flat()
101
+ ]),
102
+ inert: !o.value,
103
+ style: K({
104
+ "--max-size": I.value,
105
+ "--transition-duration": `${t.transitionDuration}ms`
106
+ }),
107
+ onCancel: r,
108
+ onClick: H(r, ["self"])
109
+ }, [
110
+ v(u) ? (c(), d(U, { key: 0 }, [
111
+ s("div", oe, [
112
+ l(e.$slots, "header", {
113
+ close: r,
114
+ title: e.title,
115
+ titleId: f
116
+ }, () => [
117
+ s("span", {
118
+ id: f,
119
+ class: "bb-offcanvas__title"
163
120
  }, [
164
- n(t.$slots, "content", { close: M }, () => [
165
- s("div", {
166
- ref_key: "header",
167
- ref: U,
168
- class: "bb-offcanvas__header"
169
- }, [
170
- n(t.$slots, "header", {
171
- close: M,
172
- title: t.title,
173
- titleId: _
174
- }, () => [
175
- s("span", {
176
- id: _,
177
- class: "bb-offcanvas__title"
121
+ l(e.$slots, "title", { text: e.title }, () => [
122
+ j(V(e.title), 1)
123
+ ])
124
+ ]),
125
+ s("span", se, [
126
+ e.showClose ? (c(), d("button", {
127
+ key: 0,
128
+ "aria-label": N.value,
129
+ disabled: t.disabled,
130
+ type: "button",
131
+ onClick: r
132
+ }, [
133
+ l(e.$slots, "close", {}, () => [
134
+ n[0] || (n[0] = s("span", { class: "bb-offcanvas__close-icon" }, [
135
+ s("svg", {
136
+ "aria-hidden": "true",
137
+ fill: "none",
138
+ viewBox: "0 0 24 24",
139
+ xmlns: "http://www.w3.org/2000/svg"
178
140
  }, [
179
- n(t.$slots, "title", { text: t.title }, () => [
180
- fe(H(t.title), 1)
181
- ])
182
- ]),
183
- s("span", _e, [
184
- t.showClose ? (g(), $("button", {
185
- key: 0,
186
- "aria-label": Y.value || ve(R)("common.closeLabel").value,
187
- type: "button",
188
- onClick: M
189
- }, [
190
- n(t.$slots, "close", {}, () => [
191
- o[0] || (o[0] = s("span", { class: "bb-offcanvas-close__icon" }, [
192
- s("svg", {
193
- "aria-hidden": "true",
194
- fill: "none",
195
- viewBox: "0 0 24 24",
196
- xmlns: "http://www.w3.org/2000/svg"
197
- }, [
198
- s("path", {
199
- d: "M23 23L1 1M23 1L1 23",
200
- stroke: "currentColor",
201
- "stroke-linecap": "round",
202
- "stroke-width": "2"
203
- })
204
- ])
205
- ], -1))
206
- ])
207
- ], 8, ke)) : T("", !0)
141
+ s("path", {
142
+ d: "M23 23L1 1M23 1L1 23",
143
+ stroke: "currentColor",
144
+ "stroke-linecap": "round",
145
+ "stroke-width": "3"
146
+ })
208
147
  ])
209
- ])
210
- ], 512),
211
- s("div", {
212
- ref_key: "body",
213
- ref: j,
214
- class: "bb-offcanvas__body scrollbar-border"
215
- }, [
216
- n(t.$slots, "description", {
217
- descriptionId: k,
218
- text: t.description
219
- }, () => [
220
- t.description ? (g(), $("div", {
221
- key: 0,
222
- id: k,
223
- class: "bb-offcanvas__description sr-only"
224
- }, H(t.description), 1)) : T("", !0)
225
- ]),
226
- n(t.$slots, "default")
227
- ], 512),
228
- o[1] || (o[1] = s("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
229
- s("div", {
230
- ref_key: "footer",
231
- ref: q,
232
- class: "bb-offcanvas__footer"
233
- }, [
234
- n(t.$slots, "footer")
235
- ], 512)
236
- ])
237
- ], 512)) : T("", !0)
238
- ], 16)
239
- ], 16, ge)
240
- ]),
241
- _: 3
242
- }));
148
+ ], -1))
149
+ ])
150
+ ], 8, le)) : y("", !0)
151
+ ])
152
+ ])
153
+ ], 512),
154
+ s("div", ae, [
155
+ l(e.$slots, "description", {
156
+ descriptionId: m,
157
+ text: e.description
158
+ }, () => [
159
+ e.description ? (c(), d("div", {
160
+ key: 0,
161
+ id: m,
162
+ class: "bb-offcanvas__description sr-only"
163
+ }, V(e.description), 1)) : y("", !0)
164
+ ]),
165
+ G(ee, { "transition-duration": 500 }, {
166
+ default: J(() => [
167
+ l(e.$slots, "default")
168
+ ]),
169
+ _: 3
170
+ })
171
+ ], 512),
172
+ s("div", ne, [
173
+ l(e.$slots, "footer")
174
+ ], 512)
175
+ ], 64)) : y("", !0)
176
+ ], 46, te));
243
177
  }
244
178
  });
245
179
  export {
246
- De as default
180
+ ve as default
247
181
  };
package/dist/index92.js CHANGED
@@ -3,8 +3,8 @@ import { defineComponent as V, mergeModels as W, useModel as U, computed as d, r
3
3
  /* empty css */
4
4
  import P from "./index13.js";
5
5
  /* empty css */
6
- import { debounce as X } from "./index272.js";
7
- import { useLocale as H } from "./index222.js";
6
+ import { debounce as X } from "./index268.js";
7
+ import { useLocale as H } from "./index216.js";
8
8
  import { useRoute as J } from "./index142.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/index94.js CHANGED
@@ -1,11 +1,11 @@
1
- import { defineComponent as V, ref as m, computed as g, createBlock as k, openBlock as y, unref as i, normalizeClass as D, withCtx as v, createElementVNode as d, createCommentVNode as M, renderSlot as C, toDisplayString as z, normalizeProps as I, guardReactiveProps as O, nextTick as S } from "vue";
1
+ import { defineComponent as V, ref as m, computed as g, createBlock as k, openBlock as y, unref as l, normalizeClass as D, withCtx as v, createElementVNode as d, createCommentVNode as M, renderSlot as C, toDisplayString as z, normalizeProps as I, guardReactiveProps as O, nextTick as S } from "vue";
2
2
  import { useId as H } from "./index8.js";
3
3
  import { useIntersectionObserver as N } from "./index137.js";
4
- import { useLocale as U } from "./index222.js";
5
- import { useUntil as W } from "./index260.js";
4
+ import { useLocale as U } from "./index216.js";
5
+ import { useUntil as W } from "./index217.js";
6
6
  import q from "./index13.js";
7
7
  /* empty css */
8
- import A from "./index232.js";
8
+ import A from "./index228.js";
9
9
  /* empty css */
10
10
  const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @__PURE__ */ V({
11
11
  __name: "BbPopover",
@@ -21,7 +21,6 @@ const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @
21
21
  showClose: { type: Boolean, default: !0 },
22
22
  theme: { default: "default" },
23
23
  transitionDuration: { default: 300 },
24
- teleportTarget: {},
25
24
  focusTarget: {},
26
25
  width: {}
27
26
  },
@@ -37,9 +36,10 @@ const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @
37
36
  );
38
37
  const o = m(!1), u = W(o), b = (e) => {
39
38
  var a;
40
- e.target instanceof HTMLElement && ((a = c.value) != null && a.contains(e.target) || s());
39
+ if (e.target instanceof HTMLElement && !((a = c.value) != null && a.contains(e.target)))
40
+ return s();
41
41
  }, T = async () => {
42
- o.value = !0, document.addEventListener("click", b);
42
+ o.value = !0, document.addEventListener("click", b, { passive: !0 });
43
43
  }, s = async () => {
44
44
  o.value = !1, document.removeEventListener("click", b);
45
45
  }, w = async (e) => {
@@ -53,8 +53,8 @@ const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @
53
53
  e.stopImmediatePropagation(), await T();
54
54
  let a = t.focusTarget ?? ".bb-popover__close";
55
55
  await S();
56
- const l = (h = c.value) == null ? void 0 : h.querySelector(a);
57
- l instanceof HTMLElement && (l.focus(), n("shown"));
56
+ const i = (h = c.value) == null ? void 0 : h.querySelector(a);
57
+ i instanceof HTMLElement && (i.focus(), n("shown"));
58
58
  }, f = async () => {
59
59
  await s(), n("hidden");
60
60
  }, E = g(() => {
@@ -71,7 +71,7 @@ const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @
71
71
  ref_key: "wrapper",
72
72
  ref: r,
73
73
  modelValue: o.value,
74
- "onUpdate:modelValue": a[0] || (a[0] = (l) => o.value = l),
74
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => o.value = i),
75
75
  "arrow-padding": e.arrowPadding,
76
76
  block: e.block,
77
77
  class: D(["bb-popover", {
@@ -83,18 +83,18 @@ const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @
83
83
  width: E.value
84
84
  }
85
85
  },
86
+ dialog: "",
86
87
  offset: e.offset,
87
88
  padding: e.padding,
88
89
  placement: e.placement,
89
- "render-content": i(u),
90
- tag: "dialog",
90
+ "render-content": l(u),
91
91
  "transition-duration": e.transitionDuration
92
92
  }, {
93
93
  activator: v(() => [
94
94
  C(e.$slots, "activator", I(O({
95
95
  props: {
96
- "aria-expanded": i(u) ? o.value : !1,
97
- "aria-controls": i(u) ? `popover_${p}` : void 0,
96
+ "aria-expanded": l(u) ? o.value : !1,
97
+ "aria-controls": l(u) ? `popover_${p}` : void 0,
98
98
  onClick: w,
99
99
  id: p,
100
100
  disabled: !!e.disabled
@@ -117,7 +117,7 @@ const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @
117
117
  onClick: f
118
118
  }, {
119
119
  default: v(() => [
120
- d("span", Z, z(e.closeLabel || i(B)("common.closeLabel").value), 1),
120
+ d("span", Z, z(e.closeLabel || l(B)("common.closeLabel").value), 1),
121
121
  a[1] || (a[1] = d("svg", {
122
122
  fill: "none",
123
123
  viewBox: "0 0 24 24",
package/dist/index96.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, computed as a, createElementBlock as l, openBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
2
- import { clamp as p } from "./index207.js";
2
+ import { clamp as p } from "./index206.js";
3
3
  import { getAsPercentageBetween as i } from "./index136.js";
4
4
  const _ = /* @__PURE__ */ r({
5
5
  __name: "BbProgress",
@@ -209,10 +209,6 @@ export type CommonProps = {
209
209
  * Will submit "falseValue" if the input is not checked. Otherwise "trueValue" will be submitted.
210
210
  */
211
211
  submitWhenFalse?: boolean;
212
- /**
213
- * Target to teleport the floating element to.
214
- */
215
- teleportTarget?: string;
216
212
  /**
217
213
  * Value of the input when checked. It handles any kind of serializable object.
218
214
  */
@@ -0,0 +1,2 @@
1
+ import { Sizes } from '../../components/BaseDialog/BaseDialog.vue';
2
+ export declare const parseSize: (size: string | number, sizes: Sizes) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "2.0.175",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "scripts": {
@@ -24,7 +24,6 @@
24
24
  "copy-anything": "^4.0.3",
25
25
  "dayjs": "^1.11.13",
26
26
  "doublet": "^1.0.1",
27
- "focus-trap": "^7.6.4",
28
27
  "focusable-selectors": "^0.8.4",
29
28
  "lodash.clonedeepwith": "^4.5.0",
30
29
  "lodash.deburr": "^4.1.0",
@@ -93,4 +92,4 @@
93
92
  "lint-staged": {
94
93
  "*.{js,css,md,html,json,vue,ts}": "prettier --write"
95
94
  }
96
- }
95
+ }
@@ -1,20 +0,0 @@
1
- type Props = {
2
- target?: string;
3
- };
4
- declare function __VLS_template(): {
5
- attrs: Partial<{}>;
6
- slots: {
7
- default?(_: {}): any;
8
- };
9
- refs: {};
10
- rootEl: any;
11
- };
12
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
- export default _default;
16
- type __VLS_WithTemplateSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
package/dist/index213.js DELETED
@@ -1,53 +0,0 @@
1
- import { computed as l, unref as o } from "vue";
2
- import { useItemText as x } from "./index281.js";
3
- import { useItemValue as w } from "./index273.js";
4
- import { hash as y } from "./index215.js";
5
- import { useLogger as D } from "./index253.js";
6
- const { getItemText: O } = x(), { getItemValue: V } = w(), { warn: H } = D(), T = (u, c, m, a, d, r) => r ? !1 : !!(c || u.disabled || a && d >= a), q = ({
7
- items: u,
8
- disabled: c,
9
- selectable: m,
10
- itemText: a,
11
- itemValue: d,
12
- selectedIndexedByHash: r,
13
- max: b = 1 / 0
14
- }) => {
15
- const v = l(() => o(c)), p = l(() => o(u)), h = l(
16
- () => Object.keys(r.value).length
17
- ), g = o(b), f = (e) => {
18
- const n = V(e, o(d)), t = y(n), i = O(e, o(a)), s = r.value[t] !== void 0, I = T(
19
- e,
20
- v.value,
21
- m,
22
- g,
23
- h.value,
24
- s
25
- );
26
- return {
27
- item: e,
28
- text: i,
29
- value: n,
30
- valueHash: t,
31
- selected: s,
32
- disabled: o(I)
33
- };
34
- };
35
- return {
36
- options: l(() => {
37
- const e = [], n = /* @__PURE__ */ new Set();
38
- for (let t = 0; t < p.value.length; t++) {
39
- const i = p.value[t];
40
- i.disabled && H(
41
- "Disabling an item by passing a disabled option to the item itself is deprecated and will be removed in a future version. Use the `disabled` prop or the `selectable` iteratee prop instead."
42
- );
43
- const s = f(i);
44
- n.has(s.valueHash) || (n.add(s.valueHash), e.push(s));
45
- }
46
- return e;
47
- }),
48
- createOption: f
49
- };
50
- };
51
- export {
52
- q as useBaseOptions
53
- };