bitboss-ui 2.0.78 → 2.0.80

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 (160) hide show
  1. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +1 -1
  2. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +1 -1
  3. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +1 -1
  4. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +1 -1
  5. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +1 -1
  6. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  7. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +1 -1
  8. package/dist/components/BbSelect/BbSelect.vue.d.ts +1 -1
  9. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  10. package/dist/components/OptionsContainer.vue.d.ts +1 -1
  11. package/dist/index110.js +5 -5
  12. package/dist/index118.js +25 -21
  13. package/dist/index120.js +5 -5
  14. package/dist/index122.js +1 -1
  15. package/dist/index126.js +14 -14
  16. package/dist/index127.js +1 -1
  17. package/dist/index128.js +1 -1
  18. package/dist/index13.js +1 -1
  19. package/dist/index130.js +1 -1
  20. package/dist/index132.js +2 -2
  21. package/dist/index133.js +2 -2
  22. package/dist/index15.js +4 -4
  23. package/dist/index17.js +3 -3
  24. package/dist/index19.js +2 -2
  25. package/dist/index204.js +2 -81
  26. package/dist/index205.js +2 -2
  27. package/dist/index206.js +4 -8
  28. package/dist/index207.js +2 -3
  29. package/dist/index208.js +3 -41
  30. package/dist/index209.js +41 -6
  31. package/dist/index21.js +14 -14
  32. package/dist/index210.js +6 -7
  33. package/dist/index211.js +7 -5
  34. package/dist/index212.js +8 -16
  35. package/dist/index213.js +12 -16
  36. package/dist/index214.js +53 -19
  37. package/dist/index216.js +13 -27
  38. package/dist/index217.js +20 -3
  39. package/dist/index218.js +4 -2
  40. package/dist/index219.js +122 -245
  41. package/dist/index220.js +5 -52
  42. package/dist/index221.js +125 -44
  43. package/dist/index222.js +19 -5
  44. package/dist/index223.js +15 -59
  45. package/dist/index224.js +15 -52
  46. package/dist/index225.js +4 -0
  47. package/dist/index226.js +2 -13
  48. package/dist/index227.js +5 -164
  49. package/dist/index228.js +368 -83
  50. package/dist/index229.js +166 -0
  51. package/dist/index23.js +188 -187
  52. package/dist/index230.js +84 -3
  53. package/dist/index232.js +81 -125
  54. package/dist/index233.js +19 -2
  55. package/dist/index234.js +26 -19
  56. package/dist/index235.js +3 -5
  57. package/dist/index236.js +246 -366
  58. package/dist/index237.js +52 -4
  59. package/dist/index238.js +44 -2
  60. package/dist/index239.js +5 -4
  61. package/dist/index240.js +60 -2
  62. package/dist/index241.js +3 -2
  63. package/dist/index242.js +1 -1
  64. package/dist/index244.js +1 -1
  65. package/dist/index246.js +1 -1
  66. package/dist/index248.js +2 -10
  67. package/dist/index249.js +9 -2
  68. package/dist/index25.js +109 -105
  69. package/dist/index250.js +2 -8
  70. package/dist/index251.js +6 -23
  71. package/dist/index252.js +14 -87
  72. package/dist/index253.js +11 -0
  73. package/dist/index254.js +23 -6
  74. package/dist/index255.js +87 -14
  75. package/dist/index257.js +8 -5
  76. package/dist/index258.js +4 -2
  77. package/dist/index259.js +3 -2
  78. package/dist/index261.js +7 -2
  79. package/dist/index262.js +176 -2
  80. package/dist/index263.js +431 -2
  81. package/dist/index264.js +1 -1
  82. package/dist/index265.js +89 -2
  83. package/dist/index266.js +200 -2
  84. package/dist/index267.js +3 -2
  85. package/dist/index268.js +12 -28
  86. package/dist/index269.js +8 -21
  87. package/dist/index27.js +1 -1
  88. package/dist/index270.js +11 -0
  89. package/dist/index271.js +17 -7
  90. package/dist/index272.js +3 -430
  91. package/dist/index273.js +280 -88
  92. package/dist/index274.js +5 -8
  93. package/dist/index275.js +2 -3
  94. package/dist/index276.js +4 -0
  95. package/dist/index277.js +2 -200
  96. package/dist/index278.js +2 -3
  97. package/dist/index279.js +2 -12
  98. package/dist/index280.js +124 -7
  99. package/dist/index281.js +20 -7
  100. package/dist/index283.js +435 -3
  101. package/dist/index284.js +121 -218
  102. package/dist/index285.js +2 -2
  103. package/dist/index286.js +2 -126
  104. package/dist/index287.js +2 -176
  105. package/dist/index288.js +1 -21
  106. package/dist/index289.js +4 -0
  107. package/dist/index29.js +3 -3
  108. package/dist/index290.js +2 -4
  109. package/dist/index291.js +23 -431
  110. package/dist/index292.js +21 -126
  111. package/dist/index294.js +224 -3
  112. package/dist/index295.js +1 -1
  113. package/dist/index296.js +3 -5
  114. package/dist/index297.js +204 -59
  115. package/dist/index298.js +2 -211
  116. package/dist/index299.js +5 -5
  117. package/dist/index300.js +66 -8
  118. package/dist/index304.js +1 -1
  119. package/dist/index305.js +4 -3
  120. package/dist/index306.js +7 -6
  121. package/dist/index307.js +32 -6
  122. package/dist/index308.js +3 -18
  123. package/dist/index309.js +6 -32
  124. package/dist/index31.js +2 -2
  125. package/dist/index310.js +46 -10
  126. package/dist/index311.js +10 -46
  127. package/dist/index312.js +7 -12
  128. package/dist/index313.js +19 -480
  129. package/dist/index314.js +1 -1
  130. package/dist/index315.js +482 -0
  131. package/dist/index317.js +1 -1
  132. package/dist/index318.js +47 -2
  133. package/dist/index319.js +2 -47
  134. package/dist/index33.js +2 -2
  135. package/dist/index35.js +3 -3
  136. package/dist/index37.js +97 -96
  137. package/dist/index39.js +4 -4
  138. package/dist/index41.js +2 -2
  139. package/dist/index43.js +2 -2
  140. package/dist/index45.js +6 -6
  141. package/dist/index47.js +2 -2
  142. package/dist/index49.js +2 -2
  143. package/dist/index55.js +1 -1
  144. package/dist/index57.js +1 -1
  145. package/dist/index61.js +2 -2
  146. package/dist/index75.js +3 -3
  147. package/dist/index79.js +2 -2
  148. package/dist/index81.js +1 -1
  149. package/dist/index84.js +110 -106
  150. package/dist/index86.js +1 -1
  151. package/dist/index88.js +4 -4
  152. package/dist/index90.js +1 -1
  153. package/package.json +1 -1
  154. package/dist/index215.js +0 -21
  155. package/dist/index231.js +0 -128
  156. package/dist/index256.js +0 -283
  157. package/dist/index260.js +0 -4
  158. package/dist/index282.js +0 -19
  159. package/dist/index293.js +0 -4
  160. package/dist/index316.js +0 -4
package/dist/index84.js CHANGED
@@ -1,9 +1,10 @@
1
- import { defineComponent as te, ref as l, useAttrs as oe, getCurrentInstance as le, computed as p, nextTick as se, onBeforeUnmount as x, onMounted as ae, watch as ne, openBlock as g, createBlock as ie, Teleport as re, createElementVNode as s, mergeProps as O, createElementBlock as V, renderSlot as n, createTextVNode as ue, toDisplayString as S, createCommentVNode as z } from "vue";
2
- import { useFocusTrap as ce } from "./index208.js";
1
+ import { defineComponent as te, ref as l, useAttrs as oe, getCurrentInstance as le, computed as p, nextTick as se, onBeforeUnmount as N, onMounted as ae, watch as ne, openBlock as g, createBlock as ie, withCtx as re, createElementVNode as s, mergeProps as O, createElementBlock as V, renderSlot as n, createTextVNode as ue, toDisplayString as S, createCommentVNode as z } from "vue";
2
+ import { useFocusTrap as ce } from "./index209.js";
3
3
  import { useId as A } from "./index8.js";
4
4
  import { wait as E } from "./index131.js";
5
- import { useModalsState as b } from "./index210.js";
6
- const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"], ge = /* @__PURE__ */ te({
5
+ import { useModalsState as b } from "./index211.js";
6
+ import de from "./index213.js";
7
+ const fe = ["inert"], ve = { class: "bb-offcanvas-close" }, pe = ["aria-label"], ke = /* @__PURE__ */ te({
7
8
  __name: "BbOffCanvas",
8
9
  props: {
9
10
  closeLabel: { default: "Chiudi" },
@@ -26,11 +27,11 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
26
27
  },
27
28
  emits: ["shown", "hidden", "update:modelValue"],
28
29
  setup(H, { emit: I }) {
29
- var L, N;
30
- const e = H, u = I, k = `title_${A().id.value}`, C = `description_${A().id.value}`, c = l(null), T = l(null), W = l(null), F = l(null), R = l(null), K = l(null), P = oe(), $ = !!((N = (L = le()) == null ? void 0 : L.proxy) != null && N.$nuxt), d = l(0), U = p(() => {
30
+ var x, L;
31
+ const e = H, u = I, _ = `title_${A().id.value}`, k = `description_${A().id.value}`, c = l(null), $ = l(null), W = l(null), F = l(null), R = l(null), K = l(null), P = oe(), T = !!((L = (x = le()) == null ? void 0 : x.proxy) != null && L.$nuxt), d = l(0), U = p(() => {
31
32
  const { openedModals: t } = b();
32
33
  return !t.value || t.value === d.value;
33
- }), { activate: j, deactivate: q } = ce(T, {
34
+ }), { activate: j, deactivate: q } = ce($, {
34
35
  initialFocus: e.focusTarget ?? void 0,
35
36
  clickOutsideDeactivates: (t) => t.target === c.value,
36
37
  allowOutsideClick: !0,
@@ -38,21 +39,21 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
38
39
  escapeDeactivates: () => (se(() => {
39
40
  u("update:modelValue", !1);
40
41
  }), !0)
41
- }), G = p(() => e.closeLabel), _ = l(!1), f = l(!1), m = l(!0), v = l(!1), i = l(e.eager || e.modelValue), D = l(null), J = p(() => f.value || v.value), Q = () => {
42
+ }), G = p(() => e.closeLabel), C = l(!1), f = l(!1), m = l(!0), v = l(!1), i = l(e.eager || e.modelValue), D = l(null), J = p(() => f.value || v.value), Q = () => {
42
43
  if (!globalThis.document) return;
43
44
  const t = window.innerWidth - document.documentElement.clientWidth;
44
45
  document.body.style.overflow = "hidden", document.body.style.paddingRight = `${t}px`;
45
46
  }, w = () => {
46
47
  globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
47
48
  };
48
- x(() => {
49
+ N(() => {
49
50
  if (e.modelValue) {
50
51
  const { openedModals: t, modalHasClosed: o } = b();
51
52
  t.value && (o(), d.value = 0, w());
52
53
  }
53
54
  }), ae(() => {
54
- !e.modelValue && !i.value || $ && !globalThis.document || M();
55
- }), x(() => {
55
+ !e.modelValue && !i.value || T && !globalThis.document || M();
56
+ }), N(() => {
56
57
  if (e.modelValue) {
57
58
  const { openedModals: t, modalHasClosed: o } = b();
58
59
  t.value && (o(), d.value = 0, w());
@@ -60,7 +61,7 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
60
61
  }), ne(
61
62
  () => e.modelValue,
62
63
  () => {
63
- !e.modelValue && !i.value || $ && !globalThis.document || M();
64
+ !e.modelValue && !i.value || T && !globalThis.document || M();
64
65
  },
65
66
  { flush: "post" }
66
67
  );
@@ -68,9 +69,9 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
68
69
  if (e.modelValue) {
69
70
  i.value || (i.value = !0), m.value = !1, v.value = !1, f.value = !0;
70
71
  const { modalHasOpened: t, openedModals: o } = b();
71
- t(), d.value = o.value, Q(), await E(e.transitionDuration), f.value = !1, _.value = !0, u("shown"), j();
72
+ t(), d.value = o.value, Q(), await E(e.transitionDuration), f.value = !1, C.value = !0, u("shown"), j();
72
73
  } else {
73
- q(), f.value = !1, _.value = !1, v.value = !0;
74
+ q(), f.value = !1, C.value = !1, v.value = !0;
74
75
  const { modalHasClosed: t, openedModals: o } = b();
75
76
  t(), d.value = 0, o.value || w(), await E(e.transitionDuration), v.value = !1, m.value = !0, u("hidden"), D.value instanceof HTMLElement && D.value.focus();
76
77
  }
@@ -86,7 +87,7 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
86
87
  "bb-offcanvas bb-offcanvas__overlay": !0,
87
88
  "bb-offcanvas--fullscreen": e.fullscreen,
88
89
  "bb-offcanvas--faded": !U.value,
89
- "bb-offcanvas--open": _.value,
90
+ "bb-offcanvas--open": C.value,
90
91
  "bb-offcanvas--opening": f.value,
91
92
  "bb-offcanvas--closed": m.value,
92
93
  "bb-offcanvas--closing": v.value,
@@ -120,7 +121,7 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
120
121
  role: "dialog",
121
122
  "aria-modal": !0
122
123
  };
123
- i.value && (o["aria-labelledby"] = k, e.description && (o["aria-describedby"] = C));
124
+ i.value && (o["aria-labelledby"] = _, e.description && (o["aria-describedby"] = k));
124
125
  let a, r;
125
126
  const h = {
126
127
  sm: 384,
@@ -139,101 +140,104 @@ const de = ["inert"], fe = { class: "bb-offcanvas-close" }, ve = ["aria-label"],
139
140
  ...o
140
141
  };
141
142
  });
142
- return (t, o) => (g(), ie(re, { to: "body" }, [
143
- s("div", O(Y.value, {
144
- ref_key: "overlay",
145
- ref: c,
146
- inert: m.value
147
- }), [
148
- s("div", O(Z.value, {
149
- ref_key: "panel",
150
- ref: T
143
+ return (t, o) => (g(), ie(de, null, {
144
+ default: re(() => [
145
+ s("div", O(Y.value, {
146
+ ref_key: "overlay",
147
+ ref: c,
148
+ inert: m.value
151
149
  }), [
152
- i.value ? (g(), V("div", {
153
- key: 0,
154
- ref_key: "content",
155
- ref: W,
156
- class: "bb-offcanvas__content"
157
- }, [
158
- n(t.$slots, "content", { close: B }, () => [
159
- s("div", {
160
- ref_key: "header",
161
- ref: F,
162
- class: "bb-offcanvas__header"
163
- }, [
164
- n(t.$slots, "header", {
165
- close: B,
166
- title: t.title,
167
- titleId: k
168
- }, () => [
169
- s("span", {
170
- id: k,
171
- class: "bb-offcanvas__title"
172
- }, [
173
- n(t.$slots, "title", { text: t.title }, () => [
174
- ue(S(t.title), 1)
175
- ])
176
- ]),
177
- s("span", fe, [
178
- t.showClose ? (g(), V("button", {
179
- key: 0,
180
- "aria-label": G.value,
181
- type: "button",
182
- onClick: B
150
+ s("div", O(Z.value, {
151
+ ref_key: "panel",
152
+ ref: $
153
+ }), [
154
+ i.value ? (g(), V("div", {
155
+ key: 0,
156
+ ref_key: "content",
157
+ ref: W,
158
+ class: "bb-offcanvas__content"
159
+ }, [
160
+ n(t.$slots, "content", { close: B }, () => [
161
+ s("div", {
162
+ ref_key: "header",
163
+ ref: F,
164
+ class: "bb-offcanvas__header"
165
+ }, [
166
+ n(t.$slots, "header", {
167
+ close: B,
168
+ title: t.title,
169
+ titleId: _
170
+ }, () => [
171
+ s("span", {
172
+ id: _,
173
+ class: "bb-offcanvas__title"
183
174
  }, [
184
- n(t.$slots, "close", {}, () => [
185
- o[0] || (o[0] = s("span", { class: "bb-offcanvas-close__icon" }, [
186
- s("svg", {
187
- "aria-hidden": "true",
188
- fill: "none",
189
- viewBox: "0 0 24 24",
190
- xmlns: "http://www.w3.org/2000/svg"
191
- }, [
192
- s("path", {
193
- d: "M23 23L1 1M23 1L1 23",
194
- stroke: "currentColor",
195
- "stroke-linecap": "round",
196
- "stroke-width": "2"
197
- })
198
- ])
199
- ], -1))
175
+ n(t.$slots, "title", { text: t.title }, () => [
176
+ ue(S(t.title), 1)
200
177
  ])
201
- ], 8, ve)) : z("", !0)
178
+ ]),
179
+ s("span", ve, [
180
+ t.showClose ? (g(), V("button", {
181
+ key: 0,
182
+ "aria-label": G.value,
183
+ type: "button",
184
+ onClick: B
185
+ }, [
186
+ n(t.$slots, "close", {}, () => [
187
+ o[0] || (o[0] = s("span", { class: "bb-offcanvas-close__icon" }, [
188
+ s("svg", {
189
+ "aria-hidden": "true",
190
+ fill: "none",
191
+ viewBox: "0 0 24 24",
192
+ xmlns: "http://www.w3.org/2000/svg"
193
+ }, [
194
+ s("path", {
195
+ d: "M23 23L1 1M23 1L1 23",
196
+ stroke: "currentColor",
197
+ "stroke-linecap": "round",
198
+ "stroke-width": "2"
199
+ })
200
+ ])
201
+ ], -1))
202
+ ])
203
+ ], 8, pe)) : z("", !0)
204
+ ])
202
205
  ])
203
- ])
204
- ], 512),
205
- s("div", {
206
- ref_key: "body",
207
- ref: R,
208
- class: "bb-offcanvas__body scrollbar-border"
209
- }, [
210
- n(t.$slots, "description", {
211
- descriptionId: C,
212
- text: t.description
213
- }, () => [
214
- t.description ? (g(), V("div", {
215
- key: 0,
216
- id: C,
217
- class: "bb-offcanvas__description sr-only"
218
- }, S(t.description), 1)) : z("", !0)
219
- ]),
220
- n(t.$slots, "default")
221
- ], 512),
222
- o[1] || (o[1] = s("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
223
- s("div", {
224
- ref_key: "footer",
225
- ref: K,
226
- class: "bb-offcanvas__footer"
227
- }, [
228
- n(t.$slots, "footer")
229
- ], 512)
230
- ])
231
- ], 512)) : z("", !0)
232
- ], 16)
233
- ], 16, de)
234
- ]));
206
+ ], 512),
207
+ s("div", {
208
+ ref_key: "body",
209
+ ref: R,
210
+ class: "bb-offcanvas__body scrollbar-border"
211
+ }, [
212
+ n(t.$slots, "description", {
213
+ descriptionId: k,
214
+ text: t.description
215
+ }, () => [
216
+ t.description ? (g(), V("div", {
217
+ key: 0,
218
+ id: k,
219
+ class: "bb-offcanvas__description sr-only"
220
+ }, S(t.description), 1)) : z("", !0)
221
+ ]),
222
+ n(t.$slots, "default")
223
+ ], 512),
224
+ o[1] || (o[1] = s("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
225
+ s("div", {
226
+ ref_key: "footer",
227
+ ref: K,
228
+ class: "bb-offcanvas__footer"
229
+ }, [
230
+ n(t.$slots, "footer")
231
+ ], 512)
232
+ ])
233
+ ], 512)) : z("", !0)
234
+ ], 16)
235
+ ], 16, fe)
236
+ ]),
237
+ _: 3
238
+ }));
235
239
  }
236
240
  });
237
241
  export {
238
- ge as default
242
+ ke as default
239
243
  };
package/dist/index86.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as P, computed as _, ref as g, onMounted as A, onBeforeUnmount as E, openBlock as y, createElementBlock as k, normalizeClass as C, createElementVNode as i, createVNode as V, unref as S, withCtx as h, renderSlot as v, Fragment as W, renderList as R, toDisplayString as M, nextTick as $ } from "vue";
2
- import { debounce as F } from "./index274.js";
2
+ import { debounce as F } from "./index257.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import w from "./index13.js";
package/dist/index88.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as M, ref as n, computed as v, openBlock as k, createElementBlock as O, mergeProps as F, createElementVNode as p, renderSlot as y, normalizeProps as S, guardReactiveProps as H, createVNode as V, withCtx as C, createBlock as q, createCommentVNode as I, nextTick as W } from "vue";
2
- import { useFocusTrap as z } from "./index208.js";
2
+ import { useFocusTrap as z } from "./index209.js";
3
3
  import { useId as A } from "./index8.js";
4
4
  import { useIntersectionObserver as R } from "./index132.js";
5
- import { waitFor as j } from "./index209.js";
5
+ import { waitFor as j } from "./index210.js";
6
6
  import G from "./index13.js";
7
7
  /* empty css */
8
- import J from "./index252.js";
8
+ import J from "./index255.js";
9
9
  /* empty css */
10
- import { useDebounceFn as K } from "./index204.js";
10
+ import { useDebounceFn as K } from "./index232.js";
11
11
  const re = /* @__PURE__ */ M({
12
12
  __name: "BbPopover",
13
13
  props: {
package/dist/index90.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, computed as a, openBlock as l, createElementBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
2
- import { clamp as p } from "./index205.js";
2
+ import { clamp as p } from "./index204.js";
3
3
  import { getAsPercentageBetween as i } from "./index130.js";
4
4
  const _ = /* @__PURE__ */ r({
5
5
  __name: "BbProgress",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "2.0.78",
3
+ "version": "2.0.80",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "scripts": {
package/dist/index215.js DELETED
@@ -1,21 +0,0 @@
1
- import { getDefaultExportFromCjs as p, commonjsGlobal as s } from "./index257.js";
2
- import { __module as n } from "./index262.js";
3
- (function(u, l) {
4
- (function(c, e) {
5
- u.exports = e();
6
- })(s, function() {
7
- return function(c, e, r) {
8
- r.updateLocale = function(f, o) {
9
- var t = r.Ls[f];
10
- if (t) return (o ? Object.keys(o) : []).forEach(function(a) {
11
- t[a] = o[a];
12
- }), t;
13
- };
14
- };
15
- });
16
- })(n);
17
- var i = n.exports;
18
- const x = /* @__PURE__ */ p(i);
19
- export {
20
- x as default
21
- };
package/dist/index231.js DELETED
@@ -1,128 +0,0 @@
1
- import { arrow as j, computePosition as A } from "./index236.js";
2
- import { autoUpdate as W, flip as X, hide as Y, offset as Z, platform as ee, shift as ne } from "./index236.js";
3
- import { isNode as B, getNodeName as F } from "./index286.js";
4
- import { getOverflowAncestors as le } from "./index286.js";
5
- import { computed as a, ref as f, shallowRef as I, watch as h, getCurrentScope as U, onScopeDispose as k, shallowReadonly as r, unref as q } from "vue";
6
- function z(e) {
7
- return e != null && typeof e == "object" && "$el" in e;
8
- }
9
- function g(e) {
10
- if (z(e)) {
11
- const l = e.$el;
12
- return B(l) && F(l) === "#comment" ? null : l;
13
- }
14
- return e;
15
- }
16
- function o(e) {
17
- return typeof e == "function" ? e() : q(e);
18
- }
19
- function K(e) {
20
- return {
21
- name: "arrow",
22
- options: e,
23
- fn(l) {
24
- const t = g(o(e.element));
25
- return t == null ? {} : j({
26
- element: t,
27
- padding: e.padding
28
- }).fn(l);
29
- }
30
- };
31
- }
32
- function M(e) {
33
- return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
34
- }
35
- function C(e, l) {
36
- const t = M(e);
37
- return Math.round(l * t) / t;
38
- }
39
- function L(e, l, t) {
40
- t === void 0 && (t = {});
41
- const x = t.whileElementsMounted, V = a(() => {
42
- var n;
43
- return (n = o(t.open)) != null ? n : !0;
44
- }), D = a(() => o(t.middleware)), d = a(() => {
45
- var n;
46
- return (n = o(t.placement)) != null ? n : "bottom";
47
- }), v = a(() => {
48
- var n;
49
- return (n = o(t.strategy)) != null ? n : "absolute";
50
- }), S = a(() => {
51
- var n;
52
- return (n = o(t.transform)) != null ? n : !0;
53
- }), i = a(() => g(e.value)), u = a(() => g(l.value)), p = f(0), w = f(0), c = f(v.value), O = f(d.value), P = I({}), y = f(!1), _ = a(() => {
54
- const n = {
55
- position: c.value,
56
- left: "0",
57
- top: "0"
58
- };
59
- if (!u.value)
60
- return n;
61
- const R = C(u.value, p.value), b = C(u.value, w.value);
62
- return S.value ? {
63
- ...n,
64
- transform: "translate(" + R + "px, " + b + "px)",
65
- ...M(u.value) >= 1.5 && {
66
- willChange: "transform"
67
- }
68
- } : {
69
- position: c.value,
70
- left: R + "px",
71
- top: b + "px"
72
- };
73
- });
74
- let s;
75
- function m() {
76
- i.value == null || u.value == null || A(i.value, u.value, {
77
- middleware: D.value,
78
- placement: d.value,
79
- strategy: v.value
80
- }).then((n) => {
81
- p.value = n.x, w.value = n.y, c.value = n.strategy, O.value = n.placement, P.value = n.middlewareData, y.value = !0;
82
- });
83
- }
84
- function E() {
85
- typeof s == "function" && (s(), s = void 0);
86
- }
87
- function N() {
88
- if (E(), x === void 0) {
89
- m();
90
- return;
91
- }
92
- if (i.value != null && u.value != null) {
93
- s = x(i.value, u.value, m);
94
- return;
95
- }
96
- }
97
- function $() {
98
- V.value || (y.value = !1);
99
- }
100
- return h([D, d, v], m, {
101
- flush: "sync"
102
- }), h([i, u], N, {
103
- flush: "sync"
104
- }), h(V, $, {
105
- flush: "sync"
106
- }), U() && k(E), {
107
- x: r(p),
108
- y: r(w),
109
- strategy: r(c),
110
- placement: r(O),
111
- middlewareData: r(P),
112
- isPositioned: r(y),
113
- floatingStyles: _,
114
- update: m
115
- };
116
- }
117
- export {
118
- K as arrow,
119
- W as autoUpdate,
120
- A as computePosition,
121
- X as flip,
122
- le as getOverflowAncestors,
123
- Y as hide,
124
- Z as offset,
125
- ee as platform,
126
- ne as shift,
127
- L as useFloating
128
- };