bitboss-ui 2.0.157 → 2.0.160

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 (174) hide show
  1. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +2 -2
  2. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +13 -0
  3. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
  4. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
  5. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +2 -2
  6. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +14 -0
  7. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
  8. package/dist/index100.js +9 -9
  9. package/dist/index111.js +11 -11
  10. package/dist/index117.js +26 -20
  11. package/dist/index119.js +2 -2
  12. package/dist/index121.js +6 -6
  13. package/dist/index123.js +1 -1
  14. package/dist/index125.js +1 -1
  15. package/dist/index127.js +1 -1
  16. package/dist/index128.js +13 -13
  17. package/dist/index129.js +1 -1
  18. package/dist/index13.js +1 -1
  19. package/dist/index134.js +2 -2
  20. package/dist/index15.js +8 -8
  21. package/dist/index17.js +3 -3
  22. package/dist/index19.js +8 -8
  23. package/dist/index209.js +66 -2
  24. package/dist/index21.js +16 -16
  25. package/dist/index211.js +13 -2
  26. package/dist/index212.js +41 -3
  27. package/dist/index213.js +6 -41
  28. package/dist/index214.js +7 -6
  29. package/dist/index215.js +15 -7
  30. package/dist/index216.js +12 -7
  31. package/dist/index217.js +32 -13
  32. package/dist/index218.js +3 -13
  33. package/dist/index219.js +5 -86
  34. package/dist/index220.js +127 -0
  35. package/dist/index221.js +16 -29
  36. package/dist/index222.js +15 -16
  37. package/dist/index223.js +19 -51
  38. package/dist/index224.js +15 -15
  39. package/dist/index225.js +2 -3
  40. package/dist/index226.js +2 -12
  41. package/dist/index227.js +19 -15
  42. package/dist/index228.js +89 -61
  43. package/dist/index23.js +16 -16
  44. package/dist/index230.js +2 -13
  45. package/dist/index231.js +2 -5
  46. package/dist/index232.js +4 -125
  47. package/dist/index233.js +2 -16
  48. package/dist/index234.js +4 -16
  49. package/dist/index235.js +199 -18
  50. package/dist/index237.js +19 -2
  51. package/dist/index238.js +27 -2
  52. package/dist/index239.js +3 -20
  53. package/dist/index240.js +6 -92
  54. package/dist/index241.js +252 -0
  55. package/dist/index242.js +52 -2
  56. package/dist/index243.js +44 -4
  57. package/dist/index244.js +5 -200
  58. package/dist/index245.js +62 -0
  59. package/dist/index246.js +86 -19
  60. package/dist/index248.js +27 -248
  61. package/dist/index249.js +17 -52
  62. package/dist/index25.js +107 -128
  63. package/dist/index250.js +50 -43
  64. package/dist/index251.js +15 -5
  65. package/dist/index252.js +12 -60
  66. package/dist/index253.js +16 -3
  67. package/dist/index254.js +17 -33
  68. package/dist/index255.js +126 -2
  69. package/dist/index256.js +106 -2
  70. package/dist/{index259.js → index258.js} +2 -2
  71. package/dist/index260.js +14 -0
  72. package/dist/index261.js +227 -17
  73. package/dist/index262.js +353 -110
  74. package/dist/index263.js +2 -12
  75. package/dist/index264.js +2 -228
  76. package/dist/index265.js +162 -355
  77. package/dist/index27.js +1 -1
  78. package/dist/index270.js +3 -6
  79. package/dist/index272.js +7 -9
  80. package/dist/index273.js +430 -3
  81. package/dist/index274.js +2 -431
  82. package/dist/index275.js +7 -2
  83. package/dist/index276.js +10 -88
  84. package/dist/index277.js +2 -7
  85. package/dist/index278.js +223 -10
  86. package/dist/index279.js +200 -3
  87. package/dist/index280.js +281 -17
  88. package/dist/index281.js +6 -9
  89. package/dist/index282.js +2 -28
  90. package/dist/index283.js +2 -200
  91. package/dist/index284.js +2 -3
  92. package/dist/index285.js +4 -0
  93. package/dist/index286.js +2 -7
  94. package/dist/index287.js +2 -281
  95. package/dist/index288.js +3 -6
  96. package/dist/index289.js +4 -2
  97. package/dist/index29.js +2 -2
  98. package/dist/index290.js +3 -2
  99. package/dist/index291.js +9 -2
  100. package/dist/index292.js +6 -2
  101. package/dist/index293.js +16 -2
  102. package/dist/index294.js +3 -2
  103. package/dist/index295.js +9 -176
  104. package/dist/index296.js +8 -3
  105. package/dist/index297.js +2 -3
  106. package/dist/index298.js +2 -8
  107. package/dist/index299.js +2 -2
  108. package/dist/index300.js +2 -2
  109. package/dist/index301.js +1 -1
  110. package/dist/index302.js +1 -1
  111. package/dist/index303.js +28 -2
  112. package/dist/index304.js +21 -1
  113. package/dist/index306.js +5 -0
  114. package/dist/index307.js +17 -224
  115. package/dist/index308.js +126 -2
  116. package/dist/index309.js +1 -1
  117. package/dist/index31.js +2 -2
  118. package/dist/index310.js +1 -1
  119. package/dist/index311.js +2 -126
  120. package/dist/index312.js +436 -2
  121. package/dist/index313.js +113 -422
  122. package/dist/index314.js +2 -127
  123. package/dist/index315.js +67 -3
  124. package/dist/index316.js +33 -3
  125. package/dist/index317.js +27 -57
  126. package/dist/index319.js +5 -8
  127. package/dist/index320.js +5 -67
  128. package/dist/index321.js +8 -2
  129. package/dist/index322.js +480 -5
  130. package/dist/index325.js +3 -32
  131. package/dist/index326.js +89 -28
  132. package/dist/index327.js +9 -0
  133. package/dist/index328.js +6 -3
  134. package/dist/index329.js +19 -480
  135. package/dist/index33.js +8 -8
  136. package/dist/index330.js +46 -7
  137. package/dist/index331.js +3 -6
  138. package/dist/index332.js +3 -8
  139. package/dist/index333.js +57 -6
  140. package/dist/index334.js +7 -18
  141. package/dist/index335.js +5 -6
  142. package/dist/index336.js +8 -47
  143. package/dist/index337.js +1 -1
  144. package/dist/index339.js +1 -1
  145. package/dist/index340.js +424 -2
  146. package/dist/index341.js +2 -424
  147. package/dist/index35.js +4 -4
  148. package/dist/index37.js +22 -22
  149. package/dist/index39.js +4 -4
  150. package/dist/index41.js +2 -2
  151. package/dist/index43.js +8 -8
  152. package/dist/index45.js +8 -8
  153. package/dist/index47.js +2 -2
  154. package/dist/index49.js +79 -40
  155. package/dist/index53.js +1 -1
  156. package/dist/index55.js +1 -1
  157. package/dist/index57.js +2 -2
  158. package/dist/index61.js +1 -1
  159. package/dist/index75.js +1 -1
  160. package/dist/index77.js +1 -1
  161. package/dist/index79.js +2 -2
  162. package/dist/index81.js +1 -1
  163. package/dist/index84.js +4 -4
  164. package/dist/index86.js +2 -2
  165. package/dist/index88.js +4 -4
  166. package/dist/style.css +1 -1
  167. package/package.json +1 -1
  168. package/dist/index210.js +0 -6
  169. package/dist/index236.js +0 -17
  170. package/dist/index247.js +0 -29
  171. package/dist/index257.js +0 -108
  172. package/dist/index271.js +0 -18
  173. package/dist/index305.js +0 -24
  174. package/dist/index318.js +0 -7
package/dist/index25.js CHANGED
@@ -1,15 +1,15 @@
1
- import { defineComponent as ne, ref as o, computed as u, getCurrentInstance as re, nextTick as G, useAttrs as ue, onMounted as de, onBeforeUnmount as P, watch as ce, openBlock as _, createBlock as ve, withCtx as fe, createElementVNode as a, mergeProps as K, createElementBlock as $, renderSlot as d, createTextVNode as be, toDisplayString as U, createCommentVNode as M } from "vue";
2
- import { throttle as pe } from "./index212.js";
3
- import { useFocusTrap as me } from "./index213.js";
4
- import { useId as j } from "./index8.js";
5
- import { wait as C } from "./index130.js";
6
- import { waitFor as ge } from "./index214.js";
7
- import { useModalsState as B } from "./index215.js";
8
- import { useLogger as ye } from "./index216.js";
9
- import { useMobile as he } from "./index9.js";
10
- import we from "./index217.js";
11
- import { useLocale as ke } from "./index218.js";
12
- const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PURE__ */ ne({
1
+ import { defineComponent as oe, ref as o, computed as i, getCurrentInstance as ae, nextTick as N, useAttrs as se, onMounted as ne, onBeforeUnmount as ie, watch as re, openBlock as m, createBlock as ue, withCtx as W, createElementVNode as a, mergeProps as F, createElementBlock as C, renderSlot as r, createTextVNode as de, toDisplayString as E, createCommentVNode as B, createVNode as ce } from "vue";
2
+ import { useFocusTrap as fe } from "./index212.js";
3
+ import { useId as H } from "./index8.js";
4
+ import { wait as V } from "./index130.js";
5
+ import { waitFor as be } from "./index213.js";
6
+ import { useModalsState as y } from "./index214.js";
7
+ import { useMobile as pe } from "./index9.js";
8
+ import ve from "./index215.js";
9
+ import { useLocale as me } from "./index216.js";
10
+ import ye from "./index128.js";
11
+ /* empty css */
12
+ const ge = { class: "bb-base-dialog-close" }, he = ["aria-label"], Se = /* @__PURE__ */ oe({
13
13
  __name: "BaseDialog",
14
14
  props: {
15
15
  closeLabel: {},
@@ -30,95 +30,93 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
30
30
  modelValue: { type: [Boolean, null] }
31
31
  },
32
32
  emits: ["shown", "hidden", "update:modelValue"],
33
- setup(q, { emit: J }) {
34
- var W, F;
35
- const l = q, c = J, V = `title_${j().id.value}`, z = `description_${j().id.value}`, { isMobile: Q } = he(), g = o(null), v = o(null), H = o(null), y = o(null), f = o(null), s = o(null), b = o(null), X = o(null), D = u(
36
- () => l.fullscreen === !0 || l.fullscreen === "mobile" && Q.value
37
- ), x = !!((F = (W = re()) == null ? void 0 : W.proxy) != null && F.$nuxt), h = o(0), Y = u(() => {
38
- const { openedModals: e } = B();
39
- return e.value && e.value === h.value;
40
- }), { activate: Z, deactivate: O } = me(H, {
33
+ setup(R, { emit: K }) {
34
+ var O, A;
35
+ const l = R, u = K, g = `title_${H().id.value}`, h = `description_${H().id.value}`, { isMobile: P } = pe(), d = o(null), _ = o(null), U = o(null), j = o(null), $ = o(null), q = o(null), M = i(
36
+ () => l.fullscreen === !0 || l.fullscreen === "mobile" && P.value
37
+ ), T = !!((A = (O = ae()) == null ? void 0 : O.proxy) != null && A.$nuxt), b = o(0), G = i(() => {
38
+ const { openedModals: e } = y();
39
+ return e.value && e.value === b.value;
40
+ }), { activate: J, deactivate: D } = fe(_, {
41
41
  initialFocus: l.focusTarget ?? void 0,
42
- clickOutsideDeactivates: (e) => e.target === v.value,
42
+ clickOutsideDeactivates: (e) => e.target === d.value,
43
43
  allowOutsideClick: !0,
44
44
  /* On esc deactivate the trap, return focus and then close the modal */
45
- escapeDeactivates: () => (G(() => {
46
- c("update:modelValue", !1);
45
+ escapeDeactivates: () => (N(() => {
46
+ u("update:modelValue", !1);
47
47
  }), !0)
48
- }), ee = ue(), { t: le } = ke(), te = u(
49
- () => l.closeLabel || le("dialog.closeLabel").value
48
+ }), Q = se(), { t: X } = me(), Y = i(
49
+ () => l.closeLabel || X("dialog.closeLabel").value
50
50
  );
51
- de(async () => {
52
- s.value && (g.value = new ResizeObserver(r), g.value.observe(s.value)), window.addEventListener("resize", r), r(), !(!l.modelValue && !n.value) && (x && !globalThis.document || E());
53
- }), P(() => {
54
- window.removeEventListener("resize", r);
51
+ ne(async () => {
52
+ !l.modelValue && !n.value || T && !globalThis.document || S();
55
53
  });
56
- const w = o(!1), p = o(!1), L = o(!0), m = o(!1), n = o(l.eager || l.modelValue), S = u(() => p.value || m.value), oe = () => {
54
+ const p = o(!1), c = o(!1), w = o(!0), f = o(!1), n = o(l.eager || l.modelValue), L = i(() => c.value || f.value), Z = () => {
57
55
  if (!globalThis.document) return;
58
56
  const e = window.innerWidth - document.documentElement.clientWidth;
59
57
  document.body.style.overflow = "hidden", document.body.style.paddingRight = `${e}px`;
60
- }, A = () => {
58
+ }, z = () => {
61
59
  globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
62
60
  };
63
- P(() => {
61
+ ie(() => {
64
62
  if (l.modelValue) {
65
- const { openedModals: e, modalHasClosed: t } = B();
66
- e.value && (t(), h.value = 0, A());
63
+ const { openedModals: e, modalHasClosed: t } = y();
64
+ e.value && (t(), b.value = 0, z());
67
65
  }
68
66
  });
69
- const E = async () => {
67
+ const S = async () => {
70
68
  if (l.modelValue) {
71
- n.value || (n.value = !0, await ge(() => !!s.value), await G(), s.value && (g.value = new ResizeObserver(r), g.value.observe(s.value))), L.value = !1, m.value = !1, p.value = !0;
72
- const { modalHasOpened: e, openedModals: t } = B();
73
- e(), h.value = t.value, oe(), await C(l.transitionDuration), p.value = !1, w.value = !0, c("shown"), Z();
69
+ n.value || (n.value = !0, await be(() => !!$.value), await N()), w.value = !1, f.value = !1, c.value = !0;
70
+ const { modalHasOpened: e, openedModals: t } = y();
71
+ e(), b.value = t.value, Z(), await V(l.transitionDuration), c.value = !1, p.value = !0, u("shown"), J();
74
72
  } else {
75
- O(), p.value = !1, w.value = !1, m.value = !0, await C(l.transitionDuration), m.value = !1, L.value = !0;
76
- const { modalHasClosed: e, openedModals: t } = B();
77
- e(), h.value = 0, t.value || A(), c("hidden");
73
+ D(), c.value = !1, p.value = !1, f.value = !0, await V(l.transitionDuration), f.value = !1, w.value = !0;
74
+ const { modalHasClosed: e, openedModals: t } = y();
75
+ e(), b.value = 0, t.value || z(), u("hidden");
78
76
  }
79
77
  };
80
- ce(
78
+ re(
81
79
  () => l.modelValue,
82
80
  () => {
83
- !l.modelValue && !n.value || x && !globalThis.document || E();
81
+ !l.modelValue && !n.value || T && !globalThis.document || S();
84
82
  },
85
83
  { flush: "post" }
86
84
  );
87
- const k = (e) => {
88
- e.target === v.value && e.preventDefault();
89
- }, T = o(!1), ae = async (e) => {
90
- l.disabled || S.value || v.value && e.target === v.value && (l.persistent ? H.value && (T.value = !0, await C(100), T.value = !1) : c("update:modelValue", !1));
91
- }, I = () => {
92
- l.disabled || S.value || (O(), c("update:modelValue", !1));
93
- }, se = u(() => {
85
+ const v = (e) => {
86
+ e.target === d.value && e.preventDefault();
87
+ }, k = o(!1), ee = async (e) => {
88
+ l.disabled || L.value || d.value && e.target === d.value && (l.persistent ? _.value && (k.value = !0, await V(100), k.value = !1) : u("update:modelValue", !1));
89
+ }, x = () => {
90
+ l.disabled || L.value || (D(), u("update:modelValue", !1));
91
+ }, le = i(() => {
94
92
  const e = [
95
93
  {
96
94
  "bb-base-dialog bb-base-dialog__overlay": !0,
97
- "bb-base-dialog--fullscreen": D.value,
98
- "bb-base-dialog--faded": !Y.value,
99
- "bb-base-dialog--open": w.value,
100
- "bb-base-dialog--opening": p.value,
101
- "bb-base-dialog--closed": L.value,
102
- "bb-base-dialog--closing": m.value,
103
- "bb-base-dialog--attempted-closing": T.value
95
+ "bb-base-dialog--fullscreen": M.value,
96
+ "bb-base-dialog--faded": !G.value,
97
+ "bb-base-dialog--open": p.value,
98
+ "bb-base-dialog--opening": c.value,
99
+ "bb-base-dialog--closed": w.value,
100
+ "bb-base-dialog--closing": f.value,
101
+ "bb-base-dialog--attempted-closing": k.value
104
102
  },
105
103
  l.overlayClasses
106
104
  ].flat(), t = {
107
- onClick: ae,
108
- onScroll: k,
109
- onTouchmove: k,
110
- onWheel: k,
111
- onKeydown: k
112
- }, i = {
105
+ onClick: ee,
106
+ onScroll: v,
107
+ onTouchmove: v,
108
+ onWheel: v,
109
+ onKeydown: v
110
+ }, s = {
113
111
  "--transition-duration": l.transitionDuration / 1e3 + "s"
114
112
  };
115
113
  return {
116
114
  class: e,
117
- style: i,
115
+ style: s,
118
116
  ...t,
119
- ...ee
117
+ ...Q
120
118
  };
121
- }), ie = u(() => {
119
+ }), te = i(() => {
122
120
  const e = [
123
121
  {
124
122
  "bb-base-dialog__panel": !0,
@@ -128,89 +126,65 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
128
126
  ].flat(), t = {
129
127
  role: "dialog",
130
128
  "aria-modal": !0,
131
- "aria-live": w.value ? "polite" : "off"
129
+ "aria-live": p.value ? "polite" : "off"
132
130
  };
133
- n.value && (l.title && (t["aria-labelledby"] = V), l.description && (t["aria-describedby"] = z));
134
- let i;
135
- const N = {
131
+ n.value && (l.title && (t["aria-labelledby"] = g), l.description && (t["aria-describedby"] = h));
132
+ let s;
133
+ const I = {
136
134
  sm: 384,
137
135
  md: 652,
138
136
  lg: 896
139
137
  };
140
- return D.value ? i = "100%" : typeof l.size == "number" ? i = l.size + "px" : l.size in N ? i = N[l.size] + "px" : i = l.size + "px", {
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", {
141
139
  class: e,
142
140
  style: {
143
- maxWidth: i
141
+ maxWidth: s
144
142
  },
145
143
  ...t
146
144
  };
147
145
  });
148
- let R = 0;
149
- const r = pe(
150
- async () => {
151
- if (R++, R === 100) {
152
- const { error: e } = ye();
153
- e(
154
- "Dialog is updating its height too often. Please check the content is reliably sized."
155
- );
156
- }
157
- if (l.fullscreen) {
158
- X.value = window.innerHeight;
159
- return;
160
- }
161
- if (f.value && s.value && b.value) {
162
- const e = f.value.scrollHeight + s.value.scrollHeight + b.value.scrollHeight + 2;
163
- if (y.value && (y.value.style.height = "0px", y.value.style.height = `${e + 2}px`, await C(30), f.value && s.value && b.value)) {
164
- const t = f.value.scrollHeight + s.value.scrollHeight + b.value.scrollHeight + 2;
165
- e !== t && r();
166
- }
167
- }
168
- },
169
- 200,
170
- { trailing: !0 }
171
- );
172
- return (e, t) => (_(), ve(we, null, {
173
- default: fe(() => [
174
- a("div", K(se.value, {
146
+ return (e, t) => (m(), ue(ve, null, {
147
+ default: W(() => [
148
+ a("div", F(le.value, {
175
149
  ref_key: "overlay",
176
- ref: v
150
+ ref: d
177
151
  }), [
178
- a("div", K(ie.value, {
152
+ a("div", F(te.value, {
179
153
  ref_key: "panel",
180
- ref: H
154
+ ref: _
181
155
  }), [
182
- n.value ? (_(), $("div", {
156
+ n.value ? (m(), C("div", {
183
157
  key: 0,
184
158
  ref_key: "content",
185
- ref: y,
159
+ ref: U,
186
160
  class: "bb-base-dialog__content"
187
161
  }, [
188
162
  a("div", {
189
163
  ref_key: "header",
190
- ref: f,
164
+ ref: j,
191
165
  class: "bb-base-dialog__header"
192
166
  }, [
193
- d(e.$slots, "header", {
194
- close: I,
167
+ r(e.$slots, "header", {
168
+ close: x,
195
169
  title: e.title,
196
- titleId: V
170
+ titleId: g
197
171
  }, () => [
198
172
  a("span", {
199
- id: V,
173
+ id: g,
200
174
  class: "bb-base-dialog__title"
201
175
  }, [
202
- d(e.$slots, "title", { text: e.title }, () => [
203
- be(U(e.title), 1)
176
+ r(e.$slots, "title", { text: e.title }, () => [
177
+ de(E(e.title), 1)
204
178
  ])
205
179
  ]),
206
- a("span", _e, [
207
- e.showClose ? (_(), $("button", {
180
+ a("span", ge, [
181
+ e.showClose ? (m(), C("button", {
208
182
  key: 0,
209
- "aria-label": te.value,
183
+ "aria-label": Y.value,
210
184
  type: "button",
211
- onClick: I
185
+ onClick: x
212
186
  }, [
213
- d(e.$slots, "close", {}, () => [
187
+ r(e.$slots, "close", {}, () => [
214
188
  t[0] || (t[0] = a("span", { class: "bb-base-dialog-close__icon" }, [
215
189
  a("svg", {
216
190
  "aria-hidden": "true",
@@ -227,36 +201,41 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
227
201
  ])
228
202
  ], -1))
229
203
  ])
230
- ], 8, Ce)) : M("", !0)
204
+ ], 8, he)) : B("", !0)
231
205
  ])
232
206
  ])
233
207
  ], 512),
234
208
  a("div", {
235
209
  ref_key: "body",
236
- ref: s,
210
+ ref: $,
237
211
  class: "bb-base-dialog__body scrollbar-border"
238
212
  }, [
239
- d(e.$slots, "description", {
240
- descriptionId: z,
213
+ r(e.$slots, "description", {
214
+ descriptionId: h,
241
215
  text: e.description
242
216
  }, () => [
243
- e.description ? (_(), $("div", {
217
+ e.description ? (m(), C("div", {
244
218
  key: 0,
245
- id: z,
219
+ id: h,
246
220
  class: "bb-base-dialog__description sr-only"
247
- }, U(e.description), 1)) : M("", !0)
221
+ }, E(e.description), 1)) : B("", !0)
248
222
  ]),
249
- d(e.$slots, "default")
223
+ ce(ye, { "transition-duration": 500 }, {
224
+ default: W(() => [
225
+ r(e.$slots, "default")
226
+ ]),
227
+ _: 3
228
+ })
250
229
  ], 512),
251
230
  t[1] || (t[1] = a("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
252
231
  a("div", {
253
232
  ref_key: "footer",
254
- ref: b,
233
+ ref: q,
255
234
  class: "bb-base-dialog__footer"
256
235
  }, [
257
- d(e.$slots, "footer")
236
+ r(e.$slots, "footer")
258
237
  ], 512)
259
- ], 512)) : M("", !0)
238
+ ], 512)) : B("", !0)
260
239
  ], 16)
261
240
  ], 16)
262
241
  ]),
@@ -265,5 +244,5 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
265
244
  }
266
245
  });
267
246
  export {
268
- Ae as default
247
+ Se as default
269
248
  };
package/dist/index250.js CHANGED
@@ -1,46 +1,53 @@
1
- import { defineComponent as _, computed as a, openBlock as o, createElementBlock as c, createElementVNode as p, Fragment as b, renderList as h, createBlock as k, normalizeClass as f, withCtx as y, createTextVNode as x, toDisplayString as B } from "vue";
2
- import C from "./index13.js";
3
- /* empty css */
4
- const M = { class: "bb-base-date-picker__button-menu bb-base-date-picker__month-selector" }, v = { class: "content" }, E = /* @__PURE__ */ _({
5
- __name: "BaseDatePickerMonthSelector",
6
- props: {
7
- cursor: {},
8
- disabled: { type: Boolean }
9
- },
10
- emits: ["update:month"],
11
- setup(l, { emit: d }) {
12
- const s = l, m = d, i = a(() => s.cursor.month()), u = a(
13
- () => new Array(12).fill(0).map((r, t) => {
14
- const n = s.cursor.clone().startOf("year").add(t, "month");
15
- return {
16
- text: n.format("MMMM"),
17
- key: n.unix(),
18
- selected: n.month() === i.value,
19
- handler: () => m("update:month", t)
20
- };
21
- })
1
+ import { computed as c, unref as n } from "vue";
2
+ import { useItemText as y } from "./index307.js";
3
+ import { useItemValue as x } from "./index295.js";
4
+ import { hash as w } from "./index239.js";
5
+ import { useLogger as D } from "./index240.js";
6
+ const { getItemText: O } = y(), { getItemValue: V } = x(), { warn: H } = D(), T = (i, d, t, a, f, u) => u ? !1 : d || i.disabled ? !0 : typeof t == "function" ? !t(i) : !!(typeof t == "boolean" && !t || a && f >= a), q = ({
7
+ items: i,
8
+ disabled: d,
9
+ selectable: t,
10
+ itemText: a,
11
+ itemValue: f,
12
+ selectedIndexedByHash: u,
13
+ max: b = 1 / 0
14
+ }) => {
15
+ const v = c(() => n(d)), p = c(() => n(i)), h = c(
16
+ () => Object.keys(u.value).length
17
+ ), g = n(b), m = (e) => {
18
+ const r = V(e, n(f)), o = w(r), l = O(e, n(a)), s = u.value[o] !== void 0, I = T(
19
+ e,
20
+ v.value,
21
+ t,
22
+ g,
23
+ h.value,
24
+ s
22
25
  );
23
- return (r, t) => (o(), c("div", M, [
24
- p("div", v, [
25
- (o(!0), c(b, null, h(u.value, (e) => (o(), k(C, {
26
- key: e.key,
27
- class: f({
28
- content__btn: !0,
29
- "content__btn--selected": e.selected
30
- }),
31
- disabled: r.disabled,
32
- type: "button",
33
- onClick: e.handler
34
- }, {
35
- default: y(() => [
36
- x(B(e.text), 1)
37
- ]),
38
- _: 2
39
- }, 1032, ["class", "disabled", "onClick"]))), 128))
40
- ])
41
- ]));
42
- }
43
- });
26
+ return {
27
+ item: e,
28
+ text: l,
29
+ value: r,
30
+ valueHash: o,
31
+ selected: s,
32
+ disabled: n(I)
33
+ };
34
+ };
35
+ return {
36
+ options: c(() => {
37
+ const e = [], r = /* @__PURE__ */ new Set();
38
+ for (let o = 0; o < p.value.length; o++) {
39
+ const l = p.value[o];
40
+ l.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 = m(l);
44
+ r.has(s.valueHash) || (r.add(s.valueHash), e.push(s));
45
+ }
46
+ return e;
47
+ }),
48
+ createOption: m
49
+ };
50
+ };
44
51
  export {
45
- E as default
52
+ q as useBaseOptions
46
53
  };
package/dist/index251.js CHANGED
@@ -1,7 +1,17 @@
1
- import o from "./index305.js";
2
- /* empty css */
3
- import t from "./index286.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c6b13bd"]]);
1
+ import { isNil as f } from "./index264.js";
2
+ import { computed as t, unref as o } from "vue";
3
+ const a = ({ modelValue: e, iteratee: h, multiple: u }) => {
4
+ const i = t(
5
+ () => new Array().concat(o(e))
6
+ ), s = t(() => i.value.reduce(
7
+ (r, n) => (h(n) ? r.coherent.push(n) : r.incoherent.push(n), r),
8
+ { coherent: [], incoherent: [] }
9
+ )), c = t(() => u && !o(e).length || !u && f(o(e)) ? !0 : !s.value.incoherent.length);
10
+ return {
11
+ status: s,
12
+ coherent: c
13
+ };
14
+ };
5
15
  export {
6
- m as default
16
+ a as useCoherence
7
17
  };
package/dist/index252.js CHANGED
@@ -1,62 +1,14 @@
1
- import { defineComponent as g, ref as i, computed as d, onMounted as h, openBlock as u, createElementBlock as m, 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 "./index335.js";
3
- import M from "./index13.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
- });
1
+ import { hash as e } from "./index239.js";
2
+ import { debouncedWatch as s } from "./index206.js";
3
+ const n = (o, c, h) => {
4
+ s(
5
+ o,
6
+ (r, t) => {
7
+ e(r) !== e(t) && c(r, t);
8
+ },
9
+ h
10
+ );
11
+ };
60
12
  export {
61
- V as default
13
+ n as useHashedWatcher
62
14
  };
package/dist/index253.js CHANGED
@@ -1,5 +1,18 @@
1
- import r from "./index307.js";
2
- const t = r;
1
+ import { isNotNil as n } from "./index135.js";
2
+ import { ref as t, onServerPrefetch as u, onBeforeMount as c } from "vue";
3
+ const h = ({
4
+ fn: i,
5
+ onStart: s,
6
+ multiple: f,
7
+ currentValue: o
8
+ }) => {
9
+ const a = s || !f && n(o) || f && !!o.length, e = t(!1), l = t(!1), r = async () => {
10
+ e.value = !0, await i({ prefill: !0 }), e.value = !1, l.value = !0;
11
+ };
12
+ return a && (u(r), c(async () => {
13
+ l.value || await r();
14
+ })), { isPrefilling: e, hasPrefilled: l, prefill: r };
15
+ };
3
16
  export {
4
- t as deburr
17
+ h as usePrefill
5
18
  };
package/dist/index254.js CHANGED
@@ -1,36 +1,20 @@
1
- import { defineComponent as p, getCurrentInstance as a, resolveComponent as u, openBlock as f, createBlock as k, resolveDynamicComponent as g, unref as d, withCtx as b, renderSlot as x } from "vue";
2
- import { _config as e } from "./index4.js";
3
- import { useLogger as l } from "./index216.js";
4
- const $ = /* @__PURE__ */ p({
5
- __name: "RouterComponent",
6
- setup(y) {
7
- var o, i, r, s;
8
- const m = !!((i = (o = a()) == null ? void 0 : o.proxy) != null && i.$inertia), c = !!((s = (r = a()) == null ? void 0 : r.proxy) != null && s.$nuxt);
9
- let t;
10
- if (m) {
11
- if (t = u(e.inertiaLinkName), typeof t == "string") {
12
- const { warn: n } = l();
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 (c) {
18
- if (t = u(e.nuxtLinkName), typeof t == "string") {
19
- const { warn: n } = l();
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, L) => (f(), k(g(d(t)), null, {
27
- default: b(() => [
28
- x(n.$slots, "default")
29
- ]),
30
- _: 3
31
- }));
1
+ import { isNil as c } from "./index264.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;
32
15
  }
33
- });
16
+ return !1;
17
+ };
34
18
  export {
35
- $ as default
19
+ y as matchAnyKey
36
20
  };