bitboss-ui 0.1.2 → 0.1.4

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 (284) hide show
  1. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -0
  2. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +151 -0
  3. package/dist/components/BbPopover/BbPopover.vue.d.ts +96 -0
  4. package/dist/components/BbRatio/BbRatio.vue.d.ts +12 -0
  5. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.js +104 -98
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +123 -95
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +43 -3
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +2 -2
  14. package/dist/index102.js +2 -2
  15. package/dist/index103.js +2 -2
  16. package/dist/index104.js +2 -2
  17. package/dist/index105.js +2 -2
  18. package/dist/index106.js +2 -2
  19. package/dist/index107.js +2 -2
  20. package/dist/index108.js +2 -2
  21. package/dist/index109.js +2 -2
  22. package/dist/index110.js +2 -2
  23. package/dist/index111.js +2 -2
  24. package/dist/index112.js +2 -2
  25. package/dist/index113.js +2 -2
  26. package/dist/index114.js +2 -2
  27. package/dist/index115.js +2 -2
  28. package/dist/index116.js +2 -2
  29. package/dist/index117.js +2 -2
  30. package/dist/index118.js +2 -2
  31. package/dist/index119.js +3 -2
  32. package/dist/index119.js.map +1 -1
  33. package/dist/index12.js +4 -4
  34. package/dist/index120.js +2 -2
  35. package/dist/index121.js +3 -2
  36. package/dist/index121.js.map +1 -1
  37. package/dist/index123.js +2 -2
  38. package/dist/index124.js +2 -3
  39. package/dist/index124.js.map +1 -1
  40. package/dist/index125.js +2 -2
  41. package/dist/index126.js +2 -3
  42. package/dist/index126.js.map +1 -1
  43. package/dist/index127.js +2 -2
  44. package/dist/index128.js +2 -2
  45. package/dist/index129.js +3 -2
  46. package/dist/index129.js.map +1 -1
  47. package/dist/index130.js +2 -2
  48. package/dist/index131.js +2 -2
  49. package/dist/index132.js +2 -2
  50. package/dist/index133.js +2 -2
  51. package/dist/index134.js +2 -3
  52. package/dist/index134.js.map +1 -1
  53. package/dist/index135.js +2 -2
  54. package/dist/index136.js +2 -2
  55. package/dist/index137.js +2 -2
  56. package/dist/index138.js +2 -2
  57. package/dist/index139.js +2 -2
  58. package/dist/index14.js +6 -6
  59. package/dist/index140.js +3 -2
  60. package/dist/index140.js.map +1 -1
  61. package/dist/index141.js +2 -2
  62. package/dist/index142.js +3 -2
  63. package/dist/index142.js.map +1 -1
  64. package/dist/index145.js +2 -2
  65. package/dist/index146.js +2 -3
  66. package/dist/index146.js.map +1 -1
  67. package/dist/index147.js +2 -2
  68. package/dist/index148.js +2 -3
  69. package/dist/index148.js.map +1 -1
  70. package/dist/index149.js +2 -2
  71. package/dist/index150.js +2 -2
  72. package/dist/index151.js +3 -2
  73. package/dist/index151.js.map +1 -1
  74. package/dist/index152.js +3 -4
  75. package/dist/index152.js.map +1 -1
  76. package/dist/index153.js +3 -8
  77. package/dist/index153.js.map +1 -1
  78. package/dist/index154.js +3 -2
  79. package/dist/index154.js.map +1 -1
  80. package/dist/index155.js +3 -2
  81. package/dist/index155.js.map +1 -1
  82. package/dist/index156.js +3 -5
  83. package/dist/index156.js.map +1 -1
  84. package/dist/index157.js +348 -17
  85. package/dist/index157.js.map +1 -1
  86. package/dist/index158.js +131 -17
  87. package/dist/index158.js.map +1 -1
  88. package/dist/index159.js +5 -29
  89. package/dist/index159.js.map +1 -1
  90. package/dist/index16.js +1 -1
  91. package/dist/index160.js +19 -2
  92. package/dist/index160.js.map +1 -1
  93. package/dist/index162.js +2 -2
  94. package/dist/index162.js.map +1 -1
  95. package/dist/index163.js +184 -14
  96. package/dist/index163.js.map +1 -1
  97. package/dist/index164.js +2 -13
  98. package/dist/index164.js.map +1 -1
  99. package/dist/index165.js +23 -2
  100. package/dist/index165.js.map +1 -1
  101. package/dist/index166.js +328 -3
  102. package/dist/index166.js.map +1 -1
  103. package/dist/index167.js +16 -2
  104. package/dist/index167.js.map +1 -1
  105. package/dist/index168.js +12 -5
  106. package/dist/index168.js.map +1 -1
  107. package/dist/index169.js +2 -350
  108. package/dist/index169.js.map +1 -1
  109. package/dist/index170.js +2 -134
  110. package/dist/index170.js.map +1 -1
  111. package/dist/index171.js +2 -186
  112. package/dist/index171.js.map +1 -1
  113. package/dist/index172.js +4 -23
  114. package/dist/index172.js.map +1 -1
  115. package/dist/index173.js +8 -328
  116. package/dist/index173.js.map +1 -1
  117. package/dist/index174.js +20 -2
  118. package/dist/index174.js.map +1 -1
  119. package/dist/index175.js +29 -21
  120. package/dist/index175.js.map +1 -1
  121. package/dist/index176.js +2 -3
  122. package/dist/index176.js.map +1 -1
  123. package/dist/index177.js +3 -3
  124. package/dist/index177.js.map +1 -1
  125. package/dist/index178.js +6 -38
  126. package/dist/index178.js.map +1 -1
  127. package/dist/index179.js +2 -28
  128. package/dist/index179.js.map +1 -1
  129. package/dist/index18.js +2 -2
  130. package/dist/index180.js +2 -13
  131. package/dist/index180.js.map +1 -1
  132. package/dist/index181.js +20 -8
  133. package/dist/index181.js.map +1 -1
  134. package/dist/index182.js +3 -96
  135. package/dist/index182.js.map +1 -1
  136. package/dist/index183.js +3 -4
  137. package/dist/index183.js.map +1 -1
  138. package/dist/index184.js +38 -295
  139. package/dist/index184.js.map +1 -1
  140. package/dist/index185.js +9 -6
  141. package/dist/index185.js.map +1 -1
  142. package/dist/index186.js +96 -2
  143. package/dist/index186.js.map +1 -1
  144. package/dist/index187.js +28 -2
  145. package/dist/index187.js.map +1 -1
  146. package/dist/index188.js +13 -2
  147. package/dist/index188.js.map +1 -1
  148. package/dist/index189.js +6 -2
  149. package/dist/index189.js.map +1 -1
  150. package/dist/index190.js +2 -235
  151. package/dist/index190.js.map +1 -1
  152. package/dist/index191.js +294 -88
  153. package/dist/index191.js.map +1 -1
  154. package/dist/index192.js +2 -2
  155. package/dist/index193.js +2 -117
  156. package/dist/index193.js.map +1 -1
  157. package/dist/index194.js +111 -100
  158. package/dist/index194.js.map +1 -1
  159. package/dist/index195.js +105 -78
  160. package/dist/index195.js.map +1 -1
  161. package/dist/index196.js +4 -224
  162. package/dist/index196.js.map +1 -1
  163. package/dist/index197.js +226 -249
  164. package/dist/index197.js.map +1 -1
  165. package/dist/index198.js +2 -38
  166. package/dist/index198.js.map +1 -1
  167. package/dist/index199.js +2 -2
  168. package/dist/index199.js.map +1 -1
  169. package/dist/index20.js +4 -4
  170. package/dist/index200.js +89 -2
  171. package/dist/index200.js.map +1 -1
  172. package/dist/index201.js +79 -2
  173. package/dist/index201.js.map +1 -1
  174. package/dist/index202.js +49 -8
  175. package/dist/index202.js.map +1 -1
  176. package/dist/index203.js +223 -5
  177. package/dist/index203.js.map +1 -1
  178. package/dist/index204.js +261 -0
  179. package/dist/index204.js.map +1 -0
  180. package/dist/index205.js +41 -0
  181. package/dist/index205.js.map +1 -0
  182. package/dist/index206.js +5 -0
  183. package/dist/index206.js.map +1 -0
  184. package/dist/index207.js +5 -0
  185. package/dist/index207.js.map +1 -0
  186. package/dist/index208.js +12 -0
  187. package/dist/index208.js.map +1 -0
  188. package/dist/index209.js +9 -0
  189. package/dist/index209.js.map +1 -0
  190. package/dist/index210.js +5 -0
  191. package/dist/index210.js.map +1 -0
  192. package/dist/index211.js +14 -0
  193. package/dist/index211.js.map +1 -0
  194. package/dist/index212.js +434 -0
  195. package/dist/index212.js.map +1 -0
  196. package/dist/index213.js +12 -0
  197. package/dist/index213.js.map +1 -0
  198. package/dist/index214.js +203 -0
  199. package/dist/index214.js.map +1 -0
  200. package/dist/index22.js +14 -14
  201. package/dist/index24.js +4 -4
  202. package/dist/index26.js +2 -2
  203. package/dist/index28.js +4 -4
  204. package/dist/index34.js +2 -2
  205. package/dist/index36.js +50 -37
  206. package/dist/index36.js.map +1 -1
  207. package/dist/index38.js +39 -39
  208. package/dist/index38.js.map +1 -1
  209. package/dist/index4.js +2 -2
  210. package/dist/index40.js +36 -82
  211. package/dist/index40.js.map +1 -1
  212. package/dist/index42.js +44 -57
  213. package/dist/index42.js.map +1 -1
  214. package/dist/index44.js +98 -79
  215. package/dist/index44.js.map +1 -1
  216. package/dist/index46.js +79 -81
  217. package/dist/index46.js.map +1 -1
  218. package/dist/index48.js +80 -40
  219. package/dist/index48.js.map +1 -1
  220. package/dist/index50.js +40 -283
  221. package/dist/index50.js.map +1 -1
  222. package/dist/index52.js +279 -95
  223. package/dist/index52.js.map +1 -1
  224. package/dist/index54.js +98 -212
  225. package/dist/index54.js.map +1 -1
  226. package/dist/index56.js +213 -44
  227. package/dist/index56.js.map +1 -1
  228. package/dist/index58.js +45 -40
  229. package/dist/index58.js.map +1 -1
  230. package/dist/index59.js +2 -96
  231. package/dist/index59.js.map +1 -1
  232. package/dist/index6.js +4 -4
  233. package/dist/index60.js +44 -2
  234. package/dist/index60.js.map +1 -1
  235. package/dist/index61.js +89 -211
  236. package/dist/index61.js.map +1 -1
  237. package/dist/index63.js +210 -130
  238. package/dist/index63.js.map +1 -1
  239. package/dist/index65.js +134 -18
  240. package/dist/index65.js.map +1 -1
  241. package/dist/index67.js +145 -74
  242. package/dist/index67.js.map +1 -1
  243. package/dist/index69.js +18 -98
  244. package/dist/index69.js.map +1 -1
  245. package/dist/index71.js +77 -17
  246. package/dist/index71.js.map +1 -1
  247. package/dist/index73.js +48 -66
  248. package/dist/index73.js.map +1 -1
  249. package/dist/index75.js +21 -78
  250. package/dist/index75.js.map +1 -1
  251. package/dist/index77.js +77 -46
  252. package/dist/index77.js.map +1 -1
  253. package/dist/index79.js +44 -61
  254. package/dist/index79.js.map +1 -1
  255. package/dist/index8.js +188 -181
  256. package/dist/index8.js.map +1 -1
  257. package/dist/index81.js +82 -106
  258. package/dist/index81.js.map +1 -1
  259. package/dist/index83.js +88 -370
  260. package/dist/index83.js.map +1 -1
  261. package/dist/index85.js +106 -74
  262. package/dist/index85.js.map +1 -1
  263. package/dist/index87.js +371 -68
  264. package/dist/index87.js.map +1 -1
  265. package/dist/index89.js +75 -111
  266. package/dist/index89.js.map +1 -1
  267. package/dist/index91.js +76 -87
  268. package/dist/index91.js.map +1 -1
  269. package/dist/index93.js +111 -32
  270. package/dist/index93.js.map +1 -1
  271. package/dist/index94.js +2 -37
  272. package/dist/index94.js.map +1 -1
  273. package/dist/index95.js +87 -42
  274. package/dist/index95.js.map +1 -1
  275. package/dist/index96.js +2 -43
  276. package/dist/index96.js.map +1 -1
  277. package/dist/index97.js +38 -3
  278. package/dist/index97.js.map +1 -1
  279. package/dist/index98.js +37 -3
  280. package/dist/index98.js.map +1 -1
  281. package/dist/index99.js +47 -3
  282. package/dist/index99.js.map +1 -1
  283. package/dist/style.css +1 -1
  284. package/package.json +1 -1
package/dist/index89.js CHANGED
@@ -1,120 +1,84 @@
1
- import { defineComponent as D, ref as o, computed as z, openBlock as f, createElementBlock as F, mergeProps as O, createElementVNode as l, renderSlot as g, normalizeProps as P, guardReactiveProps as S, unref as b, createBlock as y, Teleport as N, normalizeClass as V, normalizeStyle as H, withCtx as R, createCommentVNode as U } from "vue";
2
- import { useFloating as j } from "./index182.js";
3
- import { nanoid as q } from "./index165.js";
4
- import { wait as C } from "./index167.js";
5
- import x from "./index2.js";
6
- import "./index3.js";
7
- import { autoUpdate as A } from "./index169.js";
8
- import { flip as G, shift as I } from "./index173.js";
9
- const J = /* @__PURE__ */ l("span", { class: "bb-tooltip__arrow" }, null, -1), K = { class: "bb-tooltip__bubble" }, Q = /* @__PURE__ */ l("svg", {
10
- viewBox: "0 0 24 24",
11
- fill: "none",
12
- xmlns: "http://www.w3.org/2000/svg"
13
- }, [
14
- /* @__PURE__ */ l("path", {
15
- d: "M23 23L1 1M23 1L1 23",
16
- stroke: "currentColor",
17
- "stroke-width": "2",
18
- "stroke-linecap": "round"
19
- })
20
- ], -1), ae = /* @__PURE__ */ D({
21
- __name: "BbTooltip",
1
+ import { defineComponent as m, openBlock as b, createBlock as h, withCtx as r, renderSlot as n, normalizeProps as s, guardReactiveProps as i, createVNode as c, mergeProps as f, createSlots as y, renderList as B } from "vue";
2
+ import P from "./index14.js";
3
+ import "./index15.js";
4
+ import V from "./index30.js";
5
+ import "./index31.js";
6
+ const G = /* @__PURE__ */ m({
7
+ __name: "BbTextarea",
22
8
  props: {
23
- block: { type: Boolean },
9
+ autoGrow: { type: Boolean },
10
+ autofocus: { type: Boolean },
11
+ direction: {},
24
12
  disabled: { type: Boolean },
25
- placement: { default: "top" },
26
- theme: { default: "default" },
27
- showClose: { type: Boolean, default: !0 },
28
- transitionDuration: { default: 150 }
13
+ errors: {},
14
+ hasErrors: { type: Boolean },
15
+ hideLabel: { type: Boolean },
16
+ id: {},
17
+ inputPosition: {},
18
+ label: {},
19
+ labelPosition: {},
20
+ labelTag: {},
21
+ modelValue: {},
22
+ name: {},
23
+ placeholder: {},
24
+ readonly: { type: Boolean },
25
+ reverse: { type: Boolean },
26
+ tag: {}
29
27
  },
30
- setup(E) {
31
- const t = E, m = `bb_${q()}`, i = o(), u = o(), { floatingStyles: B, placement: v } = j(i, u, {
32
- placement: t.placement,
33
- whileElementsMounted: A,
34
- middleware: [G(), I({ padding: 10 })]
35
- }), _ = o(!0), n = o(!1), a = o(!1), s = o(!1), c = o(!0), h = () => {
36
- a.value || n.value || t.disabled || (M(), document.addEventListener("mouseover", w, { passive: !0 }), document.addEventListener("keydown", k, { passive: !0 }));
37
- }, $ = h, w = (e) => {
38
- const r = e.target;
39
- if (r && r instanceof HTMLElement) {
40
- let d = !0;
41
- i.value && i.value.contains(r) && (d = !1), u.value && u.value.contains(r) && (d = !1), d && p();
42
- }
43
- }, k = (e) => {
44
- a.value && e.key === "Escape" && p();
45
- }, L = () => {
46
- _.value = !1, p();
47
- }, M = async () => {
48
- _.value && (c.value = !1, s.value = !1, n.value = !0, await C(50), a.value = !0, n.value = !1);
49
- }, p = async () => {
50
- a.value = !1, n.value = !1, s.value = !0, await C(t.transitionDuration), s.value = !1, c.value = !0, document.removeEventListener("mouseover", w), document.removeEventListener("keydown", k);
51
- }, T = z(() => ({
52
- class: {
53
- "bb-tooltip--block": t.block,
54
- [`bb-tooltip--theme-${t.theme}`]: t.theme
55
- }
56
- }));
57
- return (e, r) => (f(), F("span", O({ class: "bb-tooltip" }, T.value), [
58
- l("span", {
59
- class: "bb-tooltip__wrapper",
60
- ref_key: "wrapper",
61
- ref: i
62
- }, [
63
- g(e.$slots, "activator", P(S({
64
- props: {
65
- "aria-describedby": m,
66
- onMouseenter: h,
67
- onFocus: b($),
68
- onBlur: p
69
- },
70
- closed: c.value,
71
- closing: s.value,
28
+ emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
29
+ setup(w, { emit: o }) {
30
+ const u = {
31
+ onBlur: (e) => o("blur", e),
32
+ onChange: (e) => o("change", e),
33
+ onClick: (e) => o("click", e),
34
+ onFocus: (e) => o("focus", e),
35
+ onInput: (e) => o("input", e),
36
+ onMousedown: (e) => o("mousedown", e),
37
+ onMouseup: (e) => o("mouseup", e),
38
+ "onUpdate:modelValue": (e) => o("update:modelValue", e)
39
+ };
40
+ return (e, g) => (b(), h(P, {
41
+ class: "bb-textarea",
42
+ direction: e.direction,
43
+ errors: e.errors,
44
+ hasErrors: e.hasErrors,
45
+ hideLabel: e.hideLabel,
46
+ id: e.id,
47
+ inputPosition: e.inputPosition,
48
+ label: e.label,
49
+ labelPosition: e.labelPosition,
50
+ modelValue: e.modelValue,
51
+ name: e.name,
52
+ reverse: e.reverse
53
+ }, {
54
+ label: r((a) => [
55
+ n(e.$slots, "label", s(i(a)))
56
+ ]),
57
+ input: r(({ id: a, name: d, hasErrors: t }) => [
58
+ c(V, f({
59
+ autoGrow: e.autoGrow,
60
+ autofocus: e.autofocus,
72
61
  disabled: e.disabled,
73
- open: a.value,
74
- opening: n.value,
75
- placement: b(v)
76
- })))
77
- ], 512),
78
- (f(), y(N, { to: "body" }, [
79
- l("span", {
80
- class: V(["bb-tooltip__bubble-container", {
81
- [`bb-tooltip__bubble-container--${b(v)}`]: !0,
82
- [`bb-tooltip__bubble-container--${e.theme}`]: e.theme,
83
- "bb-tooltip__bubble-container--hidden": c.value,
84
- "bb-tooltip__bubble-container--closing": s.value,
85
- "bb-tooltip__bubble-container--opening": n.value,
86
- "bb-tooltip__bubble-container--open": a.value
87
- }]),
88
- ref_key: "content",
89
- ref: u,
90
- style: H({
91
- ...b(B),
92
- transitionDuration: `${t.transitionDuration}ms`
93
- }),
94
- id: m
95
- }, [
96
- J,
97
- l("span", K, [
98
- e.showClose ? (f(), y(x, {
99
- key: 0,
100
- tabindex: "-1",
101
- "aria-hidden": "true",
102
- class: "bb-tooltip__close",
103
- onClick: L
104
- }, {
105
- default: R(() => [
106
- Q
107
- ]),
108
- _: 1
109
- })) : U("", !0),
110
- g(e.$slots, "default")
111
- ])
112
- ], 6)
113
- ]))
114
- ], 16));
62
+ hasErrors: t,
63
+ id: a,
64
+ modelValue: e.modelValue,
65
+ name: d,
66
+ placeholder: e.placeholder,
67
+ readonly: e.readonly
68
+ }, u), y({ _: 2 }, [
69
+ B(e.$slots, (k, l) => ({
70
+ name: l,
71
+ fn: r((p) => [
72
+ n(e.$slots, l, s(i(p)))
73
+ ])
74
+ }))
75
+ ]), 1040, ["autoGrow", "autofocus", "disabled", "hasErrors", "id", "modelValue", "name", "placeholder", "readonly"])
76
+ ]),
77
+ _: 3
78
+ }, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "inputPosition", "label", "labelPosition", "modelValue", "name", "reverse"]));
115
79
  }
116
80
  });
117
81
  export {
118
- ae as default
82
+ G as default
119
83
  };
120
84
  //# sourceMappingURL=index89.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index89.js","sources":["../src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport, mergeProps as _mergeProps, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-tooltip__arrow\" }, null, -1)\nconst _hoisted_2 = { class: \"bb-tooltip__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, ref } from \"vue\";\nimport { useFloating, autoUpdate, flip, shift } from \"@floating-ui/vue\";\nimport { nanoid } from \"nanoid\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BbIcon from \"../BbIcon/BbIcon.vue\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\n\nexport type BbTooltipProps = {\n block?: boolean;\n disabled?: boolean;\n placement?:\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\";\n theme?: string;\n showClose?: boolean;\n transitionDuration?: number;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTooltip',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n placement: { default: \"top\" },\n theme: { default: \"default\" },\n showClose: { type: Boolean, default: true },\n transitionDuration: { default: 150 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst id = `bb_${nanoid()}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\n\nconst { floatingStyles, placement } = useFloating(wrapper, content, {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [flip(), shift({ padding: 10 })],\n});\n\nconst canOpen = ref(true);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst onMouseenter = () => {\n if (open.value || opening.value || props.disabled) return;\n openTooltip();\n document.addEventListener(\"mouseover\", onMouseOver, { passive: true });\n document.addEventListener(\"keydown\", onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = (event: Event) => {\n const target = event.target;\n if (!target) return;\n if (target instanceof HTMLElement) {\n let isOutside = true;\n\n if (wrapper.value) {\n if (wrapper.value.contains(target)) {\n isOutside = false;\n }\n }\n if (content.value) {\n if (content.value.contains(target)) {\n isOutside = false;\n }\n }\n\n if (isOutside) {\n closeTooltip();\n }\n }\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n if (open.value) {\n if (event.key === \"Escape\") {\n closeTooltip();\n }\n }\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n canOpen.value = false;\n closeTooltip();\n};\n\nconst openTooltip = async () => {\n if (!canOpen.value) return;\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closeTooltip = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n document.removeEventListener(\"mouseover\", onMouseOver);\n document.removeEventListener(\"keydown\", onEsc);\n};\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-tooltip--block\": props.block,\n [`bb-tooltip--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-tooltip\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-tooltip__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-describedby': id,\n onMouseenter: onMouseenter,\n onFocus: _unref(onFocus),\n onBlur: closeTooltip,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bb-tooltip__bubble-container\", {\n [`bb-tooltip__bubble-container--${_unref(placement)}`]: true,\n [`bb-tooltip__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-tooltip__bubble-container--hidden': closed.value,\n 'bb-tooltip__bubble-container--closing': closing.value,\n 'bb-tooltip__bubble-container--opening': opening.value,\n 'bb-tooltip__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle({\n ..._unref(floatingStyles),\n transitionDuration: `${props.transitionDuration}ms`,\n }),\n id: id\n }, [\n _hoisted_1,\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n tabindex: \"-1\",\n \"aria-hidden\": \"true\",\n class: \"bb-tooltip__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 6)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","props","id","nanoid","wrapper","ref","content","floatingStyles","placement","useFloating","autoUpdate","flip","shift","canOpen","opening","open","closing","closed","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","event","target","isOutside","closeTooltip","onClickClose","wait","attributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_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AAAA,YAAA,GACR;AAAA,cACD,SAASmB,EAAS,MAAM;AAAA,gBACtBjD;AAAA,cAAA,CACD;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDkD,EAAoB,IAAI,EAAI;AAAA,YAChCV,EAAYN,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,WACA,CAAC;AAAA,MAAA,CACL;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index89.js","sources":["../src/components/BbTextarea/BbTextarea.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseTextarea from \"../BaseTextarea/BaseTextarea.vue\";\nimport type { BaseTextareaEvents } from \"../BaseTextarea/BaseTextarea.vue\";\n\nexport interface BbTextareaProps {\n autoGrow?: boolean;\n autofocus?: boolean;\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n disabled?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n label: string;\n labelPosition?: \"left\" | \"center\" | \"right\";\n labelTag?: string;\n modelValue?: string | null;\n name?: string;\n placeholder?: string;\n readonly?: boolean;\n reverse?: boolean;\n tag?: string;\n}\n\nexport type BbTextareaEvents = BaseTextareaEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTextarea',\n props: {\n autoGrow: { type: Boolean },\n autofocus: { type: Boolean },\n direction: {},\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n label: {},\n labelPosition: {},\n labelTag: {},\n modelValue: {},\n name: {},\n placeholder: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean },\n tag: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: string | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-textarea\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseTextarea, _mergeProps({\n autoGrow: _ctx.autoGrow,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"autoGrow\", \"autofocus\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"placeholder\", \"readonly\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseTextarea","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA8BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,CAAC;AAAA,IAChB,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,KAAK,CAAC;AAAA,EACR;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EAC3G,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAShC,UAAMC,IAAiB;AAAA,MACrB,QAAQ,CAACC,MAAsBF,EAAK,QAAQE,CAAK;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AG,KAAK;AAAA,UACzCC,EAAYjB,EAAK,QAAQ,CAACkB,GAAGP,OACpB;AAAA,YACL,MAAMA;AAAAA,YACN,IAAIN,EAAS,CAACC,MAAS;AAAA,cACrBC,EAAYP,EAAK,QAAQW,GAAMH,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,YAAA,CAC1E;AAAA,UAAA,EAEJ;AAAA,QACF,CAAA,GAAG,MAAM,CAAC,YAAY,aAAa,YAAY,aAAa,MAAM,cAAc,QAAQ,eAAe,UAAU,CAAC;AAAA,MAAA,CACpH;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,iBAAiB,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE3I;AAEA,CAAC;"}
package/dist/index91.js CHANGED
@@ -1,95 +1,84 @@
1
- import { defineComponent as $, computed as x, resolveComponent as g, openBlock as l, createElementBlock as o, Fragment as v, renderList as s, normalizeClass as i, createElementVNode as t, renderSlot as r, createVNode as k, createSlots as y, withCtx as B, normalizeProps as C, guardReactiveProps as _ } from "vue";
2
- const T = { class: "bb-tree-row" }, w = { class: "bb-tree-main-content" }, F = /* @__PURE__ */ $({
3
- __name: "BbTree",
1
+ import { defineComponent as m, openBlock as b, createBlock as c, withCtx as r, renderSlot as n, normalizeProps as s, guardReactiveProps as i, createVNode as h, mergeProps as f, createSlots as y, renderList as P } from "vue";
2
+ import V from "./index14.js";
3
+ import "./index15.js";
4
+ import B from "./index32.js";
5
+ import "./index33.js";
6
+ const I = /* @__PURE__ */ m({
7
+ __name: "BbTextInput",
4
8
  props: {
5
- items: { default: () => [] },
6
- parent: {},
7
- identifier: { default: "id" },
8
- depth: { default: 0 },
9
- expandable: { type: [Boolean, Function] }
9
+ autocomplete: {},
10
+ autofocus: { type: Boolean },
11
+ direction: {},
12
+ disabled: { type: Boolean },
13
+ errors: {},
14
+ hasErrors: { type: Boolean },
15
+ hideLabel: { type: Boolean },
16
+ id: {},
17
+ inputPosition: {},
18
+ label: {},
19
+ labelPosition: {},
20
+ modelValue: {},
21
+ name: {},
22
+ placeholder: {},
23
+ readonly: { type: Boolean },
24
+ reverse: { type: Boolean },
25
+ type: {}
10
26
  },
11
- setup(h) {
12
- const a = h, b = (n) => typeof n.open > "u" ? !0 : n.open, u = x(() => a.items.map((n) => {
13
- const p = b(n);
14
- return {
15
- children: n.children,
16
- depth: a.depth,
17
- expandable: n.expandable,
18
- identifier: n[a.identifier],
19
- open: p,
20
- original: n,
21
- parent: a.parent
22
- };
23
- }));
24
- return (n, p) => {
25
- const c = g("BbTree", !0);
26
- return l(!0), o(v, null, s(u.value, (e) => (l(), o("div", {
27
- class: i(["bb-tree", {
28
- [`bb-tree--depth-${e.depth}`]: !0,
29
- "bb-tree--open": e.open
30
- }]),
31
- key: e.identifier
32
- }, [
33
- t("div", T, [
34
- t("div", w, [
35
- n.$slots[e.identifier] ? r(n.$slots, e.depth, {
36
- key: 0,
37
- item: e.original,
38
- parent: e.parent,
39
- depth: e.depth,
40
- expandable: e.expandable
41
- }) : n.$slots[e.depth] ? r(n.$slots, e.depth, {
42
- key: 1,
43
- item: e.original,
44
- parent: e.parent,
45
- depth: e.depth,
46
- expandable: e.expandable
47
- }) : r(n.$slots, "default", {
48
- key: 2,
49
- item: e.original,
50
- parent: e.parent,
51
- depth: e.depth,
52
- expandable: e.expandable
53
- })
54
- ])
55
- ]),
56
- t("div", {
57
- class: i(`bb-tree--depth-${e.depth}-children`)
58
- }, [
59
- r(n.$slots, `${e.depth}-children`, {
60
- item: e.original,
61
- parent: e.parent,
62
- depth: e.depth,
63
- expandable: e.expandable
64
- }, () => [
65
- r(n.$slots, `${e.identifier}-children`, {
66
- item: e.original,
67
- parent: e.parent,
68
- depth: e.depth,
69
- expandable: e.expandable
70
- }, () => [
71
- k(c, {
72
- depth: e.depth + 1,
73
- items: e.children,
74
- parent: e,
75
- identifier: e.identifier,
76
- expandable: n.expandable
77
- }, y({ _: 2 }, [
78
- s(n.$slots, (z, d) => ({
79
- name: d,
80
- fn: B((f) => [
81
- r(n.$slots, d, C(_(f)))
82
- ])
83
- }))
84
- ]), 1032, ["depth", "items", "parent", "identifier", "expandable"])
85
- ])
86
- ])
87
- ], 2)
88
- ], 2))), 128);
27
+ emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
28
+ setup(k, { emit: o }) {
29
+ const u = {
30
+ onBlur: (e) => o("blur", e),
31
+ onChange: (e) => o("change", e),
32
+ onClick: (e) => o("click", e),
33
+ onFocus: (e) => o("focus", e),
34
+ onInput: (e) => o("input", e),
35
+ onMousedown: (e) => o("mousedown", e),
36
+ onMouseup: (e) => o("mouseup", e),
37
+ "onUpdate:modelValue": (e) => o("update:modelValue", e)
89
38
  };
39
+ return (e, v) => (b(), c(V, {
40
+ class: "bb-text-input",
41
+ direction: e.direction,
42
+ errors: e.errors,
43
+ hasErrors: e.hasErrors,
44
+ hideLabel: e.hideLabel,
45
+ id: e.id,
46
+ inputPosition: e.inputPosition,
47
+ label: e.label,
48
+ labelPosition: e.labelPosition,
49
+ modelValue: e.modelValue,
50
+ name: e.name,
51
+ reverse: e.reverse
52
+ }, {
53
+ label: r((l) => [
54
+ n(e.$slots, "label", s(i(l)))
55
+ ]),
56
+ input: r(({ id: l, name: d, hasErrors: t }) => [
57
+ h(B, f({
58
+ autocomplete: e.autocomplete,
59
+ autofocus: e.autofocus,
60
+ disabled: e.disabled,
61
+ hasErrors: t,
62
+ id: l,
63
+ modelValue: e.modelValue,
64
+ name: d,
65
+ placeholder: e.placeholder,
66
+ readonly: e.readonly,
67
+ type: e.type
68
+ }, u), y({ _: 2 }, [
69
+ P(e.$slots, (L, a) => ({
70
+ name: a,
71
+ fn: r((p) => [
72
+ n(e.$slots, a, s(i(p)))
73
+ ])
74
+ }))
75
+ ]), 1040, ["autocomplete", "autofocus", "disabled", "hasErrors", "id", "modelValue", "name", "placeholder", "readonly", "type"])
76
+ ]),
77
+ _: 3
78
+ }, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "inputPosition", "label", "labelPosition", "modelValue", "name", "reverse"]));
90
79
  }
91
80
  });
92
81
  export {
93
- F as default
82
+ I as default
94
83
  };
95
84
  //# sourceMappingURL=index91.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index91.js","sources":["../src/components/BbTree/BbTree.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, resolveComponent as _resolveComponent, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-tree-row\" }\nconst _hoisted_2 = { class: \"bb-tree-main-content\" }\n\nimport { computed } from \"vue\";\n\nexport type TreeItem = {\n children?: TreeItem[];\n open?: boolean;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n [key: symbol | string]: any;\n};\n\nexport type BbTreeProps = {\n items: TreeItem[];\n parent?: TreeItem;\n identifier?: string | number;\n depth?: number;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTree',\n props: {\n items: { default: () => [] as TreeItem[] },\n parent: {},\n identifier: { default: \"id\" },\n depth: { default: 0 },\n expandable: { type: [Boolean, Function] }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst itemIsOpen = (item: TreeItem) => {\n /* If the item is not expandable it must be open */\n if(typeof item.open === 'undefined') return true;\n return item.open;\n};\n\nconst internalItems = computed(() => {\n return props.items.map((item: TreeItem) => {\n const open = itemIsOpen(item);\n return {\n children: item.children,\n depth: props.depth,\n expandable: item.expandable,\n identifier: item[props.identifier],\n open,\n original: item,\n parent: props.parent,\n };\n });\n});\n\nreturn (_ctx: any,_cache: any) => {\n const _component_BbTree = _resolveComponent(\"BbTree\", true)!\n\n return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(internalItems.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"bb-tree\", {\n [`bb-tree--depth-${item.depth}`]: true,\n 'bb-tree--open': item.open,\n }]),\n key: item.identifier\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.$slots[item.identifier])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 0,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n })\n : (_ctx.$slots[item.depth])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 1,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n })\n : _renderSlot(_ctx.$slots, \"default\", {\n key: 2,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass(`bb-tree--depth-${item.depth}-children`)\n }, [\n _renderSlot(_ctx.$slots, `${item.depth}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n }, () => [\n _renderSlot(_ctx.$slots, `${item.identifier}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n }, () => [\n _createVNode(_component_BbTree, {\n depth: item.depth + 1,\n items: item.children,\n parent: item,\n identifier: item.identifier,\n expandable: _ctx.expandable\n }, _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1032, [\"depth\", \"items\", \"parent\", \"identifier\", \"expandable\"])\n ])\n ])\n ], 2)\n ], 2))\n }), 128))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","itemIsOpen","item","internalItems","computed","open","_ctx","_cache","_component_BbTree","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createElementVNode","_renderSlot","_createVNode","_createSlots","_","name","_withCtx","data","_normalizeProps","_guardReactiveProps"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,iBACtBC,IAAa,EAAE,OAAO,0BAuBAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,SAAS,MAAM,GAAiB;AAAA,IACzC,QAAQ,CAAC;AAAA,IACT,YAAY,EAAE,SAAS,KAAK;AAAA,IAC5B,OAAO,EAAE,SAAS,EAAE;AAAA,IACpB,YAAY,EAAE,MAAM,CAAC,SAAS,QAAQ,EAAE;AAAA,EAC1C;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAa,CAACC,MAEf,OAAOA,EAAK,OAAS,MAAoB,KACrCA,EAAK,MAGRC,IAAgBC,EAAS,MACtBJ,EAAM,MAAM,IAAI,CAACE,MAAmB;AACnC,YAAAG,IAAOJ,EAAWC,CAAI;AACrB,aAAA;AAAA,QACL,UAAUA,EAAK;AAAA,QACf,OAAOF,EAAM;AAAA,QACb,YAAYE,EAAK;AAAA,QACjB,YAAYA,EAAKF,EAAM,UAAU;AAAA,QACjC,MAAAK;AAAA,QACA,UAAUH;AAAA,QACV,QAAQF,EAAM;AAAA,MAAA;AAAA,IAChB,CACD,CACF;AAEM,WAAA,CAACM,GAAUC,MAAgB;AAC1B,YAAAC,IAAoBC,EAAkB,UAAU,EAAI;AAElD,aAAAC,EAAW,EAAI,GAAGC,EAAoBC,GAAW,MAAMC,EAAYV,EAAc,OAAO,CAACD,OACvFQ,EAAA,GAAcC,EAAoB,OAAO;AAAA,QAC/C,OAAOG,EAAgB,CAAC,WAAW;A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cACb,OAAOA,EAAK;AAAA,cACZ,YAAYA,EAAK;AAAA,YAAA,GAChB,MAAM;AAAA,cACPe,EAAaT,GAAmB;AAAA,gBAC9B,OAAON,EAAK,QAAQ;AAAA,gBACpB,OAAOA,EAAK;AAAA,gBACZ,QAAQA;AAAA,gBACR,YAAYA,EAAK;AAAA,gBACjB,YAAYI,EAAK;AAAA,cAChB,GAAAY,EAAa,EAAE,GAAG,KAAK;AAAA,gBACxBL,EAAYP,EAAK,QAAQ,CAACa,GAAGC,OACpB;AAAA,kBACL,MAAAA;AAAA,kBACA,IAAIC,EAAS,CAACC,MAAS;AAAA,oBACrBN,EAAYV,EAAK,QAAQc,GAAMG,EAAgBC,EAAoBF,CAAI,CAAC,CAAC;AAAA,kBAAA,CAC1E;AAAA,gBAAA,EAEJ;AAAA,cAAA,CACF,GAAG,MAAM,CAAC,SAAS,SAAS,UAAU,cAAc,YAAY,CAAC;AAAA,YAAA,CACnE;AAAA,UAAA,CACF;AAAA,WACA,CAAC;AAAA,SACH,CAAC,EACL,GAAG,GAAG;AAAA,IAAA;AAAA,EAET;AAEA,CAAC;"}
1
+ {"version":3,"file":"index91.js","sources":["../src/components/BbTextInput/BbTextInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseTextInput from \"../BaseTextInput/BaseTextInput.vue\";\nimport type { BaseTextInputEvents } from \"../BaseTextInput/BaseTextInput.vue\";\n\nexport interface BbTextInputProps {\n autocomplete?: string;\n autofocus?: boolean;\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n disabled?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n label: string;\n labelPosition?: \"left\" | \"center\" | \"right\";\n modelValue?: any;\n name?: string;\n placeholder?: string;\n readonly?: boolean;\n reverse?: boolean;\n type?: \"text\" | \"number\" | \"date\" | \"datetime-local\" | \"email\" | \"password\";\n}\n\nexport type BbTextInputEvents = BaseTextInputEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTextInput',\n props: {\n autocomplete: {},\n autofocus: { type: Boolean },\n direction: {},\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n label: {},\n labelPosition: {},\n modelValue: {},\n name: {},\n placeholder: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean },\n type: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: string | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-text-input\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseTextInput, _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n type: _ctx.type\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"autocomplete\", \"autofocus\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"placeholder\", \"readonly\", \"type\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseTextInput","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA6BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,CAAC;AAAA,IAChB,OAAO,CAAC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C,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC7E;AAAA,MACD,OAAOD,EAAS,CAAC,EAAE,IAAAK,GAAI,MAAAC,GAAM,WAAAC,QAAgB;AAAA,QAC3CC,EAAaC,GAAeC,EAAY;AAAA,UACtC,cAAcf,EAAK;AAAA,UACnB,WAAWA,EAAK;AAAA,UAChB,UAAUA,EAAK;AAAA,UACf,WAAAY;AAAA,UACA,IAAAF;AAAA,UACA,YAAYV,EAAK;AAAA,UACjB,MAAAW;AAAA,UACA,aAAaX,EAAK;AAAA,UAClB,UAAUA,EAAK;AAAA,UACf,MAAMA,EAAK;AAAA,WACVH,CAAc,GAAGmB,EAAa,EAAE,GAAG,KAAK;AAAA,UACzCC,EAAYjB,EAAK,QAAQ,CAACkB,GAAGP,OACpB;AAAA,YACL,MAAMA;AAAAA,YACN,IAAIN,EAAS,CAACC,MAAS;AAAA,cACrBC,EAAYP,EAAK,QAAQW,GAAMH,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,YAAA,CAC1E;AAAA,UAAA,EAEJ;AAAA,QACF,CAAA,GAAG,MAAM,CAAC,gBAAgB,aAAa,YAAY,aAAa,MAAM,cAAc,QAAQ,eAAe,YAAY,MAAM,CAAC;AAAA,MAAA,CAChI;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,iBAAiB,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE3I;AAEA,CAAC;"}
package/dist/index93.js CHANGED
@@ -1,41 +1,120 @@
1
- import { defineComponent as n, openBlock as t, createElementBlock as o, createElementVNode as l, renderSlot as c, withModifiers as i, createCommentVNode as r } from "vue";
2
- const p = { class: "bb-chip" }, _ = { class: "bb-chip__content" }, b = ["aria-label", "onClick"], d = {
3
- xmlns: "http://www.w3.org/2000/svg",
1
+ import { defineComponent as D, ref as o, computed as z, openBlock as f, createElementBlock as F, mergeProps as O, createElementVNode as l, renderSlot as g, normalizeProps as P, guardReactiveProps as S, unref as b, createBlock as y, Teleport as N, normalizeClass as V, normalizeStyle as H, withCtx as R, createCommentVNode as U } from "vue";
2
+ import { useFloating as j } from "./index186.js";
3
+ import { nanoid as q } from "./index176.js";
4
+ import { wait as C } from "./index164.js";
5
+ import x from "./index2.js";
6
+ import "./index3.js";
7
+ import { autoUpdate as A } from "./index157.js";
8
+ import { flip as G, shift as I } from "./index166.js";
9
+ const J = /* @__PURE__ */ l("span", { class: "bb-tooltip__arrow" }, null, -1), K = { class: "bb-tooltip__bubble" }, Q = /* @__PURE__ */ l("svg", {
4
10
  viewBox: "0 0 24 24",
5
- role: "img",
6
- "aria-hidden": "true",
7
- class: "v-icon__svg",
8
- style: { "font-size": "18px", height: "18px", width: "18px" }
9
- }, h = /* @__PURE__ */ l("path", { d: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z" }, null, -1), L = [
10
- h
11
- ], f = /* @__PURE__ */ n({
12
- __name: "BbChip",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, [
14
+ /* @__PURE__ */ l("path", {
15
+ d: "M23 23L1 1M23 1L1 23",
16
+ stroke: "currentColor",
17
+ "stroke-width": "2",
18
+ "stroke-linecap": "round"
19
+ })
20
+ ], -1), ae = /* @__PURE__ */ D({
21
+ __name: "BbTooltip",
13
22
  props: {
14
- clearable: { type: Boolean },
15
- clearableLabel: { default: "Elimina" }
23
+ block: { type: Boolean },
24
+ disabled: { type: Boolean },
25
+ placement: { default: "top" },
26
+ theme: { default: "default" },
27
+ showClose: { type: Boolean, default: !0 },
28
+ transitionDuration: { default: 150 }
16
29
  },
17
- emits: ["click:clear"],
18
- setup(m, { emit: a }) {
19
- const s = (e) => {
20
- a("click:clear", e);
21
- };
22
- return (e, u) => (t(), o("span", p, [
23
- l("span", _, [
24
- c(e.$slots, "default")
25
- ]),
26
- e.clearable ? (t(), o("button", {
27
- key: 0,
28
- "aria-label": e.clearableLabel,
29
- class: "bb-chip__clear-button",
30
- onClick: i(s, ["stop", "prevent"]),
31
- type: "button"
30
+ setup(E) {
31
+ const t = E, m = `bb_${q()}`, i = o(), u = o(), { floatingStyles: B, placement: v } = j(i, u, {
32
+ placement: t.placement,
33
+ whileElementsMounted: A,
34
+ middleware: [G(), I({ padding: 10 })]
35
+ }), _ = o(!0), n = o(!1), a = o(!1), s = o(!1), c = o(!0), h = () => {
36
+ a.value || n.value || t.disabled || (M(), document.addEventListener("mouseover", w, { passive: !0 }), document.addEventListener("keydown", k, { passive: !0 }));
37
+ }, $ = h, w = (e) => {
38
+ const r = e.target;
39
+ if (r && r instanceof HTMLElement) {
40
+ let d = !0;
41
+ i.value && i.value.contains(r) && (d = !1), u.value && u.value.contains(r) && (d = !1), d && p();
42
+ }
43
+ }, k = (e) => {
44
+ a.value && e.key === "Escape" && p();
45
+ }, L = () => {
46
+ _.value = !1, p();
47
+ }, M = async () => {
48
+ _.value && (c.value = !1, s.value = !1, n.value = !0, await C(50), a.value = !0, n.value = !1);
49
+ }, p = async () => {
50
+ a.value = !1, n.value = !1, s.value = !0, await C(t.transitionDuration), s.value = !1, c.value = !0, document.removeEventListener("mouseover", w), document.removeEventListener("keydown", k);
51
+ }, T = z(() => ({
52
+ class: {
53
+ "bb-tooltip--block": t.block,
54
+ [`bb-tooltip--theme-${t.theme}`]: t.theme
55
+ }
56
+ }));
57
+ return (e, r) => (f(), F("span", O({ class: "bb-tooltip" }, T.value), [
58
+ l("span", {
59
+ class: "bb-tooltip__wrapper",
60
+ ref_key: "wrapper",
61
+ ref: i
32
62
  }, [
33
- (t(), o("svg", d, L))
34
- ], 8, b)) : r("", !0)
35
- ]));
63
+ g(e.$slots, "activator", P(S({
64
+ props: {
65
+ "aria-describedby": m,
66
+ onMouseenter: h,
67
+ onFocus: b($),
68
+ onBlur: p
69
+ },
70
+ closed: c.value,
71
+ closing: s.value,
72
+ disabled: e.disabled,
73
+ open: a.value,
74
+ opening: n.value,
75
+ placement: b(v)
76
+ })))
77
+ ], 512),
78
+ (f(), y(N, { to: "body" }, [
79
+ l("span", {
80
+ class: V(["bb-tooltip__bubble-container", {
81
+ [`bb-tooltip__bubble-container--${b(v)}`]: !0,
82
+ [`bb-tooltip__bubble-container--${e.theme}`]: e.theme,
83
+ "bb-tooltip__bubble-container--hidden": c.value,
84
+ "bb-tooltip__bubble-container--closing": s.value,
85
+ "bb-tooltip__bubble-container--opening": n.value,
86
+ "bb-tooltip__bubble-container--open": a.value
87
+ }]),
88
+ ref_key: "content",
89
+ ref: u,
90
+ style: H({
91
+ ...b(B),
92
+ transitionDuration: `${t.transitionDuration}ms`
93
+ }),
94
+ id: m
95
+ }, [
96
+ J,
97
+ l("span", K, [
98
+ e.showClose ? (f(), y(x, {
99
+ key: 0,
100
+ tabindex: "-1",
101
+ "aria-hidden": "true",
102
+ class: "bb-tooltip__close",
103
+ onClick: L
104
+ }, {
105
+ default: R(() => [
106
+ Q
107
+ ]),
108
+ _: 1
109
+ })) : U("", !0),
110
+ g(e.$slots, "default")
111
+ ])
112
+ ], 6)
113
+ ]))
114
+ ], 16));
36
115
  }
37
116
  });
38
117
  export {
39
- f as default
118
+ ae as default
40
119
  };
41
120
  //# sourceMappingURL=index93.js.map