bitboss-ui 1.0.21 → 1.0.23

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 (147) hide show
  1. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  2. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +3 -0
  3. package/dist/index104.js +2 -2
  4. package/dist/index112.js +1 -1
  5. package/dist/index114.js +4 -4
  6. package/dist/index116.js +1 -1
  7. package/dist/index119.js.map +1 -1
  8. package/dist/index12.js +3 -3
  9. package/dist/index120.js +1 -1
  10. package/dist/index121.js +1 -1
  11. package/dist/index122.js +1 -1
  12. package/dist/index128.js +1 -1
  13. package/dist/index129.js +1 -1
  14. package/dist/index130.js +1 -1
  15. package/dist/index134.js +2 -2
  16. package/dist/index14.js +9 -8
  17. package/dist/index14.js.map +1 -1
  18. package/dist/index16.js +8 -8
  19. package/dist/index18.js +11 -11
  20. package/dist/index20.js +3 -3
  21. package/dist/index201.js +2 -295
  22. package/dist/index201.js.map +1 -1
  23. package/dist/index202.js +4 -16
  24. package/dist/index202.js.map +1 -1
  25. package/dist/index203.js +2 -16
  26. package/dist/index203.js.map +1 -1
  27. package/dist/index204.js +234 -18
  28. package/dist/index204.js.map +1 -1
  29. package/dist/index205.js +2 -20
  30. package/dist/index205.js.map +1 -1
  31. package/dist/index206.js +5 -29
  32. package/dist/index206.js.map +1 -1
  33. package/dist/index207.js +16 -8
  34. package/dist/index207.js.map +1 -1
  35. package/dist/index208.js +16 -2
  36. package/dist/index208.js.map +1 -1
  37. package/dist/index209.js +19 -2
  38. package/dist/index209.js.map +1 -1
  39. package/dist/index210.js +20 -4
  40. package/dist/index210.js.map +1 -1
  41. package/dist/index211.js +29 -2
  42. package/dist/index211.js.map +1 -1
  43. package/dist/index212.js +8 -3
  44. package/dist/index212.js.map +1 -1
  45. package/dist/index213.js +2 -35
  46. package/dist/index213.js.map +1 -1
  47. package/dist/index214.js +3 -6
  48. package/dist/index214.js.map +1 -1
  49. package/dist/index215.js +3 -121
  50. package/dist/index215.js.map +1 -1
  51. package/dist/index216.js +118 -131
  52. package/dist/index216.js.map +1 -1
  53. package/dist/index217.js +134 -2
  54. package/dist/index217.js.map +1 -1
  55. package/dist/index218.js +33 -172
  56. package/dist/index218.js.map +1 -1
  57. package/dist/index219.js +159 -353
  58. package/dist/index219.js.map +1 -1
  59. package/dist/index22.js +2 -2
  60. package/dist/index220.js +6 -373
  61. package/dist/index220.js.map +1 -1
  62. package/dist/index221.js +346 -213
  63. package/dist/index221.js.map +1 -1
  64. package/dist/index222.js +364 -70
  65. package/dist/index222.js.map +1 -1
  66. package/dist/index224.js +3 -3
  67. package/dist/index224.js.map +1 -1
  68. package/dist/index225.js +79 -3
  69. package/dist/index225.js.map +1 -1
  70. package/dist/index227.js +9 -8
  71. package/dist/index227.js.map +1 -1
  72. package/dist/index228.js +9 -23
  73. package/dist/index228.js.map +1 -1
  74. package/dist/index229.js +23 -6
  75. package/dist/index229.js.map +1 -1
  76. package/dist/index230.js +6 -17
  77. package/dist/index230.js.map +1 -1
  78. package/dist/index231.js +17 -79
  79. package/dist/index231.js.map +1 -1
  80. package/dist/index232.js +78 -5
  81. package/dist/index232.js.map +1 -1
  82. package/dist/index233.js +4 -2
  83. package/dist/index233.js.map +1 -1
  84. package/dist/index234.js +295 -2
  85. package/dist/index234.js.map +1 -1
  86. package/dist/index235.js +6 -2
  87. package/dist/index235.js.map +1 -1
  88. package/dist/index236.js +2 -2
  89. package/dist/index239.js +2 -4
  90. package/dist/index239.js.map +1 -1
  91. package/dist/index24.js.map +1 -1
  92. package/dist/index240.js +2 -2
  93. package/dist/index240.js.map +1 -1
  94. package/dist/index241.js +2 -5
  95. package/dist/index241.js.map +1 -1
  96. package/dist/index242.js +224 -69
  97. package/dist/index242.js.map +1 -1
  98. package/dist/index243.js +252 -429
  99. package/dist/index243.js.map +1 -1
  100. package/dist/index244.js +2 -89
  101. package/dist/index244.js.map +1 -1
  102. package/dist/index247.js +424 -189
  103. package/dist/index247.js.map +1 -1
  104. package/dist/index249.js +200 -224
  105. package/dist/index249.js.map +1 -1
  106. package/dist/index250.js +68 -257
  107. package/dist/index250.js.map +1 -1
  108. package/dist/index251.js +5 -2
  109. package/dist/index251.js.map +1 -1
  110. package/dist/index252.js +2 -15
  111. package/dist/index252.js.map +1 -1
  112. package/dist/index253.js +89 -4
  113. package/dist/index253.js.map +1 -1
  114. package/dist/index254.js +15 -4
  115. package/dist/index254.js.map +1 -1
  116. package/dist/index255.js +4 -61
  117. package/dist/index255.js.map +1 -1
  118. package/dist/index256.js +4 -2
  119. package/dist/index256.js.map +1 -1
  120. package/dist/index257.js +64 -0
  121. package/dist/index257.js.map +1 -0
  122. package/dist/index258.js +5 -0
  123. package/dist/index258.js.map +1 -0
  124. package/dist/index26.js +2 -2
  125. package/dist/index30.js +3 -3
  126. package/dist/index32.js +6 -6
  127. package/dist/index34.js +1 -1
  128. package/dist/index36.js +2 -2
  129. package/dist/index44.js +4 -4
  130. package/dist/index44.js.map +1 -1
  131. package/dist/index50.js +1 -1
  132. package/dist/index52.js +1 -1
  133. package/dist/index52.js.map +1 -1
  134. package/dist/index56.js +24 -18
  135. package/dist/index56.js.map +1 -1
  136. package/dist/index58.js +8 -8
  137. package/dist/index58.js.map +1 -1
  138. package/dist/index60.js +8 -8
  139. package/dist/index60.js.map +1 -1
  140. package/dist/index68.js +5 -5
  141. package/dist/index72.js +2 -2
  142. package/dist/index75.js +1 -1
  143. package/dist/index78.js +1 -1
  144. package/dist/index80.js +1 -1
  145. package/dist/index82.js +4 -4
  146. package/dist/style.css +1 -1
  147. package/package.json +2 -2
@@ -9,7 +9,7 @@ export type BbBadgeProps = Pick<CommonProps, 'color'> & {
9
9
  */
10
10
  content?: string | number | null;
11
11
  /**
12
- * Renders the badge i little firther from the wrapped
12
+ * Renders the badge i little further from the wrapped
13
13
  * component making it look like it's floating
14
14
  * and not stacked.
15
15
  */
@@ -97,6 +97,7 @@ export type BbCheckboxEvents = BaseCheckboxEvents;
97
97
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BbCheckboxProps>, {
98
98
  direction: string;
99
99
  reverse: boolean;
100
+ inputPosition: string;
100
101
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
101
102
  blur: (event: FocusEvent) => void;
102
103
  change: (event: Event) => void;
@@ -110,6 +111,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
110
111
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BbCheckboxProps>, {
111
112
  direction: string;
112
113
  reverse: boolean;
114
+ inputPosition: string;
113
115
  }>>> & {
114
116
  onFocus?: ((event: FocusEvent) => any) | undefined;
115
117
  onBlur?: ((event: FocusEvent) => any) | undefined;
@@ -123,6 +125,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
123
125
  }, {
124
126
  reverse: boolean;
125
127
  direction: string;
128
+ inputPosition: "left" | "center" | "right";
126
129
  }, {}>, Readonly<{
127
130
  label?: ((props: {
128
131
  text: string;
package/dist/index104.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as de, ref as O, computed as p, onMounted as be, watch as q, openBlock as n, createBlock as re, resolveDynamicComponent as ue, normalizeClass as f, withCtx as pe, 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 fe, mergeProps as me } from "vue";
2
- import { add as ye } from "./index240.js";
2
+ import { add as ye } from "./index244.js";
3
3
  import { clamp as he } from "./index200.js";
4
4
  import { deepEqual as G } from "./index126.js";
5
5
  import { isNil as j } from "./index123.js";
6
6
  import { isNotNil as _e } from "./index127.js";
7
7
  import { useId as ke } from "./index8.js";
8
8
  import { useItemValue as ge } from "./index129.js";
9
- import { when as ve } from "./index210.js";
9
+ import { when as ve } from "./index202.js";
10
10
  import K from "./index12.js";
11
11
  import "./index13.js";
12
12
  import Ce from "./index26.js";
package/dist/index112.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 "./index6.js";
3
- import B from "./index242.js";
3
+ import B from "./index250.js";
4
4
  const N = /* @__PURE__ */ s({
5
5
  __name: "BbToast",
6
6
  props: {
package/dist/index114.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 "./index215.js";
2
+ import { useFloating as G, arrow as J } from "./index216.js";
3
3
  import { useId as K } from "./index8.js";
4
4
  import { wait as P } from "./index125.js";
5
5
  import Q from "./index10.js";
6
6
  import "./index11.js";
7
- import { throttle as v } from "./index212.js";
8
- import { waitFor as W } from "./index214.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index219.js";
7
+ import { throttle as v } from "./index224.js";
8
+ import { waitFor as W } from "./index220.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index221.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/index116.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 "./index241.js";
2
+ import { flattenTree as P } from "./index251.js";
3
3
  const w = { class: "bb-tree-row" }, z = { class: "bb-tree-main-content" }, I = /* @__PURE__ */ $({
4
4
  __name: "BbTree",
5
5
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"index119.js","sources":["../src/components/BbCollapsible/BbCollapsible.vue"],"sourcesContent":["<template>\n\t<div v-bind=\"collapsibleAttributes\">\n\t\t<div class=\"bb-collapsible__content\" :style=\"collapsibleAttributes.style\">\n\t\t\t<slot v-if=\"eager || hasRenderedOnce\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { useQueue } from '@/composables/useQueue';\nimport { wait } from '@/utilities/functions/wait';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbCollapsibleProps = Pick<\n\tCommonProps,\n\t'eager' | 'transitionDuration'\n> & {\n\t/**\n\t * Used by v-model to trigger opening / closing the collapsible\n\t */\n\tmodelValue: boolean;\n};\n\nconst props = withDefaults(defineProps<BbCollapsibleProps>(), {\n\ttransitionDuration: 250,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst visible = ref(props.modelValue);\nconst hasRenderedOnce = ref(visible.value);\n\n/**\n * If the component is lazy render content on first time modelValue is true\n */\nconst cleanup = watch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\thasRenderedOnce.value = true;\n\t\t\tcleanup();\n\t\t}\n\t}\n);\nif (visible.value) cleanup();\n\nconst collapsibleAttributes = computed(() => {\n\treturn {\n\t\tclass: {\n\t\t\t'bb-collapsible': true,\n\t\t\t'bb-collapsible--open': props.modelValue,\n\t\t\t'bb-collapsible--closed': !props.modelValue,\n\t\t},\n\t\tstyle: {\n\t\t\ttransitionDuration: props.transitionDuration + 'ms',\n\t\t},\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbCollapsible';\n</style>\n"],"names":["props","__props","visible","ref","hasRenderedOnce","cleanup","watch","value","collapsibleAttributes","computed"],"mappings":";;;;;;;;;AAwBA,UAAMA,IAAQC,GAQRC,IAAUC,EAAIH,EAAM,UAAU,GAC9BI,IAAkBD,EAAID,EAAQ,KAAK,GAKnCG,IAAUC;AAAA,MACf,MAAMN,EAAM;AAAA,MACZ,CAACO,MAAU;AACV,QAAIA,MACHH,EAAgB,QAAQ,IAChBC;MAEV;AAAA,IAAA;AAED,IAAIH,EAAQ,SAAeG;AAErB,UAAAG,IAAwBC,EAAS,OAC/B;AAAA,MACN,OAAO;AAAA,QACN,kBAAkB;AAAA,QAClB,wBAAwBT,EAAM;AAAA,QAC9B,0BAA0B,CAACA,EAAM;AAAA,MAClC;AAAA,MACA,OAAO;AAAA,QACN,oBAAoBA,EAAM,qBAAqB;AAAA,MAChD;AAAA,IAAA,EAED;;;;;;;;;;;"}
1
+ {"version":3,"file":"index119.js","sources":["../src/components/BbCollapsible/BbCollapsible.vue"],"sourcesContent":["<template>\n\t<div v-bind=\"collapsibleAttributes\">\n\t\t<div class=\"bb-collapsible__content\" :style=\"collapsibleAttributes.style\">\n\t\t\t<slot v-if=\"eager || hasRenderedOnce\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbCollapsibleProps = Pick<\n\tCommonProps,\n\t'eager' | 'transitionDuration'\n> & {\n\t/**\n\t * Used by v-model to trigger opening / closing the collapsible\n\t */\n\tmodelValue: boolean;\n};\n\nconst props = withDefaults(defineProps<BbCollapsibleProps>(), {\n\ttransitionDuration: 250,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst visible = ref(props.modelValue);\nconst hasRenderedOnce = ref(visible.value);\n\n/**\n * If the component is lazy render content on first time modelValue is true\n */\nconst cleanup = watch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\thasRenderedOnce.value = true;\n\t\t\tcleanup();\n\t\t}\n\t}\n);\nif (visible.value) cleanup();\n\nconst collapsibleAttributes = computed(() => {\n\treturn {\n\t\tclass: {\n\t\t\t'bb-collapsible': true,\n\t\t\t'bb-collapsible--open': props.modelValue,\n\t\t\t'bb-collapsible--closed': !props.modelValue,\n\t\t},\n\t\tstyle: {\n\t\t\ttransitionDuration: props.transitionDuration + 'ms',\n\t\t},\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbCollapsible';\n</style>\n"],"names":["props","__props","visible","ref","hasRenderedOnce","cleanup","watch","value","collapsibleAttributes","computed"],"mappings":";;;;;;;;;AAuBA,UAAMA,IAAQC,GAQRC,IAAUC,EAAIH,EAAM,UAAU,GAC9BI,IAAkBD,EAAID,EAAQ,KAAK,GAKnCG,IAAUC;AAAA,MACf,MAAMN,EAAM;AAAA,MACZ,CAACO,MAAU;AACV,QAAIA,MACHH,EAAgB,QAAQ,IAChBC;MAEV;AAAA,IAAA;AAED,IAAIH,EAAQ,SAAeG;AAErB,UAAAG,IAAwBC,EAAS,OAC/B;AAAA,MACN,OAAO;AAAA,QACN,kBAAkB;AAAA,QAClB,wBAAwBT,EAAM;AAAA,QAC9B,0BAA0B,CAACA,EAAM;AAAA,MAClC;AAAA,MACA,OAAO;AAAA,QACN,oBAAoBA,EAAM,qBAAqB;AAAA,MAChD;AAAA,IAAA,EAED;;;;;;;;;;;"}
package/dist/index12.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as C, ref as b, computed as n, watch as E, openBlock as m, createElementBlock as p, normalizeProps as c, guardReactiveProps as h, mergeProps as f, createCommentVNode as I, createElementVNode as r, renderSlot as F } from "vue";
2
- import { isCssColor as k } from "./index209.js";
3
- import { when as N } from "./index210.js";
4
- import { booleanishToBoolean as S } from "./index211.js";
2
+ import { isCssColor as k } from "./index201.js";
3
+ import { when as N } from "./index202.js";
4
+ import { booleanishToBoolean as S } from "./index203.js";
5
5
  const A = {
6
6
  "aria-hidden": "true",
7
7
  class: "bb-base-checkbox-container"
package/dist/index120.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 "./index209.js";
2
+ import { isCssColor as z } from "./index201.js";
3
3
  const g = ["innerHTML"], $ = /* @__PURE__ */ m({
4
4
  __name: "BbIcon",
5
5
  props: {
package/dist/index121.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
2
- import { throttle as g } from "./index212.js";
2
+ import { throttle as g } from "./index224.js";
3
3
  const O = /* @__PURE__ */ v({
4
4
  __name: "BbSmoothHeight",
5
5
  props: {
package/dist/index122.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 "./index209.js";
2
+ import { isCssColor as f } from "./index201.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/index128.js CHANGED
@@ -1,4 +1,4 @@
1
- import t from "./index221.js";
1
+ import t from "./index204.js";
2
2
  const o = () => ({
3
3
  getItemText(r, n) {
4
4
  if (typeof r == "string" && !n)
package/dist/index129.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index221.js";
1
+ import o from "./index204.js";
2
2
  const e = () => ({
3
3
  getItemValue(n, f) {
4
4
  if (typeof f > "u")
package/dist/index130.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isArray as b, isPlainObject as m } from "./index252.js";
1
+ import { isArray as b, isPlainObject as m } from "./index254.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/index134.js CHANGED
@@ -1,5 +1,5 @@
1
- import { toValue as b, useDebounceFn as I, useThrottleFn as V, tryOnMounted as X, noop as C, isObject as Y, tryOnScopeDispose as $, isClient as q } from "./index222.js";
2
- import { createFilterWrapper as te, debounceFilter as ne, getLifeCycleTarget as oe, throttleFilter as re } from "./index222.js";
1
+ import { toValue as b, useDebounceFn as I, useThrottleFn as V, tryOnMounted as X, noop as C, isObject as Y, tryOnScopeDispose as $, isClient as q } from "./index225.js";
2
+ import { createFilterWrapper as te, debounceFilter as ne, getLifeCycleTarget as oe, throttleFilter as re } from "./index225.js";
3
3
  import { ref as D, computed as g, reactive as P, watch as z } from "vue";
4
4
  function G(u) {
5
5
  var a;
package/dist/index14.js CHANGED
@@ -34,8 +34,8 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
34
34
  readonly: {}
35
35
  },
36
36
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
37
- setup(x, { emit: E }) {
38
- const t = x, o = E, u = y(), d = y(!1), { loading: D, options: m } = N({
37
+ setup(x, { emit: C }) {
38
+ const t = x, o = C, u = y(), d = y(!1), { loading: E, options: m } = N({
39
39
  dependencies: l(() => t.dependencies),
40
40
  depsDebounceTime: t.depsDebounceTime,
41
41
  disabled: l(() => t.disabled),
@@ -50,11 +50,11 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
50
50
  modelValue: l(() => t.modelValue),
51
51
  modelValueDebounceTime: t.modelValueDebounceTime,
52
52
  multiple: !0
53
- }), C = (e) => {
53
+ }), D = (e) => {
54
54
  let s;
55
55
  e.selected ? s = t.modelValue.slice(0, e.selectedIndex).concat(t.modelValue.slice(e.selectedIndex + 1)) : s = t.modelValue.concat(e.value), o("update:modelValue", s);
56
56
  }, L = (e, s) => {
57
- o("change", e), C(s);
57
+ o("change", e), D(s);
58
58
  }, $ = {
59
59
  onBlur: (e) => o("blur", e),
60
60
  onClick: (e) => o("click", e),
@@ -83,7 +83,7 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
83
83
  }, [
84
84
  g("span", M, [
85
85
  n(e.$slots, "prepend"),
86
- !i(m).length && i(D) ? (c(), r("span", H, [
86
+ !i(m).length && i(E) ? (c(), r("span", H, [
87
87
  n(e.$slots, "loading", {}, () => [
88
88
  k(v(e.loadingText), 1)
89
89
  ])
@@ -116,10 +116,11 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
116
116
  disabled: a.disabled,
117
117
  "has-errors": e.hasErrors,
118
118
  name: e.name,
119
- "on-change": (f) => L(f, a),
120
119
  readonly: e.readonly,
121
120
  "true-value": a.value
122
- }, $), {
121
+ }, $, {
122
+ onChange: (f) => L(f, a)
123
+ }), {
123
124
  icon: F((f) => [
124
125
  n(e.$slots, "icon", T({
125
126
  item: a.original,
@@ -127,7 +128,7 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
127
128
  }, f))
128
129
  ]),
129
130
  _: 2
130
- }, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "on-change", "readonly", "true-value"]),
131
+ }, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "readonly", "true-value", "onChange"]),
131
132
  g("span", {
132
133
  class: p({
133
134
  "bb-base-checkbox-group-option__text": !0,
@@ -1 +1 @@
1
- {"version":3,"file":"index14.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-checkbox-group__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:id=\"option.id\"\n\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t:disabled=\"!!option.disabled\"\n\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\tname=\"option:prepend\"\n\t\t\t\t\t:text=\"option.text\"\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:aria-describedby=\"ariaDescribedby\"\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:on-change=\"(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:id=\"option.id\"\n\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t:disabled=\"!!option.disabled\"\n\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\tname=\"option:append\"\n\t\t\t\t\t:text=\"option.text\"\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 * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4OA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index14.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-checkbox-group__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:id=\"option.id\"\n\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t:disabled=\"!!option.disabled\"\n\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\tname=\"option:prepend\"\n\t\t\t\t\t:text=\"option.text\"\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:aria-describedby=\"ariaDescribedby\"\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: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@change=\"(event: Event) => onChange(event, option)\"\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:id=\"option.id\"\n\t\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t\t:disabled=\"!!option.disabled\"\n\t\t\t\t\t:item=\"option.original\"\n\t\t\t\t\tname=\"option:append\"\n\t\t\t\t\t:text=\"option.text\"\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 * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4OA,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/index16.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as Ve, ref as k, computed as p, watch as F, nextTick as U, openBlock as d, createElementBlock as u, mergeProps as Se, createElementVNode as r, createTextVNode as De, toDisplayString as f, unref as y, withDirectives as q, createVNode as V, Transition as S, withCtx as D, vShow as j, createCommentVNode as Y, normalizeClass as g, Fragment as w, renderList as O, renderSlot as G } from "vue";
2
- import i from "./index201.js";
3
- import Me from "./index202.js";
4
- import Ae from "./index203.js";
5
- import xe from "./index204.js";
6
- import Ce from "./index205.js";
7
- import Ye from "./index206.js";
8
- import { groupBy as J } from "./index207.js";
2
+ import i from "./index206.js";
3
+ import Me from "./index207.js";
4
+ import Ae from "./index208.js";
5
+ import xe from "./index209.js";
6
+ import Ce from "./index210.js";
7
+ import Ye from "./index211.js";
8
+ import { groupBy as J } from "./index212.js";
9
9
  import { isNil as Be } from "./index123.js";
10
- import { last as Q } from "./index208.js";
10
+ import { last as Q } from "./index213.js";
11
11
  const Ie = { class: "bb-base-date-picker__header" }, Ee = ["disabled"], Ne = /* @__PURE__ */ r("span", null, null, -1), Te = {
12
12
  "aria-live": "polite",
13
13
  class: "bb-base-date-picker__selected-day-label"
package/dist/index18.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { defineComponent as Z, ref as n, computed as k, watch as x, openBlock as E, createElementBlock as ee, normalizeClass as z, renderSlot as c, createElementVNode as o, withDirectives as ae, mergeProps as B, unref as p, toDisplayString as L, createBlock as te, Teleport as ne, normalizeStyle as re, createVNode as oe, createSlots as le, renderList as se, withCtx as ie, normalizeProps as ue, guardReactiveProps as de, createCommentVNode as ce } from "vue";
2
- import { useFloating as pe } from "./index215.js";
3
- import me from "./index216.js";
4
- import r from "./index201.js";
5
- import fe from "./index204.js";
6
- import { identity as be } from "./index217.js";
7
- import { last as ve } from "./index208.js";
8
- import { useFocusTrap as ye } from "./index213.js";
2
+ import { useFloating as pe } from "./index216.js";
3
+ import me from "./index217.js";
4
+ import r from "./index206.js";
5
+ import fe from "./index209.js";
6
+ import { identity as be } from "./index205.js";
7
+ import { last as ve } from "./index213.js";
8
+ import { useFocusTrap as ye } from "./index218.js";
9
9
  import { useId as ge } from "./index8.js";
10
- import { vMaska as he } from "./index218.js";
10
+ import { vMaska as he } from "./index219.js";
11
11
  import { wait as Y } from "./index125.js";
12
- import { waitFor as ke } from "./index214.js";
12
+ import { waitFor as ke } from "./index220.js";
13
13
  import Me from "./index16.js";
14
14
  import "./index17.js";
15
- import { autoUpdate as we, flip as Ve, shift as _e } from "./index219.js";
16
- import { offset as Ye } from "./index220.js";
15
+ import { autoUpdate as we, flip as Ve, shift as _e } from "./index221.js";
16
+ import { offset as Ye } from "./index222.js";
17
17
  const De = ["aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "id", "name", "placeholder", "readonly", "value"], Ae = ["disabled"], Ce = /* @__PURE__ */ o("svg", {
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
19
  viewBox: "-2 -3 24 24"
package/dist/index20.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as Y, ref as o, nextTick as E, useAttrs as Z, computed as h, onMounted as ee, onBeforeUnmount as A, getCurrentInstance as te, watchPostEffect as oe, openBlock as _, createBlock as le, Teleport as ae, createElementVNode as l, mergeProps as W, createElementBlock as B, renderSlot as i, createTextVNode as se, toDisplayString as V, createCommentVNode as D } from "vue";
2
- import { throttle as ne } from "./index212.js";
3
- import { useFocusTrap as ie } from "./index213.js";
2
+ import { throttle as ne } from "./index224.js";
3
+ import { useFocusTrap as ie } from "./index218.js";
4
4
  import { useId as I } from "./index8.js";
5
5
  import { wait as $ } from "./index125.js";
6
- import { waitFor as re } from "./index214.js";
6
+ import { waitFor as re } from "./index220.js";
7
7
  const ue = { class: "bb-base-dialog-close" }, de = { class: "bb-base-dialog-close__content" }, ce = { class: "bb-base-dialog-close__label" }, be = /* @__PURE__ */ l("span", { class: "bb-base-dialog-close__icon" }, [
8
8
  /* @__PURE__ */ l("svg", {
9
9
  "aria-hidden": "true",