bitboss-ui 2.0.5 → 2.0.8
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.
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +1 -3
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/index.js +89 -87
- package/dist/index.js.map +1 -1
- package/dist/index10.js +7 -39
- package/dist/index10.js.map +1 -1
- package/dist/index101.js +60 -87
- package/dist/index101.js.map +1 -1
- package/dist/index103.js +113 -258
- package/dist/index103.js.map +1 -1
- package/dist/index105.js +254 -388
- package/dist/index105.js.map +1 -1
- package/dist/index107.js +387 -98
- package/dist/index107.js.map +1 -1
- package/dist/index109.js +52 -48
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +74 -188
- package/dist/index11.js.map +1 -1
- package/dist/index111.js +35 -34
- package/dist/index111.js.map +1 -1
- package/dist/index113.js +105 -23
- package/dist/index113.js.map +1 -1
- package/dist/index115.js +23 -156
- package/dist/index115.js.map +1 -1
- package/dist/index117.js +153 -112
- package/dist/index117.js.map +1 -1
- package/dist/index119.js +115 -39
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +38 -80
- package/dist/index12.js.map +1 -1
- package/dist/index121.js +36 -40
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +34 -37
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +30 -21
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +47 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +35 -21
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +21 -312
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -24
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +312 -2
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +196 -0
- package/dist/index13.js.map +1 -0
- package/dist/index130.js +24 -5
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -9
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -6
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +9 -3
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +6 -3
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +1 -1
- package/dist/index136.js +1 -1
- package/dist/index137.js +1 -1
- package/dist/index138.js +1 -1
- package/dist/index139.js +1 -1
- package/dist/index14.js +73 -121
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index141.js +1 -1
- package/dist/index142.js +1 -1
- package/dist/index143.js +1 -1
- package/dist/index144.js +1 -1
- package/dist/index145.js +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.js +1 -1
- package/dist/index148.js +1 -1
- package/dist/index149.js +1 -1
- package/dist/index150.js +1 -1
- package/dist/index151.js +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.js +1 -1
- package/dist/index154.js +1 -1
- package/dist/index155.js +1 -1
- package/dist/index156.js +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.js +1 -1
- package/dist/index159.js +2 -2
- package/dist/index16.js +119 -118
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +6 -0
- package/dist/index160.js.map +1 -0
- package/dist/index161.js +1 -1
- package/dist/index163.js +2 -2
- package/dist/index165.js +1 -1
- package/dist/index166.js +1 -1
- package/dist/index167.js +1 -1
- package/dist/index168.js +1 -1
- package/dist/index169.js +2 -2
- package/dist/index170.js +6 -0
- package/dist/index170.js.map +1 -0
- package/dist/index171.js +3 -2
- package/dist/index171.js.map +1 -1
- package/dist/index173.js +2 -3
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index175.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +1 -1
- package/dist/index178.js +1 -1
- package/dist/index179.js +1 -1
- package/dist/index18.js +120 -208
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index181.js +1 -1
- package/dist/index182.js +1 -1
- package/dist/index183.js +2 -2
- package/dist/index184.js +6 -0
- package/dist/index184.js.map +1 -0
- package/dist/index185.js +1 -1
- package/dist/index187.js +1 -1
- package/dist/index189.js +1 -1
- package/dist/index190.js +1 -1
- package/dist/index191.js +1 -1
- package/dist/index192.js +1 -1
- package/dist/index193.js +1 -1
- package/dist/index194.js +1 -1
- package/dist/index195.js +1 -1
- package/dist/index196.js +1 -1
- package/dist/index197.js +3 -81
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +3 -3
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +81 -5
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +193 -275
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +2 -16
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +3 -16
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +124 -17
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +5 -19
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +119 -23
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +19 -3
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +16 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +16 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -249
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +5 -0
- package/dist/index209.js.map +1 -0
- package/dist/index210.js +35 -52
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +173 -36
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +6 -5
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +39 -36
- package/dist/index213.js.map +1 -1
- package/dist/index215.js +13 -4
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +5 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +369 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +6 -40
- package/dist/index218.js.map +1 -1
- package/dist/{index214.js → index219.js} +1 -1
- package/dist/{index214.js.map → index219.js.map} +1 -1
- package/dist/index22.js +287 -247
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +4 -13
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +2 -158
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -84
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -0
- package/dist/index223.js.map +1 -0
- package/dist/index224.js +19 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +26 -34
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +3 -6
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +249 -7
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +49 -123
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +44 -123
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +49 -174
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +158 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +83 -368
- package/dist/index233.js.map +1 -1
- package/dist/index235.js +2 -18
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +17 -105
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +109 -0
- package/dist/index237.js.map +1 -0
- package/dist/{index238.js → index239.js} +3 -3
- package/dist/{index238.js.map → index239.js.map} +1 -1
- package/dist/index24.js +249 -120
- package/dist/index24.js.map +1 -1
- package/dist/index241.js +2 -10
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +9 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +3 -224
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +9 -281
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +23 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +6 -2
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +16 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +224 -2
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +281 -2
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +6 -2
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -2
- package/dist/index252.js +2 -3
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +2 -2
- package/dist/index254.js +2 -2
- package/dist/index255.js +2 -2
- package/dist/index256.js +122 -24
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +429 -20
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +6 -0
- package/dist/index258.js.map +1 -0
- package/dist/index26.js +119 -142
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +6 -3
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +21 -8
- package/dist/index261.js.map +1 -1
- package/dist/index263.js +9 -3
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +439 -0
- package/dist/index264.js.map +1 -0
- package/dist/index265.js +127 -6
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +199 -15
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +4 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +89 -3
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +2 -12
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +2 -9
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +2 -9
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +2 -17
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +2 -431
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +2 -89
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +28 -2
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +17 -64
- package/dist/index276.js.map +1 -1
- package/dist/index278.js +3 -200
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +12 -2
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +138 -83
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +7 -124
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +7 -20
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +20 -0
- package/dist/index282.js.map +1 -0
- package/dist/index283.js +2 -436
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +68 -126
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +5 -3
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +1 -1
- package/dist/index287.js +3 -211
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +214 -0
- package/dist/index288.js.map +1 -0
- package/dist/index290.js +4 -7
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +4 -19
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +58 -6
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +35 -4
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -4
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -58
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +18 -34
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +2 -11
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +47 -2
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +10 -46
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +85 -115
- package/dist/index30.js.map +1 -1
- package/dist/index32.js +111 -112
- package/dist/index32.js.map +1 -1
- package/dist/index34.js +114 -365
- package/dist/index34.js.map +1 -1
- package/dist/index36.js +361 -283
- package/dist/index36.js.map +1 -1
- package/dist/index38.js +288 -106
- package/dist/index38.js.map +1 -1
- package/dist/index40.js +114 -121
- package/dist/index40.js.map +1 -1
- package/dist/index42.js +113 -200
- package/dist/index42.js.map +1 -1
- package/dist/index44.js +180 -90
- package/dist/index44.js.map +1 -1
- package/dist/index46.js +110 -78
- package/dist/index46.js.map +1 -1
- package/dist/index48.js +89 -54
- package/dist/index48.js.map +1 -1
- package/dist/index5.js +14 -78
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +54 -84
- package/dist/index50.js.map +1 -1
- package/dist/index52.js +86 -60
- package/dist/index52.js.map +1 -1
- package/dist/index54.js +59 -40
- package/dist/index54.js.map +1 -1
- package/dist/index56.js +42 -55
- package/dist/index56.js.map +1 -1
- package/dist/index58.js +53 -103
- package/dist/index58.js.map +1 -1
- package/dist/index6.js +36 -58
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +103 -89
- package/dist/index60.js.map +1 -1
- package/dist/index62.js +61 -88
- package/dist/index62.js.map +1 -1
- package/dist/index64.js +119 -77
- package/dist/index64.js.map +1 -1
- package/dist/index66.js +77 -91
- package/dist/index66.js.map +1 -1
- package/dist/index68.js +88 -49
- package/dist/index68.js.map +1 -1
- package/dist/index7.js +78 -20
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +51 -304
- package/dist/index70.js.map +1 -1
- package/dist/index72.js +299 -115
- package/dist/index72.js.map +1 -1
- package/dist/index74.js +120 -214
- package/dist/index74.js.map +1 -1
- package/dist/index76.js +213 -36
- package/dist/index76.js.map +1 -1
- package/dist/index78.js +47 -0
- package/dist/index78.js.map +1 -0
- package/dist/index79.js +119 -230
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +61 -7
- package/dist/index8.js.map +1 -1
- package/dist/index81.js +227 -154
- package/dist/index81.js.map +1 -1
- package/dist/index83.js +154 -207
- package/dist/index83.js.map +1 -1
- package/dist/index85.js +215 -26
- package/dist/index85.js.map +1 -1
- package/dist/index87.js +27 -88
- package/dist/index87.js.map +1 -1
- package/dist/index89.js +53 -88
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +17 -76
- package/dist/index9.js.map +1 -1
- package/dist/index91.js +75 -44
- package/dist/index91.js.map +1 -1
- package/dist/index93.js +89 -15
- package/dist/index93.js.map +1 -1
- package/dist/index95.js +15 -166
- package/dist/index95.js.map +1 -1
- package/dist/index97.js +120 -59
- package/dist/index97.js.map +1 -1
- package/dist/index99.js +66 -52
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index120.js +0 -47
- package/dist/index120.js.map +0 -1
- package/dist/index164.js +0 -6
- package/dist/index164.js.map +0 -1
- package/dist/index172.js +0 -6
- package/dist/index172.js.map +0 -1
- package/dist/index188.js +0 -6
- package/dist/index188.js.map +0 -1
- package/dist/index234.js +0 -6
- package/dist/index234.js.map +0 -1
- package/dist/index240.js +0 -5
- package/dist/index240.js.map +0 -1
- package/dist/index259.js +0 -10
- package/dist/index259.js.map +0 -1
- package/dist/index262.js +0 -26
- package/dist/index262.js.map +0 -1
- package/dist/index277.js +0 -8
- package/dist/index277.js.map +0 -1
- package/dist/index3.js +0 -17
- package/dist/index3.js.map +0 -1
- package/dist/index4.js +0 -43
- package/dist/index4.js.map +0 -1
- package/dist/index77.js +0 -130
- package/dist/index77.js.map +0 -1
package/dist/index85.js
CHANGED
|
@@ -1,34 +1,223 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defineComponent as W, ref as a, computed as _, openBlock as d, createElementBlock as g, mergeProps as D, createElementVNode as b, renderSlot as S, normalizeProps as I, guardReactiveProps as R, unref as y, createBlock as E, Teleport as U, normalizeClass as j, normalizeStyle as G, createCommentVNode as k, withCtx as J, nextTick as K, watch as Q } from "vue";
|
|
2
|
+
import { useFloating as X, arrow as Y } from "./index202.js";
|
|
3
|
+
import { useFocusTrap as Z } from "./index210.js";
|
|
4
|
+
import { useId as ee } from "./index9.js";
|
|
5
|
+
import { wait as M } from "./index128.js";
|
|
6
|
+
import te from "./index14.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { autoUpdate as oe, flip as ae, offset as re, shift as ne, hide as le } from "./index217.js";
|
|
9
|
+
const se = ["id"], ie = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "bb-popover__bubble"
|
|
12
|
+
}, ue = /* @__PURE__ */ b("span", { class: "bb-popover__close-label" }, "Chiudi", -1), ce = /* @__PURE__ */ b("svg", {
|
|
13
|
+
fill: "none",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
16
|
+
}, [
|
|
17
|
+
/* @__PURE__ */ b("path", {
|
|
18
|
+
d: "M23 23L1 1M23 1L1 23",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
"stroke-linecap": "round",
|
|
21
|
+
"stroke-width": "2"
|
|
22
|
+
})
|
|
23
|
+
], -1), _e = /* @__PURE__ */ W({
|
|
24
|
+
__name: "BbPopover",
|
|
6
25
|
props: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
26
|
+
arrowPadding: { default: 10 },
|
|
27
|
+
block: { type: Boolean },
|
|
28
|
+
disabled: { type: Boolean },
|
|
29
|
+
eager: { type: Boolean },
|
|
30
|
+
offset: { default: 3 },
|
|
31
|
+
padding: { default: 10 },
|
|
32
|
+
placement: { default: "bottom" },
|
|
33
|
+
showClose: { type: Boolean, default: !0 },
|
|
34
|
+
theme: { default: "default" },
|
|
35
|
+
transitionDuration: { default: 150 },
|
|
36
|
+
focusTarget: {},
|
|
37
|
+
width: {}
|
|
10
38
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
emits: ["shown", "hidden"],
|
|
40
|
+
setup(N, { emit: L }) {
|
|
41
|
+
const t = N, u = L, { id: H } = ee(), v = `bbp_${H.value}`, s = a(), c = a(), $ = a(), { activate: O, deactivate: C } = Z(c, {
|
|
42
|
+
/**
|
|
43
|
+
* This traps all clicks outside so we are pressing
|
|
44
|
+
* the trigger we just allow and process that in its
|
|
45
|
+
* own click handler.
|
|
46
|
+
* If we are pressing anything random on the page
|
|
47
|
+
* close the popover and be done
|
|
48
|
+
*/
|
|
49
|
+
clickOutsideDeactivates: (e) => {
|
|
50
|
+
var P;
|
|
51
|
+
const o = e.target;
|
|
52
|
+
return o instanceof HTMLElement && (P = s.value) != null && P.contains(o) || (p(), u("hidden")), !0;
|
|
53
|
+
},
|
|
54
|
+
escapeDeactivates: () => (K(async () => {
|
|
55
|
+
await p(), f(), u("hidden");
|
|
56
|
+
}), !0),
|
|
57
|
+
/* We don't return focus so that when
|
|
58
|
+
* we press a button on tyhe page we can focus
|
|
59
|
+
* THAT button and not the current trigger
|
|
60
|
+
*/
|
|
61
|
+
returnFocusOnDeactivate: !1
|
|
62
|
+
}), { floatingStyles: z, placement: m, middlewareData: w } = X(
|
|
63
|
+
s,
|
|
64
|
+
c,
|
|
65
|
+
{
|
|
66
|
+
placement: t.placement,
|
|
67
|
+
whileElementsMounted: oe,
|
|
68
|
+
middleware: [
|
|
69
|
+
ae(),
|
|
70
|
+
re(t.offset),
|
|
71
|
+
ne({ padding: t.padding }),
|
|
72
|
+
Y({
|
|
73
|
+
element: $,
|
|
74
|
+
padding: t.arrowPadding
|
|
75
|
+
}),
|
|
76
|
+
le()
|
|
77
|
+
]
|
|
78
|
+
}
|
|
18
79
|
);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
80
|
+
let T = () => {
|
|
81
|
+
};
|
|
82
|
+
const F = _(() => ({
|
|
83
|
+
class: {
|
|
84
|
+
"bb-popover--block": t.block,
|
|
85
|
+
[`bb-popover--${t.theme}`]: !0
|
|
86
|
+
}
|
|
87
|
+
})), r = a(!1), n = a(!1), l = a(!1), i = a(!0), q = _(() => {
|
|
88
|
+
if (w.value.arrow) {
|
|
89
|
+
const { x: e, y: o } = w.value.arrow;
|
|
90
|
+
return {
|
|
91
|
+
style: {
|
|
92
|
+
left: `${e}px`,
|
|
93
|
+
top: `${o}px`
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}), x = _(() => {
|
|
98
|
+
const e = {
|
|
99
|
+
...z.value,
|
|
100
|
+
transitionDuration: `${t.transitionDuration}ms`
|
|
101
|
+
};
|
|
102
|
+
if (t.width) {
|
|
103
|
+
let o;
|
|
104
|
+
if (typeof t.width == "string" && Number.isNaN(Number(t.width)))
|
|
105
|
+
if (t.width.includes("%")) {
|
|
106
|
+
if (!s.value) return;
|
|
107
|
+
o = `${s.value.clientWidth * (+t.width.replace("%", "") / 100)}px`;
|
|
108
|
+
} else
|
|
109
|
+
o = t.width;
|
|
110
|
+
else
|
|
111
|
+
o = `${t.width}px`;
|
|
112
|
+
e.width = o;
|
|
113
|
+
}
|
|
114
|
+
return e;
|
|
115
|
+
}), A = async () => {
|
|
116
|
+
i.value = !1, l.value = !1, r.value = !0, await M(50), n.value = !0, r.value = !1, T = Q(
|
|
117
|
+
() => {
|
|
118
|
+
var e;
|
|
119
|
+
return (e = w.value.hide) == null ? void 0 : e.referenceHidden;
|
|
120
|
+
},
|
|
121
|
+
async (e) => {
|
|
122
|
+
!l.value && !i.value && e && (await p(), C(), f());
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}, p = async () => {
|
|
126
|
+
n.value = !1, r.value = !1, l.value = !0, await M(t.transitionDuration), l.value = !1, i.value = !0, T();
|
|
127
|
+
}, h = a(!1), V = async () => {
|
|
128
|
+
if (n.value) {
|
|
129
|
+
await p(), f(), u("hidden");
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (r.value || t.disabled) return;
|
|
133
|
+
h.value = !0, await A();
|
|
134
|
+
let e = t.focusTarget ?? ".bb-popover__close";
|
|
135
|
+
O({
|
|
136
|
+
onPostActivate: () => {
|
|
137
|
+
if (c.value) {
|
|
138
|
+
const o = c.value.querySelector(e);
|
|
139
|
+
o instanceof HTMLElement && (o.focus(), u("shown"));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}, f = () => {
|
|
144
|
+
var o;
|
|
145
|
+
const e = (o = s.value) == null ? void 0 : o.querySelector(`[aria-controls=popover_${v}]`);
|
|
146
|
+
e instanceof HTMLElement && e.focus({ preventScroll: !0 });
|
|
147
|
+
}, B = async () => {
|
|
148
|
+
C(), await p(), f(), u("hidden");
|
|
149
|
+
};
|
|
150
|
+
return (e, o) => (d(), g("span", D({ class: "bb-popover" }, F.value), [
|
|
151
|
+
b("span", {
|
|
152
|
+
ref_key: "wrapper",
|
|
153
|
+
ref: s,
|
|
154
|
+
class: "bb-popover__wrapper"
|
|
155
|
+
}, [
|
|
156
|
+
S(e.$slots, "activator", I(R({
|
|
157
|
+
props: {
|
|
158
|
+
"aria-controls": `popover_${v}`,
|
|
159
|
+
"aria-expanded": n.value,
|
|
160
|
+
onClick: V,
|
|
161
|
+
id: v,
|
|
162
|
+
disabled: !!e.disabled
|
|
163
|
+
},
|
|
164
|
+
closed: i.value,
|
|
165
|
+
closing: l.value,
|
|
166
|
+
disabled: !!e.disabled,
|
|
167
|
+
open: n.value,
|
|
168
|
+
opening: r.value,
|
|
169
|
+
placement: y(m)
|
|
170
|
+
})))
|
|
171
|
+
], 512),
|
|
172
|
+
(d(), E(U, { to: "body" }, [
|
|
173
|
+
b("span", {
|
|
174
|
+
id: `popover_${v}`,
|
|
175
|
+
ref_key: "content",
|
|
176
|
+
ref: c,
|
|
177
|
+
class: j(["bb-popover__bubble-container", {
|
|
178
|
+
[`bb-popover__bubble-container--${y(m)}`]: !0,
|
|
179
|
+
[`bb-popover__bubble-container--${e.theme}`]: e.theme,
|
|
180
|
+
"bb-popover__bubble-container--hidden": i.value,
|
|
181
|
+
"bb-popover__bubble-container--closing": l.value,
|
|
182
|
+
"bb-popover__bubble-container--opening": r.value,
|
|
183
|
+
"bb-popover__bubble-container--open": n.value
|
|
184
|
+
}]),
|
|
185
|
+
style: G(x.value)
|
|
186
|
+
}, [
|
|
187
|
+
h.value || e.eager ? (d(), g("span", D({
|
|
188
|
+
key: 0,
|
|
189
|
+
ref_key: "bubblearrow",
|
|
190
|
+
ref: $,
|
|
191
|
+
class: "bb-popover__arrow"
|
|
192
|
+
}, q.value), null, 16)) : k("", !0),
|
|
193
|
+
h.value || e.eager ? (d(), g("span", ie, [
|
|
194
|
+
e.showClose ? (d(), E(te, {
|
|
195
|
+
key: 0,
|
|
196
|
+
class: "bb-popover__close",
|
|
197
|
+
onClick: B
|
|
198
|
+
}, {
|
|
199
|
+
default: J(() => [
|
|
200
|
+
ue,
|
|
201
|
+
ce
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
})) : k("", !0),
|
|
205
|
+
S(e.$slots, "default", {
|
|
206
|
+
close: B,
|
|
207
|
+
closed: i.value,
|
|
208
|
+
closing: l.value,
|
|
209
|
+
disabled: !!e.disabled,
|
|
210
|
+
open: n.value,
|
|
211
|
+
opening: r.value,
|
|
212
|
+
placement: y(m)
|
|
213
|
+
})
|
|
214
|
+
])) : k("", !0)
|
|
215
|
+
], 14, se)
|
|
216
|
+
]))
|
|
217
|
+
], 16));
|
|
29
218
|
}
|
|
30
219
|
});
|
|
31
220
|
export {
|
|
32
|
-
|
|
221
|
+
_e as default
|
|
33
222
|
};
|
|
34
223
|
//# sourceMappingURL=index85.js.map
|
package/dist/index85.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index85.js","sources":["../src/components/BbProgress/BbProgress.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-progress\"\n\t\t:class=\"{\n\t\t\t'bb-progress--horizontal': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-progress-bar\" :style=\"{ width: width + '%' }\"></div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\nconst props = withDefaults(defineProps<BbProgressProps>(), {\n\tmodelValue: 0,\n\tmin: 0,\n\tmax: 100,\n});\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbProgress';\n</style>\n"],"names":["props","__props","width","computed","clamp","getAsPercentageBetween"],"mappings":";;;;;;;;;;;AAkCA,UAAMA,IAAQC,GAMRC,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBL,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index85.js","sources":["../src/components/BbPopover/BbPopover.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-popover\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-popover__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport to=\"body\">\n\t\t\t<span\n\t\t\t\t:id=\"`popover_${id}`\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-popover__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-popover__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-popover__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-popover__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-popover__bubble-container--closing': closing,\n\t\t\t\t\t'bb-popover__bubble-container--opening': opening,\n\t\t\t\t\t'bb-popover__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"containerStyle\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-popover__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span v-if=\"hasOpenedOnce || eager\" class=\"bb-popover__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\tclass=\"bb-popover__close\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"bb-popover__close-label\">Chiudi</span>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:close=\"onClickClose\"\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\toffset,\n\tarrow,\n\thide,\n} from '@floating-ui/vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\n\nexport type BbPopoverProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPopoverProps>(), {\n\tarrowPadding: 10,\n\toffset: 3,\n\tpadding: 10,\n\tplacement: 'bottom',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n};\n\nconst emit = defineEmits<BbPopoverEvents>();\n\ndefineSlots<{\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-controls': string;\n\t\t\t'aria-expanded': boolean;\n\t\t\tonClick: typeof onTriggerClick;\n\t\t\tid: string;\n\t\t\tdisabled: boolean;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: {\n\t\tclose: typeof onClickClose;\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n}>();\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t\thide(),\n\t\t],\n\t}\n);\n\nlet stopWatcher = () => {};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--${props.theme}`]: true,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n\treturn undefined;\n});\n\nconst containerStyle = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t};\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}px`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}px`;\n\t\t}\n\t\tbase.width = width;\n\t}\n\treturn base;\n});\n\nconst openPopover = async () => {\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n\tstopWatcher = watch(\n\t\t() => middlewareData.value.hide?.referenceHidden,\n\t\tasync (value) => {\n\t\t\tif (!closing.value && !closed.value && value) {\n\t\t\t\tawait closePopover();\n\t\t\t\tdeactivate();\n\t\t\t\tfocusTrigger();\n\t\t\t}\n\t\t}\n\t);\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n\tstopWatcher();\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus({ preventScroll: true });\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPopover';\n</style>\n"],"names":["props","__props","emit","__emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","hide","stopWatcher","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","watch","value","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose"],"mappings":"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"}
|
package/dist/index87.js
CHANGED
|
@@ -1,95 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const R = /* @__PURE__ */ f({
|
|
7
|
-
__name: "BbRadio",
|
|
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 "./index200.js";
|
|
3
|
+
import { getAsPercentageBetween as i } from "./index127.js";
|
|
4
|
+
const _ = /* @__PURE__ */ r({
|
|
5
|
+
__name: "BbProgress",
|
|
8
6
|
props: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
direction: { default: "auto" },
|
|
13
|
-
disabled: { type: Boolean },
|
|
14
|
-
errors: {},
|
|
15
|
-
hasErrors: { type: Boolean },
|
|
16
|
-
hideLabel: { type: Boolean },
|
|
17
|
-
hint: {},
|
|
18
|
-
id: {},
|
|
19
|
-
inputPosition: {},
|
|
20
|
-
label: {},
|
|
21
|
-
labelPosition: {},
|
|
22
|
-
modelValue: {},
|
|
23
|
-
name: {},
|
|
24
|
-
persistentHint: { type: Boolean },
|
|
25
|
-
readonly: {},
|
|
26
|
-
required: { type: Boolean },
|
|
27
|
-
reverse: { type: Boolean, default: !0 },
|
|
28
|
-
value: {}
|
|
7
|
+
modelValue: { default: 0 },
|
|
8
|
+
min: { default: 0 },
|
|
9
|
+
max: { default: 100 }
|
|
29
10
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
id: e.id,
|
|
49
|
-
class: "bb-radio",
|
|
50
|
-
direction: e.direction,
|
|
51
|
-
errors: e.errors,
|
|
52
|
-
"has-errors": e.hasErrors,
|
|
53
|
-
"hide-label": e.hideLabel,
|
|
54
|
-
hint: e.hint,
|
|
55
|
-
"input-position": e.inputPosition,
|
|
56
|
-
label: e.label,
|
|
57
|
-
"label-position": e.labelPosition,
|
|
58
|
-
"label-tag": "span",
|
|
59
|
-
name: e.name,
|
|
60
|
-
reverse: e.reverse,
|
|
61
|
-
"show-hint": u.value,
|
|
62
|
-
tag: "label"
|
|
63
|
-
}, {
|
|
64
|
-
label: l((a) => [
|
|
65
|
-
i(e.$slots, "label", B(g(a)))
|
|
66
|
-
]),
|
|
67
|
-
input: l(({ id: a, name: m, hasErrors: c, ariaDescribedby: b }) => [
|
|
68
|
-
P(q, n({
|
|
69
|
-
id: a,
|
|
70
|
-
"aria-describedby": b,
|
|
71
|
-
autofocus: e.autofocus,
|
|
72
|
-
checked: e.checked,
|
|
73
|
-
color: e.color,
|
|
74
|
-
disabled: e.disabled,
|
|
75
|
-
"has-errors": c,
|
|
76
|
-
"model-value": e.modelValue,
|
|
77
|
-
name: m,
|
|
78
|
-
readonly: e.readonly,
|
|
79
|
-
required: e.required,
|
|
80
|
-
value: e.value
|
|
81
|
-
}, p), {
|
|
82
|
-
icon: l((h) => [
|
|
83
|
-
i(e.$slots, "icon", n(h, { text: e.label }))
|
|
84
|
-
]),
|
|
85
|
-
_: 2
|
|
86
|
-
}, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "model-value", "name", "readonly", "required", "value"])
|
|
87
|
-
]),
|
|
88
|
-
_: 3
|
|
89
|
-
}, 8, ["id", "direction", "errors", "has-errors", "hide-label", "hint", "input-position", "label", "label-position", "name", "reverse", "show-hint"]));
|
|
11
|
+
setup(t) {
|
|
12
|
+
const e = t, o = a(
|
|
13
|
+
() => p(
|
|
14
|
+
i(e.modelValue || e.min, e.min, e.max),
|
|
15
|
+
0,
|
|
16
|
+
100
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
return (d, u) => (l(), s("div", {
|
|
20
|
+
class: m(["bb-progress", {
|
|
21
|
+
"bb-progress--horizontal": !0
|
|
22
|
+
}])
|
|
23
|
+
}, [
|
|
24
|
+
n("div", {
|
|
25
|
+
class: "bb-progress-bar",
|
|
26
|
+
style: c({ width: o.value + "%" })
|
|
27
|
+
}, null, 4)
|
|
28
|
+
]));
|
|
90
29
|
}
|
|
91
30
|
});
|
|
92
31
|
export {
|
|
93
|
-
|
|
32
|
+
_ as default
|
|
94
33
|
};
|
|
95
34
|
//# sourceMappingURL=index87.js.map
|
package/dist/index87.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index87.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index87.js","sources":["../src/components/BbProgress/BbProgress.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-progress\"\n\t\t:class=\"{\n\t\t\t'bb-progress--horizontal': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-progress-bar\" :style=\"{ width: width + '%' }\"></div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\nconst props = withDefaults(defineProps<BbProgressProps>(), {\n\tmodelValue: 0,\n\tmin: 0,\n\tmax: 100,\n});\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbProgress';\n</style>\n"],"names":["props","__props","width","computed","clamp","getAsPercentageBetween"],"mappings":";;;;;;;;;;;AAkCA,UAAMA,IAAQC,GAMRC,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBL,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;;;;;;;;;;;;;"}
|
package/dist/index89.js
CHANGED
|
@@ -1,130 +1,95 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import V from "./
|
|
1
|
+
import { defineComponent as f, ref as v, computed as y, openBlock as k, createBlock as w, withCtx as l, renderSlot as i, normalizeProps as B, guardReactiveProps as g, createVNode as P, mergeProps as n } from "vue";
|
|
2
|
+
import V from "./index26.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
4
|
+
import q from "./index30.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
__name: "
|
|
6
|
+
const R = /* @__PURE__ */ f({
|
|
7
|
+
__name: "BbRadio",
|
|
8
8
|
props: {
|
|
9
9
|
autofocus: {},
|
|
10
|
+
checked: {},
|
|
10
11
|
color: {},
|
|
11
|
-
|
|
12
|
-
depsDebounceTime: {},
|
|
12
|
+
direction: { default: "auto" },
|
|
13
13
|
disabled: { type: Boolean },
|
|
14
|
-
enforceCoherence: { type: Boolean },
|
|
15
14
|
errors: {},
|
|
16
15
|
hasErrors: { type: Boolean },
|
|
17
16
|
hideLabel: { type: Boolean },
|
|
18
|
-
hideLegend: { type: Boolean },
|
|
19
17
|
hint: {},
|
|
20
18
|
id: {},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
itemValue: {},
|
|
25
|
-
legend: {},
|
|
26
|
-
loadingText: {},
|
|
19
|
+
inputPosition: {},
|
|
20
|
+
label: {},
|
|
21
|
+
labelPosition: {},
|
|
27
22
|
modelValue: {},
|
|
28
|
-
modelValueDebounceTime: {},
|
|
29
23
|
name: {},
|
|
30
|
-
noDataText: {},
|
|
31
24
|
persistentHint: { type: Boolean },
|
|
32
25
|
readonly: {},
|
|
33
26
|
required: { type: Boolean },
|
|
34
|
-
reverse: { type: Boolean }
|
|
27
|
+
reverse: { type: Boolean, default: !0 },
|
|
28
|
+
value: {}
|
|
35
29
|
},
|
|
36
|
-
emits: ["blur", "change", "click", "focus", "
|
|
37
|
-
setup(
|
|
38
|
-
const
|
|
39
|
-
onBlur: (e) =>
|
|
40
|
-
|
|
41
|
-
onClick: (e) => n("click", e),
|
|
42
|
-
onFocus: (e) => {
|
|
43
|
-
d.value = !0, n("focus", e);
|
|
30
|
+
emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
|
31
|
+
setup(s, { emit: t }) {
|
|
32
|
+
const d = s, o = t, r = v(!1), u = y(() => d.persistentHint || r.value), p = {
|
|
33
|
+
onBlur: (e) => {
|
|
34
|
+
r.value = !1, o("blur", e);
|
|
44
35
|
},
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
onChange: (e) => o("change", e),
|
|
37
|
+
onClick: (e) => o("click", e),
|
|
38
|
+
onFocus: (e) => {
|
|
39
|
+
r.value = !0, o("focus", e);
|
|
47
40
|
},
|
|
48
|
-
onInput: (e) =>
|
|
49
|
-
onKeydown: (e) =>
|
|
50
|
-
onMousedown: (e) =>
|
|
51
|
-
onMouseup: (e) =>
|
|
52
|
-
"onUpdate:modelValue": (e) =>
|
|
41
|
+
onInput: (e) => o("input", e),
|
|
42
|
+
onKeydown: (e) => o("keydown", e),
|
|
43
|
+
onMousedown: (e) => o("mousedown", e),
|
|
44
|
+
onMouseup: (e) => o("mouseup", e),
|
|
45
|
+
"onUpdate:modelValue": (e) => o("update:modelValue", e)
|
|
53
46
|
};
|
|
54
|
-
return (e,
|
|
47
|
+
return (e, C) => (k(), w(V, {
|
|
55
48
|
id: e.id,
|
|
56
|
-
class: "bb-radio
|
|
57
|
-
direction:
|
|
49
|
+
class: "bb-radio",
|
|
50
|
+
direction: e.direction,
|
|
58
51
|
errors: e.errors,
|
|
59
52
|
"has-errors": e.hasErrors,
|
|
60
|
-
"hide-label": e.
|
|
53
|
+
"hide-label": e.hideLabel,
|
|
61
54
|
hint: e.hint,
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
"input-position": e.inputPosition,
|
|
56
|
+
label: e.label,
|
|
57
|
+
"label-position": e.labelPosition,
|
|
58
|
+
"label-tag": "span",
|
|
64
59
|
name: e.name,
|
|
65
60
|
reverse: e.reverse,
|
|
66
|
-
"show-hint":
|
|
67
|
-
tag: "
|
|
61
|
+
"show-hint": u.value,
|
|
62
|
+
tag: "label"
|
|
68
63
|
}, {
|
|
69
|
-
label:
|
|
70
|
-
i(e.$slots, "
|
|
64
|
+
label: l((a) => [
|
|
65
|
+
i(e.$slots, "label", B(g(a)))
|
|
71
66
|
]),
|
|
72
|
-
input:
|
|
73
|
-
|
|
74
|
-
id:
|
|
75
|
-
"aria-describedby":
|
|
67
|
+
input: l(({ id: a, name: m, hasErrors: c, ariaDescribedby: b }) => [
|
|
68
|
+
P(q, n({
|
|
69
|
+
id: a,
|
|
70
|
+
"aria-describedby": b,
|
|
76
71
|
autofocus: e.autofocus,
|
|
72
|
+
checked: e.checked,
|
|
77
73
|
color: e.color,
|
|
78
|
-
dependencies: e.dependencies,
|
|
79
|
-
"deps-debounce-time": e.depsDebounceTime,
|
|
80
|
-
direction: e.inputDirection,
|
|
81
74
|
disabled: e.disabled,
|
|
82
|
-
"
|
|
83
|
-
"has-errors": h,
|
|
84
|
-
"hide-label": e.hideLabel,
|
|
85
|
-
"item-text": e.itemText,
|
|
86
|
-
"item-value": e.itemValue,
|
|
87
|
-
items: e.items,
|
|
88
|
-
"loading-text": e.loadingText,
|
|
75
|
+
"has-errors": c,
|
|
89
76
|
"model-value": e.modelValue,
|
|
90
|
-
|
|
91
|
-
name: b,
|
|
92
|
-
"no-data-text": e.noDataText,
|
|
77
|
+
name: m,
|
|
93
78
|
readonly: e.readonly,
|
|
94
|
-
required: e.required
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
loading: a((o) => [
|
|
100
|
-
i(e.$slots, "loading", r(l(o)))
|
|
101
|
-
]),
|
|
102
|
-
"no-data": a((o) => [
|
|
103
|
-
i(e.$slots, "no-data", r(l(o)))
|
|
104
|
-
]),
|
|
105
|
-
"option:prepend": a((o) => [
|
|
106
|
-
i(e.$slots, "option:prepend", r(l(o)))
|
|
107
|
-
]),
|
|
108
|
-
icon: a((o) => [
|
|
109
|
-
i(e.$slots, "icon", r(l(o)))
|
|
110
|
-
]),
|
|
111
|
-
label: a((o) => [
|
|
112
|
-
i(e.$slots, "label", r(l(o)))
|
|
113
|
-
]),
|
|
114
|
-
"option:append": a((o) => [
|
|
115
|
-
i(e.$slots, "option:append", r(l(o)))
|
|
116
|
-
]),
|
|
117
|
-
append: a((o) => [
|
|
118
|
-
i(e.$slots, "append", r(l(o)))
|
|
79
|
+
required: e.required,
|
|
80
|
+
value: e.value
|
|
81
|
+
}, p), {
|
|
82
|
+
icon: l((h) => [
|
|
83
|
+
i(e.$slots, "icon", n(h, { text: e.label }))
|
|
119
84
|
]),
|
|
120
85
|
_: 2
|
|
121
|
-
}, 1040, ["id", "aria-describedby", "autofocus", "
|
|
86
|
+
}, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "model-value", "name", "readonly", "required", "value"])
|
|
122
87
|
]),
|
|
123
88
|
_: 3
|
|
124
|
-
}, 8, ["id", "errors", "has-errors", "hide-label", "hint", "label", "name", "reverse", "show-hint"]));
|
|
89
|
+
}, 8, ["id", "direction", "errors", "has-errors", "hide-label", "hint", "input-position", "label", "label-position", "name", "reverse", "show-hint"]));
|
|
125
90
|
}
|
|
126
91
|
});
|
|
127
92
|
export {
|
|
128
|
-
|
|
93
|
+
R as default
|
|
129
94
|
};
|
|
130
95
|
//# sourceMappingURL=index89.js.map
|