bitboss-ui 0.1.76 → 0.1.78
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/BaseTag/BaseTag.vue.d.ts +83 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +0 -1
- package/dist/components/BbTag/BbTag.vue.d.ts +64 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +119 -116
- package/dist/index.js.map +1 -1
- package/dist/index100.js +46 -41
- package/dist/index100.js.map +1 -1
- package/dist/index102.js +29 -31
- package/dist/index102.js.map +1 -1
- package/dist/index104.js +82 -22
- package/dist/index104.js.map +1 -1
- package/dist/index106.js +22 -115
- package/dist/index106.js.map +1 -1
- package/dist/index108.js +112 -90
- package/dist/index108.js.map +1 -1
- package/dist/index110.js +93 -39
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +2 -38
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +40 -40
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +33 -42
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +30 -29
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +47 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +43 -21
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +2 -2
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +20 -9
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +2 -18
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +9 -9
- package/dist/index120.js +10 -13
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +18 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +10 -221
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -3
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +224 -3
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index126.js +2 -2
- package/dist/index127.js +2 -2
- package/dist/index128.js +2 -2
- package/dist/index129.js +2 -2
- package/dist/index130.js +2 -2
- package/dist/index131.js +2 -2
- package/dist/index132.js +2 -2
- package/dist/index133.js +2 -2
- package/dist/index134.js +2 -2
- package/dist/index135.js +2 -2
- package/dist/index136.js +2 -2
- package/dist/index137.js +2 -2
- package/dist/index138.js +2 -2
- package/dist/index139.js +2 -2
- package/dist/index14.js +11 -11
- package/dist/index140.js +2 -2
- package/dist/index141.js +2 -2
- package/dist/index142.js +2 -2
- package/dist/index143.js +2 -2
- package/dist/index144.js +2 -2
- package/dist/index145.js +2 -2
- package/dist/index146.js +2 -2
- package/dist/index147.js +2 -2
- package/dist/index148.js +2 -2
- package/dist/index149.js +3 -2
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index152.js +2 -2
- package/dist/index153.js +2 -3
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +2 -2
- package/dist/index155.js +2 -2
- package/dist/index156.js +2 -2
- package/dist/index157.js +2 -2
- package/dist/index158.js +3 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index16.js +5 -5
- package/dist/index160.js +2 -2
- package/dist/index161.js +3 -2
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +2 -3
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +2 -3
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +2 -2
- package/dist/index165.js +2 -2
- package/dist/index166.js +2 -2
- package/dist/index167.js +2 -2
- package/dist/index168.js +2 -2
- package/dist/index169.js +2 -2
- package/dist/index170.js +2 -2
- package/dist/index171.js +2 -2
- package/dist/index172.js +2 -2
- package/dist/index173.js +2 -2
- package/dist/index174.js +3 -2
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index177.js +2 -2
- package/dist/index178.js +2 -3
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +2 -2
- package/dist/index18.js +6 -6
- package/dist/index180.js +2 -2
- package/dist/index181.js +2 -2
- package/dist/index182.js +2 -2
- package/dist/index183.js +2 -2
- package/dist/index184.js +2 -2
- package/dist/index185.js +2 -2
- package/dist/index186.js +3 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +3 -350
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +3 -134
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -5
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -19
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -2
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +4 -2
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +3 -186
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +3 -23
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +3 -331
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +35 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +6 -3
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +348 -33
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +134 -6
- package/dist/index199.js.map +1 -1
- package/dist/index2.js +1 -1
- package/dist/index20.js +1 -1
- package/dist/index200.js +295 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +19 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -16
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +184 -14
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +23 -20
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +329 -27
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +235 -3
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +16 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +16 -235
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +20 -9
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +27 -94
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +8 -28
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +8 -12
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +89 -72
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +27 -5
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +13 -2
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +78 -294
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +2 -2
- package/dist/index220.js +4 -2
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +224 -2
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +246 -105
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -105
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +434 -10
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +7 -433
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +87 -7
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -88
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +2 -4
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +2 -200
- package/dist/index229.js.map +1 -1
- package/dist/index231.js +117 -2
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +106 -2
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +200 -2
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -9
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -6
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -224
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -258
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +9 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +6 -69
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +158 -36
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +2 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +38 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +5 -0
- package/dist/index245.js.map +1 -0
- package/dist/index246.js +72 -0
- package/dist/index246.js.map +1 -0
- package/dist/index247.js +5 -0
- package/dist/index247.js.map +1 -0
- package/dist/index248.js +6 -0
- package/dist/index248.js.map +1 -0
- package/dist/index249.js +5 -0
- package/dist/index249.js.map +1 -0
- package/dist/index250.js +5 -0
- package/dist/index250.js.map +1 -0
- package/dist/index26.js +4 -4
- package/dist/index28.js +69 -70
- package/dist/index28.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +4 -4
- package/dist/index32.js +2 -2
- package/dist/index4.js +2 -2
- package/dist/index40.js +3 -3
- package/dist/index42.js +4 -4
- package/dist/index44.js +1 -1
- package/dist/index46.js +2 -2
- package/dist/index5.js +4 -4
- package/dist/index56.js +2 -2
- package/dist/index62.js +7 -7
- package/dist/index66.js +5 -5
- package/dist/index69.js +1 -1
- package/dist/index72.js +3 -3
- package/dist/index74.js +1 -1
- package/dist/index76.js +6 -6
- package/dist/index78.js +2 -2
- package/dist/index8.js +2 -2
- package/dist/index88.js +6 -8
- package/dist/index88.js.map +1 -1
- package/dist/index96.js +4 -4
- package/dist/index98.js +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index112.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index112.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index112.js","sources":["../src/components/BbChip/BbChip.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-chip\" }\nconst _hoisted_2 = { class: \"bb-chip__content\" }\nconst _hoisted_3 = [\"aria-label\", \"onClick\"]\nconst _hoisted_4 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n role: \"img\",\n \"aria-hidden\": \"true\",\n class: \"v-icon__svg\",\n style: {\"height\":\"20px\",\"width\":\"20px\"}\n}\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M15 6.375L14.125 5.5L10 9.625L5.875 5.5L5 6.375L9.125 10.5L5 14.625L5.875 15.5L10 11.375L14.125 15.5L15 14.625L10.875 10.5L15 6.375Z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_6 = [\n _hoisted_5\n]\n\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbChipProps = Pick<CommonProps, \"text\"> & {\n /**\n * Renders a button with a close icon. Used to indicate the possibility of deleting the item.\n */\n clearable?: true;\n /**\n * The label the clearing button must have\n */\n clearableLabel?: string;\n};\n\nexport type BbChipEvents = {\n (e: \"click:clear\", event: MouseEvent): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbChip',\n props: {\n text: {},\n clearable: { type: Boolean },\n clearableLabel: { default: \"Elimina\" }\n },\n emits: [\"click:clear\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\n\n\nconst emit = __emit;\nconst onClear = (event: MouseEvent) => {\n emit(\"click:clear\", event);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"default\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ]),\n (_ctx.clearable)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n \"aria-label\": _ctx.clearableLabel,\n class: \"bb-chip__clear-button\",\n onClick: _withModifiers(onClear, [\"stop\",\"prevent\"]),\n type: \"button\"\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_4, _hoisted_6))\n ], 8, _hoisted_3))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_sfc_main","_defineComponent","__props","__emit","emit","onClear","event","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","_withModifiers","_createCommentVNode"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,aACtBC,IAAa,EAAE,OAAO,sBACtBC,IAAa,CAAC,cAAc,SAAS,GACrCC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,eAAe;AAAA,EACf,OAAO;AAAA,EACP,OAAO,EAAC,QAAS,QAAO,OAAQ,OAAM;AACxC,GACMC,sBAA8C,QAAQ;AAAA,EAC1D,GAAG;AAAA,EACH,MAAM;AACR,GAAG,MAAM,EAAE,GACLC,IAAa;AAAA,EACjBD;AACF,GAoB4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,MAAM,CAAC;AAAA,IACP,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,gBAAgB,EAAE,SAAS,UAAU;AAAA,EACvC;AAAA,EACA,OAAO,CAAC,aAAa;AAAA,EACrB,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAMxC,UAAMC,IAAOD,GACPE,IAAU,CAACC,MAAsB;AACrC,MAAAF,EAAK,eAAeE,CAAK;AAAA,IAAA;AAGpB,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAoB,QAAQhB,GAAY;AAAA,MAC5DiB,EAAoB,QAAQhB,GAAY;AAAA,QACtCiB,EAAYL,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,UAC5CM,EAAiBC,EAAiBP,EAAK,IAAI,GAAG,CAAC;AAAA,QAAA,CAChD;AAAA,MAAA,CACF;AAAA,MACAA,EAAK,aACDE,KAAcC,EAAoB,UAAU;AAAA,QAC3C,KAAK;AAAA,QACL,cAAcH,EAAK;AAAA,QACnB,OAAO;AAAA,QACP,SAASQ,EAAeV,GAAS,CAAC,QAAO,SAAS,CAAC;AAAA,QACnD,MAAM;AAAA,MAAA,GACL;AAAA,SACAI,EAAW,GAAGC,EAAoB,OAAOb,GAAYE,CAAU;AAAA,SAC/D,GAAGH,CAAU,KAChBoB,EAAoB,IAAI,EAAI;AAAA,IAAA,CACjC;AAAA,EAEH;AAEA,CAAC;"}
|
package/dist/index113.js
CHANGED
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as i, ref as a, watch as s, computed as u, openBlock as c, createElementBlock as p, normalizeProps as d, guardReactiveProps as m, createElementVNode as b, renderSlot as v, createCommentVNode as f } from "vue";
|
|
2
|
+
import { wait as V } from "./index119.js";
|
|
3
|
+
import { throttle as _ } from "./index195.js";
|
|
4
|
+
const h = { class: "bb-collapsible__content" }, k = /* @__PURE__ */ i({
|
|
5
|
+
__name: "BbCollapsible",
|
|
5
6
|
props: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
tag: { default: "div" },
|
|
10
|
-
transitionDuration: { default: 200 }
|
|
7
|
+
eager: { type: Boolean },
|
|
8
|
+
transitionDuration: { default: 250 },
|
|
9
|
+
modelValue: { type: Boolean }
|
|
11
10
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
setup(n) {
|
|
12
|
+
const e = n, l = a(e.modelValue), t = a(l.value);
|
|
13
|
+
s(
|
|
14
|
+
() => e.modelValue,
|
|
15
|
+
_(async (o) => {
|
|
16
|
+
o ? (t.value = !0, l.value = !0) : (await V(e.transitionDuration), l.value = !1);
|
|
17
|
+
}, e.transitionDuration)
|
|
18
|
+
);
|
|
19
|
+
const r = u(() => ({
|
|
20
|
+
"aria-expanded": e.modelValue,
|
|
21
|
+
class: {
|
|
22
|
+
"bb-collapsible": !0,
|
|
23
|
+
"bb-collapsible--open": e.modelValue,
|
|
24
|
+
"bb-collapsible--closed": !e.modelValue,
|
|
25
|
+
"bb-collapsible--invisible": !l.value
|
|
26
|
+
},
|
|
27
|
+
style: {
|
|
28
|
+
transitionDuration: e.transitionDuration + "ms"
|
|
23
29
|
}
|
|
24
|
-
}
|
|
25
|
-
return (o, y) => (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, {
|
|
31
|
-
default: f(() => [
|
|
32
|
-
(i(), l(u(o.tag), {
|
|
33
|
-
class: "content",
|
|
34
|
-
ref_key: "content",
|
|
35
|
-
ref: e
|
|
36
|
-
}, {
|
|
37
|
-
default: f(() => [
|
|
38
|
-
d(o.$slots, "default")
|
|
39
|
-
]),
|
|
40
|
-
_: 3
|
|
41
|
-
}, 512))
|
|
42
|
-
]),
|
|
43
|
-
_: 3
|
|
44
|
-
}, 8, ["style"]));
|
|
30
|
+
}));
|
|
31
|
+
return (o, y) => (c(), p("div", d(m(r.value)), [
|
|
32
|
+
b("div", h, [
|
|
33
|
+
o.eager || t.value ? v(o.$slots, "default", { key: 0 }) : f("", !0)
|
|
34
|
+
])
|
|
35
|
+
], 16));
|
|
45
36
|
}
|
|
46
37
|
});
|
|
47
38
|
export {
|
|
48
|
-
|
|
39
|
+
k as default
|
|
49
40
|
};
|
|
50
41
|
//# sourceMappingURL=index113.js.map
|
package/dist/index113.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index113.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index113.js","sources":["../src/components/BbCollapsible/BbCollapsible.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-collapsible__content\" }\n\nimport { wait } from \"@/utilities/functions/wait\";\nimport { throttle } from \"@/utilities/functions/throttle\";\nimport { computed, ref, watch } from \"vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbCollapsibleProps = Pick<CommonProps, 'eager' | 'transitionDuration'> & {\n /**\n * Used by v-model to trigger opening / closing the collapsible\n */\n modelValue?: boolean;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCollapsible',\n props: {\n eager: { type: Boolean },\n transitionDuration: { default: 250 },\n modelValue: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst visible = ref(props.modelValue);\nconst hasRenderedOnce = ref(visible.value);\n\n/**\n * Every time model value changes if content is going to be expanded\n * make it visible straight away.\n * If content id going to be collapsed wait for end of \n * transition before hiding from keyboard navigation\n */\nwatch(\n () => props.modelValue,\n throttle(async (value) => {\n if (value) {\n hasRenderedOnce.value = true;\n visible.value = true;\n } else {\n await wait(props.transitionDuration);\n visible.value = false;\n }\n }, props.transitionDuration)\n);\nconst collapsibleAttributes = computed(() => {\n return {\n \"aria-expanded\": props.modelValue,\n class: {\n \"bb-collapsible\": true,\n \"bb-collapsible--open\": props.modelValue,\n \"bb-collapsible--closed\": !props.modelValue,\n \"bb-collapsible--invisible\": !visible.value,\n },\n style: {\n transitionDuration: props.transitionDuration + \"ms\",\n },\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _normalizeProps(_guardReactiveProps(collapsibleAttributes.value)), [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.eager || hasRenderedOnce.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","visible","ref","hasRenderedOnce","watch","throttle","value","wait","collapsibleAttributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,6BAeAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,YAAY,EAAE,MAAM,QAAQ;AAAA,EAC9B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAUC,EAAIF,EAAM,UAAU,GAC9BG,IAAkBD,EAAID,EAAQ,KAAK;AAQzC,IAAAG;AAAA,MACE,MAAMJ,EAAM;AAAA,MACZK,EAAS,OAAOC,MAAU;AACxB,QAAIA,KACFH,EAAgB,QAAQ,IACxBF,EAAQ,QAAQ,OAEV,MAAAM,EAAKP,EAAM,kBAAkB,GACnCC,EAAQ,QAAQ;AAAA,MAClB,GACCD,EAAM,kBAAkB;AAAA,IAAA;AAEvB,UAAAQ,IAAwBC,EAAS,OAC9B;AAAA,MACL,iBAAiBT,EAAM;AAAA,MACvB,OAAO;AAAA,QACL,kBAAkB;AAAA,QAClB,wBAAwBA,EAAM;AAAA,QAC9B,0BAA0B,CAACA,EAAM;AAAA,QACjC,6BAA6B,CAACC,EAAQ;AAAA,MACxC;AAAA,MACA,OAAO;AAAA,QACL,oBAAoBD,EAAM,qBAAqB;AAAA,MACjD;AAAA,IAAA,EAEH;AAEM,WAAA,CAACU,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAOC,EAAgBC,EAAoBP,EAAsB,KAAK,CAAC,GAAG;AAAA,MAClHQ,EAAoB,OAAOpB,GAAY;AAAA,QACpCc,EAAK,SAASP,EAAgB,QAC3Bc,EAAYP,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA,IAC9CQ,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
|
package/dist/index114.js
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { defineComponent as m, computed as
|
|
2
|
-
import { isCssColor as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
viewBox: "0 0 512 512"
|
|
6
|
-
}, [
|
|
7
|
-
/* @__PURE__ */ c("path", {
|
|
8
|
-
fill: "currentColor",
|
|
9
|
-
d: "M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"
|
|
10
|
-
})
|
|
11
|
-
], -1), x = [
|
|
12
|
-
_
|
|
13
|
-
], b = /* @__PURE__ */ m({
|
|
14
|
-
__name: "BbSpinner",
|
|
1
|
+
import { defineComponent as d, getCurrentInstance as m, inject as x, computed as l, ref as y, watchEffect as _, openBlock as h, createElementBlock as w, mergeProps as b } from "vue";
|
|
2
|
+
import { isCssColor as z } from "./index191.js";
|
|
3
|
+
const g = ["innerHTML"], $ = /* @__PURE__ */ d({
|
|
4
|
+
__name: "BbIcon",
|
|
15
5
|
props: {
|
|
16
6
|
color: {},
|
|
17
|
-
size: { default: "md" }
|
|
7
|
+
size: { default: "md" },
|
|
8
|
+
type: {}
|
|
18
9
|
},
|
|
19
|
-
setup(
|
|
20
|
-
|
|
10
|
+
setup(p) {
|
|
11
|
+
var i, c;
|
|
12
|
+
const e = p;
|
|
13
|
+
let t;
|
|
14
|
+
!!((c = (i = m()) == null ? void 0 : i.proxy) != null && c.$nuxt) ? process.client && (t = useNuxtApp().$icons) : t = x("icons");
|
|
15
|
+
const u = {
|
|
21
16
|
xs: 12,
|
|
22
17
|
sm: 16,
|
|
23
18
|
md: 24,
|
|
24
19
|
lg: 28,
|
|
25
20
|
xl: 36,
|
|
26
21
|
xxl: 40
|
|
27
|
-
},
|
|
28
|
-
const
|
|
29
|
-
"bb-
|
|
22
|
+
}, a = l(() => {
|
|
23
|
+
const o = {
|
|
24
|
+
"bb-icon": !0
|
|
30
25
|
};
|
|
31
|
-
let
|
|
32
|
-
let
|
|
33
|
-
return typeof e.size == "string" ?
|
|
26
|
+
let r = { width: l(() => {
|
|
27
|
+
let s;
|
|
28
|
+
return typeof e.size == "string" ? s = u[e.size] ?? parseInt(e.size, 10) : s = e.size, s + "px";
|
|
34
29
|
}).value };
|
|
35
|
-
return e.color && (
|
|
36
|
-
class:
|
|
37
|
-
style:
|
|
30
|
+
return e.color && (z(e.color) ? r.color = e.color : o[`bb-icon-${e.color}`] = !0), {
|
|
31
|
+
class: o,
|
|
32
|
+
style: r
|
|
38
33
|
};
|
|
39
|
-
});
|
|
40
|
-
return (
|
|
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]();
|
|
40
|
+
}
|
|
41
|
+
}), (o, f) => (h(), w("i", b(a.value, { innerHTML: n.value }), null, 16, g));
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
$ as default
|
|
45
46
|
};
|
|
46
47
|
//# sourceMappingURL=index114.js.map
|
package/dist/index114.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index114.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index114.js","sources":["../src/components/BbIcon/BbIcon.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed, getCurrentInstance, inject, ref, watchEffect } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nexport type Size = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n\nexport interface BbIconProps {\n color?: string;\n size?: Size | string | number;\n type: string;\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbIcon',\n props: {\n color: {},\n size: { default: \"md\" },\n type: {}\n },\n setup(__props: any) {\n\nconst props = __props;\nlet icons: Record<string, () => Promise<string>> | undefined;\n// @ts-ignore\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nif (isNuxt) {\n // @ts-ignore\n if (process.client) {\n // @ts-ignore\n icons = useNuxtApp()[`$icons`] as typeof icons;\n }\n} else {\n icons = inject(\"icons\");\n}\n\nconst sizeMap: Record<Size, number> = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 28,\n xl: 36,\n xxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n const classes: any = {\n \"bb-icon\": true,\n };\n const width = computed(() => {\n let dimension: number;\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as Size] ?? parseInt(props.size, 10);\n } else {\n dimension = props.size;\n }\n return dimension + `px`;\n });\n let style: { [key: string]: any } = { width: width.value };\n\n if (props.color) {\n if (isCssColor(props.color)) {\n style.color = props.color;\n } else {\n classes[`bb-icon-${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nconst icon = ref<string | null>(null);\n\nwatchEffect(async () => {\n if (icons) {\n if (typeof icons[props.type] === \"undefined\")\n throw new Error(`Icon \"${props.type}\" does not exist.`);\n icon.value = await icons[props.type]();\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"i\", _mergeProps(iconAttributes.value, { innerHTML: icon.value }), null, 16, _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","icons","_b","_a","getCurrentInstance","inject","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","icon","ref","watchEffect","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps"],"mappings":";;AAGA,MAAMA,IAAa,CAAC,WAAW,GAYHC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,EAAE,SAAS,KAAK;AAAA,IACtB,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc;;AAEtB,UAAMC,IAAQD;AACV,QAAAE;AAIJ,IAFe,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,SAIxC,QAAQ,WAEFD,IAAA,WAAA,EAAa,UAGvBA,IAAQI,EAAO,OAAO;AAGxB,UAAMC,IAAgC;AAAA,MACpC,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGDC,IAAiBC,EAAS,MAAM;AACpC,YAAMC,IAAe;AAAA,QACnB,WAAW;AAAA,MAAA;AAWb,UAAIC,IAAgC,EAAE,OATxBF,EAAS,MAAM;AACvB,YAAAG;AACA,eAAA,OAAOX,EAAM,QAAS,WACxBW,IAAYL,EAAQN,EAAM,IAAY,KAAK,SAASA,EAAM,MAAM,EAAE,IAElEW,IAAYX,EAAM,MAEbW,IAAY;AAAA,MAAA,CACpB,EACkD,MAAM;AAEzD,aAAIX,EAAM,UACJY,EAAWZ,EAAM,KAAK,IACxBU,EAAM,QAAQV,EAAM,QAEpBS,EAAQ,WAAWT,EAAM,KAAK,EAAE,IAAI,KAGjC;AAAA,QACL,OAAOS;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACF,CACD,GAEKG,IAAOC,EAAmB,IAAI;AAEpC,WAAAC,EAAY,YAAY;AACtB,UAAId,GAAO;AACT,YAAI,OAAOA,EAAMD,EAAM,IAAI,IAAM;AAC/B,gBAAM,IAAI,MAAM,SAASA,EAAM,IAAI,mBAAmB;AACxD,QAAAa,EAAK,QAAQ,MAAMZ,EAAMD,EAAM,IAAI,EAAE;AAAA,MACvC;AAAA,IAAA,CACD,GAEM,CAACgB,GAAUC,OACRC,EAAW,GAAGC,EAAoB,KAAKC,EAAYb,EAAe,OAAO,EAAE,WAAWM,EAAK,MAAO,CAAA,GAAG,MAAM,IAAIjB,CAAU;AAAA,EAEnI;AAEA,CAAC;"}
|
package/dist/index115.js
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
|
-
|
|
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 "./index195.js";
|
|
3
|
+
const O = /* @__PURE__ */ v({
|
|
4
|
+
__name: "BbSmoothHeight",
|
|
5
|
+
props: {
|
|
6
|
+
mutationOptions: { default: () => ({ childList: !0 }) },
|
|
7
|
+
resizeOptions: {},
|
|
8
|
+
strategy: { default: "resize" },
|
|
9
|
+
tag: { default: "div" },
|
|
10
|
+
transitionDuration: { default: 200 }
|
|
11
|
+
},
|
|
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 + 2;
|
|
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
|
+
class: "bb-smooth-height",
|
|
27
|
+
ref_key: "container",
|
|
28
|
+
ref: s,
|
|
29
|
+
style: m({ "transition-duration": n.transitionDuration / 1e3 + "s" })
|
|
30
|
+
}, {
|
|
31
|
+
default: f(() => [
|
|
32
|
+
(i(), l(u(o.tag), {
|
|
33
|
+
class: "content",
|
|
34
|
+
ref_key: "content",
|
|
35
|
+
ref: e
|
|
36
|
+
}, {
|
|
37
|
+
default: f(() => [
|
|
38
|
+
d(o.$slots, "default")
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 512))
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 8, ["style"]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
2
47
|
export {
|
|
3
|
-
|
|
48
|
+
O as default
|
|
4
49
|
};
|
|
5
50
|
//# sourceMappingURL=index115.js.map
|
package/dist/index115.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index115.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index115.js","sources":["../src/components/BbSmoothHeight/BbSmoothHeight.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport { throttle } from \"@/utilities/functions/throttle\";\nimport { ref, onMounted, onBeforeUnmount } from \"vue\";\n\ntype VoidHTMLElements =\n | \"area\"\n | \"base\"\n | \"br\"\n | \"col\"\n | \"command\"\n | \"embed\"\n | \"hr\"\n | \"img\"\n | \"input\"\n | \"keygen\"\n | \"link\"\n | \"meta\"\n | \"param\"\n | \"source\"\n | \"track\"\n | \"wbr\";\n\nexport type BbSmoothHeightProps = {\n mutationOptions?: MutationObserverInit;\n resizeOptions?: ResizeObserverOptions;\n strategy?: \"resize\" | \"mutation\";\n tag?: keyof Omit<HTMLElementTagNameMap, VoidHTMLElements> | \"\";\n transitionDuration?: number;\n};\n\nexport type BbSmoothHeightSlots = {\n default?: (props: {}) => any\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSmoothHeight',\n props: {\n mutationOptions: { default: () => ({ childList: true }) },\n resizeOptions: {},\n strategy: { default: \"resize\" },\n tag: { default: \"div\" },\n transitionDuration: { default: 200 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\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 onMounted(() => {\n if (props.strategy === \"resize\") {\n if (content.value) {\n observer.value = new ResizeObserver(onContentGrow);\n observer.value.observe(content.value, props.resizeOptions);\n }\n } else if (props.strategy === \"mutation\") {\n if (content.value) {\n observer.value = new MutationObserver(onContentGrow);\n observer.value.observe(content.value, props.mutationOptions);\n }\n }\n onContentGrow();\n });\n onBeforeUnmount(() => {\n if (observer.value) {\n observer.value.disconnect();\n }\n });\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 if (container.value && content.value) {\n const contentHeight = content.value.scrollHeight + 2;\n container.value.style.height = \"0px\";\n container.value.style.height = `${contentHeight}px`;\n }\n}, 200);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n class: \"bb-smooth-height\",\n ref_key: \"container\",\n ref: container,\n style: _normalizeStyle({ 'transition-duration': props.transitionDuration / 1000 + 's' })\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n class: \"content\",\n ref_key: \"content\",\n ref: content\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 512))\n ]),\n _: 3\n }, 8, [\"style\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","container","ref","content","observer","onMounted","onContentGrow","onBeforeUnmount","throttle","contentHeight","_ctx","_cache","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeStyle","_withCtx","_renderSlot"],"mappings":";;AAqCA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,iBAAiB,EAAE,SAAS,OAAO,EAAE,WAAW,GAAQ,GAAA;AAAA,IACxD,eAAe,CAAC;AAAA,IAChB,UAAU,EAAE,SAAS,SAAS;AAAA,IAC9B,KAAK,EAAE,SAAS,MAAM;AAAA,IACtB,oBAAoB,EAAE,SAAS,IAAI;AAAA,EACrC;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAYC,EAAwB,IAAI,GACxCC,IAAUD,EAAwB,IAAI,GACtCE,IAAWF,EAA8C,IAAI;AAEnE,IAAI,WAAW,mBACbG,EAAU,MAAM;AACV,MAAAL,EAAM,aAAa,WACjBG,EAAQ,UACDC,EAAA,QAAQ,IAAI,eAAeE,CAAa,GACjDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,aAAa,KAElDA,EAAM,aAAa,cACxBG,EAAQ,UACDC,EAAA,QAAQ,IAAI,iBAAiBE,CAAa,GACnDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,eAAe,IAGjDM;IAAA,CACf,GACDC,EAAgB,MAAM;AACpB,MAAIH,EAAS,SACXA,EAAS,MAAM;IACjB,CACD;AAOG,UAAAE,IAAgBE,EAAS,MAAM;AAC/B,UAAAP,EAAU,SAASE,EAAQ,OAAO;AAC9B,cAAAM,IAAgBN,EAAQ,MAAM,eAAe;AACzC,QAAAF,EAAA,MAAM,MAAM,SAAS,OAC/BA,EAAU,MAAM,MAAM,SAAS,GAAGQ,CAAa;AAAA,MACjD;AAAA,OACC,GAAG;AAEC,WAAA,CAACC,GAAUC,OACRC,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,MACrE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,KAAKT;AAAA,MACL,OAAOc,EAAgB,EAAE,uBAAuBf,EAAM,qBAAqB,MAAO,KAAK;AAAA,IAAA,GACtF;AAAA,MACD,SAASgB,EAAS,MAAM;AAAA,SACrBJ,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,UAC9D,OAAO;AAAA,UACP,SAAS;AAAA,UACT,KAAKP;AAAA,QAAA,GACJ;AAAA,UACD,SAASa,EAAS,MAAM;AAAA,YACtBC,EAAYP,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,UACD,GAAG;AAAA,WACF,GAAG;AAAA,MAAA,CACP;AAAA,MACD,GAAG;AAAA,IAAA,GACF,GAAG,CAAC,OAAO,CAAC;AAAA,EAEjB;AAEA,CAAC;"}
|
package/dist/index116.js
CHANGED
|
@@ -1,24 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
|
|
2
|
+
import { isCssColor as f } from "./index191.js";
|
|
3
|
+
const _ = /* @__PURE__ */ c("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
viewBox: "0 0 512 512"
|
|
6
|
+
}, [
|
|
7
|
+
/* @__PURE__ */ c("path", {
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
d: "M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"
|
|
10
|
+
})
|
|
11
|
+
], -1), x = [
|
|
12
|
+
_
|
|
13
|
+
], b = /* @__PURE__ */ m({
|
|
14
|
+
__name: "BbSpinner",
|
|
15
|
+
props: {
|
|
16
|
+
color: {},
|
|
17
|
+
size: { default: "md" }
|
|
18
|
+
},
|
|
19
|
+
setup(n) {
|
|
20
|
+
const e = n, i = {
|
|
21
|
+
xs: 12,
|
|
22
|
+
sm: 16,
|
|
23
|
+
md: 24,
|
|
24
|
+
lg: 28,
|
|
25
|
+
xl: 36,
|
|
26
|
+
xxl: 40
|
|
27
|
+
}, l = r(() => {
|
|
28
|
+
const s = {
|
|
29
|
+
"bb-spinner": !0
|
|
30
|
+
};
|
|
31
|
+
let t = { width: r(() => {
|
|
32
|
+
let o;
|
|
33
|
+
return typeof e.size == "string" ? o = i[e.size] ?? parseInt(e.size, 10) : o = e.size, o + "px";
|
|
34
|
+
}).value };
|
|
35
|
+
return e.color && (f(e.color) ? t.color = e.color : s[`bb-spinner--${e.color}`] = !0), {
|
|
36
|
+
class: s,
|
|
37
|
+
style: t
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
return (s, p) => (a(), d("span", u(z(l.value)), x, 16));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
18
43
|
export {
|
|
19
|
-
|
|
20
|
-
l as getAsPercentageBetween,
|
|
21
|
-
p as getPercentageFrom,
|
|
22
|
-
P as transposeValue
|
|
44
|
+
b as default
|
|
23
45
|
};
|
|
24
46
|
//# sourceMappingURL=index116.js.map
|
package/dist/index116.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index116.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index116.js","sources":["../src/components/BbSpinner/BbSpinner.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 512 512\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z\"\n })\n], -1)\nconst _hoisted_2 = [\n _hoisted_1\n]\n\nimport { computed } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport type { Classes } from \"@/types/Classes\";\n\nexport type Size = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | string | number;\n\nexport interface BbSpinnerProps {\n color?: string;\n size?: Size;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSpinner',\n props: {\n color: {},\n size: { default: \"md\" }\n },\n setup(__props: any) {\n\nconst props = __props;\n\nconst sizeMap: Record<Size, number> = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 28,\n xl: 36,\n xxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n const classes: Classes = {\n \"bb-spinner\": true,\n };\n const width = computed(() => {\n let dimension: number;\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as Size] ?? parseInt(props.size, 10);\n } else {\n dimension = props.size;\n }\n return dimension + `px`;\n });\n let style: { [key: string]: any } = { width: width.value };\n\n if (props.color) {\n if (isCssColor(props.color)) {\n style.color = props.color;\n } else {\n classes[`bb-spinner--${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(iconAttributes.value)), _hoisted_2, 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps"],"mappings":";;AAGA,MAAMA,sBAA8C,OAAO;AAAA,EACzD,OAAO;AAAA,EACP,SAAS;AACX,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,MAAM;AAAA,IACN,GAAG;AAAA,EAAA,CACJ;AACH,GAAG,EAAE,GACCC,IAAa;AAAA,EACjBD;AACF,GAc4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,EAAE,SAAS,KAAK;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAERE,IAAgC;AAAA,MACpC,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGDC,IAAiBC,EAAS,MAAM;AACpC,YAAMC,IAAmB;AAAA,QACvB,cAAc;AAAA,MAAA;AAWhB,UAAIC,IAAgC,EAAE,OATxBF,EAAS,MAAM;AACvB,YAAAG;AACA,eAAA,OAAON,EAAM,QAAS,WACxBM,IAAYL,EAAQD,EAAM,IAAY,KAAK,SAASA,EAAM,MAAM,EAAE,IAElEM,IAAYN,EAAM,MAEbM,IAAY;AAAA,MAAA,CACpB,EACkD,MAAM;AAEzD,aAAIN,EAAM,UACJO,EAAWP,EAAM,KAAK,IACxBK,EAAM,QAAQL,EAAM,QAEpBI,EAAQ,eAAeJ,EAAM,KAAK,EAAE,IAAI,KAGrC;AAAA,QACL,OAAOI;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACF,CACD;AAEM,WAAA,CAACG,GAAUC,OACRC,EAAc,GAAAC,EAAoB,QAAQC,EAAgBC,EAAoBX,EAAe,KAAK,CAAC,GAAGN,GAAY,EAAE;AAAA,EAE9H;AAEA,CAAC;"}
|
package/dist/index117.js
CHANGED
package/dist/index117.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index117.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index117.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 if(typeof value === 'undefined') return true;\n if(value === null) return true;\n return false;\n}\n"],"names":["isNil","value"],"mappings":"AAKa,MAAAA,IAAQ,CAACC,MACjB,OAAOA,IAAU,OACjBA,MAAU;"}
|
package/dist/index118.js
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { clamp as o } from "./index190.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);
|
|
9
17
|
};
|
|
10
18
|
export {
|
|
11
|
-
|
|
19
|
+
r as getAsPercentage,
|
|
20
|
+
l as getAsPercentageBetween,
|
|
21
|
+
p as getPercentageFrom,
|
|
22
|
+
P as transposeValue
|
|
12
23
|
};
|
|
13
24
|
//# sourceMappingURL=index118.js.map
|
package/dist/index118.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index118.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index118.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 (a / 100) * total;\n\n/**\n * Normalize the bounds of a value\n */\nexport const getAsPercentageBetween = (a: number, min: number, max: number) =>\n getAsPercentage(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 value: number,\n originalBounds: {\n min: number,\n max: number\n },\n targetBounds: {\n min: number,\n max: number\n },\n step: number\n}\nexport const transposeValue: (params: TransposeValueParameters) => number = ({\n value = 0,\n originalBounds,\n targetBounds,\n step = 1,\n}) => {\n const percentageOfOriginal = getAsPercentageBetween(\n value,\n originalBounds.min,\n originalBounds.max\n );\n const transposedValue = getPercentageFrom(\n percentageOfOriginal,\n targetBounds.max - targetBounds.min\n );\n const adjusted = transposedValue + targetBounds.min;\n const withStep = Math.round(adjusted / step) * step;\n \n const clamped = clamp(withStep, targetBounds.min, targetBounds.max);\n return clamped;\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,MAC1CD,IAAI,MAAOC,GAKDE,IAAyB,CAACH,GAAWI,GAAaC,MAC7DN,EAAgBC,IAAII,GAAKC,IAAMD,CAAG,GAmBvBE,IAA+D,CAAC;AAAA,EACzE,OAAAC,IAAQ;AAAA,EACR,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AACX,MAAM;AACF,QAAMC,IAAuBR;AAAA,IACzBI;AAAA,IACAC,EAAe;AAAA,IACfA,EAAe;AAAA,EAAA,GAMbI,IAJkBV;AAAA,IACpBS;AAAA,IACAF,EAAa,MAAMA,EAAa;AAAA,EAAA,IAEDA,EAAa,KAC1CI,IAAW,KAAK,MAAMD,IAAWF,CAAI,IAAIA;AAGxC,SADSI,EAAMD,GAAUJ,EAAa,KAAKA,EAAa,GAAG;AAEtE;"}
|
package/dist/index119.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const o = () => ({
|
|
3
|
-
getItemText(i, n) {
|
|
4
|
-
if (typeof i == "string" && !n)
|
|
5
|
-
return i;
|
|
6
|
-
if (n) {
|
|
7
|
-
if (typeof n == "string") {
|
|
8
|
-
let f = t(i, n);
|
|
9
|
-
return typeof f != "string" && (f = JSON.stringify(f)), f;
|
|
10
|
-
} else if (typeof n == "function") {
|
|
11
|
-
let f = n(i);
|
|
12
|
-
return typeof f != "string" && (f = JSON.stringify(f)), f;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return JSON.stringify(i);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
1
|
+
const o = (e) => new Promise((t) => setTimeout(t, e));
|
|
18
2
|
export {
|
|
19
|
-
o as
|
|
3
|
+
o as wait
|
|
20
4
|
};
|
|
21
5
|
//# sourceMappingURL=index119.js.map
|
package/dist/index119.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index119.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index119.js","sources":["../src/utilities/functions/wait.ts"],"sourcesContent":["/** Wait a specified amount of time before resolving a promise */\nexport const wait: (ms: number) => Promise<void> = (ms) => new Promise((resolve) => setTimeout(resolve, ms));"],"names":["wait","ms","resolve"],"mappings":"AACa,MAAAA,IAAsC,CAACC,MAAO,IAAI,QAAQ,CAACC,MAAY,WAAWA,GAASD,CAAE,CAAC;"}
|
package/dist/index12.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as de, ref as k, computed as h, watch as ue, openBlock as d, createElementBlock as u, mergeProps as ce, createElementVNode as i, createTextVNode as be, toDisplayString as f, unref as p, withDirectives as L, createVNode as g, Transition as V, withCtx as w, vShow as z, createCommentVNode as A, normalizeClass as x, Fragment as O, renderList as S, renderSlot as R, nextTick as me } from "vue";
|
|
2
|
-
import c from "./
|
|
3
|
-
import fe from "./
|
|
4
|
-
import pe from "./
|
|
5
|
-
import he from "./
|
|
6
|
-
import ye from "./
|
|
7
|
-
import _e from "./
|
|
8
|
-
import { groupBy as W } from "./
|
|
9
|
-
import { isNil as ve } from "./
|
|
10
|
-
import { last as $ } from "./
|
|
2
|
+
import c from "./index200.js";
|
|
3
|
+
import fe from "./index210.js";
|
|
4
|
+
import pe from "./index211.js";
|
|
5
|
+
import he from "./index201.js";
|
|
6
|
+
import ye from "./index212.js";
|
|
7
|
+
import _e from "./index213.js";
|
|
8
|
+
import { groupBy as W } from "./index214.js";
|
|
9
|
+
import { isNil as ve } from "./index117.js";
|
|
10
|
+
import { last as $ } from "./index203.js";
|
|
11
11
|
const ke = { class: "bb-base-date-picker__header" }, ge = ["disabled"], Ve = /* @__PURE__ */ i("span", null, null, -1), we = {
|
|
12
12
|
class: "bb-base-date-picker__selected-day-label",
|
|
13
13
|
"aria-live": "polite"
|
package/dist/index120.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return o;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
1
|
+
import { nanoid as e } from "./index189.js";
|
|
2
|
+
import { ref as o } from "vue";
|
|
3
|
+
const f = () => {
|
|
4
|
+
const r = o(e());
|
|
5
|
+
return {
|
|
6
|
+
id: r,
|
|
7
|
+
refresh: () => r.value = e()
|
|
8
|
+
};
|
|
9
|
+
};
|
|
13
10
|
export {
|
|
14
|
-
|
|
11
|
+
f as useId
|
|
15
12
|
};
|
|
16
13
|
//# sourceMappingURL=index120.js.map
|
package/dist/index120.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index120.js","sources":["../src/composables/
|
|
1
|
+
{"version":3,"file":"index120.js","sources":["../src/composables/useId.ts"],"sourcesContent":["import { nanoid } from \"nanoid\";\nimport { ref } from \"vue\";\n\nexport const useId = () => {\n const id = ref(nanoid());\n const refresh = () => id.value = nanoid();\n return {\n id,\n refresh\n }\n}"],"names":["useId","id","ref","nanoid"],"mappings":";;AAGO,MAAMA,IAAQ,MAAM;AACjB,QAAAC,IAAKC,EAAIC,EAAA,CAAQ;AAEhB,SAAA;AAAA,IACH,IAAAF;AAAA,IACA,SAHY,MAAMA,EAAG,QAAQE,EAAO;AAAA,EAGpC;AAER;"}
|