bitboss-ui 0.2.30 → 0.2.32

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 (333) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +6 -6
  2. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +16 -16
  3. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +36 -36
  4. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +20 -20
  5. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +21 -21
  6. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +8 -8
  7. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +6 -6
  8. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +20 -20
  9. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +20 -20
  10. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +36 -36
  11. package/dist/components/BaseRating/BaseRating.vue.d.ts +17 -17
  12. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +23 -23
  13. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +15 -15
  14. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +1 -1
  15. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +20 -20
  16. package/dist/components/BaseTag/BaseTag.vue.d.ts +20 -20
  17. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +19 -19
  18. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +18 -18
  19. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +3 -3
  20. package/dist/components/BbAlert/BbAlert.vue.d.ts +3 -3
  21. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +8 -8
  22. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  23. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +6 -6
  24. package/dist/components/BbButton/BbButton.vue.d.ts +1 -1
  25. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +11 -11
  26. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +27 -27
  27. package/dist/components/BbChip/BbChip.vue.d.ts +2 -2
  28. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +4 -4
  29. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -24
  30. package/dist/components/BbDialog/BbDialog.vue.d.ts +2 -2
  31. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +11 -11
  32. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +14 -14
  33. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +4 -4
  34. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +3 -3
  35. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +10 -10
  36. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +9 -9
  37. package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
  38. package/dist/components/BbPopover/BbPopover.vue.d.ts +8 -8
  39. package/dist/components/BbRadio/BbRadio.vue.d.ts +10 -10
  40. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +27 -27
  41. package/dist/components/BbRating/BbRating.vue.d.ts +10 -10
  42. package/dist/components/BbSelect/BbSelect.vue.d.ts +19 -19
  43. package/dist/components/BbSlider/BbSlider.vue.d.ts +8 -8
  44. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  45. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +2 -2
  46. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
  47. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +20 -20
  48. package/dist/components/BbTab/BbTab.vue.d.ts +5 -5
  49. package/dist/components/BbTable/BbTable.vue.d.ts +12 -12
  50. package/dist/components/BbTable/types.d.ts +108 -108
  51. package/dist/components/BbTag/BbTag.vue.d.ts +13 -13
  52. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +11 -11
  53. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +10 -10
  54. package/dist/components/BbToast/BbToast.vue.d.ts +1 -1
  55. package/dist/components/BbToast/BbToastMessage.vue.d.ts +1 -1
  56. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
  57. package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
  58. package/dist/composables/useConfirm.d.ts +10 -10
  59. package/dist/composables/useOptions.d.ts +2 -2
  60. package/dist/composables/useRoute.d.ts +2 -2
  61. package/dist/composables/useRouter.d.ts +1 -1
  62. package/dist/composables/useToast.d.ts +5 -5
  63. package/dist/composables/useWizard.d.ts +1 -1
  64. package/dist/index.d.ts +126 -126
  65. package/dist/index101.js +53 -58
  66. package/dist/index101.js.map +1 -1
  67. package/dist/index103.js +18 -18
  68. package/dist/index103.js.map +1 -1
  69. package/dist/index105.js +16 -16
  70. package/dist/index105.js.map +1 -1
  71. package/dist/index107.js +15 -15
  72. package/dist/index107.js.map +1 -1
  73. package/dist/index109.js.map +1 -1
  74. package/dist/index11.js +7 -7
  75. package/dist/index11.js.map +1 -1
  76. package/dist/index111.js +16 -16
  77. package/dist/index111.js.map +1 -1
  78. package/dist/index113.js +2 -2
  79. package/dist/index113.js.map +1 -1
  80. package/dist/index115.js +6 -6
  81. package/dist/index115.js.map +1 -1
  82. package/dist/index116.js +1 -1
  83. package/dist/index116.js.map +1 -1
  84. package/dist/index117.js +1 -1
  85. package/dist/index117.js.map +1 -1
  86. package/dist/index118.js +4 -4
  87. package/dist/index118.js.map +1 -1
  88. package/dist/index119.js +5 -5
  89. package/dist/index119.js.map +1 -1
  90. package/dist/index120.js.map +1 -1
  91. package/dist/index121.js +1 -1
  92. package/dist/index121.js.map +1 -1
  93. package/dist/index122.js.map +1 -1
  94. package/dist/index124.js.map +1 -1
  95. package/dist/index125.js +4 -4
  96. package/dist/index125.js.map +1 -1
  97. package/dist/index126.js +1 -1
  98. package/dist/index126.js.map +1 -1
  99. package/dist/index127.js +1 -1
  100. package/dist/index128.js +4 -1
  101. package/dist/index128.js.map +1 -1
  102. package/dist/index129.js.map +1 -1
  103. package/dist/index13.js +11 -11
  104. package/dist/index13.js.map +1 -1
  105. package/dist/index130.js.map +1 -1
  106. package/dist/index131.js +2 -2
  107. package/dist/index15.js +229 -227
  108. package/dist/index15.js.map +1 -1
  109. package/dist/index17.js +61 -62
  110. package/dist/index17.js.map +1 -1
  111. package/dist/index19.js +22 -22
  112. package/dist/index19.js.map +1 -1
  113. package/dist/index196.js +2 -5
  114. package/dist/index196.js.map +1 -1
  115. package/dist/index197.js +2 -16
  116. package/dist/index197.js.map +1 -1
  117. package/dist/index198.js +4 -16
  118. package/dist/index198.js.map +1 -1
  119. package/dist/index199.js +294 -18
  120. package/dist/index199.js.map +1 -1
  121. package/dist/index2.js +23 -23
  122. package/dist/index2.js.map +1 -1
  123. package/dist/index200.js +13 -17
  124. package/dist/index200.js.map +1 -1
  125. package/dist/index201.js +13 -26
  126. package/dist/index201.js.map +1 -1
  127. package/dist/index202.js +19 -8
  128. package/dist/index202.js.map +1 -1
  129. package/dist/index203.js +20 -2
  130. package/dist/index203.js.map +1 -1
  131. package/dist/index204.js +29 -3
  132. package/dist/index204.js.map +1 -1
  133. package/dist/index205.js +8 -35
  134. package/dist/index205.js.map +1 -1
  135. package/dist/index206.js +2 -6
  136. package/dist/index206.js.map +1 -1
  137. package/dist/index207.js +235 -2
  138. package/dist/index207.js.map +1 -1
  139. package/dist/index208.js +3 -4
  140. package/dist/index208.js.map +1 -1
  141. package/dist/index209.js +33 -376
  142. package/dist/index209.js.map +1 -1
  143. package/dist/index21.js +4 -4
  144. package/dist/index21.js.map +1 -1
  145. package/dist/index210.js +6 -2
  146. package/dist/index210.js.map +1 -1
  147. package/dist/index211.js +8 -371
  148. package/dist/index211.js.map +1 -1
  149. package/dist/index212.js +378 -2
  150. package/dist/index212.js.map +1 -1
  151. package/dist/index213.js +134 -3
  152. package/dist/index213.js.map +1 -1
  153. package/dist/index214.js +2 -3
  154. package/dist/index214.js.map +1 -1
  155. package/dist/index215.js +174 -2
  156. package/dist/index215.js.map +1 -1
  157. package/dist/index216.js +23 -2
  158. package/dist/index216.js.map +1 -1
  159. package/dist/index217.js +365 -126
  160. package/dist/index217.js.map +1 -1
  161. package/dist/index218.js +3 -174
  162. package/dist/index218.js.map +1 -1
  163. package/dist/index219.js +3 -23
  164. package/dist/index219.js.map +1 -1
  165. package/dist/index220.js +2 -10
  166. package/dist/index220.js.map +1 -1
  167. package/dist/index221.js +26 -233
  168. package/dist/index221.js.map +1 -1
  169. package/dist/index222.js +16 -8
  170. package/dist/index222.js.map +1 -1
  171. package/dist/index223.js +2 -121
  172. package/dist/index223.js.map +1 -1
  173. package/dist/index224.js +8 -27
  174. package/dist/index224.js.map +1 -1
  175. package/dist/index225.js +120 -12
  176. package/dist/index225.js.map +1 -1
  177. package/dist/index226.js +1 -1
  178. package/dist/index227.js +3 -434
  179. package/dist/index227.js.map +1 -1
  180. package/dist/index228.js +2 -89
  181. package/dist/index228.js.map +1 -1
  182. package/dist/index229.js +6 -200
  183. package/dist/index229.js.map +1 -1
  184. package/dist/index23.js +15 -17
  185. package/dist/index23.js.map +1 -1
  186. package/dist/index230.js +2 -295
  187. package/dist/index230.js.map +1 -1
  188. package/dist/index231.js +2 -6
  189. package/dist/index231.js.map +1 -1
  190. package/dist/index232.js +2 -2
  191. package/dist/index236.js +435 -2
  192. package/dist/index236.js.map +1 -1
  193. package/dist/index237.js +89 -2
  194. package/dist/index237.js.map +1 -1
  195. package/dist/index238.js +199 -3
  196. package/dist/index238.js.map +1 -1
  197. package/dist/index239.js +218 -111
  198. package/dist/index239.js.map +1 -1
  199. package/dist/index240.js +246 -94
  200. package/dist/index240.js.map +1 -1
  201. package/dist/index241.js +2 -2
  202. package/dist/index241.js.map +1 -1
  203. package/dist/index242.js +111 -218
  204. package/dist/index242.js.map +1 -1
  205. package/dist/index243.js +94 -246
  206. package/dist/index243.js.map +1 -1
  207. package/dist/index244.js +17 -19
  208. package/dist/index244.js.map +1 -1
  209. package/dist/index246.js +9 -9
  210. package/dist/index246.js.map +1 -1
  211. package/dist/index247.js +4 -1
  212. package/dist/index247.js.map +1 -1
  213. package/dist/index248.js +2 -2
  214. package/dist/index249.js +37 -14
  215. package/dist/index249.js.map +1 -1
  216. package/dist/index25.js +4 -4
  217. package/dist/index25.js.map +1 -1
  218. package/dist/index250.js +2 -38
  219. package/dist/index250.js.map +1 -1
  220. package/dist/index251.js +2 -2
  221. package/dist/index251.js.map +1 -1
  222. package/dist/index252.js +15 -2
  223. package/dist/index252.js.map +1 -1
  224. package/dist/index253.js +3 -2
  225. package/dist/index253.js.map +1 -1
  226. package/dist/index255.js +2 -3
  227. package/dist/index255.js.map +1 -1
  228. package/dist/index27.js +7 -7
  229. package/dist/index27.js.map +1 -1
  230. package/dist/index29.js +15 -15
  231. package/dist/index29.js.map +1 -1
  232. package/dist/index3.js +2 -1
  233. package/dist/index3.js.map +1 -1
  234. package/dist/index31.js +29 -29
  235. package/dist/index31.js.map +1 -1
  236. package/dist/index33.js +11 -12
  237. package/dist/index33.js.map +1 -1
  238. package/dist/index35.js +2 -2
  239. package/dist/index35.js.map +1 -1
  240. package/dist/index37.js +12 -12
  241. package/dist/index37.js.map +1 -1
  242. package/dist/index39.js +5 -7
  243. package/dist/index39.js.map +1 -1
  244. package/dist/index4.js.map +1 -1
  245. package/dist/index41.js +5 -5
  246. package/dist/index41.js.map +1 -1
  247. package/dist/index43.js +19 -16
  248. package/dist/index43.js.map +1 -1
  249. package/dist/index45.js +9 -9
  250. package/dist/index45.js.map +1 -1
  251. package/dist/index47.js +4 -4
  252. package/dist/index47.js.map +1 -1
  253. package/dist/index49.js +1 -1
  254. package/dist/index49.js.map +1 -1
  255. package/dist/index5.js +7 -6
  256. package/dist/index5.js.map +1 -1
  257. package/dist/index51.js +6 -6
  258. package/dist/index51.js.map +1 -1
  259. package/dist/index53.js.map +1 -1
  260. package/dist/index55.js +20 -20
  261. package/dist/index55.js.map +1 -1
  262. package/dist/index57.js +35 -35
  263. package/dist/index57.js.map +1 -1
  264. package/dist/index59.js +8 -8
  265. package/dist/index59.js.map +1 -1
  266. package/dist/index6.js +38 -38
  267. package/dist/index6.js.map +1 -1
  268. package/dist/index61.js +27 -27
  269. package/dist/index61.js.map +1 -1
  270. package/dist/index63.js +4 -4
  271. package/dist/index63.js.map +1 -1
  272. package/dist/index65.js +20 -20
  273. package/dist/index65.js.map +1 -1
  274. package/dist/index67.js +26 -26
  275. package/dist/index67.js.map +1 -1
  276. package/dist/index69.js +21 -19
  277. package/dist/index69.js.map +1 -1
  278. package/dist/index7.js.map +1 -1
  279. package/dist/index71.js +2 -2
  280. package/dist/index71.js.map +1 -1
  281. package/dist/index72.js +3 -3
  282. package/dist/index72.js.map +1 -1
  283. package/dist/index73.js +14 -14
  284. package/dist/index73.js.map +1 -1
  285. package/dist/index75.js +18 -18
  286. package/dist/index75.js.map +1 -1
  287. package/dist/index77.js +11 -11
  288. package/dist/index77.js.map +1 -1
  289. package/dist/index79.js +15 -15
  290. package/dist/index79.js.map +1 -1
  291. package/dist/index8.js +10 -7
  292. package/dist/index8.js.map +1 -1
  293. package/dist/index81.js +1 -1
  294. package/dist/index81.js.map +1 -1
  295. package/dist/index83.js +20 -20
  296. package/dist/index83.js.map +1 -1
  297. package/dist/index85.js +34 -34
  298. package/dist/index85.js.map +1 -1
  299. package/dist/index87.js +18 -18
  300. package/dist/index87.js.map +1 -1
  301. package/dist/index89.js.map +1 -1
  302. package/dist/index9.js.map +1 -1
  303. package/dist/index91.js +53 -53
  304. package/dist/index91.js.map +1 -1
  305. package/dist/index93.js +16 -16
  306. package/dist/index93.js.map +1 -1
  307. package/dist/index95.js +21 -21
  308. package/dist/index95.js.map +1 -1
  309. package/dist/index97.js +37 -37
  310. package/dist/index97.js.map +1 -1
  311. package/dist/index99.js +18 -18
  312. package/dist/index99.js.map +1 -1
  313. package/dist/style.css +1 -1
  314. package/dist/types/CommonProps.d.ts +18 -18
  315. package/dist/types/ExtractGenericFromComputedRef.d.ts +1 -1
  316. package/dist/types/ExtractGenericFromRef.d.ts +1 -1
  317. package/dist/types/VoidHtmlElements.d.ts +1 -1
  318. package/dist/utilities/functions/cloneDeep.d.ts +1 -1
  319. package/dist/utilities/functions/debounce.d.ts +1 -1
  320. package/dist/utilities/functions/flow.d.ts +1 -1
  321. package/dist/utilities/functions/get.d.ts +1 -1
  322. package/dist/utilities/functions/isNotNil.d.ts +1 -1
  323. package/dist/utilities/functions/mapValues.d.ts +1 -1
  324. package/dist/utilities/functions/merge.d.ts +1 -1
  325. package/dist/utilities/functions/millisecondsTo.d.ts +1 -1
  326. package/dist/utilities/functions/overEvery.d.ts +1 -1
  327. package/dist/utilities/functions/percentage.d.ts +4 -4
  328. package/dist/utilities/functions/pick.d.ts +1 -1
  329. package/dist/utilities/functions/pickBy.d.ts +1 -1
  330. package/dist/utilities/functions/roundToTheNearest.d.ts +1 -1
  331. package/package.json +93 -77
  332. package/dist/index256.js +0 -5
  333. package/dist/index256.js.map +0 -1
package/dist/index209.js CHANGED
@@ -1,381 +1,38 @@
1
- import { shift as tt, flip as et, computePosition as ot, arrow as nt } from "./index211.js";
2
- import { detectOverflow as At, offset as It } from "./index211.js";
3
- import { createCoords as v, rectToClientRect as q, round as A, max as O, min as D, floor as B } from "./index239.js";
4
- import { getOverflowAncestors as H, isElement as x, getWindow as T, getComputedStyle as w, getDocumentElement as L, isHTMLElement as b, isWebKit as U, getNodeName as W, isOverflowElement as z, getNodeScroll as I, isTableElement as it, isContainingBlock as X, getContainingBlock as K, getParentNode as V, isLastTraversableNode as Y } from "./index240.js";
5
- function j(t) {
6
- const e = w(t);
7
- let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
8
- const s = b(t), c = s ? t.offsetWidth : n, i = s ? t.offsetHeight : o, r = A(n) !== c || A(o) !== i;
9
- return r && (n = c, o = i), {
10
- width: n,
11
- height: o,
12
- $: r
1
+ import { unrefElement as m } from "./index131.js";
2
+ import { ref as u, watch as l } from "vue";
3
+ import { createFocusTrap as d } from "./index236.js";
4
+ import { tryOnScopeDispose as D } from "./index211.js";
5
+ function O(i, a = {}) {
6
+ let e;
7
+ const { immediate: f, ...n } = a, c = u(!1), s = u(!1), o = (t) => e && e.activate(t), r = (t) => e && e.deactivate(t), v = () => {
8
+ e && (e.pause(), s.value = !0);
9
+ }, p = () => {
10
+ e && (e.unpause(), s.value = !1);
11
+ };
12
+ return l(
13
+ () => m(i),
14
+ (t) => {
15
+ t && (e = d(t, {
16
+ ...n,
17
+ onActivate() {
18
+ c.value = !0, a.onActivate && a.onActivate();
19
+ },
20
+ onDeactivate() {
21
+ c.value = !1, a.onDeactivate && a.onDeactivate();
22
+ }
23
+ }), f && o());
24
+ },
25
+ { flush: "post" }
26
+ ), D(() => r()), {
27
+ hasFocus: c,
28
+ isPaused: s,
29
+ activate: o,
30
+ deactivate: r,
31
+ pause: v,
32
+ unpause: p
13
33
  };
14
34
  }
15
- function S(t) {
16
- return x(t) ? t : t.contextElement;
17
- }
18
- function F(t) {
19
- const e = S(t);
20
- if (!b(e))
21
- return v(1);
22
- const n = e.getBoundingClientRect(), {
23
- width: o,
24
- height: s,
25
- $: c
26
- } = j(e);
27
- let i = (c ? A(n.width) : n.width) / o, r = (c ? A(n.height) : n.height) / s;
28
- return (!i || !Number.isFinite(i)) && (i = 1), (!r || !Number.isFinite(r)) && (r = 1), {
29
- x: i,
30
- y: r
31
- };
32
- }
33
- const st = /* @__PURE__ */ v(0);
34
- function G(t) {
35
- const e = T(t);
36
- return !U() || !e.visualViewport ? st : {
37
- x: e.visualViewport.offsetLeft,
38
- y: e.visualViewport.offsetTop
39
- };
40
- }
41
- function rt(t, e, n) {
42
- return e === void 0 && (e = !1), !n || e && n !== T(t) ? !1 : e;
43
- }
44
- function E(t, e, n, o) {
45
- e === void 0 && (e = !1), n === void 0 && (n = !1);
46
- const s = t.getBoundingClientRect(), c = S(t);
47
- let i = v(1);
48
- e && (o ? x(o) && (i = F(o)) : i = F(t));
49
- const r = rt(c, n, o) ? G(c) : v(0);
50
- let l = (s.left + r.x) / i.x, f = (s.top + r.y) / i.y, a = s.width / i.x, u = s.height / i.y;
51
- if (c) {
52
- const m = T(c), p = o && x(o) ? T(o) : o;
53
- let g = m.frameElement;
54
- for (; g && o && p !== m; ) {
55
- const h = F(g), R = g.getBoundingClientRect(), d = w(g), y = R.left + (g.clientLeft + parseFloat(d.paddingLeft)) * h.x, C = R.top + (g.clientTop + parseFloat(d.paddingTop)) * h.y;
56
- l *= h.x, f *= h.y, a *= h.x, u *= h.y, l += y, f += C, g = T(g).frameElement;
57
- }
58
- }
59
- return q({
60
- width: a,
61
- height: u,
62
- x: l,
63
- y: f
64
- });
65
- }
66
- const ct = [":popover-open", ":modal"];
67
- function J(t) {
68
- let e = !1, n = 0, o = 0;
69
- function s(i) {
70
- try {
71
- e = e || t.matches(i);
72
- } catch {
73
- }
74
- }
75
- ct.forEach((i) => {
76
- s(i);
77
- });
78
- const c = K(t);
79
- if (e && c) {
80
- const i = c.getBoundingClientRect();
81
- n = i.x, o = i.y;
82
- }
83
- return [e, n, o];
84
- }
85
- function lt(t) {
86
- let {
87
- elements: e,
88
- rect: n,
89
- offsetParent: o,
90
- strategy: s
91
- } = t;
92
- const c = L(o), [i] = e ? J(e.floating) : [!1];
93
- if (o === c || i)
94
- return n;
95
- let r = {
96
- scrollLeft: 0,
97
- scrollTop: 0
98
- }, l = v(1);
99
- const f = v(0), a = b(o);
100
- if ((a || !a && s !== "fixed") && ((W(o) !== "body" || z(c)) && (r = I(o)), b(o))) {
101
- const u = E(o);
102
- l = F(o), f.x = u.x + o.clientLeft, f.y = u.y + o.clientTop;
103
- }
104
- return {
105
- width: n.width * l.x,
106
- height: n.height * l.y,
107
- x: n.x * l.x - r.scrollLeft * l.x + f.x,
108
- y: n.y * l.y - r.scrollTop * l.y + f.y
109
- };
110
- }
111
- function ft(t) {
112
- return Array.from(t.getClientRects());
113
- }
114
- function Q(t) {
115
- return E(L(t)).left + I(t).scrollLeft;
116
- }
117
- function ut(t) {
118
- const e = L(t), n = I(t), o = t.ownerDocument.body, s = O(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), c = O(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
119
- let i = -n.scrollLeft + Q(t);
120
- const r = -n.scrollTop;
121
- return w(o).direction === "rtl" && (i += O(e.clientWidth, o.clientWidth) - s), {
122
- width: s,
123
- height: c,
124
- x: i,
125
- y: r
126
- };
127
- }
128
- function at(t, e) {
129
- const n = T(t), o = L(t), s = n.visualViewport;
130
- let c = o.clientWidth, i = o.clientHeight, r = 0, l = 0;
131
- if (s) {
132
- c = s.width, i = s.height;
133
- const f = U();
134
- (!f || f && e === "fixed") && (r = s.offsetLeft, l = s.offsetTop);
135
- }
136
- return {
137
- width: c,
138
- height: i,
139
- x: r,
140
- y: l
141
- };
142
- }
143
- function ht(t, e) {
144
- const n = E(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, c = b(t) ? F(t) : v(1), i = t.clientWidth * c.x, r = t.clientHeight * c.y, l = s * c.x, f = o * c.y;
145
- return {
146
- width: i,
147
- height: r,
148
- x: l,
149
- y: f
150
- };
151
- }
152
- function _(t, e, n) {
153
- let o;
154
- if (e === "viewport")
155
- o = at(t, n);
156
- else if (e === "document")
157
- o = ut(L(t));
158
- else if (x(e))
159
- o = ht(e, n);
160
- else {
161
- const s = G(t);
162
- o = {
163
- ...e,
164
- x: e.x - s.x,
165
- y: e.y - s.y
166
- };
167
- }
168
- return q(o);
169
- }
170
- function Z(t, e) {
171
- const n = V(t);
172
- return n === e || !x(n) || Y(n) ? !1 : w(n).position === "fixed" || Z(n, e);
173
- }
174
- function dt(t, e) {
175
- const n = e.get(t);
176
- if (n)
177
- return n;
178
- let o = H(t, [], !1).filter((r) => x(r) && W(r) !== "body"), s = null;
179
- const c = w(t).position === "fixed";
180
- let i = c ? V(t) : t;
181
- for (; x(i) && !Y(i); ) {
182
- const r = w(i), l = X(i);
183
- !l && r.position === "fixed" && (s = null), (c ? !l && !s : !l && r.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || z(i) && !l && Z(t, i)) ? o = o.filter((a) => a !== i) : s = r, i = V(i);
184
- }
185
- return e.set(t, o), o;
186
- }
187
- function gt(t) {
188
- let {
189
- element: e,
190
- boundary: n,
191
- rootBoundary: o,
192
- strategy: s
193
- } = t;
194
- const i = [...n === "clippingAncestors" ? dt(e, this._c) : [].concat(n), o], r = i[0], l = i.reduce((f, a) => {
195
- const u = _(e, a, s);
196
- return f.top = O(u.top, f.top), f.right = D(u.right, f.right), f.bottom = D(u.bottom, f.bottom), f.left = O(u.left, f.left), f;
197
- }, _(e, r, s));
198
- return {
199
- width: l.right - l.left,
200
- height: l.bottom - l.top,
201
- x: l.left,
202
- y: l.top
203
- };
204
- }
205
- function pt(t) {
206
- const {
207
- width: e,
208
- height: n
209
- } = j(t);
210
- return {
211
- width: e,
212
- height: n
213
- };
214
- }
215
- function mt(t, e, n, o) {
216
- const s = b(e), c = L(e), i = n === "fixed", r = E(t, !0, i, e);
217
- let l = {
218
- scrollLeft: 0,
219
- scrollTop: 0
220
- };
221
- const f = v(0);
222
- if (s || !s && !i)
223
- if ((W(e) !== "body" || z(c)) && (l = I(e)), s) {
224
- const h = E(e, !0, i, e);
225
- f.x = h.x + e.clientLeft, f.y = h.y + e.clientTop;
226
- } else
227
- c && (f.x = Q(c));
228
- let a = r.left + l.scrollLeft - f.x, u = r.top + l.scrollTop - f.y;
229
- const [m, p, g] = J(o);
230
- return m && (a += p, u += g, s && (a += e.clientLeft, u += e.clientTop)), {
231
- x: a,
232
- y: u,
233
- width: r.width,
234
- height: r.height
235
- };
236
- }
237
- function k(t, e) {
238
- return !b(t) || w(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
239
- }
240
- function P(t, e) {
241
- const n = T(t);
242
- if (!b(t))
243
- return n;
244
- let o = k(t, e);
245
- for (; o && it(o) && w(o).position === "static"; )
246
- o = k(o, e);
247
- return o && (W(o) === "html" || W(o) === "body" && w(o).position === "static" && !X(o)) ? n : o || K(t) || n;
248
- }
249
- const yt = async function(t) {
250
- const e = this.getOffsetParent || P, n = this.getDimensions;
251
- return {
252
- reference: mt(t.reference, await e(t.floating), t.strategy, t.floating),
253
- floating: {
254
- x: 0,
255
- y: 0,
256
- ...await n(t.floating)
257
- }
258
- };
259
- };
260
- function wt(t) {
261
- return w(t).direction === "rtl";
262
- }
263
- const vt = {
264
- convertOffsetParentRelativeRectToViewportRelativeRect: lt,
265
- getDocumentElement: L,
266
- getClippingRect: gt,
267
- getOffsetParent: P,
268
- getElementRects: yt,
269
- getClientRects: ft,
270
- getDimensions: pt,
271
- getScale: F,
272
- isElement: x,
273
- isRTL: wt
274
- };
275
- function xt(t, e) {
276
- let n = null, o;
277
- const s = L(t);
278
- function c() {
279
- var r;
280
- clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
281
- }
282
- function i(r, l) {
283
- r === void 0 && (r = !1), l === void 0 && (l = 1), c();
284
- const {
285
- left: f,
286
- top: a,
287
- width: u,
288
- height: m
289
- } = t.getBoundingClientRect();
290
- if (r || e(), !u || !m)
291
- return;
292
- const p = B(a), g = B(s.clientWidth - (f + u)), h = B(s.clientHeight - (a + m)), R = B(f), y = {
293
- rootMargin: -p + "px " + -g + "px " + -h + "px " + -R + "px",
294
- threshold: O(0, D(1, l)) || 1
295
- };
296
- let C = !0;
297
- function $(M) {
298
- const N = M[0].intersectionRatio;
299
- if (N !== l) {
300
- if (!C)
301
- return i();
302
- N ? i(!1, N) : o = setTimeout(() => {
303
- i(!1, 1e-7);
304
- }, 100);
305
- }
306
- C = !1;
307
- }
308
- try {
309
- n = new IntersectionObserver($, {
310
- ...y,
311
- // Handle <iframe>s
312
- root: s.ownerDocument
313
- });
314
- } catch {
315
- n = new IntersectionObserver($, y);
316
- }
317
- n.observe(t);
318
- }
319
- return i(!0), c;
320
- }
321
- function Ct(t, e, n, o) {
322
- o === void 0 && (o = {});
323
- const {
324
- ancestorScroll: s = !0,
325
- ancestorResize: c = !0,
326
- elementResize: i = typeof ResizeObserver == "function",
327
- layoutShift: r = typeof IntersectionObserver == "function",
328
- animationFrame: l = !1
329
- } = o, f = S(t), a = s || c ? [...f ? H(f) : [], ...H(e)] : [];
330
- a.forEach((d) => {
331
- s && d.addEventListener("scroll", n, {
332
- passive: !0
333
- }), c && d.addEventListener("resize", n);
334
- });
335
- const u = f && r ? xt(f, n) : null;
336
- let m = -1, p = null;
337
- i && (p = new ResizeObserver((d) => {
338
- let [y] = d;
339
- y && y.target === f && p && (p.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
340
- var C;
341
- (C = p) == null || C.observe(e);
342
- })), n();
343
- }), f && !l && p.observe(f), p.observe(e));
344
- let g, h = l ? E(t) : null;
345
- l && R();
346
- function R() {
347
- const d = E(t);
348
- h && (d.x !== h.x || d.y !== h.y || d.width !== h.width || d.height !== h.height) && n(), h = d, g = requestAnimationFrame(R);
349
- }
350
- return n(), () => {
351
- var d;
352
- a.forEach((y) => {
353
- s && y.removeEventListener("scroll", n), c && y.removeEventListener("resize", n);
354
- }), u == null || u(), (d = p) == null || d.disconnect(), p = null, l && cancelAnimationFrame(g);
355
- };
356
- }
357
- const Tt = tt, Et = et, Ot = nt, Ft = (t, e, n) => {
358
- const o = /* @__PURE__ */ new Map(), s = {
359
- platform: vt,
360
- ...n
361
- }, c = {
362
- ...s.platform,
363
- _c: o
364
- };
365
- return ot(t, e, {
366
- ...s,
367
- platform: c
368
- });
369
- };
370
35
  export {
371
- Ot as arrow,
372
- Ct as autoUpdate,
373
- Ft as computePosition,
374
- At as detectOverflow,
375
- Et as flip,
376
- H as getOverflowAncestors,
377
- It as offset,
378
- vt as platform,
379
- Tt as shift
36
+ O as useFocusTrap
380
37
  };
381
38
  //# sourceMappingURL=index209.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index209.js","sources":["../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"],"sourcesContent":["import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getContainingBlock, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentIFrame = win.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== win) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentIFrame = getWindow(currentIFrame).frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction topLayer(floating) {\n let isTopLayer = false;\n let x = 0;\n let y = 0;\n function setIsTopLayer(selector) {\n try {\n isTopLayer = isTopLayer || floating.matches(selector);\n } catch (e) {}\n }\n topLayerSelectors.forEach(selector => {\n setIsTopLayer(selector);\n });\n const containingBlock = getContainingBlock(floating);\n if (isTopLayer && containingBlock) {\n const rect = containingBlock.getBoundingClientRect();\n x = rect.x;\n y = rect.y;\n }\n return [isTopLayer, x, y];\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const documentElement = getDocumentElement(offsetParent);\n const [isTopLayer] = elements ? topLayer(elements.floating) : [false];\n if (offsetParent === documentElement || isTopLayer) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy, floating) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n let x = rect.left + scroll.scrollLeft - offsets.x;\n let y = rect.top + scroll.scrollTop - offsets.y;\n const [isTopLayer, topLayerX, topLayerY] = topLayer(floating);\n if (isTopLayer) {\n x += topLayerX;\n y += topLayerY;\n if (isOffsetParentAnElement) {\n x += offsetParent.clientLeft;\n y += offsetParent.clientTop;\n }\n }\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy, data.floating),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, inline, limitShift, platform, shift, size };\n"],"names":["getCssDimensions","element","css","getComputedStyle","width","height","hasOffset","isHTMLElement","offsetWidth","offsetHeight","shouldFallback","round","unwrapElement","isElement","getScale","domElement","createCoords","rect","$","x","y","noOffsets","getVisualOffsets","win","getWindow","isWebKit","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","offsetParent","clientRect","scale","visualOffsets","offsetWin","currentIFrame","iframeScale","iframeRect","left","top","rectToClientRect","topLayerSelectors","topLayer","floating","isTopLayer","setIsTopLayer","selector","containingBlock","getContainingBlock","convertOffsetParentRelativeRectToViewportRelativeRect","_ref","elements","strategy","documentElement","getDocumentElement","scroll","offsets","isOffsetParentAnElement","getNodeName","isOverflowElement","getNodeScroll","offsetRect","getClientRects","getWindowScrollBarX","getDocumentRect","html","body","max","getViewportRect","visualViewport","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","parentNode","getParentNode","isLastTraversableNode","getClippingElementAncestors","cache","cachedResult","result","getOverflowAncestors","el","currentContainingBlockComputedStyle","elementIsFixed","currentNode","computedStyle","currentNodeIsContaining","isContainingBlock","ancestor","getClippingRect","boundary","rootBoundary","clippingAncestors","firstClippingAncestor","clippingRect","accRect","min","getDimensions","getRectRelativeToOffsetParent","topLayerX","topLayerY","getTrueOffsetParent","polyfill","getOffsetParent","window","isTableElement","getElementRects","data","getOffsetParentFn","getDimensionsFn","isRTL","platform","observeMove","onMove","io","timeoutId","root","cleanup","_io","refresh","skip","threshold","insetTop","floor","insetRight","insetBottom","insetLeft","options","isFirstUpdate","handleObserve","entries","ratio","autoUpdate","reference","update","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","shift","shift$1","flip","flip$1","arrow","arrow$1","computePosition","mergedOptions","platformWithCache","computePosition$1"],"mappings":";;;;AAMA,SAASA,EAAiBC,GAAS;AACjC,QAAMC,IAAMC,EAAiBF,CAAO;AAGpC,MAAIG,IAAQ,WAAWF,EAAI,KAAK,KAAK,GACjCG,IAAS,WAAWH,EAAI,MAAM,KAAK;AACvC,QAAMI,IAAYC,EAAcN,CAAO,GACjCO,IAAcF,IAAYL,EAAQ,cAAcG,GAChDK,IAAeH,IAAYL,EAAQ,eAAeI,GAClDK,IAAiBC,EAAMP,CAAK,MAAMI,KAAeG,EAAMN,CAAM,MAAMI;AACzE,SAAIC,MACFN,IAAQI,GACRH,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KAEFc,IAAcE,GACdH,IAAU,sBAAsBE,CAAS;AAAA,EAC1C;AACD,SAAAf,KACO,MAAM;AACX,QAAIiB;AACJ,IAAAV,EAAU,QAAQ,CAAArD,MAAY;AAC5B,MAAA+C,KAAkB/C,EAAS,oBAAoB,UAAU8C,CAAM,GAC/DE,KAAkBhD,EAAS,oBAAoB,UAAU8C,CAAM;AAAA,IACrE,CAAK,GACDQ,KAAa,QAAQA,MACpBS,IAAmBP,MAAmB,QAAQO,EAAiB,WAAU,GAC1EP,IAAiB,MACbL,KACF,qBAAqBQ,CAAO;AAAA,EAElC;AACA;AAeK,MAACK,KAAQC,IAQRC,KAAOC,IAsBPC,KAAQC,IAkBRC,KAAkB,CAACzB,GAAW7F,GAAUuF,MAAY;AAIxD,QAAMlD,IAAQ,oBAAI,OACZkF,IAAgB;AAAA,IACpB,UAAAhD;AAAA,IACA,GAAGgB;AAAA,EACP,GACQiC,IAAoB;AAAA,IACxB,GAAGD,EAAc;AAAA,IACjB,IAAIlF;AAAA,EACR;AACE,SAAOoF,GAAkB5B,GAAW7F,GAAU;AAAA,IAC5C,GAAGuH;AAAA,IACH,UAAUC;AAAA,EACd,CAAG;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index209.js","sources":["../node_modules/@vueuse/integrations/useFocusTrap.mjs"],"sourcesContent":["import { unrefElement, tryOnScopeDispose } from '@vueuse/core';\nimport { ref, watch } from 'vue-demi';\nimport { createFocusTrap } from 'focus-trap';\n\nfunction useFocusTrap(target, options = {}) {\n let trap;\n const { immediate, ...focusTrapOptions } = options;\n const hasFocus = ref(false);\n const isPaused = ref(false);\n const activate = (opts) => trap && trap.activate(opts);\n const deactivate = (opts) => trap && trap.deactivate(opts);\n const pause = () => {\n if (trap) {\n trap.pause();\n isPaused.value = true;\n }\n };\n const unpause = () => {\n if (trap) {\n trap.unpause();\n isPaused.value = false;\n }\n };\n watch(\n () => unrefElement(target),\n (el) => {\n if (!el)\n return;\n trap = createFocusTrap(el, {\n ...focusTrapOptions,\n onActivate() {\n hasFocus.value = true;\n if (options.onActivate)\n options.onActivate();\n },\n onDeactivate() {\n hasFocus.value = false;\n if (options.onDeactivate)\n options.onDeactivate();\n }\n });\n if (immediate)\n activate();\n },\n { flush: \"post\" }\n );\n tryOnScopeDispose(() => deactivate());\n return {\n hasFocus,\n isPaused,\n activate,\n deactivate,\n pause,\n unpause\n };\n}\n\nexport { useFocusTrap };\n"],"names":["useFocusTrap","target","options","trap","immediate","focusTrapOptions","hasFocus","ref","isPaused","activate","opts","deactivate","pause","unpause","watch","unrefElement","el","createFocusTrap","tryOnScopeDispose"],"mappings":";;;;AAIA,SAASA,EAAaC,GAAQC,IAAU,IAAI;AAC1C,MAAIC;AACJ,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAgB,IAAKH,GACrCI,IAAWC,EAAI,EAAK,GACpBC,IAAWD,EAAI,EAAK,GACpBE,IAAW,CAACC,MAASP,KAAQA,EAAK,SAASO,CAAI,GAC/CC,IAAa,CAACD,MAASP,KAAQA,EAAK,WAAWO,CAAI,GACnDE,IAAQ,MAAM;AAClB,IAAIT,MACFA,EAAK,MAAK,GACVK,EAAS,QAAQ;AAAA,EAEvB,GACQK,IAAU,MAAM;AACpB,IAAIV,MACFA,EAAK,QAAO,GACZK,EAAS,QAAQ;AAAA,EAEvB;AACE,SAAAM;AAAA,IACE,MAAMC,EAAad,CAAM;AAAA,IACzB,CAACe,MAAO;AACN,MAAKA,MAELb,IAAOc,EAAgBD,GAAI;AAAA,QACzB,GAAGX;AAAA,QACH,aAAa;AACX,UAAAC,EAAS,QAAQ,IACbJ,EAAQ,cACVA,EAAQ,WAAU;AAAA,QACrB;AAAA,QACD,eAAe;AACb,UAAAI,EAAS,QAAQ,IACbJ,EAAQ,gBACVA,EAAQ,aAAY;AAAA,QACvB;AAAA,MACT,CAAO,GACGE,KACFK;IACH;AAAA,IACD,EAAE,OAAO,OAAQ;AAAA,EACrB,GACES,EAAkB,MAAMP,EAAU,CAAE,GAC7B;AAAA,IACL,UAAAL;AAAA,IACA,UAAAE;AAAA,IACA,UAAAC;AAAA,IACA,YAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
package/dist/index21.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as $, computed as n, openBlock as i, createElementBlock as b, createBlock as h, resolveDynamicComponent as v, normalizeProps as o, guardReactiveProps as l, withCtx as c, renderSlot as _, createTextVNode as A, toDisplayString as g, createElementVNode as E, unref as z, createVNode as S, Fragment as T, renderList as V } from "vue";
2
- import { deburr as N } from "./index213.js";
2
+ import { deburr as N } from "./index218.js";
3
3
  import { getAsPercentage as P } from "./index121.js";
4
- import { snakeCase as D } from "./index214.js";
4
+ import { snakeCase as D } from "./index219.js";
5
5
  import { useId as I } from "./index7.js";
6
6
  import F from "./index118.js";
7
7
  import "./index183.js";
@@ -100,8 +100,8 @@ const H = { class: "bb-base-input-outer-container" }, R = { class: "bb-base-inpu
100
100
  S(F, { tag: "span" }, {
101
101
  default: c(() => [
102
102
  (i(!0), b(T, null, V(d.value, (a) => (i(), b("span", {
103
- class: "bb-base-input-container__error",
104
- key: a
103
+ key: a,
104
+ class: "bb-base-input-container__error"
105
105
  }, g(a), 1))), 128))
106
106
  ]),
107
107
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"index21.js","sources":["../src/components/BaseInputContainer/BaseInputContainer.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, unref as _unref, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-input-outer-container\" }\nconst _hoisted_2 = { class: \"bb-base-input-container__errors\" }\n\nimport { computed } from \"vue\";\nimport { deburr } from \"@/utilities/functions/deburr\";\nimport { getAsPercentage } from \"@/utilities/functions/percentage\";\nimport { snakeCase } from \"@/utilities/functions/snakeCase\";\nimport { useId } from \"@/composables/useId\";\nimport BbSmoothHeight from \"../BbSmoothHeight/BbSmoothHeight.vue\";\nimport type { HTMLAttributes, InputHTMLAttributes } from \"vue\";\n\nexport type BaseInputContainerProps = {\n /**\n * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n */\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n\n /**\n * Can be a string or an array of string containing the messages to display.\n */\n errors?: string | string[];\n\n /**\n * Define if the component should be in an error state.\n * It usually attaches a CSS class for styling purposes.\n */\n hasErrors?: boolean;\n\n /**\n * Visually hides the label of the input while maintaining accessibility.\n */\n hideLabel?: boolean;\n\n /**\n * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n */\n inputPosition?: \"left\" | \"center\" | \"right\";\n\n /**\n * Text content of the label of the element.\n */\n label: string;\n\n /**\n * Sets the text alignment of the label.\n */\n labelPosition?: \"left\" | \"center\" | \"right\";\n\n /**\n * Defines the HTML tag of the label element.\n * Usually is a `label` but for certain component like checkboxes\n * that have their own label it should be a `legend`.\n * It is important for accessibility reasons.\n */\n labelTag?: string;\n\n /**\n * Used by v-model. Can be any serializable type.\n */\n modelValue?: any;\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n */\n reverse?: boolean;\n\n /**\n * HTML tag of the container, it is by default a `span` so\n * it can be used inline without breaking HTML validation.\n */\n tag?: string;\n};\n\nexport type BaseInputContainerSlots = {\n input?: (props: { id: string; name: string; hasErrors: boolean }) => any;\n\n label?: (props: { text: string; hasErrors: boolean }) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseInputContainer',\n props: {\n direction: { default: \"vertical\" },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: { default: \"right\" },\n label: {},\n labelPosition: { default: \"left\" },\n labelTag: { default: \"label\" },\n modelValue: {},\n name: {},\n reverse: { type: Boolean, default: false },\n tag: { default: \"span\" }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n// Always provide an id so that inputs can be focussed by clicking oin the label\nconst id = props.id || useId().id.value;\n\n// If no name is passed use a normalized version of the label\nconst name = computed(() => {\n if (props.name) return props.name;\n let noAccents = deburr(props.label);\n let snaked = snakeCase(noAccents);\n return snaked.toLowerCase();\n});\n\nconst containerAttributes = computed(() => {\n const initial: { [name: string]: any } = {\n class: {\n \"bb-base-input-container\": true,\n \"bb-base-input-container--hidden-label\": props.reverse,\n \"bb-base-input-container--horizontal\": props.direction !== \"vertical\",\n \"bb-base-input-container--reverse\": props.reverse,\n \"bb-base-input-container--vertical\": props.direction === \"vertical\",\n \"bb-base-input-container--errors\": hasErrors.value,\n },\n };\n if (props.tag === \"label\") initial.for = id;\n return initial;\n});\n\nconst labelAttributes = computed(() => {\n let initial: { [name: string]: any } = {\n class: {\n \"bb-base-input-container__label\": true,\n \"bb-base-input-container__label--hidden\": props.hideLabel,\n [`bb-base-input-container__label--${props.labelPosition}`]:\n props.labelPosition,\n },\n style: {\n width: widths.value.label,\n },\n };\n if (props.labelTag === \"label\") initial.for = id;\n return initial;\n});\n\nconst inputAttributes = computed(() => {\n let initial: { [name: string]: any } = {\n class: {\n \"bb-base-input-container__input\": true,\n [`bb-base-input-container__input--${props.inputPosition}`]:\n props.inputPosition,\n },\n style: {\n width: widths.value.input,\n },\n };\n return initial;\n});\n\nconst widths = computed(() => {\n let initial: { [target: string]: string } = {\n label: \"auto\",\n input: \"auto\",\n };\n if (props.direction === \"auto\") {\n } else if (props.direction === \"vertical\") {\n initial.label = initial.input = 100 + \"%\";\n } else if (props.direction === \"horizontal\") {\n initial.label = initial.input = 50 + \"%\";\n } else if (/^[\\S]+\\s[\\S]+$/g.test(props.direction)) {\n const [firstLength, secondLength] = props.direction\n .split(/\\s+/)\n .map((string) => string.length);\n const first =\n getAsPercentage(firstLength, firstLength + secondLength) + \"%\";\n const second =\n getAsPercentage(secondLength, secondLength + firstLength) + \"%\";\n if (props.reverse) {\n initial.label = second;\n initial.input = first;\n } else {\n initial.label = first;\n initial.input = second;\n }\n } else {\n throw new Error(\"Horizontal pattern is malformed\");\n }\n return initial;\n});\n\nconst computedErrors = computed(() => {\n return props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n () => Boolean(computedErrors.value.length) || props.hasErrors\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), _normalizeProps(_guardReactiveProps(containerAttributes.value)), {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.labelTag), _normalizeProps(_guardReactiveProps(labelAttributes.value)), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps({ text: _ctx.label, hasErrors: hasErrors.value })), () => [\n _createTextVNode(_toDisplayString(_ctx.label), 1)\n ])\n ]),\n _: 3\n }, 16)),\n _createElementVNode(\"span\", _normalizeProps(_guardReactiveProps(inputAttributes.value)), [\n _renderSlot(_ctx.$slots, \"input\", _normalizeProps(_guardReactiveProps({ id: _unref(id), name: name.value, hasErrors: hasErrors.value })))\n ], 16)\n ]),\n _: 3\n }, 16)),\n _createElementVNode(\"span\", _hoisted_2, [\n _createVNode(BbSmoothHeight, { tag: \"span\" }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(computedErrors.value, (error) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: \"bb-base-input-container__error\",\n key: error\n }, _toDisplayString(error), 1))\n }), 128))\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","id","useId","name","computed","noAccents","deburr","snakeCase","containerAttributes","initial","hasErrors","labelAttributes","widths","inputAttributes","firstLength","secondLength","string","first","getAsPercentage","second","computedErrors","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString","_createElementVNode","_unref","_createVNode","BbSmoothHeight","_Fragment","_renderList","error"],"mappings":";;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,mCACtBC,IAAa,EAAE,OAAO,qCAyFAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,SAAS,WAAW;AAAA,IACjC,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,EAAE,SAAS,QAAQ;AAAA,IAClC,OAAO,CAAC;AAAA,IACR,eAAe,EAAE,SAAS,OAAO;AAAA,IACjC,UAAU,EAAE,SAAS,QAAQ;AAAA,IAC7B,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,SAAS,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IACzC,KAAK,EAAE,SAAS,OAAO;AAAA,EACzB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAKRE,IAAKD,EAAM,MAAME,IAAQ,GAAG,OAG5BC,IAAOC,EAAS,MAAM;AAC1B,UAAIJ,EAAM;AAAM,eAAOA,EAAM;AACzB,UAAAK,IAAYC,EAAON,EAAM,KAAK;AAElC,aADaO,EAAUF,CAAS,EAClB;IAAY,CAC3B,GAEKG,IAA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MAAME,EAAK,OAAO,WAAWO,EAAU,MAAO,CAAA,CAAC,CAAC;AAAA,aACvI,EAAE;AAAA,QAAA,CACN;AAAA,QACD,GAAG;AAAA,SACF,EAAE;AAAA,MACLuB,EAAoB,QAAQrC,GAAY;AAAA,QACtCuC,EAAaC,GAAgB,EAAE,KAAK,UAAU;AAAA,UAC5C,SAASP,EAAS,MAAM;AAAA,aACrBN,EAAW,EAAI,GAAGC,EAAoBa,GAAW,MAAMC,EAAYlB,EAAe,OAAO,CAACmB,OACjFhB,EAAA,GAAcC,EAAoB,QAAQ;AAAA,cAChD,OAAO;AAAA,cACP,KAAKe;AAAA,YACJ,GAAAP,EAAiBO,CAAK,GAAG,CAAC,EAC9B,GAAG,GAAG;AAAA,UAAA,CACR;AAAA,UACD,GAAG;AAAA,QAAA,CACJ;AAAA,MAAA,CACF;AAAA,IAAA,CACF;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index21.js","sources":["../src/components/BaseInputContainer/BaseInputContainer.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, unref as _unref, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-input-outer-container\" }\nconst _hoisted_2 = { class: \"bb-base-input-container__errors\" }\n\nimport { computed } from 'vue';\nimport { deburr } from '@/utilities/functions/deburr';\nimport { getAsPercentage } from '@/utilities/functions/percentage';\nimport { snakeCase } from '@/utilities/functions/snakeCase';\nimport { useId } from '@/composables/useId';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseInputContainerProps = {\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * 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 * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Defines the HTML tag of the label element.\n\t * Usually is a `label` but for certain component like checkboxes\n\t * that have their own label it should be a `legend`.\n\t * It is important for accessibility reasons.\n\t */\n\tlabelTag?: string;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * HTML tag of the container, it is by default a `span` so\n\t * it can be used inline without breaking HTML validation.\n\t */\n\ttag?: string;\n};\n\nexport type BaseInputContainerSlots = {\n\tinput?: (props: { id: string; name: string; hasErrors: boolean }) => any;\n\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseInputContainer',\n props: {\n direction: { default: 'vertical' },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: { default: 'right' },\n label: {},\n labelPosition: { default: 'left' },\n labelTag: { default: 'label' },\n modelValue: {},\n name: {},\n reverse: { type: Boolean, default: false },\n tag: { default: 'span' }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n// Always provide an id so that inputs can be focussed by clicking oin the label\nconst id = props.id || useId().id.value;\n\n// If no name is passed use a normalized version of the label\nconst name = computed(() => {\n\tif (props.name) return props.name;\n\tlet noAccents = deburr(props.label);\n\tlet snaked = snakeCase(noAccents);\n\treturn snaked.toLowerCase();\n});\n\nconst containerAttributes = computed(() => {\n\tconst initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container': true,\n\t\t\t'bb-base-input-container--hidden-label': props.reverse,\n\t\t\t'bb-base-input-container--horizontal': props.direction !== 'vertical',\n\t\t\t'bb-base-input-container--reverse': props.reverse,\n\t\t\t'bb-base-input-container--vertical': props.direction === 'vertical',\n\t\t\t'bb-base-input-container--errors': hasErrors.value,\n\t\t},\n\t};\n\tif (props.tag === 'label') initial.for = id;\n\treturn initial;\n});\n\nconst labelAttributes = computed(() => {\n\tlet initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container__label': true,\n\t\t\t'bb-base-input-container__label--hidden': props.hideLabel,\n\t\t\t[`bb-base-input-container__label--${props.labelPosition}`]:\n\t\t\t\tprops.labelPosition,\n\t\t},\n\t\tstyle: {\n\t\t\twidth: widths.value.label,\n\t\t},\n\t};\n\tif (props.labelTag === 'label') initial.for = id;\n\treturn initial;\n});\n\nconst inputAttributes = computed(() => {\n\tlet initial: { [name: string]: any } = {\n\t\tclass: {\n\t\t\t'bb-base-input-container__input': true,\n\t\t\t[`bb-base-input-container__input--${props.inputPosition}`]:\n\t\t\t\tprops.inputPosition,\n\t\t},\n\t\tstyle: {\n\t\t\twidth: widths.value.input,\n\t\t},\n\t};\n\treturn initial;\n});\n\nconst widths = computed(() => {\n\tlet initial: { [target: string]: string } = {\n\t\tlabel: 'auto',\n\t\tinput: 'auto',\n\t};\n\tif (props.direction === 'auto') {\n\t} else if (props.direction === 'vertical') {\n\t\tinitial.label = initial.input = 100 + '%';\n\t} else if (props.direction === 'horizontal') {\n\t\tinitial.label = initial.input = 50 + '%';\n\t} else if (/^[\\S]+\\s[\\S]+$/g.test(props.direction)) {\n\t\tconst [firstLength, secondLength] = props.direction\n\t\t\t.split(/\\s+/)\n\t\t\t.map((string) => string.length);\n\t\tconst first =\n\t\t\tgetAsPercentage(firstLength, firstLength + secondLength) + '%';\n\t\tconst second =\n\t\t\tgetAsPercentage(secondLength, secondLength + firstLength) + '%';\n\t\tif (props.reverse) {\n\t\t\tinitial.label = second;\n\t\t\tinitial.input = first;\n\t\t} else {\n\t\t\tinitial.label = first;\n\t\t\tinitial.input = second;\n\t\t}\n\t} else {\n\t\tthrow new Error('Horizontal pattern is malformed');\n\t}\n\treturn initial;\n});\n\nconst computedErrors = computed(() => {\n\treturn props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n\t() => Boolean(computedErrors.value.length) || props.hasErrors\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), _normalizeProps(_guardReactiveProps(containerAttributes.value)), {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.labelTag), _normalizeProps(_guardReactiveProps(labelAttributes.value)), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps({ text: _ctx.label, hasErrors: hasErrors.value })), () => [\n _createTextVNode(_toDisplayString(_ctx.label), 1)\n ])\n ]),\n _: 3\n }, 16)),\n _createElementVNode(\"span\", _normalizeProps(_guardReactiveProps(inputAttributes.value)), [\n _renderSlot(_ctx.$slots, \"input\", _normalizeProps(_guardReactiveProps({ id: _unref(id), name: name.value, hasErrors: hasErrors.value })))\n ], 16)\n ]),\n _: 3\n }, 16)),\n _createElementVNode(\"span\", _hoisted_2, [\n _createVNode(BbSmoothHeight, { tag: \"span\" }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(computedErrors.value, (error) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: error,\n class: \"bb-base-input-container__error\"\n }, _toDisplayString(error), 1))\n }), 128))\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","id","useId","name","computed","noAccents","deburr","snakeCase","containerAttributes","initial","hasErrors","labelAttributes","widths","inputAttributes","firstLength","secondLength","string","first","getAsPercentage","second","computedErrors","_ctx","_cache","_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString","_createElementVNode","_unref","_createVNode","BbSmoothHeight","_Fragment","_renderList","error"],"mappings":";;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,mCACtBC,IAAa,EAAE,OAAO,qCAyFAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,SAAS,WAAW;AAAA,IACjC,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,EAAE,SAAS,QAAQ;AAAA,IAClC,OAAO,CAAC;AAAA,IACR,eAAe,EAAE,SAAS,OAAO;AAAA,IACjC,UAAU,EAAE,SAAS,QAAQ;AAAA,IAC7B,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,SAAS,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,IACzC,KAAK,EAAE,SAAS,OAAO;AAAA,EACzB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAKRE,IAAKD,EAAM,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AG;AAAA,aACF,EAAE;AAAA,UACLY,EAAoB,QAAQN,EAAgBC,EAAoBf,EAAgB,KAAK,CAAC,GAAG;AAAA,YACvFiB,EAAYT,EAAK,QAAQ,SAASM,EAAgBC,EAAoB,EAAE,IAAIM,EAAOjC,CAAE,GAAG,MAAME,EAAK,OAAO,WAAWO,EAAU,MAAO,CAAA,CAAC,CAAC;AAAA,aACvI,EAAE;AAAA,QAAA,CACN;AAAA,QACD,GAAG;AAAA,SACF,EAAE;AAAA,MACLuB,EAAoB,QAAQrC,GAAY;AAAA,QACtCuC,EAAaC,GAAgB,EAAE,KAAK,UAAU;AAAA,UAC5C,SAASP,EAAS,MAAM;AAAA,aACrBN,EAAW,EAAI,GAAGC,EAAoBa,GAAW,MAAMC,EAAYlB,EAAe,OAAO,CAACmB,OACjFhB,EAAA,GAAcC,EAAoB,QAAQ;AAAA,cAChD,KAAKe;AAAA,cACL,OAAO;AAAA,YACN,GAAAP,EAAiBO,CAAK,GAAG,CAAC,EAC9B,GAAG,GAAG;AAAA,UAAA,CACR;AAAA,UACD,GAAG;AAAA,QAAA,CACJ;AAAA,MAAA,CACF;AAAA,IAAA,CACF;AAAA,EAEH;AAEA,CAAC;"}
package/dist/index210.js CHANGED
@@ -1,5 +1,9 @@
1
- const o = (e) => e[0];
1
+ const o = (e, t = 50) => new Promise((r) => {
2
+ const n = setInterval(() => {
3
+ e() && (clearInterval(n), r());
4
+ }, t);
5
+ });
2
6
  export {
3
- o as head
7
+ o as waitFor
4
8
  };
5
9
  //# sourceMappingURL=index210.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index210.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0]"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
1
+ {"version":3,"file":"index210.js","sources":["../src/utilities/functions/waitFor.ts"],"sourcesContent":["/** Wait until iteratee returns true to resolve the promise */\nexport const waitFor: (\n\titeratee: () => boolean,\n\tinterval?: number\n) => Promise<void> = (iteratee, interval = 50) =>\n\tnew Promise((resolve) => {\n\t\tconst i = setInterval(() => {\n\t\t\tif (iteratee()) {\n\t\t\t\tclearInterval(i);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t}, interval);\n\t});\n"],"names":["waitFor","iteratee","interval","resolve","i"],"mappings":"AACa,MAAAA,IAGQ,CAACC,GAAUC,IAAW,OAC1C,IAAI,QAAQ,CAACC,MAAY;AAClB,QAAAC,IAAI,YAAY,MAAM;AAC3B,IAAIH,QACH,cAAcG,CAAC,GACPD;KAEPD,CAAQ;AACZ,CAAC;"}