bitboss-ui 0.2.38 → 0.2.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 (451) hide show
  1. package/dist/components/BbButton/BbButton.vue.d.ts +95 -0
  2. package/dist/index.d.ts +125 -0
  3. package/dist/index10.js +1 -4
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js +1 -4
  6. package/dist/index100.js.map +1 -1
  7. package/dist/index101.js +2 -2
  8. package/dist/index101.js.map +1 -1
  9. package/dist/index102.js +1 -4
  10. package/dist/index102.js.map +1 -1
  11. package/dist/index103.js +2 -2
  12. package/dist/index103.js.map +1 -1
  13. package/dist/index104.js +1 -4
  14. package/dist/index104.js.map +1 -1
  15. package/dist/index105.js.map +1 -1
  16. package/dist/index106.js +1 -4
  17. package/dist/index106.js.map +1 -1
  18. package/dist/index107.js.map +1 -1
  19. package/dist/index108.js +1 -4
  20. package/dist/index108.js.map +1 -1
  21. package/dist/index109.js +1 -1
  22. package/dist/index109.js.map +1 -1
  23. package/dist/index11.js +2 -2
  24. package/dist/index11.js.map +1 -1
  25. package/dist/index110.js +1 -4
  26. package/dist/index110.js.map +1 -1
  27. package/dist/index111.js +3 -3
  28. package/dist/index111.js.map +1 -1
  29. package/dist/index112.js +1 -4
  30. package/dist/index112.js.map +1 -1
  31. package/dist/index113.js +1 -1
  32. package/dist/index113.js.map +1 -1
  33. package/dist/index114.js +1 -4
  34. package/dist/index114.js.map +1 -1
  35. package/dist/index115.js.map +1 -1
  36. package/dist/index116.js +1 -1
  37. package/dist/index116.js.map +1 -1
  38. package/dist/index117.js +1 -1
  39. package/dist/index117.js.map +1 -1
  40. package/dist/index118.js +1 -1
  41. package/dist/index118.js.map +1 -1
  42. package/dist/index119.js +1 -1
  43. package/dist/index119.js.map +1 -1
  44. package/dist/index12.js +1 -4
  45. package/dist/index12.js.map +1 -1
  46. package/dist/index125.js +1 -1
  47. package/dist/index126.js +1 -1
  48. package/dist/index127.js +1 -1
  49. package/dist/index13.js.map +1 -1
  50. package/dist/index131.js +2 -2
  51. package/dist/index131.js.map +1 -1
  52. package/dist/index14.js +1 -4
  53. package/dist/index14.js.map +1 -1
  54. package/dist/index15.js +8 -8
  55. package/dist/index15.js.map +1 -1
  56. package/dist/index158.js +1 -4
  57. package/dist/index158.js.map +1 -1
  58. package/dist/index16.js +1 -4
  59. package/dist/index16.js.map +1 -1
  60. package/dist/index160.js +1 -4
  61. package/dist/index160.js.map +1 -1
  62. package/dist/index169.js +1 -4
  63. package/dist/index169.js.map +1 -1
  64. package/dist/index17.js +9 -9
  65. package/dist/index17.js.map +1 -1
  66. package/dist/index18.js +1 -4
  67. package/dist/index18.js.map +1 -1
  68. package/dist/index183.js +1 -4
  69. package/dist/index183.js.map +1 -1
  70. package/dist/index185.js +1 -4
  71. package/dist/index185.js.map +1 -1
  72. package/dist/index19.js +3 -3
  73. package/dist/index19.js.map +1 -1
  74. package/dist/index197.js +10 -2
  75. package/dist/index197.js.map +1 -1
  76. package/dist/index198.js +5 -4
  77. package/dist/index198.js.map +1 -1
  78. package/dist/index199.js +16 -235
  79. package/dist/index199.js.map +1 -1
  80. package/dist/index20.js +1 -4
  81. package/dist/index20.js.map +1 -1
  82. package/dist/index200.js +16 -3
  83. package/dist/index200.js.map +1 -1
  84. package/dist/index201.js +19 -35
  85. package/dist/index201.js.map +1 -1
  86. package/dist/index202.js +20 -6
  87. package/dist/index202.js.map +1 -1
  88. package/dist/index203.js +29 -5
  89. package/dist/index203.js.map +1 -1
  90. package/dist/index204.js +8 -16
  91. package/dist/index204.js.map +1 -1
  92. package/dist/index205.js +2 -16
  93. package/dist/index205.js.map +1 -1
  94. package/dist/index206.js +234 -18
  95. package/dist/index206.js.map +1 -1
  96. package/dist/index207.js +3 -20
  97. package/dist/index207.js.map +1 -1
  98. package/dist/index208.js +34 -28
  99. package/dist/index208.js.map +1 -1
  100. package/dist/index209.js +6 -8
  101. package/dist/index209.js.map +1 -1
  102. package/dist/index21.js +2 -2
  103. package/dist/index21.js.map +1 -1
  104. package/dist/index210.js +2 -2
  105. package/dist/index210.js.map +1 -1
  106. package/dist/index211.js +4 -10
  107. package/dist/index211.js.map +1 -1
  108. package/dist/index212.js +368 -3
  109. package/dist/index212.js.map +1 -1
  110. package/dist/index213.js +134 -3
  111. package/dist/index213.js.map +1 -1
  112. package/dist/index214.js +2 -368
  113. package/dist/index214.js.map +1 -1
  114. package/dist/index215.js +170 -130
  115. package/dist/index215.js.map +1 -1
  116. package/dist/index216.js +23 -2
  117. package/dist/index216.js.map +1 -1
  118. package/dist/index217.js +363 -164
  119. package/dist/index217.js.map +1 -1
  120. package/dist/index218.js +2 -23
  121. package/dist/index218.js.map +1 -1
  122. package/dist/index219.js +3 -373
  123. package/dist/index219.js.map +1 -1
  124. package/dist/index22.js +1 -4
  125. package/dist/index22.js.map +1 -1
  126. package/dist/index220.js +3 -2
  127. package/dist/index220.js.map +1 -1
  128. package/dist/index223.js +4 -4
  129. package/dist/index223.js.map +1 -1
  130. package/dist/index224.js +6 -28
  131. package/dist/index224.js.map +1 -1
  132. package/dist/index226.js +2 -2
  133. package/dist/index226.js.map +1 -1
  134. package/dist/index227.js +2 -4
  135. package/dist/index227.js.map +1 -1
  136. package/dist/index228.js +160 -2
  137. package/dist/index228.js.map +1 -1
  138. package/dist/index229.js +1 -437
  139. package/dist/index229.js.map +1 -1
  140. package/dist/index23.js.map +1 -1
  141. package/dist/index230.js +68 -88
  142. package/dist/index230.js.map +1 -1
  143. package/dist/index231.js +5 -69
  144. package/dist/index231.js.map +1 -1
  145. package/dist/index232.js +294 -159
  146. package/dist/index232.js.map +1 -1
  147. package/dist/index233.js +6 -2
  148. package/dist/index233.js.map +1 -1
  149. package/dist/index234.js +2 -200
  150. package/dist/index234.js.map +1 -1
  151. package/dist/index235.js +2 -5
  152. package/dist/index235.js.map +1 -1
  153. package/dist/index236.js +2 -295
  154. package/dist/index236.js.map +1 -1
  155. package/dist/index237.js +2 -6
  156. package/dist/index237.js.map +1 -1
  157. package/dist/index238.js +2 -2
  158. package/dist/index24.js +1 -4
  159. package/dist/index24.js.map +1 -1
  160. package/dist/index240.js +4 -2
  161. package/dist/index240.js.map +1 -1
  162. package/dist/index241.js +15 -2
  163. package/dist/index241.js.map +1 -1
  164. package/dist/index242.js +435 -2
  165. package/dist/index242.js.map +1 -1
  166. package/dist/index243.js +89 -2
  167. package/dist/index243.js.map +1 -1
  168. package/dist/index244.js +200 -2
  169. package/dist/index244.js.map +1 -1
  170. package/dist/index245.js +2 -224
  171. package/dist/index245.js.map +1 -1
  172. package/dist/index246.js +105 -246
  173. package/dist/index246.js.map +1 -1
  174. package/dist/index247.js +106 -2
  175. package/dist/index247.js.map +1 -1
  176. package/dist/index248.js +218 -111
  177. package/dist/index248.js.map +1 -1
  178. package/dist/index249.js +246 -94
  179. package/dist/index249.js.map +1 -1
  180. package/dist/index25.js +2 -2
  181. package/dist/index25.js.map +1 -1
  182. package/dist/index250.js +2 -38
  183. package/dist/index250.js.map +1 -1
  184. package/dist/index251.js +4 -2
  185. package/dist/index251.js.map +1 -1
  186. package/dist/index252.js +4 -2
  187. package/dist/index252.js.map +1 -1
  188. package/dist/index253.js +60 -14
  189. package/dist/index253.js.map +1 -1
  190. package/dist/index254.js +3 -2
  191. package/dist/index254.js.map +1 -1
  192. package/dist/index255.js +2 -3
  193. package/dist/index255.js.map +1 -1
  194. package/dist/index26.js +1 -4
  195. package/dist/index26.js.map +1 -1
  196. package/dist/index27.js.map +1 -1
  197. package/dist/index28.js +1 -4
  198. package/dist/index28.js.map +1 -1
  199. package/dist/index29.js +2 -2
  200. package/dist/index29.js.map +1 -1
  201. package/dist/index30.js +1 -4
  202. package/dist/index30.js.map +1 -1
  203. package/dist/index31.js +6 -6
  204. package/dist/index31.js.map +1 -1
  205. package/dist/index32.js +1 -4
  206. package/dist/index32.js.map +1 -1
  207. package/dist/index33.js +1 -1
  208. package/dist/index33.js.map +1 -1
  209. package/dist/index34.js +1 -4
  210. package/dist/index34.js.map +1 -1
  211. package/dist/index35.js +2 -2
  212. package/dist/index35.js.map +1 -1
  213. package/dist/index36.js +1 -4
  214. package/dist/index36.js.map +1 -1
  215. package/dist/index37.js.map +1 -1
  216. package/dist/index38.js +1 -4
  217. package/dist/index38.js.map +1 -1
  218. package/dist/index39.js.map +1 -1
  219. package/dist/index40.js +1 -4
  220. package/dist/index40.js.map +1 -1
  221. package/dist/index41.js.map +1 -1
  222. package/dist/index42.js +1 -4
  223. package/dist/index42.js.map +1 -1
  224. package/dist/index43.js.map +1 -1
  225. package/dist/index44.js +1 -4
  226. package/dist/index44.js.map +1 -1
  227. package/dist/index45.js.map +1 -1
  228. package/dist/index46.js +1 -4
  229. package/dist/index46.js.map +1 -1
  230. package/dist/index47.js +1 -1
  231. package/dist/index47.js.map +1 -1
  232. package/dist/index48.js +1 -4
  233. package/dist/index48.js.map +1 -1
  234. package/dist/index49.js +1 -1
  235. package/dist/index49.js.map +1 -1
  236. package/dist/index50.js +1 -4
  237. package/dist/index50.js.map +1 -1
  238. package/dist/index51.js.map +1 -1
  239. package/dist/index52.js +1 -4
  240. package/dist/index52.js.map +1 -1
  241. package/dist/index53.js.map +1 -1
  242. package/dist/index54.js +1 -4
  243. package/dist/index54.js.map +1 -1
  244. package/dist/index55.js.map +1 -1
  245. package/dist/index56.js +1 -4
  246. package/dist/index56.js.map +1 -1
  247. package/dist/index57.js.map +1 -1
  248. package/dist/index58.js +1 -4
  249. package/dist/index58.js.map +1 -1
  250. package/dist/index59.js.map +1 -1
  251. package/dist/index60.js +1 -4
  252. package/dist/index60.js.map +1 -1
  253. package/dist/index61.js.map +1 -1
  254. package/dist/index62.js +1 -4
  255. package/dist/index62.js.map +1 -1
  256. package/dist/index63.js.map +1 -1
  257. package/dist/index64.js +1 -4
  258. package/dist/index64.js.map +1 -1
  259. package/dist/index65.js +3 -3
  260. package/dist/index65.js.map +1 -1
  261. package/dist/index66.js +1 -4
  262. package/dist/index66.js.map +1 -1
  263. package/dist/index67.js.map +1 -1
  264. package/dist/index68.js +1 -4
  265. package/dist/index68.js.map +1 -1
  266. package/dist/index69.js +12 -12
  267. package/dist/index69.js.map +1 -1
  268. package/dist/index70.js +1 -4
  269. package/dist/index70.js.map +1 -1
  270. package/dist/index71.js.map +1 -1
  271. package/dist/index72.js +1 -1
  272. package/dist/index72.js.map +1 -1
  273. package/dist/index73.js.map +1 -1
  274. package/dist/index74.js +1 -4
  275. package/dist/index74.js.map +1 -1
  276. package/dist/index75.js +1 -1
  277. package/dist/index75.js.map +1 -1
  278. package/dist/index76.js +1 -4
  279. package/dist/index76.js.map +1 -1
  280. package/dist/index77.js.map +1 -1
  281. package/dist/index78.js +1 -4
  282. package/dist/index78.js.map +1 -1
  283. package/dist/index79.js +3 -3
  284. package/dist/index79.js.map +1 -1
  285. package/dist/index80.js +1 -4
  286. package/dist/index80.js.map +1 -1
  287. package/dist/index81.js.map +1 -1
  288. package/dist/index82.js +1 -4
  289. package/dist/index82.js.map +1 -1
  290. package/dist/index83.js.map +1 -1
  291. package/dist/index84.js +1 -4
  292. package/dist/index84.js.map +1 -1
  293. package/dist/index85.js.map +1 -1
  294. package/dist/index86.js +1 -4
  295. package/dist/index86.js.map +1 -1
  296. package/dist/index87.js.map +1 -1
  297. package/dist/index88.js +1 -4
  298. package/dist/index88.js.map +1 -1
  299. package/dist/index89.js.map +1 -1
  300. package/dist/index9.js.map +1 -1
  301. package/dist/index90.js +1 -4
  302. package/dist/index90.js.map +1 -1
  303. package/dist/index91.js.map +1 -1
  304. package/dist/index92.js +1 -4
  305. package/dist/index92.js.map +1 -1
  306. package/dist/index93.js.map +1 -1
  307. package/dist/index94.js +1 -4
  308. package/dist/index94.js.map +1 -1
  309. package/dist/index95.js.map +1 -1
  310. package/dist/index96.js +1 -4
  311. package/dist/index96.js.map +1 -1
  312. package/dist/index97.js.map +1 -1
  313. package/dist/index98.js +1 -4
  314. package/dist/index98.js.map +1 -1
  315. package/dist/index99.js.map +1 -1
  316. package/dist/style.css +1 -1
  317. package/package.json +35 -37
  318. package/dist/src/components/BbButton/BbButton.vue.d.ts +0 -22
  319. package/dist/src/index.d.ts +0 -126
  320. /package/dist/{src/components → components}/BaseButton/BaseButton.vue.d.ts +0 -0
  321. /package/dist/{src/components → components}/BaseCheckbox/BaseCheckbox.vue.d.ts +0 -0
  322. /package/dist/{src/components → components}/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +0 -0
  323. /package/dist/{src/components → components}/BaseDatePicker/BaseDatePicker.vue.d.ts +0 -0
  324. /package/dist/{src/components → components}/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -0
  325. /package/dist/{src/components → components}/BaseDialog/BaseDialog.vue.d.ts +0 -0
  326. /package/dist/{src/components → components}/BaseInputContainer/BaseInputContainer.vue.d.ts +0 -0
  327. /package/dist/{src/components → components}/BaseNumberInput/BaseNumberInput.vue.d.ts +0 -0
  328. /package/dist/{src/components → components}/BaseRadio/BaseRadio.vue.d.ts +0 -0
  329. /package/dist/{src/components → components}/BaseRadioGroup/BaseRadioGroup.vue.d.ts +0 -0
  330. /package/dist/{src/components → components}/BaseRating/BaseRating.vue.d.ts +0 -0
  331. /package/dist/{src/components → components}/BaseSelect/BaseSelect.vue.d.ts +0 -0
  332. /package/dist/{src/components → components}/BaseSlider/BaseSlider.vue.d.ts +0 -0
  333. /package/dist/{src/components → components}/BaseSwitch/BaseSwitch.vue.d.ts +0 -0
  334. /package/dist/{src/components → components}/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +0 -0
  335. /package/dist/{src/components → components}/BaseTag/BaseTag.vue.d.ts +0 -0
  336. /package/dist/{src/components → components}/BaseTextInput/BaseTextInput.vue.d.ts +0 -0
  337. /package/dist/{src/components → components}/BaseTextarea/BaseTextarea.vue.d.ts +0 -0
  338. /package/dist/{src/components → components}/BbAccordion/BbAccordion.vue.d.ts +0 -0
  339. /package/dist/{src/components → components}/BbAlert/BbAlert.vue.d.ts +0 -0
  340. /package/dist/{src/components → components}/BbAvatar/BbAvatar.vue.d.ts +0 -0
  341. /package/dist/{src/components → components}/BbBadge/BbBadge.vue.d.ts +0 -0
  342. /package/dist/{src/components → components}/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +0 -0
  343. /package/dist/{src/components → components}/BbCheckbox/BbCheckbox.vue.d.ts +0 -0
  344. /package/dist/{src/components → components}/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +0 -0
  345. /package/dist/{src/components → components}/BbChip/BbChip.vue.d.ts +0 -0
  346. /package/dist/{src/components → components}/BbCollapsible/BbCollapsible.vue.d.ts +0 -0
  347. /package/dist/{src/components → components}/BbConfirm/BbConfirm.vue.d.ts +0 -0
  348. /package/dist/{src/components → components}/BbDatePickerInput/BbDatePickerInput.vue.d.ts +0 -0
  349. /package/dist/{src/components → components}/BbDialog/BbDialog.vue.d.ts +0 -0
  350. /package/dist/{src/components → components}/BbDropdown/BbDropdown.vue.d.ts +0 -0
  351. /package/dist/{src/components → components}/BbDropdownButton/BbDropdownButton.vue.d.ts +0 -0
  352. /package/dist/{src/components → components}/BbDropzone/BbDropzone.vue.d.ts +0 -0
  353. /package/dist/{src/components → components}/BbHover/BbHover.vue.d.ts +0 -0
  354. /package/dist/{src/components → components}/BbIcon/BbIcon.vue.d.ts +0 -0
  355. /package/dist/{src/components → components}/BbIntersection/BbIntersection.vue.d.ts +0 -0
  356. /package/dist/{src/components → components}/BbNumberInput/BbNumberInput.vue.d.ts +0 -0
  357. /package/dist/{src/components → components}/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -0
  358. /package/dist/{src/components → components}/BbPagination/BbPagination.vue.d.ts +0 -0
  359. /package/dist/{src/components → components}/BbPopover/BbPopover.vue.d.ts +0 -0
  360. /package/dist/{src/components → components}/BbProgress/BbProgress.vue.d.ts +0 -0
  361. /package/dist/{src/components → components}/BbRadio/BbRadio.vue.d.ts +0 -0
  362. /package/dist/{src/components → components}/BbRadioGroup/BbRadioGroup.vue.d.ts +0 -0
  363. /package/dist/{src/components → components}/BbRating/BbRating.vue.d.ts +0 -0
  364. /package/dist/{src/components → components}/BbRatio/BbRatio.vue.d.ts +0 -0
  365. /package/dist/{src/components → components}/BbSelect/BbSelect.vue.d.ts +0 -0
  366. /package/dist/{src/components → components}/BbSlider/BbSlider.vue.d.ts +0 -0
  367. /package/dist/{src/components → components}/BbSmoothHeight/BbSmoothHeight.vue.d.ts +0 -0
  368. /package/dist/{src/components → components}/BbSpinner/BbSpinner.vue.d.ts +0 -0
  369. /package/dist/{src/components → components}/BbSwitch/BbSwitch.vue.d.ts +0 -0
  370. /package/dist/{src/components → components}/BbSwitchGroup/BbSwitchGroup.vue.d.ts +0 -0
  371. /package/dist/{src/components → components}/BbTab/BbTab.vue.d.ts +0 -0
  372. /package/dist/{src/components → components}/BbTable/BbTable.vue.d.ts +0 -0
  373. /package/dist/{src/components → components}/BbTable/types.d.ts +0 -0
  374. /package/dist/{src/components → components}/BbTag/BbTag.vue.d.ts +0 -0
  375. /package/dist/{src/components → components}/BbTextInput/BbTextInput.vue.d.ts +0 -0
  376. /package/dist/{src/components → components}/BbTextarea/BbTextarea.vue.d.ts +0 -0
  377. /package/dist/{src/components → components}/BbToast/BbToast.vue.d.ts +0 -0
  378. /package/dist/{src/components → components}/BbToast/BbToastMessage.vue.d.ts +0 -0
  379. /package/dist/{src/components → components}/BbTooltip/BbTooltip.vue.d.ts +0 -0
  380. /package/dist/{src/components → components}/BbTree/BbTree.vue.d.ts +0 -0
  381. /package/dist/{src/composables → composables}/useBroadcastChannelInstance.d.ts +0 -0
  382. /package/dist/{src/composables → composables}/useConfirm.d.ts +0 -0
  383. /package/dist/{src/composables → composables}/useCountdown.d.ts +0 -0
  384. /package/dist/{src/composables → composables}/useId.d.ts +0 -0
  385. /package/dist/{src/composables → composables}/useItemText.d.ts +0 -0
  386. /package/dist/{src/composables → composables}/useItemValue.d.ts +0 -0
  387. /package/dist/{src/composables → composables}/useOptions.d.ts +0 -0
  388. /package/dist/{src/composables → composables}/useRoute.d.ts +0 -0
  389. /package/dist/{src/composables → composables}/useRouter.d.ts +0 -0
  390. /package/dist/{src/composables → composables}/useToast.d.ts +0 -0
  391. /package/dist/{src/composables → composables}/useWizard.d.ts +0 -0
  392. /package/dist/{src/types → types}/Classes.d.ts +0 -0
  393. /package/dist/{src/types → types}/CommonProps.d.ts +0 -0
  394. /package/dist/{src/types → types}/ExtractGenericFromComputedRef.d.ts +0 -0
  395. /package/dist/{src/types → types}/ExtractGenericFromRef.d.ts +0 -0
  396. /package/dist/{src/types → types}/NestedKeyOf.d.ts +0 -0
  397. /package/dist/{src/types → types}/Simplify.d.ts +0 -0
  398. /package/dist/{src/types → types}/VoidHtmlElements.d.ts +0 -0
  399. /package/dist/{src/utilities → utilities}/functions/add.d.ts +0 -0
  400. /package/dist/{src/utilities → utilities}/functions/booleanishToBoolean.d.ts +0 -0
  401. /package/dist/{src/utilities → utilities}/functions/capitalize.d.ts +0 -0
  402. /package/dist/{src/utilities → utilities}/functions/clamp.d.ts +0 -0
  403. /package/dist/{src/utilities → utilities}/functions/cloneDeep.d.ts +0 -0
  404. /package/dist/{src/utilities → utilities}/functions/curry.d.ts +0 -0
  405. /package/dist/{src/utilities → utilities}/functions/debounce.d.ts +0 -0
  406. /package/dist/{src/utilities → utilities}/functions/deburr.d.ts +0 -0
  407. /package/dist/{src/utilities → utilities}/functions/drop.d.ts +0 -0
  408. /package/dist/{src/utilities → utilities}/functions/empty.d.ts +0 -0
  409. /package/dist/{src/utilities → utilities}/functions/findInTree.d.ts +0 -0
  410. /package/dist/{src/utilities → utilities}/functions/findRight.d.ts +0 -0
  411. /package/dist/{src/utilities → utilities}/functions/findRightIndex.d.ts +0 -0
  412. /package/dist/{src/utilities → utilities}/functions/flattenTree.d.ts +0 -0
  413. /package/dist/{src/utilities → utilities}/functions/flow.d.ts +0 -0
  414. /package/dist/{src/utilities → utilities}/functions/get.d.ts +0 -0
  415. /package/dist/{src/utilities → utilities}/functions/groupBy.d.ts +0 -0
  416. /package/dist/{src/utilities → utilities}/functions/gt.d.ts +0 -0
  417. /package/dist/{src/utilities → utilities}/functions/head.d.ts +0 -0
  418. /package/dist/{src/utilities → utilities}/functions/identity.d.ts +0 -0
  419. /package/dist/{src/utilities → utilities}/functions/includes.d.ts +0 -0
  420. /package/dist/{src/utilities → utilities}/functions/indexBy.d.ts +0 -0
  421. /package/dist/{src/utilities → utilities}/functions/initial.d.ts +0 -0
  422. /package/dist/{src/utilities → utilities}/functions/isCssColor.d.ts +0 -0
  423. /package/dist/{src/utilities → utilities}/functions/isNil.d.ts +0 -0
  424. /package/dist/{src/utilities → utilities}/functions/isNotNil.d.ts +0 -0
  425. /package/dist/{src/utilities → utilities}/functions/last.d.ts +0 -0
  426. /package/dist/{src/utilities → utilities}/functions/lt.d.ts +0 -0
  427. /package/dist/{src/utilities → utilities}/functions/makeUrl.d.ts +0 -0
  428. /package/dist/{src/utilities → utilities}/functions/mapKeys.d.ts +0 -0
  429. /package/dist/{src/utilities → utilities}/functions/mapValues.d.ts +0 -0
  430. /package/dist/{src/utilities → utilities}/functions/matchesPropertyInsensitive.d.ts +0 -0
  431. /package/dist/{src/utilities → utilities}/functions/mean.d.ts +0 -0
  432. /package/dist/{src/utilities → utilities}/functions/merge.d.ts +0 -0
  433. /package/dist/{src/utilities → utilities}/functions/millisecondsTo.d.ts +0 -0
  434. /package/dist/{src/utilities → utilities}/functions/negate.d.ts +0 -0
  435. /package/dist/{src/utilities → utilities}/functions/noop.d.ts +0 -0
  436. /package/dist/{src/utilities → utilities}/functions/omit.d.ts +0 -0
  437. /package/dist/{src/utilities → utilities}/functions/overEvery.d.ts +0 -0
  438. /package/dist/{src/utilities → utilities}/functions/percentage.d.ts +0 -0
  439. /package/dist/{src/utilities → utilities}/functions/pick.d.ts +0 -0
  440. /package/dist/{src/utilities → utilities}/functions/pickBy.d.ts +0 -0
  441. /package/dist/{src/utilities → utilities}/functions/replace.d.ts +0 -0
  442. /package/dist/{src/utilities → utilities}/functions/replaceInTree.d.ts +0 -0
  443. /package/dist/{src/utilities → utilities}/functions/retry.d.ts +0 -0
  444. /package/dist/{src/utilities → utilities}/functions/roundToTheNearest.d.ts +0 -0
  445. /package/dist/{src/utilities → utilities}/functions/set.d.ts +0 -0
  446. /package/dist/{src/utilities → utilities}/functions/snakeCase.d.ts +0 -0
  447. /package/dist/{src/utilities → utilities}/functions/throttle.d.ts +0 -0
  448. /package/dist/{src/utilities → utilities}/functions/tryTo.d.ts +0 -0
  449. /package/dist/{src/utilities → utilities}/functions/wait.d.ts +0 -0
  450. /package/dist/{src/utilities → utilities}/functions/waitFor.d.ts +0 -0
  451. /package/dist/{src/utilities → utilities}/functions/when.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index72.js","sources":["../src/components/BbIntersection/BbIntersection.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport type { NonVoidElementTag } from '@/types/CommonProps';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { onBeforeUnmount, onMounted, ref } from 'vue';\n\nexport type BbIntersectionProps = {\n\t/**\n\t * Time to wait before emitting intersection value\n\t */\n\tdebounceTime?: number;\n\t/**\n\t * Options used to confgiure the IntersectionObserver\n\t */\n\toptions?: IntersectionObserverInit;\n} & NonVoidElementTag;\n\nexport type BbIntersectionEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'intersected', value: number): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbIntersection',\n props: {\n debounceTime: { default: 0 },\n options: { default: () => ({\n\t\troot: null,\n\t\tthreshold: [0, 0.2, 0.4, 0.6, 0.8, 1],\n\t}) },\n tag: { default: 'div' }\n },\n emits: [\"shown\", \"hidden\", \"intersected\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst observer = ref<IntersectionObserver | null>(null);\nconst infinitescrolltrigger = ref<Element | null>(null);\nconst shown = ref(false);\nconst hidden = ref(true);\nconst percentage = ref(0);\n\nonMounted(() => {\n\tobserver.value = new IntersectionObserver((entries) => {\n\t\thandleIntersect(entries[0]);\n\t}, props.options);\n\tif (infinitescrolltrigger.value) {\n\t\tobserver.value.observe(infinitescrolltrigger.value);\n\t}\n});\nonBeforeUnmount(() => {\n\tif (observer.value) observer.value.disconnect();\n});\n\nconst handleIntersect = throttle((entry: IntersectionObserverEntry) => {\n\tif (entry.isIntersecting) {\n\t\tpercentage.value = Math.trunc(entry.intersectionRatio * 100);\n\t\tif (entry.intersectionRatio === 1) {\n\t\t\tshown.value = true;\n\t\t\thidden.value = false;\n\t\t\temit('shown');\n\t\t} else {\n\t\t\tshown.value = false;\n\t\t\thidden.value = false;\n\t\t\temitIntersected(Math.trunc(entry.intersectionRatio * 100));\n\t\t}\n\t} else {\n\t\tshown.value = false;\n\t\thidden.value = true;\n\t\temit('hidden');\n\t}\n});\n\nconst emitIntersected = throttle((percentage: number) => {\n\temit('intersected', percentage);\n}, props.debounceTime);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n ref_key: \"infinitescrolltrigger\",\n ref: infinitescrolltrigger,\n class: \"bb-intersection\"\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\", {\n hidden: hidden.value,\n percentage: percentage.value,\n shown: shown.value\n })\n ]),\n _: 3\n }, 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","props","emit","observer","ref","infinitescrolltrigger","shown","hidden","percentage","onMounted","entries","handleIntersect","onBeforeUnmount","throttle","entry","emitIntersected","_ctx","_cache","_openBlock","_createBlock","_resolveDynamicComponent","_withCtx","_renderSlot"],"mappings":";;AAyBA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAA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,WAAA,CAACe,GAAUC,OACRC,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,MACrE,SAAS;AAAA,MACT,KAAKX;AAAA,MACL,OAAO;AAAA,IAAA,GACN;AAAA,MACD,SAASgB,EAAS,MAAM;AAAA,QACtBC,EAAYN,EAAK,QAAQ,WAAW;AAAA,UAClC,QAAQT,EAAO;AAAA,UACf,YAAYC,EAAW;AAAA,UACvB,OAAOF,EAAM;AAAA,QAAA,CACd;AAAA,MAAA,CACF;AAAA,MACD,GAAG;AAAA,OACF,GAAG;AAAA,EAER;AAEA,CAAC;"}
1
+ {"version":3,"file":"index72.js","sources":["../src/components/BbIntersection/BbIntersection.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" ref=\"infinitescrolltrigger\" class=\"bb-intersection\">\n\t\t<slot :hidden=\"hidden\" :percentage=\"percentage\" :shown=\"shown\"></slot>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport type { NonVoidElementTag } from '@/types/CommonProps';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { onBeforeUnmount, onMounted, ref } from 'vue';\n\nexport type BbIntersectionProps = {\n\t/**\n\t * Time to wait before emitting intersection value\n\t */\n\tdebounceTime?: number;\n\t/**\n\t * Options used to confgiure the IntersectionObserver\n\t */\n\toptions?: IntersectionObserverInit;\n} & NonVoidElementTag;\n\nconst props = withDefaults(defineProps<BbIntersectionProps>(), {\n\tdebounceTime: 0,\n\toptions: () => ({\n\t\troot: null,\n\t\tthreshold: [0, 0.2, 0.4, 0.6, 0.8, 1],\n\t}),\n\ttag: 'div',\n});\n\nexport type BbIntersectionEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'intersected', value: number): void;\n};\n\nconst emit = defineEmits<BbIntersectionEvents>();\n\ndefineSlots<{\n\tdefault?: (props: {\n\t\thidden: boolean;\n\t\tpercentage: number;\n\t\tshown: boolean;\n\t}) => any;\n}>();\n\nconst observer = ref<IntersectionObserver | null>(null);\nconst infinitescrolltrigger = ref<Element | null>(null);\nconst shown = ref(false);\nconst hidden = ref(true);\nconst percentage = ref(0);\n\nonMounted(() => {\n\tobserver.value = new IntersectionObserver((entries) => {\n\t\thandleIntersect(entries[0]);\n\t}, props.options);\n\tif (infinitescrolltrigger.value) {\n\t\tobserver.value.observe(infinitescrolltrigger.value);\n\t}\n});\nonBeforeUnmount(() => {\n\tif (observer.value) observer.value.disconnect();\n});\n\nconst handleIntersect = throttle((entry: IntersectionObserverEntry) => {\n\tif (entry.isIntersecting) {\n\t\tpercentage.value = Math.trunc(entry.intersectionRatio * 100);\n\t\tif (entry.intersectionRatio === 1) {\n\t\t\tshown.value = true;\n\t\t\thidden.value = false;\n\t\t\temit('shown');\n\t\t} else {\n\t\t\tshown.value = false;\n\t\t\thidden.value = false;\n\t\t\temitIntersected(Math.trunc(entry.intersectionRatio * 100));\n\t\t}\n\t} else {\n\t\tshown.value = false;\n\t\thidden.value = true;\n\t\temit('hidden');\n\t}\n});\n\nconst emitIntersected = throttle((percentage: number) => {\n\temit('intersected', percentage);\n}, props.debounceTime);\n</script>\n"],"names":["props","__props","emit","__emit","observer","ref","infinitescrolltrigger","shown","hidden","percentage","onMounted","entries","handleIntersect","onBeforeUnmount","throttle","entry","emitIntersected"],"mappings":";;;;;;;;;;;;;;AAsBA,UAAMA,IAAQC,GAeRC,IAAOC,GAUPC,IAAWC,EAAiC,IAAI,GAChDC,IAAwBD,EAAoB,IAAI,GAChDE,IAAQF,EAAI,EAAK,GACjBG,IAASH,EAAI,EAAI,GACjBI,IAAaJ,EAAI,CAAC;AAExB,IAAAK,EAAU,MAAM;AACf,MAAAN,EAAS,QAAQ,IAAI,qBAAqB,CAACO,MAAY;AACtC,QAAAC,EAAAD,EAAQ,CAAC,CAAC;AAAA,MAAA,GACxBX,EAAM,OAAO,GACZM,EAAsB,SAChBF,EAAA,MAAM,QAAQE,EAAsB,KAAK;AAAA,IACnD,CACA,GACDO,EAAgB,MAAM;AACrB,MAAIT,EAAS,SAAOA,EAAS,MAAM;IAAW,CAC9C;AAEK,UAAAQ,IAAkBE,EAAS,CAACC,MAAqC;AACtE,MAAIA,EAAM,kBACTN,EAAW,QAAQ,KAAK,MAAMM,EAAM,oBAAoB,GAAG,GACvDA,EAAM,sBAAsB,KAC/BR,EAAM,QAAQ,IACdC,EAAO,QAAQ,IACfN,EAAK,OAAO,MAEZK,EAAM,QAAQ,IACdC,EAAO,QAAQ,IACfQ,EAAgB,KAAK,MAAMD,EAAM,oBAAoB,GAAG,CAAC,OAG1DR,EAAM,QAAQ,IACdC,EAAO,QAAQ,IACfN,EAAK,QAAQ;AAAA,IACd,CACA,GAEKc,IAAkBF,EAAS,CAACL,MAAuB;AACxD,MAAAP,EAAK,eAAeO,CAAU;AAAA,IAAA,GAC5BT,EAAM,YAAY;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index73.js","sources":["../src/components/BbNumberInput/BbNumberInput.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 BaseNumberInput from '../BaseNumberInput/BaseNumberInput.vue';\nimport type {\n\tBaseNumberInputEvents,\n\tBaseNumberInputSlots,\n} from '../BaseNumberInput/BaseNumberInput.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BbNumberInputProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum value cap\n\t */\n\tmax?: number;\n\n\t/**\n\t * Minimum value cap\n\t */\n\tmin?: number;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: number | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Incremental unit used in the exposed `increase`\n\t * and `decrease` function. It's NOT APPLIED to manual input as a step of 5\n\t * will prevent the user from inserting a value like `115` because of rounding down.\n\t */\n\tstep?: number;\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nexport type BbNumberInputEvents = BaseNumberInputEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbNumberInput',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n max: {},\n min: {},\n modelValue: {},\n name: {},\n placeholder: {},\n readonly: {},\n step: {},\n direction: {},\n errors: {},\n hideLabel: { type: Boolean },\n label: {},\n labelPosition: {},\n reverse: { type: Boolean }\n },\n emits: [\"blur\", \"change\", \"click\", \"decrease\", \"focus\", \"increase\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonDecrease: (event: number) => emit('decrease', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonIncrease: (event: number) => emit('increase', event),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: number | null) =>\n\t\temit('update:modelValue', value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n id: _ctx.id,\n class: \"bb-number-input\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLabel,\n label: _ctx.label,\n \"label-position\": _ctx.labelPosition,\n \"model-value\": _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(BaseNumberInput, _mergeProps({\n id: id,\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n \"has-errors\": hasErrors,\n max: _ctx.max,\n min: _ctx.min,\n \"model-value\": _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n step: _ctx.step\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 prepend: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"prepend-outer\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend-outer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n _: 2\n }, 1040, [\"id\", \"autocomplete\", \"autofocus\", \"disabled\", \"has-errors\", \"max\", \"min\", \"model-value\", \"name\", \"placeholder\", \"readonly\", \"step\"])\n ]),\n _: 3\n }, 8, [\"id\", \"direction\", \"errors\", \"has-errors\", \"hide-label\", \"label\", \"label-position\", \"model-value\", \"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","BaseNumberInput","_mergeProps"],"mappings":";;;;;AA4GA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,MAAM,CAAC;AAAA,IACP,WAAW,CAAC;AAAA,IACZ,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,OAAO,CAAC;AAAA,IACR,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AAU,cAAc,cAAc,SAAS,kBAAkB,eAAe,QAAQ,SAAS,CAAC;AAAA,EAE9H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index73.js","sources":["../src/components/BbNumberInput/BbNumberInput.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-number-input\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors }\">\n\t\t\t<BaseNumberInput\n\t\t\t\t:id=\"id\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:max=\"max\"\n\t\t\t\t:min=\"min\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:step=\"step\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #append-outer=\"data\"\n\t\t\t\t\t><slot name=\"append-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t\t\t<template #prepend=\"data\"\n\t\t\t\t\t><slot name=\"prepend\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #prepend-outer=\"data\"\n\t\t\t\t\t><slot name=\"prepend-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t</BaseNumberInput>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseNumberInput from '../BaseNumberInput/BaseNumberInput.vue';\nimport type {\n\tBaseNumberInputEvents,\n\tBaseNumberInputSlots,\n} from '../BaseNumberInput/BaseNumberInput.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BbNumberInputProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum value cap\n\t */\n\tmax?: number;\n\n\t/**\n\t * Minimum value cap\n\t */\n\tmin?: number;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: number | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Incremental unit used in the exposed `increase`\n\t * and `decrease` function. It's NOT APPLIED to manual input as a step of 5\n\t * will prevent the user from inserting a value like `115` because of rounding down.\n\t */\n\tstep?: number;\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nwithDefaults(defineProps<BbNumberInputProps>(), {});\n\nexport type BbNumberInputEvents = BaseNumberInputEvents;\n\nconst emit = defineEmits<BbNumberInputEvents>();\n\ndefineSlots<\n\tBaseNumberInputSlots & {\n\t\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\t}\n>();\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonDecrease: (event: number) => emit('decrease', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonIncrease: (event: number) => emit('increase', event),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: number | null) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbNumberInput';\n</style>\n"],"names":["emit","__emit","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyJA,UAAMA,IAAOC,GAWPC,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBH,EAAK,QAAQG,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBH,EAAK,UAAUG,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBH,EAAK,SAASG,CAAK;AAAA,MACnD,YAAY,CAACA,MAAkBH,EAAK,YAAYG,CAAK;AAAA,MACrD,SAAS,CAACA,MAAsBH,EAAK,SAASG,CAAK;AAAA,MACnD,YAAY,CAACA,MAAkBH,EAAK,YAAYG,CAAK;AAAA,MACrD,SAAS,CAACA,MAAiBH,EAAK,SAASG,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBH,EAAK,WAAWG,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBH,EAAK,aAAaG,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBH,EAAK,WAAWG,CAAK;AAAA,MACvD,uBAAuB,CAACC,MACvBJ,EAAK,qBAAqBI,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index74.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index74.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index74.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index74.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index75.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as q, ref as s, useAttrs as G, computed as m, onMounted as J, watch as Q, onBeforeUnmount as X, openBlock as y, createBlock as Y, Teleport as Z, createElementVNode as o, mergeProps as N, createElementBlock as w, renderSlot as l, createTextVNode as ee, toDisplayString as z, createCommentVNode as B, nextTick as te } from "vue";
2
- import { useFocusTrap as oe } from "./index201.js";
2
+ import { useFocusTrap as oe } from "./index208.js";
3
3
  import { useId as L } from "./index7.js";
4
4
  import { wait as O } from "./index122.js";
5
5
  const se = { class: "bb-offcanvas-close" }, ae = { class: "bb-offcanvas-close__content" }, ne = { class: "bb-offcanvas-close__label" }, le = /* @__PURE__ */ o("span", { class: "bb-offcanvas-close__icon" }, [
@@ -1 +1 @@
1
- {"version":3,"file":"index75.js","sources":["../src/components/BbOffCanvas/BbOffCanvas.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-offcanvas-close\" }\nconst _hoisted_2 = { class: \"bb-offcanvas-close__content\" }\nconst _hoisted_3 = { class: \"bb-offcanvas-close__label\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-offcanvas-close__icon\" }, [\n /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"none\",\n viewBox: \"0 0 24 24\",\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-linecap\": \"round\",\n \"stroke-width\": \"2\"\n })\n ])\n], -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex\":\"10000 10000 0%\"} }, null, -1)\n\nimport {\n\tcomputed,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\twatch,\n} from 'vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport type { CommonProps, Size } from '@/types/CommonProps';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BbOffCanvasProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t\t/**\n\t\t * Defines the direction the offcanvas should appear from\n\t\t */\n\t\tdirection?: 'left' | 'top' | 'right' | 'bottom';\n\t};\n\nexport type BbOffCanvasEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nexport type BbOffCanvasSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BbOffCanvasProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BbOffCanvasProps['title'] }) => any;\n\tclose?: (props: { text: BbOffCanvasProps['closeLabel'] }) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BbOffCanvasProps['description'];\n\t}) => any;\n\tdefault?: (props: {}) => any;\n\tcontent?: (props: { close: typeof onCloseClick }) => any;\n\tfooter?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbOffCanvas',\n props: {\n closeLabel: { default: 'Chiudi' },\n compact: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n panelClasses: { default: () => [] },\n overlayClasses: { default: () => [] },\n persistent: { type: Boolean },\n showClose: { type: Boolean, default: true },\n title: {},\n transition: { default: 'fade' },\n transitionDuration: { default: 350 },\n size: { default: 'sm' },\n description: {},\n fullscreen: { type: Boolean },\n modelValue: { type: [Boolean, null] },\n direction: { default: 'left' }\n },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst attrs = useAttrs();\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tclickOutsideDeactivates: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst closeLabel = computed(() => props.closeLabel);\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\nconst lastFocusedElement = ref<Element | null>(null);\n\nconst busy = computed(() => opening.value || closing.value);\n\nonMounted(() => {\n\t/**\n\t * Do not realign if open or opening\n\t */\n\tif (props.modelValue && !(open.value || opening.value)) {\n\t\talignToModelValue();\n\t}\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\talignToModelValue();\n\t}\n);\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tlet currentlyOpenCanvases = Number(\n\t\t\tdocument.body.dataset['openCanvases'] ?? '0'\n\t\t);\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tcurrentlyOpenCanvases--;\n\t\tdocument.body.dataset['openCanvases'] = currentlyOpenCanvases.toString();\n\t\tif (!currentlyOpenCanvases) {\n\t\t\tdocument.body.style.overflow = 'auto';\n\t\t\tdocument.body.style.paddingRight = '0px';\n\t\t}\n\t}\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t}\n\t\tif (document.activeElement) {\n\t\t\tlastFocusedElement.value = document.activeElement;\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\n\t\tlet currentlyOpenCanvases = Number(\n\t\t\tdocument.body.dataset['openCanvases'] ?? '0'\n\t\t);\n\t\tcurrentlyOpenCanvases++;\n\t\tdocument.body.dataset['openCanvases'] = currentlyOpenCanvases.toString();\n\t\tconst scrollBarWidth =\n\t\t\twindow.innerWidth - document.documentElement.clientWidth;\n\t\tdocument.body.style.overflow = 'hidden';\n\t\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\tlet currentlyOpenCanvases = Number(\n\t\t\tdocument.body.dataset['openCanvases'] ?? '0'\n\t\t);\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tcurrentlyOpenCanvases--;\n\t\tdocument.body.dataset['openCanvases'] = currentlyOpenCanvases.toString();\n\t\tif (!currentlyOpenCanvases) {\n\t\t\tdocument.body.style.overflow = 'auto';\n\t\t\tdocument.body.style.paddingRight = '0px';\n\t\t}\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\temit('hidden');\n\t\tif (lastFocusedElement.value instanceof HTMLElement) {\n\t\t\tlastFocusedElement.value.focus();\n\t\t}\n\t}\n};\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: UIEvent) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled) return;\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-offcanvas bb-offcanvas__overlay': true,\n\t\t\t'bb-offcanvas--fullscreen': props.fullscreen,\n\t\t\t'bb-offcanvas--open': open.value,\n\t\t\t'bb-offcanvas--opening': opening.value,\n\t\t\t'bb-offcanvas--closed': closed.value,\n\t\t\t'bb-offcanvas--closing': closing.value,\n\t\t\t[`bb-offcanvas--transition-${props.transition}`]: true,\n\t\t\t[`bb-offcanvas--${props.direction}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-offcanvas__panel': true,\n\t\t\t'bb-offcanvas__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tlet maxHeight;\n\tlet height;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.direction === 'left' || props.direction === 'right') {\n\t\tif (props.fullscreen) maxWidth = '100%';\n\t\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\t\telse if (props.size in sizes)\n\t\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\t\telse maxWidth = props.size + 'px';\n\t} else {\n\t\tif (props.fullscreen) height = '100%';\n\t\telse if (typeof props.size === 'number') height = props.size + 'px';\n\t\telse if (props.size in sizes)\n\t\t\theight = sizes[props.size as keyof Sizes] + 'px';\n\t\telse if (!Number.isNaN(Number(props.size))) height = props.size + 'px';\n\t\telse if (props.size === 'auto') height = 'auto';\n\t}\n\n\tconst style = {\n\t\tmaxWidth,\n\t\tmaxHeight,\n\t\theight,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"div\", _mergeProps(overlayAttributes.value, {\n ref_key: \"overlay\",\n ref: overlay\n }), [\n _createElementVNode(\"div\", _mergeProps(panelAttributes.value, {\n ref_key: \"panel\",\n ref: panel\n }), [\n (hasRenderedAtLeastOnce.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n ref_key: \"content\",\n ref: content,\n class: \"bb-offcanvas__content\"\n }, [\n _renderSlot(_ctx.$slots, \"content\", { close: onCloseClick }, () => [\n _createElementVNode(\"div\", {\n ref_key: \"header\",\n ref: header,\n class: \"bb-offcanvas__header\"\n }, [\n _renderSlot(_ctx.$slots, \"header\", {\n close: onCloseClick,\n title: _ctx.title,\n titleId: titleId\n }, () => [\n _createElementVNode(\"span\", {\n id: titleId,\n class: \"bb-offcanvas__title\"\n }, [\n _renderSlot(_ctx.$slots, \"title\", { text: _ctx.title }, () => [\n _createTextVNode(_toDisplayString(_ctx.title), 1)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.showClose)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n type: \"button\",\n onClick: onCloseClick\n }, [\n _renderSlot(_ctx.$slots, \"close\", { text: closeLabel.value }, () => [\n _createElementVNode(\"span\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(closeLabel.value), 1),\n _hoisted_4\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ], 512),\n _createElementVNode(\"div\", {\n ref_key: \"body\",\n ref: body,\n class: \"bb-offcanvas__body\"\n }, [\n _renderSlot(_ctx.$slots, \"description\", {\n descriptionId: descriptionId,\n text: _ctx.description\n }, () => [\n (_ctx.description)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n id: descriptionId,\n class: \"bb-offcanvas__description\"\n }, _toDisplayString(_ctx.description), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _renderSlot(_ctx.$slots, \"default\")\n ], 512),\n _hoisted_5,\n _createElementVNode(\"div\", {\n ref_key: \"footer\",\n ref: footer,\n class: \"bb-offcanvas__footer\"\n }, [\n _renderSlot(_ctx.$slots, \"footer\")\n ], 512)\n ])\n ], 512))\n : _createCommentVNode(\"\", true)\n ], 16)\n ], 16)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_createElementVNode","_hoisted_5","_sfc_main","_defineComponent","__props","__emit","props","emit","titleId","useId","descriptionId","overlay","ref","panel","content","header","body","footer","attrs","useAttrs","activate","deactivate","useFocusTrap","nextTick","closeLabel","computed","open","opening","closed","closing","hasRenderedAtLeastOnce","lastFocusedElement","busy","onMounted","alignToModelValue","watch","onBeforeUnmount","currentlyOpenCanvases","scrollBarWidth","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","maxHeight","height","sizes","_ctx","_cache","_openBlock","_createBlock","_Teleport","_mergeProps","_createElementBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;AAGA,MAAMA,KAAa,EAAE,OAAO,wBACtBC,KAAa,EAAE,OAAO,iCACtBC,KAAa,EAAE,OAAO,+BACtBC,KAA8CC,gBAAAA,EAAA,QAAQ,EAAE,OAAO,8BAA8B;AAAA,oBAChE,OAAO;AAAA,IACtC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,GACN;AAAA,sBACgC,QAAQ;AAAA,MACvC,GAAG;AAAA,MACH,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAAA,CACjB;AAAA,EAAA,CACF;AACH,GAAG,EAAE,GACCC,KAA8CD,gBAAAA,EAAA,OAAO,EAAE,OAAO,EAAC,MAAO,mBAAqB,GAAA,MAAM,EAAE,GA+E7EE,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,SAAS;AAAA,IAChC,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,cAAc,EAAE,SAAS,MAAM,GAAG;AAAA,IAClC,gBAAgB,EAAE,SAAS,MAAM,GAAG;AAAA,IACpC,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,OAAO,CAAC;AAAA,IACR,YAAY,EAAE,SAAS,OAAO;AAAA,IAC9B,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,MAAM,EAAE,SAAS,KAAK;AAAA,IACtB,aAAa,CAAC;AAAA,IACd,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,YAAY,EAAE,MAAM,CAAC,SAAS,IAAI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P,EAAK,QAAQ,eAAe;AAAA,kBACtC,eAAA5C;AAAA,kBACA,MAAM4C,EAAK;AAAA,gBAAA,GACV,MAAM;AAAA,kBACNA,EAAK,eACDE,KAAcI,EAAoB,OAAO;AAAA,oBACxC,KAAK;AAAA,oBACL,IAAIlD;AAAA,oBACJ,OAAO;AAAA,kBAAA,GACNqD,EAAiBT,EAAK,WAAW,GAAG,CAAC,KACxCU,EAAoB,IAAI,EAAI;AAAA,gBAAA,CACjC;AAAA,gBACDH,EAAYP,EAAK,QAAQ,SAAS;AAAA,iBACjC,GAAG;AAAA,cACNrD;AAAA,cACAD,EAAoB,OAAO;AAAA,gBACzB,SAAS;AAAA,gBACT,KAAKiB;AAAA,gBACL,OAAO;AAAA,cAAA,GACN;AAAA,gBACD4C,EAAYP,EAAK,QAAQ,QAAQ;AAAA,iBAChC,GAAG;AAAA,YAAA,CACP;AAAA,UACA,GAAA,GAAG,KACNU,EAAoB,IAAI,EAAI;AAAA,WAC/B,EAAE;AAAA,SACJ,EAAE;AAAA,IAAA,CACN;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index75.js","sources":["../src/components/BbOffCanvas/BbOffCanvas.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div v-bind=\"overlayAttributes\" ref=\"overlay\">\n\t\t\t<div v-bind=\"panelAttributes\" ref=\"panel\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"hasRenderedAtLeastOnce\"\n\t\t\t\t\tref=\"content\"\n\t\t\t\t\tclass=\"bb-offcanvas__content\"\n\t\t\t\t>\n\t\t\t\t\t<slot :close=\"onCloseClick\" name=\"content\">\n\t\t\t\t\t\t<div ref=\"header\" class=\"bb-offcanvas__header\">\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:close=\"onCloseClick\"\n\t\t\t\t\t\t\t\tname=\"header\"\n\t\t\t\t\t\t\t\t:title=\"title\"\n\t\t\t\t\t\t\t\t:title-id=\"titleId\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span :id=\"titleId\" class=\"bb-offcanvas__title\">\n\t\t\t\t\t\t\t\t\t<slot name=\"title\" :text=\"title\">{{ title }}</slot>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"bb-offcanvas-close\">\n\t\t\t\t\t\t\t\t\t<button v-if=\"showClose\" type=\"button\" @click=\"onCloseClick\">\n\t\t\t\t\t\t\t\t\t\t<slot name=\"close\" :text=\"closeLabel\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-offcanvas-close__content\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-offcanvas-close__label\">{{\n\t\t\t\t\t\t\t\t\t\t\t\t\tcloseLabel\n\t\t\t\t\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-offcanvas-close__icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t><svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div ref=\"body\" class=\"bb-offcanvas__body\">\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:description-id=\"descriptionId\"\n\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t:text=\"description\"\n\t\t\t\t\t\t\t\t><div\n\t\t\t\t\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\t\t\t\t\t:id=\"descriptionId\"\n\t\t\t\t\t\t\t\t\tclass=\"bb-offcanvas__description\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ description }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style=\"flex: 10000 10000 0%\"></div>\n\t\t\t\t\t\t<div ref=\"footer\" class=\"bb-offcanvas__footer\">\n\t\t\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tcomputed,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\twatch,\n} from 'vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport type { CommonProps, Size } from '@/types/CommonProps';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BbOffCanvasProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t\t/**\n\t\t * Defines the direction the offcanvas should appear from\n\t\t */\n\t\tdirection?: 'left' | 'top' | 'right' | 'bottom';\n\t};\n\nconst props = withDefaults(defineProps<BbOffCanvasProps>(), {\n\tcloseLabel: 'Chiudi',\n\tdirection: 'left',\n\tshowClose: true,\n\tsize: 'sm',\n\ttransition: 'fade',\n\ttransitionDuration: 350,\n\tpanelClasses: () => [],\n\toverlayClasses: () => [],\n});\n\nexport type BbOffCanvasEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nconst emit = defineEmits<BbOffCanvasEvents>();\n\nexport type BbOffCanvasSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BbOffCanvasProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BbOffCanvasProps['title'] }) => any;\n\tclose?: (props: { text: BbOffCanvasProps['closeLabel'] }) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BbOffCanvasProps['description'];\n\t}) => any;\n\tdefault?: (props: {}) => any;\n\tcontent?: (props: { close: typeof onCloseClick }) => any;\n\tfooter?: (props: {}) => any;\n};\n\ndefineSlots<BbOffCanvasSlots>();\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst attrs = useAttrs();\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tclickOutsideDeactivates: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst closeLabel = computed(() => props.closeLabel);\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\nconst lastFocusedElement = ref<Element | null>(null);\n\nconst busy = computed(() => opening.value || closing.value);\n\nonMounted(() => {\n\t/**\n\t * Do not realign if open or opening\n\t */\n\tif (props.modelValue && !(open.value || opening.value)) {\n\t\talignToModelValue();\n\t}\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\talignToModelValue();\n\t}\n);\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tlet currentlyOpenCanvases = Number(\n\t\t\tdocument.body.dataset['openCanvases'] ?? '0'\n\t\t);\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tcurrentlyOpenCanvases--;\n\t\tdocument.body.dataset['openCanvases'] = currentlyOpenCanvases.toString();\n\t\tif (!currentlyOpenCanvases) {\n\t\t\tdocument.body.style.overflow = 'auto';\n\t\t\tdocument.body.style.paddingRight = '0px';\n\t\t}\n\t}\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t}\n\t\tif (document.activeElement) {\n\t\t\tlastFocusedElement.value = document.activeElement;\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\n\t\tlet currentlyOpenCanvases = Number(\n\t\t\tdocument.body.dataset['openCanvases'] ?? '0'\n\t\t);\n\t\tcurrentlyOpenCanvases++;\n\t\tdocument.body.dataset['openCanvases'] = currentlyOpenCanvases.toString();\n\t\tconst scrollBarWidth =\n\t\t\twindow.innerWidth - document.documentElement.clientWidth;\n\t\tdocument.body.style.overflow = 'hidden';\n\t\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\tlet currentlyOpenCanvases = Number(\n\t\t\tdocument.body.dataset['openCanvases'] ?? '0'\n\t\t);\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tcurrentlyOpenCanvases--;\n\t\tdocument.body.dataset['openCanvases'] = currentlyOpenCanvases.toString();\n\t\tif (!currentlyOpenCanvases) {\n\t\t\tdocument.body.style.overflow = 'auto';\n\t\t\tdocument.body.style.paddingRight = '0px';\n\t\t}\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\temit('hidden');\n\t\tif (lastFocusedElement.value instanceof HTMLElement) {\n\t\t\tlastFocusedElement.value.focus();\n\t\t}\n\t}\n};\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: UIEvent) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled) return;\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-offcanvas bb-offcanvas__overlay': true,\n\t\t\t'bb-offcanvas--fullscreen': props.fullscreen,\n\t\t\t'bb-offcanvas--open': open.value,\n\t\t\t'bb-offcanvas--opening': opening.value,\n\t\t\t'bb-offcanvas--closed': closed.value,\n\t\t\t'bb-offcanvas--closing': closing.value,\n\t\t\t[`bb-offcanvas--transition-${props.transition}`]: true,\n\t\t\t[`bb-offcanvas--${props.direction}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-offcanvas__panel': true,\n\t\t\t'bb-offcanvas__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tlet maxHeight;\n\tlet height;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.direction === 'left' || props.direction === 'right') {\n\t\tif (props.fullscreen) maxWidth = '100%';\n\t\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\t\telse if (props.size in sizes)\n\t\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\t\telse maxWidth = props.size + 'px';\n\t} else {\n\t\tif (props.fullscreen) height = '100%';\n\t\telse if (typeof props.size === 'number') height = props.size + 'px';\n\t\telse if (props.size in sizes)\n\t\t\theight = sizes[props.size as keyof Sizes] + 'px';\n\t\telse if (!Number.isNaN(Number(props.size))) height = props.size + 'px';\n\t\telse if (props.size === 'auto') height = 'auto';\n\t}\n\n\tconst style = {\n\t\tmaxWidth,\n\t\tmaxHeight,\n\t\theight,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbOffCanvas';\n</style>\n"],"names":["props","__props","emit","__emit","titleId","useId","descriptionId","overlay","ref","panel","content","header","body","footer","attrs","useAttrs","activate","deactivate","useFocusTrap","nextTick","closeLabel","computed","open","opening","closed","closing","hasRenderedAtLeastOnce","lastFocusedElement","busy","onMounted","alignToModelValue","watch","onBeforeUnmount","currentlyOpenCanvases","scrollBarWidth","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","maxHeight","height","sizes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HA,UAAMA,IAAQC,GAiBRC,IAAOC,GAqBPC,IAAU,SAASC,EAAM,EAAE,GAAG,KAAK,IACnCC,IAAgB,eAAeD,EAAM,EAAE,GAAG,KAAK,IAE/CE,IAAUC,EAAwB,IAAI,GACtCC,IAAQD,EAAwB,IAAI,GACpCE,IAAUF,EAAwB,IAAI,GACtC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AO,OAEzBA,EAAM,aAAqBgD,IAAA,SACtB,OAAOhD,EAAM,QAAS,WAAUgD,IAAShD,EAAM,OAAO,OACtDA,EAAM,QAAQiD,IACbD,IAAAC,EAAMjD,EAAM,IAAmB,IAAI,OACnC,OAAO,MAAM,OAAOA,EAAM,IAAI,CAAC,IAChCA,EAAM,SAAS,WAAiBgD,IAAA,UADGA,IAAShD,EAAM,OAAO;AAInE,YAAM2C,IAAQ;AAAA,QACb,UAAAG;AAAA,QACA,WAAAC;AAAA,QACA,QAAAC;AAAA,QACA,oBAAoBhD,EAAM,qBAAqB,MAAO;AAAA,MAAA;AAGhD,aAAA;AAAA,QACN,OAAOyC;AAAA,QACP,OAAAE;AAAA,QACA,GAAGE;AAAA,MAAA;AAAA,IACJ,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index76.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index76.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index76.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index76.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index77.js","sources":["../src/components/BbPagination/BbPagination.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { \"aria-label\": \"Navigazione\" }\nconst _hoisted_2 = [\"disabled\"]\nconst _hoisted_3 = [\"disabled\", \"onClick\"]\nconst _hoisted_4 = [\"disabled\"]\n\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport { debounce } from '@/utilities/functions/debounce';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbPaginationProps = Pick<CommonProps, 'disabled' | 'loading'> & {\n\t/**\n\t * String of text displayed in place of hidden pages\n\t */\n\tellipsis?: string;\n\t/**\n\t * Maximum number of clickable pages displayed at all times.\n\t * This has a tolerance of +/- 1 for odd / even numbering.\n\t * It does not include ellipses.\n\t */\n\tmaxSize?: number | string;\n\t/**\n\t * Used by v-model. Indicates the current page.\n\t */\n\tmodelValue: number;\n\t/**\n\t * Total number of pages there is.\n\t */\n\ttotalPages?: number | string;\n};\n\nexport type BbPaginationEvents = {\n\t(e: 'update:modelValue', value: number): void;\n};\n\ntype Item =\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: string;\n\t\t\tpage: string;\n\t\t\tellipsis: true;\n\t\t\tdisabled: boolean;\n\t }\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: number;\n\t\t\tpage: number;\n\t\t\tellipsis: false;\n\t\t\tdisabled: boolean;\n\t };\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPagination',\n props: {\n disabled: { type: Boolean },\n loading: { type: Boolean },\n ellipsis: { default: '...' },\n maxSize: { default: 5 },\n modelValue: { default: 1 },\n totalPages: { default: 1 }\n },\n emits: ['update:modelValue'],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst totalPages = computed(() => +props.totalPages);\nconst start = ref(1);\nconst maxSize = ref(+props.maxSize);\n\nconst outercontainer = ref<HTMLElement>();\nconst innercontainer = ref<HTMLElement>();\n\nconst buttonFootprint = ref<number>(Infinity);\n\n/**\n * Adjusts how many buttons to show.\n * if current buttons can't fit subtract maxSize until they do or until minimum is reached\n * if more buttons could fit add buttons until the don't\n * If minimum or maximum is reached just quit until next resize\n */\nconst adjustMaxElements = () => {\n\tif (outercontainer.value && innercontainer.value) {\n\t\t/* If some buttons do not fit */\n\t\tif (outercontainer.value.clientWidth < innercontainer.value.clientWidth) {\n\t\t\tif (maxSize.value - 1 > 3) {\n\t\t\t\tmaxSize.value--;\n\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t} else {\n\t\t\t\tmaxSize.value = 3;\n\t\t\t}\n\t\t\t/* If all current buttons do fit */\n\t\t} else {\n\t\t\t/* If some buttons have been hidden */\n\t\t\tif (maxSize.value < +props.maxSize) {\n\t\t\t\tif (\n\t\t\t\t\t/* If there is enough space to fit one */\n\t\t\t\t\toutercontainer.value.clientWidth - innercontainer.value.clientWidth >\n\t\t\t\t\tbuttonFootprint.value\n\t\t\t\t) {\n\t\t\t\t\tmaxSize.value = Math.min(maxSize.value + 1, +props.maxSize);\n\t\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nif (globalThis.ResizeObserver) {\n\tconst observer = new ResizeObserver(debounce(adjustMaxElements, 200));\n\tonMounted(() => {\n\t\tif (outercontainer.value && innercontainer.value) {\n\t\t\tconst button = outercontainer.value.querySelectorAll(\n\t\t\t\t'.bb-pagination__page'\n\t\t\t)[1];\n\t\t\tif (button) {\n\t\t\t\t/* Compute the footprint necessary to render a new button */\n\t\t\t\tconst gapString = getComputedStyle(innercontainer.value).columnGap;\n\t\t\t\tconst numberAsString = gapString.replaceAll(/\\D/g, '');\n\t\t\t\tconst gap = Number(numberAsString);\n\t\t\t\tbuttonFootprint.value = button.clientWidth + gap;\n\t\t\t}\n\t\t\tobserver.observe(outercontainer.value);\n\t\t}\n\t});\n\tonBeforeUnmount(() => {\n\t\tobserver.disconnect();\n\t});\n}\n\nconst range = computed(() => {\n\tif (\n\t\ttotalPages.value <= 0 ||\n\t\tisNaN(totalPages.value) ||\n\t\ttotalPages.value > Number.MAX_SAFE_INTEGER\n\t)\n\t\treturn [];\n\n\tif (maxSize.value <= 1) return [props.modelValue];\n\n\tif (totalPages.value <= maxSize.value) {\n\t\treturn createRange(totalPages.value, start.value);\n\t}\n\n\tconst even = maxSize.value % 2 === 0;\n\tconst middle = even ? maxSize.value / 2 : Math.floor(maxSize.value / 2);\n\tconst left = even ? middle : middle + 1;\n\tconst right = totalPages.value - middle;\n\n\tif (left - props.modelValue >= 0) {\n\t\treturn [\n\t\t\t...createRange(Math.max(1, maxSize.value - 1), start.value),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t} else if (props.modelValue - right >= (even ? 1 : 0)) {\n\t\tconst rangeLength = maxSize.value - 1;\n\t\tconst rangeStart = totalPages.value - rangeLength + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t];\n\t} else {\n\t\tconst rangeLength = Math.max(1, maxSize.value - 3);\n\t\tconst rangeStart =\n\t\t\trangeLength === 1\n\t\t\t\t? props.modelValue\n\t\t\t\t: props.modelValue - Math.ceil(rangeLength / 2) + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t}\n});\n\nconst items = computed<Item[]>(() => {\n\treturn range.value.map((item, index) => {\n\t\tif (typeof item === 'string') {\n\t\t\treturn {\n\t\t\t\tactive: false,\n\t\t\t\tkey: `ellipsis-${index}`,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: true,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst active = item === props.modelValue;\n\t\t\treturn {\n\t\t\t\tactive,\n\t\t\t\tkey: item,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: false,\n\t\t\t\tdisabled: !!props.disabled || +props.totalPages < 2 || props.loading,\n\t\t\t};\n\t\t}\n\t});\n});\n\nconst createRange = (length: number, start = 0): number[] => {\n\treturn Array.from({ length }, (_, k) => start + k);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n ref_key: \"outercontainer\",\n ref: outercontainer,\n class: \"bb-pagination\"\n }, [\n _createElementVNode(\"nav\", _hoisted_1, [\n _createElementVNode(\"ul\", {\n ref_key: \"innercontainer\",\n ref: innercontainer,\n class: \"bb-pagination__pages\"\n }, [\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"button\", {\n class: \"bb-pagination__page bb-pagination__page--previous\",\n disabled: props.modelValue <= 1 || _ctx.loading || _ctx.disabled,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('update:modelValue', props.modelValue - 1)))\n }, [\n _renderSlot(_ctx.$slots, \"previous\", {}, () => [\n _createTextVNode(\"Precedente\")\n ])\n ], 8, _hoisted_2)\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items.value, (item) => {\n return (_openBlock(), _createElementBlock(\"li\", null, [\n _createElementVNode(\"button\", {\n class: _normalizeClass([\"bb-pagination__page\", {\n\t\t\t\t\t\t\t'bb-pagination__page--active': item.active,\n\t\t\t\t\t\t\t'bb-pagination__page--ellipsis': item.ellipsis,\n\t\t\t\t\t\t}]),\n disabled: item.disabled,\n onClick: ($event: any) => (emit('update:modelValue', item.key))\n }, [\n (item.ellipsis === true)\n ? _renderSlot(_ctx.$slots, \"ellipsis\", { key: 0 }, () => [\n _createTextVNode(_toDisplayString(props.ellipsis), 1)\n ])\n : _renderSlot(_ctx.$slots, \"item\", {\n key: 1,\n active: item.active,\n disabled: item.disabled,\n item: item.key\n }, () => [\n _createTextVNode(_toDisplayString(item.key), 1)\n ])\n ], 10, _hoisted_3)\n ]))\n }), 256)),\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"button\", {\n class: \"bb-pagination__page bb-pagination__page--next\",\n disabled: props.modelValue >= +totalPages.value || _ctx.loading || _ctx.disabled,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('update:modelValue', props.modelValue + 1)))\n }, [\n _renderSlot(_ctx.$slots, \"next\", {}, () => [\n _createTextVNode(\"Successivi\")\n ])\n ], 8, _hoisted_4)\n ])\n ], 512)\n ])\n ], 512))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","props","emit","totalPages","computed","start","ref","maxSize","outercontainer","innercontainer","buttonFootprint","adjustMaxElements","nextTick","observer","debounce","onMounted","button","numberAsString","gap","onBeforeUnmount","range","createRange","even","middle","left","right","rangeLength","rangeStart","items","item","index","length","_","k","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","$event","_renderSlot","_createTextVNode","_Fragment","_renderList","_normalizeClass","_toDisplayString"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,cAAc,iBAC7BC,IAAa,CAAC,UAAU,GACxBC,IAAa,CAAC,YAAY,SAAS,GACnCC,IAAa,CAAC,UAAU,GAgDFC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,UAAU,EAAE,SAAS,MAAM;AAAA,IAC3B,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,YAAY,EAAE,SAAS,EAAE;AAAA,EAC3B;AAAA,EACA,OAAO,CAAC,mBAAmB;AAAA,EAC3B,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,UAAMC,IAAQF,GAERG,IAAOF,GAIPG,IAAaC,EAAS,MAAM,CAACH,EAAM,UAAU,GAC7CI,IAAQC,EAAI,CAAC,GACbC,IAAUD,EAAI,CAACL,EAAM,OAAO,GAE5BO,IAAiBF,KACjBG,IAAiBH,KAEjBI,IAAkBJ,EAAY,KAAQ,GAQtCK,IAAoB,MAAM;AAC3B,MAAAH,EAAe,SAASC,EAAe,UAEtCD,EAAe,MAAM,cAAcC,EAAe,MAAM,cACvDF,EAAQ,QAAQ,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AAA,IACDuC,EAAYN,EAAK,QAAQ,QAAQ;AAAA,gBAC/B,KAAK;AAAA,gBACL,QAAQL,EAAK;AAAA,gBACb,UAAUA,EAAK;AAAA,gBACf,MAAMA,EAAK;AAAA,cAAA,GACV,MAAM;AAAA,gBACPY,EAAiBI,EAAiBhB,EAAK,GAAG,GAAG,CAAC;AAAA,cAAA,CAC/C;AAAA,YAAA,GACJ,IAAIlC,CAAU;AAAA,UAAA,CAClB,EACF,GAAG,GAAG;AAAA,UACP2C,EAAoB,MAAM,MAAM;AAAA,YAC9BA,EAAoB,UAAU;AAAA,cAC5B,OAAO;AAAA,cACP,UAAUrC,EAAM,cAAc,CAACE,EAAW,SAAS+B,EAAK,WAAWA,EAAK;AAAA,cACxE,SAASC,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAACI,MAAiBrC,EAAK,qBAAqBD,EAAM,aAAa,CAAC;AAAA,YAAA,GAClG;AAAA,cACDuC,EAAYN,EAAK,QAAQ,QAAQ,IAAI,MAAM;AAAA,gBACzCO,EAAiB,YAAY;AAAA,cAAA,CAC9B;AAAA,YAAA,GACA,GAAG7C,CAAU;AAAA,UAAA,CACjB;AAAA,WACA,GAAG;AAAA,MAAA,CACP;AAAA,OACA,GAAG;AAAA,EAER;AAEA,CAAC;"}
1
+ {"version":3,"file":"index77.js","sources":["../src/components/BbPagination/BbPagination.vue"],"sourcesContent":["<template>\n\t<div ref=\"outercontainer\" class=\"bb-pagination\">\n\t\t<nav aria-label=\"Navigazione\">\n\t\t\t<ul ref=\"innercontainer\" class=\"bb-pagination__pages\">\n\t\t\t\t<li>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--previous\"\n\t\t\t\t\t\t:disabled=\"props.modelValue <= 1 || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue - 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"previous\">Precedente</slot>\n\t\t\t\t\t</button>\n\t\t\t\t</li>\n\t\t\t\t<li v-for=\"item in items\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bb-pagination__page\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-pagination__page--active': item.active,\n\t\t\t\t\t\t\t'bb-pagination__page--ellipsis': item.ellipsis,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', item.key)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template v-if=\"item.ellipsis === true\">\n\t\t\t\t\t\t\t<slot name=\"ellipsis\">\n\t\t\t\t\t\t\t\t{{ props.ellipsis }}\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:active=\"item.active\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:item=\"item.key\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ item.key }}\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</button>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--next\"\n\t\t\t\t\t\t:disabled=\"props.modelValue >= +totalPages || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue + 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"next\">Successivi</slot>\n\t\t\t\t\t</button>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport { debounce } from '@/utilities/functions/debounce';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbPaginationProps = Pick<CommonProps, 'disabled' | 'loading'> & {\n\t/**\n\t * String of text displayed in place of hidden pages\n\t */\n\tellipsis?: string;\n\t/**\n\t * Maximum number of clickable pages displayed at all times.\n\t * This has a tolerance of +/- 1 for odd / even numbering.\n\t * It does not include ellipses.\n\t */\n\tmaxSize?: number | string;\n\t/**\n\t * Used by v-model. Indicates the current page.\n\t */\n\tmodelValue: number;\n\t/**\n\t * Total number of pages there is.\n\t */\n\ttotalPages?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPaginationProps>(), {\n\tmodelValue: 1,\n\ttotalPages: 1,\n\tellipsis: '...',\n\tmaxSize: 5,\n});\n\nexport type BbPaginationEvents = {\n\t(e: 'update:modelValue', value: number): void;\n};\n\nconst emit = defineEmits(['update:modelValue']);\n\ndefineSlots<{\n\tprevious?: (props: {}) => any;\n\tnext?: (props: {}) => any;\n\titem?: (props: { active: boolean; disabled: boolean; item: number }) => any;\n\tellipsis?: (props: {}) => any;\n}>();\n\nconst totalPages = computed(() => +props.totalPages);\nconst start = ref(1);\nconst maxSize = ref(+props.maxSize);\n\nconst outercontainer = ref<HTMLElement>();\nconst innercontainer = ref<HTMLElement>();\n\nconst buttonFootprint = ref<number>(Infinity);\n\n/**\n * Adjusts how many buttons to show.\n * if current buttons can't fit subtract maxSize until they do or until minimum is reached\n * if more buttons could fit add buttons until the don't\n * If minimum or maximum is reached just quit until next resize\n */\nconst adjustMaxElements = () => {\n\tif (outercontainer.value && innercontainer.value) {\n\t\t/* If some buttons do not fit */\n\t\tif (outercontainer.value.clientWidth < innercontainer.value.clientWidth) {\n\t\t\tif (maxSize.value - 1 > 3) {\n\t\t\t\tmaxSize.value--;\n\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t} else {\n\t\t\t\tmaxSize.value = 3;\n\t\t\t}\n\t\t\t/* If all current buttons do fit */\n\t\t} else {\n\t\t\t/* If some buttons have been hidden */\n\t\t\tif (maxSize.value < +props.maxSize) {\n\t\t\t\tif (\n\t\t\t\t\t/* If there is enough space to fit one */\n\t\t\t\t\toutercontainer.value.clientWidth - innercontainer.value.clientWidth >\n\t\t\t\t\tbuttonFootprint.value\n\t\t\t\t) {\n\t\t\t\t\tmaxSize.value = Math.min(maxSize.value + 1, +props.maxSize);\n\t\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nif (globalThis.ResizeObserver) {\n\tconst observer = new ResizeObserver(debounce(adjustMaxElements, 200));\n\tonMounted(() => {\n\t\tif (outercontainer.value && innercontainer.value) {\n\t\t\tconst button = outercontainer.value.querySelectorAll(\n\t\t\t\t'.bb-pagination__page'\n\t\t\t)[1];\n\t\t\tif (button) {\n\t\t\t\t/* Compute the footprint necessary to render a new button */\n\t\t\t\tconst gapString = getComputedStyle(innercontainer.value).columnGap;\n\t\t\t\tconst numberAsString = gapString.replaceAll(/\\D/g, '');\n\t\t\t\tconst gap = Number(numberAsString);\n\t\t\t\tbuttonFootprint.value = button.clientWidth + gap;\n\t\t\t}\n\t\t\tobserver.observe(outercontainer.value);\n\t\t}\n\t});\n\tonBeforeUnmount(() => {\n\t\tobserver.disconnect();\n\t});\n}\n\nconst range = computed(() => {\n\tif (\n\t\ttotalPages.value <= 0 ||\n\t\tisNaN(totalPages.value) ||\n\t\ttotalPages.value > Number.MAX_SAFE_INTEGER\n\t)\n\t\treturn [];\n\n\tif (maxSize.value <= 1) return [props.modelValue];\n\n\tif (totalPages.value <= maxSize.value) {\n\t\treturn createRange(totalPages.value, start.value);\n\t}\n\n\tconst even = maxSize.value % 2 === 0;\n\tconst middle = even ? maxSize.value / 2 : Math.floor(maxSize.value / 2);\n\tconst left = even ? middle : middle + 1;\n\tconst right = totalPages.value - middle;\n\n\tif (left - props.modelValue >= 0) {\n\t\treturn [\n\t\t\t...createRange(Math.max(1, maxSize.value - 1), start.value),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t} else if (props.modelValue - right >= (even ? 1 : 0)) {\n\t\tconst rangeLength = maxSize.value - 1;\n\t\tconst rangeStart = totalPages.value - rangeLength + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t];\n\t} else {\n\t\tconst rangeLength = Math.max(1, maxSize.value - 3);\n\t\tconst rangeStart =\n\t\t\trangeLength === 1\n\t\t\t\t? props.modelValue\n\t\t\t\t: props.modelValue - Math.ceil(rangeLength / 2) + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t}\n});\n\ntype Item =\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: string;\n\t\t\tpage: string;\n\t\t\tellipsis: true;\n\t\t\tdisabled: boolean;\n\t }\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: number;\n\t\t\tpage: number;\n\t\t\tellipsis: false;\n\t\t\tdisabled: boolean;\n\t };\n\nconst items = computed<Item[]>(() => {\n\treturn range.value.map((item, index) => {\n\t\tif (typeof item === 'string') {\n\t\t\treturn {\n\t\t\t\tactive: false,\n\t\t\t\tkey: `ellipsis-${index}`,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: true,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst active = item === props.modelValue;\n\t\t\treturn {\n\t\t\t\tactive,\n\t\t\t\tkey: item,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: false,\n\t\t\t\tdisabled: !!props.disabled || +props.totalPages < 2 || props.loading,\n\t\t\t};\n\t\t}\n\t});\n});\n\nconst createRange = (length: number, start = 0): number[] => {\n\treturn Array.from({ length }, (_, k) => start + k);\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPagination';\n</style>\n"],"names":["props","__props","emit","__emit","totalPages","computed","start","ref","maxSize","outercontainer","innercontainer","buttonFootprint","adjustMaxElements","nextTick","observer","debounce","onMounted","button","numberAsString","gap","onBeforeUnmount","range","createRange","even","middle","left","right","rangeLength","rangeStart","items","item","index","length","_","k"],"mappings":";;;;;;;;;;;;;;AAgFA,UAAMA,IAAQC,GAWRC,IAAOC,GASPC,IAAaC,EAAS,MAAM,CAACL,EAAM,UAAU,GAC7CM,IAAQC,EAAI,CAAC,GACbC,IAAUD,EAAI,CAACP,EAAM,OAAO,GAE5BS,IAAiBF,KACjBG,IAAiBH,KAEjBI,IAAkBJ,EAAY,KAAQ,GAQtCK,IAAoB,MAAM;AAC3B,MAAAH,EAAe,SAASC,EAAe,UAEtCD,EAAe,MAAM,cAAcC,EAAe,MAAM,cACvDF,EAAQ,QAAQ,IAAI,KACfA,EAAA,SACRK,EAASD,CAAiB,KAE1BJ,EAAQ,QAAQ,IAKbA,EAAQ,QAAQ,CAACR,EAAM;AAAA,MAGzBS,EAAe,MAAM,cAAcC,EAAe,MAAM,cACxDC,EAAgB,UAERH,EAAA,QAAQ,KAAK,IAAIA,EAAQ,QAAQ,GAAG,CAACR,EAAM,OAAO,GAC1Da,EAASD,CAAiB;AAAA,IAI9B;AAED,QAAI,WAAW,gBAAgB;AAC9B,YAAME,IAAW,IAAI,eAAeC,EAASH,GAAmB,GAAG,CAAC;AACpE,MAAAI,EAAU,MAAM;AACX,YAAAP,EAAe,SAASC,EAAe,OAAO;AAC3C,gBAAAO,IAASR,EAAe,MAAM;AAAA,YACnC;AAAA,YACC,CAAC;AACH,cAAIQ,GAAQ;AAGX,kBAAMC,IADY,iBAAiBR,EAAe,KAAK,EAAE,UACxB,WAAW,OAAO,EAAE,GAC/CS,IAAM,OAAOD,CAAc;AACjB,YAAAP,EAAA,QAAQM,EAAO,cAAcE;AAAA,UAC9C;AACS,UAAAL,EAAA,QAAQL,EAAe,KAAK;AAAA,QACtC;AAAA,MAAA,CACA,GACDW,EAAgB,MAAM;AACrB,QAAAN,EAAS,WAAW;AAAA,MAAA,CACpB;AAAA,IACF;AAEM,U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AM,IAAI,CAACS,GAAMC,MACzB,OAAOD,KAAS,WACZ;AAAA,MACN,QAAQ;AAAA,MACR,KAAK,YAAYC,CAAK;AAAA,MACtB,MAAMD;AAAA,MACN,UAAU;AAAA,MACV,UAAU;AAAA,IAAA,IAIJ;AAAA,MACN,QAFcA,MAAS9B,EAAM;AAAA,MAG7B,KAAK8B;AAAA,MACL,MAAMA;AAAA,MACN,UAAU;AAAA,MACV,UAAU,CAAC,CAAC9B,EAAM,YAAY,CAACA,EAAM,aAAa,KAAKA,EAAM;AAAA,IAAA,CAG/D,CACD,GAEKsB,IAAc,CAACU,GAAgB1B,IAAQ,MACrC,MAAM,KAAK,EAAE,QAAA0B,KAAU,CAACC,GAAGC,MAAM5B,IAAQ4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index78.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index78.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index78.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index78.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index79.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as V, ref as a, computed as _, openBlock as p, createElementBlock as h, mergeProps as B, createElementVNode as d, renderSlot as P, normalizeProps as I, guardReactiveProps as R, unref as g, createBlock as D, Teleport as U, normalizeClass as W, normalizeStyle as j, createCommentVNode as y, withCtx as G, nextTick as J } from "vue";
2
2
  import { useFloating as K, arrow as Q } from "./index223.js";
3
- import { useFocusTrap as X } from "./index201.js";
3
+ import { useFocusTrap as X } from "./index208.js";
4
4
  import { useId as Y } from "./index7.js";
5
5
  import { wait as E } from "./index122.js";
6
6
  import Z from "./index9.js";
7
7
  import "./index10.js";
8
- import { autoUpdate as ee, flip as oe, shift as te } from "./index214.js";
9
- import { offset as ae } from "./index219.js";
8
+ import { autoUpdate as ee, flip as oe, shift as te } from "./index212.js";
9
+ import { offset as ae } from "./index217.js";
10
10
  const re = ["id"], ne = {
11
11
  key: 1,
12
12
  class: "bb-popover__bubble"
@@ -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, createCommentVNode as _createCommentVNode, withCtx as _withCtx, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"bb-popover__bubble\"\n}\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"none\",\n viewBox: \"0 0 24 24\",\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-linecap\": \"round\",\n \"stroke-width\": \"2\"\n })\n], -1)\n\nimport { computed, nextTick, ref } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\toffset,\n\tarrow,\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\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(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\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t],\n\t}\n);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n});\n\nconst containerStyle = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t};\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}px`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}px`;\n\t\t}\n\t\tbase.width = width;\n\t}\n\treturn base;\n});\n\nconst openPopover = async () => {\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus();\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n ref_key: \"wrapper\",\n ref: wrapper,\n class: \"bb-popover__wrapper\"\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open.value,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid: id,\n\t\t\t\t\t\tdisabled: !!_ctx.disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed.value,\n\t\t\t\t\tclosing: closing.value,\n\t\t\t\t\tdisabled: !!_ctx.disabled,\n\t\t\t\t\topen: open.value,\n\t\t\t\t\topening: opening.value,\n\t\t\t\t\tplacement: _unref(placement),\n\t\t\t\t})))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n id: `popover_${id}`,\n ref_key: \"content\",\n ref: content,\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n\t\t\t\t\t[`bb-popover__bubble-container--${_unref(placement)}`]: true,\n\t\t\t\t\t[`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n\t\t\t\t\t'bb-popover__bubble-container--hidden': closed.value,\n\t\t\t\t\t'bb-popover__bubble-container--closing': closing.value,\n\t\t\t\t\t'bb-popover__bubble-container--opening': opening.value,\n\t\t\t\t\t'bb-popover__bubble-container--open': open.value,\n\t\t\t\t}]),\n style: _normalizeStyle(containerStyle.value)\n }, [\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", _mergeProps({\n key: 0,\n ref_key: \"bubblearrow\",\n ref: bubblearrow,\n class: \"bb-popover__arrow\"\n }, arrowAttributes.value), null, 16))\n : _createCommentVNode(\"\", true),\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"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\", {\n close: onClickClose,\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 ]))\n : _createCommentVNode(\"\", true)\n ], 14, _hoisted_1)\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","_createCommentVNode","BaseButton","_withCtx"],"mappings":";;;;;;;;;AAGA,MAAMA,KAAa,CAAC,IAAI,GAClBC,KAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,uBAA8C,QAAQ,EAAE,OAAO,6BAA6B,UAAU,EAAE,GACxGC,uBAA8C,OAAO;AAAA,EACzD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAAA,CACjB;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;AAAA,IAC1C,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,aAAa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AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDiE,EAAoB,IAAI,EAAI;AAAA,YAChCR,EAAYN,EAAK,QAAQ,WAAW;AAAA,cAClC,OAAOD;AAAA,cACP,QAAQb,EAAO;AAAA,cACf,SAASD,EAAQ;AAAA,cACjB,UAAU,CAAC,CAACe,EAAK;AAAA,cACjB,MAAMhB,EAAK;AAAA,cACX,SAASD,EAAQ;AAAA,cACjB,WAAW0B,EAAOpC,CAAS;AAAA,YAAA,CAC5B;AAAA,UAAA,CACF,KACDyC,EAAoB,IAAI,EAAI;AAAA,QAAA,GAC/B,IAAIpE,EAAU;AAAA,MAAA,CAClB;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index79.js","sources":["../src/components/BbPopover/BbPopover.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-popover\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-popover__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport to=\"body\">\n\t\t\t<span\n\t\t\t\t:id=\"`popover_${id}`\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-popover__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-popover__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-popover__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-popover__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-popover__bubble-container--closing': closing,\n\t\t\t\t\t'bb-popover__bubble-container--opening': opening,\n\t\t\t\t\t'bb-popover__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"containerStyle\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-popover__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span v-if=\"hasOpenedOnce || eager\" class=\"bb-popover__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\tclass=\"bb-popover__close\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"bb-popover__close-label\">Chiudi</span>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:close=\"onClickClose\"\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\toffset,\n\tarrow,\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\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPopoverProps>(), {\n\tarrowPadding: 10,\n\toffset: 3,\n\tpadding: 10,\n\tplacement: 'bottom',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n};\n\nconst emit = defineEmits<BbPopoverEvents>();\n\ndefineSlots<{\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-controls': string;\n\t\t\t'aria-expanded': boolean;\n\t\t\tonClick: typeof onTriggerClick;\n\t\t\tid: string;\n\t\t\tdisabled: boolean;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: {\n\t\tclose: typeof onClickClose;\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\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\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t],\n\t}\n);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n});\n\nconst containerStyle = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t};\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}px`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}px`;\n\t\t}\n\t\tbase.width = width;\n\t}\n\treturn base;\n});\n\nconst openPopover = async () => {\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus();\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPopover';\n</style>\n"],"names":["props","__props","emit","__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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuHA,UAAMA,IAAQC,GAeRC,IAAOC,GA6BP,EAAE,IAAIC,EAAI,IAAIC,EAAM,GACpBC,IAAK,OAAOF,EAAI,KAAK,IAErBG,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,UAAAG,GAAU,YAAAC,MAAeC,EAAaJ,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQtD,yBAAyB,CAACK,MAAU;;AACnC,cAAMC,IAASD,EAAM;AACrB,eAAIC,aAAkB,gBACjBC,IAAAT,EAAQ,UAAR,QAAAS,EAAe,SAASD,OAIhBE,KACbf,EAAK,QAAQ,IACN;AAAA,MACR;AAAA,MACA,mBAAmB,OAClBgB,EAAS,YAAY;AACpB,cAAMD,EAAa,GACNE,KACbjB,EAAK,QAAQ;AAAA,MAAA,CACb,GACM;AAAA;AAAA;AAAA;AAAA;AAAA,MAMR,yBAAyB;AAAA,IAAA,CACzB,GAEK,EAAE,gBAAAkB,GAAgB,WAAAC,GAAW,gBAAAC,EAAmB,IAAAC;AAAA,MACr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,GACNE,KACbjB,EAAK,QAAQ;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index80.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index80.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index80.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index80.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index81.js","sources":["../src/components/BbProgress/BbProgress.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue?: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n\t/**\n\t * Displays the component as vertical.\n\t */\n\tvertical?: boolean;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbProgress',\n props: {\n modelValue: { default: 0 },\n min: { default: 0 },\n max: { default: 100 },\n vertical: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props;\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"bb-progress\", {\n\t\t\t'bb-progress--vertical': _ctx.vertical,\n\t\t\t'bb-progress--horizontal': !_ctx.vertical,\n\t\t}])\n }, [\n _createElementVNode(\"div\", {\n class: \"bb-progress-bar\",\n style: _normalizeStyle({ [_ctx.vertical ? 'height' : 'width']: width.value + '%' })\n }, null, 4)\n ], 2))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","width","computed","clamp","getAsPercentageBetween","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_normalizeStyle"],"mappings":";;;AA8BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,KAAK,EAAE,SAAS,EAAE;AAAA,IAClB,KAAK,EAAE,SAAS,IAAI;AAAA,IACpB,UAAU,EAAE,MAAM,QAAQ;AAAA,EAC5B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAERE,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBJ,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;AAGM,WAAA,CAACK,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,OAAOC,EAAgB,CAAC,eAAe;AAAA,QACxC,yBAAyBJ,EAAK;AAAA,QAC9B,2BAA2B,CAACA,EAAK;AAAA,MAAA,CACjC,CAAC;AAAA,IAAA,GACC;AAAA,MACDK,EAAoB,OAAO;AAAA,QACzB,OAAO;AAAA,QACP,OAAOC,EAAgB,EAAE,CAACN,EAAK,WAAW,WAAW,OAAO,GAAGJ,EAAM,QAAQ,KAAK;AAAA,MAAA,GACjF,MAAM,CAAC;AAAA,OACT,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index81.js","sources":["../src/components/BbProgress/BbProgress.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-progress\"\n\t\t:class=\"{\n\t\t\t'bb-progress--vertical': vertical,\n\t\t\t'bb-progress--horizontal': !vertical,\n\t\t}\"\n\t>\n\t\t<div\n\t\t\tclass=\"bb-progress-bar\"\n\t\t\t:style=\"{ [vertical ? 'height' : 'width']: width + '%' }\"\n\t\t></div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue?: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n\t/**\n\t * Displays the component as vertical.\n\t */\n\tvertical?: boolean;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\nconst props = withDefaults(defineProps<BbProgressProps>(), {\n\tmodelValue: 0,\n\tmin: 0,\n\tmax: 100,\n});\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbProgress';\n</style>\n"],"names":["props","__props","width","computed","clamp","getAsPercentageBetween"],"mappings":";;;;;;;;;;;;AA0CA,UAAMA,IAAQC,GAMRC,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBL,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;;;;;;;;;;;;;;"}
package/dist/index82.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index82.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index82.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index82.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index83.js","sources":["../src/components/BbRadio/BbRadio.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 BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type {\n\tSlotAttributes,\n\tBaseRadioEvents,\n} from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nexport type BbRadioEvents = BaseRadioEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRadio',\n props: {\n autofocus: {},\n checked: {},\n color: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n modelValue: {},\n name: {},\n readonly: {},\n value: {},\n direction: { default: 'auto' },\n errors: {},\n hideLabel: { type: Boolean },\n inputPosition: {},\n label: {},\n labelPosition: {},\n reverse: { type: Boolean, default: true }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n id: _ctx.id,\n class: \"bb-radio\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLabel,\n \"input-position\": _ctx.inputPosition,\n label: _ctx.label,\n \"label-position\": _ctx.labelPosition,\n \"label-tag\": 'span',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'label'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseRadio, _mergeProps({\n id: id,\n autofocus: _ctx.autofocus,\n checked: _ctx.checked,\n color: _ctx.color,\n disabled: _ctx.disabled,\n \"has-errors\": hasErrors,\n \"model-value\": _ctx.modelValue,\n name: name,\n readonly: _ctx.readonly,\n value: _ctx.value\n }, eventListeners), {\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps(data, { text: _ctx.label }))\n ]),\n _: 2\n }, 1040, [\"id\", \"autofocus\", \"checked\", \"color\", \"disabled\", \"has-errors\", \"model-value\", \"name\", \"readonly\", \"value\"])\n ]),\n _: 3\n }, 8, [\"id\", \"direction\", \"errors\", \"has-errors\", \"hide-label\", \"input-position\", \"label\", \"label-position\", \"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","BaseRadio","_mergeProps"],"mappings":";;;;;AAyGA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,SAAS,CAAC;AAAA,IACV,OAAO,CAAC;A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t:id=\"id\"\n\t\tclass=\"bb-radio\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label-tag=\"'span'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:tag=\"'label'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors }\">\n\t\t\t<BaseRadio\n\t\t\t\t:id=\"id\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:checked=\"checked\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:value=\"value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\" :text=\"label\" /></template\n\t\t\t></BaseRadio>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type {\n\tSlotAttributes,\n\tBaseRadioEvents,\n} from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nexport type BbRadioEvents = BaseRadioEvents;\n\nwithDefaults(defineProps<BbRadioProps>(), {\n\tdirection: 'auto',\n\treverse: true,\n});\n\nconst emit = defineEmits<BbRadioEvents>();\n\ndefineSlots<{\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\ticon?: (props: SlotAttributes & { text: string }) => any;\n}>();\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbRadio';\n</style>\n"],"names":["emit","__emit","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgJA,UAAMA,IAAOC,GAOPC,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBH,EAAK,QAAQG,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBH,EAAK,UAAUG,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBH,EAAK,SAASG,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBH,EAAK,SAASG,CAAK;AAAA,MACnD,SAAS,CAACA,MAAiBH,EAAK,SAASG,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBH,EAAK,WAAWG,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBH,EAAK,aAAaG,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBH,EAAK,WAAWG,CAAK;AAAA,MACvD,uBAAuB,CAACC,MAAeJ,EAAK,qBAAqBI,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index84.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index84.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index84.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index84.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index85.js","sources":["../src/components/BbRadioGroup/BbRadioGroup.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 BaseRadioGroup from '../BaseRadioGroup/BaseRadioGroup.vue';\nimport type { BaseRadioGroupEvents } from '../BaseRadioGroup/BaseRadioGroup.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { SlotAttributes } from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioGroupEvents = BaseRadioGroupEvents;\n\nexport type BbRadioGroupProps<T> = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| T[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<T[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => T[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => any) | undefined;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Defines the strategy used to understand whether an option has been selected.\n\t * `string` is 40% faster but relies on property order.\n\t * `equality` is more reliable but is slower.\n\t */\n\tmatchStrategy?: 'string' | 'equality';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\t/**\n\t * Visually hides the legend of the fieldset while maintaining accessibility.\n\t */\n\thideLegend?: boolean;\n\n\t/**\n\t * Defines the direction of the inputs in the fieldset\n\t */\n\tinputDirection?: 'horizontal' | 'vertical';\n\n\t/**\n\t * Text content of the legend.\n\t */\n\tlegend: string;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRadioGroup',\n props: {\n autofocus: {},\n color: {},\n dependencies: {},\n depsDebounceTime: {},\n disabled: { type: Boolean },\n enforceCoherence: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n items: { type: [Array, Function] },\n itemText: {},\n itemValue: {},\n loadingText: {},\n matchStrategy: {},\n modelValue: {},\n modelValueDebounceTime: {},\n name: {},\n noDataText: {},\n readonly: {},\n errors: {},\n hideLabel: { type: Boolean },\n reverse: { type: Boolean },\n hideLegend: { type: Boolean },\n inputDirection: {},\n legend: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\", \"inactive\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonInactive: () => emit('inactive'),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (event: any) => emit('update:modelValue', event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n id: _ctx.id,\n class: \"bb-radio-group\",\n direction: 'vertical',\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLegend,\n label: _ctx.legend,\n \"label-tag\": 'legend',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'fieldset'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"legend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name }) => [\n _createVNode(BaseRadioGroup, _mergeProps({\n id: id,\n autofocus: _ctx.autofocus,\n color: _ctx.color,\n dependencies: _ctx.dependencies,\n \"deps-debounce-time\": _ctx.depsDebounceTime,\n direction: _ctx.inputDirection,\n disabled: _ctx.disabled,\n \"enforce-coherence\": _ctx.enforceCoherence,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLabel,\n \"item-text\": _ctx.itemText as any,\n \"item-value\": _ctx.itemValue as any,\n items: _ctx.items as any,\n \"loading-text\": _ctx.loadingText,\n \"match-strategy\": _ctx.matchStrategy,\n \"model-value\": _ctx.modelValue,\n \"model-value-debounce-time\": _ctx.modelValueDebounceTime,\n name: name,\n \"no-data-text\": _ctx.noDataText,\n readonly: _ctx.readonly\n }, eventListeners), {\n prepend: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"prepend\", _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:prepend\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option:prepend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n \"option:append\": _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"option:append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n append: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"append\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n _: 2\n }, 1040, [\"id\", \"autofocus\", \"color\", \"dependencies\", \"deps-debounce-time\", \"direction\", \"disabled\", \"enforce-coherence\", \"has-errors\", \"hide-label\", \"item-text\", \"item-value\", \"items\", \"loading-text\", \"match-strategy\", \"model-value\", \"model-value-debounce-time\", \"name\", \"no-data-text\", \"readonly\"])\n ]),\n _: 3\n }, 8, [\"id\", \"errors\", \"has-errors\", \"hide-label\", \"label\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","_createVNode","BaseRadioGroup","_mergeProps"],"mappings":";;;;;AAqJA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,OAAO,CAAC;AAAA,IACR,cAAc,CAAC;AAAA,IACf,kBAAkB,CAAC;AAAA,IACnB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,kBAAkB,EAAE,MAAM,QAAQ;AAAA,IAClC,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,OAAO,EAAE,MAAM,CAAC,OAAO,QAAQ,EAAE;AAAA,IACjC,UAAU,CAAC;AAAA,IACX,WAAW,CAAC;AAAA,IACZ,aAAa,CAAC;AAAA,IACd,eAAe,CAAC;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,wBAAwB,CAAC;AAAA,IACzB,MAAM,CAAC;AAAA,IACP,YAAY,CAAC;AAAA,IACb,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,gBAAgB,CAAC;AAAA,IACjB,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,qBAAqB,UAAU;AAAA,EACvH,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAIxC,UAAMC,IAAOD,GAIPE,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBF,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EAAoBH,CAAI,CAAC,CAAC;AAAA,UAAA,CACrF;AAAA,UACD,QAAQD,EAAS,CAACC,MAAS;AAAA,YACzBC,EAAYP,EAAK,QAAQ,UAAUQ,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,UAAA,CAC9E;AAAA,UACD,GAAG;AAAA,QACL,GAAG,MAAM,CAAC,MAAM,aAAa,SAAS,gBAAgB,sBAAsB,aAAa,YAAY,qBAAqB,cAAc,cAAc,aAAa,cAAc,SAAS,gBAAgB,kBAAkB,eAAe,6BAA6B,QAAQ,gBAAgB,UAAU,CAAC;AAAA,MAAA,CAC5S;AAAA,MACD,GAAG;AAAA,IAAA,GACF,GAAG,CAAC,MAAM,UAAU,cAAc,cAAc,SAAS,QAAQ,SAAS,CAAC;AAAA,EAEhF;AAEA,CAAC;"}
1
+ {"version":3,"file":"index85.js","sources":["../src/components/BbRadioGroup/BbRadioGroup.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-radio-group\"\n\t\t:direction=\"'vertical'\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLegend\"\n\t\t:label=\"legend\"\n\t\t:label-tag=\"'legend'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:tag=\"'fieldset'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"legend\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name }\">\n\t\t\t<BaseRadioGroup\n\t\t\t\t:id=\"id\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:dependencies=\"dependencies\"\n\t\t\t\t:deps-debounce-time=\"depsDebounceTime\"\n\t\t\t\t:direction=\"inputDirection\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:enforce-coherence=\"enforceCoherence\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:hide-label=\"hideLabel\"\n\t\t\t\t:item-text=\"itemText as any\"\n\t\t\t\t:item-value=\"itemValue as any\"\n\t\t\t\t:items=\"items as any\"\n\t\t\t\t:loading-text=\"loadingText\"\n\t\t\t\t:match-strategy=\"matchStrategy\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:model-value-debounce-time=\"modelValueDebounceTime\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:no-data-text=\"noDataText\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #prepend=\"data\"\n\t\t\t\t\t><slot name=\"prepend\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #loading=\"data\"\n\t\t\t\t\t><slot name=\"loading\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #no-data=\"data\"\n\t\t\t\t\t><slot name=\"no-data\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #option:prepend=\"data\"\n\t\t\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #label=\"data\"\n\t\t\t\t\t><slot name=\"label\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #option:append=\"data\"\n\t\t\t\t\t><slot name=\"option:append\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #append=\"data\"\n\t\t\t\t\t><slot name=\"append\" v-bind=\"data\"></slot\n\t\t\t\t></template>\n\t\t\t</BaseRadioGroup>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadioGroup from '../BaseRadioGroup/BaseRadioGroup.vue';\nimport type { BaseRadioGroupEvents } from '../BaseRadioGroup/BaseRadioGroup.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { SlotAttributes } from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioGroupEvents = BaseRadioGroupEvents;\n\nexport type BbRadioGroupProps<T> = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| T[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<T[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => T[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => any) | undefined;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Defines the strategy used to understand whether an option has been selected.\n\t * `string` is 40% faster but relies on property order.\n\t * `equality` is more reliable but is slower.\n\t */\n\tmatchStrategy?: 'string' | 'equality';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\t/**\n\t * Visually hides the legend of the fieldset while maintaining accessibility.\n\t */\n\thideLegend?: boolean;\n\n\t/**\n\t * Defines the direction of the inputs in the fieldset\n\t */\n\tinputDirection?: 'horizontal' | 'vertical';\n\n\t/**\n\t * Text content of the legend.\n\t */\n\tlegend: string;\n};\ndefineProps<BbRadioGroupProps<T>>();\n\nconst emit = defineEmits<BbRadioGroupEvents>();\n\ndefineSlots<{\n\tprepend?: (props: {}) => any;\n\tloading?: (props: {}) => any;\n\t'no-data'?: (props: {}) => any;\n\t'option:prepend'?: (props: { item: any }) => any;\n\ticon?: (\n\t\tprops: SlotAttributes & {\n\t\t\titem: any;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: any; text: string; checked: boolean }) => any;\n\t'option:append'?: (props: { item: any }) => any;\n\tappend?: (props: {}) => any;\n\tlegend?: (props: { text: string; hasErrors: boolean }) => any;\n}>();\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonInactive: () => emit('inactive'),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (event: any) => emit('update:modelValue', event),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbRadioGroup';\n</style>\n"],"names":["emit","__emit","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiNA,UAAMA,IAAOC,GAmBPC,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBH,EAAK,QAAQG,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBH,EAAK,UAAUG,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBH,EAAK,SAASG,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBH,EAAK,SAASG,CAAK;AAAA,MACnD,YAAY,MAAMH,EAAK,UAAU;AAAA,MACjC,SAAS,CAACG,MAAiBH,EAAK,SAASG,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBH,EAAK,WAAWG,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBH,EAAK,aAAaG,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBH,EAAK,WAAWG,CAAK;AAAA,MACvD,uBAAuB,CAACA,MAAeH,EAAK,qBAAqBG,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index86.js CHANGED
@@ -1,5 +1,2 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
1
+
5
2
  //# sourceMappingURL=index86.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index86.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index86.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}