bitboss-ui 2.0.7 → 2.0.9
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/index.js +139 -138
- package/dist/index.js.map +1 -1
- package/dist/index10.js +7 -78
- package/dist/index10.js.map +1 -1
- package/dist/{index100.js → index101.js} +3 -3
- package/dist/{index100.js.map → index101.js.map} +1 -1
- package/dist/{index102.js → index103.js} +3 -3
- package/dist/{index102.js.map → index103.js.map} +1 -1
- package/dist/{index104.js → index105.js} +8 -8
- package/dist/{index104.js.map → index105.js.map} +1 -1
- package/dist/{index106.js → index107.js} +9 -9
- package/dist/{index106.js.map → index107.js.map} +1 -1
- package/dist/{index108.js → index109.js} +3 -3
- package/dist/{index108.js.map → index109.js.map} +1 -1
- package/dist/index11.js +74 -35
- package/dist/index11.js.map +1 -1
- package/dist/{index110.js → index111.js} +3 -3
- package/dist/{index110.js.map → index111.js.map} +1 -1
- package/dist/{index112.js → index113.js} +3 -3
- package/dist/{index112.js.map → index113.js.map} +1 -1
- package/dist/{index114.js → index115.js} +3 -3
- package/dist/{index114.js.map → index115.js.map} +1 -1
- package/dist/{index116.js → index117.js} +8 -8
- package/dist/{index116.js.map → index117.js.map} +1 -1
- package/dist/{index118.js → index119.js} +2 -2
- package/dist/{index118.js.map → index119.js.map} +1 -1
- package/dist/index12.js +36 -189
- package/dist/index12.js.map +1 -1
- package/dist/index121.js +34 -38
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +38 -38
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +39 -42
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +43 -31
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +35 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -21
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +21 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -312
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +309 -21
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +189 -78
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +24 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -5
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -9
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +8 -5
- 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 +85 -0
- package/dist/index14.js.map +1 -0
- 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 +1 -1
- package/dist/{index15.js → index16.js} +4 -4
- package/dist/{index15.js.map → index16.js.map} +1 -1
- package/dist/index160.js +2 -2
- package/dist/{index162.js → index161.js} +1 -1
- package/dist/index161.js.map +1 -0
- package/dist/index163.js +6 -0
- package/dist/index163.js.map +1 -0
- 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 +1 -1
- package/dist/index170.js +2 -2
- package/dist/index171.js +6 -0
- package/dist/index171.js.map +1 -0
- 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/{index17.js → index18.js} +4 -4
- package/dist/{index17.js.map → 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 +1 -1
- package/dist/index184.js +1 -1
- package/dist/{index186.js → index185.js} +1 -1
- package/dist/index185.js.map +1 -0
- package/dist/index187.js +6 -0
- package/dist/index187.js.map +1 -0
- 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 +1 -1
- package/dist/index198.js +3 -81
- package/dist/index198.js.map +1 -1
- package/dist/{index19.js → index20.js} +19 -18
- package/dist/{index19.js.map → index20.js.map} +1 -1
- package/dist/index200.js +126 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +5 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +123 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +19 -8
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +14 -124
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +16 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +2 -123
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -19
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +35 -16
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +172 -14
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +6 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +44 -2
- package/dist/index211.js.map +1 -1
- package/dist/index213.js +12 -173
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +369 -43
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +161 -0
- package/dist/index216.js.map +1 -0
- package/dist/index217.js +84 -13
- package/dist/index217.js.map +1 -1
- package/dist/index219.js +67 -355
- package/dist/index219.js.map +1 -1
- package/dist/{index21.js → index22.js} +21 -21
- package/dist/{index21.js.map → index22.js.map} +1 -1
- package/dist/index220.js +8 -19
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +3 -27
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +4 -249
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +2 -52
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +3 -44
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +7 -5
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +19 -49
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +27 -3
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +3 -3
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +249 -7
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +50 -156
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +38 -78
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +8 -0
- package/dist/index233.js.map +1 -0
- package/dist/index234.js +49 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -18
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -106
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +21 -0
- package/dist/index237.js.map +1 -0
- package/dist/index238.js +53 -47
- package/dist/index238.js.map +1 -1
- package/dist/{index23.js → index24.js} +8 -8
- package/dist/{index23.js.map → index24.js.map} +1 -1
- package/dist/index240.js +100 -2
- package/dist/index240.js.map +1 -1
- package/dist/index242.js +9 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +2 -3
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +3 -6
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +12 -16
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +8 -8
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +9 -23
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +17 -9
- package/dist/index248.js.map +1 -1
- package/dist/index257.js +1 -1
- package/dist/index258.js +1 -1
- package/dist/{index25.js → index26.js} +6 -6
- package/dist/{index25.js.map → index26.js.map} +1 -1
- package/dist/index263.js +224 -2
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +4 -2
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +9 -2
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -1
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +16 -2
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +9 -2
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +23 -28
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +199 -21
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +439 -0
- package/dist/index271.js.map +1 -0
- package/dist/index272.js +121 -218
- package/dist/index272.js.map +1 -1
- package/dist/index274.js +5 -200
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +2 -436
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +2 -127
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +2 -5
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +2 -2
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +2 -9
- package/dist/index279.js.map +1 -1
- package/dist/{index27.js → index28.js} +3 -3
- package/dist/{index27.js.map → index28.js.map} +1 -1
- package/dist/index280.js +2 -69
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +28 -3
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +22 -12
- package/dist/index282.js.map +1 -1
- package/dist/index284.js +2 -17
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +68 -2
- package/dist/index285.js.map +1 -1
- package/dist/index287.js +3 -211
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +211 -15
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +15 -4
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +11 -4
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +34 -58
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +4 -35
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -7
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +57 -17
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +2 -7
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +7 -2
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +6 -10
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +17 -45
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +50 -0
- package/dist/index299.js.map +1 -0
- package/dist/{index29.js → index30.js} +3 -3
- package/dist/{index29.js.map → index30.js.map} +1 -1
- package/dist/index301.js +416 -42
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +50 -0
- package/dist/index302.js.map +1 -0
- package/dist/{index31.js → index32.js} +4 -4
- package/dist/{index31.js.map → index32.js.map} +1 -1
- package/dist/{index33.js → index34.js} +5 -5
- package/dist/{index33.js.map → index34.js.map} +1 -1
- package/dist/{index35.js → index36.js} +23 -22
- package/dist/{index35.js.map → index36.js.map} +1 -1
- package/dist/{index37.js → index38.js} +7 -7
- package/dist/{index37.js.map → index38.js.map} +1 -1
- package/dist/{index39.js → index40.js} +3 -3
- package/dist/{index39.js.map → index40.js.map} +1 -1
- package/dist/{index41.js → index42.js} +4 -4
- package/dist/{index41.js.map → index42.js.map} +1 -1
- package/dist/{index43.js → index44.js} +12 -11
- package/dist/{index43.js.map → index44.js.map} +1 -1
- package/dist/{index45.js → index46.js} +4 -4
- package/dist/{index45.js.map → index46.js.map} +1 -1
- package/dist/{index47.js → index48.js} +3 -3
- package/dist/{index47.js.map → index48.js.map} +1 -1
- package/dist/index5.js +14 -40
- package/dist/index5.js.map +1 -1
- package/dist/{index49.js → index50.js} +4 -4
- package/dist/{index49.js.map → index50.js.map} +1 -1
- package/dist/{index51.js → index52.js} +3 -3
- package/dist/{index51.js.map → index52.js.map} +1 -1
- package/dist/{index53.js → index54.js} +3 -3
- package/dist/{index53.js.map → index54.js.map} +1 -1
- package/dist/{index55.js → index56.js} +3 -3
- package/dist/{index55.js.map → index56.js.map} +1 -1
- package/dist/{index57.js → index58.js} +2 -2
- package/dist/{index57.js.map → index58.js.map} +1 -1
- package/dist/index6.js +38 -76
- package/dist/index6.js.map +1 -1
- package/dist/{index59.js → index60.js} +14 -13
- package/dist/{index59.js.map → index60.js.map} +1 -1
- package/dist/{index61.js → index62.js} +3 -3
- package/dist/{index61.js.map → index62.js.map} +1 -1
- package/dist/{index63.js → index64.js} +3 -3
- package/dist/{index63.js.map → index64.js.map} +1 -1
- package/dist/{index65.js → index66.js} +5 -5
- package/dist/{index65.js.map → index66.js.map} +1 -1
- package/dist/{index67.js → index68.js} +3 -3
- package/dist/{index67.js.map → index68.js.map} +1 -1
- package/dist/index7.js +78 -62
- package/dist/index7.js.map +1 -1
- package/dist/{index69.js → index70.js} +2 -2
- package/dist/{index69.js.map → index70.js.map} +1 -1
- package/dist/{index71.js → index72.js} +9 -9
- package/dist/{index71.js.map → index72.js.map} +1 -1
- package/dist/{index73.js → index74.js} +3 -3
- package/dist/{index73.js.map → index74.js.map} +1 -1
- package/dist/{index75.js → index76.js} +5 -5
- package/dist/{index75.js.map → index76.js.map} +1 -1
- package/dist/index78.js +37 -120
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +130 -0
- package/dist/index79.js.map +1 -0
- package/dist/index8.js +60 -18
- package/dist/index8.js.map +1 -1
- package/dist/{index80.js → index81.js} +5 -5
- package/dist/{index80.js.map → index81.js.map} +1 -1
- package/dist/{index82.js → index83.js} +25 -24
- package/dist/{index82.js.map → index83.js.map} +1 -1
- package/dist/{index84.js → index85.js} +7 -7
- package/dist/{index84.js.map → index85.js.map} +1 -1
- package/dist/{index86.js → index87.js} +2 -2
- package/dist/{index86.js.map → index87.js.map} +1 -1
- package/dist/{index88.js → index89.js} +3 -3
- package/dist/{index88.js.map → index89.js.map} +1 -1
- package/dist/index9.js +19 -7
- package/dist/index9.js.map +1 -1
- package/dist/{index90.js → index91.js} +3 -3
- package/dist/{index90.js.map → index91.js.map} +1 -1
- package/dist/{index92.js → index93.js} +3 -3
- package/dist/{index92.js.map → index93.js.map} +1 -1
- package/dist/{index94.js → index95.js} +1 -1
- package/dist/index95.js.map +1 -0
- package/dist/{index96.js → index97.js} +3 -3
- package/dist/{index96.js.map → index97.js.map} +1 -1
- package/dist/{index98.js → index99.js} +3 -3
- package/dist/{index98.js.map → index99.js.map} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index120.js +0 -43
- package/dist/index120.js.map +0 -1
- package/dist/index162.js.map +0 -1
- package/dist/index164.js +0 -6
- package/dist/index164.js.map +0 -1
- package/dist/index172.js +0 -5
- package/dist/index172.js.map +0 -1
- package/dist/index186.js.map +0 -1
- package/dist/index188.js +0 -6
- package/dist/index188.js.map +0 -1
- package/dist/index212.js +0 -38
- package/dist/index212.js.map +0 -1
- package/dist/index218.js +0 -8
- package/dist/index218.js.map +0 -1
- package/dist/index241.js +0 -13
- package/dist/index241.js.map +0 -1
- package/dist/index283.js +0 -12
- package/dist/index283.js.map +0 -1
- package/dist/index300.js +0 -424
- package/dist/index300.js.map +0 -1
- package/dist/index4.js +0 -17
- package/dist/index4.js.map +0 -1
- package/dist/index77.js +0 -47
- package/dist/index77.js.map +0 -1
- package/dist/index94.js.map +0 -1
package/dist/index122.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__name: "BbIcon",
|
|
1
|
+
import { defineComponent as d, ref as s, watch as m, computed as b, openBlock as r, createBlock as u, resolveDynamicComponent as i, normalizeProps as f, guardReactiveProps as v, withCtx as c, normalizeStyle as y, renderSlot as g, createCommentVNode as V } from "vue";
|
|
2
|
+
const C = /* @__PURE__ */ d({
|
|
3
|
+
__name: "BbCollapsible",
|
|
5
4
|
props: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type:
|
|
5
|
+
eager: { type: Boolean },
|
|
6
|
+
transitionDuration: { default: 250 },
|
|
7
|
+
modelValue: { type: Boolean },
|
|
8
|
+
tag: { default: "div" }
|
|
9
9
|
},
|
|
10
10
|
setup(p) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const u = {
|
|
16
|
-
xs: 12,
|
|
17
|
-
sm: 16,
|
|
18
|
-
md: 24,
|
|
19
|
-
lg: 28,
|
|
20
|
-
xl: 36,
|
|
21
|
-
xxl: 40
|
|
22
|
-
}, f = l(() => {
|
|
23
|
-
const s = {
|
|
24
|
-
"bb-icon": !0
|
|
25
|
-
};
|
|
26
|
-
let c = { width: l(() => {
|
|
27
|
-
let o;
|
|
28
|
-
return typeof e.size == "string" ? o = u[e.size] ?? parseInt(e.size, 10) : typeof e.size == "number" ? o = e.size : o = 24, o + "px";
|
|
29
|
-
}).value };
|
|
30
|
-
return e.color && (z(e.color) ? c.color = e.color : s[`bb-icon--${e.color}`] = !0), {
|
|
31
|
-
class: s,
|
|
32
|
-
style: c
|
|
33
|
-
};
|
|
34
|
-
}), n = y(null);
|
|
35
|
-
return _(async () => {
|
|
36
|
-
if (t) {
|
|
37
|
-
if (typeof t[e.type] > "u")
|
|
38
|
-
throw new Error(`Icon "${e.type}" does not exist.`);
|
|
39
|
-
n.value = await t[e.type]();
|
|
11
|
+
const l = p, t = s(l.modelValue), a = s(t.value), o = m(
|
|
12
|
+
() => l.modelValue,
|
|
13
|
+
(e) => {
|
|
14
|
+
e && (a.value = !0, o());
|
|
40
15
|
}
|
|
41
|
-
|
|
16
|
+
);
|
|
17
|
+
t.value && o();
|
|
18
|
+
const n = b(() => ({
|
|
19
|
+
class: {
|
|
20
|
+
"bb-collapsible": !0,
|
|
21
|
+
"bb-collapsible--open": l.modelValue,
|
|
22
|
+
"bb-collapsible--closed": !l.modelValue
|
|
23
|
+
},
|
|
24
|
+
style: {
|
|
25
|
+
transitionDuration: l.transitionDuration + "ms"
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
return (e, _) => (r(), u(i(e.tag), f(v(n.value)), {
|
|
29
|
+
default: c(() => [
|
|
30
|
+
(r(), u(i(e.tag), {
|
|
31
|
+
class: "bb-collapsible__content",
|
|
32
|
+
style: y(n.value.style)
|
|
33
|
+
}, {
|
|
34
|
+
default: c(() => [
|
|
35
|
+
e.eager || a.value ? g(e.$slots, "default", { key: 0 }) : V("", !0)
|
|
36
|
+
]),
|
|
37
|
+
_: 3
|
|
38
|
+
}, 8, ["style"]))
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 16));
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
C as default
|
|
46
46
|
};
|
|
47
47
|
//# sourceMappingURL=index122.js.map
|
package/dist/index122.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index122.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index122.js","sources":["../src/components/BbCollapsible/BbCollapsible.vue"],"sourcesContent":["<template>\n\t<component v-bind=\"collapsibleAttributes\" :is=\"tag\">\n\t\t<component\n\t\t\t:is=\"tag\"\n\t\t\tclass=\"bb-collapsible__content\"\n\t\t\t:style=\"collapsibleAttributes.style\"\n\t\t>\n\t\t\t<slot v-if=\"eager || hasRenderedOnce\"></slot>\n\t\t</component>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbCollapsibleProps = Pick<\n\tCommonProps,\n\t'eager' | 'transitionDuration'\n> & {\n\t/**\n\t * Used by v-model to trigger opening / closing the collapsible\n\t */\n\tmodelValue: boolean;\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n};\n\nconst props = withDefaults(defineProps<BbCollapsibleProps>(), {\n\ttransitionDuration: 250,\n\ttag: 'div',\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst visible = ref(props.modelValue);\nconst hasRenderedOnce = ref(visible.value);\n\n/**\n * If the component is lazy render content on first time modelValue is true\n */\nconst cleanup = watch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\thasRenderedOnce.value = true;\n\t\t\tcleanup();\n\t\t}\n\t}\n);\nif (visible.value) cleanup();\n\nconst collapsibleAttributes = computed(() => {\n\treturn {\n\t\tclass: {\n\t\t\t'bb-collapsible': true,\n\t\t\t'bb-collapsible--open': props.modelValue,\n\t\t\t'bb-collapsible--closed': !props.modelValue,\n\t\t},\n\t\tstyle: {\n\t\t\ttransitionDuration: props.transitionDuration + 'ms',\n\t\t},\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbCollapsible';\n</style>\n"],"names":["props","__props","visible","ref","hasRenderedOnce","cleanup","watch","value","collapsibleAttributes","computed"],"mappings":";;;;;;;;;;AA+BA,UAAMA,IAAQC,GASRC,IAAUC,EAAIH,EAAM,UAAU,GAC9BI,IAAkBD,EAAID,EAAQ,KAAK,GAKnCG,IAAUC;AAAA,MACf,MAAMN,EAAM;AAAA,MACZ,CAACO,MAAU;AACV,QAAIA,MACHH,EAAgB,QAAQ,IAChBC;MAEV;AAAA,IAAA;AAEG,IAAAH,EAAQ,SAAeG;AAErB,UAAAG,IAAwBC,EAAS,OAC/B;AAAA,MACN,OAAO;AAAA,QACN,kBAAkB;AAAA,QAClB,wBAAwBT,EAAM;AAAA,QAC9B,0BAA0B,CAACA,EAAM;AAAA,MAClC;AAAA,MACA,OAAO;AAAA,QACN,oBAAoBA,EAAM,qBAAqB;AAAA,MAChD;AAAA,IAAA,EAED;;;;;;;;;;;;;;;;;"}
|
package/dist/index123.js
CHANGED
|
@@ -1,50 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
__name: "
|
|
1
|
+
import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
|
|
2
|
+
import { isCssColor as z } from "./index222.js";
|
|
3
|
+
const g = ["innerHTML"], $ = /* @__PURE__ */ m({
|
|
4
|
+
__name: "BbIcon",
|
|
5
5
|
props: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
tag: { default: "div" },
|
|
10
|
-
transitionDuration: { default: 200 }
|
|
6
|
+
size: { default: "md" },
|
|
7
|
+
color: {},
|
|
8
|
+
type: {}
|
|
11
9
|
},
|
|
12
|
-
setup(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
setup(p) {
|
|
11
|
+
var i, r;
|
|
12
|
+
const e = p;
|
|
13
|
+
let t;
|
|
14
|
+
!!((r = (i = d()) == null ? void 0 : i.proxy) != null && r.$nuxt) ? process.client && (t = useNuxtApp().$icons) : t = x("icons");
|
|
15
|
+
const u = {
|
|
16
|
+
xs: 12,
|
|
17
|
+
sm: 16,
|
|
18
|
+
md: 24,
|
|
19
|
+
lg: 28,
|
|
20
|
+
xl: 36,
|
|
21
|
+
xxl: 40
|
|
22
|
+
}, f = l(() => {
|
|
23
|
+
const s = {
|
|
24
|
+
"bb-icon": !0
|
|
25
|
+
};
|
|
26
|
+
let c = { width: l(() => {
|
|
27
|
+
let o;
|
|
28
|
+
return typeof e.size == "string" ? o = u[e.size] ?? parseInt(e.size, 10) : typeof e.size == "number" ? o = e.size : o = 24, o + "px";
|
|
29
|
+
}).value };
|
|
30
|
+
return e.color && (z(e.color) ? c.color = e.color : s[`bb-icon--${e.color}`] = !0), {
|
|
31
|
+
class: s,
|
|
32
|
+
style: c
|
|
33
|
+
};
|
|
34
|
+
}), n = y(null);
|
|
35
|
+
return _(async () => {
|
|
36
|
+
if (t) {
|
|
37
|
+
if (typeof t[e.type] > "u")
|
|
38
|
+
throw new Error(`Icon "${e.type}" does not exist.`);
|
|
39
|
+
n.value = await t[e.type]();
|
|
23
40
|
}
|
|
24
|
-
},
|
|
25
|
-
return (o, y) => (i(), l(u(o.tag), {
|
|
26
|
-
ref_key: "container",
|
|
27
|
-
ref: s,
|
|
28
|
-
class: "bb-smooth-height",
|
|
29
|
-
style: m({ "transition-duration": n.transitionDuration / 1e3 + "s" })
|
|
30
|
-
}, {
|
|
31
|
-
default: f(() => [
|
|
32
|
-
(i(), l(u(o.tag), {
|
|
33
|
-
ref_key: "content",
|
|
34
|
-
ref: e,
|
|
35
|
-
class: "content"
|
|
36
|
-
}, {
|
|
37
|
-
default: f(() => [
|
|
38
|
-
d(o.$slots, "default")
|
|
39
|
-
]),
|
|
40
|
-
_: 3
|
|
41
|
-
}, 512))
|
|
42
|
-
]),
|
|
43
|
-
_: 3
|
|
44
|
-
}, 8, ["style"]));
|
|
41
|
+
}), (s, a) => (b(), h("i", w(f.value, { innerHTML: n.value }), null, 16, g));
|
|
45
42
|
}
|
|
46
43
|
});
|
|
47
44
|
export {
|
|
48
|
-
|
|
45
|
+
$ as default
|
|
49
46
|
};
|
|
50
47
|
//# sourceMappingURL=index123.js.map
|
package/dist/index123.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index123.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index123.js","sources":["../src/components/BbIcon/BbIcon.vue"],"sourcesContent":["<template>\n\t<i v-bind=\"iconAttributes\" v-html=\"icon\"></i>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, inject, ref, watchEffect } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Size as S } from '@/types/CommonProps';\n\nexport type Size = {\n\txs: number;\n\tsm: number;\n\tmd: number;\n\tlg: number;\n\txl: number;\n\txxl: number;\n};\n\nexport type BbIconProps = S<Size> & {\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\t/**\n\t * Name of the icon to use\n\t */\n\ttype: string;\n};\nconst props = withDefaults(defineProps<BbIconProps>(), {\n\tsize: 'md',\n});\nlet icons: Record<string, () => Promise<string>> | undefined;\n// @ts-expect-error possibily undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nif (isNuxt) {\n\t// @ts-expect-error possibily undef\n\tif (process.client) {\n\t\t// @ts-expect-error possibily undef\n\t\ticons = useNuxtApp()[`$icons`] as typeof icons; // eslint-disable-line no-undef\n\t}\n} else {\n\ticons = inject('icons');\n}\n\nconst sizeMap: Size = {\n\txs: 12,\n\tsm: 16,\n\tmd: 24,\n\tlg: 28,\n\txl: 36,\n\txxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n\tconst classes: any = {\n\t\t'bb-icon': true,\n\t};\n\tconst width = computed(() => {\n\t\tlet dimension: number;\n\t\tif (typeof props.size === 'string') {\n\t\t\tdimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n\t\t} else if (typeof props.size === 'number') {\n\t\t\tdimension = props.size;\n\t\t} else {\n\t\t\tdimension = 24;\n\t\t}\n\t\treturn dimension + `px`;\n\t});\n\tlet style: { [key: string]: any } = { width: width.value };\n\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.color = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-icon--${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\nconst icon = ref<string | null>(null);\n\nwatchEffect(async () => {\n\tif (icons) {\n\t\tif (typeof icons[props.type] === 'undefined')\n\t\t\tthrow new Error(`Icon \"${props.type}\" does not exist.`);\n\t\ticon.value = await icons[props.type]();\n\t}\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbIcon';\n</style>\n"],"names":["props","__props","icons","_b","_a","getCurrentInstance","inject","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","icon","ref","watchEffect"],"mappings":";;;;;;;;;;;AA8BA,UAAMA,IAAQC;AAGV,QAAAC;AAIJ,IAFe,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,SAIzC,QAAQ,WAEHD,IAAA,WAAA,EAAa,UAGtBA,IAAQI,EAAO,OAAO;AAGvB,UAAMC,IAAgB;AAAA,MACrB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGAC,IAAiBC,EAAS,MAAM;AACrC,YAAMC,IAAe;AAAA,QACpB,WAAW;AAAA,MAAA;AAaZ,UAAIC,IAAgC,EAAE,OAXxBF,EAAS,MAAM;AACxB,YAAAG;AACA,eAAA,OAAOZ,EAAM,QAAS,WACzBY,IAAYL,EAAQP,EAAM,IAAkB,KAAK,SAASA,EAAM,MAAM,EAAE,IAC9D,OAAOA,EAAM,QAAS,WAChCY,IAAYZ,EAAM,OAENY,IAAA,IAENA,IAAY;AAAA,MAAA,CACnB,EACkD,MAAM;AAEzD,aAAIZ,EAAM,UACLa,EAAWb,EAAM,KAAK,IACzBW,EAAM,QAAQX,EAAM,QAEpBU,EAAQ,YAAYV,EAAM,KAAK,EAAE,IAAI,KAGhC;AAAA,QACN,OAAOU;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACD,CACA,GAEKG,IAAOC,EAAmB,IAAI;AAEpC,WAAAC,EAAY,YAAY;AACvB,UAAId,GAAO;AACV,YAAI,OAAOA,EAAMF,EAAM,IAAI,IAAM;AAChC,gBAAM,IAAI,MAAM,SAASA,EAAM,IAAI,mBAAmB;AACvD,QAAAc,EAAK,QAAQ,MAAMZ,EAAMF,EAAM,IAAI,EAAE;AAAA,MACtC;AAAA,IAAA,CACA;;;"}
|
package/dist/index124.js
CHANGED
|
@@ -1,38 +1,50 @@
|
|
|
1
|
-
import { defineComponent as p,
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
], g = /* @__PURE__ */ p({
|
|
6
|
-
__name: "BbSpinner",
|
|
1
|
+
import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
|
|
2
|
+
import { throttle as g } from "./index225.js";
|
|
3
|
+
const O = /* @__PURE__ */ v({
|
|
4
|
+
__name: "BbSmoothHeight",
|
|
7
5
|
props: {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
mutationOptions: { default: () => ({ childList: !0 }) },
|
|
7
|
+
resizeOptions: {},
|
|
8
|
+
strategy: { default: "resize" },
|
|
9
|
+
tag: { default: "div" },
|
|
10
|
+
transitionDuration: { default: 200 }
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const c =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
setup(c) {
|
|
13
|
+
const n = c, s = r(null), e = r(null), t = r(null);
|
|
14
|
+
globalThis.ResizeObserver && (p(() => {
|
|
15
|
+
n.strategy === "resize" ? e.value && (t.value = new ResizeObserver(a), t.value.observe(e.value, n.resizeOptions)) : n.strategy === "mutation" && e.value && (t.value = new MutationObserver(a), t.value.observe(e.value, n.mutationOptions)), a();
|
|
16
|
+
}), h(() => {
|
|
17
|
+
t.value && t.value.disconnect();
|
|
18
|
+
}));
|
|
19
|
+
const a = g(() => {
|
|
20
|
+
if (s.value && e.value) {
|
|
21
|
+
const o = e.value.scrollHeight;
|
|
22
|
+
s.value.style.height = "0px", s.value.style.height = `${o}px`;
|
|
23
|
+
}
|
|
24
|
+
}, 200);
|
|
25
|
+
return (o, y) => (i(), l(u(o.tag), {
|
|
26
|
+
ref_key: "container",
|
|
27
|
+
ref: s,
|
|
28
|
+
class: "bb-smooth-height",
|
|
29
|
+
style: m({ "transition-duration": n.transitionDuration / 1e3 + "s" })
|
|
30
|
+
}, {
|
|
31
|
+
default: f(() => [
|
|
32
|
+
(i(), l(u(o.tag), {
|
|
33
|
+
ref_key: "content",
|
|
34
|
+
ref: e,
|
|
35
|
+
class: "content"
|
|
36
|
+
}, {
|
|
37
|
+
default: f(() => [
|
|
38
|
+
d(o.$slots, "default")
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 512))
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 8, ["style"]));
|
|
33
45
|
}
|
|
34
46
|
});
|
|
35
47
|
export {
|
|
36
|
-
|
|
48
|
+
O as default
|
|
37
49
|
};
|
|
38
50
|
//# sourceMappingURL=index124.js.map
|
package/dist/index124.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index124.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index124.js","sources":["../src/components/BbSmoothHeight/BbSmoothHeight.vue"],"sourcesContent":["<template>\n\t<component\n\t\t:is=\"tag\"\n\t\tref=\"container\"\n\t\tclass=\"bb-smooth-height\"\n\t\t:style=\"{ 'transition-duration': props.transitionDuration / 1000 + 's' }\"\n\t>\n\t\t<component :is=\"tag\" ref=\"content\" class=\"content\">\n\t\t\t<slot />\n\t\t</component>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CommonProps, NonVoidElementTag } from '@/types/CommonProps';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { ref, onMounted, onBeforeUnmount } from 'vue';\n\nexport type BbSmoothHeightProps = {\n\t/**\n\t * Options to pass to the MutationObserver\n\t */\n\tmutationOptions?: MutationObserverInit; // eslint-disable-line no-undef\n\t/**\n\t * Options to pass to the ResizeObserver\n\t */\n\tresizeOptions?: ResizeObserverOptions; // eslint-disable-line no-undef\n\t/**\n\t * Define which strategy to use. By default is used 'resize' which means the\n\t * component will update on resizing.\n\t * You can also define 'mutation' to use a MutationObserver\n\t */\n\tstrategy?: 'resize' | 'mutation';\n} & NonVoidElementTag &\n\tPick<CommonProps, 'transitionDuration'>;\n\nconst props = withDefaults(defineProps<BbSmoothHeightProps>(), {\n\ttransitionDuration: 200,\n\tstrategy: 'resize',\n\tmutationOptions: () => ({ childList: true }),\n\ttag: 'div',\n});\n\nexport type BbSmoothHeightSlots = {\n\tdefault?: (props: object) => any;\n};\n\ndefineSlots<BbSmoothHeightSlots>();\n\nconst container = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst observer = ref<ResizeObserver | MutationObserver | null>(null);\n\nif (globalThis.ResizeObserver) {\n\tonMounted(() => {\n\t\tif (props.strategy === 'resize') {\n\t\t\tif (content.value) {\n\t\t\t\tobserver.value = new ResizeObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(content.value, props.resizeOptions);\n\t\t\t}\n\t\t} else if (props.strategy === 'mutation') {\n\t\t\tif (content.value) {\n\t\t\t\tobserver.value = new MutationObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(content.value, props.mutationOptions);\n\t\t\t}\n\t\t}\n\t\tonContentGrow();\n\t});\n\tonBeforeUnmount(() => {\n\t\tif (observer.value) {\n\t\t\tobserver.value.disconnect();\n\t\t}\n\t});\n}\n\n/**\n * This is called when content changes.\n * It could be called numerous times so throttle every 200ms\n */\nconst onContentGrow = throttle(() => {\n\tif (container.value && content.value) {\n\t\tconst contentHeight = content.value.scrollHeight;\n\t\tcontainer.value.style.height = '0px';\n\t\tcontainer.value.style.height = `${contentHeight}px`;\n\t}\n}, 200);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbSmoothHeight';\n</style>\n"],"names":["props","__props","container","ref","content","observer","onMounted","onContentGrow","onBeforeUnmount","throttle","contentHeight"],"mappings":";;;;;;;;;;;;AAoCA,UAAMA,IAAQC,GAaRC,IAAYC,EAAwB,IAAI,GACxCC,IAAUD,EAAwB,IAAI,GACtCE,IAAWF,EAA8C,IAAI;AAEnE,IAAI,WAAW,mBACdG,EAAU,MAAM;AACX,MAAAN,EAAM,aAAa,WAClBI,EAAQ,UACFC,EAAA,QAAQ,IAAI,eAAeE,CAAa,GACjDF,EAAS,MAAM,QAAQD,EAAQ,OAAOJ,EAAM,aAAa,KAEhDA,EAAM,aAAa,cACzBI,EAAQ,UACFC,EAAA,QAAQ,IAAI,iBAAiBE,CAAa,GACnDF,EAAS,MAAM,QAAQD,EAAQ,OAAOJ,EAAM,eAAe,IAG/CO;IAAA,CACd,GACDC,EAAgB,MAAM;AACrB,MAAIH,EAAS,SACZA,EAAS,MAAM;IAChB,CACA;AAOI,UAAAE,IAAgBE,EAAS,MAAM;AAChC,UAAAP,EAAU,SAASE,EAAQ,OAAO;AAC/B,cAAAM,IAAgBN,EAAQ,MAAM;AAC1B,QAAAF,EAAA,MAAM,MAAM,SAAS,OAC/BA,EAAU,MAAM,MAAM,SAAS,GAAGQ,CAAa;AAAA,MAChD;AAAA,OACE,GAAG;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index125.js
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as p, computed as l, openBlock as _, createElementBlock as a, normalizeProps as b, guardReactiveProps as x, createStaticVNode as m } from "vue";
|
|
2
|
+
import { isCssColor as d } from "./index222.js";
|
|
3
|
+
const u = /* @__PURE__ */ m('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle class="bb-spinner__circle" cx="12" cy="3" r="0"></circle><circle class="bb-spinner__circle circle--1" cx="16.50" cy="4.21" r="0"></circle><circle class="bb-spinner__circle circle--2" cx="7.50" cy="4.21" r="0"></circle><circle class="bb-spinner__circle circle--3" cx="19.79" cy="7.50" r="0"></circle><circle class="bb-spinner__circle circle--4" cx="4.21" cy="7.50" r="0"></circle><circle class="bb-spinner__circle circle--5" cx="21.00" cy="12.00" r="0"></circle><circle class="bb-spinner__circle circle--6" cx="3.00" cy="12.00" r="0"></circle><circle class="bb-spinner__circle circle--7" cx="19.79" cy="16.50" r="0"></circle><circle class="bb-spinner__circle circle--8" cx="4.21" cy="16.50" r="0"></circle><circle class="bb-spinner__circle circle--9" cx="16.50" cy="19.79" r="0"></circle><circle class="bb-spinner__circle circle--10" cx="7.50" cy="19.79" r="0"></circle><circle class="bb-spinner__circle circle--11" cx="12" cy="21" r="0"></circle></svg>', 1), y = [
|
|
4
|
+
u
|
|
5
|
+
], g = /* @__PURE__ */ p({
|
|
6
|
+
__name: "BbSpinner",
|
|
7
|
+
props: {
|
|
8
|
+
color: {},
|
|
9
|
+
size: { default: "md" }
|
|
10
|
+
},
|
|
11
|
+
setup(s) {
|
|
12
|
+
const c = s, n = {
|
|
13
|
+
xs: 12,
|
|
14
|
+
sm: 16,
|
|
15
|
+
md: 24,
|
|
16
|
+
lg: 28,
|
|
17
|
+
xl: 36,
|
|
18
|
+
xxl: 40
|
|
19
|
+
}, o = l(() => {
|
|
20
|
+
const e = {
|
|
21
|
+
"bb-spinner": !0
|
|
22
|
+
};
|
|
23
|
+
let i = { width: l(() => {
|
|
24
|
+
let r;
|
|
25
|
+
return typeof c.size == "string" ? r = n[c.size] ?? parseInt(c.size, 10) : r = c.size, r + "px";
|
|
26
|
+
}).value };
|
|
27
|
+
return c.color && (d(c.color) ? i.color = c.color : e[`bb-spinner--${c.color}`] = !0), {
|
|
28
|
+
class: e,
|
|
29
|
+
style: i
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return (e, t) => (_(), a("span", b(x(o.value)), y, 16));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
2
35
|
export {
|
|
3
|
-
|
|
36
|
+
g as default
|
|
4
37
|
};
|
|
5
38
|
//# sourceMappingURL=index125.js.map
|
package/dist/index125.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index125.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index125.js","sources":["../src/components/BbSpinner/BbSpinner.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"iconAttributes\">\n\t\t<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<circle class=\"bb-spinner__circle\" cx=\"12\" cy=\"3\" r=\"0\" />\n\t\t\t<circle class=\"bb-spinner__circle circle--1\" cx=\"16.50\" cy=\"4.21\" r=\"0\" />\n\t\t\t<circle class=\"bb-spinner__circle circle--2\" cx=\"7.50\" cy=\"4.21\" r=\"0\" />\n\t\t\t<circle class=\"bb-spinner__circle circle--3\" cx=\"19.79\" cy=\"7.50\" r=\"0\" />\n\t\t\t<circle class=\"bb-spinner__circle circle--4\" cx=\"4.21\" cy=\"7.50\" r=\"0\" />\n\t\t\t<circle\n\t\t\t\tclass=\"bb-spinner__circle circle--5\"\n\t\t\t\tcx=\"21.00\"\n\t\t\t\tcy=\"12.00\"\n\t\t\t\tr=\"0\"\n\t\t\t/>\n\t\t\t<circle class=\"bb-spinner__circle circle--6\" cx=\"3.00\" cy=\"12.00\" r=\"0\" />\n\t\t\t<circle\n\t\t\t\tclass=\"bb-spinner__circle circle--7\"\n\t\t\t\tcx=\"19.79\"\n\t\t\t\tcy=\"16.50\"\n\t\t\t\tr=\"0\"\n\t\t\t/>\n\t\t\t<circle class=\"bb-spinner__circle circle--8\" cx=\"4.21\" cy=\"16.50\" r=\"0\" />\n\t\t\t<circle\n\t\t\t\tclass=\"bb-spinner__circle circle--9\"\n\t\t\t\tcx=\"16.50\"\n\t\t\t\tcy=\"19.79\"\n\t\t\t\tr=\"0\"\n\t\t\t/>\n\t\t\t<circle\n\t\t\t\tclass=\"bb-spinner__circle circle--10\"\n\t\t\t\tcx=\"7.50\"\n\t\t\t\tcy=\"19.79\"\n\t\t\t\tr=\"0\"\n\t\t\t/>\n\t\t\t<circle class=\"bb-spinner__circle circle--11\" cx=\"12\" cy=\"21\" r=\"0\" />\n\t\t</svg>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Classes } from '@/types/Classes';\nimport type { CommonProps, Size as S } from '@/types/CommonProps';\nimport type { Size as IconSize } from '../BbIcon/BbIcon.vue';\n\nexport type Size = IconSize;\nexport type BbSpinnerProps = Pick<CommonProps, 'color'> & S<IconSize>;\n\nconst props = withDefaults(defineProps<BbSpinnerProps>(), {\n\tsize: 'md',\n});\n\nconst sizeMap: IconSize = {\n\txs: 12,\n\tsm: 16,\n\tmd: 24,\n\tlg: 28,\n\txl: 36,\n\txxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n\tconst classes: Classes = {\n\t\t'bb-spinner': true,\n\t};\n\tconst width = computed(() => {\n\t\tlet dimension: number;\n\t\tif (typeof props.size === 'string') {\n\t\t\tdimension =\n\t\t\t\tsizeMap[props.size as keyof IconSize] ?? parseInt(props.size, 10);\n\t\t} else {\n\t\t\tdimension = props.size;\n\t\t}\n\t\treturn dimension + `px`;\n\t});\n\tlet style: { [key: string]: any } = { width: width.value };\n\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.color = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-spinner--${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbSpinner';\n</style>\n"],"names":["props","__props","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor"],"mappings":";;;;;;;;;;;AAiDA,UAAMA,IAAQC,GAIRC,IAAoB;AAAA,MACzB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGAC,IAAiBC,EAAS,MAAM;AACrC,YAAMC,IAAmB;AAAA,QACxB,cAAc;AAAA,MAAA;AAYf,UAAIC,IAAgC,EAAE,OAVxBF,EAAS,MAAM;AACxB,YAAAG;AACA,eAAA,OAAOP,EAAM,QAAS,WACzBO,IACCL,EAAQF,EAAM,IAAsB,KAAK,SAASA,EAAM,MAAM,EAAE,IAEjEO,IAAYP,EAAM,MAEZO,IAAY;AAAA,MAAA,CACnB,EACkD,MAAM;AAEzD,aAAIP,EAAM,UACLQ,EAAWR,EAAM,KAAK,IACzBM,EAAM,QAAQN,EAAM,QAEpBK,EAAQ,eAAeL,EAAM,KAAK,EAAE,IAAI,KAGnC;AAAA,QACN,OAAOK;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACD,CACA;;;;"}
|
package/dist/index126.js
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const r = (t, e) => t * 100 / e, p = (t, e) => t / 100 * e, l = (t, e, n) => r(t - e, n - e), P = ({
|
|
3
|
-
value: t = 0,
|
|
4
|
-
originalBounds: e,
|
|
5
|
-
targetBounds: n,
|
|
6
|
-
step: c = 1
|
|
7
|
-
}) => {
|
|
8
|
-
const a = l(
|
|
9
|
-
t,
|
|
10
|
-
e.min,
|
|
11
|
-
e.max
|
|
12
|
-
), m = p(
|
|
13
|
-
a,
|
|
14
|
-
n.max - n.min
|
|
15
|
-
) + n.min, s = Math.round(m / c) * c;
|
|
16
|
-
return o(s, n.min, n.max);
|
|
17
|
-
};
|
|
1
|
+
const r = (e) => typeof e > "u" || e === null;
|
|
18
2
|
export {
|
|
19
|
-
r as
|
|
20
|
-
l as getAsPercentageBetween,
|
|
21
|
-
p as getPercentageFrom,
|
|
22
|
-
P as transposeValue
|
|
3
|
+
r as isNil
|
|
23
4
|
};
|
|
24
5
|
//# sourceMappingURL=index126.js.map
|
package/dist/index126.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index126.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index126.js","sources":["../src/utilities/functions/isNil.ts"],"sourcesContent":["/**\n * Returns true if the item is not null or undefined\n * @param value The item to check\n * @returns true | false\n */\nexport const isNil = (value: unknown) => {\n\tif (typeof value === 'undefined') return true;\n\tif (value === null) return true;\n\treturn false;\n};\n"],"names":["isNil","value"],"mappings":"AAKa,MAAAA,IAAQ,CAACC,MACjB,OAAOA,IAAU,OACjBA,MAAU;"}
|
package/dist/index127.js
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { clamp as o } from "./index199.js";
|
|
2
|
+
const r = (t, e) => t * 100 / e, p = (t, e) => t / 100 * e, l = (t, e, n) => r(t - e, n - e), P = ({
|
|
3
|
+
value: t = 0,
|
|
4
|
+
originalBounds: e,
|
|
5
|
+
targetBounds: n,
|
|
6
|
+
step: c = 1
|
|
7
|
+
}) => {
|
|
8
|
+
const a = l(
|
|
9
|
+
t,
|
|
10
|
+
e.min,
|
|
11
|
+
e.max
|
|
12
|
+
), m = p(
|
|
13
|
+
a,
|
|
14
|
+
n.max - n.min
|
|
15
|
+
) + n.min, s = Math.round(m / c) * c;
|
|
16
|
+
return o(s, n.min, n.max);
|
|
17
|
+
};
|
|
2
18
|
export {
|
|
3
|
-
|
|
19
|
+
r as getAsPercentage,
|
|
20
|
+
l as getAsPercentageBetween,
|
|
21
|
+
p as getPercentageFrom,
|
|
22
|
+
P as transposeValue
|
|
4
23
|
};
|
|
5
24
|
//# sourceMappingURL=index127.js.map
|
package/dist/index127.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index127.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index127.js","sources":["../src/utilities/functions/percentage.ts"],"sourcesContent":["import { clamp } from './clamp';\n\n/**\n * Get the percentage \"a\" represents in total\n * @returns\n */\nexport const getAsPercentage = (a: number, total: number) => (a * 100) / total;\n/**\n * Get \"a\" knowing the percentage\n * @returns\n */\nexport const getPercentageFrom = (a: number, total: number) =>\n\t(a / 100) * total;\n\n/**\n * Normalize the bounds of a value\n */\nexport const getAsPercentageBetween = (a: number, min: number, max: number) =>\n\tgetAsPercentage(a - min, max - min);\n\n/**\n * Get a value \"b\" that is the same percentage as \"a\" into it's target bounds.\n * EG 40% = 4 for a bound 0, 10 is transposed to 40% = 8\n * for bounds 0, 20, or again 40% = 4 for bound 10, 20\n */\ntype TransposeValueParameters = {\n\tvalue: number;\n\toriginalBounds: {\n\t\tmin: number;\n\t\tmax: number;\n\t};\n\ttargetBounds: {\n\t\tmin: number;\n\t\tmax: number;\n\t};\n\tstep: number;\n};\nexport const transposeValue: (params: TransposeValueParameters) => number = ({\n\tvalue = 0,\n\toriginalBounds,\n\ttargetBounds,\n\tstep = 1,\n}) => {\n\tconst percentageOfOriginal = getAsPercentageBetween(\n\t\tvalue,\n\t\toriginalBounds.min,\n\t\toriginalBounds.max\n\t);\n\tconst transposedValue = getPercentageFrom(\n\t\tpercentageOfOriginal,\n\t\ttargetBounds.max - targetBounds.min\n\t);\n\tconst adjusted = transposedValue + targetBounds.min;\n\tconst withStep = Math.round(adjusted / step) * step;\n\n\tconst clamped = clamp(withStep, targetBounds.min, targetBounds.max);\n\treturn clamped;\n};\n"],"names":["getAsPercentage","a","total","getPercentageFrom","getAsPercentageBetween","min","max","transposeValue","value","originalBounds","targetBounds","step","percentageOfOriginal","adjusted","withStep","clamp"],"mappings":";AAMO,MAAMA,IAAkB,CAACC,GAAWC,MAAmBD,IAAI,MAAOC,GAK5DC,IAAoB,CAACF,GAAWC,MAC3CD,IAAI,MAAOC,GAKAE,IAAyB,CAACH,GAAWI,GAAaC,MAC9DN,EAAgBC,IAAII,GAAKC,IAAMD,CAAG,GAmBtBE,IAA+D,CAAC;AAAA,EAC5E,OAAAC,IAAQ;AAAA,EACR,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AACR,MAAM;AACL,QAAMC,IAAuBR;AAAA,IAC5BI;AAAA,IACAC,EAAe;AAAA,IACfA,EAAe;AAAA,EAAA,GAMVI,IAJkBV;AAAA,IACvBS;AAAA,IACAF,EAAa,MAAMA,EAAa;AAAA,EAAA,IAEEA,EAAa,KAC1CI,IAAW,KAAK,MAAMD,IAAWF,CAAI,IAAIA;AAGxC,SADSI,EAAMD,GAAUJ,EAAa,KAAKA,EAAa,GAAG;AAEnE;"}
|