bitboss-ui 0.2.76 → 1.0.1

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/index197.js +3 -2
  198. package/dist/index197.js.map +1 -1
  199. package/dist/index198.js +3 -3
  200. package/dist/index198.js.map +1 -1
  201. package/dist/index199.js +2 -3
  202. package/dist/index199.js.map +1 -1
  203. package/dist/index2.js +1 -42
  204. package/dist/index2.js.map +1 -1
  205. package/dist/index20.js +239 -1
  206. package/dist/index20.js.map +1 -1
  207. package/dist/index200.js +4 -368
  208. package/dist/index200.js.map +1 -1
  209. package/dist/index201.js +2 -134
  210. package/dist/index201.js.map +1 -1
  211. package/dist/index202.js +2 -5
  212. package/dist/index202.js.map +1 -1
  213. package/dist/index203.js +2 -19
  214. package/dist/index203.js.map +1 -1
  215. package/dist/index204.js +121 -2
  216. package/dist/index204.js.map +1 -1
  217. package/dist/index205.js +2 -2
  218. package/dist/index205.js.map +1 -1
  219. package/dist/index206.js +2 -174
  220. package/dist/index206.js.map +1 -1
  221. package/dist/index207.js +6 -23
  222. package/dist/index207.js.map +1 -1
  223. package/dist/index208.js +345 -350
  224. package/dist/index208.js.map +1 -1
  225. package/dist/index209.js +371 -14
  226. package/dist/index209.js.map +1 -1
  227. package/dist/index21.js +1 -115
  228. package/dist/index21.js.map +1 -1
  229. package/dist/index210.js +3 -16
  230. package/dist/index210.js.map +1 -1
  231. package/dist/index211.js +35 -20
  232. package/dist/index211.js.map +1 -1
  233. package/dist/index212.js +130 -25
  234. package/dist/index212.js.map +1 -1
  235. package/dist/index213.js +5 -8
  236. package/dist/index213.js.map +1 -1
  237. package/dist/index214.js +18 -234
  238. package/dist/index214.js.map +1 -1
  239. package/dist/index215.js +174 -3
  240. package/dist/index215.js.map +1 -1
  241. package/dist/index216.js +16 -35
  242. package/dist/index216.js.map +1 -1
  243. package/dist/index217.js +16 -6
  244. package/dist/index217.js.map +1 -1
  245. package/dist/index218.js +20 -2
  246. package/dist/index218.js.map +1 -1
  247. package/dist/index219.js +29 -2
  248. package/dist/index219.js.map +1 -1
  249. package/dist/index22.js +131 -1
  250. package/dist/index22.js.map +1 -1
  251. package/dist/index220.js +8 -4
  252. package/dist/index220.js.map +1 -1
  253. package/dist/index221.js +226 -112
  254. package/dist/index221.js.map +1 -1
  255. package/dist/index222.js +10 -2
  256. package/dist/index222.js.map +1 -1
  257. package/dist/index224.js +23 -6
  258. package/dist/index224.js.map +1 -1
  259. package/dist/index225.js +224 -17
  260. package/dist/index225.js.map +1 -1
  261. package/dist/index226.js +253 -74
  262. package/dist/index226.js.map +1 -1
  263. package/dist/index227.js +4 -2
  264. package/dist/index227.js.map +1 -1
  265. package/dist/index228.js +6 -160
  266. package/dist/index228.js.map +1 -1
  267. package/dist/index229.js +19 -1
  268. package/dist/index229.js.map +1 -1
  269. package/dist/index23.js +1 -115
  270. package/dist/index23.js.map +1 -1
  271. package/dist/index230.js +106 -5
  272. package/dist/index230.js.map +1 -1
  273. package/dist/index231.js +433 -67
  274. package/dist/index231.js.map +1 -1
  275. package/dist/index232.js +83 -218
  276. package/dist/index232.js.map +1 -1
  277. package/dist/index233.js +74 -253
  278. package/dist/index233.js.map +1 -1
  279. package/dist/index234.js +2 -6
  280. package/dist/index234.js.map +1 -1
  281. package/dist/index235.js +69 -2
  282. package/dist/index235.js.map +1 -1
  283. package/dist/index236.js +163 -294
  284. package/dist/index236.js.map +1 -1
  285. package/dist/index237.js +1 -4
  286. package/dist/index237.js.map +1 -1
  287. package/dist/index238.js +117 -2
  288. package/dist/index238.js.map +1 -1
  289. package/dist/index239.js +199 -116
  290. package/dist/index239.js.map +1 -1
  291. package/dist/index24.js +119 -1
  292. package/dist/index24.js.map +1 -1
  293. package/dist/index240.js +5 -105
  294. package/dist/index240.js.map +1 -1
  295. package/dist/index241.js +2 -15
  296. package/dist/index241.js.map +1 -1
  297. package/dist/index242.js +295 -2
  298. package/dist/index242.js.map +1 -1
  299. package/dist/index243.js +2 -2
  300. package/dist/index245.js +5 -2
  301. package/dist/index245.js.map +1 -1
  302. package/dist/index246.js +2 -435
  303. package/dist/index246.js.map +1 -1
  304. package/dist/index247.js +2 -89
  305. package/dist/index247.js.map +1 -1
  306. package/dist/index248.js +2 -200
  307. package/dist/index248.js.map +1 -1
  308. package/dist/index249.js +2 -4
  309. package/dist/index249.js.map +1 -1
  310. package/dist/index25.js +1 -92
  311. package/dist/index25.js.map +1 -1
  312. package/dist/index250.js +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 +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index228.js","sources":["../src/components/BaseTag/BaseTag.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-tag': true,\n\t\t\t'bb-base-tag--active': active,\n\t\t\t'bb-base-tag--disabled': disabled,\n\t\t\t'bb-base-tag--errors': hasErrors,\n\t\t\t'bb-base-tag--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<slot name=\"prepend-outer\"></slot>\n\t\t<span ref=\"innerContainer\" class=\"bb-base-tag__inner-container\">\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<span class=\"bb-base-tag__input-container\">\n\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"(option, index) in modelValueNormalized\"\n\t\t\t\t\t\t:key=\"option\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--comma': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t>{{ option\n\t\t\t\t\t\t}}{{ index < modelValueNormalized.length - 1 ? ',' : '' }}</span\n\t\t\t\t\t>\n\t\t\t\t</template>\n\t\t\t\t<template v-else>\n\t\t\t\t\t<BbChip\n\t\t\t\t\t\tv-for=\"(option, index) in modelValueNormalized\"\n\t\t\t\t\t\t:key=\"option\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--chip': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:clearable=\"true\"\n\t\t\t\t\t\t:text=\"option\"\n\t\t\t\t\t\t@click:clear=\"removeValue(index)\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\n\t\t\t\t<input\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\tref=\"input\"\n\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t:class=\"'bb-base-tag__text-input'\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t@focus=\"onInputFocus\"\n\t\t\t\t\t@keyup=\"onInputKeyup\"\n\t\t\t\t/>\n\t\t\t</span>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</span>\n\t\t<slot name=\"append-outer\"></slot>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, ref } from 'vue';\nimport { drop } from '@/utilities/functions/drop';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { wait } from '@/utilities/functions/wait';\nimport BbChip from '../BbChip/BbChip.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\n\nexport type BaseTagProps = {\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 * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\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 * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\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\nconst props = withDefaults(defineProps<BaseTagProps>(), {\n\tdivider: 'Enter',\n\tmultiple: true,\n});\n\nexport type BaseTagEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\n\t(e: 'change', event: Event): void;\n\n\t(e: 'click', event: MouseEvent): void;\n\n\t(e: 'duplicate', string: string): void;\n\n\t(e: 'focus', event: FocusEvent): void;\n\n\t(e: 'inactive'): void;\n\n\t(e: 'input', event: Event): void;\n\n\t(e: 'keydown', event: KeyboardEvent): void;\n\n\t(e: 'keyup', event: KeyboardEvent): void;\n\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst emit = defineEmits<BaseTagEvents>();\n\nexport type BaseTagSlots = {\n\tappend?: (props: object) => any;\n\n\t'append-outer'?: (props: object) => any;\n\n\tprepend?: (props: object) => any;\n\n\t'prepend-outer'?: (props: object) => any;\n};\n\ndefineSlots<BaseTagSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>('');\nconst computedPlaceholder = computed(() => {\n\treturn props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n\t[].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n\tlet map: { [key: string]: number } = {};\n\tmodelValueNormalized.value.forEach((value: any, index: number) => {\n\t\tmap[JSON.stringify(value)] = index;\n\t});\n\treturn {\n\t\tget: (value: any) => map[JSON.stringify(value)],\n\t};\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n\temit('keyup', event);\n\tif (props.readonly || props.disabled) {\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\tif (event.key === props.divider) {\n\t\tif (query.value[query.value.length - 1] === event.key) {\n\t\t\tquery.value = query.value.slice(0, query.value.length - 1);\n\t\t}\n\t\tif (!query.value) return;\n\t\tfocusedIndex.value = null;\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tif (isNil(currentIndex)) selectValue(query.value);\n\t\telse emit('duplicate', query.value);\n\t\tquery.value = '';\n\t} else if (event.key === 'ArrowLeft') {\n\t\tif (focusedIndex.value === null)\n\t\t\tfocusedIndex.value = modelValueNormalized.value.length - 1;\n\t\telse if (focusedIndex.value === 0) focusedIndex.value = null;\n\t\telse focusedIndex.value--;\n\t} else if (event.key === 'ArrowRight') {\n\t\tif (focusedIndex.value === null) focusedIndex.value = 1;\n\t\telse if (focusedIndex.value === modelValueNormalized.value.length - 1)\n\t\t\tfocusedIndex.value = null;\n\t\telse focusedIndex.value++;\n\t} else if (event.key === 'Backspace') {\n\t\tif (query.value) return;\n\t\tif (isNotNil(focusedIndex.value)) {\n\t\t\tremoveValue(focusedIndex.value);\n\t\t\tfocusedIndex.value = clamp(\n\t\t\t\tfocusedIndex.value,\n\t\t\t\t0,\n\t\t\t\tmodelValueNormalized.value.length - 2\n\t\t\t);\n\t\t\tif (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n\t\t} else focusedIndex.value = modelValueNormalized.value.length - 1;\n\t} else if (event.key === 'Tab' || event.key === 'Escape') {\n\t\tfocusedIndex.value = null;\n\t}\n};\n\nconst selectValue = (text: string) => {\n\tif (props.multiple) emit('update:modelValue', props.modelValue.concat(text));\n\telse emit('update:modelValue', text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n\tif (typeof indexOrString === 'number') {\n\t\tif (props.multiple)\n\t\t\temit('update:modelValue', drop(props.modelValue, 1, indexOrString));\n\t\telse emit('update:modelValue', null);\n\t} else {\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tremoveValue(currentIndex);\n\t}\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tactive.value = true;\n\tdocument.addEventListener('click', onClickOutside);\n\tdocument.addEventListener('focusin', onFocusOutside);\n\tif (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tif (input.value instanceof HTMLElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('click', onClickOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('focusin', onFocusOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonKeydown: (event: KeyboardEvent) => {\n\t\tif (event.key === 'Enter' && props.divider === 'Enter') {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\temit('keydown', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n};\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTag';\n</style>\n"],"names":["props","__props","emit","__emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6IA,UAAMA,IAAQC,GA2BRC,IAAOC;AAcb,QAAIH,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC9C,YAAA,IAAI,MAAM,2DAA2D;AAGtE,UAAAI,IAAiBC,EAAwB,IAAI,GAC7CC,IAAiBD,EAAwB,IAAI,GAC7CE,IAAQF,EAAwB,IAAI,GACpCG,IAAQH,EAAY,EAAE,GACtBI,IAAsBC,EAAS,MAC7BV,EAAM,WACb,GAEKW,IAAuBD;AAAA,MAAS,MACrC,CAAA,EAAG,OAAOV,EAAM,UAAU,EAAE,OAAOY,CAAQ;AAAA,IAAA,GAMtCC,IAAoBH,EAAS,MAAM;AACxC,UAAII,IAAiC,CAAA;AACrC,aAAAH,EAAqB,MAAM,QAAQ,CAACI,GAAYC,MAAkB;AACjE,QAAAF,EAAI,KAAK,UAAUC,CAAK,CAAC,IAAIC;AAAA,MAAA,CAC7B,GACM;AAAA,QACN,KAAK,CAACD,MAAeD,EAAI,KAAK,UAAUC,CAAK,CAAC;AAAA,MAAA;AAAA,IAC/C,CACA,GAQKE,IAASZ,EAAI,EAAK,GAElBa,IAAeb,EAAmB,IAAI,GAEtCc,IAAe,CAACC,MAAyB;AAE1C,UADJlB,EAAK,SAASkB,CAAK,GACfpB,EAAM,YAAYA,EAAM,UAAU;AACrC,QAAAoB,EAAM,eAAe;AACrB;AAAA,MACD;AACI,UAAAA,EAAM,Q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EF,GAGK0B,IAAiB;AAAA,MACtB,QAAQ,CAACd,MAAsBlB,EAAK,QAAQkB,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBlB,EAAK,UAAUkB,CAAK;AAAA,MAChD,WAAW,CAACA,MAAyB;AACpC,QAAIA,EAAM,QAAQ,WAAWpB,EAAM,YAAY,WAC9CoB,EAAM,eAAe,GAEtBlB,EAAK,WAAWkB,CAAK;AAAA,MACtB;AAAA,MACA,SAAS,CAACA,MAAiBlB,EAAK,SAASkB,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index228.js","sources":["../node_modules/mime/dist/src/index.js"],"sourcesContent":["import otherTypes from '../types/other.js';\nimport standardTypes from '../types/standard.js';\nimport Mime from './Mime.js';\nexport { default as Mime } from './Mime.js';\nexport default new Mime(standardTypes, otherTypes)._freeze();\n//# sourceMappingURL=index.js.map"],"names":["index","Mime","standardTypes","otherTypes"],"mappings":";;;AAIA,MAAeA,IAAA,IAAIC,EAAKC,GAAeC,CAAU,EAAE,QAAS;","x_google_ignoreList":[0]}
package/dist/index229.js CHANGED
@@ -1,2 +1,20 @@
1
-
1
+ const e = (o, r, f) => o.reduce((t, n) => {
2
+ if (t)
3
+ return t;
4
+ if (f(n))
5
+ return n;
6
+ if (r in n) {
7
+ const i = e(
8
+ [].concat(n[r]),
9
+ r,
10
+ f
11
+ );
12
+ if (i)
13
+ return i;
14
+ }
15
+ return t;
16
+ }, null);
17
+ export {
18
+ e as findInTree
19
+ };
2
20
  //# sourceMappingURL=index229.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index229.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index229.js","sources":["../src/utilities/functions/findInTree.ts"],"sourcesContent":["/**\n * Find the eleemnt for which iteratee rfeturns true in a tree like structure\n */\nexport const findInTree = <T extends Record<string, any>>(\n\titems: T[],\n\tkeyName: keyof T,\n\titeratee: (item: T) => boolean\n): null | T => {\n\treturn items.reduce((acc: null | T, curr) => {\n\t\tif (acc) return acc;\n\t\tif (iteratee(curr)) {\n\t\t\treturn curr;\n\t\t}\n\n\t\tif (keyName in curr) {\n\t\t\tconst fromChildren = findInTree(\n\t\t\t\t[].concat(curr[keyName]),\n\t\t\t\tkeyName,\n\t\t\t\titeratee\n\t\t\t);\n\t\t\tif (fromChildren) {\n\t\t\t\treturn fromChildren;\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, null);\n};\n"],"names":["findInTree","items","keyName","iteratee","acc","curr","fromChildren"],"mappings":"AAGO,MAAMA,IAAa,CACzBC,GACAC,GACAC,MAEOF,EAAM,OAAO,CAACG,GAAeC,MAAS;AACxC,MAAAD;AAAY,WAAAA;AACZ,MAAAD,EAASE,CAAI;AACT,WAAAA;AAGR,MAAIH,KAAWG,GAAM;AACpB,UAAMC,IAAeN;AAAA,MACpB,CAAA,EAAG,OAAOK,EAAKH,CAAO,CAAC;AAAA,MACvBA;AAAA,MACAC;AAAA,IAAA;AAED,QAAIG;AACI,aAAAA;AAAA,EAET;AACO,SAAAF;GACL,IAAI;"}
package/dist/index23.js CHANGED
@@ -1,116 +1,2 @@
1
- import { defineComponent as $, computed as B, ref as h, onMounted as N, watch as C, openBlock as T, createElementBlock as _, normalizeClass as x, renderSlot as m, createElementVNode as g, mergeProps as A, withModifiers as L } from "vue";
2
- import { clamp as f } from "./index197.js";
3
- const S = { class: "bb-base-number-input__inner-container" }, j = ["id", "autocomplete", "autofocus", "disabled", "name", "placeholder", "readonly", "step"], z = /* @__PURE__ */ $({
4
- __name: "BaseNumberInput",
5
- props: {
6
- autocomplete: {},
7
- autofocus: {},
8
- disabled: { type: Boolean },
9
- hasErrors: { type: Boolean },
10
- id: {},
11
- max: {},
12
- min: {},
13
- modelValue: {},
14
- name: {},
15
- placeholder: {},
16
- readonly: {},
17
- step: { default: 1 }
18
- },
19
- emits: ["blur", "change", "click", "decrease", "focus", "increase", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
20
- setup(v, { expose: I, emit: V }) {
21
- const n = v, a = V, k = B(() => ({
22
- "bb-base-number-input": !0,
23
- "bb-base-number-input--disabled": n.disabled,
24
- "bb-base-number-input--errors": n.hasErrors,
25
- "bb-base-number-input--readonly": n.readonly
26
- })), s = h(null), r = h(!1), u = () => {
27
- if (n.disabled || n.readonly || r.value)
28
- return;
29
- const e = typeof n.min > "u" ? -1 / 0 : n.min, o = typeof n.max > "u" ? 1 / 0 : n.max;
30
- let t = Math.max(Number(n.modelValue || 0) - n.step, e);
31
- t = t === null ? t : f(t, e, o), a("decrease", t), a("update:modelValue", t);
32
- }, i = () => {
33
- if (n.disabled || n.readonly || r.value)
34
- return;
35
- const e = typeof n.min > "u" ? -1 / 0 : n.min, o = typeof n.max > "u" ? 1 / 0 : n.max;
36
- let t = Math.min(Number(n.modelValue || 0) + +n.step, o);
37
- t = t === null ? t : f(t, e, o), a("increase", t), a("update:modelValue", t);
38
- };
39
- I({
40
- increase: i,
41
- decrease: u
42
- });
43
- const w = (e) => {
44
- if (e.target instanceof HTMLInputElement) {
45
- const o = e.target.value, t = /[,.]/g, d = [...o.matchAll(t)];
46
- if (!(d.length === 1 && d.some((l) => l.index === o.length - 1)) && !(d.length && o[o.length - 1] === "0") && o !== "-") {
47
- r.value = !1;
48
- let l;
49
- e.target.value === "" ? l = null : l = b(e.target.value);
50
- const p = typeof n.min > "u" ? -1 / 0 : n.min, c = typeof n.max > "u" ? 1 / 0 : n.max;
51
- l = l === null ? l : f(l, p, c), a("update:modelValue", l), s.value && (l === null ? s.value.value = "" : s.value.value = `${l}`);
52
- } else
53
- r.value = !0;
54
- a("input", e);
55
- }
56
- }, b = (e) => {
57
- if (typeof e == "number")
58
- return e;
59
- let o = e.replaceAll(",", "."), l = o.slice(0, 1).concat(o.slice(1).replaceAll("-", "")).replaceAll(/[^\d.-]/g, "").split("."), p = l.slice(0, 1).join("") || 0, c = l.slice(1).join("") || 0, M = `${p}.${c}`;
60
- return Number(M);
61
- }, E = {
62
- onBlur: (e) => a("blur", e),
63
- onChange: (e) => a("change", e),
64
- onClick: (e) => a("click", e),
65
- onFocus: (e) => a("focus", e),
66
- onKeydown: (e) => a("keydown", e),
67
- onMousedown: (e) => a("mousedown", e),
68
- onMouseup: (e) => a("mouseup", e)
69
- }, y = (e) => {
70
- s.value ? e === null || e === "" || e === void 0 ? s.value.value = "" : typeof e < "u" && (s.value.value = b(e).toString()) : console.error("Could not align input as it is not mounted");
71
- };
72
- return N(() => {
73
- y(n.modelValue);
74
- }), C(() => n.modelValue, y), (e, o) => (T(), _("span", {
75
- class: x(["bb-base-number-input__container", k.value])
76
- }, [
77
- m(e.$slots, "prepend-outer", {
78
- decrease: u,
79
- increase: i
80
- }),
81
- g("span", S, [
82
- m(e.$slots, "prepend", {
83
- decrease: u,
84
- increase: i
85
- }),
86
- g("input", A({ id: e.id }, E, {
87
- ref_key: "input",
88
- ref: s,
89
- autocomplete: e.autocomplete,
90
- autofocus: e.autofocus,
91
- class: "bb-base-number-input__input",
92
- disabled: e.disabled,
93
- inputmode: "decimal",
94
- name: e.name,
95
- placeholder: e.placeholder,
96
- readonly: e.readonly,
97
- step: e.step,
98
- type: "text",
99
- onInput: L(w, ["stop"])
100
- }), null, 16, j),
101
- m(e.$slots, "append", {
102
- decrease: u,
103
- increase: i
104
- })
105
- ]),
106
- m(e.$slots, "append-outer", {
107
- decrease: u,
108
- increase: i
109
- })
110
- ], 2));
111
- }
112
- });
113
- export {
114
- z as default
115
- };
1
+
116
2
  //# sourceMappingURL=index23.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index23.js","sources":["../src/components/BaseNumberInput/BaseNumberInput.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-base-number-input__container\" :class=\"classes\">\n\t\t<slot :decrease=\"decrease\" :increase=\"increase\" name=\"prepend-outer\"></slot>\n\t\t<span class=\"bb-base-number-input__inner-container\">\n\t\t\t<slot :decrease=\"decrease\" :increase=\"increase\" name=\"prepend\"></slot>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\tref=\"input\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:class=\"'bb-base-number-input__input'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:inputmode=\"'decimal'\"\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\t:type=\"`text`\"\n\t\t\t\t@input.stop=\"onInput\"\n\t\t\t/>\n\t\t\t<slot :decrease=\"decrease\" :increase=\"increase\" name=\"append\"></slot>\n\t\t</span>\n\t\t<slot :decrease=\"decrease\" :increase=\"increase\" name=\"append-outer\"></slot>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, onMounted, ref, watch } from 'vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseNumberInputProps = {\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};\n\nconst props = withDefaults(defineProps<BaseNumberInputProps>(), {\n\tstep: 1,\n});\n\nexport type BaseNumberInputEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'decrease', value: number): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'increase', value: number): 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: number | null): void;\n};\n\nconst emit = defineEmits<BaseNumberInputEvents>();\n\nexport type BaseNumberInputSlots = {\n\tappend?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\n\t'append-outer'?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\n\tprepend?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\n\t'prepend-outer'?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n};\n\ndefineSlots<BaseNumberInputSlots>();\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-base-number-input': true,\n\t\t'bb-base-number-input--disabled': props.disabled,\n\t\t'bb-base-number-input--errors': props.hasErrors,\n\t\t'bb-base-number-input--readonly': props.readonly,\n\t};\n});\n\nconst input = ref<HTMLInputElement | null>(null);\nconst isInsertingSymbols = ref(false);\nconst decrease = () => {\n\tif (props.disabled || props.readonly || isInsertingSymbols.value) return;\n\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\tlet valueToEmit = Math.max(Number(props.modelValue || 0) - props.step, min);\n\n\tvalueToEmit =\n\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\temit('decrease', valueToEmit);\n\temit('update:modelValue', valueToEmit);\n};\n\nconst increase = () => {\n\tif (props.disabled || props.readonly || isInsertingSymbols.value) return;\n\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\tlet valueToEmit = Math.min(Number(props.modelValue || 0) + +props.step, max);\n\n\tvalueToEmit =\n\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\temit('increase', valueToEmit);\n\temit('update:modelValue', valueToEmit);\n};\n\ndefineExpose({\n\tincrease,\n\tdecrease,\n});\n\nconst onInput = (event: Event) => {\n\tif (event.target instanceof HTMLInputElement) {\n\t\tconst value = event.target.value;\n\t\tconst commaOrPeriod = /[,.]/g;\n\t\tconst matches = [...value.matchAll(commaOrPeriod)];\n\t\t/**\n\t\t * Proceed unless the user is pressing comma or period to insert a decimal number,\n\t\t * we do not want to replace the comma as soon as the user presses it\n\t\t */\n\t\tif (\n\t\t\t!(\n\t\t\t\tmatches.length === 1 &&\n\t\t\t\tmatches.some((match) => match.index === value.length - 1)\n\t\t\t) &&\n\t\t\t!(matches.length && value[value.length - 1] === '0') &&\n\t\t\tvalue !== '-'\n\t\t) {\n\t\t\tisInsertingSymbols.value = false;\n\t\t\tlet valueToEmit: null | number;\n\t\t\tif (event.target.value === '') {\n\t\t\t\tvalueToEmit = null;\n\t\t\t} else {\n\t\t\t\tvalueToEmit = makeValidNumberString(event.target.value);\n\t\t\t}\n\t\t\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\t\t\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\t\t\tvalueToEmit =\n\t\t\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\t\t\temit('update:modelValue', valueToEmit);\n\t\t\tif (input.value) {\n\t\t\t\tif (valueToEmit === null) {\n\t\t\t\t\tinput.value.value = '';\n\t\t\t\t} else {\n\t\t\t\t\tinput.value.value = `${valueToEmit}`;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tisInsertingSymbols.value = true;\n\t\t}\n\t\temit('input', event);\n\t}\n};\n\nconst makeValidNumberString = (value: string | number) => {\n\tif (typeof value === 'number') return value;\n\t// Replace comma with periods\n\tlet current = value.replaceAll(',', '.');\n\tlet preventDashes = current\n\t\t.slice(0, 1)\n\t\t.concat(current.slice(1).replaceAll('-', ''));\n\tlet noLetters = preventDashes.replaceAll(/[^\\d.-]/g, '');\n\tlet parts = noLetters.split('.');\n\tlet first = parts.slice(0, 1).join('') || 0;\n\tlet second = parts.slice(1).join('') || 0;\n\tlet unified = `${first}.${second}`;\n\treturn Number(unified);\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\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst alignInputToModelValue = (value?: string | number | null) => {\n\tif (input.value) {\n\t\tif (value === null || value === '' || value === undefined) {\n\t\t\tinput.value.value = '';\n\t\t} else if (typeof value !== 'undefined') {\n\t\t\tinput.value.value = makeValidNumberString(value).toString();\n\t\t}\n\t} else {\n\t\tconsole.error('Could not align input as it is not mounted');\n\t}\n};\nonMounted(() => {\n\talignInputToModelValue(props.modelValue);\n});\n/**\n * Allow modelValue to be passed as string (as sometimes happens from the server) and normalize it\n */\nwatch(() => props.modelValue, alignInputToModelValue);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseNumberInput';\n</style>\n"],"names":["props","__props","emit","__emit","classes","computed","input","ref","isInsertingSymbols","decrease","min","max","valueToEmit","clamp","increase","__expose","onInput","event","value","commaOrPeriod","matches","match","makeValidNumberString","current","parts","first","second","unified","eventListeners","alignInputToModelValue","onMounted","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiGA,UAAMA,IAAQC,GAkBRC,IAAOC,GA0BPC,IAAUC,EAAS,OACjB;AAAA,MACN,wBAAwB;AAAA,MACxB,kCAAkCL,EAAM;AAAA,MACxC,gCAAgCA,EAAM;AAAA,MACtC,kCAAkCA,EAAM;AAAA,IAAA,EAEzC,GAEKM,IAAQC,EAA6B,IAAI,GACzCC,IAAqBD,EAAI,EAAK,GAC9BE,IAAW,MAAM;AACtB,UAAIT,EAAM,YAAYA,EAAM,YAAYQ,EAAmB;AAAO;AAClE,YAAME,IAAM,OAAOV,EAAM,MAAQ,MAAc,SAAYA,EAAM,KAC3DW,IAAM,OAAOX,EAAM,MAAQ,MAAc,QAAWA,EAAM;AAC5D,UAAAY,IAAc,KAAK,IAAI,OAAOZ,EAAM,cAAc,CAAC,IAAIA,EAAM,MAAMU,CAAG;AAE1E,MAAAE,IACCA,MAAgB,OAAOA,IAAcC,EAAMD,GAAaF,GAAKC,CAAG,GACjET,EAAK,YAAYU,CAAW,GAC5BV,EAAK,qBAAqBU,CAAW;AAAA,IAAA,GAGhCE,IAAW,MAAM;AACtB,UAAId,EAAM,YAAYA,EAAM,YAAYQ,EAAmB;AAAO;AAClE,YAAME,IAAM,OAAOV,EAAM,MAAQ,MAAc,SAAYA,EAAM,KAC3DW,IAAM,OAAOX,EAAM,MAAQ,MAAc,QAAWA,EAAM;AAC5D,UAAAY,IAAc,KAAK,IAAI,OAAOZ,EAAM,cAAc,CAAC,IAAI,CAACA,EAAM,MAAMW,CAAG;AAE3E,MAAAC,IACCA,MAAgB,OAAOA,IAAcC,EAAM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KAAK,EAAE,CAAC,EACf,WAAW,YAAY,EAAE,EACjC,MAAM,GAAG,GAC3BE,IAAQD,EAAM,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,GACtCE,IAASF,EAAM,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,GACpCG,IAAU,GAAGF,CAAK,IAAIC,CAAM;AAChC,aAAO,OAAOC,CAAO;AAAA,IAAA,GAMhBC,IAAiB;AAAA,MACtB,QAAQ,CAACX,MAAsBf,EAAK,QAAQe,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBf,EAAK,UAAUe,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBf,EAAK,SAASe,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBf,EAAK,SAASe,CAAK;AAAA,MACnD,WAAW,CAACA,MAAyBf,EAAK,WAAWe,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBf,EAAK,aAAae,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBf,EAAK,WAAWe,CAAK;AAAA,IAAA,GAGlDY,IAAyB,CAACX,MAAmC;AAClE,MAAIZ,EAAM,QACLY,MAAU,QAAQA,MAAU,MAAMA,MAAU,SAC/CZ,EAAM,MAAM,QAAQ,KACV,OAAOY,IAAU,QAC3BZ,EAAM,MAAM,QAAQgB,EAAsBJ,CAAK,EAAE,cAGlD,QAAQ,MAAM,4CAA4C;AAAA,IAC3D;AAED,WAAAY,EAAU,MAAM;AACf,MAAAD,EAAuB7B,EAAM,UAAU;AAAA,IAAA,CACvC,GAIK+B,EAAA,MAAM/B,EAAM,YAAY6B,CAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index23.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index230.js CHANGED
@@ -1,8 +1,109 @@
1
- const o = (l, n, f = (r) => r, u) => l.map((r) => Array.isArray(r[n]) ? [
2
- f(r, u),
3
- ...o(r[n], n, f, f(r, u))
4
- ] : [f(r, u)]).flat();
1
+ function l(n) {
2
+ return a(n) ? (n.nodeName || "").toLowerCase() : "#document";
3
+ }
4
+ function i(n) {
5
+ var t;
6
+ return (n == null || (t = n.ownerDocument) == null ? void 0 : t.defaultView) || window;
7
+ }
8
+ function y(n) {
9
+ var t;
10
+ return (t = (a(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : t.documentElement;
11
+ }
12
+ function a(n) {
13
+ return n instanceof Node || n instanceof i(n).Node;
14
+ }
15
+ function S(n) {
16
+ return n instanceof Element || n instanceof i(n).Element;
17
+ }
18
+ function d(n) {
19
+ return n instanceof HTMLElement || n instanceof i(n).HTMLElement;
20
+ }
21
+ function s(n) {
22
+ return typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof i(n).ShadowRoot;
23
+ }
24
+ function m(n) {
25
+ const {
26
+ overflow: t,
27
+ overflowX: e,
28
+ overflowY: o,
29
+ display: r
30
+ } = p(n);
31
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + e) && !["inline", "contents"].includes(r);
32
+ }
33
+ function E(n) {
34
+ return ["table", "td", "th"].includes(l(n));
35
+ }
36
+ function N(n) {
37
+ const t = h(), e = p(n);
38
+ return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (e.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (e.contain || "").includes(o));
39
+ }
40
+ function T(n) {
41
+ let t = u(n);
42
+ for (; d(t) && !w(t); ) {
43
+ if (N(t))
44
+ return t;
45
+ t = u(t);
46
+ }
47
+ return null;
48
+ }
49
+ function h() {
50
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
51
+ }
52
+ function w(n) {
53
+ return ["html", "body", "#document"].includes(l(n));
54
+ }
55
+ function p(n) {
56
+ return i(n).getComputedStyle(n);
57
+ }
58
+ function C(n) {
59
+ return S(n) ? {
60
+ scrollLeft: n.scrollLeft,
61
+ scrollTop: n.scrollTop
62
+ } : {
63
+ scrollLeft: n.pageXOffset,
64
+ scrollTop: n.pageYOffset
65
+ };
66
+ }
67
+ function u(n) {
68
+ if (l(n) === "html")
69
+ return n;
70
+ const t = (
71
+ // Step into the shadow DOM of the parent of a slotted node.
72
+ n.assignedSlot || // DOM Element detected.
73
+ n.parentNode || // ShadowRoot detected.
74
+ s(n) && n.host || // Fallback.
75
+ y(n)
76
+ );
77
+ return s(t) ? t.host : t;
78
+ }
79
+ function g(n) {
80
+ const t = u(n);
81
+ return w(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : d(t) && m(t) ? t : g(t);
82
+ }
83
+ function f(n, t, e) {
84
+ var o;
85
+ t === void 0 && (t = []), e === void 0 && (e = !0);
86
+ const r = g(n), b = r === ((o = n.ownerDocument) == null ? void 0 : o.body), c = i(r);
87
+ return b ? t.concat(c, c.visualViewport || [], m(r) ? r : [], c.frameElement && e ? f(c.frameElement) : []) : t.concat(r, f(r, [], e));
88
+ }
5
89
  export {
6
- o as flattenTree
90
+ p as getComputedStyle,
91
+ T as getContainingBlock,
92
+ y as getDocumentElement,
93
+ g as getNearestOverflowAncestor,
94
+ l as getNodeName,
95
+ C as getNodeScroll,
96
+ f as getOverflowAncestors,
97
+ u as getParentNode,
98
+ i as getWindow,
99
+ N as isContainingBlock,
100
+ S as isElement,
101
+ d as isHTMLElement,
102
+ w as isLastTraversableNode,
103
+ a as isNode,
104
+ m as isOverflowElement,
105
+ s as isShadowRoot,
106
+ E as isTableElement,
107
+ h as isWebKit
7
108
  };
8
109
  //# sourceMappingURL=index230.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index230.js","sources":["../src/utilities/functions/flattenTree.ts"],"sourcesContent":["export const flattenTree = <T extends Record<string, any>, U>(\n\titems: T[],\n\tkeyName: keyof T,\n\tmapper: (item: T, parent?: U) => U = (x: any) => x,\n\tparent?: ReturnType<typeof mapper>\n): ReturnType<typeof mapper>[] => {\n\treturn items\n\t\t.map((item) => {\n\t\t\tif (Array.isArray(item[keyName])) {\n\t\t\t\treturn [\n\t\t\t\t\tmapper(item, parent),\n\t\t\t\t\t...flattenTree(item[keyName], keyName, mapper, mapper(item, parent)),\n\t\t\t\t];\n\t\t\t}\n\t\t\treturn [mapper(item, parent)];\n\t\t})\n\t\t.flat();\n};\n"],"names":["flattenTree","items","keyName","mapper","x","parent","item"],"mappings":"AAAa,MAAAA,IAAc,CAC1BC,GACAC,GACAC,IAAqC,CAACC,MAAWA,GACjDC,MAEOJ,EACL,IAAI,CAACK,MACD,MAAM,QAAQA,EAAKJ,CAAO,CAAC,IACvB;AAAA,EACNC,EAAOG,GAAMD,CAAM;AAAA,EACnB,GAAGL,EAAYM,EAAKJ,CAAO,GAAGA,GAASC,GAAQA,EAAOG,GAAMD,CAAM,CAAC;AAAA,IAG9D,CAACF,EAAOG,GAAMD,CAAM,CAAC,CAC5B,EACA,KAAK;"}
1
+ {"version":3,"file":"index230.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"],"sourcesContent":["function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n"],"names":["getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","value","isElement","isHTMLElement","isShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","isTableElement","isContainingBlock","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win"],"mappings":"AAAA,SAASA,EAAYC,GAAM;AACzB,SAAIC,EAAOD,CAAI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