bitboss-ui 2.1.1 → 2.1.3
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/BaseNumberInput/BaseNumberInput.vue.d.ts +2 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +10 -2
- package/dist/index106.js +9 -9
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index121.js +10 -10
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index133.js +1 -1
- package/dist/index136.js +10 -20
- package/dist/index137.js +2 -2
- package/dist/index138.js +1 -1
- package/dist/index139.js +2 -2
- package/dist/index15.js +6 -6
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index206.js +2 -138
- package/dist/index207.js +2 -2
- package/dist/index208.js +138 -2
- package/dist/index21.js +7 -7
- package/dist/index210.js +2 -2
- package/dist/index212.js +84 -32
- package/dist/{index225.js → index214.js} +1 -1
- package/dist/index215.js +17 -13
- package/dist/index216.js +51 -4
- package/dist/index217.js +14 -19
- package/dist/index218.js +3 -197
- package/dist/index219.js +14 -0
- package/dist/index220.js +16 -113
- package/dist/index221.js +4 -0
- package/dist/index222.js +106 -3
- package/dist/index224.js +102 -0
- package/dist/index226.js +66 -17
- package/dist/index228.js +13 -15
- package/dist/index229.js +2 -3
- package/dist/index23.js +13 -13
- package/dist/index230.js +5 -12
- package/dist/index231.js +5 -16
- package/dist/index232.js +5 -2
- package/dist/index233.js +5 -4
- package/dist/index234.js +5 -5
- package/dist/index235.js +5 -5
- package/dist/index236.js +2 -5
- package/dist/index237.js +20 -5
- package/dist/index238.js +113 -5
- package/dist/index240.js +2 -2
- package/dist/index241.js +4 -2
- package/dist/index242.js +2 -2
- package/dist/index243.js +33 -17
- package/dist/index244.js +2 -12
- package/dist/index245.js +2 -6
- package/dist/index246.js +7 -106
- package/dist/index247.js +9 -0
- package/dist/index248.js +3 -100
- package/dist/index249.js +6 -0
- package/dist/index250.js +188 -219
- package/dist/index252.js +2 -2
- package/dist/index253.js +2 -2
- package/dist/index255.js +5 -5
- package/dist/index258.js +2 -2
- package/dist/index259.js +1 -1
- package/dist/index260.js +18 -2
- package/dist/index261.js +12 -2
- package/dist/index262.js +6 -2
- package/dist/index263.js +228 -10
- package/dist/index264.js +9 -2
- package/dist/index265.js +3 -6
- package/dist/index266.js +176 -15
- package/dist/index267.js +9 -3
- package/dist/index268.js +23 -9
- package/dist/index269.js +3 -9
- package/dist/index27.js +1 -1
- package/dist/index270.js +6 -23
- package/dist/index271.js +15 -8
- package/dist/index272.js +9 -8
- package/dist/index274.js +9 -5
- package/dist/index275.js +7 -66
- package/dist/index276.js +67 -5
- package/dist/index277.js +5 -8
- package/dist/index278.js +5 -7
- package/dist/index279.js +7 -10
- package/dist/index280.js +3 -2
- package/dist/index281.js +17 -3
- package/dist/index282.js +30 -0
- package/dist/index283.js +6 -6
- package/dist/index284.js +10 -3
- package/dist/index285.js +3 -5
- package/dist/index286.js +3 -4
- package/dist/index287.js +1 -1
- package/dist/index289.js +7 -28
- package/dist/index29.js +91 -87
- package/dist/index290.js +4 -3
- package/dist/index291.js +280 -3
- package/dist/index292.js +2 -280
- package/dist/index293.js +125 -2
- package/dist/index294.js +2 -125
- package/dist/index295.js +15 -2
- package/dist/index296.js +2 -15
- package/dist/index297.js +16 -2
- package/dist/index298.js +2 -16
- package/dist/index299.js +16 -2
- package/dist/index300.js +2 -16
- package/dist/index301.js +19 -2
- package/dist/index302.js +2 -19
- package/dist/index303.js +3 -2
- package/dist/index304.js +2 -3
- package/dist/index305.js +4 -3
- package/dist/index306.js +6 -2
- package/dist/index307.js +5 -6
- package/dist/index308.js +3 -19
- package/dist/index309.js +19 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +2 -27
- package/dist/index311.js +27 -2
- package/dist/index312.js +2 -2
- package/dist/index313.js +1 -1
- package/dist/index314.js +1 -1
- package/dist/index315.js +1 -1
- package/dist/index316.js +1 -21
- package/dist/index317.js +24 -0
- package/dist/index319.js +2 -701
- package/dist/index320.js +5 -354
- package/dist/index321.js +701 -58
- package/dist/index322.js +354 -2
- package/dist/index323.js +57 -7
- package/dist/index324.js +2 -6
- package/dist/index325.js +57 -7
- package/dist/index326.js +58 -7
- package/dist/index327.js +6 -227
- package/dist/index328.js +227 -57
- package/dist/index329.js +128 -57
- package/dist/index33.js +8 -8
- package/dist/index330.js +368 -32
- package/dist/index331.js +33 -28
- package/dist/index332.js +30 -0
- package/dist/index334.js +44 -366
- package/dist/index335.js +7 -46
- package/dist/index336.js +5 -6
- package/dist/index337.js +8 -19
- package/dist/index338.js +6 -92
- package/dist/index339.js +21 -0
- package/dist/index340.js +93 -3
- package/dist/index343.js +3 -127
- package/dist/index344.js +421 -467
- package/dist/index345.js +123 -43
- package/dist/index346.js +484 -0
- package/dist/index347.js +49 -0
- package/dist/index35.js +3 -3
- package/dist/index37.js +19 -19
- package/dist/index39.js +177 -167
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +8 -8
- package/dist/index47.js +2 -2
- package/dist/index49.js +3 -3
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +2 -2
- package/dist/index79.js +3 -3
- package/dist/index83.js +2 -2
- package/dist/index85.js +1 -1
- package/dist/index87.js +1 -1
- package/dist/index92.js +1 -1
- package/dist/index94.js +1 -1
- package/dist/index96.js +1 -1
- package/dist/utilities/functions/percentage.d.ts +14 -21
- package/dist/utilities/functions/snapToStep.d.ts +1 -0
- package/dist/utilities/functions/transpose.d.ts +1 -0
- package/dist/utilities/functions/transposePercent.d.ts +9 -0
- package/package.json +1 -1
- package/dist/index213.js +0 -68
- package/dist/index223.js +0 -88
- package/dist/index227.js +0 -53
- package/dist/index239.js +0 -7
- package/dist/index251.js +0 -179
- package/dist/index288.js +0 -19
- package/dist/index318.js +0 -7
- package/dist/index333.js +0 -131
- package/dist/index342.js +0 -438
package/dist/index47.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as h, ref as y, computed as u, onMounted as g, watch as B, nextTick as V, createBlock as $, openBlock as k, normalizeClass as C, withCtx as r, createVNode as i, unref as T, createElementVNode as v, mergeProps as x, renderSlot as t } from "vue";
|
2
|
-
import E from "./
|
3
|
-
import G from "./
|
2
|
+
import E from "./index228.js";
|
3
|
+
import G from "./index226.js";
|
4
4
|
/* empty css */
|
5
5
|
import M from "./index111.js";
|
6
6
|
/* empty css */
|
package/dist/index49.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as V, ref as h, computed as v, onMounted as B, onBeforeUnmount as M, watch as g, createElementBlock as i, openBlock as r, Fragment as w, createVNode as m, createElementVNode as $, normalizeClass as C, withCtx as n, unref as q, mergeProps as b, renderSlot as d } from "vue";
|
2
|
-
import E from "./
|
2
|
+
import E from "./index226.js";
|
3
3
|
/* empty css */
|
4
|
-
import I from "./
|
4
|
+
import I from "./index228.js";
|
5
5
|
import { isNotNil as N } from "./index140.js";
|
6
|
-
import { MaskInput as z } from "./
|
6
|
+
import { MaskInput as z } from "./index266.js";
|
7
7
|
const D = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type"], F = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type", "value"], U = /* @__PURE__ */ V({
|
8
8
|
__name: "BaseTextInput",
|
9
9
|
props: {
|
package/dist/index55.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as b, computed as z, ref as o, onMounted as g, createElementBlock as l, openBlock as i, normalizeProps as _, guardReactiveProps as h, renderSlot as k } from "vue";
|
2
|
-
import { isCssColor as y } from "./
|
2
|
+
import { isCssColor as y } from "./index240.js";
|
3
3
|
import { wait as C } from "./index135.js";
|
4
4
|
const w = ["alt", "sizes", "src", "srcset"], B = {
|
5
5
|
key: 1,
|
package/dist/index57.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as p, useSlots as d, computed as s, createElementBlock as m, openBlock as u, normalizeClass as g, createElementVNode as n, renderSlot as r, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
|
2
|
-
import { isCssColor as l } from "./
|
3
|
-
import { isNil as B } from "./
|
2
|
+
import { isCssColor as l } from "./index240.js";
|
3
|
+
import { isNil as B } from "./index245.js";
|
4
4
|
const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, N = /* @__PURE__ */ p({
|
5
5
|
__name: "BbBadge",
|
6
6
|
props: {
|
package/dist/index61.js
CHANGED
@@ -7,8 +7,8 @@ import p from "./index85.js";
|
|
7
7
|
/* empty css */
|
8
8
|
import T from "./index113.js";
|
9
9
|
/* empty css */
|
10
|
-
import { pickBy as W } from "./
|
11
|
-
import { noop as w } from "./
|
10
|
+
import { pickBy as W } from "./index264.js";
|
11
|
+
import { noop as w } from "./index265.js";
|
12
12
|
import { useLocale as D } from "./index210.js";
|
13
13
|
const E = {
|
14
14
|
key: 2,
|
package/dist/index79.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as N, computed as R, ref as E, watch as W, createBlock as h, openBlock as k, unref as f, normalizeClass as G, withCtx as D, createElementVNode as I, normalizeStyle as J, renderSlot as m, createElementBlock as q, Fragment as F, renderList as Q, createVNode as X, mergeProps as Y, createCommentVNode as A, toDisplayString as Z, normalizeProps as x, guardReactiveProps as ee } from "vue";
|
2
|
-
import { findRightIndex as T } from "./
|
2
|
+
import { findRightIndex as T } from "./index267.js";
|
3
3
|
import { useId as te } from "./index8.js";
|
4
4
|
import { useUntil as ne } from "./index211.js";
|
5
5
|
import { wait as oe } from "./index135.js";
|
@@ -7,9 +7,9 @@ import ae from "./index13.js";
|
|
7
7
|
/* empty css */
|
8
8
|
import B from "./index85.js";
|
9
9
|
/* empty css */
|
10
|
-
import le from "./
|
10
|
+
import le from "./index238.js";
|
11
11
|
/* empty css */
|
12
|
-
import K from "./
|
12
|
+
import K from "./index268.js";
|
13
13
|
const se = ["id", "aria-labelledby", "inert"], ie = { class: "item__content" }, Ee = /* @__PURE__ */ N({
|
14
14
|
__name: "BbDropdown",
|
15
15
|
props: {
|
package/dist/index83.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as j, ref as g, watch as x, computed as m, createBlock as G, openBlock as V, 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 "./
|
2
|
+
import { findInTree as ae } from "./index271.js";
|
3
3
|
import { useId as re } from "./index8.js";
|
4
4
|
import oe from "./index111.js";
|
5
5
|
/* empty css */
|
@@ -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("./index270.js")).default);
|
57
57
|
const o = b.getType(r);
|
58
58
|
if (!o)
|
59
59
|
throw new Error(
|
package/dist/index85.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as v, ref as p, getCurrentInstance as c, onServerPrefetch as w, onBeforeMount as z, inject as _, watch as b, computed as f, createElementBlock as h, openBlock as $, mergeProps as g } from "vue";
|
2
|
-
import { isCssColor as I } from "./
|
2
|
+
import { isCssColor as I } from "./index240.js";
|
3
3
|
const B = ["innerHTML"], k = /* @__PURE__ */ v({
|
4
4
|
__name: "BbIcon",
|
5
5
|
props: {
|
package/dist/index87.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, createBlock as g, openBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
|
2
|
-
import { throttle as c } from "./
|
2
|
+
import { throttle as c } from "./index269.js";
|
3
3
|
const M = /* @__PURE__ */ h({
|
4
4
|
__name: "BbIntersection",
|
5
5
|
props: {
|
package/dist/index92.js
CHANGED
@@ -3,7 +3,7 @@ import { defineComponent as V, mergeModels as W, useModel as U, computed as d, r
|
|
3
3
|
/* empty css */
|
4
4
|
import P from "./index13.js";
|
5
5
|
/* empty css */
|
6
|
-
import { debounce as X } from "./
|
6
|
+
import { debounce as X } from "./index272.js";
|
7
7
|
import { useLocale as H } from "./index210.js";
|
8
8
|
import { useRoute as J } from "./index142.js";
|
9
9
|
const K = ["aria-label"], Q = { class: "bb-pagination__page-label sr-only" }, Y = { class: "bb-pagination__page-label" }, Z = { class: "bb-pagination__page-label" }, ee = { class: "bb-pagination__page-label sr-only" }, ue = /* @__PURE__ */ V({
|
package/dist/index94.js
CHANGED
@@ -5,7 +5,7 @@ import { useLocale as U } from "./index210.js";
|
|
5
5
|
import { useUntil as W } from "./index211.js";
|
6
6
|
import q from "./index13.js";
|
7
7
|
/* empty css */
|
8
|
-
import A from "./
|
8
|
+
import A from "./index238.js";
|
9
9
|
/* empty css */
|
10
10
|
const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @__PURE__ */ V({
|
11
11
|
__name: "BbPopover",
|
package/dist/index96.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as r, computed as a, createElementBlock as l, openBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
|
2
|
-
import { clamp as p } from "./
|
2
|
+
import { clamp as p } from "./index206.js";
|
3
3
|
import { getAsPercentageBetween as i } from "./index136.js";
|
4
4
|
const _ = /* @__PURE__ */ r({
|
5
5
|
__name: "BbProgress",
|
@@ -2,32 +2,25 @@
|
|
2
2
|
* Get the percentage "a" represents in total
|
3
3
|
* @returns
|
4
4
|
*/
|
5
|
-
export declare const getAsPercentage: (a: number, total: number) => number;
|
5
|
+
export declare const getAsPercentage: (a: number, total: number, clamped?: boolean) => number;
|
6
6
|
/**
|
7
|
-
* Get
|
7
|
+
* Get a number knowing the percentage and the total
|
8
8
|
* @returns
|
9
9
|
*/
|
10
|
-
export declare const
|
10
|
+
export declare const getValueFromPercentage: (percentage: number, of: number) => number;
|
11
11
|
/**
|
12
12
|
* Normalize the bounds of a value
|
13
13
|
*/
|
14
|
-
export declare const getAsPercentageBetween: (a: number, min: number, max: number) => number;
|
14
|
+
export declare const getAsPercentageBetween: (a: number, min: number, max: number, clamped?: boolean) => number;
|
15
15
|
/**
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
16
|
+
* Calculate the actual value that corresponds to a given percentage within an interval
|
17
|
+
* @param percentage The percentage (0-100) to convert to a value
|
18
|
+
* @param intervalStart The start of the interval
|
19
|
+
* @param intervalEnd The end of the interval
|
20
|
+
* @returns The value that corresponds to the given percentage in the interval
|
21
|
+
* @example
|
22
|
+
* getValueFromPercentageInInterval(50, -20, 60) // returns 20
|
23
|
+
* getValueFromPercentageInInterval(0, 0, 100) // returns 0
|
24
|
+
* getValueFromPercentageInInterval(100, 0, 100) // returns 100
|
19
25
|
*/
|
20
|
-
|
21
|
-
value: number;
|
22
|
-
originalBounds: {
|
23
|
-
min: number;
|
24
|
-
max: number;
|
25
|
-
};
|
26
|
-
targetBounds: {
|
27
|
-
min: number;
|
28
|
-
max: number;
|
29
|
-
};
|
30
|
-
step: number;
|
31
|
-
};
|
32
|
-
export declare const transposeValue: (params: TransposeValueParameters) => number;
|
33
|
-
export {};
|
26
|
+
export declare const getValueFromPercentageInInterval: (percentage: number, intervalStart: number, intervalEnd: number) => number;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const snapToStep: (value: number, min: number, max: number, step: number) => number;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function transpose(value: number, fromMin: number, fromMax: number, toMin: number, toMax: number): number;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Transpose a percentage to a value
|
3
|
+
* @param value - The percentage to transpose 0 - 100
|
4
|
+
* @param min - The minimum value
|
5
|
+
* @param max - The maximum value
|
6
|
+
* @returns The value
|
7
|
+
*/
|
8
|
+
export declare const transposePercent: (value: number, // 0–100
|
9
|
+
min: number, max: number) => number;
|
package/package.json
CHANGED
package/dist/index213.js
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
import { defineComponent as _, ref as $, createElementBlock as k, openBlock as r, normalizeClass as y, renderSlot as n, createBlock as c, createCommentVNode as s, createVNode as p, createElementVNode as l, unref as i } from "vue";
|
2
|
-
/* empty css */
|
3
|
-
/* empty css */
|
4
|
-
import m from "./index85.js";
|
5
|
-
/* empty css */
|
6
|
-
import C from "./index113.js";
|
7
|
-
/* empty css */
|
8
|
-
import h from "./index330.js";
|
9
|
-
import B from "./index331.js";
|
10
|
-
/* empty css */
|
11
|
-
const v = { class: "bb-common-input-inner-container__prefix" }, I = { class: "bb-common-input-inner-container__suffix" }, A = /* @__PURE__ */ _({
|
12
|
-
__name: "CommonInputInnerContainer",
|
13
|
-
props: {
|
14
|
-
"append:icon": {},
|
15
|
-
clearable: { type: Boolean },
|
16
|
-
"prepend:icon": {},
|
17
|
-
preventFocus: { type: Boolean }
|
18
|
-
},
|
19
|
-
emits: ["click:clear"],
|
20
|
-
setup(u, { emit: d }) {
|
21
|
-
const t = u, f = d, o = $(), a = () => {
|
22
|
-
var e;
|
23
|
-
!o.value || t.preventFocus || (e = o.value.querySelector("input")) == null || e.focus();
|
24
|
-
}, b = () => {
|
25
|
-
f("click:clear"), a();
|
26
|
-
};
|
27
|
-
return (e, E) => (r(), k("span", {
|
28
|
-
ref_key: "container",
|
29
|
-
ref: o,
|
30
|
-
class: y(["bb-common-input-inner-container", {
|
31
|
-
"bb-common-input-inner-container--clearable": t.clearable
|
32
|
-
}]),
|
33
|
-
onClick: a
|
34
|
-
}, [
|
35
|
-
n(e.$slots, "prepend", {}, () => [
|
36
|
-
l("span", v, [
|
37
|
-
n(e.$slots, "prefix")
|
38
|
-
])
|
39
|
-
]),
|
40
|
-
e.$props["prepend:icon"] ? (r(), c(i(m), {
|
41
|
-
key: 0,
|
42
|
-
class: "bb-common-input-inner-container__prepend-icon",
|
43
|
-
type: e.$props["prepend:icon"]
|
44
|
-
}, null, 8, ["type"])) : s("", !0),
|
45
|
-
n(e.$slots, "default"),
|
46
|
-
p(B, {
|
47
|
-
"aria-hidden": !e.clearable,
|
48
|
-
tabindex: e.clearable ? 0 : -1,
|
49
|
-
onClick: b
|
50
|
-
}, null, 8, ["aria-hidden", "tabindex"]),
|
51
|
-
e.$props["append:icon"] ? (r(), c(i(m), {
|
52
|
-
key: 1,
|
53
|
-
class: "bb-common-input-inner-container__append-icon",
|
54
|
-
type: e.$props["append:icon"]
|
55
|
-
}, null, 8, ["type"])) : s("", !0),
|
56
|
-
p(h),
|
57
|
-
p(i(C)),
|
58
|
-
n(e.$slots, "append", {}, () => [
|
59
|
-
l("span", I, [
|
60
|
-
n(e.$slots, "suffix")
|
61
|
-
])
|
62
|
-
])
|
63
|
-
], 2));
|
64
|
-
}
|
65
|
-
});
|
66
|
-
export {
|
67
|
-
A as default
|
68
|
-
};
|
package/dist/index223.js
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
import { defineComponent as h, createElementBlock as n, openBlock as s, normalizeClass as r, createElementVNode as l, renderSlot as t, createCommentVNode as p, createTextVNode as o, toDisplayString as d, unref as b, Fragment as m, renderList as u } from "vue";
|
2
|
-
import { useLocale as g } from "./index210.js";
|
3
|
-
const k = { class: "bb-cr-container__container" }, y = {
|
4
|
-
key: 0,
|
5
|
-
class: "bb-cr-container__loading-container"
|
6
|
-
}, $ = {
|
7
|
-
key: 1,
|
8
|
-
class: "bb-cr-container__no-data-container"
|
9
|
-
}, C = /* @__PURE__ */ h({
|
10
|
-
__name: "OptionsContainer",
|
11
|
-
props: {
|
12
|
-
direction: {},
|
13
|
-
hasErrors: { type: Boolean },
|
14
|
-
hideLabel: { type: Boolean },
|
15
|
-
loadingText: {},
|
16
|
-
loading: { type: Boolean },
|
17
|
-
noDataText: {},
|
18
|
-
options: {}
|
19
|
-
},
|
20
|
-
setup(f) {
|
21
|
-
const { t: i } = g();
|
22
|
-
return (a, T) => (s(), n("span", {
|
23
|
-
ref: "container",
|
24
|
-
class: r(["bb-cr-container", {
|
25
|
-
"bb-cr-container--errors": a.hasErrors,
|
26
|
-
"bb-cr-container--horizontal": a.direction === "horizontal",
|
27
|
-
"bb-cr-container--vertical": a.direction === "vertical"
|
28
|
-
}])
|
29
|
-
}, [
|
30
|
-
l("span", k, [
|
31
|
-
t(a.$slots, "prepend"),
|
32
|
-
!a.options.length && a.loading ? (s(), n("span", y, [
|
33
|
-
t(a.$slots, "loading", {}, () => [
|
34
|
-
o(d(a.loadingText || b(i)("common.loadingText")), 1)
|
35
|
-
])
|
36
|
-
])) : a.options.length ? p("", !0) : (s(), n("span", $, [
|
37
|
-
t(a.$slots, "no-data", {}, () => [
|
38
|
-
o(d(a.noDataText || b(i)("common.noDataText")), 1)
|
39
|
-
])
|
40
|
-
])),
|
41
|
-
(s(!0), n(m, null, u(a.options, (e, c) => (s(), n(m, {
|
42
|
-
key: (e == null ? void 0 : e.valueHash) || c
|
43
|
-
}, [
|
44
|
-
t(a.$slots, "option:prepend", {
|
45
|
-
id: e.valueHash,
|
46
|
-
checked: !!e.selected,
|
47
|
-
disabled: !!e.disabled,
|
48
|
-
item: e.item,
|
49
|
-
text: e.text
|
50
|
-
}),
|
51
|
-
l("label", {
|
52
|
-
class: r(["bb-cr-container-option", { "bb-base-radio-selected": e.selected }])
|
53
|
-
}, [
|
54
|
-
t(a.$slots, "input", {
|
55
|
-
index: c,
|
56
|
-
option: e
|
57
|
-
}),
|
58
|
-
l("span", {
|
59
|
-
class: r({
|
60
|
-
"bb-cr-container-option__text": !0,
|
61
|
-
"sr-only": a.hideLabel
|
62
|
-
})
|
63
|
-
}, [
|
64
|
-
t(a.$slots, "label", {
|
65
|
-
checked: !!e.selected,
|
66
|
-
item: e.item,
|
67
|
-
text: e.text
|
68
|
-
}, () => [
|
69
|
-
o(d(e.text), 1)
|
70
|
-
])
|
71
|
-
], 2)
|
72
|
-
], 2),
|
73
|
-
t(a.$slots, "option:append", {
|
74
|
-
id: e.valueHash,
|
75
|
-
checked: !!e.selected,
|
76
|
-
disabled: !!e.disabled,
|
77
|
-
item: e.item,
|
78
|
-
text: e.text
|
79
|
-
})
|
80
|
-
], 64))), 128)),
|
81
|
-
t(a.$slots, "append")
|
82
|
-
])
|
83
|
-
], 2));
|
84
|
-
}
|
85
|
-
});
|
86
|
-
export {
|
87
|
-
C as default
|
88
|
-
};
|
package/dist/index227.js
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
import { computed as l, unref as o } from "vue";
|
2
|
-
import { useItemText as x } from "./index288.js";
|
3
|
-
import { useItemValue as w } from "./index271.js";
|
4
|
-
import { hash as y } from "./index229.js";
|
5
|
-
import { useLogger as D } from "./index254.js";
|
6
|
-
const { getItemText: O } = x(), { getItemValue: V } = w(), { warn: H } = D(), T = (u, c, m, a, d, r) => r ? !1 : !!(c || u.disabled || a && d >= a), q = ({
|
7
|
-
items: u,
|
8
|
-
disabled: c,
|
9
|
-
selectable: m,
|
10
|
-
itemText: a,
|
11
|
-
itemValue: d,
|
12
|
-
selectedIndexedByHash: r,
|
13
|
-
max: b = 1 / 0
|
14
|
-
}) => {
|
15
|
-
const v = l(() => o(c)), p = l(() => o(u)), h = l(
|
16
|
-
() => Object.keys(r.value).length
|
17
|
-
), g = o(b), f = (e) => {
|
18
|
-
const n = V(e, o(d)), t = y(n), i = O(e, o(a)), s = r.value[t] !== void 0, I = T(
|
19
|
-
e,
|
20
|
-
v.value,
|
21
|
-
m,
|
22
|
-
g,
|
23
|
-
h.value,
|
24
|
-
s
|
25
|
-
);
|
26
|
-
return {
|
27
|
-
item: e,
|
28
|
-
text: i,
|
29
|
-
value: n,
|
30
|
-
valueHash: t,
|
31
|
-
selected: s,
|
32
|
-
disabled: o(I)
|
33
|
-
};
|
34
|
-
};
|
35
|
-
return {
|
36
|
-
options: l(() => {
|
37
|
-
const e = [], n = /* @__PURE__ */ new Set();
|
38
|
-
for (let t = 0; t < p.value.length; t++) {
|
39
|
-
const i = p.value[t];
|
40
|
-
i.disabled && H(
|
41
|
-
"Disabling an item by passing a disabled option to the item itself is deprecated and will be removed in a future version. Use the `disabled` prop or the `selectable` iteratee prop instead."
|
42
|
-
);
|
43
|
-
const s = f(i);
|
44
|
-
n.has(s.valueHash) || (n.add(s.valueHash), e.push(s));
|
45
|
-
}
|
46
|
-
return e;
|
47
|
-
}),
|
48
|
-
createOption: f
|
49
|
-
};
|
50
|
-
};
|
51
|
-
export {
|
52
|
-
q as useBaseOptions
|
53
|
-
};
|
package/dist/index239.js
DELETED
package/dist/index251.js
DELETED
@@ -1,179 +0,0 @@
|
|
1
|
-
var w = Object.defineProperty, C = (a, t, e) => t in a ? w(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, A = (a, t, e) => C(a, typeof t != "symbol" ? t + "" : t, e);
|
2
|
-
const R = {
|
3
|
-
"#": { pattern: /[0-9]/ },
|
4
|
-
"@": { pattern: /[a-zA-Z]/ },
|
5
|
-
"*": { pattern: /[a-zA-Z0-9]/ }
|
6
|
-
}, N = (a, t, e) => a.replaceAll(t, "").replace(e, ".").replace("..", ".").replace(/[^.\d]/g, ""), I = (a, t, e) => {
|
7
|
-
var s;
|
8
|
-
return new Intl.NumberFormat(((s = e.number) == null ? void 0 : s.locale) ?? "en", {
|
9
|
-
minimumFractionDigits: a,
|
10
|
-
maximumFractionDigits: t,
|
11
|
-
roundingMode: "trunc"
|
12
|
-
});
|
13
|
-
}, P = (a, t = !0, e) => {
|
14
|
-
var s, r, n, h;
|
15
|
-
const u = ((s = e.number) == null ? void 0 : s.unsigned) !== !0 && a.startsWith("-") ? "-" : "", l = ((r = e.number) == null ? void 0 : r.fraction) ?? 0;
|
16
|
-
let o = I(0, l, e);
|
17
|
-
const k = o.formatToParts(1000.12), c = ((n = k.find((i) => i.type === "group")) == null ? void 0 : n.value) ?? " ", b = ((h = k.find((i) => i.type === "decimal")) == null ? void 0 : h.value) ?? ".", f = N(a, c, b);
|
18
|
-
if (Number.isNaN(parseFloat(f))) return u;
|
19
|
-
const g = f.split(".");
|
20
|
-
if (g[1] != null && g[1].length >= 1) {
|
21
|
-
const i = g[1].length <= l ? g[1].length : l;
|
22
|
-
o = I(i, l, e);
|
23
|
-
}
|
24
|
-
let m = o.format(parseFloat(f));
|
25
|
-
return t ? l > 0 && f.endsWith(".") && !f.slice(0, -1).includes(".") && (m += b) : m = N(m, c, b), u + m;
|
26
|
-
};
|
27
|
-
class T {
|
28
|
-
constructor(t = {}) {
|
29
|
-
A(this, "opts", {}), A(this, "memo", /* @__PURE__ */ new Map());
|
30
|
-
const e = { ...t };
|
31
|
-
if (e.tokens != null) {
|
32
|
-
e.tokens = e.tokensReplace ? { ...e.tokens } : { ...R, ...e.tokens };
|
33
|
-
for (const s of Object.values(e.tokens))
|
34
|
-
typeof s.pattern == "string" && (s.pattern = new RegExp(s.pattern));
|
35
|
-
} else
|
36
|
-
e.tokens = R;
|
37
|
-
Array.isArray(e.mask) && (e.mask.length > 1 ? e.mask = [...e.mask].sort((s, r) => s.length - r.length) : e.mask = e.mask[0] ?? ""), e.mask === "" && (e.mask = null), this.opts = e;
|
38
|
-
}
|
39
|
-
masked(t) {
|
40
|
-
return this.process(String(t), this.findMask(String(t)));
|
41
|
-
}
|
42
|
-
unmasked(t) {
|
43
|
-
return this.process(String(t), this.findMask(String(t)), !1);
|
44
|
-
}
|
45
|
-
isEager() {
|
46
|
-
return this.opts.eager === !0;
|
47
|
-
}
|
48
|
-
isReversed() {
|
49
|
-
return this.opts.reversed === !0;
|
50
|
-
}
|
51
|
-
completed(t) {
|
52
|
-
const e = this.findMask(String(t));
|
53
|
-
if (this.opts.mask == null || e == null) return !1;
|
54
|
-
const s = this.process(String(t), e).length;
|
55
|
-
return typeof this.opts.mask == "string" ? s >= this.opts.mask.length : s >= e.length;
|
56
|
-
}
|
57
|
-
findMask(t) {
|
58
|
-
const e = this.opts.mask;
|
59
|
-
if (e == null)
|
60
|
-
return null;
|
61
|
-
if (typeof e == "string")
|
62
|
-
return e;
|
63
|
-
if (typeof e == "function")
|
64
|
-
return e(t);
|
65
|
-
const s = this.process(t, e.slice(-1).pop() ?? "", !1);
|
66
|
-
return e.find((r) => this.process(t, r, !1).length >= s.length) ?? "";
|
67
|
-
}
|
68
|
-
escapeMask(t) {
|
69
|
-
const e = [], s = [];
|
70
|
-
return t.split("").forEach((r, n) => {
|
71
|
-
r === "!" && t[n - 1] !== "!" ? s.push(n - s.length) : e.push(r);
|
72
|
-
}), { mask: e.join(""), escaped: s };
|
73
|
-
}
|
74
|
-
process(t, e, s = !0) {
|
75
|
-
if (this.opts.number != null) return P(t, s, this.opts);
|
76
|
-
if (e == null) return t;
|
77
|
-
const r = `v=${t},mr=${e},m=${s ? 1 : 0}`;
|
78
|
-
if (this.memo.has(r)) return this.memo.get(r);
|
79
|
-
const { mask: n, escaped: h } = this.escapeMask(e), u = [], l = this.opts.tokens != null ? this.opts.tokens : {}, o = this.isReversed() ? -1 : 1, k = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : n.length - 1, b = this.isReversed() ? () => i > -1 && p > -1 : () => i < n.length && p < t.length, f = (v) => !this.isReversed() && v <= c || this.isReversed() && v >= c;
|
80
|
-
let g, m = -1, i = this.isReversed() ? n.length - 1 : 0, p = this.isReversed() ? t.length - 1 : 0, M = !1;
|
81
|
-
for (; b(); ) {
|
82
|
-
const v = n.charAt(i), d = l[v], y = (d == null ? void 0 : d.transform) != null ? d.transform(t.charAt(p)) : t.charAt(p);
|
83
|
-
if (!h.includes(i) && d != null ? (y.match(d.pattern) != null ? (u[k](y), d.repeated ? (m === -1 ? m = i : i === c && i !== m && (i = m - o), c === m && (i -= o)) : d.multiple && (M = !0, i -= o), i += o) : d.multiple ? M && (i += o, p -= o, M = !1) : y === g ? g = void 0 : d.optional && (i += o, p -= o), p += o) : (s && !this.isEager() && u[k](v), y === v && !this.isEager() ? p += o : g = v, this.isEager() || (i += o)), this.isEager())
|
84
|
-
for (; f(i) && (l[n.charAt(i)] == null || h.includes(i)); ) {
|
85
|
-
if (s) {
|
86
|
-
if (u[k](n.charAt(i)), t.charAt(p) === n.charAt(i)) {
|
87
|
-
i += o, p += o;
|
88
|
-
continue;
|
89
|
-
}
|
90
|
-
} else n.charAt(i) === t.charAt(p) && (p += o);
|
91
|
-
i += o;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
return this.memo.set(r, u.join("")), this.memo.get(r);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
const S = (a) => JSON.parse(a.replaceAll("'", '"')), F = (a, t = {}) => {
|
98
|
-
const e = { ...t };
|
99
|
-
a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = W(a.dataset.maska)), a.dataset.maskaEager != null && (e.eager = E(a.dataset.maskaEager)), a.dataset.maskaReversed != null && (e.reversed = E(a.dataset.maskaReversed)), a.dataset.maskaTokensReplace != null && (e.tokensReplace = E(a.dataset.maskaTokensReplace)), a.dataset.maskaTokens != null && (e.tokens = x(a.dataset.maskaTokens));
|
100
|
-
const s = {};
|
101
|
-
return a.dataset.maskaNumberLocale != null && (s.locale = a.dataset.maskaNumberLocale), a.dataset.maskaNumberFraction != null && (s.fraction = parseInt(a.dataset.maskaNumberFraction)), a.dataset.maskaNumberUnsigned != null && (s.unsigned = E(a.dataset.maskaNumberUnsigned)), (a.dataset.maskaNumber != null || Object.values(s).length > 0) && (e.number = s), e;
|
102
|
-
}, E = (a) => a !== "" ? !!JSON.parse(a) : !0, W = (a) => a.startsWith("[") && a.endsWith("]") ? S(a) : a, x = (a) => {
|
103
|
-
if (a.startsWith("{") && a.endsWith("}"))
|
104
|
-
return S(a);
|
105
|
-
const t = {};
|
106
|
-
return a.split("|").forEach((e) => {
|
107
|
-
const s = e.split(":");
|
108
|
-
t[s[0]] = {
|
109
|
-
pattern: new RegExp(s[1]),
|
110
|
-
optional: s[2] === "optional",
|
111
|
-
multiple: s[2] === "multiple",
|
112
|
-
repeated: s[2] === "repeated"
|
113
|
-
};
|
114
|
-
}), t;
|
115
|
-
};
|
116
|
-
class O {
|
117
|
-
constructor(t, e = {}) {
|
118
|
-
A(this, "items", /* @__PURE__ */ new Map()), A(this, "eventAbortController"), A(this, "onInput", (s) => {
|
119
|
-
if (s instanceof CustomEvent && s.type === "input" && !s.isTrusted && !s.bubbles)
|
120
|
-
return;
|
121
|
-
const r = s.target, n = this.items.get(r), h = "inputType" in s && s.inputType.startsWith("delete"), u = n.isEager(), l = h && u && n.unmasked(r.value) === "" ? "" : r.value;
|
122
|
-
this.fixCursor(r, h, () => this.setValue(r, l));
|
123
|
-
}), this.options = e, this.eventAbortController = new AbortController(), this.init(this.getInputs(t));
|
124
|
-
}
|
125
|
-
update(t = {}) {
|
126
|
-
this.options = { ...t }, this.init(Array.from(this.items.keys()));
|
127
|
-
}
|
128
|
-
updateValue(t) {
|
129
|
-
t.value !== "" && t.value !== this.processInput(t).masked && this.setValue(t, t.value);
|
130
|
-
}
|
131
|
-
destroy() {
|
132
|
-
this.eventAbortController.abort(), this.items.clear();
|
133
|
-
}
|
134
|
-
init(t) {
|
135
|
-
const e = this.getOptions(this.options);
|
136
|
-
for (const s of t) {
|
137
|
-
if (!this.items.has(s)) {
|
138
|
-
const { signal: n } = this.eventAbortController;
|
139
|
-
s.addEventListener("input", this.onInput, { capture: !0, signal: n });
|
140
|
-
}
|
141
|
-
const r = new T(F(s, e));
|
142
|
-
this.items.set(s, r), queueMicrotask(() => this.updateValue(s)), s.selectionStart === null && r.isEager() && console.warn("Maska: input of `%s` type is not supported", s.type);
|
143
|
-
}
|
144
|
-
}
|
145
|
-
getInputs(t) {
|
146
|
-
return typeof t == "string" ? Array.from(document.querySelectorAll(t)) : "length" in t ? Array.from(t) : [t];
|
147
|
-
}
|
148
|
-
getOptions(t) {
|
149
|
-
const { onMaska: e, preProcess: s, postProcess: r, ...n } = t;
|
150
|
-
return n;
|
151
|
-
}
|
152
|
-
fixCursor(t, e, s) {
|
153
|
-
const r = t.selectionStart, n = t.value;
|
154
|
-
if (s(), r === null || r === n.length && !e) return;
|
155
|
-
const h = t.value, u = n.slice(0, r), l = h.slice(0, r), o = this.processInput(t, u).unmasked, k = this.processInput(t, l).unmasked;
|
156
|
-
let c = r;
|
157
|
-
u !== l && (c += e ? h.length - n.length : o.length - k.length), t.setSelectionRange(c, c);
|
158
|
-
}
|
159
|
-
setValue(t, e) {
|
160
|
-
const s = this.processInput(t, e);
|
161
|
-
t.value = s.masked, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((r) => r(s)) : this.options.onMaska(s)), t.dispatchEvent(new CustomEvent("maska", { detail: s })), t.dispatchEvent(new CustomEvent("input", { detail: s.masked }));
|
162
|
-
}
|
163
|
-
processInput(t, e) {
|
164
|
-
const s = this.items.get(t);
|
165
|
-
let r = e ?? t.value;
|
166
|
-
this.options.preProcess != null && (r = this.options.preProcess(r));
|
167
|
-
let n = s.masked(r);
|
168
|
-
return this.options.postProcess != null && (n = this.options.postProcess(n)), {
|
169
|
-
masked: n,
|
170
|
-
unmasked: s.unmasked(r),
|
171
|
-
completed: s.completed(r)
|
172
|
-
};
|
173
|
-
}
|
174
|
-
}
|
175
|
-
export {
|
176
|
-
T as Mask,
|
177
|
-
O as MaskInput,
|
178
|
-
R as tokens
|
179
|
-
};
|
package/dist/index288.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import { get as t } from "./index279.js";
|
2
|
-
const o = () => ({
|
3
|
-
getItemText(r, n) {
|
4
|
-
if (typeof r == "string" && !n) return r;
|
5
|
-
if (n) {
|
6
|
-
if (typeof n == "function") {
|
7
|
-
let f = n(r);
|
8
|
-
return typeof f != "string" && (f = JSON.stringify(f)), f;
|
9
|
-
} else if (typeof n == "string") {
|
10
|
-
const f = t(r, n);
|
11
|
-
return typeof f == "string" ? f : JSON.stringify(f);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
return JSON.stringify(r);
|
15
|
-
}
|
16
|
-
});
|
17
|
-
export {
|
18
|
-
o as useItemText
|
19
|
-
};
|