bitboss-ui 2.0.88 → 2.0.90
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/assets/css/index.css +1 -0
- package/dist/components/BaseButton/BaseButton.css +1 -0
- package/dist/components/BaseCheckbox/BaseCheckbox.css +1 -0
- package/dist/components/BaseColorInput/BaseColorInput.css +1 -0
- package/dist/components/BaseDatePicker/BaseDatePicker.css +1 -0
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.css +1 -0
- package/dist/components/BaseDialog/BaseDialog.css +1 -0
- package/dist/components/BaseInputContainer/BaseInputContainer.css +1 -0
- package/dist/components/BaseNumberInput/BaseNumberInput.css +1 -0
- package/dist/components/BaseRadio/BaseRadio.css +1 -0
- package/dist/components/BaseRating/BaseRating.css +1 -0
- package/dist/components/BaseSelect/BaseSelect.css +1 -0
- package/dist/components/BaseSlider/BaseSlider.css +1 -0
- package/dist/components/BaseSwitch/BaseSwitch.css +1 -0
- package/dist/components/BaseTag/BaseTag.css +1 -0
- package/dist/components/BaseTextarea/BaseTextarea.css +1 -0
- package/dist/components/BbAccordion/BbAccordion.css +1 -0
- package/dist/components/BbAlert/BbAlert.css +1 -0
- package/dist/components/BbAvatar/BbAvatar.css +1 -0
- package/dist/components/BbBadge/BbBadge.css +1 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.css +1 -0
- package/dist/components/BbButton/BbButton.css +1 -0
- package/dist/components/BbCheckbox/BbCheckbox.css +1 -0
- package/dist/components/BbChip/BbChip.css +1 -0
- package/dist/components/BbCollapsible/BbCollapsible.css +1 -0
- package/dist/components/BbColorInput/BbColorInput.css +1 -0
- package/dist/components/BbConfirm/BbConfirm.css +1 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.css +1 -0
- package/dist/components/BbDropdown/BbDropdown.css +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +8 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.css +1 -0
- package/dist/components/BbDropzone/BbDropzone.css +1 -0
- package/dist/components/BbIcon/BbIcon.css +1 -0
- package/dist/components/BbNumberInput/BbNumberInput.css +1 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.css +1 -0
- package/dist/components/BbPagination/BbPagination.css +1 -0
- package/dist/components/BbPopover/BbPopover.css +1 -0
- package/dist/components/BbProgress/BbProgress.css +1 -0
- package/dist/components/BbRadio/BbRadio.css +1 -0
- package/dist/components/BbRatio/BbRatio.css +1 -0
- package/dist/components/BbSelect/BbSelect.css +1 -0
- package/dist/components/BbSlider/BbSlider.css +1 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.css +1 -0
- package/dist/components/BbSpinner/BbSpinner.css +1 -0
- package/dist/components/BbSwitch/BbSwitch.css +1 -0
- package/dist/components/BbTab/BbTab.css +1 -0
- package/dist/components/BbTable/BbTable.css +1 -0
- package/dist/components/BbTag/BbTag.css +1 -0
- package/dist/components/BbTextInput/BbTextInput.css +1 -0
- package/dist/components/BbTextarea/BbTextarea.css +1 -0
- package/dist/components/BbToast/BbToast.css +1 -0
- package/dist/components/BbTooltip/BbTooltip.css +1 -0
- package/dist/components/BbTree/BbTree.css +1 -0
- package/dist/components/ChipsBox.css +1 -0
- package/dist/components/CommaBox.css +1 -0
- package/dist/components/CommonFloating.css +1 -0
- package/dist/components/CommonFloating.vue.d.ts +1 -3
- package/dist/components/CommonInputOuterContainer.css +1 -0
- package/dist/components/ErrorIcon.css +1 -0
- package/dist/components/OptionsContainer.css +1 -0
- package/dist/components/Transitions/Slide.css +1 -0
- package/dist/components/Transitions/SlideBack.css +1 -0
- package/dist/index.js +141 -142
- package/dist/index10.js +35 -74
- package/dist/{index102.js → index101.js} +2 -2
- package/dist/{index104.js → index103.js} +2 -2
- package/dist/{index106.js → index105.js} +2 -2
- package/dist/{index108.js → index107.js} +7 -7
- package/dist/{index110.js → index109.js} +9 -9
- package/dist/index11.js +189 -36
- package/dist/{index112.js → index111.js} +2 -2
- package/dist/{index114.js → index113.js} +2 -2
- package/dist/{index116.js → index115.js} +2 -2
- package/dist/{index118.js → index117.js} +3 -3
- package/dist/{index120.js → index119.js} +7 -7
- package/dist/index12.js +80 -191
- package/dist/index123.js +42 -0
- package/dist/index124.js +39 -35
- package/dist/index125.js +46 -39
- package/dist/index126.js +42 -46
- package/dist/index127.js +31 -43
- package/dist/index128.js +2 -35
- package/dist/index129.js +21 -2
- package/dist/index130.js +2 -21
- package/dist/index131.js +340 -2
- package/dist/index132.js +22 -337
- package/dist/index133.js +2 -25
- package/dist/index134.js +5 -2
- package/dist/index135.js +9 -5
- package/dist/index136.js +5 -8
- package/dist/index137.js +3 -6
- package/dist/index138.js +1 -1
- package/dist/index139.js +1 -1
- package/dist/{index15.js → index14.js} +4 -4
- 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/{index17.js → index16.js} +3 -3
- package/dist/index160.js +1 -1
- package/dist/index161.js +1 -1
- package/dist/index162.js +1 -1
- package/dist/index163.js +1 -1
- package/dist/index164.js +2 -2
- package/dist/index168.js +5 -0
- package/dist/index169.js +1 -1
- package/dist/index170.js +1 -1
- package/dist/index171.js +1 -1
- package/dist/index172.js +1 -1
- package/dist/index173.js +1 -1
- package/dist/index174.js +1 -1
- package/dist/index175.js +2 -2
- package/dist/index177.js +4 -0
- package/dist/index178.js +3 -2
- package/dist/index179.js +1 -1
- package/dist/{index19.js → index18.js} +3 -3
- 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/index185.js +1 -1
- package/dist/index186.js +1 -1
- package/dist/index187.js +2 -2
- package/dist/index188.js +1 -1
- package/dist/index189.js +1 -1
- package/dist/{index167.js → 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 +1 -1
- package/dist/index199.js +1 -1
- package/dist/{index21.js → index20.js} +17 -18
- package/dist/index200.js +1 -1
- package/dist/index201.js +1 -1
- package/dist/index202.js +1 -1
- package/dist/index203.js +81 -3
- package/dist/index205.js +51 -80
- package/dist/index207.js +13 -84
- package/dist/index208.js +10 -0
- package/dist/index209.js +2 -126
- package/dist/index210.js +4 -5
- package/dist/index211.js +123 -122
- package/dist/index212.js +5 -19
- package/dist/index213.js +122 -13
- package/dist/index214.js +18 -15
- package/dist/index215.js +16 -2
- package/dist/index216.js +16 -2
- package/dist/index217.js +2 -41
- package/dist/index218.js +2 -20
- package/dist/index219.js +41 -6
- package/dist/{index23.js → index22.js} +21 -21
- package/dist/index220.js +18 -51
- package/dist/index221.js +8 -0
- package/dist/index222.js +4 -12
- package/dist/index223.js +12 -5
- package/dist/index224.js +369 -12
- package/dist/index225.js +2 -369
- package/dist/index226.js +3 -3
- package/dist/index227.js +4 -7
- package/dist/index228.js +3 -8
- package/dist/index229.js +7 -19
- package/dist/index230.js +162 -25
- package/dist/index231.js +84 -3
- package/dist/index233.js +18 -51
- package/dist/index234.js +27 -44
- package/dist/index235.js +3 -5
- package/dist/index236.js +242 -53
- package/dist/index237.js +52 -4
- package/dist/index238.js +44 -2
- package/dist/index239.js +5 -4
- package/dist/{index25.js → index24.js} +8 -8
- package/dist/index240.js +60 -2
- package/dist/index241.js +2 -3
- package/dist/index242.js +18 -2
- package/dist/index243.js +105 -17
- package/dist/{index246.js → index245.js} +2 -2
- package/dist/index247.js +4 -0
- package/dist/index250.js +3 -2
- package/dist/index252.js +7 -16
- package/dist/index255.js +3 -3
- package/dist/index257.js +4 -3
- package/dist/index258.js +281 -12
- package/dist/index259.js +5 -8
- package/dist/{index27.js → index26.js} +5 -5
- package/dist/index260.js +2 -9
- package/dist/index261.js +2 -17
- package/dist/index262.js +2 -4
- package/dist/index263.js +2 -281
- package/dist/index264.js +2 -6
- package/dist/index265.js +126 -2
- package/dist/index266.js +431 -2
- package/dist/index267.js +176 -2
- package/dist/index268.js +22 -2
- package/dist/index270.js +2 -126
- package/dist/index271.js +219 -426
- package/dist/index272.js +6 -176
- package/dist/index273.js +16 -3
- package/dist/index274.js +11 -0
- package/dist/index275.js +199 -6
- package/dist/index276.js +435 -21
- package/dist/index277.js +129 -0
- package/dist/index278.js +89 -2
- package/dist/index279.js +3 -89
- package/dist/{index29.js → index28.js} +2 -2
- package/dist/index280.js +12 -2
- package/dist/index281.js +9 -2
- package/dist/index282.js +9 -2
- package/dist/index283.js +17 -2
- package/dist/index284.js +4 -2
- package/dist/index285.js +2 -2
- package/dist/index286.js +2 -28
- package/dist/index287.js +1 -21
- package/dist/index288.js +4 -0
- package/dist/index289.js +2 -9
- package/dist/index290.js +2 -200
- package/dist/index291.js +23 -431
- package/dist/index292.js +21 -126
- package/dist/index294.js +2 -224
- package/dist/index295.js +1 -1
- package/dist/index296.js +1 -1
- package/dist/index297.js +4 -4
- package/dist/index299.js +66 -2
- package/dist/index3.js +16 -0
- package/dist/{index31.js → index30.js} +2 -2
- package/dist/index300.js +32 -65
- package/dist/index301.js +1 -1
- package/dist/index302.js +1 -1
- package/dist/index303.js +4 -3
- package/dist/index304.js +3 -3
- package/dist/index305.js +3 -58
- package/dist/index306.js +3 -3
- package/dist/index307.js +57 -32
- package/dist/index308.js +10 -3
- package/dist/index309.js +6 -10
- package/dist/index312.js +46 -6
- package/dist/index313.js +2 -47
- package/dist/index315.js +2 -2
- package/dist/index316.js +426 -0
- package/dist/index317.js +43 -420
- package/dist/index318.js +2 -47
- package/dist/{index33.js → index32.js} +3 -3
- package/dist/{index35.js → index34.js} +4 -4
- package/dist/{index37.js → index36.js} +22 -23
- package/dist/{index39.js → index38.js} +6 -6
- package/dist/index4.js +40 -14
- package/dist/{index41.js → index40.js} +2 -2
- package/dist/{index43.js → index42.js} +3 -3
- package/dist/{index45.js → index44.js} +20 -21
- package/dist/{index47.js → index46.js} +3 -3
- package/dist/{index49.js → index48.js} +2 -2
- package/dist/index5.js +76 -38
- package/dist/{index51.js → index50.js} +3 -3
- package/dist/{index53.js → index52.js} +2 -2
- package/dist/{index55.js → index54.js} +2 -2
- package/dist/{index57.js → index56.js} +2 -2
- package/dist/{index59.js → index58.js} +1 -1
- package/dist/index6.js +62 -78
- package/dist/{index61.js → index60.js} +5 -6
- package/dist/{index63.js → index62.js} +2 -2
- package/dist/{index65.js → index64.js} +2 -2
- package/dist/{index67.js → index66.js} +2 -2
- package/dist/{index69.js → index68.js} +4 -4
- package/dist/index7.js +10 -60
- package/dist/{index71.js → index70.js} +2 -2
- package/dist/{index73.js → index72.js} +1 -1
- package/dist/{index75.js → index74.js} +99 -85
- package/dist/{index77.js → index76.js} +6 -7
- package/dist/{index79.js → index78.js} +4 -4
- package/dist/index8.js +7 -11
- package/dist/index80.js +46 -0
- package/dist/index81.js +120 -37
- package/dist/{index84.js → index83.js} +5 -5
- package/dist/{index86.js → index85.js} +17 -18
- package/dist/{index88.js → index87.js} +6 -6
- package/dist/{index90.js → index89.js} +1 -1
- package/dist/index9.js +78 -7
- package/dist/{index92.js → index91.js} +2 -2
- package/dist/{index94.js → index93.js} +2 -2
- package/dist/{index96.js → index95.js} +2 -2
- package/dist/{index100.js → index99.js} +2 -2
- package/package.json +3 -3
- package/dist/index13.js +0 -84
- package/dist/index176.js +0 -5
- package/dist/index192.js +0 -5
- package/dist/index206.js +0 -166
- package/dist/index232.js +0 -251
- package/dist/index244.js +0 -108
- package/dist/index251.js +0 -8
- package/dist/index269.js +0 -4
- package/dist/index293.js +0 -6
- package/dist/index314.js +0 -4
- package/dist/index319.js +0 -4
- package/dist/index82.js +0 -129
- package/dist/style.css +0 -1
- /package/dist/{index122.js → index121.js} +0 -0
- /package/dist/{index165.js → index166.js} +0 -0
- /package/dist/{index190.js → index191.js} +0 -0
- /package/dist/{index98.js → index97.js} +0 -0
package/dist/index7.js
CHANGED
@@ -1,64 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
if (!t)
|
11
|
-
throw new Error("You must define a duration for the coundown");
|
12
|
-
const e = c(t), u = c(0), M = o(() => p(u.value, t)), m = 100, r = c(!1), n = c(!1);
|
13
|
-
let a;
|
14
|
-
const I = () => {
|
15
|
-
u.value === t || r.value && !n.value || (f && f(), n.value = !1, r.value = !0, a = setInterval(() => {
|
16
|
-
e.value = Math.max(e.value - m, 0), u.value = Math.min(u.value + m, t), e.value === 0 && w(0).then(() => {
|
17
|
-
clearInterval(a), r.value = !1, s && s(), i && i();
|
18
|
-
});
|
19
|
-
}, m));
|
20
|
-
}, d = () => {
|
21
|
-
A(), I();
|
22
|
-
}, A = () => {
|
23
|
-
a && clearInterval(a), n.value || s && s(), e.value = t, u.value = 0, r.value = !1, n.value = !1;
|
24
|
-
}, g = () => {
|
25
|
-
a && clearInterval(a), n.value || s && s(), n.value = !0;
|
26
|
-
}, y = o(() => {
|
27
|
-
const l = Math.trunc(e.value / 864e5), v = Math.trunc((e.value - l * 864e5) / 36e5), h = Math.trunc(
|
28
|
-
(e.value - v * 36e5 - l * 864e5) / 6e4
|
29
|
-
), D = Math.trunc(
|
30
|
-
(e.value - h * 6e4 - v * 36e5 - l * 864e5) / 1e3
|
31
|
-
);
|
32
|
-
return {
|
33
|
-
days: l,
|
34
|
-
hours: v,
|
35
|
-
minutes: h,
|
36
|
-
seconds: D
|
37
|
-
};
|
38
|
-
});
|
39
|
-
return H(() => clearInterval(a)), {
|
40
|
-
/** Elapsed milliseconds since starting the timer */
|
41
|
-
elapsed: o(() => u.value),
|
42
|
-
/** Remaining milliseconds */
|
43
|
-
remaining: o(() => e.value),
|
44
|
-
/** Remaining as a formatted object for display */
|
45
|
-
remainingFormatted: y,
|
46
|
-
/** Percentage of elapsed time against duration */
|
47
|
-
progress: M,
|
48
|
-
/** Starts the timer */
|
49
|
-
start: I,
|
50
|
-
/** Reset the timer to intiial state and starts again */
|
51
|
-
restart: d,
|
52
|
-
/** Pauses the timer */
|
53
|
-
pause: g,
|
54
|
-
/** Reset the timer to initial state, if the timer is running it is stopped */
|
55
|
-
reset: A,
|
56
|
-
/** Boolean, is the timer running (paused doesn't change running state) */
|
57
|
-
running: r,
|
58
|
-
/** Boolean is the timer paused */
|
59
|
-
paused: n
|
1
|
+
import { ref as s, useId as t } from "vue";
|
2
|
+
const r = () => "bb-ui-" + t(), n = () => {
|
3
|
+
const e = s(r());
|
4
|
+
return {
|
5
|
+
/**
|
6
|
+
* The generated id
|
7
|
+
*/
|
8
|
+
id: e,
|
9
|
+
refresh: () => e.value = r()
|
60
10
|
};
|
61
11
|
};
|
62
12
|
export {
|
63
|
-
|
13
|
+
n as useId
|
64
14
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineComponent as m, ref as u, computed as c, openBlock as h, createBlock as f, withCtx as l, renderSlot as b, normalizeProps as v, guardReactiveProps as y, createVNode as w, mergeProps as g } from "vue";
|
2
|
-
import B from "./
|
2
|
+
import B from "./index22.js";
|
3
3
|
/* empty css */
|
4
|
-
import k from "./
|
4
|
+
import k from "./index26.js";
|
5
5
|
/* empty css */
|
6
6
|
const E = /* @__PURE__ */ m({
|
7
7
|
__name: "BbDatePickerInput",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as d, computed as u, openBlock as m, createBlock as f, mergeProps as y, withCtx as l, renderSlot as t, normalizeProps as a, guardReactiveProps as r } from "vue";
|
2
|
-
import $ from "./
|
2
|
+
import $ from "./index24.js";
|
3
3
|
/* empty css */
|
4
4
|
const b = /* @__PURE__ */ d({
|
5
5
|
__name: "BbDialog",
|
@@ -1,14 +1,16 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { findRightIndex as
|
3
|
-
import { useId as
|
4
|
-
import { wait as
|
5
|
-
import { useIntersectionObserver as
|
6
|
-
import
|
1
|
+
import { defineComponent as X, computed as A, ref as y, openBlock as h, createElementBlock as T, mergeProps as B, createElementVNode as H, renderSlot as w, normalizeProps as Y, guardReactiveProps as Z, unref as $, createVNode as C, withCtx as O, normalizeStyle as x, Fragment as K, renderList as ee, createBlock as P, createCommentVNode as N, toDisplayString as te } from "vue";
|
2
|
+
import { findRightIndex as I } from "./index253.js";
|
3
|
+
import { useId as ne } from "./index7.js";
|
4
|
+
import { wait as oe } from "./index130.js";
|
5
|
+
import { useIntersectionObserver as ae } from "./index131.js";
|
6
|
+
import le from "./index12.js";
|
7
7
|
/* empty css */
|
8
|
-
import
|
9
|
-
import
|
8
|
+
import V from "./index254.js";
|
9
|
+
import se from "./index255.js";
|
10
10
|
/* empty css */
|
11
|
-
|
11
|
+
import j from "./index125.js";
|
12
|
+
/* empty css */
|
13
|
+
const ie = { class: "item__content" }, ke = /* @__PURE__ */ X({
|
12
14
|
__name: "BbDropdown",
|
13
15
|
props: {
|
14
16
|
arrowPadding: { default: 10 },
|
@@ -25,47 +27,47 @@ const pe = /* @__PURE__ */ J({
|
|
25
27
|
width: { default: 200 }
|
26
28
|
},
|
27
29
|
setup(z) {
|
28
|
-
const r = z,
|
29
|
-
let e = r.items.findIndex((t) => !t.disabled), o =
|
30
|
+
const r = z, u = r.id ?? `bb_${ne().id.value}`, m = A(() => {
|
31
|
+
let e = r.items.findIndex((t) => !t.disabled), o = I(
|
30
32
|
r.items,
|
31
33
|
(t) => !t.disabled
|
32
34
|
);
|
33
35
|
return r.items.map((t, n) => {
|
34
|
-
const i = `${
|
36
|
+
const i = `${u}-item-${t.key}`, { onClick: q, ...F } = t, Q = async () => {
|
35
37
|
await b();
|
36
|
-
const s = document.querySelector(`#${
|
38
|
+
const s = document.querySelector(`#${u}`);
|
37
39
|
if (s) s instanceof HTMLElement && s.focus();
|
38
40
|
else return;
|
39
41
|
q && q();
|
40
|
-
},
|
42
|
+
}, W = (s) => {
|
41
43
|
if (s.target instanceof HTMLElement && s.target.dataset.dropdownItem) {
|
42
44
|
if (!a.value) return;
|
43
45
|
if (s.key === "ArrowDown") {
|
44
46
|
if (s.preventDefault(), a.value && n !== o) {
|
45
|
-
const
|
46
|
-
|
47
|
+
const d = a.value.querySelector(
|
48
|
+
V.map((g) => `#${i} ~ ${g}`).join(",")
|
47
49
|
);
|
48
|
-
|
50
|
+
d && d instanceof HTMLElement && d.focus();
|
49
51
|
}
|
50
52
|
} else if (s.key === "ArrowUp") {
|
51
53
|
if (s.preventDefault(), a.value && n !== e) {
|
52
|
-
const
|
54
|
+
const d = I(r.items, (E, D) => D < n && !E.disabled), k = Array.from(
|
53
55
|
a.value.querySelectorAll(".bb-dropdown__item")
|
54
|
-
)[
|
56
|
+
)[d];
|
55
57
|
k && k instanceof HTMLElement && k.focus();
|
56
58
|
}
|
57
59
|
} else if (s.key === "Tab") {
|
58
60
|
if (n === o && !s.shiftKey) {
|
59
|
-
const
|
60
|
-
document.querySelectorAll(
|
61
|
-
), k =
|
62
|
-
(
|
63
|
-
), E =
|
61
|
+
const d = V.join(","), g = Array.from(
|
62
|
+
document.querySelectorAll(d)
|
63
|
+
), k = g.findIndex(
|
64
|
+
(D) => D.id === u
|
65
|
+
), E = g[k + 1];
|
64
66
|
if (E) E instanceof HTMLElement && (s.preventDefault(), b(), E.focus());
|
65
67
|
else return;
|
66
68
|
} else if (n === e && s.shiftKey) {
|
67
|
-
const
|
68
|
-
if (
|
69
|
+
const d = document.querySelector(`#${u}`);
|
70
|
+
if (d) d instanceof HTMLElement && (s.preventDefault(), d.focus());
|
69
71
|
else return;
|
70
72
|
}
|
71
73
|
}
|
@@ -75,34 +77,34 @@ const pe = /* @__PURE__ */ J({
|
|
75
77
|
...F,
|
76
78
|
disabled: F.disabled || r.disabled,
|
77
79
|
id: i,
|
78
|
-
onClick:
|
79
|
-
onKeydown:
|
80
|
+
onClick: Q,
|
81
|
+
onKeydown: W
|
80
82
|
};
|
81
83
|
});
|
82
|
-
}), v =
|
83
|
-
|
84
|
+
}), v = y(), a = y();
|
85
|
+
ae(
|
84
86
|
v,
|
85
87
|
([{ intersectionRatio: e }]) => {
|
86
88
|
e !== 1 && l.value && b();
|
87
89
|
},
|
88
90
|
{ threshold: [0, 1] }
|
89
91
|
);
|
90
|
-
const c =
|
91
|
-
c.value ||
|
92
|
-
},
|
93
|
-
let o = r.items.findIndex((n) => !n.disabled), t =
|
92
|
+
const c = y(!1), l = y(!1), p = y(!1), f = y(!0), R = () => {
|
93
|
+
c.value || p.value || (l.value ? b() : L());
|
94
|
+
}, U = async (e) => {
|
95
|
+
let o = r.items.findIndex((n) => !n.disabled), t = I(
|
94
96
|
r.items,
|
95
97
|
(n) => !n.disabled
|
96
98
|
);
|
97
99
|
if (e.key === "ArrowDown") {
|
98
|
-
if (e.preventDefault(),
|
99
|
-
if (
|
100
|
+
if (e.preventDefault(), p.value || c.value) return;
|
101
|
+
if (f.value && await L(), a.value && m.value.length && o !== -1) {
|
100
102
|
const n = m.value[o].id, i = a.value.querySelector(`#${n}`);
|
101
103
|
i && i instanceof HTMLElement && i.focus();
|
102
104
|
}
|
103
105
|
} else if (e.key === "ArrowUp") {
|
104
|
-
if (e.preventDefault(),
|
105
|
-
if (
|
106
|
+
if (e.preventDefault(), p.value || c.value) return;
|
107
|
+
if (f.value && await L(), a.value && m.value.length && t !== -1) {
|
106
108
|
const n = m.value[t].id, i = a.value.querySelector(`#${n}`);
|
107
109
|
i && i instanceof HTMLElement && i.focus();
|
108
110
|
}
|
@@ -110,66 +112,66 @@ const pe = /* @__PURE__ */ J({
|
|
110
112
|
const n = m.value[o].id, i = a.value.querySelector(`#${n}`);
|
111
113
|
i && i instanceof HTMLElement && i.focus();
|
112
114
|
}
|
113
|
-
},
|
115
|
+
}, M = (e) => {
|
114
116
|
const o = e.target;
|
115
117
|
if (o && o instanceof HTMLElement) {
|
116
118
|
let t = !0;
|
117
119
|
v.value && v.value.contains(o) && (t = !1), a.value && a.value.contains(o) && (t = !1), t && b();
|
118
120
|
}
|
119
|
-
},
|
121
|
+
}, S = (e) => {
|
120
122
|
const o = e.target;
|
121
123
|
if (o && o instanceof HTMLElement) {
|
122
124
|
let t = !0;
|
123
125
|
v.value && v.value.contains(o) && (t = !1), a.value && a.value.contains(o) && (t = !1), t && b();
|
124
126
|
}
|
125
|
-
},
|
127
|
+
}, _ = (e) => {
|
126
128
|
var o;
|
127
129
|
if (l.value && e.key === "Escape") {
|
128
|
-
if (((o = document.activeElement) == null ? void 0 : o.id) !==
|
129
|
-
const t = document.querySelector(`#${
|
130
|
+
if (((o = document.activeElement) == null ? void 0 : o.id) !== u) {
|
131
|
+
const t = document.querySelector(`#${u}`);
|
130
132
|
t instanceof HTMLElement && t.focus();
|
131
133
|
}
|
132
134
|
b();
|
133
135
|
}
|
134
|
-
},
|
135
|
-
|
136
|
+
}, G = y(!1), L = async () => {
|
137
|
+
G.value = !0, await oe(50), l.value = !0, document.addEventListener("click", M, { passive: !0 }), document.addEventListener("focusin", S, { passive: !0 }), document.addEventListener("keydown", _, { passive: !0 });
|
136
138
|
}, b = async () => {
|
137
|
-
l.value = !1, document.removeEventListener("click",
|
138
|
-
},
|
139
|
+
l.value = !1, document.removeEventListener("click", M), document.removeEventListener("focusin", S), document.removeEventListener("keydown", _);
|
140
|
+
}, J = A(() => ({
|
139
141
|
class: {
|
140
142
|
"bb-dropdown--block": r.block,
|
141
143
|
[`bb-dropdown--theme-${r.theme}`]: r.theme
|
142
144
|
}
|
143
145
|
}));
|
144
|
-
return (e, o) => (
|
145
|
-
|
146
|
+
return (e, o) => (h(), T("span", B({ class: "bb-dropdown" }, J.value), [
|
147
|
+
H("span", {
|
146
148
|
ref_key: "wrapper",
|
147
149
|
ref: v,
|
148
150
|
class: "bb-dropdown__wrapper"
|
149
151
|
}, [
|
150
|
-
|
152
|
+
w(e.$slots, "activator", Y(Z({
|
151
153
|
props: {
|
152
154
|
"aria-expanded": l.value,
|
153
|
-
"aria-controls": `menu_${
|
154
|
-
id:
|
155
|
-
onClick:
|
156
|
-
onKeydown:
|
155
|
+
"aria-controls": `menu_${$(u)}`,
|
156
|
+
id: $(u),
|
157
|
+
onClick: R,
|
158
|
+
onKeydown: U,
|
157
159
|
disabled: e.disabled
|
158
160
|
},
|
159
|
-
closed:
|
160
|
-
closing:
|
161
|
+
closed: f.value,
|
162
|
+
closing: p.value,
|
161
163
|
disabled: e.disabled,
|
162
164
|
open: l.value,
|
163
165
|
opening: c.value,
|
164
166
|
placement: e.placement
|
165
167
|
})))
|
166
168
|
], 512),
|
167
|
-
|
169
|
+
C(se, {
|
168
170
|
"arrow-padding": e.arrowPadding,
|
169
171
|
"base-class": "bb-dropdown",
|
170
172
|
"container-attributes": {
|
171
|
-
id: `menu_${
|
172
|
-
"aria-labelledby":
|
173
|
+
id: `menu_${$(u)}`,
|
174
|
+
"aria-labelledby": $(u),
|
173
175
|
"aria-role": "menu"
|
174
176
|
},
|
175
177
|
eager: e.eager,
|
@@ -181,27 +183,27 @@ const pe = /* @__PURE__ */ J({
|
|
181
183
|
"transition-duration": e.transitionDuration,
|
182
184
|
wrapper: v.value
|
183
185
|
}, {
|
184
|
-
default:
|
185
|
-
|
186
|
+
default: O(() => [
|
187
|
+
H("span", {
|
186
188
|
ref_key: "content",
|
187
189
|
ref: a,
|
188
190
|
class: "bb-dropdown__items-container",
|
189
|
-
style:
|
191
|
+
style: x({ width: `${e.width}px` })
|
190
192
|
}, [
|
191
|
-
|
192
|
-
closed:
|
193
|
-
closing:
|
193
|
+
w(e.$slots, "prepend", {
|
194
|
+
closed: f.value,
|
195
|
+
closing: p.value,
|
194
196
|
disabled: e.disabled,
|
195
197
|
open: l.value,
|
196
198
|
opening: c.value,
|
197
199
|
placement: e.placement
|
198
200
|
}),
|
199
|
-
(
|
201
|
+
(h(!0), T(K, null, ee(m.value, (t, n) => (h(), T(K, {
|
200
202
|
key: t.key
|
201
203
|
}, [
|
202
|
-
|
203
|
-
closed:
|
204
|
-
closing:
|
204
|
+
w(e.$slots, "item:prepend", {
|
205
|
+
closed: f.value,
|
206
|
+
closing: p.value,
|
205
207
|
disabled: t.disabled,
|
206
208
|
index: n,
|
207
209
|
item: e.items[n],
|
@@ -210,7 +212,7 @@ const pe = /* @__PURE__ */ J({
|
|
210
212
|
placement: e.placement,
|
211
213
|
text: t.text
|
212
214
|
}),
|
213
|
-
|
215
|
+
C(le, B({
|
214
216
|
"aria-role": "menuitem",
|
215
217
|
class: ["bb-dropdown__item", {
|
216
218
|
"bb-dropdown__item--first": n === 0,
|
@@ -219,10 +221,10 @@ const pe = /* @__PURE__ */ J({
|
|
219
221
|
"data-dropdown-item": !0,
|
220
222
|
ref_for: !0
|
221
223
|
}, t), {
|
222
|
-
default:
|
223
|
-
|
224
|
-
closed:
|
225
|
-
closing:
|
224
|
+
default: O(() => [
|
225
|
+
w(e.$slots, t.key, {
|
226
|
+
closed: f.value,
|
227
|
+
closing: p.value,
|
226
228
|
disabled: t.disabled,
|
227
229
|
index: n,
|
228
230
|
item: t,
|
@@ -231,9 +233,9 @@ const pe = /* @__PURE__ */ J({
|
|
231
233
|
placement: e.placement,
|
232
234
|
text: t.text
|
233
235
|
}, () => [
|
234
|
-
|
235
|
-
closed:
|
236
|
-
closing:
|
236
|
+
w(e.$slots, "item", {
|
237
|
+
closed: f.value,
|
238
|
+
closing: p.value,
|
237
239
|
disabled: t.disabled,
|
238
240
|
index: n,
|
239
241
|
item: t,
|
@@ -241,14 +243,26 @@ const pe = /* @__PURE__ */ J({
|
|
241
243
|
opening: c.value,
|
242
244
|
placement: e.placement,
|
243
245
|
text: t.text
|
244
|
-
})
|
246
|
+
}, () => [
|
247
|
+
t["prepend:icon"] ? (h(), P(j, {
|
248
|
+
key: 0,
|
249
|
+
class: "item__prepend-icon",
|
250
|
+
type: t["prepend:icon"]
|
251
|
+
}, null, 8, ["type"])) : N("", !0),
|
252
|
+
H("span", ie, te(t.text), 1),
|
253
|
+
t["append:icon"] ? (h(), P(j, {
|
254
|
+
key: 1,
|
255
|
+
class: "item__append-icon",
|
256
|
+
type: t["append:icon"]
|
257
|
+
}, null, 8, ["type"])) : N("", !0)
|
258
|
+
])
|
245
259
|
])
|
246
260
|
]),
|
247
261
|
_: 2
|
248
262
|
}, 1040, ["class"]),
|
249
|
-
|
250
|
-
closed:
|
251
|
-
closing:
|
263
|
+
w(e.$slots, "item:append", {
|
264
|
+
closed: f.value,
|
265
|
+
closing: p.value,
|
252
266
|
disabled: t.disabled,
|
253
267
|
index: n,
|
254
268
|
item: e.items[n],
|
@@ -258,9 +272,9 @@ const pe = /* @__PURE__ */ J({
|
|
258
272
|
text: t.text
|
259
273
|
})
|
260
274
|
], 64))), 128)),
|
261
|
-
|
262
|
-
closed:
|
263
|
-
closing:
|
275
|
+
w(e.$slots, "append", {
|
276
|
+
closed: f.value,
|
277
|
+
closing: p.value,
|
264
278
|
disabled: e.disabled,
|
265
279
|
open: l.value,
|
266
280
|
opening: c.value,
|
@@ -274,5 +288,5 @@ const pe = /* @__PURE__ */ J({
|
|
274
288
|
}
|
275
289
|
});
|
276
290
|
export {
|
277
|
-
|
291
|
+
ke as default
|
278
292
|
};
|
@@ -1,18 +1,17 @@
|
|
1
1
|
import { defineComponent as z, ref as E, computed as B, openBlock as s, createElementBlock as $, normalizeClass as W, createVNode as l, mergeProps as C, withCtx as t, unref as m, createBlock as L, createCommentVNode as w, createElementVNode as u, toDisplayString as P, createSlots as A, renderSlot as a, normalizeProps as d, guardReactiveProps as r, renderList as I } from "vue";
|
2
|
-
import D from "./
|
2
|
+
import D from "./index12.js";
|
3
3
|
/* empty css */
|
4
|
-
import M from "./
|
4
|
+
import M from "./index74.js";
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
7
|
-
|
8
|
-
import N from "./index126.js";
|
7
|
+
import N from "./index125.js";
|
9
8
|
/* empty css */
|
10
|
-
import R from "./
|
9
|
+
import R from "./index127.js";
|
11
10
|
/* empty css */
|
12
11
|
const Z = { class: "bb-dropdown-button__content" }, j = {
|
13
12
|
key: 1,
|
14
13
|
class: "bb-dropdown-button__loading-label sr-only"
|
15
|
-
}, q = { class: "bb-dropdown-button__dropdown-label sr-only" },
|
14
|
+
}, q = { class: "bb-dropdown-button__dropdown-label sr-only" }, Y = /* @__PURE__ */ z({
|
16
15
|
__name: "BbDropdownButton",
|
17
16
|
props: {
|
18
17
|
arrowPadding: {},
|
@@ -155,5 +154,5 @@ const Z = { class: "bb-dropdown-button__content" }, j = {
|
|
155
154
|
}
|
156
155
|
});
|
157
156
|
export {
|
158
|
-
|
157
|
+
Y as default
|
159
158
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineComponent as j, ref as g, watch as x, computed as m, openBlock as V, createBlock as G, resolveDynamicComponent as K, normalizeClass as O, withCtx as M, createElementVNode as c, withModifiers as y, renderSlot as U, normalizeProps as Y, guardReactiveProps as Z, createTextVNode as J, unref as Q, createVNode as W, createElementBlock as F, Fragment as X, renderList as ee, toDisplayString as te } from "vue";
|
2
|
-
import { findInTree as ae } from "./
|
3
|
-
import { useId as re } from "./
|
4
|
-
import oe from "./
|
2
|
+
import { findInTree as ae } from "./index273.js";
|
3
|
+
import { useId as re } from "./index7.js";
|
4
|
+
import oe from "./index126.js";
|
5
5
|
/* empty css */
|
6
6
|
const le = ["accept", "autofocus", "disabled", "multiple"], se = { class: "bb-dropzone__submittable-label" }, ne = ["id", "disabled", "multiple", "name"], ie = { class: "bb-dropzone__errors" }, fe = /* @__PURE__ */ j({
|
7
7
|
__name: "BbDropzone",
|
@@ -53,7 +53,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = { class: "bb-dr
|
|
53
53
|
const r = a.accept[t];
|
54
54
|
if (r.includes("/")) e.push(r);
|
55
55
|
else {
|
56
|
-
b || (b = (await import("./
|
56
|
+
b || (b = (await import("./index272.js")).default);
|
57
57
|
const o = b.getType(r);
|
58
58
|
if (!o)
|
59
59
|
throw new Error(
|
package/dist/index8.js
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
*/
|
8
|
-
id: e,
|
9
|
-
refresh: () => e.value = r()
|
10
|
-
};
|
1
|
+
import { useWindowSize as i } from "./index131.js";
|
2
|
+
import { computed as e } from "vue";
|
3
|
+
import { _config as t } from "./index3.js";
|
4
|
+
const c = () => {
|
5
|
+
const { width: o } = i();
|
6
|
+
return { isMobile: e(() => o.value < t.mobileMaxWidth) };
|
11
7
|
};
|
12
8
|
export {
|
13
|
-
|
9
|
+
c as useMobile
|
14
10
|
};
|
package/dist/index80.js
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, openBlock as g, createBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
|
2
|
+
import { throttle as c } from "./index228.js";
|
3
|
+
const M = /* @__PURE__ */ h({
|
4
|
+
__name: "BbIntersection",
|
5
|
+
props: {
|
6
|
+
debounceTime: { default: 0 },
|
7
|
+
options: { default: () => ({
|
8
|
+
root: null,
|
9
|
+
threshold: [0, 0.2, 0.4, 0.6, 0.8, 1]
|
10
|
+
}) },
|
11
|
+
tag: { default: "div" }
|
12
|
+
},
|
13
|
+
emits: ["shown", "hidden", "intersected"],
|
14
|
+
setup(u, { emit: d }) {
|
15
|
+
const r = u, i = d, n = t(null), l = t(null), o = t(!1), s = t(!0), a = t(0);
|
16
|
+
m(() => {
|
17
|
+
n.value = new IntersectionObserver((e) => {
|
18
|
+
f(e[0]);
|
19
|
+
}, r.options), l.value && n.value.observe(l.value);
|
20
|
+
}), p(() => {
|
21
|
+
n.value && n.value.disconnect();
|
22
|
+
});
|
23
|
+
const f = c((e) => {
|
24
|
+
e.isIntersecting ? (a.value = Math.trunc(e.intersectionRatio * 100), e.intersectionRatio === 1 ? (o.value = !0, s.value = !1, i("shown")) : (o.value = !1, s.value = !1, v(Math.trunc(e.intersectionRatio * 100)))) : (o.value = !1, s.value = !0, i("hidden"));
|
25
|
+
}), v = c((e) => {
|
26
|
+
i("intersected", e);
|
27
|
+
}, r.debounceTime);
|
28
|
+
return (e, B) => (g(), b(w(e.tag), {
|
29
|
+
ref_key: "infinitescrolltrigger",
|
30
|
+
ref: l,
|
31
|
+
class: "bb-intersection"
|
32
|
+
}, {
|
33
|
+
default: _(() => [
|
34
|
+
I(e.$slots, "default", {
|
35
|
+
hidden: s.value,
|
36
|
+
percentage: a.value,
|
37
|
+
shown: o.value
|
38
|
+
})
|
39
|
+
]),
|
40
|
+
_: 3
|
41
|
+
}, 512));
|
42
|
+
}
|
43
|
+
});
|
44
|
+
export {
|
45
|
+
M as default
|
46
|
+
};
|