bitboss-ui 0.2.75 → 0.2.76

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 (140) hide show
  1. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +48 -0
  2. package/dist/index101.js +2 -2
  3. package/dist/index103.js +2 -2
  4. package/dist/index109.js +1 -1
  5. package/dist/index11.js +2 -2
  6. package/dist/index111.js +3 -3
  7. package/dist/index113.js +1 -1
  8. package/dist/index117.js +1 -1
  9. package/dist/index119.js +1 -1
  10. package/dist/index121.js +1 -1
  11. package/dist/index125.js +1 -1
  12. package/dist/index126.js +1 -1
  13. package/dist/index127.js +1 -1
  14. package/dist/index13.js +59 -51
  15. package/dist/index13.js.map +1 -1
  16. package/dist/index131.js +2 -2
  17. package/dist/index15.js +8 -8
  18. package/dist/index17.js +9 -9
  19. package/dist/index19.js +1 -1
  20. package/dist/index196.js +10 -2
  21. package/dist/index196.js.map +1 -1
  22. package/dist/index197.js +2 -10
  23. package/dist/index197.js.map +1 -1
  24. package/dist/index198.js +1 -1
  25. package/dist/index199.js +1 -1
  26. package/dist/index200.js +368 -2
  27. package/dist/index200.js.map +1 -1
  28. package/dist/index201.js +134 -2
  29. package/dist/index201.js.map +1 -1
  30. package/dist/index202.js +5 -2
  31. package/dist/index202.js.map +1 -1
  32. package/dist/index203.js +17 -366
  33. package/dist/index203.js.map +1 -1
  34. package/dist/index204.js +2 -134
  35. package/dist/index204.js.map +1 -1
  36. package/dist/index205.js +2 -5
  37. package/dist/index205.js.map +1 -1
  38. package/dist/index206.js +172 -17
  39. package/dist/index206.js.map +1 -1
  40. package/dist/index207.js +23 -2
  41. package/dist/index207.js.map +1 -1
  42. package/dist/index208.js +363 -164
  43. package/dist/index208.js.map +1 -1
  44. package/dist/index209.js +16 -23
  45. package/dist/index209.js.map +1 -1
  46. package/dist/index210.js +14 -371
  47. package/dist/index210.js.map +1 -1
  48. package/dist/index211.js +20 -4
  49. package/dist/index211.js.map +1 -1
  50. package/dist/index212.js +27 -119
  51. package/dist/index212.js.map +1 -1
  52. package/dist/index213.js +8 -2
  53. package/dist/index213.js.map +1 -1
  54. package/dist/index214.js +234 -5
  55. package/dist/index214.js.map +1 -1
  56. package/dist/index215.js +1 -1
  57. package/dist/index216.js +2 -2
  58. package/dist/index217.js +6 -16
  59. package/dist/index217.js.map +1 -1
  60. package/dist/index218.js +2 -16
  61. package/dist/index218.js.map +1 -1
  62. package/dist/index219.js +2 -20
  63. package/dist/index219.js.map +1 -1
  64. package/dist/index220.js +4 -29
  65. package/dist/index220.js.map +1 -1
  66. package/dist/index221.js +121 -8
  67. package/dist/index221.js.map +1 -1
  68. package/dist/index222.js +2 -9
  69. package/dist/index222.js.map +1 -1
  70. package/dist/index223.js +7 -233
  71. package/dist/index223.js.map +1 -1
  72. package/dist/index224.js +3 -3
  73. package/dist/index226.js +1 -1
  74. package/dist/index228.js +160 -224
  75. package/dist/index228.js.map +1 -1
  76. package/dist/index229.js +1 -260
  77. package/dist/index229.js.map +1 -1
  78. package/dist/index23.js +1 -1
  79. package/dist/index230.js +5 -6
  80. package/dist/index230.js.map +1 -1
  81. package/dist/index231.js +69 -2
  82. package/dist/index231.js.map +1 -1
  83. package/dist/index232.js +223 -294
  84. package/dist/index232.js.map +1 -1
  85. package/dist/index233.js +258 -2
  86. package/dist/index233.js.map +1 -1
  87. package/dist/index234.js +6 -2
  88. package/dist/index234.js.map +1 -1
  89. package/dist/index235.js +2 -117
  90. package/dist/index235.js.map +1 -1
  91. package/dist/index236.js +294 -105
  92. package/dist/index236.js.map +1 -1
  93. package/dist/index237.js +2 -5
  94. package/dist/index237.js.map +1 -1
  95. package/dist/index238.js +2 -160
  96. package/dist/index238.js.map +1 -1
  97. package/dist/index239.js +119 -1
  98. package/dist/index239.js.map +1 -1
  99. package/dist/index240.js +105 -68
  100. package/dist/index240.js.map +1 -1
  101. package/dist/index241.js +15 -4
  102. package/dist/index241.js.map +1 -1
  103. package/dist/index242.js +2 -435
  104. package/dist/index242.js.map +1 -1
  105. package/dist/index243.js +2 -89
  106. package/dist/index243.js.map +1 -1
  107. package/dist/index244.js +2 -15
  108. package/dist/index244.js.map +1 -1
  109. package/dist/index245.js +2 -200
  110. package/dist/index245.js.map +1 -1
  111. package/dist/index246.js +435 -2
  112. package/dist/index246.js.map +1 -1
  113. package/dist/index247.js +89 -2
  114. package/dist/index247.js.map +1 -1
  115. package/dist/index248.js +200 -2
  116. package/dist/index248.js.map +1 -1
  117. package/dist/index249.js +4 -2
  118. package/dist/index249.js.map +1 -1
  119. package/dist/index25.js +2 -2
  120. package/dist/index250.js +2 -4
  121. package/dist/index250.js.map +1 -1
  122. package/dist/index251.js +4 -4
  123. package/dist/index251.js.map +1 -1
  124. package/dist/index252.js +4 -61
  125. package/dist/index252.js.map +1 -1
  126. package/dist/index253.js +61 -2
  127. package/dist/index253.js.map +1 -1
  128. package/dist/index254.js +1 -1
  129. package/dist/index255.js +2 -2
  130. package/dist/index29.js +3 -3
  131. package/dist/index31.js +8 -8
  132. package/dist/index33.js +2 -2
  133. package/dist/index35.js +2 -2
  134. package/dist/index47.js +1 -1
  135. package/dist/index49.js +1 -1
  136. package/dist/index65.js +5 -5
  137. package/dist/index79.js +3 -3
  138. package/dist/index81.js +1 -1
  139. package/dist/style.css +1 -1
  140. package/package.json +1 -1
@@ -142,7 +142,11 @@ declare const _default: <T = any>(__VLS_props: {
142
142
  loading?: ((props: object) => any) | undefined;
143
143
  'no-data'?: ((props: object) => any) | undefined;
144
144
  'option:prepend'?: ((props: {
145
+ checked: boolean;
146
+ disabled: boolean;
147
+ id?: string | undefined;
145
148
  item: T;
149
+ text: string;
146
150
  }) => any) | undefined;
147
151
  icon?: ((props: SlotAttributes & {
148
152
  item: T;
@@ -154,7 +158,11 @@ declare const _default: <T = any>(__VLS_props: {
154
158
  checked: boolean;
155
159
  }) => any) | undefined;
156
160
  'option:append'?: ((props: {
161
+ checked: boolean;
162
+ disabled: boolean;
163
+ id?: string | undefined;
157
164
  item: T;
165
+ text: string;
158
166
  }) => any) | undefined;
159
167
  append?: ((props: object) => any) | undefined;
160
168
  }> & {
@@ -162,7 +170,11 @@ declare const _default: <T = any>(__VLS_props: {
162
170
  loading?: ((props: object) => any) | undefined;
163
171
  'no-data'?: ((props: object) => any) | undefined;
164
172
  'option:prepend'?: ((props: {
173
+ checked: boolean;
174
+ disabled: boolean;
175
+ id?: string | undefined;
165
176
  item: T;
177
+ text: string;
166
178
  }) => any) | undefined;
167
179
  icon?: ((props: SlotAttributes & {
168
180
  item: T;
@@ -174,7 +186,11 @@ declare const _default: <T = any>(__VLS_props: {
174
186
  checked: boolean;
175
187
  }) => any) | undefined;
176
188
  'option:append'?: ((props: {
189
+ checked: boolean;
190
+ disabled: boolean;
191
+ id?: string | undefined;
177
192
  item: T;
193
+ text: string;
178
194
  }) => any) | undefined;
179
195
  append?: ((props: object) => any) | undefined;
180
196
  };
@@ -219,7 +235,11 @@ declare const _default: <T = any>(__VLS_props: {
219
235
  loading?: ((props: object) => any) | undefined;
220
236
  'no-data'?: ((props: object) => any) | undefined;
221
237
  'option:prepend'?: ((props: {
238
+ checked: boolean;
239
+ disabled: boolean;
240
+ id?: string | undefined;
222
241
  item: T;
242
+ text: string;
223
243
  }) => any) | undefined;
224
244
  icon?: ((props: SlotAttributes & {
225
245
  item: T;
@@ -231,7 +251,11 @@ declare const _default: <T = any>(__VLS_props: {
231
251
  checked: boolean;
232
252
  }) => any) | undefined;
233
253
  'option:append'?: ((props: {
254
+ checked: boolean;
255
+ disabled: boolean;
256
+ id?: string | undefined;
234
257
  item: T;
258
+ text: string;
235
259
  }) => any) | undefined;
236
260
  append?: ((props: object) => any) | undefined;
237
261
  }> & {
@@ -239,7 +263,11 @@ declare const _default: <T = any>(__VLS_props: {
239
263
  loading?: ((props: object) => any) | undefined;
240
264
  'no-data'?: ((props: object) => any) | undefined;
241
265
  'option:prepend'?: ((props: {
266
+ checked: boolean;
267
+ disabled: boolean;
268
+ id?: string | undefined;
242
269
  item: T;
270
+ text: string;
243
271
  }) => any) | undefined;
244
272
  icon?: ((props: SlotAttributes & {
245
273
  item: T;
@@ -251,7 +279,11 @@ declare const _default: <T = any>(__VLS_props: {
251
279
  checked: boolean;
252
280
  }) => any) | undefined;
253
281
  'option:append'?: ((props: {
282
+ checked: boolean;
283
+ disabled: boolean;
284
+ id?: string | undefined;
254
285
  item: T;
286
+ text: string;
255
287
  }) => any) | undefined;
256
288
  append?: ((props: object) => any) | undefined;
257
289
  };
@@ -299,7 +331,11 @@ declare const _default: <T = any>(__VLS_props: {
299
331
  loading?: ((props: object) => any) | undefined;
300
332
  'no-data'?: ((props: object) => any) | undefined;
301
333
  'option:prepend'?: ((props: {
334
+ checked: boolean;
335
+ disabled: boolean;
336
+ id?: string | undefined;
302
337
  item: T;
338
+ text: string;
303
339
  }) => any) | undefined;
304
340
  icon?: ((props: SlotAttributes & {
305
341
  item: T;
@@ -311,7 +347,11 @@ declare const _default: <T = any>(__VLS_props: {
311
347
  checked: boolean;
312
348
  }) => any) | undefined;
313
349
  'option:append'?: ((props: {
350
+ checked: boolean;
351
+ disabled: boolean;
352
+ id?: string | undefined;
314
353
  item: T;
354
+ text: string;
315
355
  }) => any) | undefined;
316
356
  append?: ((props: object) => any) | undefined;
317
357
  }> & {
@@ -319,7 +359,11 @@ declare const _default: <T = any>(__VLS_props: {
319
359
  loading?: ((props: object) => any) | undefined;
320
360
  'no-data'?: ((props: object) => any) | undefined;
321
361
  'option:prepend'?: ((props: {
362
+ checked: boolean;
363
+ disabled: boolean;
364
+ id?: string | undefined;
322
365
  item: T;
366
+ text: string;
323
367
  }) => any) | undefined;
324
368
  icon?: ((props: SlotAttributes & {
325
369
  item: T;
@@ -331,7 +375,11 @@ declare const _default: <T = any>(__VLS_props: {
331
375
  checked: boolean;
332
376
  }) => any) | undefined;
333
377
  'option:append'?: ((props: {
378
+ checked: boolean;
379
+ disabled: boolean;
380
+ id?: string | undefined;
334
381
  item: T;
382
+ text: string;
335
383
  }) => any) | undefined;
336
384
  append?: ((props: object) => any) | undefined;
337
385
  };
package/dist/index101.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as ie, ref as O, computed as p, onMounted as de, watch as q, openBlock as n, createBlock as be, resolveDynamicComponent as re, normalizeClass as f, withCtx as ue, createElementBlock as d, toDisplayString as m, createCommentVNode as v, createElementVNode as o, renderSlot as y, createVNode as J, unref as C, Fragment as N, renderList as T, createTextVNode as pe, mergeProps as fe } from "vue";
2
2
  import { add as me } from "./index227.js";
3
- import { clamp as ye } from "./index196.js";
3
+ import { clamp as ye } from "./index197.js";
4
4
  import { deepEqual as he } from "./index123.js";
5
5
  import { isNil as j } from "./index120.js";
6
6
  import { isNotNil as _e } from "./index124.js";
7
7
  import { useId as ke } from "./index7.js";
8
8
  import { useItemValue as ge } from "./index126.js";
9
- import { when as ve } from "./index211.js";
9
+ import { when as ve } from "./index220.js";
10
10
  import G from "./index11.js";
11
11
  import "./index12.js";
12
12
  import Ce from "./index25.js";
package/dist/index103.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as m, openBlock as c, createBlock as b, withCtx as a, renderSlot as r, normalizeProps as i, guardReactiveProps as n, createVNode as h, mergeProps as v } from "vue";
2
2
  import y from "./index21.js";
3
3
  import "./index22.js";
4
- import f from "./index238.js";
5
- import "./index239.js";
4
+ import f from "./index228.js";
5
+ import "./index229.js";
6
6
  const C = /* @__PURE__ */ m({
7
7
  __name: "BbTag",
8
8
  props: {
package/dist/index109.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as d, Fragment as f, renderList as _, unref as r, mergeProps as b } from "vue";
2
2
  import { state as k, useToast as C } from "./index5.js";
3
- import B from "./index240.js";
3
+ import B from "./index231.js";
4
4
  const N = /* @__PURE__ */ s({
5
5
  __name: "BbToast",
6
6
  props: {
package/dist/index11.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, ref as h, computed as n, watch as L, openBlock as c, createElementBlock as i, normalizeClass as E, normalizeProps as p, mergeProps as d, createCommentVNode as I, createElementVNode as l, renderSlot as F, guardReactiveProps as M } from "vue";
2
- import { isCssColor as f } from "./index200.js";
3
- import { when as N } from "./index211.js";
2
+ import { isCssColor as f } from "./index219.js";
3
+ import { when as N } from "./index220.js";
4
4
  const A = {
5
5
  "aria-hidden": "true",
6
6
  class: "bb-base-checkbox-container"
package/dist/index111.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as A, ref as o, computed as E, openBlock as b, createElementBlock as $, mergeProps as D, createElementVNode as i, renderSlot as L, normalizeProps as H, guardReactiveProps as I, unref as s, createBlock as M, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as q, createCommentVNode as O } from "vue";
2
- import { useFloating as G, arrow as J } from "./index212.js";
2
+ import { useFloating as G, arrow as J } from "./index221.js";
3
3
  import { useId as K } from "./index7.js";
4
4
  import { wait as P } from "./index122.js";
5
5
  import Q from "./index9.js";
6
6
  import "./index10.js";
7
7
  import { throttle as v } from "./index215.js";
8
- import { waitFor as W } from "./index214.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index203.js";
8
+ import { waitFor as W } from "./index217.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index200.js";
10
10
  const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
11
11
  fill: "none",
12
12
  viewBox: "0 0 24 24",
package/dist/index113.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as $, computed as g, resolveComponent as y, openBlock as f, createElementBlock as i, Fragment as v, renderList as h, normalizeClass as b, createElementVNode as s, renderSlot as p, createVNode as k, createSlots as B, withCtx as C, normalizeProps as T, guardReactiveProps as _ } from "vue";
2
- import { flattenTree as P } from "./index237.js";
2
+ import { flattenTree as P } from "./index230.js";
3
3
  const w = { class: "bb-tree-row" }, z = { class: "bb-tree-main-content" }, I = /* @__PURE__ */ $({
4
4
  __name: "BbTree",
5
5
  props: {
package/dist/index117.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
2
- import { isCssColor as z } from "./index200.js";
2
+ import { isCssColor as z } from "./index219.js";
3
3
  const g = ["innerHTML"], $ = /* @__PURE__ */ m({
4
4
  __name: "BbIcon",
5
5
  props: {
package/dist/index119.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
2
- import { isCssColor as f } from "./index200.js";
2
+ import { isCssColor as f } from "./index219.js";
3
3
  const _ = /* @__PURE__ */ c("svg", {
4
4
  viewBox: "0 0 512 512",
5
5
  xmlns: "http://www.w3.org/2000/svg"
package/dist/index121.js CHANGED
@@ -1,4 +1,4 @@
1
- import { clamp as o } from "./index196.js";
1
+ import { clamp as o } from "./index197.js";
2
2
  const r = (t, e) => t * 100 / e, p = (t, e) => t / 100 * e, l = (t, e, n) => r(t - e, n - e), P = ({
3
3
  value: t = 0,
4
4
  originalBounds: e,
package/dist/index125.js CHANGED
@@ -1,4 +1,4 @@
1
- import t from "./index223.js";
1
+ import t from "./index214.js";
2
2
  const o = () => ({
3
3
  getItemText(r, n) {
4
4
  if (typeof r == "string" && !n)
package/dist/index126.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index223.js";
1
+ import o from "./index214.js";
2
2
  const e = () => ({
3
3
  getItemValue(n, f) {
4
4
  if (typeof f > "u")
package/dist/index127.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isArray as b, isPlainObject as m } from "./index244.js";
1
+ import { isArray as b, isPlainObject as m } from "./index241.js";
2
2
  function i(e, n, l, o, r) {
3
3
  const u = {}.propertyIsEnumerable.call(o, n) ? "enumerable" : "nonenumerable";
4
4
  u === "enumerable" && (e[n] = l), r && u === "nonenumerable" && Object.defineProperty(e, n, {
package/dist/index13.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, ref as y, toRef as l, openBlock as c, createElementBlock as r, normalizeClass as f, createElementVNode as g, renderSlot as s, unref as u, createTextVNode as k, toDisplayString as v, createCommentVNode as w, Fragment as V, renderList as z, createVNode as S, mergeProps as T, withCtx as F } from "vue";
1
+ import { defineComponent as B, ref as y, toRef as l, openBlock as c, createElementBlock as r, normalizeClass as p, createElementVNode as g, renderSlot as s, unref as i, createTextVNode as k, toDisplayString as v, createCommentVNode as w, Fragment as V, renderList as z, createVNode as S, mergeProps as T, withCtx as F } from "vue";
2
2
  import { useOptions as N } from "./index6.js";
3
3
  import I from "./index11.js";
4
4
  import "./index12.js";
@@ -33,48 +33,48 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
33
33
  readonly: {}
34
34
  },
35
35
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
36
- setup(C, { emit: E }) {
37
- const t = C, a = E, d = y(), i = y(!1), { loading: x, options: m } = N({
38
- dependencies: l(() => t.dependencies),
39
- depsDebounceTime: t.depsDebounceTime,
40
- disabled: l(() => t.disabled),
41
- emitter: (e) => a("update:modelValue", e),
42
- enforceCoherence: l(() => t.enforceCoherence),
43
- id: t.id,
36
+ setup(x, { emit: C }) {
37
+ const a = x, o = C, u = y(), d = y(!1), { loading: E, options: m } = N({
38
+ dependencies: l(() => a.dependencies),
39
+ depsDebounceTime: a.depsDebounceTime,
40
+ disabled: l(() => a.disabled),
41
+ emitter: (e) => o("update:modelValue", e),
42
+ enforceCoherence: l(() => a.enforceCoherence),
43
+ id: a.id,
44
44
  immediate: !0,
45
- initialItems: l(() => t.items),
46
- itemText: t.itemText,
47
- itemValue: t.itemValue,
48
- matchStrategy: t.matchStrategy,
49
- modelValue: l(() => t.modelValue),
50
- modelValueDebounceTime: t.modelValueDebounceTime,
45
+ initialItems: l(() => a.items),
46
+ itemText: a.itemText,
47
+ itemValue: a.itemValue,
48
+ matchStrategy: a.matchStrategy,
49
+ modelValue: l(() => a.modelValue),
50
+ modelValueDebounceTime: a.modelValueDebounceTime,
51
51
  multiple: !0
52
52
  }), L = (e) => {
53
53
  let n;
54
- e.selected ? n = t.modelValue.slice(0, e.selectedIndex).concat(t.modelValue.slice(e.selectedIndex + 1)) : n = t.modelValue.concat(e.value), a("update:modelValue", n);
54
+ e.selected ? n = a.modelValue.slice(0, e.selectedIndex).concat(a.modelValue.slice(e.selectedIndex + 1)) : n = a.modelValue.concat(e.value), o("update:modelValue", n);
55
55
  }, D = (e, n) => {
56
- a("change", e), L(n);
56
+ o("change", e), L(n);
57
57
  }, _ = {
58
- onBlur: (e) => a("blur", e),
59
- onClick: (e) => a("click", e),
58
+ onBlur: (e) => o("blur", e),
59
+ onClick: (e) => o("click", e),
60
60
  onFocus: (e) => {
61
- a("focus", e), i.value || (document.addEventListener("focusin", b, { passive: !0 }), document.addEventListener("click", p, { passive: !0 }), i.value = !0);
61
+ o("focus", e), d.value || (document.addEventListener("focusin", b, { passive: !0 }), document.addEventListener("click", h, { passive: !0 }), d.value = !0);
62
62
  },
63
- onInput: (e) => a("input", e),
64
- onKeydown: (e) => a("keydown", e),
65
- onMousedown: (e) => a("mousedown", e),
66
- onMouseup: (e) => a("mouseup", e)
63
+ onInput: (e) => o("input", e),
64
+ onKeydown: (e) => o("keydown", e),
65
+ onMousedown: (e) => o("mousedown", e),
66
+ onMouseup: (e) => o("mouseup", e)
67
67
  }, b = (e) => {
68
68
  var n;
69
- e.target instanceof HTMLElement && ((n = d.value) != null && n.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", b), document.removeEventListener("click", p)));
70
- }, p = (e) => {
69
+ e.target instanceof HTMLElement && ((n = u.value) != null && n.contains(e.target) || (o("inactive"), d.value = !1, document.removeEventListener("focusin", b), document.removeEventListener("click", h)));
70
+ }, h = (e) => {
71
71
  var n;
72
- e.target instanceof HTMLElement && ((n = d.value) != null && n.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", b), document.removeEventListener("click", p)));
72
+ e.target instanceof HTMLElement && ((n = u.value) != null && n.contains(e.target) || (o("inactive"), d.value = !1, document.removeEventListener("focusin", b), document.removeEventListener("click", h)));
73
73
  };
74
74
  return (e, n) => (c(), r("span", {
75
75
  ref_key: "container",
76
- ref: d,
77
- class: f(["bb-base-checkbox-group", {
76
+ ref: u,
77
+ class: p(["bb-base-checkbox-group", {
78
78
  "bb-base-checkbox-group--errors": e.hasErrors,
79
79
  "bb-base-checkbox-group--horizontal": e.direction === "horizontal",
80
80
  "bb-base-checkbox-group--vertical": e.direction === "vertical"
@@ -82,63 +82,71 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
82
82
  }, [
83
83
  g("span", M, [
84
84
  s(e.$slots, "prepend"),
85
- !u(m).length && u(x) ? (c(), r("span", H, [
85
+ !i(m).length && i(E) ? (c(), r("span", H, [
86
86
  s(e.$slots, "loading", {}, () => [
87
87
  k(v(e.loadingText), 1)
88
88
  ])
89
- ])) : u(m).length ? w("", !0) : (c(), r("span", O, [
89
+ ])) : i(m).length ? w("", !0) : (c(), r("span", O, [
90
90
  s(e.$slots, "no-data", {}, () => [
91
91
  k(v(e.noDataText), 1)
92
92
  ])
93
93
  ])),
94
- (c(!0), r(V, null, z(u(m), (o, $) => (c(), r(V, {
95
- key: (o == null ? void 0 : o.id) || o.jsonValue
94
+ (c(!0), r(V, null, z(i(m), (t, $) => (c(), r(V, {
95
+ key: (t == null ? void 0 : t.id) || t.jsonValue
96
96
  }, [
97
97
  s(e.$slots, "option:prepend", {
98
- item: o.original
98
+ checked: t.selected,
99
+ disabled: !!t.disabled,
100
+ id: t.id,
101
+ item: t.original,
102
+ text: t.text
99
103
  }),
100
104
  g("label", {
101
- class: f(["bb-base-checkbox-group-option", {
102
- "bb-base-checkbox-group-option__selected": o.selected
105
+ class: p(["bb-base-checkbox-group-option", {
106
+ "bb-base-checkbox-group-option__selected": t.selected
103
107
  }])
104
108
  }, [
105
109
  S(I, T({
106
- id: o.id,
110
+ id: t.id,
107
111
  autofocus: e.autofocus && !$,
108
- checked: o.selected,
112
+ checked: t.selected,
109
113
  color: e.color,
110
- disabled: o.disabled,
114
+ disabled: t.disabled,
111
115
  "has-errors": e.hasErrors,
112
116
  name: e.name,
113
- onChange: (h) => D(h, o),
117
+ onChange: (f) => D(f, t),
114
118
  readonly: e.readonly,
115
- "true-value": o.value
119
+ "true-value": t.value
116
120
  }, _), {
117
- icon: F((h) => [
121
+ icon: F((f) => [
118
122
  s(e.$slots, "icon", T({
119
- item: o.original,
120
- text: o.text
121
- }, h))
123
+ item: t.original,
124
+ text: t.text
125
+ }, f))
122
126
  ]),
123
127
  _: 2
124
128
  }, 1040, ["id", "autofocus", "checked", "color", "disabled", "has-errors", "name", "onChange", "readonly", "true-value"]),
125
129
  g("span", {
126
- class: f({
130
+ class: p({
127
131
  "bb-base-checkbox-group-option__text": !0,
128
132
  "bb-base-checkbox-group-option__text--hidden": e.hideLabel
129
133
  })
130
134
  }, [
131
135
  s(e.$slots, "label", {
132
- checked: o.selected,
133
- item: o.original,
134
- text: o.text
136
+ checked: t.selected,
137
+ item: t.original,
138
+ text: t.text
135
139
  }, () => [
136
- k(v(o.text), 1)
140
+ k(v(t.text), 1)
137
141
  ])
138
142
  ], 2)
139
143
  ], 2),
140
144
  s(e.$slots, "option:append", {
141
- item: o.original
145
+ checked: t.selected,
146
+ disabled: !!t.disabled,
147
+ id: t.id,
148
+ item: t.original,
149
+ text: t.text
142
150
  })
143
151
  ], 64))), 128)),
144
152
  s(e.$slots, "append")
@@ -1 +1 @@
1
- {"version":3,"file":"index13.js","sources":["../src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"container\"\n\t\tclass=\"bb-base-checkbox-group\"\n\t\t:class=\"{\n\t\t\t'bb-base-checkbox-group--errors': hasErrors,\n\t\t\t'bb-base-checkbox-group--horizontal': direction === 'horizontal',\n\t\t\t'bb-base-checkbox-group--vertical': direction === 'vertical',\n\t\t}\"\n\t>\n\t\t<span class=\"bb-base-checkbox-group__container\">\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<span\n\t\t\t\tv-if=\"!options.length && loading\"\n\t\t\t\tclass=\"bb-base-checkbox-group__loading-container\"\n\t\t\t>\n\t\t\t\t<slot :name=\"'loading'\">{{ loadingText }}</slot>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tv-else-if=\"!options.length\"\n\t\t\t\tclass=\"bb-base-select__no-data-container\"\n\t\t\t>\n\t\t\t\t<slot :name=\"'no-data'\">{{ noDataText }}</slot>\n\t\t\t</span>\n\n\t\t\t<template\n\t\t\t\tv-for=\"(option, index) in options\"\n\t\t\t\t:key=\"option?.id || option.jsonValue\"\n\t\t\t>\n\t\t\t\t<slot :item=\"option.original\" name=\"option:prepend\"></slot>\n\t\t\t\t<label\n\t\t\t\t\tclass=\"bb-base-checkbox-group-option\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-base-checkbox-group-option__selected': option.selected,\n\t\t\t\t\t}\"\n\t\t\t\t>\n\t\t\t\t\t<BaseCheckbox\n\t\t\t\t\t\t:id=\"option.id\"\n\t\t\t\t\t\t:autofocus=\"autofocus && !index\"\n\t\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t\t:color=\"color\"\n\t\t\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t\t\t:name=\"name\"\n\t\t\t\t\t\t:onChange=\"(event: Event) => onChange(event, option)\"\n\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t:true-value=\"option.value\"\n\t\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\t\t\t\tname=\"icon\"\n\t\t\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\t\t\tv-bind=\"data\" /></template\n\t\t\t\t\t></BaseCheckbox>\n\t\t\t\t\t<span\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-checkbox-group-option__text': true,\n\t\t\t\t\t\t\t'bb-base-checkbox-group-option__text--hidden': hideLabel,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\t\t\tname=\"label\"\n\t\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\t\t>{{ option.text }}</slot\n\t\t\t\t\t\t></span\n\t\t\t\t\t>\n\t\t\t\t</label>\n\t\t\t\t<slot :item=\"option.original\" name=\"option:append\"></slot>\n\t\t\t</template>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport { ref, toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport BaseCheckbox from '../BaseCheckbox/BaseCheckbox.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { Option } from '@/composables/useOptions';\nimport type { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';\n\nexport type BaseCheckboxGroupProps<T> = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| T[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<T[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => T[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => any) | undefined;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Defines the strategy used to understand whether an option has been selected.\n\t * `string` is 40% faster but relies on property order.\n\t * `equality` is more reliable but is slower.\n\t */\n\tmatchStrategy?: 'string' | 'equality';\n\n\t/**\n\t * Used by v-model. Can be an array of any serializable type.\n\t */\n\tmodelValue: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n};\n\nexport type BaseCheckboxGroupEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\n\t(e: 'change', event: Event): void;\n\n\t(e: 'click', event: MouseEvent): void;\n\n\t(e: 'focus', event: FocusEvent): void;\n\n\t(e: 'inactive'): void;\n\n\t(e: 'input', event: Event): void;\n\n\t(e: 'keydown', event: KeyboardEvent): void;\n\n\t(e: 'mousedown', event: MouseEvent): void;\n\n\t(e: 'mouseup', event: MouseEvent): void;\n\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxGroupProps<T>>(), {\n\tdepsDebounceTime: 0,\n\tdirection: 'horizontal',\n\titems: () => [],\n\tloadingText: 'Caricamento...',\n\tmatchStrategy: 'string',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n});\n\nconst emit = defineEmits<BaseCheckboxGroupEvents>();\n\ndefineSlots<{\n\tprepend?: (props: object) => any;\n\tloading?: (props: object) => any;\n\t'no-data'?: (props: object) => any;\n\t'option:prepend'?: (props: { item: T }) => any;\n\ticon?: (\n\t\tprops: SlotAttributes & {\n\t\t\titem: T;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: T; text: string; checked: boolean }) => any;\n\t'option:append'?: (props: { item: T }) => any;\n\tappend?: (props: object) => any;\n}>();\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { loading, options } = useOptions({\n\tdependencies: toRef(() => props.dependencies),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tdisabled: toRef(() => props.disabled),\n\temitter: (value) => emit('update:modelValue', value),\n\tenforceCoherence: toRef(() => props.enforceCoherence),\n\tid: props.id,\n\timmediate: true,\n\tinitialItems: toRef(() => props.items),\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmatchStrategy: props.matchStrategy,\n\tmodelValue: toRef(() => props.modelValue),\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tmultiple: true,\n});\n\n/**\n * When selecting an option split behavior based on single or multiple selection\n */\nconst onOptionSelected = (option: Option) => {\n\tlet valueToEmit;\n\tif (option.selected) {\n\t\tvalueToEmit = props.modelValue\n\t\t\t.slice(0, option.selectedIndex)\n\t\t\t.concat(props.modelValue.slice(option.selectedIndex + 1));\n\t} else {\n\t\tvalueToEmit = props.modelValue.concat(option.value);\n\t}\n\temit('update:modelValue', valueToEmit);\n};\n\nconst onChange = (event: Event, option: Option) => {\n\temit('change', event);\n\tonOptionSelected(option);\n};\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tif (!active.value) {\n\t\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\t\tdocument.addEventListener('click', onDocumentClick, { passive: true });\n\t\tactive.value = true;\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus,\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckboxGroup';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","active","loading","options","useOptions","toRef","value","onOptionSelected","option","valueToEmit","onChange","event","eventListeners","onDocumentFocus","onDocumentClick","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOA,UAAMA,IAAQC,GAURC,IAAOC,GAkBPC,IAAYC,KACZC,IAASD,EAAI,EAAK,GAElB,EAAE,SAAAE,GAAS,SAAAC,EAAQ,IAAIC,EAAW;AAAA,MACvC,cAAcC,EAAM,MAAMV,EAAM,YAAY;AAAA,MAC5C,kBAAkBA,EAAM;AAAA,MACxB,UAAUU,EAAM,MAAMV,EAAM,QAAQ;AAAA,MACpC,SAAS,CAACW,MAAUT,EAAK,qBAAqBS,CAAK;AAAA,MACnD,kBAAkBD,EAAM,MAAMV,EAAM,gBAAgB;AAAA,MACpD,IAAIA,EAAM;AAAA,MACV,WAAW;AAAA,MACX,cAAcU,EAAM,MAAMV,EAAM,KAAK;AAAA,MACrC,UAAUA,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,eAAeA,EAAM;AAAA,MACrB,YAAYU,EAAM,MAAMV,EAAM,UAAU;AAAA,MACxC,wBAAwBA,EAAM;AAAA,MAC9B,UAAU;AAAA,IAAA,CACV,GAKKY,IAAmB,CAACC,MAAmB;AACxC,UAAAC;AACJ,MAAID,EAAO,WACVC,IAAcd,EAAM,WAClB,MAAM,GAAGa,EAAO,aAAa,EAC7B,OAAOb,EAAM,WAAW,MAAMa,EAAO,gBAAgB,CAAC,CAAC,IAEzDC,IAAcd,EAAM,WAAW,OAAOa,EAAO,KAAK,GAEnDX,EAAK,qBAAqBY,CAAW;AAAA,IAAA,GAGhCC,IAAW,CAACC,GAAcH,MAAmB;AAClD,MAAAX,EAAK,UAAUc,CAAK,GACpBJ,EAAiBC,CAAM;AAAA,IAAA,GAYlBI,IAAiB;AAAA,MACtB,QAAQ,CAACD,MAAsBd,EAAK,QAAQc,CAAK;AAAA,MACjD,SAAS,CAACA,MAAsBd,EAAK,SAASc,CAAK;AAAA,MACnD,SAZe,CAACA,MAAsB;AACtC,QAAAd,EAAK,SAASc,CAAK,GACdV,EAAO,UACX,SAAS,iBAAiB,WAAWY,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,SAASC,GAAiB,EAAE,SAAS,IAAM,GACrEb,EAAO,QAAQ;AAAA,MAChB;AAAA,MAOA,SAAS,CAACU,MAAiBd,EAAK,SAASc,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBd,EAAK,WAAWc,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBd,EAAK,aAAac,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBd,EAAK,WAAWc,CAAK;AAAA,IAAA,GAGlDE,IAAkB,CAACF,MAAsB;;AAC1C,MAAAA,EAAM,kBAAkB,iBACtBI,IAAAhB,EAAU,UAAV,QAAAgB,EAAiB,SAASJ,EAAM,YACpCd,EAAK,UAAU,GACfI,EAAO,QAAQ,IACN,SAAA,oBAAoB,WAAWY,CAAe,GAC9C,SAAA,oBAAoB,SAASC,CAAe;AAAA,IAEvD,GAGKA,IAAkB,CAACH,MAAsB;;AAC1C,MAAAA,EAAM,kBAAkB,iBACtBI,IAAAhB,EAAU,UAAV,QAAAgB,EAAiB,SAASJ,EAAM,YACpCd,EAAK,UAAU,GACfI,EAAO,QAAQ,IACN,SAAA,oBAAoB,WAAWY,CAAe,GAC9C,SAAA,oBAAoB,SAASC,CAAe;AAAA,IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index13.js","sources":["../src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"container\"\n\t\tclass=\"bb-base-checkbox-group\"\n\t\t:class=\"{\n\t\t\t'bb-base-checkbox-group--errors': hasErrors,\n\t\t\t'bb-base-checkbox-group--horizontal': direction === 'horizontal',\n\t\t\t'bb-base-checkbox-group--vertical': direction === 'vertical',\n\t\t}\"\n\t>\n\t\t<span class=\"bb-base-checkbox-group__container\">\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<span\n\t\t\t\tv-if=\"!options.length && loading\"\n\t\t\t\tclass=\"bb-base-checkbox-group__loading-container\"\n\t\t\t>\n\t\t\t\t<slot :name=\"'loading'\">{{ loadingText }}</slot>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tv-else-if=\"!options.length\"\n\t\t\t\tclass=\"bb-base-select__no-data-container\"\n\t\t\t>\n\t\t\t\t<slot :name=\"'no-data'\">{{ noDataText }}</slot>\n\t\t\t</span>\n\n\t\t\t<template\n\t\t\t\tv-for=\"(option, index) in options\"\n\t\t\t\t:key=\"option?.id || option.jsonValue\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t:disabled=\"!!option.disabled\"\n\t\t\t\t\t:id=\"option.id\"\n\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\tname=\"option:prepend\"\n\t\t\t\t></slot>\n\t\t\t\t<label\n\t\t\t\t\tclass=\"bb-base-checkbox-group-option\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-base-checkbox-group-option__selected': option.selected,\n\t\t\t\t\t}\"\n\t\t\t\t>\n\t\t\t\t\t<BaseCheckbox\n\t\t\t\t\t\t:id=\"option.id\"\n\t\t\t\t\t\t:autofocus=\"autofocus && !index\"\n\t\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t\t:color=\"color\"\n\t\t\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t\t\t:name=\"name\"\n\t\t\t\t\t\t:onChange=\"(event: Event) => onChange(event, option)\"\n\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t:true-value=\"option.value\"\n\t\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\t\t\t\tname=\"icon\"\n\t\t\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\t\t\tv-bind=\"data\" /></template\n\t\t\t\t\t></BaseCheckbox>\n\t\t\t\t\t<span\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-checkbox-group-option__text': true,\n\t\t\t\t\t\t\t'bb-base-checkbox-group-option__text--hidden': hideLabel,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\t\t\tname=\"label\"\n\t\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\t\t>{{ option.text }}</slot\n\t\t\t\t\t\t></span\n\t\t\t\t\t>\n\t\t\t\t</label>\n\t\t\t\t<slot\n\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t:disabled=\"!!option.disabled\"\n\t\t\t\t\t:id=\"option.id\"\n\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\tname=\"option:append\"\n\t\t\t\t></slot>\n\t\t\t</template>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport { ref, toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport BaseCheckbox from '../BaseCheckbox/BaseCheckbox.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { Option } from '@/composables/useOptions';\nimport type { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';\n\nexport type BaseCheckboxGroupProps<T> = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| T[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<T[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => T[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => any) | undefined;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Defines the strategy used to understand whether an option has been selected.\n\t * `string` is 40% faster but relies on property order.\n\t * `equality` is more reliable but is slower.\n\t */\n\tmatchStrategy?: 'string' | 'equality';\n\n\t/**\n\t * Used by v-model. Can be an array of any serializable type.\n\t */\n\tmodelValue: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n};\n\nexport type BaseCheckboxGroupEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxGroupProps<T>>(), {\n\tdepsDebounceTime: 0,\n\tdirection: 'horizontal',\n\titems: () => [],\n\tloadingText: 'Caricamento...',\n\tmatchStrategy: 'string',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n});\n\nconst emit = defineEmits<BaseCheckboxGroupEvents>();\n\ndefineSlots<{\n\tprepend?: (props: object) => any;\n\tloading?: (props: object) => any;\n\t'no-data'?: (props: object) => any;\n\t'option:prepend'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\ticon?: (\n\t\tprops: SlotAttributes & {\n\t\t\titem: T;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: T; text: string; checked: boolean }) => any;\n\t'option:append'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\tappend?: (props: object) => any;\n}>();\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { loading, options } = useOptions({\n\tdependencies: toRef(() => props.dependencies),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tdisabled: toRef(() => props.disabled),\n\temitter: (value) => emit('update:modelValue', value),\n\tenforceCoherence: toRef(() => props.enforceCoherence),\n\tid: props.id,\n\timmediate: true,\n\tinitialItems: toRef(() => props.items),\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmatchStrategy: props.matchStrategy,\n\tmodelValue: toRef(() => props.modelValue),\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tmultiple: true,\n});\n\n/**\n * When selecting an option split behavior based on single or multiple selection\n */\nconst onOptionSelected = (option: Option) => {\n\tlet valueToEmit;\n\tif (option.selected) {\n\t\tvalueToEmit = props.modelValue\n\t\t\t.slice(0, option.selectedIndex)\n\t\t\t.concat(props.modelValue.slice(option.selectedIndex + 1));\n\t} else {\n\t\tvalueToEmit = props.modelValue.concat(option.value);\n\t}\n\temit('update:modelValue', valueToEmit);\n};\n\nconst onChange = (event: Event, option: Option) => {\n\temit('change', event);\n\tonOptionSelected(option);\n};\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tif (!active.value) {\n\t\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\t\tdocument.addEventListener('click', onDocumentClick, { passive: true });\n\t\tactive.value = true;\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus,\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckboxGroup';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","active","loading","options","useOptions","toRef","value","onOptionSelected","option","valueToEmit","onChange","event","eventListeners","onDocumentFocus","onDocumentClick","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsOA,UAAMA,IAAQC,GAURC,IAAOC,GA8BPC,IAAYC,KACZC,IAASD,EAAI,EAAK,GAElB,EAAE,SAAAE,GAAS,SAAAC,EAAQ,IAAIC,EAAW;AAAA,MACvC,cAAcC,EAAM,MAAMV,EAAM,YAAY;AAAA,MAC5C,kBAAkBA,EAAM;AAAA,MACxB,UAAUU,EAAM,MAAMV,EAAM,QAAQ;AAAA,MACpC,SAAS,CAACW,MAAUT,EAAK,qBAAqBS,CAAK;AAAA,MACnD,kBAAkBD,EAAM,MAAMV,EAAM,gBAAgB;AAAA,MACpD,IAAIA,EAAM;AAAA,MACV,WAAW;AAAA,MACX,cAAcU,EAAM,MAAMV,EAAM,KAAK;AAAA,MACrC,UAAUA,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,eAAeA,EAAM;AAAA,MACrB,YAAYU,EAAM,MAAMV,EAAM,UAAU;AAAA,MACxC,wBAAwBA,EAAM;AAAA,MAC9B,UAAU;AAAA,IAAA,CACV,GAKKY,IAAmB,CAACC,MAAmB;AACxC,UAAAC;AACJ,MAAID,EAAO,WACVC,IAAcd,EAAM,WAClB,MAAM,GAAGa,EAAO,aAAa,EAC7B,OAAOb,EAAM,WAAW,MAAMa,EAAO,gBAAgB,CAAC,CAAC,IAEzDC,IAAcd,EAAM,WAAW,OAAOa,EAAO,KAAK,GAEnDX,EAAK,qBAAqBY,CAAW;AAAA,IAAA,GAGhCC,IAAW,CAACC,GAAcH,MAAmB;AAClD,MAAAX,EAAK,UAAUc,CAAK,GACpBJ,EAAiBC,CAAM;AAAA,IAAA,GAYlBI,IAAiB;AAAA,MACtB,QAAQ,CAACD,MAAsBd,EAAK,QAAQc,CAAK;AAAA,MACjD,SAAS,CAACA,MAAsBd,EAAK,SAASc,CAAK;AAAA,MACnD,SAZe,CAACA,MAAsB;AACtC,QAAAd,EAAK,SAASc,CAAK,GACdV,EAAO,UACX,SAAS,iBAAiB,WAAWY,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,SAASC,GAAiB,EAAE,SAAS,IAAM,GACrEb,EAAO,QAAQ;AAAA,MAChB;AAAA,MAOA,SAAS,CAACU,MAAiBd,EAAK,SAASc,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBd,EAAK,WAAWc,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBd,EAAK,aAAac,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBd,EAAK,WAAWc,CAAK;AAAA,IAAA,GAGlDE,IAAkB,CAACF,MAAsB;;AAC1C,MAAAA,EAAM,kBAAkB,iBACtBI,IAAAhB,EAAU,UAAV,QAAAgB,EAAiB,SAASJ,EAAM,YACpCd,EAAK,UAAU,GACfI,EAAO,QAAQ,IACN,SAAA,oBAAoB,WAAWY,CAAe,GAC9C,SAAA,oBAAoB,SAASC,CAAe;AAAA,IAEvD,GAGKA,IAAkB,CAACH,MAAsB;;AAC1C,MAAAA,EAAM,kBAAkB,iBACtBI,IAAAhB,EAAU,UAAV,QAAAgB,EAAiB,SAASJ,EAAM,YACpCd,EAAK,UAAU,GACfI,EAAO,QAAQ,IACN,SAAA,oBAAoB,WAAWY,CAAe,GAC9C,SAAA,oBAAoB,SAASC,CAAe;AAAA,IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index131.js CHANGED
@@ -1,5 +1,5 @@
1
- import { toValue as B } from "./index197.js";
2
- import { tryOnScopeDispose as E } from "./index197.js";
1
+ import { toValue as B } from "./index196.js";
2
+ import { tryOnScopeDispose as E } from "./index196.js";
3
3
  import { ref as c, computed as t } from "vue";
4
4
  function h(a) {
5
5
  var l;
package/dist/index15.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as ce, ref as k, computed as y, watch as be, openBlock as r, createElementBlock as d, mergeProps as me, createElementVNode as i, createTextVNode as fe, toDisplayString as f, unref as p, withDirectives as R, createVNode as g, Transition as V, withCtx as w, vShow as W, createCommentVNode as C, normalizeClass as M, Fragment as O, renderList as S, renderSlot as $, nextTick as pe } from "vue";
2
- import u from "./index205.js";
3
- import he from "./index217.js";
4
- import ye from "./index218.js";
5
- import _e from "./index206.js";
6
- import ve from "./index219.js";
7
- import ke from "./index220.js";
8
- import { groupBy as F } from "./index221.js";
2
+ import u from "./index202.js";
3
+ import he from "./index209.js";
4
+ import ye from "./index210.js";
5
+ import _e from "./index203.js";
6
+ import ve from "./index211.js";
7
+ import ke from "./index212.js";
8
+ import { groupBy as F } from "./index213.js";
9
9
  import { isNil as ge } from "./index120.js";
10
- import { last as P } from "./index207.js";
10
+ import { last as P } from "./index205.js";
11
11
  const Ve = { class: "bb-base-date-picker__header" }, we = ["disabled"], Oe = /* @__PURE__ */ i("span", null, null, -1), Se = {
12
12
  "aria-live": "polite",
13
13
  class: "bb-base-date-picker__selected-day-label"
package/dist/index17.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as R, ref as l, computed as Y, watch as J, onMounted as Q, onBeforeUnmount as X, openBlock as B, createElementBlock as Z, normalizeClass as C, renderSlot as d, createElementVNode as h, withDirectives as x, mergeProps as T, unref as u, toDisplayString as ee, createBlock as ae, Teleport as te, createVNode as ne, createSlots as oe, renderList as le, withCtx as ie, normalizeProps as re, guardReactiveProps as se } from "vue";
2
- import { autoUpdate as de, computePosition as ue, flip as ce, shift as fe } from "./index203.js";
3
- import pe from "./index204.js";
4
- import c from "./index205.js";
5
- import me from "./index206.js";
6
- import { identity as be } from "./index202.js";
7
- import { last as ve } from "./index207.js";
2
+ import { autoUpdate as de, computePosition as ue, flip as ce, shift as fe } from "./index200.js";
3
+ import pe from "./index201.js";
4
+ import c from "./index202.js";
5
+ import me from "./index203.js";
6
+ import { identity as be } from "./index204.js";
7
+ import { last as ve } from "./index205.js";
8
8
  import { useId as ye } from "./index7.js";
9
- import { vMaska as he } from "./index208.js";
9
+ import { vMaska as he } from "./index206.js";
10
10
  import { wait as I } from "./index122.js";
11
11
  import ge from "./index15.js";
12
12
  import "./index16.js";
13
- import P from "./index209.js";
14
- import { offset as ke } from "./index210.js";
13
+ import P from "./index207.js";
14
+ import { offset as ke } from "./index208.js";
15
15
  const we = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "name", "placeholder", "readonly", "value"], Ee = ["id"], Fe = /* @__PURE__ */ R({
16
16
  __name: "BaseDatePickerInput",
17
17
  props: {
package/dist/index19.js CHANGED
@@ -3,7 +3,7 @@ import { throttle as oe } from "./index215.js";
3
3
  import { useFocusTrap as le } from "./index216.js";
4
4
  import { useId as A } from "./index7.js";
5
5
  import { wait as L } from "./index122.js";
6
- import { waitFor as ae } from "./index214.js";
6
+ import { waitFor as ae } from "./index217.js";
7
7
  const se = { class: "bb-base-dialog-close" }, ne = { class: "bb-base-dialog-close__content" }, ie = { class: "bb-base-dialog-close__label" }, re = /* @__PURE__ */ l("span", { class: "bb-base-dialog-close__icon" }, [
8
8
  /* @__PURE__ */ l("svg", {
9
9
  "aria-hidden": "true",
package/dist/index196.js CHANGED
@@ -1,5 +1,13 @@
1
- const n = (t, a, m) => Math.min(Math.max(t, a), m);
1
+ import { getCurrentScope as o, onScopeDispose as n, unref as r } from "vue";
2
+ function f(e) {
3
+ return o() ? (n(e), !0) : !1;
4
+ }
5
+ function p(e) {
6
+ return typeof e == "function" ? e() : r(e);
7
+ }
8
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2
9
  export {
3
- n as clamp
10
+ p as toValue,
11
+ f as tryOnScopeDispose
4
12
  };
5
13
  //# sourceMappingURL=index196.js.map