bitboss-ui 0.2.76 → 1.0.0

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 (491) hide show
  1. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +4 -0
  2. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -3
  3. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +4 -1
  4. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +10 -4
  5. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +9 -0
  6. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -0
  7. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +4 -0
  8. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +10 -3
  9. package/dist/components/BaseRating/BaseRating.vue.d.ts +5 -1
  10. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -0
  11. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +48 -11
  12. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +6 -3
  13. package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -0
  14. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +10 -6
  15. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +4 -0
  16. package/dist/components/BbButton/BbButton.vue.d.ts +12 -0
  17. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +35 -27
  18. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +38 -24
  19. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +15 -3
  20. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +33 -25
  21. package/dist/components/BbRadio/BbRadio.vue.d.ts +33 -25
  22. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +38 -24
  23. package/dist/components/BbRating/BbRating.vue.d.ts +9 -1
  24. package/dist/components/BbSelect/BbSelect.vue.d.ts +18 -4
  25. package/dist/components/BbSlider/BbSlider.vue.d.ts +44 -11
  26. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +9 -3
  27. package/dist/components/BbTag/BbTag.vue.d.ts +11 -3
  28. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +33 -25
  29. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +9 -1
  30. package/dist/composables/useQueue.d.ts +58 -0
  31. package/dist/index.js +186 -185
  32. package/dist/index.js.map +1 -1
  33. package/dist/index10.js +65 -1
  34. package/dist/index10.js.map +1 -1
  35. package/dist/index100.js +227 -1
  36. package/dist/index100.js.map +1 -1
  37. package/dist/index101.js +1 -437
  38. package/dist/index101.js.map +1 -1
  39. package/dist/index102.js +437 -1
  40. package/dist/index102.js.map +1 -1
  41. package/dist/index103.js +1 -94
  42. package/dist/index103.js.map +1 -1
  43. package/dist/index104.js +103 -1
  44. package/dist/index104.js.map +1 -1
  45. package/dist/index105.js +1 -88
  46. package/dist/index105.js.map +1 -1
  47. package/dist/index106.js +97 -1
  48. package/dist/index106.js.map +1 -1
  49. package/dist/index107.js +1 -89
  50. package/dist/index107.js.map +1 -1
  51. package/dist/index108.js +98 -1
  52. package/dist/index108.js.map +1 -1
  53. package/dist/index109.js +1 -29
  54. package/dist/index109.js.map +1 -1
  55. package/dist/index11.js +1 -131
  56. package/dist/index11.js.map +1 -1
  57. package/dist/index110.js +29 -1
  58. package/dist/index110.js.map +1 -1
  59. package/dist/index111.js +1 -151
  60. package/dist/index111.js.map +1 -1
  61. package/dist/index112.js +151 -1
  62. package/dist/index112.js.map +1 -1
  63. package/dist/index113.js +1 -122
  64. package/dist/index113.js.map +1 -1
  65. package/dist/index114.js +122 -1
  66. package/dist/index114.js.map +1 -1
  67. package/dist/index115.js +1 -46
  68. package/dist/index115.js.map +1 -1
  69. package/dist/index116.js +40 -33
  70. package/dist/index116.js.map +1 -1
  71. package/dist/index117.js +32 -39
  72. package/dist/index117.js.map +1 -1
  73. package/dist/index118.js +39 -42
  74. package/dist/index118.js.map +1 -1
  75. package/dist/index119.js +43 -39
  76. package/dist/index119.js.map +1 -1
  77. package/dist/index12.js +128 -1
  78. package/dist/index12.js.map +1 -1
  79. package/dist/index120.js +43 -2
  80. package/dist/index120.js.map +1 -1
  81. package/dist/index121.js +2 -21
  82. package/dist/index121.js.map +1 -1
  83. package/dist/index122.js +21 -2
  84. package/dist/index122.js.map +1 -1
  85. package/dist/index123.js +2 -224
  86. package/dist/index123.js.map +1 -1
  87. package/dist/index124.js +224 -2
  88. package/dist/index124.js.map +1 -1
  89. package/dist/index125.js +2 -18
  90. package/dist/index125.js.map +1 -1
  91. package/dist/index126.js +16 -10
  92. package/dist/index126.js.map +1 -1
  93. package/dist/index127.js +12 -24
  94. package/dist/index127.js.map +1 -1
  95. package/dist/index128.js +24 -5
  96. package/dist/index128.js.map +1 -1
  97. package/dist/index129.js +5 -9
  98. package/dist/index129.js.map +1 -1
  99. package/dist/index13.js +1 -159
  100. package/dist/index13.js.map +1 -1
  101. package/dist/index130.js +8 -5
  102. package/dist/index130.js.map +1 -1
  103. package/dist/index131.js +5 -69
  104. package/dist/index131.js.map +1 -1
  105. package/dist/index132.js +70 -3
  106. package/dist/index132.js.map +1 -1
  107. package/dist/index133.js +2 -2
  108. package/dist/index134.js +2 -2
  109. package/dist/index135.js +2 -2
  110. package/dist/index136.js +2 -2
  111. package/dist/index137.js +2 -2
  112. package/dist/index138.js +2 -2
  113. package/dist/index139.js +2 -2
  114. package/dist/index14.js +161 -1
  115. package/dist/index14.js.map +1 -1
  116. package/dist/index140.js +2 -2
  117. package/dist/index141.js +2 -2
  118. package/dist/index142.js +2 -2
  119. package/dist/index143.js +2 -2
  120. package/dist/index144.js +2 -2
  121. package/dist/index145.js +2 -2
  122. package/dist/index146.js +2 -2
  123. package/dist/index147.js +2 -2
  124. package/dist/index148.js +2 -2
  125. package/dist/index149.js +2 -2
  126. package/dist/index15.js +1 -457
  127. package/dist/index15.js.map +1 -1
  128. package/dist/index150.js +2 -2
  129. package/dist/index151.js +2 -2
  130. package/dist/index152.js +2 -2
  131. package/dist/index153.js +2 -2
  132. package/dist/index154.js +2 -2
  133. package/dist/index155.js +2 -2
  134. package/dist/index156.js +2 -2
  135. package/dist/index157.js +2 -2
  136. package/dist/index158.js +5 -1
  137. package/dist/index158.js.map +1 -1
  138. package/dist/index159.js +1 -5
  139. package/dist/index159.js.map +1 -1
  140. package/dist/index16.js +514 -1
  141. package/dist/index16.js.map +1 -1
  142. package/dist/index160.js +5 -1
  143. package/dist/index160.js.map +1 -1
  144. package/dist/index161.js +1 -5
  145. package/dist/index161.js.map +1 -1
  146. package/dist/index162.js +2 -2
  147. package/dist/index163.js +2 -2
  148. package/dist/index164.js +2 -2
  149. package/dist/index165.js +2 -2
  150. package/dist/index166.js +2 -2
  151. package/dist/index167.js +3 -2
  152. package/dist/index167.js.map +1 -1
  153. package/dist/index168.js +2 -3
  154. package/dist/index168.js.map +1 -1
  155. package/dist/index169.js +5 -1
  156. package/dist/index169.js.map +1 -1
  157. package/dist/index17.js +1 -211
  158. package/dist/index17.js.map +1 -1
  159. package/dist/index170.js +1 -4
  160. package/dist/index170.js.map +1 -1
  161. package/dist/index171.js +2 -3
  162. package/dist/index171.js.map +1 -1
  163. package/dist/index172.js +2 -2
  164. package/dist/index173.js +2 -2
  165. package/dist/index174.js +2 -2
  166. package/dist/index175.js +2 -2
  167. package/dist/index176.js +2 -2
  168. package/dist/index177.js +2 -2
  169. package/dist/index178.js +2 -2
  170. package/dist/index179.js +2 -2
  171. package/dist/index18.js +220 -1
  172. package/dist/index18.js.map +1 -1
  173. package/dist/index180.js +2 -2
  174. package/dist/index181.js +2 -2
  175. package/dist/index182.js +2 -2
  176. package/dist/index183.js +5 -1
  177. package/dist/index183.js.map +1 -1
  178. package/dist/index184.js +1 -5
  179. package/dist/index184.js.map +1 -1
  180. package/dist/index185.js +5 -1
  181. package/dist/index185.js.map +1 -1
  182. package/dist/index186.js +1 -5
  183. package/dist/index186.js.map +1 -1
  184. package/dist/index187.js +2 -2
  185. package/dist/index188.js +2 -2
  186. package/dist/index189.js +2 -2
  187. package/dist/index19.js +1 -239
  188. package/dist/index19.js.map +1 -1
  189. package/dist/index190.js +2 -2
  190. package/dist/index191.js +2 -2
  191. package/dist/index192.js +2 -2
  192. package/dist/index193.js +2 -2
  193. package/dist/index194.js +2 -2
  194. package/dist/index195.js +2 -2
  195. package/dist/index196.js +3 -10
  196. package/dist/index196.js.map +1 -1
  197. package/dist/index198.js +2 -3
  198. package/dist/index198.js.map +1 -1
  199. package/dist/index199.js +4 -3
  200. package/dist/index199.js.map +1 -1
  201. package/dist/index2.js +1 -42
  202. package/dist/index2.js.map +1 -1
  203. package/dist/index20.js +239 -1
  204. package/dist/index20.js.map +1 -1
  205. package/dist/index200.js +5 -368
  206. package/dist/index200.js.map +1 -1
  207. package/dist/index201.js +13 -131
  208. package/dist/index201.js.map +1 -1
  209. package/dist/index202.js +16 -5
  210. package/dist/index202.js.map +1 -1
  211. package/dist/index203.js +3 -3
  212. package/dist/index204.js +20 -2
  213. package/dist/index204.js.map +1 -1
  214. package/dist/index205.js +29 -2
  215. package/dist/index205.js.map +1 -1
  216. package/dist/index206.js +8 -174
  217. package/dist/index206.js.map +1 -1
  218. package/dist/index207.js +2 -23
  219. package/dist/index207.js.map +1 -1
  220. package/dist/index208.js +111 -363
  221. package/dist/index208.js.map +1 -1
  222. package/dist/index209.js +131 -13
  223. package/dist/index209.js.map +1 -1
  224. package/dist/index21.js +1 -115
  225. package/dist/index21.js.map +1 -1
  226. package/dist/index210.js +2 -16
  227. package/dist/index210.js.map +1 -1
  228. package/dist/index211.js +35 -20
  229. package/dist/index211.js.map +1 -1
  230. package/dist/index212.js +172 -27
  231. package/dist/index212.js.map +1 -1
  232. package/dist/index213.js +6 -8
  233. package/dist/index213.js.map +1 -1
  234. package/dist/index214.js +346 -213
  235. package/dist/index214.js.map +1 -1
  236. package/dist/index215.js +373 -3
  237. package/dist/index215.js.map +1 -1
  238. package/dist/index216.js +3 -35
  239. package/dist/index216.js.map +1 -1
  240. package/dist/index217.js +3 -6
  241. package/dist/index217.js.map +1 -1
  242. package/dist/index218.js +235 -2
  243. package/dist/index218.js.map +1 -1
  244. package/dist/index219.js +3 -2
  245. package/dist/index219.js.map +1 -1
  246. package/dist/index22.js +131 -1
  247. package/dist/index22.js.map +1 -1
  248. package/dist/index220.js +2 -4
  249. package/dist/index220.js.map +1 -1
  250. package/dist/index221.js +8 -119
  251. package/dist/index221.js.map +1 -1
  252. package/dist/index222.js +2 -2
  253. package/dist/index222.js.map +1 -1
  254. package/dist/index224.js +23 -6
  255. package/dist/index224.js.map +1 -1
  256. package/dist/index225.js +4 -17
  257. package/dist/index225.js.map +1 -1
  258. package/dist/index226.js +294 -78
  259. package/dist/index226.js.map +1 -1
  260. package/dist/index227.js +6 -2
  261. package/dist/index227.js.map +1 -1
  262. package/dist/index228.js +2 -160
  263. package/dist/index228.js.map +1 -1
  264. package/dist/index229.js +4 -1
  265. package/dist/index229.js.map +1 -1
  266. package/dist/index23.js +1 -115
  267. package/dist/index23.js.map +1 -1
  268. package/dist/index230.js +2 -5
  269. package/dist/index230.js.map +1 -1
  270. package/dist/index231.js +2 -69
  271. package/dist/index231.js.map +1 -1
  272. package/dist/index232.js +2 -224
  273. package/dist/index232.js.map +1 -1
  274. package/dist/index233.js +2 -258
  275. package/dist/index233.js.map +1 -1
  276. package/dist/index234.js +78 -5
  277. package/dist/index234.js.map +1 -1
  278. package/dist/index235.js +6 -2
  279. package/dist/index235.js.map +1 -1
  280. package/dist/index236.js +17 -295
  281. package/dist/index236.js.map +1 -1
  282. package/dist/index237.js +2 -2
  283. package/dist/index238.js +106 -2
  284. package/dist/index238.js.map +1 -1
  285. package/dist/index239.js +428 -110
  286. package/dist/index239.js.map +1 -1
  287. package/dist/index24.js +119 -1
  288. package/dist/index24.js.map +1 -1
  289. package/dist/index240.js +218 -100
  290. package/dist/index240.js.map +1 -1
  291. package/dist/index241.js +255 -12
  292. package/dist/index241.js.map +1 -1
  293. package/dist/index242.js +117 -2
  294. package/dist/index242.js.map +1 -1
  295. package/dist/index243.js +200 -2
  296. package/dist/index243.js.map +1 -1
  297. package/dist/index244.js +2 -2
  298. package/dist/index244.js.map +1 -1
  299. package/dist/index245.js +69 -2
  300. package/dist/index245.js.map +1 -1
  301. package/dist/index246.js +5 -435
  302. package/dist/index246.js.map +1 -1
  303. package/dist/index247.js +163 -88
  304. package/dist/index247.js.map +1 -1
  305. package/dist/index248.js +1 -202
  306. package/dist/index248.js.map +1 -1
  307. package/dist/index249.js +2 -4
  308. package/dist/index249.js.map +1 -1
  309. package/dist/index25.js +1 -92
  310. package/dist/index25.js.map +1 -1
  311. package/dist/index250.js +89 -2
  312. package/dist/index250.js.map +1 -1
  313. package/dist/index251.js +15 -4
  314. package/dist/index251.js.map +1 -1
  315. package/dist/index252.js +4 -4
  316. package/dist/index252.js.map +1 -1
  317. package/dist/index253.js +4 -61
  318. package/dist/index253.js.map +1 -1
  319. package/dist/index254.js +61 -2
  320. package/dist/index254.js.map +1 -1
  321. package/dist/index255.js +2 -3
  322. package/dist/index255.js.map +1 -1
  323. package/dist/index256.js +3 -2
  324. package/dist/index256.js.map +1 -1
  325. package/dist/index257.js +5 -0
  326. package/dist/index257.js.map +1 -0
  327. package/dist/index26.js +94 -1
  328. package/dist/index26.js.map +1 -1
  329. package/dist/index27.js +1 -157
  330. package/dist/index27.js.map +1 -1
  331. package/dist/index28.js +160 -1
  332. package/dist/index28.js.map +1 -1
  333. package/dist/index29.js +1 -124
  334. package/dist/index29.js.map +1 -1
  335. package/dist/index3.js +38 -76
  336. package/dist/index3.js.map +1 -1
  337. package/dist/index30.js +126 -1
  338. package/dist/index30.js.map +1 -1
  339. package/dist/index31.js +1 -691
  340. package/dist/index31.js.map +1 -1
  341. package/dist/index32.js +693 -1
  342. package/dist/index32.js.map +1 -1
  343. package/dist/index33.js +1 -145
  344. package/dist/index33.js.map +1 -1
  345. package/dist/index34.js +302 -1
  346. package/dist/index34.js.map +1 -1
  347. package/dist/index35.js +1 -118
  348. package/dist/index35.js.map +1 -1
  349. package/dist/index36.js +120 -1
  350. package/dist/index36.js.map +1 -1
  351. package/dist/index37.js +1 -154
  352. package/dist/index37.js.map +1 -1
  353. package/dist/index38.js +156 -1
  354. package/dist/index38.js.map +1 -1
  355. package/dist/index39.js +1 -83
  356. package/dist/index39.js.map +1 -1
  357. package/dist/index4.js +78 -62
  358. package/dist/index4.js.map +1 -1
  359. package/dist/index40.js +87 -1
  360. package/dist/index40.js.map +1 -1
  361. package/dist/index41.js +1 -61
  362. package/dist/index41.js.map +1 -1
  363. package/dist/index42.js +64 -1
  364. package/dist/index42.js.map +1 -1
  365. package/dist/index43.js +1 -65
  366. package/dist/index43.js.map +1 -1
  367. package/dist/index44.js +65 -1
  368. package/dist/index44.js.map +1 -1
  369. package/dist/index45.js +1 -96
  370. package/dist/index45.js.map +1 -1
  371. package/dist/index46.js +96 -1
  372. package/dist/index46.js.map +1 -1
  373. package/dist/index47.js +1 -61
  374. package/dist/index47.js.map +1 -1
  375. package/dist/index48.js +61 -1
  376. package/dist/index48.js.map +1 -1
  377. package/dist/index49.js +1 -49
  378. package/dist/index49.js.map +1 -1
  379. package/dist/index5.js +60 -38
  380. package/dist/index5.js.map +1 -1
  381. package/dist/index50.js +49 -1
  382. package/dist/index50.js.map +1 -1
  383. package/dist/index51.js +1 -62
  384. package/dist/index51.js.map +1 -1
  385. package/dist/index52.js +62 -1
  386. package/dist/index52.js.map +1 -1
  387. package/dist/index53.js +1 -45
  388. package/dist/index53.js.map +1 -1
  389. package/dist/index54.js +69 -1
  390. package/dist/index54.js.map +1 -1
  391. package/dist/index55.js +1 -89
  392. package/dist/index55.js.map +1 -1
  393. package/dist/index56.js +98 -1
  394. package/dist/index56.js.map +1 -1
  395. package/dist/index57.js +1 -120
  396. package/dist/index57.js.map +1 -1
  397. package/dist/index58.js +129 -1
  398. package/dist/index58.js.map +1 -1
  399. package/dist/index59.js +1 -85
  400. package/dist/index59.js.map +1 -1
  401. package/dist/index6.js +37 -171
  402. package/dist/index6.js.map +1 -1
  403. package/dist/index60.js +85 -1
  404. package/dist/index60.js.map +1 -1
  405. package/dist/index61.js +1 -88
  406. package/dist/index61.js.map +1 -1
  407. package/dist/index62.js +98 -1
  408. package/dist/index62.js.map +1 -1
  409. package/dist/index63.js +1 -59
  410. package/dist/index63.js.map +1 -1
  411. package/dist/index64.js +59 -1
  412. package/dist/index64.js.map +1 -1
  413. package/dist/index65.js +1 -313
  414. package/dist/index65.js.map +1 -1
  415. package/dist/index66.js +313 -1
  416. package/dist/index66.js.map +1 -1
  417. package/dist/index67.js +1 -129
  418. package/dist/index67.js.map +1 -1
  419. package/dist/index68.js +129 -1
  420. package/dist/index68.js.map +1 -1
  421. package/dist/index69.js +1 -225
  422. package/dist/index69.js.map +1 -1
  423. package/dist/index7.js +172 -18
  424. package/dist/index7.js.map +1 -1
  425. package/dist/index70.js +225 -1
  426. package/dist/index70.js.map +1 -1
  427. package/dist/index71.js +1 -24
  428. package/dist/index71.js.map +1 -1
  429. package/dist/index72.js +19 -41
  430. package/dist/index72.js.map +1 -1
  431. package/dist/index73.js +37 -86
  432. package/dist/index73.js.map +1 -1
  433. package/dist/index74.js +104 -1
  434. package/dist/index74.js.map +1 -1
  435. package/dist/index75.js +1 -227
  436. package/dist/index75.js.map +1 -1
  437. package/dist/index76.js +227 -1
  438. package/dist/index76.js.map +1 -1
  439. package/dist/index77.js +1 -143
  440. package/dist/index77.js.map +1 -1
  441. package/dist/index78.js +165 -1
  442. package/dist/index78.js.map +1 -1
  443. package/dist/index79.js +1 -213
  444. package/dist/index79.js.map +1 -1
  445. package/dist/index8.js +18 -192
  446. package/dist/index8.js.map +1 -1
  447. package/dist/index80.js +213 -1
  448. package/dist/index80.js.map +1 -1
  449. package/dist/index81.js +1 -35
  450. package/dist/index81.js.map +1 -1
  451. package/dist/index82.js +35 -1
  452. package/dist/index82.js.map +1 -1
  453. package/dist/index83.js +1 -83
  454. package/dist/index83.js.map +1 -1
  455. package/dist/index84.js +92 -1
  456. package/dist/index84.js.map +1 -1
  457. package/dist/index85.js +1 -120
  458. package/dist/index85.js.map +1 -1
  459. package/dist/index86.js +129 -1
  460. package/dist/index86.js.map +1 -1
  461. package/dist/index87.js +1 -83
  462. package/dist/index87.js.map +1 -1
  463. package/dist/index88.js +92 -1
  464. package/dist/index88.js.map +1 -1
  465. package/dist/index89.js +1 -30
  466. package/dist/index89.js.map +1 -1
  467. package/dist/index9.js +192 -61
  468. package/dist/index9.js.map +1 -1
  469. package/dist/index90.js +30 -1
  470. package/dist/index90.js.map +1 -1
  471. package/dist/index91.js +1 -157
  472. package/dist/index91.js.map +1 -1
  473. package/dist/index92.js +166 -1
  474. package/dist/index92.js.map +1 -1
  475. package/dist/index93.js +1 -86
  476. package/dist/index93.js.map +1 -1
  477. package/dist/index94.js +112 -1
  478. package/dist/index94.js.map +1 -1
  479. package/dist/index95.js +1 -89
  480. package/dist/index95.js.map +1 -1
  481. package/dist/index96.js +98 -1
  482. package/dist/index96.js.map +1 -1
  483. package/dist/index97.js +1 -119
  484. package/dist/index97.js.map +1 -1
  485. package/dist/index98.js +129 -1
  486. package/dist/index98.js.map +1 -1
  487. package/dist/index99.js +1 -227
  488. package/dist/index99.js.map +1 -1
  489. package/dist/style.css +1 -1
  490. package/dist/utilities/functions/last.d.ts +1 -1
  491. package/package.json +1 -1
package/dist/index11.js CHANGED
@@ -1,132 +1,2 @@
1
- import { defineComponent as B, ref as h, computed as n, watch as L, openBlock as c, createElementBlock as i, normalizeClass as E, normalizeProps as p, mergeProps as d, createCommentVNode as I, createElementVNode as l, renderSlot as F, guardReactiveProps as M } from "vue";
2
- import { isCssColor as f } from "./index219.js";
3
- import { when as N } from "./index220.js";
4
- const A = {
5
- "aria-hidden": "true",
6
- class: "bb-base-checkbox-container"
7
- }, S = /* @__PURE__ */ l("path", {
8
- d: "M 380.93 158.834 L 286.863 158.834 C 281.088 158.834 276.411 163.511 276.411 169.286 L 276.411 263.352 C 276.411 269.127 281.088 273.804 286.863 273.804 L 380.93 273.804 C 386.704 273.804 391.382 269.127 391.382 263.352 L 391.382 169.286 C 391.382 163.511 386.699 158.834 380.93 158.834 Z",
9
- style: {}
10
- }, null, -1), J = /* @__PURE__ */ l("path", {
11
- d: "M 297.574 224.786 L 318.309 243.134 L 371.568 189.232",
12
- fill: "none",
13
- stroke: "white",
14
- "stroke-linecap": "round",
15
- "stroke-width": "14px"
16
- }, null, -1), O = [
17
- S,
18
- J
19
- ], K = /* @__PURE__ */ B({
20
- __name: "BaseCheckbox",
21
- props: {
22
- autofocus: {},
23
- checked: {},
24
- color: {},
25
- disabled: { type: Boolean },
26
- falseValue: { default: !1 },
27
- hasErrors: { type: Boolean },
28
- id: {},
29
- indeterminate: {},
30
- name: {},
31
- readonly: {},
32
- submitWhenFalse: { type: Boolean },
33
- trueValue: { default: !0 },
34
- modelValue: {}
35
- },
36
- emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
37
- setup(k, { emit: v }) {
38
- const e = k, a = v, u = h(null), s = n(() => e.checked ? !0 : JSON.stringify(e.trueValue) === JSON.stringify(e.modelValue)), r = h(!1), y = n(() => ({
39
- "bb-base-checkbox": !0,
40
- "bb-base-checkbox--disabled": e.disabled,
41
- "bb-base-checkbox--errors": e.hasErrors,
42
- "bb-base-checkbox--indeterminate": e.indeterminate,
43
- "bb-base-checkbox--readonly": e.readonly,
44
- [`bb-base-checkbox--${e.color}`]: e.color && !f(e.color)
45
- })), b = N(
46
- (t) => typeof t != "string",
47
- JSON.stringify
48
- ), V = n(() => {
49
- const t = b(e.falseValue);
50
- return {
51
- disabled: e.disabled,
52
- name: e.name,
53
- type: "hidden",
54
- value: t
55
- };
56
- }), m = n(() => {
57
- const t = b(e.trueValue), C = {
58
- onBlur: (o) => {
59
- r.value = !1, a("blur", o);
60
- },
61
- onChange: (o) => {
62
- if (o.target instanceof HTMLInputElement) {
63
- let w = o.target.checked ? e.trueValue : e.falseValue;
64
- a("change", o), a("update:modelValue", w);
65
- }
66
- },
67
- onClick: (o) => a("click", o),
68
- onFocus: (o) => {
69
- r.value = !0, a("focus", o);
70
- },
71
- onKeydown: (o) => a("keydown", o),
72
- onMousedown: (o) => a("mousedown", o),
73
- onMouseup: (o) => a("mouseup", o),
74
- onInput: (o) => a("input", o)
75
- };
76
- return {
77
- autofocus: e.autofocus,
78
- checked: s.value,
79
- // There is no such thing as readonly checkbox so we disable and style it with css
80
- disabled: e.disabled || e.readonly,
81
- id: e.id,
82
- indeterminate: e.indeterminate,
83
- name: e.name,
84
- tabindex: e.disabled ? -1 : void 0,
85
- type: "checkbox",
86
- value: t,
87
- ...C
88
- };
89
- }), x = n(() => ({
90
- checked: s.value,
91
- disabled: e.disabled,
92
- falseValue: e.falseValue,
93
- focused: r.value,
94
- hasErrors: e.hasErrors,
95
- id: e.id,
96
- name: e.name,
97
- parsedValue: m.value.value,
98
- readonly: e.readonly,
99
- trueValue: e.trueValue,
100
- value: s.value ? e.trueValue : e.falseValue
101
- })), _ = n(() => {
102
- let t = {};
103
- return e.color && f(e.color) && (t.color = e.color), {
104
- class: "bb-base-checkbox-container__icon",
105
- style: t
106
- };
107
- });
108
- return L(
109
- () => [e.modelValue, e.checked, e.indeterminate],
110
- () => {
111
- u.value && (u.value.indeterminate = !!e.indeterminate);
112
- }
113
- ), (t, g) => (c(), i("span", {
114
- class: E(y.value)
115
- }, [
116
- !s.value && t.submitWhenFalse ? (c(), i("input", p(d({ key: 0 }, V.value)), null, 16)) : I("", !0),
117
- l("input", d(m.value, {
118
- ref_key: "checkboxInput",
119
- ref: u
120
- }), null, 16),
121
- l("span", A, [
122
- F(t.$slots, "icon", p(M(x.value)), () => [
123
- (c(), i("svg", d({ viewBox: "276.411 158.834 114.971 114.97" }, _.value), O, 16))
124
- ])
125
- ])
126
- ], 2));
127
- }
128
- });
129
- export {
130
- K as default
131
- };
1
+
132
2
  //# sourceMappingURL=index11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index11.js","sources":["../src/components/BaseCheckbox/BaseCheckbox.vue"],"sourcesContent":["<template>\n\t<span :class=\"classes\">\n\t\t<input v-if=\"!checked && submitWhenFalse\" v-bind=\"hiddenInputAttributes\" />\n\t\t<input v-bind=\"inputAttributes\" ref=\"checkboxInput\" />\n\t\t<span aria-hidden=\"true\" class=\"bb-base-checkbox-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<svg viewBox=\"276.411 158.834 114.971 114.97\" v-bind=\"iconAttributes\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M 380.93 158.834 L 286.863 158.834 C 281.088 158.834 276.411 163.511 276.411 169.286 L 276.411 263.352 C 276.411 269.127 281.088 273.804 286.863 273.804 L 380.93 273.804 C 386.704 273.804 391.382 269.127 391.382 263.352 L 391.382 169.286 C 391.382 163.511 386.699 158.834 380.93 158.834 Z\"\n\t\t\t\t\t\tstyle=\"\"\n\t\t\t\t\t></path>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M 297.574 224.786 L 318.309 243.134 L 371.568 189.232\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"white\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-width=\"14px\"\n\t\t\t\t\t></path>\n\t\t\t\t</svg>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseCheckboxProps = {\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 * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\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 * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\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 * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n};\n\nexport type BaseCheckboxEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type SlotAttributes = {\n\tchecked: boolean;\n\tdisabled: Exclude<BaseCheckboxProps['disabled'], undefined>;\n\tfalseValue: any;\n\tfocused: boolean;\n\thasErrors: Exclude<BaseCheckboxProps['hasErrors'], undefined>;\n\tid: BaseCheckboxProps['id'];\n\tname: BaseCheckboxProps['name'];\n\tparsedValue: any;\n\treadonly: BaseCheckboxProps['readonly'];\n\ttrueValue: any;\n\tvalue: any;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxProps>(), {\n\ttrueValue: true,\n\tfalseValue: false,\n});\n\nconst emit = defineEmits<BaseCheckboxEvents>();\n\ndefineSlots<{\n\ticon?: (props: SlotAttributes) => any;\n}>();\n\nconst checkboxInput = ref<HTMLInputElement | null>(null);\n\nconst checked = computed(() => {\n\tif (props.checked) return true;\n\treturn JSON.stringify(props.trueValue) === JSON.stringify(props.modelValue);\n});\nconst hasFocus = ref(false);\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-base-checkbox': true,\n\t\t'bb-base-checkbox--disabled': props.disabled,\n\t\t'bb-base-checkbox--errors': props.hasErrors,\n\t\t'bb-base-checkbox--indeterminate': props.indeterminate,\n\t\t'bb-base-checkbox--readonly': props.readonly,\n\t\t[`bb-base-checkbox--${props.color}`]:\n\t\t\tprops.color && !isCssColor(props.color),\n\t};\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputAttributes = computed(() => {\n\tconst value = makeInputValue(props.falseValue);\n\treturn {\n\t\tdisabled: props.disabled,\n\t\tname: props.name,\n\t\ttype: 'hidden',\n\t\tvalue: value,\n\t};\n});\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.trueValue);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\n\tconst onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tlet value = event.target.checked ? props.trueValue : props.falseValue;\n\n\t\t\temit('change', event);\n\t\t\temit('update:modelValue', value);\n\t\t}\n\t};\n\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t\tonInput: (event: Event) => emit('input', event),\n\t};\n\n\treturn {\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly checkbox so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tindeterminate: props.indeterminate,\n\t\tname: props.name,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'checkbox',\n\t\tvalue: value,\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfalseValue: props.falseValue,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\ttrueValue: props.trueValue,\n\tvalue: checked.value ? props.trueValue : props.falseValue,\n}));\n\nconst iconAttributes = computed(() => {\n\tlet style: { [key: string]: string } = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.color = props.color;\n\t}\n\treturn {\n\t\tclass: 'bb-base-checkbox-container__icon',\n\t\tstyle,\n\t};\n});\n\n/**\n * Indeterminate is a very volatile prop that is reset upon clicking,\n * this keeps the state and the prop aligned\n */\nwatch(\n\t() => [props.modelValue, props.checked, props.indeterminate],\n\t() => {\n\t\tif (checkboxInput.value) {\n\t\t\tcheckboxInput.value.indeterminate = !!props.indeterminate;\n\t\t}\n\t}\n);\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckbox';\n</style>\n"],"names":["props","__props","emit","__emit","checkboxInput","ref","checked","computed","hasFocus","classes","isCssColor","makeInputValue","when","item","hiddenInputAttributes","value","inputAttributes","eventListeners","event","slotAttributes","iconAttributes","style","watch"],"m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AAAA,MACC,MAAM,CAACtB,EAAM,YAAYA,EAAM,SAASA,EAAM,aAAa;AAAA,MAC3D,MAAM;AACL,QAAII,EAAc,UACjBA,EAAc,MAAM,gBAAgB,CAAC,CAACJ,EAAM;AAAA,MAE9C;AAAA,IAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index11.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index110.js CHANGED
@@ -1,2 +1,30 @@
1
-
1
+ import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as d, Fragment as f, renderList as _, unref as r, mergeProps as b } from "vue";
2
+ import { state as k, useToast as C } from "./index6.js";
3
+ import B from "./index245.js";
4
+ const N = /* @__PURE__ */ s({
5
+ __name: "BbToast",
6
+ props: {
7
+ placement: { default: "bottom" }
8
+ },
9
+ setup(T) {
10
+ const { dismiss: n } = C();
11
+ return (a, h) => (e(), o(l, { to: "body" }, [
12
+ c("div", {
13
+ class: m(["bb-toast", { [`bb-toast--${a.placement}`]: !0 }])
14
+ }, [
15
+ i(p, { name: "toast" }, {
16
+ default: u(() => [
17
+ (e(!0), d(f, null, _(r(k).stack, (t) => (e(), o(B, b({
18
+ key: t.id
19
+ }, t, { "onClick:close": r(n) }), null, 16, ["onClick:close"]))), 128))
20
+ ]),
21
+ _: 1
22
+ })
23
+ ], 2)
24
+ ]));
25
+ }
26
+ });
27
+ export {
28
+ N as default
29
+ };
2
30
  //# sourceMappingURL=index110.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index110.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index110.js","sources":["../src/components/BbToast/BbToast.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"bb-toast\" :class=\"{ [`bb-toast--${placement}`]: true }\">\n\t\t\t<TransitionGroup name=\"toast\">\n\t\t\t\t<BbToastMessage\n\t\t\t\t\tv-for=\"message in state.stack\"\n\t\t\t\t\t:key=\"message.id\"\n\t\t\t\t\tv-bind=\"message\"\n\t\t\t\t\t@click:close=\"dismiss\"\n\t\t\t\t/>\n\t\t\t</TransitionGroup>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport { state, useToast } from '../../composables/useToast';\nconst { dismiss } = useToast();\n\nimport BbToastMessage from './BbToastMessage.vue';\nexport type BbToastProps = {\n\t/**\n\t * Placement of the messages on the screen.\n\t */\n\tplacement?:\n\t\t| 'bottom'\n\t\t| 'bottom-start'\n\t\t| 'bottom-end'\n\t\t| 'top'\n\t\t| 'top-start'\n\t\t| 'top-end';\n};\n\nwithDefaults(defineProps<BbToastProps>(), {\n\tplacement: 'bottom',\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbToast';\n</style>\n"],"names":["dismiss","useToast"],"mappings":";;;;;;;;;AAiBM,UAAA,EAAE,SAAAA,MAAYC;;;;;;;;;;;;;;;;;"}
package/dist/index111.js CHANGED
@@ -1,152 +1,2 @@
1
- import { defineComponent as A, ref as o, computed as E, openBlock as b, createElementBlock as $, mergeProps as D, createElementVNode as i, renderSlot as L, normalizeProps as H, guardReactiveProps as I, unref as s, createBlock as M, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as q, createCommentVNode as O } from "vue";
2
- import { useFloating as G, arrow as J } from "./index221.js";
3
- import { useId as K } from "./index7.js";
4
- import { wait as P } from "./index122.js";
5
- import Q from "./index9.js";
6
- import "./index10.js";
7
- import { throttle as v } from "./index215.js";
8
- import { waitFor as W } from "./index217.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index200.js";
10
- const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
11
- fill: "none",
12
- viewBox: "0 0 24 24",
13
- xmlns: "http://www.w3.org/2000/svg"
14
- }, [
15
- /* @__PURE__ */ i("path", {
16
- d: "M23 23L1 1M23 1L1 23",
17
- stroke: "currentColor",
18
- "stroke-linecap": "round",
19
- "stroke-width": "2"
20
- })
21
- ], -1), pe = /* @__PURE__ */ A({
22
- __name: "BbTooltip",
23
- props: {
24
- arrowPadding: { default: 10 },
25
- block: { type: Boolean },
26
- disabled: { type: Boolean },
27
- eager: { type: Boolean },
28
- id: {},
29
- padding: { default: 10 },
30
- placement: { default: "top" },
31
- showClose: { type: Boolean, default: !0 },
32
- theme: { default: "default" },
33
- transitionDuration: { default: 150 }
34
- },
35
- setup(T) {
36
- const t = T, w = `bb_${t.id ?? K().id.value}`, u = o(), c = o(), _ = o(), { floatingStyles: F, placement: g, middlewareData: h } = G(
37
- u,
38
- c,
39
- {
40
- placement: t.placement,
41
- whileElementsMounted: X,
42
- middleware: [
43
- Y(),
44
- Z({ padding: t.padding }),
45
- J({
46
- element: _,
47
- padding: t.arrowPadding
48
- })
49
- ]
50
- }
51
- ), y = o(!0), a = o(!1), l = o(!1), r = o(!1), p = o(!0), z = E(() => {
52
- if (h.value.arrow) {
53
- const { x: e, y: n } = h.value.arrow;
54
- return {
55
- style: {
56
- left: `${e}px`,
57
- top: `${n}px`
58
- }
59
- };
60
- }
61
- }), k = () => {
62
- l.value || a.value || t.disabled || (V(), document.addEventListener("mouseover", B, { passive: !0 }), document.addEventListener("keydown", C, { passive: !0 }));
63
- }, S = k, B = v((e) => {
64
- const n = e.target;
65
- if (n && n instanceof HTMLElement) {
66
- let m = !0;
67
- u.value && u.value.contains(n) && (m = !1), c.value && c.value.contains(n) && (m = !1), m && d();
68
- }
69
- }, t.transitionDuration), C = (e) => {
70
- l.value && e.key === "Escape" && d();
71
- }, N = () => {
72
- y.value = !1, d();
73
- }, f = o(!1), V = v(async () => {
74
- y.value && (f.value = !0, p.value = !1, r.value = !1, a.value = !0, await P(50), l.value = !0, a.value = !1);
75
- }, t.transitionDuration), d = v(async () => {
76
- await W(() => !a.value), document.removeEventListener("mouseover", B), document.removeEventListener("keydown", C), l.value = !1, a.value = !1, r.value = !0, await P(t.transitionDuration), r.value = !1, p.value = !0;
77
- }, t.transitionDuration), x = E(() => ({
78
- class: {
79
- "bb-tooltip--block": t.block,
80
- [`bb-tooltip--theme-${t.theme}`]: t.theme
81
- }
82
- }));
83
- return (e, n) => (b(), $("span", D({ class: "bb-tooltip" }, x.value), [
84
- i("span", {
85
- ref_key: "wrapper",
86
- ref: u,
87
- class: "bb-tooltip__wrapper"
88
- }, [
89
- L(e.$slots, "activator", H(I({
90
- props: {
91
- ...f.value ? { "aria-describedby": w } : {},
92
- onMouseenter: k,
93
- onFocus: s(S),
94
- onBlur: s(d),
95
- disabled: e.disabled
96
- },
97
- closed: p.value,
98
- closing: r.value,
99
- disabled: e.disabled,
100
- open: l.value,
101
- opening: a.value,
102
- placement: s(g)
103
- })))
104
- ], 512),
105
- (b(), M(R, { to: "body" }, [
106
- f.value || e.eager ? (b(), $("span", {
107
- key: 0,
108
- id: w,
109
- ref_key: "content",
110
- ref: c,
111
- class: U(["bb-tooltip__bubble-container", {
112
- [`bb-tooltip__bubble-container--${s(g)}`]: !0,
113
- [`bb-tooltip__bubble-container--${e.theme}`]: e.theme,
114
- "bb-tooltip__bubble-container--hidden": p.value,
115
- "bb-tooltip__bubble-container--closing": r.value,
116
- "bb-tooltip__bubble-container--opening": a.value,
117
- "bb-tooltip__bubble-container--open": l.value
118
- }]),
119
- style: j({
120
- ...s(F),
121
- transitionDuration: `${t.transitionDuration}ms`
122
- })
123
- }, [
124
- i("span", D({
125
- ref_key: "bubblearrow",
126
- ref: _,
127
- class: "bb-tooltip__arrow"
128
- }, z.value), null, 16),
129
- i("span", ee, [
130
- e.showClose ? (b(), M(Q, {
131
- key: 0,
132
- "aria-hidden": "true",
133
- class: "bb-tooltip__close",
134
- tabindex: "-1",
135
- onClick: N
136
- }, {
137
- default: q(() => [
138
- te
139
- ]),
140
- _: 1
141
- })) : O("", !0),
142
- L(e.$slots, "default")
143
- ])
144
- ], 6)) : O("", !0)
145
- ]))
146
- ], 16));
147
- }
148
- });
149
- export {
150
- pe as default
151
- };
1
+
152
2
  //# sourceMappingURL=index111.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index111.js","sources":["../src/components/BbTooltip/BbTooltip.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-tooltip\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-tooltip__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...(hasOpenedOnce ? { 'aria-describedby': id } : {}),\n\t\t\t\t\t\tonMouseenter,\n\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\tonBlur: closeTooltip,\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\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-tooltip__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-tooltip__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-tooltip__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-tooltip__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-tooltip__bubble-container--closing': closing,\n\t\t\t\t\t'bb-tooltip__bubble-container--opening': opening,\n\t\t\t\t\t'bb-tooltip__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"{\n\t\t\t\t\t...floatingStyles,\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-tooltip__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span class=\"bb-tooltip__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"bb-tooltip__close\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\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></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, ref } from 'vue';\nimport { useFloating, autoUpdate, flip, shift, arrow } from '@floating-ui/vue';\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';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { waitFor } from '@/utilities/functions/waitFor';\n\nexport type BbTooltipProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n>;\n\nconst props = withDefaults(defineProps<BbTooltipProps>(), {\n\tarrowPadding: 10,\n\tpadding: 10,\n\tplacement: 'top',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\ntype BbTooltipSlots = {\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-describedby': string;\n\t\t\tonMouseenter: typeof onMouseenter;\n\t\t\tonFocus: typeof onFocus;\n\t\t\tonBlur: typeof closeTooltip;\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: object) => any;\n};\n\ndefineSlots<BbTooltipSlots>();\n\nconst id = `bb_${props.id ?? useId().id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\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\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 canOpen = ref(true);\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\treturn undefined;\n});\n\nconst onMouseenter = () => {\n\tif (open.value || opening.value || props.disabled) return;\n\topenTooltip();\n\tdocument.addEventListener('mouseover', onMouseOver, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = throttle((event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n}, props.transitionDuration);\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n\tcanOpen.value = false;\n\tcloseTooltip();\n};\n\nconst hasOpenedOnce = ref(false);\nconst openTooltip = throttle(async () => {\n\tif (!canOpen.value) return;\n\thasOpenedOnce.value = true;\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}, props.transitionDuration);\n\nconst closeTooltip = throttle(async () => {\n\tawait waitFor(() => !opening.value);\n\tdocument.removeEventListener('mouseover', onMouseOver);\n\tdocument.removeEventListener('keydown', onEsc);\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}, props.transitionDuration);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-tooltip--block': props.block,\n\t\t[`bb-tooltip--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTooltip';\n</style>\n"],"names":["props","__props","id","useId","wrapper","ref","content","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","shift","arrow","canOpen","opening","open","closing","closed","arrowAttributes","computed","x","y","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","throttle","event","target","isOutside","closeTooltip","onClickClose","hasOpenedOnce","wait","waitFor","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,UAAMA,IAAQC,GA6BRC,IAAK,MAAMF,EAAM,MAAMG,IAAQ,GAAG,KAAK,IAEvCC,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,gBAAAG,GAAgB,WAAAC,GAAW,gBAAAC,EAAmB,IAAAC;AAAA,MACrDP;AAAA,MACAE;AAAA,MACA;AAAA,QACC,WAAWN,EAAM;AAAA,QACjB,sBAAsBY;AAAA,QACtB,YAAY;AAAA,UACXC,EAAK;AAAA,UACLC,EAAM,EAAE,SAASd,EAAM,SAAS;AAAA,UAChCe,EAAM;AAAA,YACL,SAASR;AAAA,YACT,SAASP,EAAM;AAAA,UAAA,CACf;AAAA,QACF;AAAA,MACD;AAAA,IAAA,GAGKgB,IAAUX,EAAI,EAAI,GAElBY,IAAUZ,EAAI,EAAK,GACnBa,IAAOb,EAAI,EAAK,GAChBc,IAAUd,EAAI,EAAK,GACnBe,IAASf,EAAI,EAAI,GAEjBgB,IAAkBC,EAAS,MAAM;AAClC,UAAAZ,EAAe,MAAM,OAAO;AAC/B,cAAM,EAAE,GAAAa,GAAG,GAAAC,EAAE,IAAId,EAAe,MAAM;AAC/B,eAAA;AAAA,UACN,OAAO;AAAA,YACN,MAAM,GAAGa,CAAC;AAAA,YACV,KAAK,GAAGC,CAAC;AAAA,UACV;AAAA,QAAA;AAAA,MAEF;AAAA,IACO,CACP,GAEKC,IAAe,MAAM;AAC1B,MAAIP,EAAK,SAASD,EAAQ,SAASjB,EAAM,aAC7B0B,KACZ,SAAS,iBAAiB,aAAaC,GAAa,EAAE,SAAS,IAAM,GACrE,SAAS,iBAAiB,WAAWC,GAAO,EAAE,SAAS,IAAM;AAAA,IAAA,GAGxDC,IAAUJ,GAEVE,IAAcG,EAAS,CAACC,M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;;;"}
1
+ {"version":3,"file":"index111.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index112.js CHANGED
@@ -1,2 +1,152 @@
1
-
1
+ import { defineComponent as A, ref as o, computed as E, openBlock as b, createElementBlock as $, mergeProps as D, createElementVNode as i, renderSlot as L, normalizeProps as H, guardReactiveProps as I, unref as s, createBlock as M, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as q, createCommentVNode as O } from "vue";
2
+ import { useFloating as G, arrow as J } from "./index208.js";
3
+ import { useId as K } from "./index8.js";
4
+ import { wait as P } from "./index123.js";
5
+ import Q from "./index10.js";
6
+ import "./index11.js";
7
+ import { throttle as v } from "./index219.js";
8
+ import { waitFor as W } from "./index213.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index214.js";
10
+ const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
11
+ fill: "none",
12
+ viewBox: "0 0 24 24",
13
+ xmlns: "http://www.w3.org/2000/svg"
14
+ }, [
15
+ /* @__PURE__ */ i("path", {
16
+ d: "M23 23L1 1M23 1L1 23",
17
+ stroke: "currentColor",
18
+ "stroke-linecap": "round",
19
+ "stroke-width": "2"
20
+ })
21
+ ], -1), pe = /* @__PURE__ */ A({
22
+ __name: "BbTooltip",
23
+ props: {
24
+ arrowPadding: { default: 10 },
25
+ block: { type: Boolean },
26
+ disabled: { type: Boolean },
27
+ eager: { type: Boolean },
28
+ id: {},
29
+ padding: { default: 10 },
30
+ placement: { default: "top" },
31
+ showClose: { type: Boolean, default: !0 },
32
+ theme: { default: "default" },
33
+ transitionDuration: { default: 150 }
34
+ },
35
+ setup(T) {
36
+ const t = T, w = `bb_${t.id ?? K().id.value}`, u = o(), c = o(), _ = o(), { floatingStyles: F, placement: g, middlewareData: h } = G(
37
+ u,
38
+ c,
39
+ {
40
+ placement: t.placement,
41
+ whileElementsMounted: X,
42
+ middleware: [
43
+ Y(),
44
+ Z({ padding: t.padding }),
45
+ J({
46
+ element: _,
47
+ padding: t.arrowPadding
48
+ })
49
+ ]
50
+ }
51
+ ), y = o(!0), a = o(!1), l = o(!1), r = o(!1), p = o(!0), z = E(() => {
52
+ if (h.value.arrow) {
53
+ const { x: e, y: n } = h.value.arrow;
54
+ return {
55
+ style: {
56
+ left: `${e}px`,
57
+ top: `${n}px`
58
+ }
59
+ };
60
+ }
61
+ }), k = () => {
62
+ l.value || a.value || t.disabled || (V(), document.addEventListener("mouseover", B, { passive: !0 }), document.addEventListener("keydown", C, { passive: !0 }));
63
+ }, S = k, B = v((e) => {
64
+ const n = e.target;
65
+ if (n && n instanceof HTMLElement) {
66
+ let m = !0;
67
+ u.value && u.value.contains(n) && (m = !1), c.value && c.value.contains(n) && (m = !1), m && d();
68
+ }
69
+ }, t.transitionDuration), C = (e) => {
70
+ l.value && e.key === "Escape" && d();
71
+ }, N = () => {
72
+ y.value = !1, d();
73
+ }, f = o(!1), V = v(async () => {
74
+ y.value && (f.value = !0, p.value = !1, r.value = !1, a.value = !0, await P(50), l.value = !0, a.value = !1);
75
+ }, t.transitionDuration), d = v(async () => {
76
+ await W(() => !a.value), document.removeEventListener("mouseover", B), document.removeEventListener("keydown", C), l.value = !1, a.value = !1, r.value = !0, await P(t.transitionDuration), r.value = !1, p.value = !0;
77
+ }, t.transitionDuration), x = E(() => ({
78
+ class: {
79
+ "bb-tooltip--block": t.block,
80
+ [`bb-tooltip--theme-${t.theme}`]: t.theme
81
+ }
82
+ }));
83
+ return (e, n) => (b(), $("span", D({ class: "bb-tooltip" }, x.value), [
84
+ i("span", {
85
+ ref_key: "wrapper",
86
+ ref: u,
87
+ class: "bb-tooltip__wrapper"
88
+ }, [
89
+ L(e.$slots, "activator", H(I({
90
+ props: {
91
+ ...f.value ? { "aria-describedby": w } : {},
92
+ onMouseenter: k,
93
+ onFocus: s(S),
94
+ onBlur: s(d),
95
+ disabled: e.disabled
96
+ },
97
+ closed: p.value,
98
+ closing: r.value,
99
+ disabled: e.disabled,
100
+ open: l.value,
101
+ opening: a.value,
102
+ placement: s(g)
103
+ })))
104
+ ], 512),
105
+ (b(), M(R, { to: "body" }, [
106
+ f.value || e.eager ? (b(), $("span", {
107
+ key: 0,
108
+ id: w,
109
+ ref_key: "content",
110
+ ref: c,
111
+ class: U(["bb-tooltip__bubble-container", {
112
+ [`bb-tooltip__bubble-container--${s(g)}`]: !0,
113
+ [`bb-tooltip__bubble-container--${e.theme}`]: e.theme,
114
+ "bb-tooltip__bubble-container--hidden": p.value,
115
+ "bb-tooltip__bubble-container--closing": r.value,
116
+ "bb-tooltip__bubble-container--opening": a.value,
117
+ "bb-tooltip__bubble-container--open": l.value
118
+ }]),
119
+ style: j({
120
+ ...s(F),
121
+ transitionDuration: `${t.transitionDuration}ms`
122
+ })
123
+ }, [
124
+ i("span", D({
125
+ ref_key: "bubblearrow",
126
+ ref: _,
127
+ class: "bb-tooltip__arrow"
128
+ }, z.value), null, 16),
129
+ i("span", ee, [
130
+ e.showClose ? (b(), M(Q, {
131
+ key: 0,
132
+ "aria-hidden": "true",
133
+ class: "bb-tooltip__close",
134
+ tabindex: "-1",
135
+ onClick: N
136
+ }, {
137
+ default: q(() => [
138
+ te
139
+ ]),
140
+ _: 1
141
+ })) : O("", !0),
142
+ L(e.$slots, "default")
143
+ ])
144
+ ], 6)) : O("", !0)
145
+ ]))
146
+ ], 16));
147
+ }
148
+ });
149
+ export {
150
+ pe as default
151
+ };
2
152
  //# sourceMappingURL=index112.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index112.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index112.js","sources":["../src/components/BbTooltip/BbTooltip.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-tooltip\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-tooltip__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...(hasOpenedOnce ? { 'aria-describedby': id } : {}),\n\t\t\t\t\t\tonMouseenter,\n\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\tonBlur: closeTooltip,\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\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-tooltip__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-tooltip__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-tooltip__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-tooltip__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-tooltip__bubble-container--closing': closing,\n\t\t\t\t\t'bb-tooltip__bubble-container--opening': opening,\n\t\t\t\t\t'bb-tooltip__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"{\n\t\t\t\t\t...floatingStyles,\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-tooltip__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span class=\"bb-tooltip__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"bb-tooltip__close\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\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></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, ref } from 'vue';\nimport { useFloating, autoUpdate, flip, shift, arrow } from '@floating-ui/vue';\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';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { waitFor } from '@/utilities/functions/waitFor';\n\nexport type BbTooltipProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n>;\n\nconst props = withDefaults(defineProps<BbTooltipProps>(), {\n\tarrowPadding: 10,\n\tpadding: 10,\n\tplacement: 'top',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\ntype BbTooltipSlots = {\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-describedby': string;\n\t\t\tonMouseenter: typeof onMouseenter;\n\t\t\tonFocus: typeof onFocus;\n\t\t\tonBlur: typeof closeTooltip;\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: object) => any;\n};\n\ndefineSlots<BbTooltipSlots>();\n\nconst id = `bb_${props.id ?? useId().id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\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\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 canOpen = ref(true);\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\treturn undefined;\n});\n\nconst onMouseenter = () => {\n\tif (open.value || opening.value || props.disabled) return;\n\topenTooltip();\n\tdocument.addEventListener('mouseover', onMouseOver, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = throttle((event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n}, props.transitionDuration);\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n\tcanOpen.value = false;\n\tcloseTooltip();\n};\n\nconst hasOpenedOnce = ref(false);\nconst openTooltip = throttle(async () => {\n\tif (!canOpen.value) return;\n\thasOpenedOnce.value = true;\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}, props.transitionDuration);\n\nconst closeTooltip = throttle(async () => {\n\tawait waitFor(() => !opening.value);\n\tdocument.removeEventListener('mouseover', onMouseOver);\n\tdocument.removeEventListener('keydown', onEsc);\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}, props.transitionDuration);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-tooltip--block': props.block,\n\t\t[`bb-tooltip--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTooltip';\n</style>\n"],"names":["props","__props","id","useId","wrapper","ref","content","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","shift","arrow","canOpen","opening","open","closing","closed","arrowAttributes","computed","x","y","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","throttle","event","target","isOutside","closeTooltip","onClickClose","hasOpenedOnce","wait","waitFor","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,UAAMA,IAAQC,GA6BRC,IAAK,MAAMF,EAAM,MAAMG,IAAQ,GAAG,KAAK,IAEvCC,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,gBAAAG,GAAgB,WAAAC,GAAW,gBAAAC,EAAm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