bitboss-ui 2.0.38 → 2.0.40

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 (352) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +14 -31
  2. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +19 -50
  3. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +28 -244
  4. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +100 -0
  5. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +6 -28
  6. package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +5 -15
  7. package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +30 -31
  8. package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +4 -14
  9. package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +4 -14
  10. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +168 -52
  11. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +25 -45
  12. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +10 -35
  13. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +16 -49
  14. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +15 -34
  15. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +28 -247
  16. package/dist/components/BaseRating/BaseRating.vue.d.ts +15 -46
  17. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +348 -59
  18. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +19 -53
  19. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +15 -46
  20. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +32 -244
  21. package/dist/components/BaseTag/BaseTag.vue.d.ts +214 -50
  22. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +15 -44
  23. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +13 -30
  24. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +31 -45
  25. package/dist/components/BbAlert/BbAlert.vue.d.ts +26 -43
  26. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +15 -28
  27. package/dist/components/BbBadge/BbBadge.vue.d.ts +13 -24
  28. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +51 -66
  29. package/dist/components/BbButton/BbButton.vue.d.ts +13 -31
  30. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +30 -65
  31. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +36 -279
  32. package/dist/components/BbChip/BbChip.vue.d.ts +15 -32
  33. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +13 -30
  34. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +124 -0
  35. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +24 -17
  36. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +36 -51
  37. package/dist/components/BbDialog/BbDialog.vue.d.ts +14 -29
  38. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +169 -193
  39. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +190 -209
  40. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +32 -45
  41. package/dist/components/BbIcon/BbIcon.vue.d.ts +2 -24
  42. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +27 -50
  43. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +102 -54
  44. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +26 -48
  45. package/dist/components/BbPagination/BbPagination.vue.d.ts +35 -55
  46. package/dist/components/BbPopover/BbPopover.vue.d.ts +71 -93
  47. package/dist/components/BbProgress/BbProgress.vue.d.ts +2 -27
  48. package/dist/components/BbRadio/BbRadio.vue.d.ts +30 -63
  49. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +38 -281
  50. package/dist/components/BbRating/BbRating.vue.d.ts +23 -56
  51. package/dist/components/BbRatio/BbRatio.vue.d.ts +14 -31
  52. package/dist/components/BbSelect/BbSelect.vue.d.ts +16 -158
  53. package/dist/components/BbSlider/BbSlider.vue.d.ts +23 -54
  54. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +12 -34
  55. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +2 -24
  56. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +30 -63
  57. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +38 -278
  58. package/dist/components/BbTab/BbTab.vue.d.ts +92 -107
  59. package/dist/components/BbTable/BbTable.vue.d.ts +93 -134
  60. package/dist/components/BbTable/types.d.ts +0 -1
  61. package/dist/components/BbTag/BbTag.vue.d.ts +13 -46
  62. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +21 -40
  63. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +21 -40
  64. package/dist/components/BbToast/BbToast.vue.d.ts +3 -24
  65. package/dist/components/BbToast/BbToastMessage.vue.d.ts +5 -27
  66. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +15 -36
  67. package/dist/components/BbTree/BbTree.vue.d.ts +9 -29
  68. package/dist/components/ChipsBox.vue.d.ts +6 -16
  69. package/dist/components/CommaBox.vue.d.ts +6 -16
  70. package/dist/components/CommonFloating.vue.d.ts +14 -26
  71. package/dist/components/CommonInputInnerContainer.vue.d.ts +16 -15
  72. package/dist/components/CommonInputOuterContainer.vue.d.ts +12 -5
  73. package/dist/components/ErrorIcon.vue.d.ts +1 -1
  74. package/dist/components/ListBox.vue.d.ts +30 -47
  75. package/dist/components/OptionsContainer.vue.d.ts +30 -90
  76. package/dist/components/Transitions/Slide.vue.d.ts +12 -30
  77. package/dist/components/Transitions/SlideBack.vue.d.ts +12 -30
  78. package/dist/composables/useArray.d.ts +0 -1
  79. package/dist/composables/useBroadcastChannelInstance.d.ts +2 -2
  80. package/dist/composables/useConfirm.d.ts +0 -1
  81. package/dist/composables/useOptions.d.ts +0 -1
  82. package/dist/composables/useRoute.d.ts +0 -1
  83. package/dist/composables/useRouter.d.ts +0 -1
  84. package/dist/composables/useToast.d.ts +1 -2
  85. package/dist/composables/useWizard.d.ts +1 -2
  86. package/dist/index.d.ts +4 -1
  87. package/dist/index.js +142 -136
  88. package/dist/index100.js +129 -54
  89. package/dist/index102.js +66 -79
  90. package/dist/index104.js +85 -280
  91. package/dist/index106.js +108 -390
  92. package/dist/index108.js +280 -102
  93. package/dist/index11.js +1 -1
  94. package/dist/index110.js +391 -95
  95. package/dist/index112.js +55 -50
  96. package/dist/index114.js +106 -23
  97. package/dist/index116.js +101 -156
  98. package/dist/index118.js +22 -114
  99. package/dist/index12.js +6 -6
  100. package/dist/index120.js +143 -34
  101. package/dist/index122.js +116 -40
  102. package/dist/index124.js +36 -31
  103. package/dist/index125.js +44 -2
  104. package/dist/index126.js +44 -21
  105. package/dist/index127.js +47 -2
  106. package/dist/index128.js +32 -313
  107. package/dist/index129.js +2 -24
  108. package/dist/index13.js +1 -1
  109. package/dist/index130.js +21 -2
  110. package/dist/index131.js +2 -5
  111. package/dist/index132.js +315 -7
  112. package/dist/index133.js +24 -5
  113. package/dist/index134.js +2 -3
  114. package/dist/index135.js +5 -3
  115. package/dist/index136.js +9 -3
  116. package/dist/index137.js +6 -3
  117. package/dist/index138.js +1 -1
  118. package/dist/index139.js +1 -1
  119. package/dist/index140.js +1 -1
  120. package/dist/index141.js +1 -1
  121. package/dist/index142.js +1 -1
  122. package/dist/index143.js +1 -1
  123. package/dist/index144.js +1 -1
  124. package/dist/index145.js +1 -1
  125. package/dist/index146.js +1 -1
  126. package/dist/index147.js +1 -1
  127. package/dist/index148.js +1 -1
  128. package/dist/index149.js +1 -1
  129. package/dist/index15.js +122 -117
  130. package/dist/index150.js +1 -1
  131. package/dist/index151.js +1 -1
  132. package/dist/index152.js +1 -1
  133. package/dist/index153.js +1 -1
  134. package/dist/index154.js +1 -1
  135. package/dist/index155.js +1 -1
  136. package/dist/index156.js +1 -1
  137. package/dist/index157.js +1 -1
  138. package/dist/index158.js +1 -1
  139. package/dist/index159.js +1 -1
  140. package/dist/index160.js +2 -2
  141. package/dist/{index177.js → index161.js} +1 -1
  142. package/dist/index162.js +2 -2
  143. package/dist/{index166.js → index163.js} +1 -1
  144. package/dist/index165.js +2 -2
  145. package/dist/index167.js +2 -2
  146. package/dist/index169.js +1 -1
  147. package/dist/index17.js +119 -118
  148. package/dist/index170.js +2 -2
  149. package/dist/{index168.js → index171.js} +1 -1
  150. package/dist/index172.js +3 -2
  151. package/dist/index173.js +1 -1
  152. package/dist/index174.js +1 -1
  153. package/dist/index175.js +1 -1
  154. package/dist/index176.js +2 -2
  155. package/dist/index178.js +2 -3
  156. package/dist/index179.js +1 -1
  157. package/dist/index180.js +1 -1
  158. package/dist/index181.js +1 -1
  159. package/dist/index182.js +1 -1
  160. package/dist/index183.js +1 -1
  161. package/dist/index184.js +2 -2
  162. package/dist/index185.js +5 -0
  163. package/dist/index186.js +2 -2
  164. package/dist/index187.js +5 -0
  165. package/dist/index19.js +121 -211
  166. package/dist/index190.js +1 -1
  167. package/dist/index192.js +1 -1
  168. package/dist/index194.js +1 -1
  169. package/dist/index195.js +1 -1
  170. package/dist/index196.js +1 -1
  171. package/dist/index197.js +1 -1
  172. package/dist/index198.js +3 -116
  173. package/dist/index199.js +3 -2
  174. package/dist/index200.js +3 -3
  175. package/dist/index201.js +3 -35
  176. package/dist/index202.js +3 -6
  177. package/dist/index203.js +3 -7
  178. package/dist/index204.js +2 -8
  179. package/dist/index205.js +112 -154
  180. package/dist/index206.js +3 -84
  181. package/dist/index207.js +160 -0
  182. package/dist/index208.js +84 -2
  183. package/dist/index21.js +197 -279
  184. package/dist/index210.js +2 -2
  185. package/dist/index211.js +2 -3
  186. package/dist/index212.js +3 -126
  187. package/dist/index213.js +4 -5
  188. package/dist/index214.js +3 -123
  189. package/dist/index215.js +40 -18
  190. package/dist/index216.js +6 -16
  191. package/dist/index217.js +7 -16
  192. package/dist/index218.js +8 -2
  193. package/dist/index219.js +281 -2
  194. package/dist/index220.js +14 -172
  195. package/dist/index221.js +16 -43
  196. package/dist/index222.js +21 -0
  197. package/dist/index223.js +19 -13
  198. package/dist/index224.js +27 -5
  199. package/dist/index225.js +2 -369
  200. package/dist/index226.js +249 -2
  201. package/dist/index227.js +50 -16
  202. package/dist/index228.js +40 -102
  203. package/dist/index229.js +7 -0
  204. package/dist/index23.js +287 -245
  205. package/dist/index230.js +44 -95
  206. package/dist/index231.js +128 -0
  207. package/dist/index232.js +125 -2
  208. package/dist/index233.js +2 -3
  209. package/dist/index234.js +19 -18
  210. package/dist/index235.js +52 -26
  211. package/dist/index237.js +13 -52
  212. package/dist/index238.js +5 -44
  213. package/dist/index239.js +369 -5
  214. package/dist/index240.js +2 -49
  215. package/dist/index241.js +2 -10
  216. package/dist/index242.js +17 -2
  217. package/dist/index243.js +104 -429
  218. package/dist/index245.js +100 -4
  219. package/dist/index247.js +4 -3
  220. package/dist/index248.js +9 -11
  221. package/dist/index249.js +3 -9
  222. package/dist/index25.js +249 -120
  223. package/dist/index250.js +6 -9
  224. package/dist/index251.js +15 -16
  225. package/dist/index252.js +224 -3
  226. package/dist/index253.js +3 -9
  227. package/dist/index254.js +12 -23
  228. package/dist/index255.js +9 -6
  229. package/dist/index256.js +8 -15
  230. package/dist/index257.js +17 -9
  231. package/dist/index258.js +26 -222
  232. package/dist/index259.js +3 -281
  233. package/dist/index260.js +9 -6
  234. package/dist/index261.js +23 -2
  235. package/dist/index262.js +9 -2
  236. package/dist/index263.js +4 -2
  237. package/dist/index264.js +6 -2
  238. package/dist/index265.js +2 -2
  239. package/dist/index266.js +2 -126
  240. package/dist/index267.js +2 -3
  241. package/dist/index268.js +4 -0
  242. package/dist/index269.js +2 -7
  243. package/dist/index27.js +119 -142
  244. package/dist/index270.js +2 -22
  245. package/dist/index271.js +4 -0
  246. package/dist/index272.js +2 -436
  247. package/dist/index273.js +2 -127
  248. package/dist/index274.js +2 -3
  249. package/dist/index275.js +22 -3
  250. package/dist/index277.js +7 -28
  251. package/dist/index278.js +431 -2
  252. package/dist/index279.js +89 -2
  253. package/dist/index280.js +2 -2
  254. package/dist/index281.js +126 -2
  255. package/dist/index282.js +176 -2
  256. package/dist/index283.js +3 -2
  257. package/dist/{index284.js → index285.js} +6 -6
  258. package/dist/index287.js +199 -65
  259. package/dist/index288.js +436 -5
  260. package/dist/index289.js +124 -12
  261. package/dist/index29.js +139 -84
  262. package/dist/index290.js +3 -79
  263. package/dist/{index193.js → index291.js} +1 -1
  264. package/dist/index292.js +211 -4
  265. package/dist/index293.js +66 -4
  266. package/dist/index294.js +2 -59
  267. package/dist/index295.js +4 -11
  268. package/dist/index296.js +4 -35
  269. package/dist/index297.js +57 -45
  270. package/dist/index298.js +5 -7
  271. package/dist/index299.js +4 -18
  272. package/dist/index300.js +7 -6
  273. package/dist/index301.js +79 -2
  274. package/dist/index303.js +6 -0
  275. package/dist/index304.js +6 -420
  276. package/dist/index305.js +18 -46
  277. package/dist/index306.js +7 -2
  278. package/dist/index307.js +37 -0
  279. package/dist/index308.js +13 -0
  280. package/dist/index309.js +49 -0
  281. package/dist/index31.js +85 -115
  282. package/dist/index310.js +4 -0
  283. package/dist/{index302.js → index311.js} +2 -2
  284. package/dist/index313.js +426 -0
  285. package/dist/index314.js +49 -0
  286. package/dist/index315.js +4 -0
  287. package/dist/index33.js +111 -113
  288. package/dist/index35.js +114 -366
  289. package/dist/index37.js +361 -284
  290. package/dist/index39.js +288 -107
  291. package/dist/index41.js +114 -121
  292. package/dist/index43.js +113 -201
  293. package/dist/index45.js +182 -92
  294. package/dist/index47.js +110 -78
  295. package/dist/index49.js +89 -54
  296. package/dist/index51.js +54 -78
  297. package/dist/index53.js +83 -61
  298. package/dist/index55.js +59 -40
  299. package/dist/index57.js +42 -55
  300. package/dist/index59.js +53 -106
  301. package/dist/index6.js +1 -1
  302. package/dist/index61.js +104 -89
  303. package/dist/index63.js +61 -88
  304. package/dist/index65.js +119 -77
  305. package/dist/index67.js +56 -45
  306. package/dist/index69.js +79 -54
  307. package/dist/index7.js +2 -2
  308. package/dist/index71.js +88 -268
  309. package/dist/index73.js +49 -148
  310. package/dist/index75.js +259 -204
  311. package/dist/index77.js +152 -39
  312. package/dist/index79.js +224 -0
  313. package/dist/index8.js +6 -14
  314. package/dist/index81.js +46 -0
  315. package/dist/index82.js +116 -166
  316. package/dist/index84.js +222 -171
  317. package/dist/index86.js +171 -25
  318. package/dist/index88.js +177 -84
  319. package/dist/index9.js +1 -1
  320. package/dist/index90.js +27 -123
  321. package/dist/index92.js +47 -51
  322. package/dist/index94.js +120 -15
  323. package/dist/index96.js +55 -132
  324. package/dist/index98.js +15 -105
  325. package/dist/style.css +1 -1
  326. package/dist/types/CommonProps.d.ts +0 -1
  327. package/dist/types/ExtractGenericFromComputedRef.d.ts +0 -1
  328. package/dist/types/ExtractGenericFromRef.d.ts +0 -1
  329. package/dist/utilities/functions/booleanishToBoolean.d.ts +1 -1
  330. package/dist/utilities/functions/deburr.d.ts +1 -1
  331. package/dist/utilities/functions/flattenTree.d.ts +1 -1
  332. package/dist/utilities/functions/groupBy.d.ts +1 -1
  333. package/dist/utilities/functions/indexBy.d.ts +1 -1
  334. package/dist/utilities/functions/isHex.d.ts +1 -0
  335. package/dist/utilities/functions/mapValues.d.ts +1 -1
  336. package/dist/utilities/functions/millisecondsTo.d.ts +1 -1
  337. package/dist/utilities/functions/replace.d.ts +1 -1
  338. package/dist/utilities/functions/retry.d.ts +1 -1
  339. package/dist/utilities/functions/throttle.d.ts +2 -2
  340. package/dist/utilities/functions/tryTo.d.ts +0 -1
  341. package/package.json +29 -29
  342. package/dist/index121.js +0 -46
  343. package/dist/index123.js +0 -49
  344. package/dist/index191.js +0 -5
  345. package/dist/index209.js +0 -6
  346. package/dist/index236.js +0 -251
  347. package/dist/index244.js +0 -91
  348. package/dist/index246.js +0 -202
  349. package/dist/index276.js +0 -213
  350. package/dist/index286.js +0 -4
  351. package/dist/index78.js +0 -129
  352. package/dist/index80.js +0 -238
package/dist/index35.js CHANGED
@@ -1,384 +1,132 @@
1
- import { defineComponent as Me, defineAsyncComponent as Ne, ref as m, computed as y, toRef as I, openBlock as b, createBlock as $, normalizeClass as W, withCtx as r, renderSlot as p, unref as s, createVNode as F, createElementVNode as S, createElementBlock as M, Fragment as R, createCommentVNode as J, withDirectives as xe, isRef as He, withModifiers as c, withKeys as g, vModelDynamic as Pe, renderList as _e, mergeProps as Y, Teleport as ze, normalizeStyle as Qe, nextTick as Ke } from "vue";
2
- /* empty css */
3
- /* empty css */
4
- import { useId as Ue } from "./index8.js";
5
- import { useMobile as We } from "./index9.js";
6
- import Re from "./index123.js";
7
- /* empty css */
8
- import { isNotNil as Je } from "./index130.js";
9
- import { last as Ye } from "./index219.js";
10
- import { matchAnyKey as j } from "./index227.js";
11
- import { useFloating as je } from "./index212.js";
12
- import { useIntersectionObserver as Ge } from "./index128.js";
13
- import { useLogger as Xe } from "./index204.js";
14
- import { useOptions as Ze } from "./index205.js";
15
- import { wait as T } from "./index127.js";
16
- import { when as et } from "./index209.js";
17
- import tt from "./index228.js";
18
- /* empty css */
19
- import ot from "./index230.js";
20
- /* empty css */
21
- import nt from "./index221.js";
22
- /* empty css */
23
- import lt from "./index223.js";
24
- import { waitFor as at } from "./index202.js";
25
- import { autoUpdate as it, flip as rt, offset as st, shift as ut } from "./index225.js";
26
- const pt = { class: "bb-base-select__input-container" }, ct = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], dt = /* @__PURE__ */ S("svg", {
27
- class: "bb-base-select__chevron",
28
- viewBox: "0 0 24 24",
29
- xmlns: "http://www.w3.org/2000/svg"
30
- }, [
31
- /* @__PURE__ */ S("path", {
32
- d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
33
- fill: "currentColor"
34
- })
35
- ], -1), xt = /* @__PURE__ */ Me({
36
- __name: "BaseSelect",
1
+ import { defineComponent as C, ref as g, computed as f, openBlock as l, createElementBlock as i, mergeProps as h, createElementVNode as r, renderSlot as p, Fragment as I, renderList as V, normalizeClass as B, toDisplayString as M } from "vue";
2
+ import { booleanishToBoolean as D } from "./index240.js";
3
+ import { identity as F } from "./index233.js";
4
+ import { isCssColor as v } from "./index211.js";
5
+ import { isNotNil as T } from "./index134.js";
6
+ const $ = { class: "bb-base-rating__inner-container" }, q = { class: "bb-base-rating__label-text sr-only" }, x = ["id", "aria-describedby", "autofocus", "checked", "disabled", "name", "required", "value"], H = ["height", "width"], J = /* @__PURE__ */ C({
7
+ __name: "BaseRating",
37
8
  props: {
38
- addOptions: { type: Boolean },
39
- allowWriting: { type: [Boolean, String], default: !0 },
40
- "append:icon": {},
41
9
  ariaDescribedby: {},
42
- autocomplete: {},
43
10
  autofocus: {},
44
- comma: { type: Boolean },
45
- dependencies: { default: () => [] },
46
- depsDebounceTime: { default: 0 },
11
+ color: {},
47
12
  disabled: { type: Boolean },
48
- enforceCoherence: { type: Boolean },
49
- filterBy: { type: [String, Array, Boolean, Function, null], default: () => [] },
50
13
  hasErrors: { type: Boolean },
51
14
  id: {},
52
- items: {},
53
- itemText: {},
54
- itemValue: {},
55
- loading: { type: Boolean },
56
- loadingText: { default: "Caricamento..." },
57
15
  modelValue: {},
58
- modelValueDebounceTime: { default: 0 },
59
- multiple: { type: Boolean },
60
16
  name: {},
61
- noDataText: { default: "Nessun elemento da visualizzare" },
62
- placeholder: {},
63
- prefill: { type: [Boolean, String], default: "focus" },
64
- "prepend:icon": {},
65
- queryDebounceTime: { default: 500 },
66
- readonly: { type: Boolean },
17
+ readonly: {},
67
18
  required: { type: Boolean },
68
- resetQueryOnOptionSelected: { type: Boolean },
69
- stash: { type: Boolean },
70
- transitionDuration: { default: 300 },
71
- updateOnAnimationFrame: { type: Boolean, default: !1 }
19
+ stars: { default: 5 },
20
+ size: {}
72
21
  },
73
- emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
74
- setup(G, { emit: X }) {
75
- const t = G, h = X;
76
- if (t.multiple && !Array.isArray(t.modelValue))
77
- throw new Error('Multiple is set to "true" but modelValue is not an array.');
78
- const Z = Ne(() => import("./index226.js")), A = m(null), B = m(null), a = m(null), N = m(null), x = m(null), u = y(
79
- () => t.comma ? N.value : x.value
80
- ), { isMobile: ee } = We(), te = y(
81
- () => t.allowWriting === "not-mobile" && ee.value ? "none" : void 0
82
- ), H = t.id || Ue().id.value;
83
- Ge(
84
- B,
85
- ([{ intersectionRatio: e }]) => {
86
- e !== 1 && O();
22
+ emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
23
+ setup(k, { emit: y }) {
24
+ const a = k, n = y, u = g(), o = g(!1), _ = {
25
+ onBlur: (e) => n("blur", e),
26
+ onChange: (e) => {
27
+ n("change", e), e.target instanceof HTMLInputElement && e.target.checked && n("update:modelValue", +e.target.value);
87
28
  },
88
- { threshold: [0, 1] }
89
- );
90
- const { floatingStyles: oe } = je(
91
- B,
92
- a,
93
- {
94
- placement: "bottom",
95
- whileElementsMounted: it,
96
- middleware: [rt(), st(5), ut()]
97
- }
98
- ), ne = y(() => {
99
- var o;
100
- const e = {
101
- ...oe.value,
102
- zIndex: "10"
103
- };
104
- return B.value && (e.width = `${(o = B.value) == null ? void 0 : o.$el.clientWidth}px`), e;
105
- }), q = m(null), E = () => {
106
- q.value instanceof HTMLInputElement && q.value.focus();
107
- }, le = async (e) => {
108
- h("focus", e), Ae(), document.addEventListener("click", k), document.addEventListener("focusin", k);
109
- }, ae = () => {
110
- t.prefill === "focus" && !Oe.value && !Ce.value && Be();
111
- }, ie = async (e) => {
112
- h("blur", e);
113
- }, re = (e) => h("change", e), se = (e) => {
114
- var o;
115
- h("input", e), l.value === "" && (t.multiple || ke(null)), (o = u.value) == null || o.blur(), Ie();
116
- }, k = async (e) => {
117
- if (e.target instanceof Node && A.value && a.value && !A.value.$el.contains(e.target) && !a.value.$el.contains(e.target)) {
118
- O(), qe(), document.removeEventListener("click", k), document.removeEventListener("focusin", k), await T(t.transitionDuration), he();
119
- return;
120
- }
121
- }, w = y(() => !(t.readonly || t.disabled || D.value || !u.value && t.multiple)), ue = async () => {
122
- var e, o, n;
123
- w.value && ((e = u.value) == null || e.blur(), d.value ? (o = a.value) == null || o.focusPrevious() : (await V(), await T(t.transitionDuration), (n = a.value) == null || n.focusLastSelected()));
124
- }, pe = async () => {
125
- var e, o, n;
126
- w.value && ((e = u.value) == null || e.blur(), d.value ? (o = a.value) == null || o.focusNext() : (await V(), await T(t.transitionDuration), (n = a.value) == null || n.focusFirstSelected()));
127
- }, ce = (e) => {
128
- var n, i, f, C;
129
- if (!w.value || !t.multiple || l.value || (e.preventDefault(), (n = a.value) == null || n.blur(), !v.value.length)) return;
130
- (i = u.value) == null || i.focusPrevious();
131
- const o = (f = u.value) == null ? void 0 : f.getHighlighted();
132
- o && ((C = a.value) == null || C.focusByHash(o.valueHash));
133
- }, de = (e) => {
134
- var n, i, f, C;
135
- if (!w.value || !t.multiple || l.value || (e.preventDefault(), (n = a.value) == null || n.blur(), !v.value.length)) return;
136
- (i = u.value) == null || i.focusNext();
137
- const o = (f = u.value) == null ? void 0 : f.getHighlighted();
138
- o && ((C = a.value) == null || C.focusByHash(o.valueHash));
139
- }, fe = async () => {
140
- var e, o;
141
- if (w.value) {
142
- if (!d.value)
143
- await V(), await T(t.transitionDuration), v.value.length && ((e = a.value) == null || e.focusFirstSelected());
144
- else if ((o = a.value) != null && o.getHighlighted())
145
- a.value.confirmOption();
146
- else if (t.addOptions) {
147
- if (t.itemText || t.itemValue) {
148
- const { error: i } = Xe();
149
- i(
150
- `Adding an option for mapped items is not supported. You can't create an option while passing "item-text" or "item-value".`
151
- );
152
- return;
153
- }
154
- const n = l.value.trim();
155
- if (De(n)) return;
156
- be(), z(Ye(Ve.value));
157
- }
158
- }
159
- }, me = async () => {
160
- d.value && await O();
161
- }, ve = async () => {
162
- var e, o;
163
- !w.value || l.value || !v.value.length || ((e = u.value) != null && e.getHighlighted() && u.value.confirmOption(), await Ke(), (o = u.value) == null || o.focusPrevious());
164
- }, ye = t.prefill === !0 || !t.multiple && Je(t.modelValue) || t.multiple && !!t.modelValue.length, {
165
- query: l,
166
- alignQueryToState: he,
167
- addCurrentQueryToManualItems: be,
168
- innerLoading: P,
169
- options: _,
170
- selectedOptions: v,
171
- selectOption: ge,
172
- unselectOption: we,
173
- prefillItems: Be,
174
- isPrefilling: Oe,
175
- hasPrefilled: Ce,
176
- updateModelValue: ke,
177
- valueIsSelected: De,
178
- manualItems: Ve,
179
- searchByQuery: Ie
180
- } = Ze({
181
- emit: h,
182
- itemText: t.itemText,
183
- itemValue: t.itemValue,
184
- modelValue: I(t, "modelValue"),
185
- multiple: t.multiple,
186
- resetQueryOnOptionSelected: t.resetQueryOnOptionSelected,
187
- stash: t.stash,
188
- items: I(t, "items"),
189
- enforceCoherence: t.enforceCoherence,
190
- prefill: ye,
191
- modelValueDebounceTime: t.modelValueDebounceTime,
192
- dependencies: I(t, "dependencies"),
193
- depsDebounceTime: t.depsDebounceTime,
194
- queryDebounceTime: t.queryDebounceTime,
195
- disabled: I(t, "disabled")
196
- }), $e = y(() => v.value.length ? "" : t.placeholder), D = y(() => !!(P.value || t.loading)), Te = y(() => {
197
- let e = [];
198
- const o = v.value.some(
199
- (i) => i.text === l.value
200
- );
201
- return (t.multiple && l.value || l.value && !o && !t.multiple) && t.filterBy ? e = _.value.filter((i) => {
202
- let f = !1;
203
- 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());
204
- }) : e = _.value, e;
205
- }), z = (e) => {
206
- ge(e), E(), t.multiple || O();
207
- }, Q = (e) => {
208
- we(e), E();
209
- }, d = m(!1), K = m(!0), U = m(!1), V = async () => {
210
- U.value = !0, await at(() => !!a.value), K.value = !1, d.value = !0;
211
- }, O = async () => {
212
- var e;
213
- d.value = !1, K.value = !0, (e = u.value) == null || e.blur();
214
- }, Se = () => d.value ? O() : V(), L = m(!1), Ae = () => {
215
- L.value = !0;
216
- }, qe = () => {
217
- L.value = !1, h("inactive");
218
- }, Ee = (e) => {
219
- e.preventDefault(), h("click", e), !(t.disabled || t.readonly) && (E(), Se());
220
- }, Le = et(
221
- (e) => typeof e != "string",
222
- JSON.stringify
223
- ), Fe = y(() => [].concat(t.modelValue).map((e) => {
224
- const o = Le(e);
29
+ onClick: (e) => {
30
+ n("click", e), e.target instanceof HTMLInputElement && e.target.checked && +e.target.value === a.modelValue && n("update:modelValue", null);
31
+ },
32
+ onFocus: (e) => {
33
+ n("focus", e), o.value || (document.addEventListener("focusin", c, { passive: !0 }), document.addEventListener("click", d, { passive: !0 }), o.value = !0);
34
+ },
35
+ onInput: (e) => n("input", e),
36
+ onKeydown: (e) => n("keydown", e),
37
+ onMousedown: (e) => n("mousedown", e),
38
+ onMouseup: (e) => n("mouseup", e)
39
+ }, c = (e) => {
40
+ var t;
41
+ e.target instanceof HTMLElement && ((t = u.value) != null && t.contains(e.target) || (n("inactive"), o.value = !1, document.removeEventListener("focusin", c), document.removeEventListener("click", d)));
42
+ }, d = (e) => {
43
+ var t;
44
+ e.target instanceof HTMLElement && ((t = u.value) != null && t.contains(e.target) || (n("inactive"), o.value = !1, document.removeEventListener("focusin", c), document.removeEventListener("click", d)));
45
+ }, z = {
46
+ xs: 12,
47
+ sm: 16,
48
+ md: 24,
49
+ lg: 28,
50
+ xl: 36,
51
+ xxl: 40
52
+ }, m = f(() => {
53
+ let e;
54
+ return typeof a.size == "string" ? e = z[a.size] ?? parseInt(a.size, 10) : e = a.size, e;
55
+ }), w = f(() => new Array(a.stars).fill(0).map((e, t) => t + 1).map((e) => {
56
+ const t = a.id ? [a.id, e].filter(F).join("_") : void 0, s = e === a.modelValue, b = !!(a.modelValue && e <= a.modelValue), L = !!(a.disabled || T(a.readonly) && D(a.readonly));
225
57
  return {
226
- disabled: t.disabled,
227
- name: t.name,
228
- type: "hidden",
229
- value: o
58
+ checked: s,
59
+ disabled: L,
60
+ highlighted: b,
61
+ id: t,
62
+ name: a.name,
63
+ size: m.value,
64
+ value: e
65
+ };
66
+ })), E = f(() => {
67
+ let e = {};
68
+ return a.color && v(a.color) && (e["--color"] = a.color), m.value && (e["--size"] = `${m.value}px`), {
69
+ class: {
70
+ "bb-base-rating": !0,
71
+ "bb-base-rating--has-value": a.modelValue,
72
+ "bb-base-rating--disabled": a.disabled,
73
+ "bb-base-rating--errors": a.hasErrors,
74
+ "bb-base-rating--readonly": a.readonly,
75
+ [`bb-base-rating--${a.color}`]: a.color && !v(a.color)
76
+ },
77
+ style: e
230
78
  };
231
- }));
232
- return (e, o) => (b(), $(lt, {
233
- ref_key: "outerContainer",
234
- ref: A,
235
- class: W({
236
- "bb-base-select": !0,
237
- "bb-base-select--active": L.value,
238
- "bb-base-select--shown": d.value,
239
- "bb-base-select--loading": D.value,
240
- "bb-base-select--disabled": e.disabled,
241
- "bb-base-select--errors": e.hasErrors,
242
- "bb-base-select--readonly": e.readonly
243
- }),
244
- onClick: Ee
245
- }, {
246
- "prepend-outer": r(() => [
247
- p(e.$slots, "prepend-outer", { query: s(l) })
248
- ]),
249
- "append-outer": r(() => [
250
- p(e.$slots, "append-outer", { query: s(l) })
251
- ]),
252
- default: r(() => [
253
- F(nt, {
254
- ref_key: "innerContainer",
255
- ref: B,
256
- "append:icon": t["append:icon"],
257
- "prepend:icon": t["prepend:icon"]
258
- }, {
259
- prepend: r(() => [
260
- p(e.$slots, "prepend", { query: s(l) })
261
- ]),
262
- prefix: r(() => [
263
- p(e.$slots, "prefix")
264
- ]),
265
- append: r(() => [
266
- p(e.$slots, "append", { query: s(l) })
267
- ]),
268
- suffix: r(() => [
269
- p(e.$slots, "suffix")
270
- ]),
271
- default: r(() => [
272
- F(s(Re), { tag: "span" }, {
273
- default: r(() => [
274
- S("span", pt, [
275
- e.multiple ? (b(), M(R, { key: 0 }, [
276
- e.comma ? (b(), $(ot, {
277
- key: 0,
278
- ref_key: "commaBox",
279
- ref: N,
280
- options: s(v)
281
- }, null, 8, ["options"])) : (b(), $(tt, {
282
- key: 1,
283
- ref_key: "chipsBox",
284
- ref: x,
285
- options: s(v),
286
- "onOption:unselected": Q
287
- }, null, 8, ["options"]))
288
- ], 64)) : J("", !0),
289
- xe(S("input", {
290
- id: s(H),
291
- ref_key: "input",
292
- ref: q,
293
- "onUpdate:modelValue": o[0] || (o[0] = (n) => He(l) ? l.value = n : null),
294
- "aria-autocomplete": "list",
295
- "aria-controls": `${s(H)}_listbox`,
296
- "aria-describedby": e.ariaDescribedby,
297
- "aria-expanded": d.value,
298
- autocomplete: e.autocomplete,
299
- autofocus: e.autofocus,
300
- class: W("bb-base-select__text-input"),
301
- disabled: e.disabled,
302
- inputmode: te.value,
303
- placeholder: $e.value,
304
- readonly: e.readonly || !e.allowWriting,
305
- required: e.required && !e.multiple || e.multiple && !e.modelValue.length,
306
- role: "combobox",
307
- type: "text",
308
- onBlur: c(ie, ["stop"]),
309
- onChange: c(re, ["stop"]),
310
- onFocusOnce: c(ae, ["stop"]),
311
- onFocus: c(le, ["stop"]),
312
- onInput: c(se, ["stop"]),
313
- onKeydown: [
314
- g(c(ve, ["stop"]), ["delete"]),
315
- g(c(ce, ["stop"]), ["left"]),
316
- g(c(pe, ["stop", "prevent"]), ["down"]),
317
- g(c(fe, ["stop", "prevent"]), ["enter"]),
318
- g(c(me, ["stop", "prevent"]), ["esc"]),
319
- g(c(ue, ["stop", "prevent"]), ["up"]),
320
- g(c(de, ["stop"]), ["right"])
321
- ]
322
- }, null, 40, ct), [
323
- [Pe, s(l)]
324
- ])
325
- ])
326
- ]),
327
- _: 1
328
- }),
329
- p(e.$slots, "chevron", {
330
- loading: !!s(P),
331
- shown: d.value
332
- }, () => [
333
- dt
334
- ])
335
- ]),
336
- _: 3
337
- }, 8, ["append:icon", "prepend:icon"]),
338
- (b(!0), M(R, null, _e(Fe.value, (n) => (b(), M("input", Y({
339
- key: n.value,
340
- ref_for: !0
341
- }, n), null, 16))), 128)),
342
- U.value ? (b(), $(ze, {
343
- key: 0,
344
- to: "body"
79
+ });
80
+ return (e, t) => (l(), i("span", h(E.value, {
81
+ ref_key: "container",
82
+ ref: u
83
+ }), [
84
+ r("span", $, [
85
+ p(e.$slots, "prepend"),
86
+ (l(!0), i(I, null, V(w.value, (s, b) => (l(), i("label", {
87
+ key: s.value,
88
+ class: B(["bb-base-rating__option", { "bb-base-rating__option--highlighted": s.highlighted }])
345
89
  }, [
346
- F(s(Z), {
347
- ref_key: "optionsContainer",
348
- ref: a,
349
- loading: D.value,
350
- open: d.value,
351
- options: Te.value,
352
- style: Qe(ne.value),
353
- "onOption:selected": z,
354
- "onOption:unselected": Q
355
- }, {
356
- "options:prepend": r(() => [
357
- p(e.$slots, "options:prepend")
358
- ]),
359
- loading: r(() => [
360
- p(e.$slots, "loading", { query: s(l) })
361
- ]),
362
- "no-data": r(() => [
363
- p(e.$slots, "no-data", { query: s(l) })
364
- ]),
365
- "options:append": r(() => [
366
- p(e.$slots, "options:append")
367
- ]),
368
- option: r((n) => [
369
- p(e.$slots, "option", Y({
370
- hasErrors: e.hasErrors,
371
- loading: D.value
372
- }, n))
373
- ]),
374
- _: 3
375
- }, 8, ["loading", "open", "options", "style"])
376
- ])) : J("", !0)
377
- ]),
378
- _: 3
379
- }, 8, ["class"]));
90
+ r("span", q, M(s.value), 1),
91
+ r("input", h({
92
+ id: s.id,
93
+ "aria-describedby": e.ariaDescribedby,
94
+ autofocus: e.autofocus && !b,
95
+ checked: s.checked,
96
+ class: "sr-only",
97
+ disabled: s.disabled,
98
+ name: s.name,
99
+ required: e.required,
100
+ type: "radio",
101
+ value: s.value,
102
+ ref_for: !0
103
+ }, _), null, 16, x),
104
+ p(e.$slots, "icon", {
105
+ id: s.id,
106
+ checked: s.checked,
107
+ disabled: s.disabled,
108
+ size: s.size,
109
+ value: s.value
110
+ }, () => [
111
+ (l(), i("svg", {
112
+ height: s.size,
113
+ viewBox: "0 0 24 24",
114
+ width: s.size,
115
+ xmlns: "http://www.w3.org/2000/svg"
116
+ }, t[0] || (t[0] = [
117
+ r("path", {
118
+ d: "m8.243 7.34l-6.38.925l-.113.023a1 1 0 0 0-.44 1.684l4.622 4.499l-1.09 6.355l-.013.11a1 1 0 0 0 1.464.944l5.706-3l5.693 3l.1.046a1 1 0 0 0 1.352-1.1l-1.091-6.355l4.624-4.5l.078-.085a1 1 0 0 0-.633-1.62l-6.38-.926l-2.852-5.78a1 1 0 0 0-1.794 0L8.243 7.34z",
119
+ "stroke-linecap": "round",
120
+ "stroke-linejoin": "round"
121
+ }, null, -1)
122
+ ]), 8, H))
123
+ ])
124
+ ], 2))), 128)),
125
+ p(e.$slots, "append")
126
+ ])
127
+ ], 16));
380
128
  }
381
129
  });
382
130
  export {
383
- xt as default
131
+ J as default
384
132
  };