bitboss-ui 0.2.17 → 0.2.19

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 (148) hide show
  1. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +7 -0
  2. package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -0
  3. package/dist/components/BbSelect/BbSelect.vue.d.ts +7 -0
  4. package/dist/index101.js +1 -1
  5. package/dist/index103.js +2 -2
  6. package/dist/index109.js +1 -1
  7. package/dist/index11.js +2 -2
  8. package/dist/index111.js +4 -4
  9. package/dist/index113.js +1 -1
  10. package/dist/index116.js +1 -1
  11. package/dist/index117.js +1 -1
  12. package/dist/index118.js +1 -1
  13. package/dist/index119.js +1 -1
  14. package/dist/index125.js +1 -1
  15. package/dist/index126.js +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 +3 -3
  20. package/dist/index197.js +235 -5
  21. package/dist/index197.js.map +1 -1
  22. package/dist/index198.js +3 -16
  23. package/dist/index198.js.map +1 -1
  24. package/dist/index199.js +35 -16
  25. package/dist/index199.js.map +1 -1
  26. package/dist/index200.js +6 -19
  27. package/dist/index200.js.map +1 -1
  28. package/dist/index201.js +2 -20
  29. package/dist/index201.js.map +1 -1
  30. package/dist/index202.js +4 -29
  31. package/dist/index202.js.map +1 -1
  32. package/dist/index203.js +10 -8
  33. package/dist/index203.js.map +1 -1
  34. package/dist/index204.js +5 -2
  35. package/dist/index204.js.map +1 -1
  36. package/dist/index205.js +16 -2
  37. package/dist/index205.js.map +1 -1
  38. package/dist/index206.js +16 -4
  39. package/dist/index206.js.map +1 -1
  40. package/dist/index207.js +17 -376
  41. package/dist/index207.js.map +1 -1
  42. package/dist/index208.js +17 -131
  43. package/dist/index208.js.map +1 -1
  44. package/dist/index209.js +29 -2
  45. package/dist/index209.js.map +1 -1
  46. package/dist/index21.js +2 -2
  47. package/dist/index210.js +8 -174
  48. package/dist/index210.js.map +1 -1
  49. package/dist/index211.js +2 -23
  50. package/dist/index211.js.map +1 -1
  51. package/dist/index212.js +3 -373
  52. package/dist/index212.js.map +1 -1
  53. package/dist/index213.js +3 -3
  54. package/dist/index213.js.map +1 -1
  55. package/dist/index214.js +376 -33
  56. package/dist/index214.js.map +1 -1
  57. package/dist/index215.js +134 -6
  58. package/dist/index215.js.map +1 -1
  59. package/dist/index216.js +2 -235
  60. package/dist/index216.js.map +1 -1
  61. package/dist/index217.js +174 -2
  62. package/dist/index217.js.map +1 -1
  63. package/dist/index218.js +23 -10
  64. package/dist/index218.js.map +1 -1
  65. package/dist/index219.js +370 -25
  66. package/dist/index219.js.map +1 -1
  67. package/dist/index220.js +2 -13
  68. package/dist/index220.js.map +1 -1
  69. package/dist/index221.js +2 -3
  70. package/dist/index221.js.map +1 -1
  71. package/dist/index222.js +9 -3
  72. package/dist/index222.js.map +1 -1
  73. package/dist/index223.js +121 -2
  74. package/dist/index223.js.map +1 -1
  75. package/dist/index224.js +27 -8
  76. package/dist/index224.js.map +1 -1
  77. package/dist/index225.js +12 -120
  78. package/dist/index225.js.map +1 -1
  79. package/dist/index226.js +1 -1
  80. package/dist/index228.js +4 -295
  81. package/dist/index228.js.map +1 -1
  82. package/dist/index229.js +434 -5
  83. package/dist/index229.js.map +1 -1
  84. package/dist/index230.js +89 -2
  85. package/dist/index230.js.map +1 -1
  86. package/dist/index231.js +162 -2
  87. package/dist/index231.js.map +1 -1
  88. package/dist/index232.js +2 -2
  89. package/dist/index233.js +69 -2
  90. package/dist/index233.js.map +1 -1
  91. package/dist/index234.js +2 -2
  92. package/dist/index234.js.map +1 -1
  93. package/dist/index235.js +2 -2
  94. package/dist/index236.js +199 -3
  95. package/dist/index236.js.map +1 -1
  96. package/dist/index237.js +295 -2
  97. package/dist/index237.js.map +1 -1
  98. package/dist/index238.js +5 -116
  99. package/dist/index238.js.map +1 -1
  100. package/dist/index239.js +2 -106
  101. package/dist/index239.js.map +1 -1
  102. package/dist/index240.js +2 -162
  103. package/dist/index240.js.map +1 -1
  104. package/dist/index241.js +2 -2
  105. package/dist/index242.js +2 -435
  106. package/dist/index242.js.map +1 -1
  107. package/dist/index243.js +2 -89
  108. package/dist/index243.js.map +1 -1
  109. package/dist/index244.js +2 -200
  110. package/dist/index244.js.map +1 -1
  111. package/dist/index245.js +224 -2
  112. package/dist/index245.js.map +1 -1
  113. package/dist/index246.js +257 -68
  114. package/dist/index246.js.map +1 -1
  115. package/dist/index247.js +2 -38
  116. package/dist/index247.js.map +1 -1
  117. package/dist/index248.js +117 -2
  118. package/dist/index248.js.map +1 -1
  119. package/dist/index249.js +106 -2
  120. package/dist/index249.js.map +1 -1
  121. package/dist/index25.js +2 -2
  122. package/dist/index250.js +37 -223
  123. package/dist/index250.js.map +1 -1
  124. package/dist/index251.js +2 -258
  125. package/dist/index251.js.map +1 -1
  126. package/dist/index252.js +2 -2
  127. package/dist/index252.js.map +1 -1
  128. package/dist/index254.js +2 -3
  129. package/dist/index254.js.map +1 -1
  130. package/dist/index255.js +3 -2
  131. package/dist/index255.js.map +1 -1
  132. package/dist/index29.js +3 -3
  133. package/dist/index31.js +42 -40
  134. package/dist/index31.js.map +1 -1
  135. package/dist/index33.js +1 -1
  136. package/dist/index35.js +2 -2
  137. package/dist/index47.js +1 -1
  138. package/dist/index49.js +1 -1
  139. package/dist/index65.js +5 -5
  140. package/dist/index69.js +2 -2
  141. package/dist/index72.js +1 -1
  142. package/dist/index75.js +1 -1
  143. package/dist/index79.js +70 -62
  144. package/dist/index79.js.map +1 -1
  145. package/dist/index91.js +18 -16
  146. package/dist/index91.js.map +1 -1
  147. package/dist/style.css +1 -1
  148. package/package.json +1 -1
package/dist/index79.js CHANGED
@@ -1,13 +1,13 @@
1
- import { defineComponent as N, ref as a, computed as C, openBlock as f, createElementBlock as $, mergeProps as T, createElementVNode as s, renderSlot as B, normalizeProps as V, guardReactiveProps as I, unref as m, createBlock as P, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as G, createCommentVNode as D, nextTick as J } from "vue";
2
- import { useFloating as K, arrow as Q } from "./index225.js";
3
- import { useFocusTrap as W } from "./index214.js";
4
- import { useId as X } from "./index7.js";
1
+ import { defineComponent as V, ref as a, computed as m, openBlock as f, createElementBlock as $, mergeProps as C, createElementVNode as s, renderSlot as T, normalizeProps as I, guardReactiveProps as R, unref as B, createBlock as P, Teleport as U, normalizeClass as W, normalizeStyle as j, withCtx as G, createCommentVNode as D, nextTick as J } from "vue";
2
+ import { useFloating as K, arrow as Q } from "./index223.js";
3
+ import { useFocusTrap as X } from "./index199.js";
4
+ import { useId as Y } from "./index7.js";
5
5
  import { wait as E } from "./index122.js";
6
- import Y from "./index9.js";
6
+ import Z from "./index9.js";
7
7
  import "./index10.js";
8
- import { autoUpdate as Z, flip as ee, shift as oe } from "./index207.js";
9
- import { offset as te } from "./index212.js";
10
- const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s("span", { class: "bb-popover__close-label" }, "Chiudi", -1), se = /* @__PURE__ */ s("svg", {
8
+ import { autoUpdate as ee, flip as oe, shift as te } from "./index214.js";
9
+ import { offset as ae } from "./index219.js";
10
+ const re = ["id"], ne = { class: "bb-popover__bubble" }, se = /* @__PURE__ */ s("span", { class: "bb-popover__close-label" }, "Chiudi", -1), le = /* @__PURE__ */ s("svg", {
11
11
  viewBox: "0 0 24 24",
12
12
  fill: "none",
13
13
  xmlns: "http://www.w3.org/2000/svg"
@@ -18,7 +18,7 @@ const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s(
18
18
  "stroke-width": "2",
19
19
  "stroke-linecap": "round"
20
20
  })
21
- ], -1), me = /* @__PURE__ */ N({
21
+ ], -1), we = /* @__PURE__ */ V({
22
22
  __name: "BbPopover",
23
23
  props: {
24
24
  arrowPadding: { default: 10 },
@@ -31,11 +31,12 @@ const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s(
31
31
  showClose: { type: Boolean, default: !0 },
32
32
  theme: { default: "default" },
33
33
  transitionDuration: { default: 150 },
34
- focusTarget: {}
34
+ focusTarget: {},
35
+ width: {}
35
36
  },
36
37
  emits: ["shown", "hidden"],
37
- setup(M, { emit: L }) {
38
- const o = M, l = L, { id: S } = X(), p = `bbp_${S.value}`, u = a(), i = a(), _ = a(), { activate: O, deactivate: z } = W(i, {
38
+ setup(M, { emit: N }) {
39
+ const o = M, l = N, { id: S } = Y(), u = `bbp_${S.value}`, i = a(), c = a(), w = a(), { activate: L, deactivate: x } = X(c, {
39
40
  /**
40
41
  * This traps all clicks outside so we are pressing
41
42
  * the trigger we just allow and process that in its
@@ -46,7 +47,7 @@ const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s(
46
47
  clickOutsideDeactivates: (e) => {
47
48
  var k;
48
49
  const t = e.target;
49
- return t instanceof HTMLElement && (k = u.value) != null && k.contains(t) || (b(), l("hidden")), !0;
50
+ return t instanceof HTMLElement && (k = i.value) != null && k.contains(t) || (b(), l("hidden")), !0;
50
51
  },
51
52
  escapeDeactivates: () => (J(async () => {
52
53
  await b(), v(), l("hidden");
@@ -56,30 +57,30 @@ const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s(
56
57
  * THAT button and not the current trigger
57
58
  */
58
59
  returnFocusOnDeactivate: !1
59
- }), { floatingStyles: F, placement: g, middlewareData: w } = K(
60
- u,
60
+ }), { floatingStyles: O, placement: _, middlewareData: h } = K(
61
61
  i,
62
+ c,
62
63
  {
63
64
  placement: o.placement,
64
- whileElementsMounted: Z,
65
+ whileElementsMounted: ee,
65
66
  middleware: [
66
- ee(),
67
- te(o.offset),
68
- oe({ padding: o.padding }),
67
+ oe(),
68
+ ae(o.offset),
69
+ te({ padding: o.padding }),
69
70
  Q({
70
- element: _,
71
+ element: w,
71
72
  padding: o.arrowPadding
72
73
  })
73
74
  ]
74
75
  }
75
- ), H = C(() => ({
76
+ ), z = m(() => ({
76
77
  class: {
77
78
  "bb-popover--block": o.block,
78
79
  [`bb-popover--theme-${o.theme}`]: o.theme
79
80
  }
80
- })), r = a(!1), n = a(!1), c = a(!1), d = a(!0), q = C(() => {
81
- if (w.value.arrow) {
82
- const { x: e, y: t } = w.value.arrow;
81
+ })), r = a(!1), n = a(!1), p = a(!1), d = a(!0), F = m(() => {
82
+ if (h.value.arrow) {
83
+ const { x: e, y: t } = h.value.arrow;
83
84
  return {
84
85
  style: {
85
86
  left: `${e}px`,
@@ -87,100 +88,107 @@ const ae = ["id"], re = { class: "bb-popover__bubble" }, ne = /* @__PURE__ */ s(
87
88
  }
88
89
  };
89
90
  }
90
- }), x = async () => {
91
- d.value = !1, c.value = !1, r.value = !0, await E(50), n.value = !0, r.value = !1;
91
+ }), H = m(() => {
92
+ const e = {
93
+ ...O.value,
94
+ transitionDuration: `${o.transitionDuration}ms`
95
+ };
96
+ if (o.width) {
97
+ let t;
98
+ typeof o.width == "string" && Number.isNaN(Number(o.width)) ? o.width.includes("%") ? t = `${i.value.clientWidth * (+o.width.replace("%", "") / 100)}px` : t = o.width : t = `${o.width}px`, e.width = t;
99
+ }
100
+ return e;
101
+ }), q = async () => {
102
+ d.value = !1, p.value = !1, r.value = !0, await E(50), n.value = !0, r.value = !1;
92
103
  }, b = async () => {
93
- n.value = !1, r.value = !1, c.value = !0, await E(o.transitionDuration), c.value = !1, d.value = !0;
94
- }, h = a(!1), A = async () => {
104
+ n.value = !1, r.value = !1, p.value = !0, await E(o.transitionDuration), p.value = !1, d.value = !0;
105
+ }, g = a(!1), A = async () => {
95
106
  if (n.value) {
96
107
  await b(), v(), l("hidden");
97
108
  return;
98
109
  }
99
110
  if (r.value || o.disabled)
100
111
  return;
101
- h.value = !0, await x();
112
+ g.value = !0, await q();
102
113
  let e = o.focusTarget ?? ".bb-popover__close";
103
- O({
114
+ L({
104
115
  onPostActivate: () => {
105
- if (i.value) {
106
- const t = i.value.querySelector(e);
116
+ if (c.value) {
117
+ const t = c.value.querySelector(e);
107
118
  t instanceof HTMLElement && (t.focus(), l("shown"));
108
119
  }
109
120
  }
110
121
  });
111
122
  }, v = () => {
112
123
  var t;
113
- const e = (t = u.value) == null ? void 0 : t.querySelector(`[aria-controls=popover_${p}]`);
124
+ const e = (t = i.value) == null ? void 0 : t.querySelector(`[aria-controls=popover_${u}]`);
114
125
  e instanceof HTMLElement && e.focus();
115
126
  }, y = async () => {
116
- z(), await b(), v(), l("hidden");
127
+ x(), await b(), v(), l("hidden");
117
128
  };
118
- return (e, t) => (f(), $("span", T({ class: "bb-popover" }, H.value), [
129
+ return (e, t) => (f(), $("span", C({ class: "bb-popover" }, z.value), [
119
130
  s("span", {
120
131
  class: "bb-popover__wrapper",
121
132
  ref_key: "wrapper",
122
- ref: u
133
+ ref: i
123
134
  }, [
124
- B(e.$slots, "activator", V(I({
135
+ T(e.$slots, "activator", I(R({
125
136
  props: {
126
- "aria-controls": `popover_${p}`,
137
+ "aria-controls": `popover_${u}`,
127
138
  "aria-expanded": n.value,
128
139
  onClick: A,
129
- id: p,
140
+ id: u,
130
141
  disabled: !!e.disabled
131
142
  },
132
143
  closed: d.value,
133
- closing: c.value,
144
+ closing: p.value,
134
145
  disabled: !!e.disabled,
135
146
  open: n.value,
136
147
  opening: r.value,
137
- placement: m(g)
148
+ placement: B(_)
138
149
  })))
139
150
  ], 512),
140
- (f(), P(R, { to: "body" }, [
141
- h.value || e.eager ? (f(), $("span", {
151
+ (f(), P(U, { to: "body" }, [
152
+ g.value || e.eager ? (f(), $("span", {
142
153
  key: 0,
143
- class: U(["bb-popover__bubble-container", {
144
- [`bb-popover__bubble-container--${m(g)}`]: !0,
154
+ class: W(["bb-popover__bubble-container", {
155
+ [`bb-popover__bubble-container--${B(_)}`]: !0,
145
156
  [`bb-popover__bubble-container--${e.theme}`]: e.theme,
146
157
  "bb-popover__bubble-container--hidden": d.value,
147
- "bb-popover__bubble-container--closing": c.value,
158
+ "bb-popover__bubble-container--closing": p.value,
148
159
  "bb-popover__bubble-container--opening": r.value,
149
160
  "bb-popover__bubble-container--open": n.value
150
161
  }]),
151
162
  ref_key: "content",
152
- ref: i,
153
- style: j({
154
- ...m(F),
155
- transitionDuration: `${o.transitionDuration}ms`
156
- }),
157
- id: `popover_${p}`
163
+ ref: c,
164
+ style: j(H.value),
165
+ id: `popover_${u}`
158
166
  }, [
159
- s("span", T({
167
+ s("span", C({
160
168
  class: "bb-popover__arrow",
161
169
  ref_key: "bubblearrow",
162
- ref: _
163
- }, q.value), null, 16),
164
- s("span", re, [
165
- e.showClose ? (f(), P(Y, {
170
+ ref: w
171
+ }, F.value), null, 16),
172
+ s("span", ne, [
173
+ e.showClose ? (f(), P(Z, {
166
174
  key: 0,
167
175
  class: "bb-popover__close",
168
176
  onClick: y
169
177
  }, {
170
178
  default: G(() => [
171
- ne,
172
- se
179
+ se,
180
+ le
173
181
  ]),
174
182
  _: 1
175
183
  })) : D("", !0),
176
- B(e.$slots, "default", { close: y })
184
+ T(e.$slots, "default", { close: y })
177
185
  ])
178
- ], 14, ae)) : D("", !0)
186
+ ], 14, re)) : D("", !0)
179
187
  ]))
180
188
  ], 16));
181
189
  }
182
190
  });
183
191
  export {
184
- me as default
192
+ we as default
185
193
  };
186
194
  //# sourceMappingURL=index79.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index79.js","sources":["../src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"bb-popover__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, nextTick, ref } from \"vue\";\nimport {\n useFloating,\n autoUpdate,\n flip,\n shift,\n offset,\n arrow,\n} from \"@floating-ui/vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Placement } from \"@floating-ui/vue\";\n\nexport type BbPopoverProps = Pick<\n CommonProps,\n | \"arrowPadding\"\n | \"block\"\n | \"disabled\"\n | \"eager\"\n | \"offset\"\n | \"padding\"\n | \"placement\"\n | \"showClose\"\n | \"theme\"\n | \"transitionDuration\"\n> & {\n /**\n * Elements that obtains focus immediately after opening the popover.\n * By default it's the first tabbable item.\n */\n focusTarget?: string;\n};\n\nexport type BbPopoverEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPopover',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n offset: { default: 3 },\n padding: { default: 10 },\n placement: { default: \"bottom\" },\n showClose: { type: Boolean, default: true },\n theme: { default: \"default\" },\n transitionDuration: { default: 150 },\n focusTarget: {}\n },\n emits: [\"shown\", \"hidden\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n /**\n * This traps all clicks outside so we are pressing\n * the trigger we just allow and process that in its\n * own click handler.\n * If we are pressing anything random on the page\n * close the popover and be done\n */\n clickOutsideDeactivates: (event) => {\n const target = event.target;\n if (target instanceof HTMLElement) {\n if (wrapper.value?.contains(target)) {\n return true;\n }\n }\n closePopover();\n emit(\"hidden\");\n return true;\n },\n escapeDeactivates: () => {\n nextTick(async () => {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n });\n return true;\n },\n /* We don't return focus so that when\n * we press a button on tyhe page we can focus\n * THAT button and not the current trigger\n */\n returnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n wrapper,\n content,\n {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [\n flip(),\n offset(props.offset),\n shift({ padding: props.padding }),\n arrow({\n element: bubblearrow,\n padding: props.arrowPadding,\n }),\n ],\n }\n);\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-popover--block\": props.block,\n [`bb-popover--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n if (middlewareData.value.arrow) {\n const { x, y } = middlewareData.value.arrow;\n return {\n style: {\n left: `${x}px`,\n top: `${y}px`,\n },\n };\n }\n});\n\nconst openPopover = async () => {\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closePopover = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n if (open.value) {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n return;\n }\n if (opening.value || props.disabled) return;\n hasOpenedOnce.value = true;\n await openPopover();\n let focusTarget = props.focusTarget ?? \".bb-popover__close\";\n\n activate({\n onPostActivate: () => {\n if (content.value) {\n const target = content.value.querySelector(focusTarget);\n if (target instanceof HTMLElement) {\n target.focus();\n emit(\"shown\");\n }\n }\n },\n });\n};\n\nconst focusTrigger = () => {\n const trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n if (trigger instanceof HTMLElement) {\n trigger.focus();\n }\n};\n\nconst onClickClose = async () => {\n deactivate();\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-popover__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-controls': `popover_${id}`,\n 'aria-expanded': open.value,\n onClick: onTriggerClick,\n id: id,\n disabled: !!_ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: !!_ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n [`bb-popover__bubble-container--${_unref(placement)}`]: true,\n [`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-popover__bubble-container--hidden': closed.value,\n 'bb-popover__bubble-container--closing': closing.value,\n 'bb-popover__bubble-container--opening': opening.value,\n 'bb-popover__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle({\n ..._unref(floatingStyles),\n transitionDuration: `${props.transitionDuration}ms`,\n }),\n id: `popover_${id}`\n }, [\n _createElementVNode(\"span\", _mergeProps({\n class: \"bb-popover__arrow\",\n ref_key: \"bubblearrow\",\n ref: bubblearrow\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-popover__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3,\n _hoisted_4\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\", { close: onClickClose })\n ])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","props","emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","openPopover","wait","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;AAGA,MAAMA,KAAa,CAAC,IAAI,GAClBC,KAAa,EAAE,OAAO,wBACtBC,uBAA8C,QAAQ,EAAE,OAAO,6BAA6B,UAAU,EAAE,GACxGC,uBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EAAA,CACnB;AACH,GAAG,EAAE,GA4CuBC,KAAiBC,gBAAAA,EAAA;AAAA,EAC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AAAA,WACA,IAAIlD,EAAU,KACjBmE,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index79.js","sources":["../src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"bb-popover__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, nextTick, ref } from \"vue\";\nimport {\n useFloating,\n autoUpdate,\n flip,\n shift,\n offset,\n arrow,\n} from \"@floating-ui/vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Placement } from \"@floating-ui/vue\";\n\nexport type BbPopoverProps = Pick<\n CommonProps,\n | \"arrowPadding\"\n | \"block\"\n | \"disabled\"\n | \"eager\"\n | \"offset\"\n | \"padding\"\n | \"placement\"\n | \"showClose\"\n | \"theme\"\n | \"transitionDuration\"\n> & {\n /**\n * Elements that obtains focus immediately after opening the popover.\n * By default it's the first tabbable item.\n */\n focusTarget?: string;\n /**\n * Width of the dropdown in pixels.\n */\n width?: number | string;\n};\n\nexport type BbPopoverEvents = {\n (e: \"shown\"): void;\n (e: \"hidden\"): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPopover',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n offset: { default: 3 },\n padding: { default: 10 },\n placement: { default: \"bottom\" },\n showClose: { type: Boolean, default: true },\n theme: { default: \"default\" },\n transitionDuration: { default: 150 },\n focusTarget: {},\n width: {}\n },\n emits: [\"shown\", \"hidden\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n /**\n * This traps all clicks outside so we are pressing\n * the trigger we just allow and process that in its\n * own click handler.\n * If we are pressing anything random on the page\n * close the popover and be done\n */\n clickOutsideDeactivates: (event) => {\n const target = event.target;\n if (target instanceof HTMLElement) {\n if (wrapper.value?.contains(target)) {\n return true;\n }\n }\n closePopover();\n emit(\"hidden\");\n return true;\n },\n escapeDeactivates: () => {\n nextTick(async () => {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n });\n return true;\n },\n /* We don't return focus so that when\n * we press a button on tyhe page we can focus\n * THAT button and not the current trigger\n */\n returnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n wrapper,\n content,\n {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [\n flip(),\n offset(props.offset),\n shift({ padding: props.padding }),\n arrow({\n element: bubblearrow,\n padding: props.arrowPadding,\n }),\n ],\n }\n);\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-popover--block\": props.block,\n [`bb-popover--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n if (middlewareData.value.arrow) {\n const { x, y } = middlewareData.value.arrow;\n return {\n style: {\n left: `${x}px`,\n top: `${y}px`,\n },\n };\n }\n});\n\nconst containerStyle = computed(() => {\n const base: Record<string, any> = {\n ...floatingStyles.value,\n transitionDuration: `${props.transitionDuration}ms`,\n };\n if (props.width) {\n let width: string;\n // If the width is a css unit string use it, if it is a number or number string add px\n if (typeof props.width === \"string\" && Number.isNaN(Number(props.width))) {\n if (props.width.includes(\"%\")) {\n width = `${\n wrapper.value!.clientWidth * (+props.width.replace(\"%\", \"\") / 100)\n }px`;\n } else {\n width = props.width;\n }\n } else {\n width = `${props.width}px`;\n }\n base.width = width;\n }\n return base;\n});\n\nconst openPopover = async () => {\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closePopover = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n if (open.value) {\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n return;\n }\n if (opening.value || props.disabled) return;\n hasOpenedOnce.value = true;\n await openPopover();\n let focusTarget = props.focusTarget ?? \".bb-popover__close\";\n\n activate({\n onPostActivate: () => {\n if (content.value) {\n const target = content.value.querySelector(focusTarget);\n if (target instanceof HTMLElement) {\n target.focus();\n emit(\"shown\");\n }\n }\n },\n });\n};\n\nconst focusTrigger = () => {\n const trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n if (trigger instanceof HTMLElement) {\n trigger.focus();\n }\n};\n\nconst onClickClose = async () => {\n deactivate();\n await closePopover();\n focusTrigger();\n emit(\"hidden\");\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-popover__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-controls': `popover_${id}`,\n 'aria-expanded': open.value,\n onClick: onTriggerClick,\n id: id,\n disabled: !!_ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: !!_ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n [`bb-popover__bubble-container--${_unref(placement)}`]: true,\n [`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-popover__bubble-container--hidden': closed.value,\n 'bb-popover__bubble-container--closing': closing.value,\n 'bb-popover__bubble-container--opening': opening.value,\n 'bb-popover__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle(containerStyle.value),\n id: `popover_${id}`\n }, [\n _createElementVNode(\"span\", _mergeProps({\n class: \"bb-popover__arrow\",\n ref_key: \"bubblearrow\",\n ref: bubblearrow\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-popover__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3,\n _hoisted_4\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\", { close: onClickClose })\n ])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","props","emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;AAGA,MAAMA,KAAa,CAAC,IAAI,GAClBC,KAAa,EAAE,OAAO,wBACtBC,uBAA8C,QAAQ,EAAE,OAAO,6BAA6B,UAAU,EAAE,GACxGC,uBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EAAA,CACnB;AACH,GAAG,EAAE,GAgDuBC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,SAAS,GAAG;AAAA,IAC5B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,QAAQ,EAAE,SAAS,EAAE;AAAA,IACrB,SAAS,EAAE,SAAS,GAAG;AAAA,IACvB,WAAW,EAAE,SAAS,SAAS;AAAA,IAC/B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;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,EAAoB,IAAI,EAAI;AAAA,YAChCV,EAAYN,EAAK,QAAQ,WAAW,EAAE,OAAOD,GAAc;AAAA,UAAA,CAC5D;AAAA,WACA,IAAIrD,EAAU,KACjBsE,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index91.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, openBlock as b, createBlock as y, withCtx as n, renderSlot as a, normalizeProps as l, guardReactiveProps as i, createVNode as h, mergeProps as c } from "vue";
1
+ import { defineComponent as u, openBlock as c, createBlock as b, withCtx as n, renderSlot as a, normalizeProps as l, guardReactiveProps as i, createVNode as y, mergeProps as h } from "vue";
2
2
  import f from "./index21.js";
3
3
  import "./index22.js";
4
4
  import T from "./index31.js";
@@ -8,6 +8,7 @@ const v = /* @__PURE__ */ u({
8
8
  props: {
9
9
  addOptions: { type: Boolean },
10
10
  allowWriting: { type: Boolean, default: !0 },
11
+ autocomplete: {},
11
12
  autofocus: {},
12
13
  comma: { type: Boolean },
13
14
  dependencies: {},
@@ -44,16 +45,16 @@ const v = /* @__PURE__ */ u({
44
45
  },
45
46
  emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
46
47
  setup(B, { emit: s }) {
47
- const r = s, p = {
48
- onBlur: (e) => r("blur", e),
49
- onChange: (e) => r("change", e),
50
- onClick: (e) => r("click", e),
51
- onFocus: (e) => r("focus", e),
52
- onInactive: () => r("inactive"),
53
- onInput: (e) => r("input", e),
54
- "onUpdate:modelValue": (e) => r("update:modelValue", e)
48
+ const t = s, p = {
49
+ onBlur: (e) => t("blur", e),
50
+ onChange: (e) => t("change", e),
51
+ onClick: (e) => t("click", e),
52
+ onFocus: (e) => t("focus", e),
53
+ onInactive: () => t("inactive"),
54
+ onInput: (e) => t("input", e),
55
+ "onUpdate:modelValue": (e) => t("update:modelValue", e)
55
56
  };
56
- return (e, g) => (b(), y(f, {
57
+ return (e, g) => (c(), b(f, {
57
58
  class: "bb-select",
58
59
  direction: e.direction,
59
60
  errors: e.errors,
@@ -66,11 +67,12 @@ const v = /* @__PURE__ */ u({
66
67
  name: e.name,
67
68
  reverse: e.reverse
68
69
  }, {
69
- label: n((t) => [
70
- a(e.$slots, "label", l(i(t)))
70
+ label: n((r) => [
71
+ a(e.$slots, "label", l(i(r)))
71
72
  ]),
72
- input: n(({ id: t, name: d, hasErrors: m }) => [
73
- h(T, c({
73
+ input: n(({ id: r, name: d, hasErrors: m }) => [
74
+ y(T, h({
75
+ autocomplete: e.autocomplete,
74
76
  addOptions: e.addOptions,
75
77
  allowWriting: e.allowWriting,
76
78
  autofocus: e.autofocus,
@@ -81,7 +83,7 @@ const v = /* @__PURE__ */ u({
81
83
  enforceCoherence: e.enforceCoherence,
82
84
  filterBy: e.filterBy,
83
85
  hasErrors: m,
84
- id: t,
86
+ id: r,
85
87
  items: e.items,
86
88
  itemText: e.itemText,
87
89
  itemValue: e.itemValue,
@@ -144,7 +146,7 @@ const v = /* @__PURE__ */ u({
144
146
  a(e.$slots, "chip", l(i(o)))
145
147
  ]),
146
148
  _: 2
147
- }, 1040, ["addOptions", "allowWriting", "autofocus", "comma", "dependencies", "depsDebounceTime", "disabled", "enforceCoherence", "filterBy", "hasErrors", "id", "items", "itemText", "itemValue", "loadingText", "matchStrategy", "modelValue", "modelValueDebounceTime", "multiple", "name", "noDataText", "placeholder", "prefill", "queryDebounceTime", "readonly", "resetQueryOnOptionSelected", "stash", "transitionDuration", "updateOnAnimationFrame"])
149
+ }, 1040, ["autocomplete", "addOptions", "allowWriting", "autofocus", "comma", "dependencies", "depsDebounceTime", "disabled", "enforceCoherence", "filterBy", "hasErrors", "id", "items", "itemText", "itemValue", "loadingText", "matchStrategy", "modelValue", "modelValueDebounceTime", "multiple", "name", "noDataText", "placeholder", "prefill", "queryDebounceTime", "readonly", "resetQueryOnOptionSelected", "stash", "transitionDuration", "updateOnAnimationFrame"])
148
150
  ]),
149
151
  _: 3
150
152
  }, 8, ["direction", "errors", "has-errors", "hideLabel", "id", "label", "labelPosition", "modelValue", "name", "reverse"]));
@@ -1 +1 @@
1
- {"version":3,"file":"index91.js","sources":["../src/components/BbSelect/BbSelect.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseSelect from \"../BaseSelect/BaseSelect.vue\";\nimport type {\n BaseSelectEvents,\n} from \"../BaseSelect/BaseSelect.vue\";\nimport type { NestedKeyOf } from \"@/types/NestedKeyOf\";\nimport type { HTMLAttributes, InputHTMLAttributes } from \"vue\";\n\nexport type BbSelectProps<T> = {\n /**\n * Allows the user to add options to the list by\n * inserting text in the input and pressing ENTER.\n * The value and text of the option generated is a\n * string equal to what has been inserted.\n */\n addOptions?: boolean;\n\n /**\n * Allows typing into the input.\n */\n allowWriting?: boolean;\n\n /**\n * Sets autofocus on page load.\n */\n autofocus?: InputHTMLAttributes[\"autofocus\"];\n\n /**\n * Sets the display model for selected values to a list\n * of comma separated string. In this mode the user\n * cannot deselect an option by pressing the close button.\n */\n comma?: boolean;\n\n /**\n * Defines an array of dependencies that will trigger actions in the component upon change.\n */\n dependencies?: any[];\n\n /**\n * Timeout used to debounce response to changes to dependencies.\n */\n depsDebounceTime?: number;\n\n /**\n * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n */\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n *\n * e.g. You cannot set v-model to a user that is not present in the items passed.\n *\n * modelValue will be reset upon incoherence.\n */\n enforceCoherence?: boolean;\n\n /**\n * Can be a string or an array of string containing the messages to display.\n */\n errors?: string | string[];\n\n /**\n * Defines how the filtering should work.\n * In any case options are always filtered by the text displayed but\n * they can also take into account other properties of the\n * passed elements when this property is a string or an array of string.\n * E.g. items could be a list of users and you can filter users by email or phone by passing `['email', 'phone']`\n * You can also pass false to not filter anything or a function for more granular control.\n *\n */\n filterBy?:\n | string\n | string[]\n | false\n | ((value: any, item: T) => boolean)\n | null;\n\n /**\n * Define if the component should be in an error state.\n * It usually attaches a CSS class for styling purposes.\n */\n hasErrors?: boolean;\n\n /**\n * Visually hides the label of the input while maintaining accessibility.\n */\n hideLabel?: boolean;\n\n /**\n * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Used to retrieve items can be an array or a function.\n */\n items:\n | T[]\n | ((query: string, prefill: boolean, modelValue: any) => Promise<T[]>)\n | ((query: string, prefill: boolean, modelValue: any) => T[]);\n\n /**\n * Defines a path that returns a property of the object to use as text or a function that returns a string\n */\n itemText?: T extends object\n ? NestedKeyOf<T> | ((item: T) => string)\n : ((item: T) => string) | undefined;\n\n /**\n * Defines a path that returns a property of the object to use as value or a function that returns any value\n */\n itemValue?: T extends object\n ? NestedKeyOf<T> | ((item: T) => string)\n : ((item: T) => any) | undefined;\n\n /**\n * Text content of the label of the element.\n */\n label: string;\n\n /**\n * Sets the text alignment of the label.\n */\n labelPosition?: \"left\" | \"center\" | \"right\";\n\n /**\n * String displayed while items are being loaded.\n */\n loadingText?: string;\n\n /**\n * Defines the strategy used to understand whether an option has been selected.\n * `string` is 40% faster but relies on property order.\n * `equality` is more reliable but is slower.\n */\n matchStrategy?: \"string\" | \"equality\";\n\n /**\n * Used by v-model. Can be any serializable type.\n */\n modelValue: any;\n\n /**\n * Timeout used to debounce response to changes to modelValue.\n */\n modelValueDebounceTime?: number;\n\n /**\n * Allows the selection of multiple items.\n */\n multiple?: boolean;\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * String displayed when there are no items to display.\n */\n noDataText?: string;\n\n /**\n * String displayed when there's no data.\n */\n placeholder?: InputHTMLAttributes[\"placeholder\"];\n\n /**\n * Defines the prefill strategy for the input. By default the input will prefill\n * on focus. It can also always prefill with `true` and only prefill on search with `false`.\n */\n prefill?: boolean | \"focus\";\n\n /**\n * Time to wait when the users stops writing in the input before querying data.\n * Especially useful when searching live data on big datasets.\n */\n queryDebounceTime?: number;\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n\n /**\n * If `true` when in multiple selection, reset the query immediately\n * upon selecting an option. By default the query is\n * not reset until focus is lost so the user can search\n * for \"Cath\" and select \"Cathy\" and then write more to\n * search for \"Catherine\"\n */\n resetQueryOnOptionSelected?: boolean;\n\n /**\n * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n */\n reverse?: boolean;\n\n /**\n * Adds a stash to accumulate selected values. Especially\n * useful when searching in a big database of items.\n * E.g. if you search for \"John\" and then search for \"Richard\"\n * you either always return the previous items or you stash them passing `true` to this option.\n */\n stash?: boolean;\n\n /**\n * How long the transition has to last in milliseconds\n */\n transitionDuration?: number;\n\n /**\n * Pass `true` if the dropdown is not updating following movement in the UI, like in modals. Very expensive so use with care.\n */\n updateOnAnimationFrame?: boolean;\n};\n\nexport type BbSelectEvents = BaseSelectEvents;\n\nexport type BbSelectSlots<T> = {\n append?: (props: {}) => any;\n\n \"append-outer\"?: (props: {}) => any;\n\n chevron?: (props: { loading: boolean; shown: boolean }) => any;\n\n chip?: (props: {\n disabled: boolean;\n hasErrors?: boolean;\n index: number;\n item: T;\n loading: boolean;\n manual: boolean;\n selected: boolean;\n text: string;\n value: any;\n }) => any;\n\n label?: (props: { text: string; hasErrors: boolean }) => any;\n\n loading?: (props: { query: string }) => any;\n\n \"no-data\"?: (props: { query: string }) => any;\n\n option?: (props: {\n disabled: boolean;\n focused: boolean;\n hasErrors?: boolean;\n index: number;\n item: T;\n loading: boolean;\n manual: boolean;\n selected: boolean;\n text: string;\n value: any;\n }) => any;\n\n \"option:append\"?: (props: { item: T }) => any;\n\n \"option:prepend\"?: (props: { item: T }) => any;\n\n \"options:append\"?: (props: {}) => any;\n\n \"options:prepend\"?: (props: {}) => any;\n\n prepend?: (props: {}) => any;\n\n \"prepend-outer\"?: (props: {}) => any;\n\n spinner?: (props: { loading: boolean }) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSelect',\n props: {\n addOptions: { type: Boolean },\n allowWriting: { type: Boolean, default: true },\n autofocus: {},\n comma: { type: Boolean },\n dependencies: {},\n depsDebounceTime: {},\n direction: {},\n disabled: { type: Boolean },\n enforceCoherence: { type: Boolean },\n errors: {},\n filterBy: { type: [String, Array, Boolean, Function, null] },\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n items: {},\n itemText: {},\n itemValue: {},\n label: {},\n labelPosition: {},\n loadingText: {},\n matchStrategy: {},\n modelValue: {},\n modelValueDebounceTime: {},\n multiple: { type: Boolean },\n name: {},\n noDataText: {},\n placeholder: {},\n prefill: { type: [Boolean, String], default: \"focus\" },\n queryDebounceTime: {},\n readonly: {},\n resetQueryOnOptionSelected: { type: Boolean },\n reverse: { type: Boolean },\n stash: { type: Boolean },\n transitionDuration: {},\n updateOnAnimationFrame: { type: Boolean }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"inactive\", \"input\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInactive: () => emit(\"inactive\"),\n onInput: (event: Event) => emit(\"input\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-select\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseSelect, _mergeProps({\n addOptions: _ctx.addOptions,\n allowWriting: _ctx.allowWriting,\n autofocus: _ctx.autofocus,\n comma: _ctx.comma,\n dependencies: _ctx.dependencies,\n depsDebounceTime: _ctx.depsDebounceTime,\n disabled: _ctx.disabled,\n enforceCoherence: _ctx.enforceCoherence,\n filterBy: _ctx.filterBy,\n hasErrors: hasErrors,\n id: id,\n items: _ctx.items,\n itemText: (_ctx.itemText as any),\n itemValue: (_ctx.itemValue as any),\n loadingText: _ctx.loadingText,\n matchStrategy: _ctx.matchStrategy,\n modelValue: _ctx.modelValue,\n modelValueDebounceTime: _ctx.modelValueDebounceTime,\n multiple: _ctx.multiple,\n name: name,\n noDataText: _ctx.noDataText,\n placeholder: _ctx.placeholder,\n prefill: _ctx.prefill,\n queryDebounceTime: _ctx.queryDebounceTime,\n readonly: _ctx.readonly,\n resetQueryOnOptionSelected: _ctx.resetQueryOnOptionSelected,\n stash: _ctx.stash,\n transitionDuration: _ctx.transitionDuration,\n updateOnAnimationFrame: _ctx.updateOnAnimationFrame\n }, eventListeners), {\n \"append-outer\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"append-outer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n append: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n chevron: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"chevron\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n loading: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"loading\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"no-data\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"no-data\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"option:append\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option:append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"option:prepend\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option:prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n option: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"options:append\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"options:append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"options:prepend\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"options:prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"prepend-outer\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend-outer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n prepend: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n spinner: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"spinner\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n chip: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"chip\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n _: 2\n }, 1040, [\"addOptions\", \"allowWriting\", \"autofocus\", \"comma\", \"dependencies\", \"depsDebounceTime\", \"disabled\", \"enforceCoherence\", \"filterBy\", \"hasErrors\", \"id\", \"items\", \"itemText\", \"itemValue\", \"loadingText\", \"matchStrategy\", \"modelValue\", \"modelValueDebounceTime\", \"multiple\", \"name\", \"noDataText\", \"placeholder\", \"prefill\", \"queryDebounceTime\", \"readonly\", \"resetQueryOnOptionSelected\", \"stash\", \"transitionDuration\", \"updateOnAnimationFrame\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"has-errors\", \"hideLabel\", \"id\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseSelect","_mergeProps"],"mappings":";;;;;AA2RA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,cAAc,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC7C,WAAW,CAAC;AAAA,IACZ,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,cAAc,CAAC;AAAA,IACf,kBAAkB,CAAC;AAAA,IACnB,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,kBAAkB,EAAE,MAAM,QAAQ;AAAA,IAClC,QAAQ,CAAC;AAAA,IACT,UAAU,EAAE,MAAM,CAAC,QAAQ,OAAO,SAAS,UAAU,IAAI,EAAE;AAAA,IAC3D,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,OAAO,CAAC;AAAA,IACR,UAAU,CAAC;AAAA,IACX,WAAW,CAAC;AAAA,IACZ,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,aAAa,CAAC;AAAA,IACd,eAAe,CAAC;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,wBAAwB,CAAC;AAAA,IACzB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,CAAC;AAAA,IACP,YAAY,CAAC;AAAA,IACb,aAAa,CAAC;AAAA,IACd,SAAS,EAAE,MAAM,CAAC,SAAS,MA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AAI,CAAC,CAAC;AAAA,UAAA,CAC/E;AAAA,UACD,SAASD,EAAS,CAACC,MAAS;AAAA,YAC1BC,EAAYP,EAAK,QAAQ,WAAWQ,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,UAAA,CAC/E;AAAA,UACD,MAAMD,EAAS,CAACC,MAAS;AAAA,YACvBC,EAAYP,EAAK,QAAQ,QAAQQ,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,UAAA,CAC5E;AAAA,UACD,GAAG;AAAA,QAAA,GACF,MAAM,CAAC,cAAc,gBAAgB,aAAa,SAAS,gBAAgB,oBAAoB,YAAY,oBAAoB,YAAY,aAAa,MAAM,SAAS,YAAY,aAAa,eAAe,iBAAiB,cAAc,0BAA0B,YAAY,QAAQ,cAAc,eAAe,WAAW,qBAAqB,YAAY,8BAA8B,SAAS,sBAAsB,wBAAwB,CAAC;AAAA,MAAA,CAC/b;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,cAAc,aAAa,MAAM,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE3H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index91.js","sources":["../src/components/BbSelect/BbSelect.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseSelect from \"../BaseSelect/BaseSelect.vue\";\nimport type { BaseSelectEvents } from \"../BaseSelect/BaseSelect.vue\";\nimport type { NestedKeyOf } from \"@/types/NestedKeyOf\";\nimport type { HTMLAttributes, InputHTMLAttributes } from \"vue\";\n\nexport type BbSelectProps<T> = {\n /**\n * Allows the user to add options to the list by\n * inserting text in the input and pressing ENTER.\n * The value and text of the option generated is a\n * string equal to what has been inserted.\n */\n addOptions?: boolean;\n\n /**\n * Allows typing into the input.\n */\n allowWriting?: boolean;\n\n /**\n * Guides to the browser as to the type of information expected in the field.\n */\n autocomplete?: InputHTMLAttributes[\"autocomplete\"];\n\n /**\n * Sets autofocus on page load.\n */\n autofocus?: InputHTMLAttributes[\"autofocus\"];\n\n /**\n * Sets the display model for selected values to a list\n * of comma separated string. In this mode the user\n * cannot deselect an option by pressing the close button.\n */\n comma?: boolean;\n\n /**\n * Defines an array of dependencies that will trigger actions in the component upon change.\n */\n dependencies?: any[];\n\n /**\n * Timeout used to debounce response to changes to dependencies.\n */\n depsDebounceTime?: number;\n\n /**\n * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n */\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n *\n * e.g. You cannot set v-model to a user that is not present in the items passed.\n *\n * modelValue will be reset upon incoherence.\n */\n enforceCoherence?: boolean;\n\n /**\n * Can be a string or an array of string containing the messages to display.\n */\n errors?: string | string[];\n\n /**\n * Defines how the filtering should work.\n * In any case options are always filtered by the text displayed but\n * they can also take into account other properties of the\n * passed elements when this property is a string or an array of string.\n * E.g. items could be a list of users and you can filter users by email or phone by passing `['email', 'phone']`\n * You can also pass false to not filter anything or a function for more granular control.\n *\n */\n filterBy?:\n | string\n | string[]\n | false\n | ((value: any, item: T) => boolean)\n | null;\n\n /**\n * Define if the component should be in an error state.\n * It usually attaches a CSS class for styling purposes.\n */\n hasErrors?: boolean;\n\n /**\n * Visually hides the label of the input while maintaining accessibility.\n */\n hideLabel?: boolean;\n\n /**\n * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Used to retrieve items can be an array or a function.\n */\n items:\n | T[]\n | ((query: string, prefill: boolean, modelValue: any) => Promise<T[]>)\n | ((query: string, prefill: boolean, modelValue: any) => T[]);\n\n /**\n * Defines a path that returns a property of the object to use as text or a function that returns a string\n */\n itemText?: T extends object\n ? NestedKeyOf<T> | ((item: T) => string)\n : ((item: T) => string) | undefined;\n\n /**\n * Defines a path that returns a property of the object to use as value or a function that returns any value\n */\n itemValue?: T extends object\n ? NestedKeyOf<T> | ((item: T) => string)\n : ((item: T) => any) | undefined;\n\n /**\n * Text content of the label of the element.\n */\n label: string;\n\n /**\n * Sets the text alignment of the label.\n */\n labelPosition?: \"left\" | \"center\" | \"right\";\n\n /**\n * String displayed while items are being loaded.\n */\n loadingText?: string;\n\n /**\n * Defines the strategy used to understand whether an option has been selected.\n * `string` is 40% faster but relies on property order.\n * `equality` is more reliable but is slower.\n */\n matchStrategy?: \"string\" | \"equality\";\n\n /**\n * Used by v-model. Can be any serializable type.\n */\n modelValue: any;\n\n /**\n * Timeout used to debounce response to changes to modelValue.\n */\n modelValueDebounceTime?: number;\n\n /**\n * Allows the selection of multiple items.\n */\n multiple?: boolean;\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * String displayed when there are no items to display.\n */\n noDataText?: string;\n\n /**\n * String displayed when there's no data.\n */\n placeholder?: InputHTMLAttributes[\"placeholder\"];\n\n /**\n * Defines the prefill strategy for the input. By default the input will prefill\n * on focus. It can also always prefill with `true` and only prefill on search with `false`.\n */\n prefill?: boolean | \"focus\";\n\n /**\n * Time to wait when the users stops writing in the input before querying data.\n * Especially useful when searching live data on big datasets.\n */\n queryDebounceTime?: number;\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n\n /**\n * If `true` when in multiple selection, reset the query immediately\n * upon selecting an option. By default the query is\n * not reset until focus is lost so the user can search\n * for \"Cath\" and select \"Cathy\" and then write more to\n * search for \"Catherine\"\n */\n resetQueryOnOptionSelected?: boolean;\n\n /**\n * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n */\n reverse?: boolean;\n\n /**\n * Adds a stash to accumulate selected values. Especially\n * useful when searching in a big database of items.\n * E.g. if you search for \"John\" and then search for \"Richard\"\n * you either always return the previous items or you stash them passing `true` to this option.\n */\n stash?: boolean;\n\n /**\n * How long the transition has to last in milliseconds\n */\n transitionDuration?: number;\n\n /**\n * Pass `true` if the dropdown is not updating following movement in the UI, like in modals. Very expensive so use with care.\n */\n updateOnAnimationFrame?: boolean;\n};\n\nexport type BbSelectEvents = BaseSelectEvents;\n\nexport type BbSelectSlots<T> = {\n append?: (props: {}) => any;\n\n \"append-outer\"?: (props: {}) => any;\n\n chevron?: (props: { loading: boolean; shown: boolean }) => any;\n\n chip?: (props: {\n disabled: boolean;\n hasErrors?: boolean;\n index: number;\n item: T;\n loading: boolean;\n manual: boolean;\n selected: boolean;\n text: string;\n value: any;\n }) => any;\n\n label?: (props: { text: string; hasErrors: boolean }) => any;\n\n loading?: (props: { query: string }) => any;\n\n \"no-data\"?: (props: { query: string }) => any;\n\n option?: (props: {\n disabled: boolean;\n focused: boolean;\n hasErrors?: boolean;\n index: number;\n item: T;\n loading: boolean;\n manual: boolean;\n selected: boolean;\n text: string;\n value: any;\n }) => any;\n\n \"option:append\"?: (props: { item: T }) => any;\n\n \"option:prepend\"?: (props: { item: T }) => any;\n\n \"options:append\"?: (props: {}) => any;\n\n \"options:prepend\"?: (props: {}) => any;\n\n prepend?: (props: {}) => any;\n\n \"prepend-outer\"?: (props: {}) => any;\n\n spinner?: (props: { loading: boolean }) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSelect',\n props: {\n addOptions: { type: Boolean },\n allowWriting: { type: Boolean, default: true },\n autocomplete: {},\n autofocus: {},\n comma: { type: Boolean },\n dependencies: {},\n depsDebounceTime: {},\n direction: {},\n disabled: { type: Boolean },\n enforceCoherence: { type: Boolean },\n errors: {},\n filterBy: { type: [String, Array, Boolean, Function, null] },\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n items: {},\n itemText: {},\n itemValue: {},\n label: {},\n labelPosition: {},\n loadingText: {},\n matchStrategy: {},\n modelValue: {},\n modelValueDebounceTime: {},\n multiple: { type: Boolean },\n name: {},\n noDataText: {},\n placeholder: {},\n prefill: { type: [Boolean, String], default: \"focus\" },\n queryDebounceTime: {},\n readonly: {},\n resetQueryOnOptionSelected: { type: Boolean },\n reverse: { type: Boolean },\n stash: { type: Boolean },\n transitionDuration: {},\n updateOnAnimationFrame: { type: Boolean }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"inactive\", \"input\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInactive: () => emit(\"inactive\"),\n onInput: (event: Event) => emit(\"input\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-select\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseSelect, _mergeProps({\n autocomplete: _ctx.autocomplete,\n addOptions: _ctx.addOptions,\n allowWriting: _ctx.allowWriting,\n autofocus: _ctx.autofocus,\n comma: _ctx.comma,\n dependencies: _ctx.dependencies,\n depsDebounceTime: _ctx.depsDebounceTime,\n disabled: _ctx.disabled,\n enforceCoherence: _ctx.enforceCoherence,\n filterBy: _ctx.filterBy,\n hasErrors: hasErrors,\n id: id,\n items: _ctx.items,\n itemText: (_ctx.itemText as any),\n itemValue: (_ctx.itemValue as any),\n loadingText: _ctx.loadingText,\n matchStrategy: _ctx.matchStrategy,\n modelValue: _ctx.modelValue,\n modelValueDebounceTime: _ctx.modelValueDebounceTime,\n multiple: _ctx.multiple,\n name: name,\n noDataText: _ctx.noDataText,\n placeholder: _ctx.placeholder,\n prefill: _ctx.prefill,\n queryDebounceTime: _ctx.queryDebounceTime,\n readonly: _ctx.readonly,\n resetQueryOnOptionSelected: _ctx.resetQueryOnOptionSelected,\n stash: _ctx.stash,\n transitionDuration: _ctx.transitionDuration,\n updateOnAnimationFrame: _ctx.updateOnAnimationFrame\n }, eventListeners), {\n \"append-outer\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"append-outer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n append: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n chevron: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"chevron\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n loading: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"loading\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"no-data\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"no-data\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"option:append\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option:append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"option:prepend\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option:prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n option: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"options:append\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"options:append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"options:prepend\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"options:prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"prepend-outer\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend-outer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n prepend: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n spinner: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"spinner\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n chip: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"chip\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n _: 2\n }, 1040, [\"autocomplete\", \"addOptions\", \"allowWriting\", \"autofocus\", \"comma\", \"dependencies\", \"depsDebounceTime\", \"disabled\", \"enforceCoherence\", \"filterBy\", \"hasErrors\", \"id\", \"items\", \"itemText\", \"itemValue\", \"loadingText\", \"matchStrategy\", \"modelValue\", \"modelValueDebounceTime\", \"multiple\", \"name\", \"noDataText\", \"placeholder\", \"prefill\", \"queryDebounceTime\", \"readonly\", \"resetQueryOnOptionSelected\", \"stash\", \"transitionDuration\", \"updateOnAnimationFrame\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"has-errors\", \"hideLabel\", \"id\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseSelect","_mergeProps"],"mappings":";;;;;AA8RA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,cAAc,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC7C,cAAc,CAAC;AAAA,IAC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