bitboss-ui 2.1.76 → 2.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/BbDropdown/BbDropdown.vue.d.ts +23 -2
- package/dist/components/BbPopover/BbPopover.vue.d.ts +34 -9
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +6 -0
- package/dist/components/CommonPopover.vue.d.ts +5 -0
- package/dist/index.css +1 -1
- package/dist/index107.js +9 -9
- package/dist/index112.js +1 -1
- package/dist/index114.js +1 -1
- package/dist/index120.js +1 -1
- package/dist/index122.js +13 -13
- package/dist/index13.js +2 -2
- package/dist/index130.js +1 -1
- package/dist/index132.js +5 -5
- package/dist/index134.js +1 -1
- package/dist/index136.js +2 -2
- package/dist/index139.js +1 -1
- package/dist/index142.js +1 -1
- package/dist/index143.js +2 -2
- package/dist/index15.js +5 -5
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index21.js +13 -13
- package/dist/index215.js +2 -2
- package/dist/index216.js +2 -2
- package/dist/index217.js +5 -7
- package/dist/index218.js +8 -2
- package/dist/index219.js +32 -4
- package/dist/index220.js +28 -8
- package/dist/index222.js +4 -2
- package/dist/index223.js +13 -2
- package/dist/index224.js +20 -2
- package/dist/index225.js +200 -12
- package/dist/index227.js +135 -3
- package/dist/index23.js +11 -11
- package/dist/index230.js +49 -16
- package/dist/index231.js +16 -11
- package/dist/index232.js +105 -50
- package/dist/index234.js +100 -12
- package/dist/index236.js +3 -29
- package/dist/index237.js +5 -16
- package/dist/index238.js +5 -4
- package/dist/index239.js +5 -106
- package/dist/index240.js +7 -0
- package/dist/index241.js +5 -100
- package/dist/index242.js +7 -0
- package/dist/index243.js +2 -127
- package/dist/index245.js +3 -229
- package/dist/index246.js +2 -13
- package/dist/index247.js +11 -3
- package/dist/index248.js +8 -5
- package/dist/index249.js +13 -5
- package/dist/index25.js +3 -3
- package/dist/index250.js +13 -5
- package/dist/index251.js +4 -5
- package/dist/index252.js +23 -5
- package/dist/index253.js +3 -5
- package/dist/index254.js +3 -20
- package/dist/index255.js +17 -32
- package/dist/index256.js +12 -28
- package/dist/{index233.js → index257.js} +1 -1
- package/dist/index258.js +12 -34
- package/dist/index259.js +29 -2
- package/dist/index260.js +15 -6
- package/dist/index261.js +4 -7
- package/dist/index262.js +229 -10
- package/dist/index263.js +9 -2
- package/dist/index264.js +3 -4
- package/dist/index265.js +67 -3
- package/dist/index266.js +2 -4
- package/dist/index267.js +3 -201
- package/dist/index268.js +11 -0
- package/dist/index269.js +8 -85
- package/dist/index27.js +1 -1
- package/dist/index270.js +25 -0
- package/dist/index271.js +5 -5
- package/dist/index272.js +6 -6
- package/dist/index273.js +15 -7
- package/dist/index274.js +3 -268
- package/dist/index275.js +30 -48
- package/dist/index276.js +9 -52
- package/dist/index277.js +5 -32
- package/dist/index278.js +6 -60
- package/dist/index279.js +268 -9
- package/dist/index280.js +50 -21
- package/dist/index281.js +50 -7
- package/dist/index282.js +31 -7
- package/dist/index283.js +59 -8
- package/dist/index284.js +2 -23
- package/dist/index285.js +85 -12
- package/dist/index287.js +7 -65
- package/dist/index288.js +8 -6
- package/dist/index289.js +7 -16
- package/dist/index29.js +3 -3
- package/dist/index290.js +2 -41
- package/dist/index291.js +7 -11
- package/dist/index292.js +7 -3
- package/dist/index293.js +43 -0
- package/dist/index295.js +3 -5
- package/dist/index296.js +4 -7
- package/dist/index297.js +7 -3
- package/dist/index298.js +1 -1
- package/dist/index299.js +1 -1
- package/dist/index300.js +17 -2
- package/dist/index301.js +2 -28
- package/dist/index302.js +3 -17
- package/dist/index303.js +2 -4
- package/dist/index304.js +27 -279
- package/dist/index305.js +4 -2
- package/dist/index306.js +3 -125
- package/dist/index307.js +5 -2
- package/dist/index308.js +278 -13
- package/dist/index309.js +2 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +121 -12
- package/dist/index311.js +2 -2
- package/dist/index312.js +10 -11
- package/dist/index314.js +12 -15
- package/dist/index316.js +16 -2
- package/dist/index317.js +2 -3
- package/dist/index318.js +19 -5
- package/dist/index319.js +2 -3
- package/dist/index320.js +5 -2
- package/dist/index323.js +1 -1
- package/dist/index324.js +1 -1
- package/dist/index325.js +1 -1
- package/dist/index326.js +1 -1
- package/dist/index327.js +1 -1
- package/dist/index328.js +719 -6
- package/dist/index329.js +366 -4
- package/dist/index33.js +8 -8
- package/dist/index330.js +57 -719
- package/dist/index331.js +2 -366
- package/dist/index332.js +3 -57
- package/dist/index333.js +6 -58
- package/dist/index334.js +35 -58
- package/dist/index335.js +6 -47
- package/dist/index336.js +125 -31
- package/dist/index337.js +398 -6
- package/dist/index338.js +44 -126
- package/dist/index339.js +7 -397
- package/dist/index340.js +5 -7
- package/dist/index341.js +8 -6
- package/dist/index342.js +57 -7
- package/dist/index343.js +57 -92
- package/dist/index344.js +1 -1
- package/dist/index345.js +85 -512
- package/dist/index346.js +5 -134
- package/dist/index347.js +7 -5
- package/dist/index348.js +18 -6
- package/dist/index349.js +8 -18
- package/dist/index35.js +4 -4
- package/dist/index350.js +14 -8
- package/dist/index351.js +6 -14
- package/dist/index352.js +133 -6
- package/dist/index353.js +515 -45
- package/dist/index356.js +44 -435
- package/dist/index357.js +427 -114
- package/dist/index358.js +130 -0
- package/dist/index37.js +17 -17
- package/dist/index39.js +6 -6
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +5 -5
- package/dist/index49.js +20 -20
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +4 -4
- package/dist/index67.js +1 -1
- package/dist/index80.js +209 -156
- package/dist/index82.js +1 -1
- package/dist/index84.js +2 -2
- package/dist/index86.js +3 -3
- package/dist/index88.js +1 -1
- package/dist/index91.js +3 -3
- package/dist/index93.js +2 -2
- package/dist/index95.js +160 -100
- package/dist/index97.js +1 -1
- package/dist/types/CommonProps.d.ts +1 -1
- package/dist/utilities/functions/isNotEmpty.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index221.js +0 -7
- package/dist/index226.js +0 -11
- package/dist/index228.js +0 -5
- package/dist/index235.js +0 -19
- package/dist/index294.js +0 -5
- /package/dist/{index286.js → index244.js} +0 -0
package/dist/index132.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as R, mergeModels as U, ref as L, computed as v, useTemplateRef as W, useModel as x, watch as m, onBeforeUnmount as F, createElementBlock as I, openBlock as g, Fragment as _, renderSlot as k, createCommentVNode as C, createVNode as j, normalizeProps as q, mergeProps as B, withCtx as T, createElementVNode as f, normalizeStyle as G, createBlock as H, unref as J } from "vue";
|
|
2
2
|
import { useId as K } from "./index8.js";
|
|
3
|
-
import { useLocale as Q } from "./
|
|
4
|
-
import { useUntil as X } from "./
|
|
3
|
+
import { useLocale as Q } from "./index223.js";
|
|
4
|
+
import { useUntil as X } from "./index250.js";
|
|
5
5
|
import Y from "./index13.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import Z from "./
|
|
7
|
+
import Z from "./index227.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { useElementSize as ee } from "./index141.js";
|
|
10
|
-
import { extractDomContainer as V } from "./
|
|
11
|
-
import { parseWidthString as te } from "./
|
|
10
|
+
import { extractDomContainer as V } from "./index251.js";
|
|
11
|
+
import { parseWidthString as te } from "./index252.js";
|
|
12
12
|
const ce = /* @__PURE__ */ R({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "BbTooltip",
|
package/dist/index134.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, computed as g, resolveComponent as y, createElementBlock as f, openBlock as i, Fragment as k, renderList as h, normalizeClass as b, createElementVNode as s, renderSlot as t, createVNode as v, createSlots as B, withCtx as _, mergeProps as C } from "vue";
|
|
2
|
-
import { flattenTree as T } from "./
|
|
2
|
+
import { flattenTree as T } from "./index271.js";
|
|
3
3
|
const w = { class: "bb-tree-row" }, E = { class: "bb-tree-main-content" }, N = /* @__PURE__ */ $({
|
|
4
4
|
__name: "BbTree",
|
|
5
5
|
props: {
|
package/dist/index136.js
CHANGED
|
@@ -5,8 +5,8 @@ import u from "./index86.js";
|
|
|
5
5
|
/* empty css */
|
|
6
6
|
import I from "./index114.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import N from "./
|
|
9
|
-
import g from "./
|
|
8
|
+
import N from "./index219.js";
|
|
9
|
+
import g from "./index220.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
const h = { class: "bb-common-input-inner-container__prefix" }, B = { class: "bb-common-input-inner-container__suffix" }, R = /* @__PURE__ */ k({
|
|
12
12
|
__name: "CommonInputInnerContainer",
|
package/dist/index139.js
CHANGED
package/dist/index142.js
CHANGED
package/dist/index143.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isArray as p } from "./
|
|
2
|
-
import { isPlainObject as i } from "./
|
|
1
|
+
import { isArray as p } from "./index217.js";
|
|
2
|
+
import { isPlainObject as i } from "./index218.js";
|
|
3
3
|
function f(e, n, u, l, r) {
|
|
4
4
|
const o = {}.propertyIsEnumerable.call(l, n) ? "enumerable" : "nonenumerable";
|
|
5
5
|
o === "enumerable" && (e[n] = u), r && o === "nonenumerable" && Object.defineProperty(e, n, {
|
package/dist/index15.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as H, ref as s, computed as M, createBlock as D, openBlock as E, normalizeClass as I, withCtx as l, createVNode as d, unref as u, withDirectives as L, createElementVNode as p, mergeProps as _, renderSlot as r, withModifiers as q, normalizeStyle as N } from "vue";
|
|
2
|
-
import { isHex as z } from "./
|
|
2
|
+
import { isHex as z } from "./index222.js";
|
|
3
3
|
import { isNotNil as F } from "./index144.js";
|
|
4
4
|
import { useId as S } from "./index8.js";
|
|
5
|
-
import { useLocale as U } from "./
|
|
6
|
-
import { vMaska as A } from "./
|
|
7
|
-
import K from "./
|
|
5
|
+
import { useLocale as U } from "./index223.js";
|
|
6
|
+
import { vMaska as A } from "./index224.js";
|
|
7
|
+
import K from "./index225.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import O from "./index136.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import P from "./index138.js";
|
|
12
|
-
import T from "./
|
|
12
|
+
import T from "./index227.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
const j = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "name", "placeholder", "readonly", "required", "value"], G = ["aria-label"], J = { class: "bb-common-input-inner-container__suffix" }, ie = /* @__PURE__ */ H({
|
|
15
15
|
__name: "BaseColorInput",
|
package/dist/index17.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as _, ref as i, computed as t, watch as F, createElementBlock as p, openBlock as h, normalizeProps as d, guardReactiveProps as f, createCommentVNode as L, createElementVNode as s, mergeProps as k, renderSlot as M } from "vue";
|
|
2
|
-
import { isCssColor as y } from "./
|
|
3
|
-
import { booleanishToBoolean as q } from "./
|
|
4
|
-
import { isEqual as A } from "./
|
|
2
|
+
import { isCssColor as y } from "./index246.js";
|
|
3
|
+
import { booleanishToBoolean as q } from "./index266.js";
|
|
4
|
+
import { isEqual as A } from "./index267.js";
|
|
5
5
|
const N = {
|
|
6
6
|
"aria-hidden": "true",
|
|
7
7
|
class: "bb-base-checkbox-container"
|
package/dist/index19.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as z, ref as B, toRef as p, computed as G, createBlock as R, openBlock as W, unref as T, withCtx as n, renderSlot as s, normalizeProps as f, guardReactiveProps as h, createVNode as K, mergeProps as w } from "vue";
|
|
2
2
|
import N from "./index17.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import U from "./
|
|
4
|
+
import U from "./index285.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { useItemsGetter as q } from "./
|
|
7
|
-
import { useIndexById as C } from "./
|
|
8
|
-
import { useBaseOptions as J } from "./
|
|
9
|
-
import { useCoherence as Q } from "./
|
|
10
|
-
import { hash as X } from "./
|
|
11
|
-
import { useHashedWatcher as $ } from "./
|
|
12
|
-
import { usePrefill as Y } from "./
|
|
6
|
+
import { useItemsGetter as q } from "./index259.js";
|
|
7
|
+
import { useIndexById as C } from "./index231.js";
|
|
8
|
+
import { useBaseOptions as J } from "./index230.js";
|
|
9
|
+
import { useCoherence as Q } from "./index257.js";
|
|
10
|
+
import { hash as X } from "./index254.js";
|
|
11
|
+
import { useHashedWatcher as $ } from "./index258.js";
|
|
12
|
+
import { usePrefill as Y } from "./index260.js";
|
|
13
13
|
const ce = /* @__PURE__ */ z({
|
|
14
14
|
__name: "BaseCheckboxGroup",
|
|
15
15
|
props: {
|
package/dist/index21.js
CHANGED
|
@@ -5,20 +5,20 @@ import { _config as Q } from "./index4.js";
|
|
|
5
5
|
import { useId as X } from "./index8.js";
|
|
6
6
|
import b from "./index13.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import d from "./
|
|
9
|
-
import ee from "./
|
|
10
|
-
import ae from "./
|
|
11
|
-
import te from "./
|
|
12
|
-
import { hash as B } from "./
|
|
8
|
+
import d from "./index237.js";
|
|
9
|
+
import ee from "./index240.js";
|
|
10
|
+
import ae from "./index241.js";
|
|
11
|
+
import te from "./index277.js";
|
|
12
|
+
import { hash as B } from "./index254.js";
|
|
13
13
|
import { last as le } from "./index229.js";
|
|
14
|
-
import { validateDateFormat as L } from "./
|
|
15
|
-
import { useLogger as oe } from "./
|
|
16
|
-
import re from "./
|
|
17
|
-
import se from "./
|
|
18
|
-
import de from "./
|
|
19
|
-
import S from "./
|
|
20
|
-
import ie from "./
|
|
21
|
-
import { useLocale as ne } from "./
|
|
14
|
+
import { validateDateFormat as L } from "./index278.js";
|
|
15
|
+
import { useLogger as oe } from "./index248.js";
|
|
16
|
+
import re from "./index279.js";
|
|
17
|
+
import se from "./index280.js";
|
|
18
|
+
import de from "./index281.js";
|
|
19
|
+
import S from "./index282.js";
|
|
20
|
+
import ie from "./index283.js";
|
|
21
|
+
import { useLocale as ne } from "./index223.js";
|
|
22
22
|
const ue = { class: "bb-base-date-picker" }, me = { class: "bb-base-date-picker__body" }, ce = { class: "bb-base-date-picker__controls" }, pe = { class: "sr-only" }, fe = { class: "sr-only" }, be = { class: "sr-only" }, ve = {
|
|
23
23
|
style: { transform: "rotate(180deg)" },
|
|
24
24
|
viewBox: "0 0 24 24",
|
package/dist/index215.js
CHANGED
package/dist/index216.js
CHANGED
package/dist/index217.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return i ? `${n}.${i.slice(0, t)}` : r;
|
|
6
|
-
};
|
|
1
|
+
import { getType as t } from "./index296.js";
|
|
2
|
+
function o(r) {
|
|
3
|
+
return t(r) === "Array";
|
|
4
|
+
}
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
o as isArray
|
|
9
7
|
};
|
package/dist/index218.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { getType as o } from "./index296.js";
|
|
2
|
+
function c(e) {
|
|
3
|
+
if (o(e) !== "Object")
|
|
4
|
+
return !1;
|
|
5
|
+
const t = Object.getPrototypeOf(e);
|
|
6
|
+
return !!t && t.constructor === Object && t === Object.prototype;
|
|
7
|
+
}
|
|
2
8
|
export {
|
|
3
|
-
|
|
9
|
+
c as isPlainObject
|
|
4
10
|
};
|
package/dist/index219.js
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createElementBlock as e, openBlock as t, createElementVNode as o } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "./index213.js";
|
|
4
|
+
const l = {}, s = {
|
|
5
|
+
class: "bb-error-icon",
|
|
6
|
+
fill: "none",
|
|
7
|
+
viewBox: "0 0 20 20",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function i(c, r) {
|
|
11
|
+
return t(), e("svg", s, r[0] || (r[0] = [
|
|
12
|
+
o("path", {
|
|
13
|
+
d: "M9.99422 18.3333C14.5966 18.3333 18.3276 14.6024 18.3276 9.99999C18.3276 5.39762 14.5966 1.66666 9.99422 1.66666C5.39185 1.66666 1.66089 5.39762 1.66089 9.99999C1.66089 14.6024 5.39185 18.3333 9.99422 18.3333Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
}, null, -1),
|
|
16
|
+
o("path", {
|
|
17
|
+
d: "M9.99414 6.66666V9.99999",
|
|
18
|
+
stroke: "white",
|
|
19
|
+
"stroke-linecap": "round",
|
|
20
|
+
"stroke-linejoin": "round",
|
|
21
|
+
"stroke-width": "2"
|
|
22
|
+
}, null, -1),
|
|
23
|
+
o("path", {
|
|
24
|
+
d: "M9.99414 13.3333H10.0025",
|
|
25
|
+
stroke: "white",
|
|
26
|
+
"stroke-linecap": "round",
|
|
27
|
+
"stroke-linejoin": "round",
|
|
28
|
+
"stroke-width": "2"
|
|
29
|
+
}, null, -1)
|
|
30
|
+
]));
|
|
4
31
|
}
|
|
32
|
+
const a = /* @__PURE__ */ n(l, [["render", i]]);
|
|
5
33
|
export {
|
|
6
|
-
|
|
34
|
+
a as default
|
|
7
35
|
};
|
package/dist/index220.js
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { defineComponent as l, createElementBlock as n, openBlock as r, unref as a, createElementVNode as t } from "vue";
|
|
2
|
+
import { useLocale as s } from "./index223.js";
|
|
3
|
+
const c = ["aria-label"], b = /* @__PURE__ */ l({
|
|
4
|
+
__name: "ClearableButton",
|
|
5
|
+
setup(u) {
|
|
6
|
+
const { t: o } = s();
|
|
7
|
+
return (i, e) => (r(), n("button", {
|
|
8
|
+
"aria-label": a(o)("common.clearLabel").value,
|
|
9
|
+
class: "bb-clearable-button",
|
|
10
|
+
type: "button"
|
|
11
|
+
}, e[0] || (e[0] = [
|
|
12
|
+
t("svg", {
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15
|
+
}, [
|
|
16
|
+
t("path", {
|
|
17
|
+
d: "M12 12l7 7M12 12l-7 -7M12 12l-7 7M12 12l7 -7",
|
|
18
|
+
fill: "none",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
"stroke-linecap": "round",
|
|
21
|
+
"stroke-linejoin": "round",
|
|
22
|
+
"stroke-width": "2"
|
|
23
|
+
})
|
|
24
|
+
], -1)
|
|
25
|
+
]), 8, c));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
8
28
|
export {
|
|
9
|
-
|
|
29
|
+
b as default
|
|
10
30
|
};
|
package/dist/index222.js
CHANGED
package/dist/index223.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { locales as t } from "./index297.js";
|
|
2
|
+
import { _config as m } from "./index4.js";
|
|
3
|
+
import { get as c } from "./index247.js";
|
|
4
|
+
import { readonly as l, computed as n } from "vue";
|
|
5
|
+
const p = (o, ...r) => l(
|
|
6
|
+
n(() => c(t[m.locale], o).replace(
|
|
7
|
+
/\{(\d+)\}/g,
|
|
8
|
+
(a, e) => r[e]
|
|
9
|
+
))
|
|
10
|
+
), d = () => ({
|
|
11
|
+
t: p
|
|
12
|
+
});
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
d as useLocale
|
|
4
15
|
};
|
package/dist/index224.js
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { MaskInput as r } from "./index244.js";
|
|
2
|
+
const u = /* @__PURE__ */ new WeakMap(), p = (a, n) => {
|
|
3
|
+
if (a.arg == null || a.instance == null) return;
|
|
4
|
+
const s = "setup" in a.instance.$.type;
|
|
5
|
+
a.arg in a.instance ? a.instance[a.arg] = n : s && console.warn("Maska: please expose `%s` using defineExpose", a.arg);
|
|
6
|
+
}, k = (a, n) => {
|
|
7
|
+
var s;
|
|
8
|
+
const t = a instanceof HTMLInputElement ? a : a.querySelector("input");
|
|
9
|
+
if (t == null || t?.type === "file") return;
|
|
10
|
+
let e = {};
|
|
11
|
+
if (n.value != null && (e = typeof n.value == "string" ? { mask: n.value } : { ...n.value }), n.arg != null) {
|
|
12
|
+
const l = (o) => {
|
|
13
|
+
const i = n.modifiers.unmasked ? o.unmasked : n.modifiers.completed ? o.completed : o.masked;
|
|
14
|
+
p(n, i);
|
|
15
|
+
};
|
|
16
|
+
e.onMaska = e.onMaska == null ? l : Array.isArray(e.onMaska) ? [...e.onMaska, l] : [e.onMaska, l];
|
|
17
|
+
}
|
|
18
|
+
u.has(t) ? (s = u.get(t)) == null || s.update(e) : u.set(t, new r(t, e));
|
|
19
|
+
};
|
|
2
20
|
export {
|
|
3
|
-
|
|
21
|
+
k as vMaska
|
|
4
22
|
};
|
package/dist/index225.js
CHANGED
|
@@ -1,15 +1,203 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as j, ref as s, onMounted as J, watch as Q, createElementBlock as M, openBlock as S, createElementVNode as x, createTextVNode as L, createCommentVNode as B, toDisplayString as y, unref as w } from "vue";
|
|
2
|
+
import { hexToRgb as K } from "./index339.js";
|
|
3
|
+
import { getHueFromRGB as F } from "./index340.js";
|
|
4
|
+
import { hslToHex as b } from "./index341.js";
|
|
5
|
+
import { useLocale as Z } from "./index223.js";
|
|
6
|
+
const ee = {
|
|
7
|
+
id: "mainCanvasDesc",
|
|
8
|
+
"aria-live": "polite",
|
|
9
|
+
class: "sr-only"
|
|
10
|
+
}, te = { key: 0 }, ae = {
|
|
11
|
+
id: "hueCanvasDesc",
|
|
12
|
+
"aria-live": "polite",
|
|
13
|
+
class: "sr-only"
|
|
14
|
+
}, ne = { key: 0 }, ue = /* @__PURE__ */ j({
|
|
15
|
+
__name: "ColorPallette",
|
|
16
|
+
props: {
|
|
17
|
+
modelValue: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:modelValue"],
|
|
20
|
+
setup(N, { emit: O }) {
|
|
21
|
+
const _ = N, f = O, { t: h } = Z(), o = s(_.modelValue), d = s(
|
|
22
|
+
b(F(...K(o.value ?? "#ff0000")), 100, 50)
|
|
23
|
+
), T = s(null), i = s(null), r = s(null), l = s({ x: 0, y: 0 }), u = s({ x: 0 }), p = s(!1), P = s(!1), q = () => {
|
|
24
|
+
const e = i.value, t = r.value;
|
|
25
|
+
!e || !t || (e.width = e.offsetWidth, e.height = e.offsetHeight, t.width = t.offsetWidth, t.height = t.offsetHeight, v(), g());
|
|
26
|
+
}, R = () => {
|
|
27
|
+
const e = i.value;
|
|
28
|
+
return e ? e.getContext("2d", { willReadFrequently: !0 }) : null;
|
|
29
|
+
}, v = () => {
|
|
30
|
+
const e = i.value;
|
|
31
|
+
if (!e) return;
|
|
32
|
+
const t = R();
|
|
33
|
+
if (!t) return;
|
|
34
|
+
t.clearRect(0, 0, e.width, e.height);
|
|
35
|
+
const a = t.createLinearGradient(0, 0, e.width, 0);
|
|
36
|
+
a.addColorStop(0, d.value), a.addColorStop(1, "#ffffff");
|
|
37
|
+
const n = t.createLinearGradient(0, 0, 0, e.height);
|
|
38
|
+
n.addColorStop(0, "transparent"), n.addColorStop(1, "#000000"), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height), t.fillStyle = n, t.globalCompositeOperation = "multiply", t.fillRect(0, 0, e.width, e.height), t.globalCompositeOperation = "source-over", t.fillStyle = "#000000", t.strokeStyle = "#000000", t.lineWidth = 1;
|
|
39
|
+
}, m = () => {
|
|
40
|
+
const e = R();
|
|
41
|
+
e && (e.beginPath(), e.arc(
|
|
42
|
+
l.value.x,
|
|
43
|
+
l.value.y,
|
|
44
|
+
8,
|
|
45
|
+
0,
|
|
46
|
+
2 * Math.PI
|
|
47
|
+
), e.strokeStyle = "#ffffff", e.lineWidth = 2, e.stroke(), e.beginPath(), e.arc(
|
|
48
|
+
l.value.x,
|
|
49
|
+
l.value.y,
|
|
50
|
+
7,
|
|
51
|
+
0,
|
|
52
|
+
2 * Math.PI
|
|
53
|
+
), e.strokeStyle = "#000000", e.lineWidth = 1, e.stroke(), e.globalCompositeOperation = "source-over");
|
|
54
|
+
}, D = () => {
|
|
55
|
+
const e = r.value;
|
|
56
|
+
return e ? e.getContext("2d", { willReadFrequently: !0 }) : null;
|
|
57
|
+
}, g = () => {
|
|
58
|
+
const e = r.value;
|
|
59
|
+
if (!e) return;
|
|
60
|
+
const t = D();
|
|
61
|
+
if (!t) return;
|
|
62
|
+
const a = t.createLinearGradient(0, 0, e.width, 0);
|
|
63
|
+
for (let n = 0; n <= 360; n += 60)
|
|
64
|
+
a.addColorStop(n / 360, `hsl(${n}, 100%, 50%)`);
|
|
65
|
+
a.addColorStop(1, "hsl(360, 100%, 50%)"), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height), H(), t.fillStyle = "#000000", t.strokeStyle = "#000000", t.lineWidth = 1;
|
|
66
|
+
}, H = () => {
|
|
67
|
+
const e = r.value;
|
|
68
|
+
if (!e) return;
|
|
69
|
+
const t = D();
|
|
70
|
+
if (!t) return;
|
|
71
|
+
const a = 10, n = 16, c = u.value.x - a / 2, k = e.height / 2 - n / 2;
|
|
72
|
+
t.beginPath(), t.roundRect(c, k, a, n, 2), t.strokeStyle = "lightgray", t.stroke(), t.fillStyle = "#ffffff", t.fill();
|
|
73
|
+
}, E = (e) => {
|
|
74
|
+
const t = i.value;
|
|
75
|
+
t && (t.setPointerCapture(e.pointerId), p.value = !0, I(e));
|
|
76
|
+
}, U = (e) => {
|
|
77
|
+
const t = r.value;
|
|
78
|
+
t && (t.setPointerCapture(e.pointerId), P.value = !0, V(e));
|
|
79
|
+
}, I = (e) => {
|
|
80
|
+
const t = i.value;
|
|
81
|
+
if (!t) return;
|
|
82
|
+
const a = t.getBoundingClientRect(), n = Math.max(0, Math.min(t.width - 1, e.clientX - a.left)), c = Math.max(0, Math.min(t.height - 1, e.clientY - a.top));
|
|
83
|
+
l.value = { x: n, y: c }, v(), m(), o.value = C(), f("update:modelValue", o.value);
|
|
84
|
+
}, V = (e) => {
|
|
85
|
+
const t = r.value;
|
|
86
|
+
if (!t) return;
|
|
87
|
+
const a = t.getBoundingClientRect(), n = Math.max(0, Math.min(t.width - 1, e.clientX - a.left));
|
|
88
|
+
u.value = { x: n };
|
|
89
|
+
const c = n / t.width * 360;
|
|
90
|
+
d.value = b(c, 100, 50), g(), v(), m(), o.value = C(), f("update:modelValue", o.value);
|
|
91
|
+
}, G = (e) => {
|
|
92
|
+
p.value ? I(e) : P.value && V(e);
|
|
93
|
+
}, W = (e) => {
|
|
94
|
+
const t = p.value ? i.value : r.value;
|
|
95
|
+
t && t.releasePointerCapture(e.pointerId), p.value = !1, P.value = !1;
|
|
96
|
+
}, X = (e) => {
|
|
97
|
+
switch (e.key) {
|
|
98
|
+
case "ArrowUp":
|
|
99
|
+
l.value.y = Math.max(0, l.value.y - 5);
|
|
100
|
+
break;
|
|
101
|
+
case "ArrowDown":
|
|
102
|
+
l.value.y = Math.min(
|
|
103
|
+
i.value?.height ?? 0,
|
|
104
|
+
l.value.y + 5
|
|
105
|
+
);
|
|
106
|
+
break;
|
|
107
|
+
case "ArrowLeft":
|
|
108
|
+
l.value.x = Math.max(0, l.value.x - 5);
|
|
109
|
+
break;
|
|
110
|
+
case "ArrowRight":
|
|
111
|
+
l.value.x = Math.min(
|
|
112
|
+
i.value?.width ?? 0,
|
|
113
|
+
l.value.x + 5
|
|
114
|
+
);
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
v(), m(), o.value = C(), f("update:modelValue", o.value), e.preventDefault();
|
|
120
|
+
}, $ = (e) => {
|
|
121
|
+
switch (e.key) {
|
|
122
|
+
case "ArrowLeft":
|
|
123
|
+
u.value.x = Math.max(0, u.value.x - 5);
|
|
124
|
+
break;
|
|
125
|
+
case "ArrowRight":
|
|
126
|
+
u.value.x = Math.min(
|
|
127
|
+
r.value?.width ?? 0,
|
|
128
|
+
u.value.x + 5
|
|
129
|
+
);
|
|
130
|
+
break;
|
|
131
|
+
default:
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const a = u.value.x / (r.value?.width ?? 1) * 360;
|
|
135
|
+
d.value = b(a, 100, 50), g(), H(), v(), m(), o.value = C(), f("update:modelValue", o.value), e.preventDefault();
|
|
136
|
+
};
|
|
137
|
+
J(() => {
|
|
138
|
+
q(), A(o.value ?? "#ff0000");
|
|
139
|
+
}), Q(
|
|
140
|
+
() => _.modelValue,
|
|
141
|
+
(e) => {
|
|
142
|
+
!e || e === o.value || (o.value = e, A(e), g(), v());
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
const C = () => {
|
|
146
|
+
const e = i.value;
|
|
147
|
+
if (!e) return "#ffffff";
|
|
148
|
+
const t = e.getContext("2d");
|
|
149
|
+
if (!t) return "#ffffff";
|
|
150
|
+
const { x: a, y: n } = l.value, c = t.getImageData(a, n, 1, 1).data, [k, z, Y] = c;
|
|
151
|
+
return `#${((1 << 24) + (k << 16) + (z << 8) + Y).toString(16).slice(1)}`;
|
|
152
|
+
};
|
|
153
|
+
function A(e) {
|
|
154
|
+
const t = F(...K(e));
|
|
155
|
+
d.value = b(t, 100, 50), u.value.x = t / 360 * (r.value?.width ?? 0);
|
|
156
|
+
}
|
|
157
|
+
return (e, t) => (S(), M("span", {
|
|
158
|
+
ref_key: "paletteRef",
|
|
159
|
+
ref: T,
|
|
160
|
+
"aria-label": "Color Picker",
|
|
161
|
+
class: "bb-color-palette",
|
|
162
|
+
role: "application"
|
|
163
|
+
}, [
|
|
164
|
+
x("canvas", {
|
|
165
|
+
ref_key: "mainCanvasRef",
|
|
166
|
+
ref: i,
|
|
167
|
+
"aria-describedby": "mainCanvasDesc",
|
|
168
|
+
"aria-label": "Main Color Selection",
|
|
169
|
+
class: "bb-color-palette__canvas",
|
|
170
|
+
role: "application",
|
|
171
|
+
tabindex: "0",
|
|
172
|
+
onKeydown: X,
|
|
173
|
+
onPointerdown: E,
|
|
174
|
+
onPointermove: G,
|
|
175
|
+
onPointerup: W
|
|
176
|
+
}, null, 544),
|
|
177
|
+
x("span", ee, [
|
|
178
|
+
L(y(w(h)("colorInput.mainCanvasDesc")) + " ", 1),
|
|
179
|
+
o.value ? (S(), M("span", te, y(w(h)("colorInput.mainCanvasSelectedColor", o.value)), 1)) : B("", !0)
|
|
180
|
+
]),
|
|
181
|
+
x("canvas", {
|
|
182
|
+
ref_key: "hueCanvasRef",
|
|
183
|
+
ref: r,
|
|
184
|
+
"aria-describedby": "hueCanvasDesc",
|
|
185
|
+
"aria-label": "Hue Selection",
|
|
186
|
+
class: "bb-color-palette__hue-canvas",
|
|
187
|
+
role: "application",
|
|
188
|
+
tabindex: "0",
|
|
189
|
+
onKeydown: $,
|
|
190
|
+
onPointerdown: U,
|
|
191
|
+
onPointermove: G,
|
|
192
|
+
onPointerup: W
|
|
193
|
+
}, null, 544),
|
|
194
|
+
x("span", ae, [
|
|
195
|
+
L(y(w(h)("colorInput.hueCanvasDesc")) + " ", 1),
|
|
196
|
+
d.value ? (S(), M("span", ne, y(w(h)("colorInput.hueCanvasSelectedHue", d.value)), 1)) : B("", !0)
|
|
197
|
+
])
|
|
198
|
+
], 512));
|
|
199
|
+
}
|
|
12
200
|
});
|
|
13
201
|
export {
|
|
14
|
-
|
|
202
|
+
ue as default
|
|
15
203
|
};
|