bitboss-ui 2.0.50 → 2.0.52

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 (154) hide show
  1. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +7 -0
  2. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +10 -0
  3. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +3 -0
  4. package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -0
  5. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +7 -0
  6. package/dist/components/BbSelect/BbSelect.vue.d.ts +14 -0
  7. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +3 -0
  8. package/dist/components/BbTable/BbTable.vue.d.ts +1 -0
  9. package/dist/components/BbTable/types.d.ts +4 -0
  10. package/dist/components/BbTag/BbTag.vue.d.ts +4 -0
  11. package/dist/composables/useOptions.d.ts +1 -0
  12. package/dist/index100.js +14 -10
  13. package/dist/index106.js +3 -1
  14. package/dist/index108.js +1 -1
  15. package/dist/index110.js +66 -64
  16. package/dist/index112.js +3 -1
  17. package/dist/index118.js +1 -1
  18. package/dist/index120.js +5 -5
  19. package/dist/index122.js +1 -1
  20. package/dist/index126.js +1 -1
  21. package/dist/index127.js +1 -1
  22. package/dist/index128.js +1 -1
  23. package/dist/index130.js +1 -1
  24. package/dist/index132.js +2 -2
  25. package/dist/index133.js +2 -2
  26. package/dist/index15.js +4 -4
  27. package/dist/index17.js +3 -3
  28. package/dist/index19.js +6 -4
  29. package/dist/index204.js +116 -2
  30. package/dist/index205.js +280 -52
  31. package/dist/{index224.js → index206.js} +2 -2
  32. package/dist/index207.js +16 -13
  33. package/dist/index208.js +19 -20
  34. package/dist/index209.js +19 -4
  35. package/dist/index21.js +13 -13
  36. package/dist/index210.js +27 -2
  37. package/dist/index211.js +3 -4
  38. package/dist/index212.js +2 -2
  39. package/dist/index214.js +248 -115
  40. package/dist/index215.js +52 -3
  41. package/dist/index216.js +44 -41
  42. package/dist/index217.js +5 -6
  43. package/dist/index218.js +49 -7
  44. package/dist/index219.js +2 -3
  45. package/dist/index220.js +4 -158
  46. package/dist/index221.js +2 -84
  47. package/dist/index222.js +164 -0
  48. package/dist/index223.js +84 -5
  49. package/dist/index225.js +3 -16
  50. package/dist/index226.js +40 -18
  51. package/dist/index227.js +6 -19
  52. package/dist/index228.js +7 -27
  53. package/dist/index229.js +2 -3
  54. package/dist/index23.js +15 -15
  55. package/dist/index230.js +3 -2
  56. package/dist/index231.js +122 -245
  57. package/dist/index232.js +124 -51
  58. package/dist/index233.js +2 -44
  59. package/dist/index234.js +20 -5
  60. package/dist/index235.js +45 -41
  61. package/dist/index237.js +13 -125
  62. package/dist/index238.js +5 -2
  63. package/dist/index239.js +369 -5
  64. package/dist/index240.js +3 -368
  65. package/dist/index242.js +1 -1
  66. package/dist/index244.js +1 -1
  67. package/dist/index246.js +1 -1
  68. package/dist/index25.js +4 -4
  69. package/dist/index250.js +1 -1
  70. package/dist/index251.js +11 -0
  71. package/dist/index252.js +23 -7
  72. package/dist/index253.js +6 -176
  73. package/dist/index254.js +16 -4
  74. package/dist/index256.js +6 -3
  75. package/dist/index257.js +2 -9
  76. package/dist/index258.js +2 -23
  77. package/dist/index259.js +2 -6
  78. package/dist/index260.js +2 -16
  79. package/dist/index261.js +2 -224
  80. package/dist/index262.js +2 -3
  81. package/dist/index263.js +2 -12
  82. package/dist/index264.js +2 -9
  83. package/dist/index265.js +2 -9
  84. package/dist/index266.js +2 -17
  85. package/dist/index267.js +24 -427
  86. package/dist/index268.js +22 -89
  87. package/dist/index27.js +1 -1
  88. package/dist/index270.js +7 -6
  89. package/dist/index271.js +4 -2
  90. package/dist/index272.js +3 -2
  91. package/dist/index273.js +12 -2
  92. package/dist/index274.js +9 -2
  93. package/dist/index275.js +9 -2
  94. package/dist/index276.js +17 -2
  95. package/dist/index277.js +4 -2
  96. package/dist/index278.js +431 -2
  97. package/dist/index279.js +89 -2
  98. package/dist/index280.js +224 -2
  99. package/dist/index281.js +197 -25
  100. package/dist/index282.js +3 -22
  101. package/dist/index286.js +176 -22
  102. package/dist/index287.js +24 -0
  103. package/dist/index289.js +5 -436
  104. package/dist/index29.js +3 -3
  105. package/dist/index290.js +65 -126
  106. package/dist/index291.js +2 -3
  107. package/dist/index292.js +436 -3
  108. package/dist/index293.js +126 -210
  109. package/dist/index294.js +3 -5
  110. package/dist/index295.js +3 -2
  111. package/dist/index296.js +204 -59
  112. package/dist/index297.js +79 -33
  113. package/dist/index299.js +4 -8
  114. package/dist/index300.js +4 -4
  115. package/dist/index301.js +57 -77
  116. package/dist/index302.js +9 -0
  117. package/dist/index303.js +6 -6
  118. package/dist/index304.js +19 -4
  119. package/dist/index305.js +5 -4
  120. package/dist/index306.js +7 -58
  121. package/dist/index307.js +3 -46
  122. package/dist/index308.js +32 -10
  123. package/dist/index309.js +10 -6
  124. package/dist/index31.js +2 -2
  125. package/dist/index310.js +2 -19
  126. package/dist/index311.js +47 -2
  127. package/dist/{index313.js → index312.js} +2 -2
  128. package/dist/index314.js +1 -1
  129. package/dist/index315.js +2 -47
  130. package/dist/index316.js +47 -2
  131. package/dist/index33.js +2 -2
  132. package/dist/index35.js +3 -3
  133. package/dist/index37.js +180 -174
  134. package/dist/index39.js +3 -3
  135. package/dist/index41.js +2 -2
  136. package/dist/index43.js +4 -2
  137. package/dist/index45.js +52 -45
  138. package/dist/index47.js +2 -2
  139. package/dist/index49.js +2 -2
  140. package/dist/index55.js +1 -1
  141. package/dist/index57.js +1 -1
  142. package/dist/index65.js +3 -1
  143. package/dist/index75.js +3 -3
  144. package/dist/index79.js +2 -2
  145. package/dist/index81.js +1 -1
  146. package/dist/index84.js +2 -2
  147. package/dist/index88.js +3 -3
  148. package/dist/index90.js +1 -1
  149. package/dist/style.css +1 -1
  150. package/package.json +2 -2
  151. package/dist/index236.js +0 -128
  152. package/dist/index269.js +0 -283
  153. package/dist/index288.js +0 -202
  154. package/dist/index298.js +0 -7
package/dist/index37.js CHANGED
@@ -1,29 +1,32 @@
1
- import { defineComponent as Me, defineAsyncComponent as Ne, ref as m, computed as y, toRef as I, openBlock as h, createBlock as $, normalizeClass as _, withCtx as r, renderSlot as p, unref as s, createVNode as F, createElementVNode as T, createElementBlock as M, Fragment as R, createCommentVNode as J, withDirectives as xe, isRef as He, withModifiers as d, withKeys as g, vModelDynamic as Pe, renderList as ze, mergeProps as Y, Teleport as Qe, normalizeStyle as Ke, nextTick as Ue } from "vue";
1
+ import { defineComponent as xe, defineAsyncComponent as Fe, ref as v, computed as y, toRef as V, openBlock as b, createBlock as S, normalizeClass as W, withCtx as s, renderSlot as p, unref as i, createVNode as F, createElementVNode as $, createElementBlock as T, Fragment as R, toDisplayString as Me, withDirectives as Ne, isRef as He, withModifiers as d, withKeys as g, vModelDynamic as Pe, renderList as ze, mergeProps as J, Teleport as _e, normalizeStyle as Qe, createCommentVNode as Ke, nextTick as Ue } from "vue";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import { useId as We } from "./index8.js";
5
- import { useMobile as _e } from "./index9.js";
6
- import Re from "./index127.js";
5
+ import { useMobile as Re } from "./index9.js";
6
+ import Je from "./index127.js";
7
7
  /* empty css */
8
- import { isNotNil as Je } from "./index134.js";
9
- import { last as Ye } from "./index230.js";
10
- import { matchAnyKey as j } from "./index243.js";
11
- import { useFloating as je } from "./index236.js";
12
- import { useIntersectionObserver as Ge } from "./index132.js";
13
- import { useLogger as Xe } from "./index213.js";
14
- import { useOptions as Ze } from "./index220.js";
15
- import { wait as S } from "./index131.js";
16
- import { when as et } from "./index211.js";
17
- import tt from "./index244.js";
8
+ import { isNotNil as Ye } from "./index134.js";
9
+ import { last as je } from "./index212.js";
10
+ import { matchAnyKey as Y } from "./index243.js";
11
+ import { useFloating as Ge } from "./index231.js";
12
+ import { useIntersectionObserver as Xe } from "./index132.js";
13
+ import { useLogger as Ze } from "./index213.js";
14
+ import { useOptions as et } from "./index222.js";
15
+ import { wait as L } from "./index131.js";
16
+ import { when as tt } from "./index220.js";
17
+ import ot from "./index244.js";
18
18
  /* empty css */
19
- import ot from "./index246.js";
19
+ import nt from "./index246.js";
20
20
  /* empty css */
21
- import nt from "./index205.js";
21
+ import lt from "./index235.js";
22
22
  /* empty css */
23
- import lt from "./index207.js";
24
- import { waitFor as at } from "./index217.js";
25
- import { autoUpdate as it, flip as rt, offset as st, shift as ut } from "./index240.js";
26
- const pt = { class: "bb-base-select__input-container" }, dt = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], Nt = /* @__PURE__ */ Me({
23
+ import at from "./index237.js";
24
+ import { waitFor as it } from "./index227.js";
25
+ import { autoUpdate as rt, flip as st, offset as ut, shift as pt } from "./index239.js";
26
+ const dt = { class: "bb-base-select__input-container" }, ct = {
27
+ key: 1,
28
+ class: "bb-base-select__max-reached"
29
+ }, ft = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], Ht = /* @__PURE__ */ xe({
27
30
  __name: "BaseSelect",
28
31
  props: {
29
32
  addOptions: { type: Boolean },
@@ -45,6 +48,8 @@ const pt = { class: "bb-base-select__input-container" }, dt = ["id", "aria-contr
45
48
  itemValue: {},
46
49
  loading: { type: Boolean },
47
50
  loadingText: { default: "Caricamento..." },
51
+ max: { default: 1 / 0 },
52
+ maxSelectedLabels: { default: 1 / 0 },
48
53
  modelValue: {},
49
54
  modelValueDebounceTime: { default: 0 },
50
55
  multiple: { type: Boolean },
@@ -62,157 +67,158 @@ const pt = { class: "bb-base-select__input-container" }, dt = ["id", "aria-contr
62
67
  updateOnAnimationFrame: { type: Boolean, default: !1 }
63
68
  },
64
69
  emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
65
- setup(G, { emit: X }) {
66
- const t = G, b = X;
70
+ setup(j, { emit: G }) {
71
+ const t = j, h = G;
67
72
  if (t.multiple && !Array.isArray(t.modelValue))
68
73
  throw new Error('Multiple is set to "true" but modelValue is not an array.');
69
- const Z = Ne(() => import("./index242.js")), A = m(null), B = m(null), a = m(null), N = m(null), x = m(null), u = y(
70
- () => t.comma ? N.value : x.value
71
- ), { isMobile: ee } = _e(), te = y(
72
- () => t.allowWriting === "not-mobile" && ee.value ? "none" : void 0
74
+ const X = Fe(() => import("./index242.js")), A = v(null), B = v(null), a = v(null), M = v(null), N = v(null), u = y(
75
+ () => t.comma ? M.value : N.value
76
+ ), { isMobile: Z } = Re(), ee = y(
77
+ () => t.allowWriting === "not-mobile" && Z.value ? "none" : void 0
73
78
  ), H = t.id || We().id.value;
74
- Ge(
79
+ Xe(
75
80
  B,
76
81
  ([{ intersectionRatio: e }]) => {
77
82
  e !== 1 && O();
78
83
  },
79
84
  { threshold: [0, 1] }
80
85
  );
81
- const { floatingStyles: oe } = je(
86
+ const { floatingStyles: te } = Ge(
82
87
  B,
83
88
  a,
84
89
  {
85
90
  placement: "bottom",
86
- whileElementsMounted: it,
87
- middleware: [rt(), st(5), ut()]
91
+ whileElementsMounted: rt,
92
+ middleware: [st(), ut(5), pt()]
88
93
  }
89
- ), ne = y(() => {
94
+ ), oe = y(() => {
90
95
  var o;
91
96
  const e = {
92
- ...oe.value,
97
+ ...te.value,
93
98
  zIndex: "10"
94
99
  };
95
100
  return B.value && (e.width = `${(o = B.value) == null ? void 0 : o.$el.clientWidth}px`), e;
96
- }), q = m(null), E = () => {
101
+ }), q = v(null), E = () => {
97
102
  q.value instanceof HTMLInputElement && q.value.focus();
98
- }, le = async (e) => {
99
- b("focus", e), Ae(), document.addEventListener("click", k), document.addEventListener("focusin", k);
100
- }, ae = () => {
101
- t.prefill === "focus" && !Oe.value && !Ce.value && Be();
102
- }, ie = async (e) => {
103
- b("blur", e);
104
- }, re = (e) => b("change", e), se = (e) => {
103
+ }, ne = async (e) => {
104
+ h("focus", e), Te(), document.addEventListener("click", k), document.addEventListener("focusin", k);
105
+ }, le = () => {
106
+ t.prefill === "focus" && !Be.value && !Oe.value && we();
107
+ }, ae = async (e) => {
108
+ h("blur", e);
109
+ }, ie = (e) => h("change", e), re = (e) => {
105
110
  var o;
106
- b("input", e), l.value === "" && (t.multiple || ke(null)), (o = u.value) == null || o.blur(), Ie();
111
+ h("input", e), l.value === "" && (t.multiple || Ce(null)), (o = u.value) == null || o.blur(), Ie();
107
112
  }, k = async (e) => {
108
113
  if (e.target instanceof Node && A.value && a.value && !A.value.$el.contains(e.target) && !a.value.$el.contains(e.target)) {
109
- O(), qe(), document.removeEventListener("click", k), document.removeEventListener("focusin", k), await S(t.transitionDuration), be();
114
+ O(), Le(), document.removeEventListener("click", k), document.removeEventListener("focusin", k), await L(t.transitionDuration), ye();
110
115
  return;
111
116
  }
112
- }, w = y(() => !(t.readonly || t.disabled || D.value || !u.value && t.multiple)), ue = async () => {
117
+ }, w = y(() => !(t.readonly || t.disabled || D.value || !u.value && t.multiple)), se = async () => {
113
118
  var e, o, n;
114
- w.value && ((e = u.value) == null || e.blur(), c.value ? (o = a.value) == null || o.focusPrevious() : (await V(), await S(t.transitionDuration), (n = a.value) == null || n.focusLastSelected()));
115
- }, pe = async () => {
119
+ w.value && ((e = u.value) == null || e.blur(), c.value ? (o = a.value) == null || o.focusPrevious() : (await I(), await L(t.transitionDuration), (n = a.value) == null || n.focusLastSelected()));
120
+ }, ue = async () => {
116
121
  var e, o, n;
117
- w.value && ((e = u.value) == null || e.blur(), c.value ? (o = a.value) == null || o.focusNext() : (await V(), await S(t.transitionDuration), (n = a.value) == null || n.focusFirstSelected()));
118
- }, de = (e) => {
119
- var n, i, f, C;
120
- if (!w.value || !t.multiple || l.value || (e.preventDefault(), (n = a.value) == null || n.blur(), !v.value.length)) return;
121
- (i = u.value) == null || i.focusPrevious();
122
- const o = (f = u.value) == null ? void 0 : f.getHighlighted();
122
+ w.value && ((e = u.value) == null || e.blur(), c.value ? (o = a.value) == null || o.focusNext() : (await I(), await L(t.transitionDuration), (n = a.value) == null || n.focusFirstSelected()));
123
+ }, pe = (e) => {
124
+ var n, r, m, C;
125
+ if (!w.value || !t.multiple || l.value || (e.preventDefault(), (n = a.value) == null || n.blur(), !f.value.length)) return;
126
+ (r = u.value) == null || r.focusPrevious();
127
+ const o = (m = u.value) == null ? void 0 : m.getHighlighted();
123
128
  o && ((C = a.value) == null || C.focusByHash(o.valueHash));
124
- }, ce = (e) => {
125
- var n, i, f, C;
126
- if (!w.value || !t.multiple || l.value || (e.preventDefault(), (n = a.value) == null || n.blur(), !v.value.length)) return;
127
- (i = u.value) == null || i.focusNext();
128
- const o = (f = u.value) == null ? void 0 : f.getHighlighted();
129
+ }, de = (e) => {
130
+ var n, r, m, C;
131
+ if (!w.value || !t.multiple || l.value || (e.preventDefault(), (n = a.value) == null || n.blur(), !f.value.length)) return;
132
+ (r = u.value) == null || r.focusNext();
133
+ const o = (m = u.value) == null ? void 0 : m.getHighlighted();
129
134
  o && ((C = a.value) == null || C.focusByHash(o.valueHash));
130
- }, fe = async () => {
135
+ }, ce = async () => {
131
136
  var e, o;
132
137
  if (w.value) {
133
138
  if (!c.value)
134
- await V(), await S(t.transitionDuration), v.value.length && ((e = a.value) == null || e.focusFirstSelected());
139
+ await I(), await L(t.transitionDuration), f.value.length && ((e = a.value) == null || e.focusFirstSelected());
135
140
  else if ((o = a.value) != null && o.getHighlighted())
136
141
  a.value.confirmOption();
137
142
  else if (t.addOptions) {
138
143
  if (t.itemText || t.itemValue) {
139
- const { error: i } = Xe();
140
- i(
144
+ const { error: r } = Ze();
145
+ r(
141
146
  `Adding an option for mapped items is not supported. You can't create an option while passing "item-text" or "item-value".`
142
147
  );
143
148
  return;
144
149
  }
145
150
  const n = l.value.trim();
146
- if (De(n)) return;
147
- he(), Q(Ye(Ve.value));
151
+ if (ke(n)) return;
152
+ be(), _(je(De.value));
148
153
  }
149
154
  }
150
- }, me = async () => {
155
+ }, fe = async () => {
151
156
  c.value && await O();
152
- }, ve = async () => {
157
+ }, me = async () => {
153
158
  var e, o;
154
- !w.value || l.value || !v.value.length || ((e = u.value) != null && e.getHighlighted() && u.value.confirmOption(), await Ue(), (o = u.value) == null || o.focusPrevious());
155
- }, ye = t.prefill === !0 || !t.multiple && Je(t.modelValue) || t.multiple && !!t.modelValue.length, {
159
+ !w.value || l.value || !f.value.length || ((e = u.value) != null && e.getHighlighted() && u.value.confirmOption(), await Ue(), (o = u.value) == null || o.focusPrevious());
160
+ }, ve = t.prefill === !0 || !t.multiple && Ye(t.modelValue) || t.multiple && !!t.modelValue.length, {
156
161
  query: l,
157
- alignQueryToState: be,
158
- addCurrentQueryToManualItems: he,
162
+ alignQueryToState: ye,
163
+ addCurrentQueryToManualItems: be,
159
164
  innerLoading: P,
160
165
  options: z,
161
- selectedOptions: v,
162
- selectOption: ge,
163
- unselectOption: we,
164
- prefillItems: Be,
165
- isPrefilling: Oe,
166
- hasPrefilled: Ce,
167
- updateModelValue: ke,
168
- valueIsSelected: De,
169
- manualItems: Ve,
166
+ selectedOptions: f,
167
+ selectOption: he,
168
+ unselectOption: ge,
169
+ prefillItems: we,
170
+ isPrefilling: Be,
171
+ hasPrefilled: Oe,
172
+ updateModelValue: Ce,
173
+ valueIsSelected: ke,
174
+ manualItems: De,
170
175
  searchByQuery: Ie
171
- } = Ze({
172
- emit: b,
176
+ } = et({
177
+ emit: h,
173
178
  itemText: t.itemText,
174
179
  itemValue: t.itemValue,
175
- modelValue: I(t, "modelValue"),
180
+ modelValue: V(t, "modelValue"),
181
+ max: t.max,
176
182
  multiple: t.multiple,
177
183
  resetQueryOnOptionSelected: t.resetQueryOnOptionSelected,
178
184
  stash: t.stash,
179
- items: I(t, "items"),
185
+ items: V(t, "items"),
180
186
  enforceCoherence: t.enforceCoherence,
181
- prefill: ye,
187
+ prefill: ve,
182
188
  modelValueDebounceTime: t.modelValueDebounceTime,
183
- dependencies: I(t, "dependencies"),
189
+ dependencies: V(t, "dependencies"),
184
190
  depsDebounceTime: t.depsDebounceTime,
185
191
  queryDebounceTime: t.queryDebounceTime,
186
- disabled: I(t, "disabled")
187
- }), $e = y(() => v.value.length ? "" : t.placeholder), D = y(() => !!(P.value || t.loading)), Te = y(() => {
192
+ disabled: V(t, "disabled")
193
+ }), Ve = y(() => f.value.length ? "" : t.placeholder), D = y(() => !!(P.value || t.loading)), Se = y(() => {
188
194
  let e = [];
189
- const o = v.value.some(
190
- (i) => i.text === l.value
195
+ const o = f.value.some(
196
+ (r) => r.text === l.value
191
197
  );
192
- return (t.multiple && l.value || l.value && !o && !t.multiple) && t.filterBy ? e = z.value.filter((i) => {
193
- let f = !1;
194
- return typeof t.filterBy == "function" ? f = t.filterBy(i.value, i.item) : Array.isArray(t.filterBy) && t.filterBy.length && (f = f || j(i.item, t.filterBy, l.value.trim())), f || j(i, ["text"], l.value.trim());
198
+ return (t.multiple && l.value || l.value && !o && !t.multiple) && t.filterBy ? e = z.value.filter((r) => {
199
+ let m = !1;
200
+ return typeof t.filterBy == "function" ? m = t.filterBy(r.value, r.item) : Array.isArray(t.filterBy) && t.filterBy.length && (m = m || Y(r.item, t.filterBy, l.value.trim())), m || Y(r, ["text"], l.value.trim());
195
201
  }) : e = z.value, e;
196
- }), Q = (e) => {
197
- ge(e), E(), t.multiple || O();
198
- }, K = (e) => {
199
- we(e), E();
200
- }, c = m(!1), U = m(!0), W = m(!1), V = async () => {
201
- W.value = !0, await at(() => !!a.value), U.value = !1, c.value = !0;
202
+ }), _ = (e) => {
203
+ he(e), E(), t.multiple || O();
204
+ }, Q = (e) => {
205
+ ge(e), E();
206
+ }, c = v(!1), K = v(!0), U = v(!1), I = async () => {
207
+ U.value = !0, await it(() => !!a.value), K.value = !1, c.value = !0;
202
208
  }, O = async () => {
203
209
  var e;
204
- c.value = !1, U.value = !0, (e = u.value) == null || e.blur();
205
- }, Se = () => c.value ? O() : V(), L = m(!1), Ae = () => {
206
- L.value = !0;
207
- }, qe = () => {
208
- L.value = !1, b("inactive");
209
- }, Ee = (e) => {
210
- e.preventDefault(), b("click", e), !(t.disabled || t.readonly) && (E(), Se());
211
- }, Le = et(
210
+ c.value = !1, K.value = !0, (e = u.value) == null || e.blur();
211
+ }, $e = () => c.value ? O() : I(), x = v(!1), Te = () => {
212
+ x.value = !0;
213
+ }, Le = () => {
214
+ x.value = !1, h("inactive");
215
+ }, Ae = (e) => {
216
+ e.preventDefault(), h("click", e), !(t.disabled || t.readonly) && (E(), $e());
217
+ }, qe = tt(
212
218
  (e) => typeof e != "string",
213
219
  JSON.stringify
214
- ), Fe = y(() => [].concat(t.modelValue).map((e) => {
215
- const o = Le(e);
220
+ ), Ee = y(() => [].concat(t.modelValue).map((e) => {
221
+ const o = qe(e);
216
222
  return {
217
223
  disabled: t.disabled,
218
224
  name: t.name,
@@ -220,114 +226,114 @@ const pt = { class: "bb-base-select__input-container" }, dt = ["id", "aria-contr
220
226
  value: o
221
227
  };
222
228
  }));
223
- return (e, o) => (h(), $(lt, {
229
+ return (e, o) => (b(), S(at, {
224
230
  ref_key: "outerContainer",
225
231
  ref: A,
226
- class: _({
232
+ class: W({
227
233
  "bb-base-select": !0,
228
- "bb-base-select--active": L.value,
234
+ "bb-base-select--active": x.value,
229
235
  "bb-base-select--shown": c.value,
230
236
  "bb-base-select--loading": D.value,
231
237
  "bb-base-select--disabled": e.disabled,
232
238
  "bb-base-select--errors": e.hasErrors,
233
239
  "bb-base-select--readonly": e.readonly
234
240
  }),
235
- onClick: Ee
241
+ onClick: Ae
236
242
  }, {
237
- "prepend-outer": r(() => [
238
- p(e.$slots, "prepend-outer", { query: s(l) })
243
+ "prepend-outer": s(() => [
244
+ p(e.$slots, "prepend-outer", { query: i(l) })
239
245
  ]),
240
- "append-outer": r(() => [
241
- p(e.$slots, "append-outer", { query: s(l) })
246
+ "append-outer": s(() => [
247
+ p(e.$slots, "append-outer", { query: i(l) })
242
248
  ]),
243
- default: r(() => [
244
- F(nt, {
249
+ default: s(() => [
250
+ F(lt, {
245
251
  ref_key: "innerContainer",
246
252
  ref: B,
247
253
  "append:icon": t["append:icon"],
248
254
  "prepend:icon": t["prepend:icon"],
249
255
  "prevent-focus": !0
250
256
  }, {
251
- prepend: r(() => [
252
- p(e.$slots, "prepend", { query: s(l) })
257
+ prepend: s(() => [
258
+ p(e.$slots, "prepend", { query: i(l) })
253
259
  ]),
254
- prefix: r(() => [
260
+ prefix: s(() => [
255
261
  p(e.$slots, "prefix")
256
262
  ]),
257
- append: r(() => [
258
- p(e.$slots, "append", { query: s(l) })
263
+ append: s(() => [
264
+ p(e.$slots, "append", { query: i(l) })
259
265
  ]),
260
- suffix: r(() => [
266
+ suffix: s(() => [
261
267
  p(e.$slots, "suffix")
262
268
  ]),
263
- default: r(() => [
264
- F(s(Re), { tag: "span" }, {
265
- default: r(() => [
266
- T("span", pt, [
267
- e.multiple ? (h(), M(R, { key: 0 }, [
268
- e.comma ? (h(), $(ot, {
269
+ default: s(() => [
270
+ F(i(Je), { tag: "span" }, {
271
+ default: s(() => [
272
+ $("span", dt, [
273
+ e.multiple && i(f).length <= e.maxSelectedLabels ? (b(), T(R, { key: 0 }, [
274
+ e.comma ? (b(), S(nt, {
269
275
  key: 0,
270
276
  ref_key: "commaBox",
271
- ref: N,
272
- options: s(v)
273
- }, null, 8, ["options"])) : (h(), $(tt, {
277
+ ref: M,
278
+ options: i(f)
279
+ }, null, 8, ["options"])) : (b(), S(ot, {
274
280
  key: 1,
275
281
  ref_key: "chipsBox",
276
- ref: x,
277
- options: s(v),
278
- "onOption:unselected": K
282
+ ref: N,
283
+ options: i(f),
284
+ "onOption:unselected": Q
279
285
  }, null, 8, ["options"]))
280
- ], 64)) : J("", !0),
281
- xe(T("input", {
282
- id: s(H),
286
+ ], 64)) : (b(), T("span", ct, Me(i(f).length) + " elementi selezionati ", 1)),
287
+ Ne($("input", {
288
+ id: i(H),
283
289
  ref_key: "input",
284
290
  ref: q,
285
291
  "onUpdate:modelValue": o[0] || (o[0] = (n) => He(l) ? l.value = n : null),
286
292
  "aria-autocomplete": "list",
287
- "aria-controls": `${s(H)}_listbox`,
293
+ "aria-controls": `${i(H)}_listbox`,
288
294
  "aria-describedby": e.ariaDescribedby,
289
295
  "aria-expanded": c.value,
290
296
  autocomplete: e.autocomplete,
291
297
  autofocus: e.autofocus,
292
- class: _("bb-base-select__text-input"),
298
+ class: W("bb-base-select__text-input"),
293
299
  disabled: e.disabled,
294
- inputmode: te.value,
295
- placeholder: $e.value,
300
+ inputmode: ee.value,
301
+ placeholder: Ve.value,
296
302
  readonly: e.readonly || !e.allowWriting,
297
303
  required: e.required && !e.multiple || e.multiple && !e.modelValue.length,
298
304
  role: "combobox",
299
305
  type: "text",
300
- onBlur: d(ie, ["stop"]),
301
- onChange: d(re, ["stop"]),
302
- onFocusOnce: d(ae, ["stop"]),
303
- onFocus: d(le, ["stop"]),
304
- onInput: d(se, ["stop"]),
306
+ onBlur: d(ae, ["stop"]),
307
+ onChange: d(ie, ["stop"]),
308
+ onFocusOnce: d(le, ["stop"]),
309
+ onFocus: d(ne, ["stop"]),
310
+ onInput: d(re, ["stop"]),
305
311
  onKeydown: [
306
- g(d(ve, ["stop"]), ["delete"]),
307
- g(d(de, ["stop"]), ["left"]),
308
- g(d(pe, ["stop", "prevent"]), ["down"]),
309
- g(d(fe, ["stop", "prevent"]), ["enter"]),
310
- g(d(me, ["stop", "prevent"]), ["esc"]),
311
- g(d(ue, ["stop", "prevent"]), ["up"]),
312
- g(d(ce, ["stop"]), ["right"])
312
+ g(d(me, ["stop"]), ["delete"]),
313
+ g(d(pe, ["stop"]), ["left"]),
314
+ g(d(ue, ["stop", "prevent"]), ["down"]),
315
+ g(d(ce, ["stop", "prevent"]), ["enter"]),
316
+ g(d(fe, ["stop", "prevent"]), ["esc"]),
317
+ g(d(se, ["stop", "prevent"]), ["up"]),
318
+ g(d(de, ["stop"]), ["right"])
313
319
  ]
314
- }, null, 40, dt), [
315
- [Pe, s(l)]
320
+ }, null, 40, ft), [
321
+ [Pe, i(l)]
316
322
  ])
317
323
  ])
318
324
  ]),
319
325
  _: 1
320
326
  }),
321
327
  p(e.$slots, "chevron", {
322
- loading: !!s(P),
328
+ loading: !!i(P),
323
329
  shown: c.value
324
330
  }, () => [
325
- o[1] || (o[1] = T("svg", {
331
+ o[1] || (o[1] = $("svg", {
326
332
  class: "bb-base-select__chevron",
327
333
  viewBox: "0 0 24 24",
328
334
  xmlns: "http://www.w3.org/2000/svg"
329
335
  }, [
330
- T("path", {
336
+ $("path", {
331
337
  d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
332
338
  fill: "currentColor"
333
339
  })
@@ -336,50 +342,50 @@ const pt = { class: "bb-base-select__input-container" }, dt = ["id", "aria-contr
336
342
  ]),
337
343
  _: 3
338
344
  }, 8, ["append:icon", "prepend:icon"]),
339
- (h(!0), M(R, null, ze(Fe.value, (n) => (h(), M("input", Y({
345
+ (b(!0), T(R, null, ze(Ee.value, (n) => (b(), T("input", J({
340
346
  key: n.value,
341
347
  ref_for: !0
342
348
  }, n), null, 16))), 128)),
343
- W.value ? (h(), $(Qe, {
349
+ U.value ? (b(), S(_e, {
344
350
  key: 0,
345
351
  to: "body"
346
352
  }, [
347
- F(s(Z), {
353
+ F(i(X), {
348
354
  ref_key: "optionsContainer",
349
355
  ref: a,
350
356
  loading: D.value,
351
357
  open: c.value,
352
- options: Te.value,
353
- style: Ke(ne.value),
354
- "onOption:selected": Q,
355
- "onOption:unselected": K
358
+ options: Se.value,
359
+ style: Qe(oe.value),
360
+ "onOption:selected": _,
361
+ "onOption:unselected": Q
356
362
  }, {
357
- "options:prepend": r(() => [
363
+ "options:prepend": s(() => [
358
364
  p(e.$slots, "options:prepend")
359
365
  ]),
360
- loading: r(() => [
361
- p(e.$slots, "loading", { query: s(l) })
366
+ loading: s(() => [
367
+ p(e.$slots, "loading", { query: i(l) })
362
368
  ]),
363
- "no-data": r(() => [
364
- p(e.$slots, "no-data", { query: s(l) })
369
+ "no-data": s(() => [
370
+ p(e.$slots, "no-data", { query: i(l) })
365
371
  ]),
366
- "options:append": r(() => [
372
+ "options:append": s(() => [
367
373
  p(e.$slots, "options:append")
368
374
  ]),
369
- option: r((n) => [
370
- p(e.$slots, "option", Y({
375
+ option: s((n) => [
376
+ p(e.$slots, "option", J({
371
377
  hasErrors: e.hasErrors,
372
378
  loading: D.value
373
379
  }, n))
374
380
  ]),
375
381
  _: 3
376
382
  }, 8, ["loading", "open", "options", "style"])
377
- ])) : J("", !0)
383
+ ])) : Ke("", !0)
378
384
  ]),
379
385
  _: 3
380
386
  }, 8, ["class"]));
381
387
  }
382
388
  });
383
389
  export {
384
- Nt as default
390
+ Ht as default
385
391
  };
package/dist/index39.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as U, ref as d, computed as h, onMounted as W, watch as Z, openBlock as g, createElementBlock as w, mergeProps as T, renderSlot as f, createElementVNode as c, Fragment as ee, renderList as ae, createCommentVNode as H, normalizeProps as re, guardReactiveProps as te, unref as b, normalizeClass as F, normalizeStyle as I } from "vue";
2
- import { clamp as le } from "./index204.js";
2
+ import { clamp as le } from "./index229.js";
3
3
  import { head as O } from "./index241.js";
4
- import { isCssColor as Y } from "./index210.js";
4
+ import { isCssColor as Y } from "./index219.js";
5
5
  import { isNil as P } from "./index129.js";
6
6
  import { isNotNil as ne } from "./index134.js";
7
7
  import { transposeValue as y } from "./index130.js";
8
- import { hash as J } from "./index229.js";
8
+ import { hash as J } from "./index211.js";
9
9
  const oe = { class: "bb-base-slider__slider-container" }, ie = {
10
10
  key: 0,
11
11
  class: "bb-base-slider__ticks-container"
package/dist/index41.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as I, ref as f, computed as n, watch as S, openBlock as h, createElementBlock as y, normalizeProps as r, guardReactiveProps as d, mergeProps as V, createCommentVNode as q, createElementVNode as l, renderSlot as A } from "vue";
2
- import { isCssColor as b } from "./index210.js";
3
- import { when as F } from "./index211.js";
2
+ import { isCssColor as b } from "./index219.js";
3
+ import { when as F } from "./index220.js";
4
4
  const N = { class: "bb-base-switch-container" }, $ = /* @__PURE__ */ I({
5
5
  __name: "BaseSwitch",
6
6
  props: {
package/dist/index43.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as $, ref as p, toRef as l, openBlock as w, createBlock as B, unref as f, withCtx as i, renderSlot as s, normalizeProps as b, guardReactiveProps as h, createVNode as O, mergeProps as v, createSlots as z } from "vue";
2
- import { useOptions as F } from "./index220.js";
2
+ import { useOptions as F } from "./index222.js";
3
3
  import M from "./index41.js";
4
4
  /* empty css */
5
- import S from "./index221.js";
5
+ import S from "./index223.js";
6
6
  /* empty css */
7
7
  const I = /* @__PURE__ */ $({
8
8
  __name: "BaseSwitchGroup",
@@ -22,6 +22,7 @@ const I = /* @__PURE__ */ $({
22
22
  itemText: {},
23
23
  itemValue: {},
24
24
  loadingText: { default: "Caricamento..." },
25
+ max: {},
25
26
  modelValue: {},
26
27
  modelValueDebounceTime: { default: 0 },
27
28
  name: {},
@@ -44,6 +45,7 @@ const I = /* @__PURE__ */ $({
44
45
  items: l(a, "items"),
45
46
  itemText: a.itemText,
46
47
  itemValue: a.itemValue,
48
+ max: a.max,
47
49
  modelValue: l(a, "modelValue"),
48
50
  modelValueDebounceTime: a.modelValueDebounceTime,
49
51
  multiple: !0,