bitboss-ui 2.0.107 → 2.0.108
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/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +4 -0
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -0
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -0
- package/dist/components/BbTeleport.vue.d.ts +4 -1
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
- package/dist/components/CommonFloating.vue.d.ts +4 -0
- package/dist/index100.js +4 -4
- package/dist/index101.js +22 -20
- package/dist/index111.js +7 -7
- package/dist/index119.js +2 -2
- package/dist/index121.js +18 -16
- package/dist/index123.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index131.js +1 -1
- package/dist/index133.js +2 -2
- package/dist/index15.js +5 -5
- package/dist/index17.js +3 -3
- package/dist/index19.js +1 -1
- package/dist/index206.js +126 -2
- package/dist/index207.js +281 -8
- package/dist/index208.js +125 -3
- package/dist/index209.js +15 -52
- package/dist/index21.js +16 -16
- package/dist/index210.js +18 -0
- package/dist/index211.js +19 -13
- package/dist/index212.js +15 -3
- package/dist/index213.js +2 -41
- package/dist/index214.js +2 -6
- package/dist/index215.js +41 -7
- package/dist/index216.js +12 -11
- package/dist/index217.js +20 -13
- package/dist/index218.js +6 -2
- package/dist/index219.js +15 -4
- package/dist/index220.js +53 -2
- package/dist/index222.js +13 -20
- package/dist/index223.js +5 -4
- package/dist/index224.js +366 -278
- package/dist/index225.js +4 -16
- package/dist/index226.js +8 -16
- package/dist/index227.js +3 -19
- package/dist/index228.js +2 -15
- package/dist/index229.js +4 -19
- package/dist/index23.js +48 -44
- package/dist/index230.js +2 -27
- package/dist/index231.js +2 -2
- package/dist/index232.js +17 -248
- package/dist/index233.js +26 -51
- package/dist/index234.js +242 -36
- package/dist/index235.js +52 -5
- package/dist/index236.js +31 -47
- package/dist/index237.js +5 -126
- package/dist/index238.js +59 -124
- package/dist/index239.js +3 -2
- package/dist/index240.js +3 -5
- package/dist/index241.js +7 -369
- package/dist/index242.js +1 -1
- package/dist/index245.js +1 -1
- package/dist/index246.js +4 -4
- package/dist/index247.js +1 -1
- package/dist/index248.js +1 -1
- package/dist/index25.js +7 -7
- package/dist/index250.js +2 -2
- package/dist/index251.js +2 -18
- package/dist/index252.js +2 -2
- package/dist/index254.js +2 -2
- package/dist/index256.js +2 -12
- package/dist/index257.js +18 -2
- package/dist/index258.js +12 -2
- package/dist/index263.js +15 -14
- package/dist/index265.js +3 -6
- package/dist/index267.js +7 -9
- package/dist/index268.js +176 -9
- package/dist/index269.js +7 -8
- package/dist/index27.js +1 -1
- package/dist/index270.js +10 -27
- package/dist/index271.js +6 -3
- package/dist/index273.js +9 -7
- package/dist/index274.js +7 -430
- package/dist/index275.js +28 -2
- package/dist/index276.js +3 -88
- package/dist/index277.js +6 -7
- package/dist/index278.js +2 -11
- package/dist/index279.js +2 -4
- package/dist/index280.js +2 -224
- package/dist/index281.js +2 -200
- package/dist/index282.js +2 -176
- package/dist/index283.js +2 -6
- package/dist/index284.js +126 -2
- package/dist/index285.js +431 -2
- package/dist/index286.js +2 -2
- package/dist/index287.js +22 -2
- package/dist/index289.js +9 -2
- package/dist/index29.js +3 -3
- package/dist/index291.js +2 -2
- package/dist/index292.js +1 -1
- package/dist/index293.js +1 -1
- package/dist/index295.js +1 -21
- package/dist/index296.js +24 -0
- package/dist/index298.js +427 -117
- package/dist/index299.js +126 -21
- package/dist/index300.js +202 -0
- package/dist/index301.js +224 -3
- package/dist/index302.js +3 -17
- package/dist/index303.js +15 -434
- package/dist/index304.js +87 -125
- package/dist/index307.js +4 -4
- package/dist/index308.js +2 -3
- package/dist/index309.js +5 -3
- package/dist/index31.js +2 -2
- package/dist/index310.js +67 -3
- package/dist/index311.js +3 -58
- package/dist/index312.js +5 -2
- package/dist/index313.js +8 -67
- package/dist/index314.js +33 -5
- package/dist/index315.js +52 -32
- package/dist/index316.js +53 -7
- package/dist/index317.js +3 -18
- package/dist/index318.js +3 -53
- package/dist/index319.js +3 -53
- package/dist/index320.js +56 -45
- package/dist/index321.js +6 -6
- package/dist/index322.js +18 -4
- package/dist/index323.js +6 -7
- package/dist/index324.js +47 -480
- package/dist/index325.js +2 -4
- package/dist/index326.js +480 -2
- package/dist/index33.js +1 -1
- package/dist/index35.js +4 -4
- package/dist/index37.js +69 -65
- package/dist/index39.js +5 -5
- package/dist/index41.js +2 -2
- package/dist/index43.js +1 -1
- package/dist/index45.js +3 -3
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +1 -1
- package/dist/index75.js +19 -17
- package/dist/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +4 -4
- package/dist/index86.js +2 -2
- package/dist/index88.js +39 -37
- package/dist/index90.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/CommonProps.d.ts +4 -0
- package/package.json +1 -1
- package/dist/index221.js +0 -5
- package/dist/index288.js +0 -4
- package/dist/index297.js +0 -4
- /package/dist/{index266.js → index272.js} +0 -0
package/dist/index226.js
CHANGED
@@ -1,18 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
(
|
4
|
-
(
|
5
|
-
|
6
|
-
}
|
7
|
-
|
8
|
-
o.prototype.isSameOrBefore = function(e, r) {
|
9
|
-
return this.isSame(e, r) || this.isBefore(e, r);
|
10
|
-
};
|
11
|
-
};
|
12
|
-
});
|
13
|
-
})(t);
|
14
|
-
var m = t.exports;
|
15
|
-
const c = /* @__PURE__ */ i(m);
|
1
|
+
const o = "bitboss-ui | ", e = () => ({
|
2
|
+
warn: (r) => console.warn(`${o}${r}`),
|
3
|
+
error: (r) => console.error(`${o}${r}`),
|
4
|
+
throw: (r) => {
|
5
|
+
throw new Error(`${o}${r}`);
|
6
|
+
}
|
7
|
+
});
|
16
8
|
export {
|
17
|
-
|
9
|
+
e as useLogger
|
18
10
|
};
|
package/dist/index227.js
CHANGED
@@ -1,21 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
import { d as s } from "./index224.js";
|
4
|
-
(function(_, u) {
|
5
|
-
(function(e, t) {
|
6
|
-
_.exports = t(s);
|
7
|
-
})(m, function(e) {
|
8
|
-
function t(o) {
|
9
|
-
return o && typeof o == "object" && "default" in o ? o : { default: o };
|
10
|
-
}
|
11
|
-
var a = t(e), n = { name: "it", weekdays: "domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"), weekdaysShort: "dom_lun_mar_mer_gio_ven_sab".split("_"), weekdaysMin: "do_lu_ma_me_gi_ve_sa".split("_"), months: "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"), weekStart: 1, monthsShort: "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"), formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "tra %s", past: "%s fa", s: "qualche secondo", m: "un minuto", mm: "%d minuti", h: "un' ora", hh: "%d ore", d: "un giorno", dd: "%d giorni", M: "un mese", MM: "%d mesi", y: "un anno", yy: "%d anni" }, ordinal: function(o) {
|
12
|
-
return o + "º";
|
13
|
-
} };
|
14
|
-
return a.default.locale(n, null, !0), n;
|
15
|
-
});
|
16
|
-
})(r);
|
17
|
-
var d = r.exports;
|
18
|
-
const g = /* @__PURE__ */ i(d);
|
1
|
+
import { hash as o } from "./index275.js";
|
2
|
+
const t = (r, h = "bb") => `${h}${o(r)}`;
|
19
3
|
export {
|
20
|
-
|
4
|
+
t as hash
|
21
5
|
};
|
package/dist/index228.js
CHANGED
@@ -1,17 +1,4 @@
|
|
1
|
-
|
2
|
-
import { __module as n } from "./index288.js";
|
3
|
-
(function(o, s) {
|
4
|
-
(function(r, e) {
|
5
|
-
o.exports = e();
|
6
|
-
})(a, function() {
|
7
|
-
return { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(r) {
|
8
|
-
var e = ["th", "st", "nd", "rd"], t = r % 100;
|
9
|
-
return "[" + r + (e[(t - 20) % 10] || e[t] || e[0]) + "]";
|
10
|
-
} };
|
11
|
-
});
|
12
|
-
})(n);
|
13
|
-
var u = n.exports;
|
14
|
-
const p = /* @__PURE__ */ _(u);
|
1
|
+
const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
|
15
2
|
export {
|
16
|
-
|
3
|
+
s as isCssColor
|
17
4
|
};
|
package/dist/index229.js
CHANGED
@@ -1,21 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
(function(u, l) {
|
4
|
-
(function(c, e) {
|
5
|
-
u.exports = e();
|
6
|
-
})(s, function() {
|
7
|
-
return function(c, e, r) {
|
8
|
-
r.updateLocale = function(f, o) {
|
9
|
-
var t = r.Ls[f];
|
10
|
-
if (t) return (o ? Object.keys(o) : []).forEach(function(a) {
|
11
|
-
t[a] = o[a];
|
12
|
-
}), t;
|
13
|
-
};
|
14
|
-
};
|
15
|
-
});
|
16
|
-
})(n);
|
17
|
-
var i = n.exports;
|
18
|
-
const x = /* @__PURE__ */ p(i);
|
1
|
+
import { curry as e } from "./index276.js";
|
2
|
+
const t = (n, o, r) => n(r) ? o(r) : r, s = e(t);
|
19
3
|
export {
|
20
|
-
|
4
|
+
t as baseWhen,
|
5
|
+
s as when
|
21
6
|
};
|
package/dist/index23.js
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
import { defineComponent as re, watchEffect as ne, ref as o, computed as
|
2
|
-
import { useFloating as ce } from "./
|
3
|
-
import r from "./
|
4
|
-
import pe from "./
|
5
|
-
import me from "./
|
6
|
-
import fe from "./
|
7
|
-
import be from "./
|
8
|
-
import ve from "./
|
9
|
-
import { identity as
|
10
|
-
import { last as
|
11
|
-
import { useFocusTrap as ke } from "./
|
1
|
+
import { defineComponent as re, watchEffect as ne, ref as o, computed as g, watch as le, openBlock as D, createBlock as V, normalizeClass as P, withCtx as n, renderSlot as p, createVNode as E, withDirectives as ie, createElementVNode as i, mergeProps as F, unref as s, withModifiers as se, toDisplayString as A, normalizeStyle as ue, KeepAlive as de, createCommentVNode as L } from "vue";
|
2
|
+
import { useFloating as ce } from "./index206.js";
|
3
|
+
import r from "./index207.js";
|
4
|
+
import pe from "./index208.js";
|
5
|
+
import me from "./index209.js";
|
6
|
+
import fe from "./index210.js";
|
7
|
+
import be from "./index211.js";
|
8
|
+
import ve from "./index212.js";
|
9
|
+
import { identity as ge } from "./index213.js";
|
10
|
+
import { last as ye } from "./index214.js";
|
11
|
+
import { useFocusTrap as ke } from "./index215.js";
|
12
12
|
import { useId as he } from "./index8.js";
|
13
13
|
import { useIntersectionObserver as Me } from "./index132.js";
|
14
|
-
import { useLocale as we } from "./
|
14
|
+
import { useLocale as we } from "./index216.js";
|
15
15
|
import { useMobile as De } from "./index9.js";
|
16
|
-
import { vMaska as Ve } from "./
|
16
|
+
import { vMaska as Ve } from "./index217.js";
|
17
17
|
import { wait as Ye } from "./index130.js";
|
18
|
-
import { waitFor as Ce } from "./
|
18
|
+
import { waitFor as Ce } from "./index218.js";
|
19
19
|
import Se from "./index21.js";
|
20
20
|
/* empty css */
|
21
|
-
import Ie from "./
|
22
|
-
import Be from "./
|
21
|
+
import Ie from "./index219.js";
|
22
|
+
import Be from "./index220.js";
|
23
23
|
/* empty css */
|
24
|
-
import Oe from "./
|
25
|
-
import
|
26
|
-
import { _config as
|
27
|
-
import { autoUpdate as Pe, flip as Ee, offset as Fe, shift as Ae, hide as Le } from "./
|
24
|
+
import Oe from "./index222.js";
|
25
|
+
import $e from "./index223.js";
|
26
|
+
import { _config as _e } from "./index4.js";
|
27
|
+
import { autoUpdate as Pe, flip as Ee, offset as Fe, shift as Ae, hide as Le } from "./index224.js";
|
28
28
|
const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "value"], je = ["aria-label", "disabled"], qe = ["id"], ft = /* @__PURE__ */ re({
|
29
29
|
__name: "BaseDatePickerInput",
|
30
30
|
props: {
|
@@ -48,27 +48,28 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
48
48
|
readonly: { type: Boolean },
|
49
49
|
required: { type: Boolean },
|
50
50
|
selectable: {},
|
51
|
+
teleportTarget: {},
|
51
52
|
width: { default: 290 }
|
52
53
|
},
|
53
54
|
emits: ["active", "error", "focus", "inactive", "update:modelValue"],
|
54
55
|
setup(W, { emit: j }) {
|
55
56
|
const q = { it: be, en: ve };
|
56
57
|
r.extend(pe), r.extend(me), r.extend(fe), ne(() => {
|
57
|
-
r.locale(q[
|
58
|
+
r.locale(q[_e.locale]);
|
58
59
|
});
|
59
|
-
const t = W, u = j, { t: d } = we(), c = o(null), Y = o(null), m = o(null), H = o(null),
|
60
|
+
const t = W, u = j, { t: d } = we(), c = o(null), Y = o(null), m = o(null), H = o(null), y = o(null), S = o(), k = t.id || `bdpi-${he().id.value}`, { isMobile: I } = De(), T = g(
|
60
61
|
() => t.allowWriting === "not-mobile" && I.value ? "none" : "numeric"
|
61
62
|
), C = o(!0);
|
62
63
|
Me(
|
63
64
|
m,
|
64
65
|
([{ intersectionRatio: e }]) => {
|
65
|
-
e === 1 ? C.value = !0 : (C.value = !1, f.value && (
|
66
|
+
e === 1 ? C.value = !0 : (C.value = !1, f.value && (_(), m.value && m.value.$el.querySelector(
|
66
67
|
".bb-base-date-picker-input__calendar-btn"
|
67
68
|
).focus(), w()));
|
68
69
|
},
|
69
70
|
{ threshold: [0, 1] }
|
70
71
|
);
|
71
|
-
const
|
72
|
+
const R = g(() => ({
|
72
73
|
"bb-base-date-picker-input": !0,
|
73
74
|
"bb-base-date-picker-input--active": h.value,
|
74
75
|
"bb-base-date-picker-input--errors": t.hasErrors,
|
@@ -76,15 +77,15 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
76
77
|
"bb-base-date-picker-input--readonly": t.readonly,
|
77
78
|
"bb-base-date-picker-input--disabled": t.disabled,
|
78
79
|
"bb-base-date-picker-input--compact": t.compact
|
79
|
-
})),
|
80
|
+
})), z = {
|
80
81
|
onInput: (e) => {
|
81
82
|
if (!t.range && e.target instanceof HTMLInputElement)
|
82
|
-
if (
|
83
|
+
if (y.value = e.target.value, /\d{2}\/\d{2}\/\d{4}/.test(e.target.value)) {
|
83
84
|
const a = r(e.target.value, "DD/MM/YYYY");
|
84
85
|
ae(a) ? (e.target.value = "", u("update:modelValue", null), u("error", "invalid_date_typed")) : u("update:modelValue", a.toISOString());
|
85
86
|
} else e.target.value === "" && u("update:modelValue", null);
|
86
87
|
}
|
87
|
-
}, h = o(!1),
|
88
|
+
}, h = o(!1), N = () => {
|
88
89
|
h.value || (u("active"), h.value = !0, document.addEventListener("focusin", M), document.addEventListener("click", M));
|
89
90
|
}, M = (e) => {
|
90
91
|
var a, l;
|
@@ -93,22 +94,22 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
93
94
|
if (e)
|
94
95
|
if (Array.isArray(e)) {
|
95
96
|
let a, l;
|
96
|
-
return e.length && (a = e[0]), e.length > 1 && (l =
|
97
|
+
return e.length && (a = e[0]), e.length > 1 && (l = ye(e)), [a, l].filter(ge).map((oe) => r(oe).format("DD/MM/YYYY")).join(" - ");
|
97
98
|
} else
|
98
99
|
return r(e).format("DD/MM/YYYY");
|
99
100
|
return null;
|
100
|
-
}, U =
|
101
|
+
}, U = g(() => y.value ? y.value : B(t.modelValue));
|
101
102
|
le(
|
102
103
|
() => t.modelValue,
|
103
104
|
(e) => {
|
104
|
-
|
105
|
+
y.value = B(e);
|
105
106
|
}
|
106
107
|
);
|
107
108
|
const { floatingStyles: K, placement: Z } = ce(m, c, {
|
108
109
|
placement: "bottom",
|
109
110
|
whileElementsMounted: Pe,
|
110
111
|
middleware: [Ee(), Fe(5), Ae({ padding: 6 }), Le()]
|
111
|
-
}), G =
|
112
|
+
}), G = g(() => {
|
112
113
|
const e = {
|
113
114
|
...K.value
|
114
115
|
};
|
@@ -118,9 +119,9 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
118
119
|
}, w = async () => {
|
119
120
|
var e;
|
120
121
|
f.value = !1, (e = S.value) == null || e.resetStatus();
|
121
|
-
}, O = o(!1),
|
122
|
+
}, O = o(!1), $ = async () => {
|
122
123
|
b.value || (O.value = !0, await Ce(() => !!c.value), await J(), Q());
|
123
|
-
}, b = o(!1), { activate: Q, deactivate:
|
124
|
+
}, b = o(!1), { activate: Q, deactivate: _ } = ke(c, {
|
124
125
|
onActivate: () => b.value = !0,
|
125
126
|
// On post activation focus on current date
|
126
127
|
onPostActivate: () => {
|
@@ -138,16 +139,16 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
138
139
|
allowOutsideClick: !0,
|
139
140
|
preventScroll: !0
|
140
141
|
}), v = o(!t.allowWriting || t.range), X = async (e) => {
|
141
|
-
u("focus", e), v.value &&
|
142
|
+
u("focus", e), v.value && $(), v.value = !t.allowWriting || t.allowWriting === "not-mobile" && I.value || t.range;
|
142
143
|
}, x = (e) => t.range && Array.isArray(e) && e.length === 2 || !t.range && !!e, ee = {
|
143
144
|
"onUpdate:modelValue": (e) => {
|
144
|
-
u("update:modelValue", e), x(e) && (v.value = !1,
|
145
|
+
u("update:modelValue", e), x(e) && (v.value = !1, _({
|
145
146
|
onPostDeactivate: () => {
|
146
147
|
b.value = !1, w();
|
147
148
|
}
|
148
149
|
}));
|
149
150
|
}
|
150
|
-
}, te =
|
151
|
+
}, te = g(() => {
|
151
152
|
if (t.range) {
|
152
153
|
if (!t.modelValue || t.modelValue.length < 2)
|
153
154
|
return d("baseDatePickerInput.emptyRange").value;
|
@@ -166,8 +167,8 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
166
167
|
return (e, a) => (D(), V(Oe, {
|
167
168
|
ref_key: "outerContainer",
|
168
169
|
ref: Y,
|
169
|
-
class: P(
|
170
|
-
onFocusin:
|
170
|
+
class: P(R.value),
|
171
|
+
onFocusin: N
|
171
172
|
}, {
|
172
173
|
"prepend-outer": n(() => [
|
173
174
|
p(e.$slots, "prepend-outer")
|
@@ -204,12 +205,12 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
204
205
|
autofocus: e.autofocus,
|
205
206
|
"data-maska": t.range ? "##/##/#### - ##/##/####" : "##/##/####",
|
206
207
|
disabled: e.disabled,
|
207
|
-
inputmode:
|
208
|
+
inputmode: T.value,
|
208
209
|
name: e.name,
|
209
210
|
placeholder: e.placeholder,
|
210
211
|
readonly: e.readonly || e.range || !e.allowWriting,
|
211
212
|
required: e.required
|
212
|
-
},
|
213
|
+
}, z, {
|
213
214
|
size: "1",
|
214
215
|
type: "text",
|
215
216
|
value: U.value,
|
@@ -222,7 +223,7 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
222
223
|
class: "bb-base-date-picker-input__calendar-btn",
|
223
224
|
disabled: e.disabled || e.readonly || !C.value,
|
224
225
|
type: "button",
|
225
|
-
onClick: se(
|
226
|
+
onClick: se($, ["stop"])
|
226
227
|
}, a[0] || (a[0] = [
|
227
228
|
i("svg", {
|
228
229
|
fill: "none",
|
@@ -262,7 +263,10 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
262
263
|
]),
|
263
264
|
_: 3
|
264
265
|
}, 8, ["append:icon", "prepend:icon"]),
|
265
|
-
O.value ? (D(), V(Ie, {
|
266
|
+
O.value ? (D(), V(Ie, {
|
267
|
+
key: 0,
|
268
|
+
target: e.teleportTarget
|
269
|
+
}, {
|
266
270
|
default: n(() => {
|
267
271
|
var l;
|
268
272
|
return [
|
@@ -274,7 +278,7 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
274
278
|
}]),
|
275
279
|
style: ue(G.value)
|
276
280
|
}, [
|
277
|
-
E(
|
281
|
+
E($e, {
|
278
282
|
direction: (l = s(Z)) != null && l.includes("top") ? "bottom" : "top",
|
279
283
|
duration: 300
|
280
284
|
}, {
|
@@ -303,7 +307,7 @@ const We = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska",
|
|
303
307
|
];
|
304
308
|
}),
|
305
309
|
_: 1
|
306
|
-
})) : L("", !0)
|
310
|
+
}, 8, ["target"])) : L("", !0)
|
307
311
|
]),
|
308
312
|
_: 3
|
309
313
|
}, 8, ["class"]));
|
package/dist/index230.js
CHANGED
@@ -1,29 +1,4 @@
|
|
1
|
-
|
2
|
-
import { __module as n } from "./index290.js";
|
3
|
-
(function(f, p) {
|
4
|
-
(function(r, e) {
|
5
|
-
f.exports = e();
|
6
|
-
})(k, function() {
|
7
|
-
var r = "week", e = "year";
|
8
|
-
return function(w, u, a) {
|
9
|
-
var o = u.prototype;
|
10
|
-
o.week = function(t) {
|
11
|
-
if (t === void 0 && (t = null), t !== null) return this.add(7 * (t - this.week()), "day");
|
12
|
-
var s = this.$locale().yearStart || 1;
|
13
|
-
if (this.month() === 11 && this.date() > 25) {
|
14
|
-
var l = a(this).startOf(e).add(1, e).date(s), d = a(this).endOf(r);
|
15
|
-
if (l.isBefore(d)) return 1;
|
16
|
-
}
|
17
|
-
var h = a(this).startOf(e).date(s).startOf(r).subtract(1, "millisecond"), i = this.diff(h, r, !0);
|
18
|
-
return i < 0 ? a(this).startOf("week").week() : Math.ceil(i);
|
19
|
-
}, o.weeks = function(t) {
|
20
|
-
return t === void 0 && (t = null), this.week(t);
|
21
|
-
};
|
22
|
-
};
|
23
|
-
});
|
24
|
-
})(n);
|
25
|
-
var m = n.exports;
|
26
|
-
const x = /* @__PURE__ */ c(m);
|
1
|
+
const o = (e) => typeof e == "boolean" ? e : e === "true";
|
27
2
|
export {
|
28
|
-
|
3
|
+
o as booleanishToBoolean
|
29
4
|
};
|
package/dist/index231.js
CHANGED
package/dist/index232.js
CHANGED
@@ -1,252 +1,21 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
current: { type: Boolean },
|
14
|
-
disabled: { type: Boolean },
|
15
|
-
firstDayOfWeek: {},
|
16
|
-
id: {},
|
17
|
-
modelValue: {},
|
18
|
-
max: {},
|
19
|
-
min: {},
|
20
|
-
selectable: { type: Function },
|
21
|
-
range: { type: Boolean },
|
22
|
-
multiple: { type: Boolean },
|
23
|
-
readonly: { type: Boolean }
|
24
|
-
},
|
25
|
-
emits: ["update:modelValue", "update:cursor"],
|
26
|
-
setup(N, { emit: x }) {
|
27
|
-
const a = N, s = x, g = A(null), R = b().startOf("day"), m = _(() => {
|
28
|
-
let e = 1 / 0, r = -1 / 0, o = {};
|
29
|
-
return a.modelValue && [].concat(a.modelValue).filter(T).map((i) => b(i).startOf("day")).map((i) => i.valueOf()).forEach((i, h) => {
|
30
|
-
i < e && (e = i), i > r && (r = i), o[i] = h;
|
31
|
-
}), {
|
32
|
-
min: e,
|
33
|
-
max: r,
|
34
|
-
index: (t) => o[t.valueOf()],
|
35
|
-
selected: (t) => me(o[t.valueOf()]),
|
36
|
-
isFirstOfRange: (t) => t.valueOf() === e,
|
37
|
-
isLastOfRange: (t) => t.valueOf() === r,
|
38
|
-
isBetween: (t) => t.valueOf() > e && t.valueOf() < r
|
1
|
+
import { getDefaultExportFromCjs as p, commonjsGlobal as s } from "./index277.js";
|
2
|
+
import { __module as n } from "./index290.js";
|
3
|
+
(function(u, l) {
|
4
|
+
(function(c, e) {
|
5
|
+
u.exports = e();
|
6
|
+
})(s, function() {
|
7
|
+
return function(c, e, r) {
|
8
|
+
r.updateLocale = function(f, o) {
|
9
|
+
var t = r.Ls[f];
|
10
|
+
if (t) return (o ? Object.keys(o) : []).forEach(function(a) {
|
11
|
+
t[a] = o[a];
|
12
|
+
}), t;
|
39
13
|
};
|
40
|
-
}), K = _(() => new Array(7).fill("").map((e, r) => b().day((r + a.firstDayOfWeek) % 7)).map((e) => ({
|
41
|
-
accessibleLabel: e.format("dddd"),
|
42
|
-
label: e.format("dd").slice(0, 1).toUpperCase(),
|
43
|
-
id: e.toISOString(),
|
44
|
-
original: e
|
45
|
-
}))), v = _(() => {
|
46
|
-
const e = a.cursor.year().toString(), r = a.cursor.month().toString();
|
47
|
-
let t = a.cursor.clone().startOf("month").clone().startOf("week"), h = a.cursor.clone().endOf("month").clone().endOf("week"), Z = b(a.cursor).startOf("day"), D = [];
|
48
|
-
for (let n = t; n.isBefore(h); n = n.add(1, "day"))
|
49
|
-
D.push(n.clone());
|
50
|
-
const ee = D.map((n) => {
|
51
|
-
const y = n.toISOString(), te = n.week().toString();
|
52
|
-
let re = m.value.selected(n);
|
53
|
-
const B = a.range && m.value.isFirstOfRange(n), I = a.range && m.value.isLastOfRange(n), ae = a.range && !B && !I && m.value.isBetween(n), oe = n.month().toString() === r && n.year().toString() === e, ne = n.isSame(R), se = n.isSame(Z), ie = d(n), de = n.get("D").toString();
|
54
|
-
return {
|
55
|
-
buttonId: [a.id, y].filter(T).join("_"),
|
56
|
-
current: se,
|
57
|
-
disabled: ie,
|
58
|
-
first: B,
|
59
|
-
highlighted: oe,
|
60
|
-
id: y,
|
61
|
-
label: de,
|
62
|
-
last: I,
|
63
|
-
middle: ae,
|
64
|
-
original: n,
|
65
|
-
selected: re,
|
66
|
-
slotName: y,
|
67
|
-
today: ne,
|
68
|
-
week: te
|
69
|
-
};
|
70
|
-
});
|
71
|
-
return be(ee, 7);
|
72
|
-
}), d = (e) => {
|
73
|
-
let r = !0;
|
74
|
-
return a.min && r && (r = e.isSameOrAfter(b(a.min).startOf("day"))), a.max && r && (r = e.isSameOrBefore(b(a.max).startOf("day"))), typeof a.selectable == "function" && r && (r = a.selectable(e.toDate())), !r;
|
75
|
-
}, w = A("left"), F = (e, r) => {
|
76
|
-
e && r && (w.value = e.isBefore(r) ? "left" : "right");
|
77
14
|
};
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}
|
83
|
-
);
|
84
|
-
const V = (e) => s("update:cursor", e), l = async () => {
|
85
|
-
if (!g.value) return;
|
86
|
-
await pe();
|
87
|
-
const e = ge([
|
88
|
-
...g.value.querySelectorAll(
|
89
|
-
".bb-base-date-picker__date--current button"
|
90
|
-
)
|
91
|
-
]);
|
92
|
-
e instanceof HTMLElement && e.focus();
|
93
|
-
}, H = (e) => {
|
94
|
-
if (!a.readonly && e.target instanceof HTMLButtonElement) {
|
95
|
-
const [, r] = e.target.id.split("_"), o = b(r);
|
96
|
-
if (a.cursor.month() !== o.month()) {
|
97
|
-
V(o);
|
98
|
-
return;
|
99
|
-
}
|
100
|
-
const t = v.value.flat().find((i) => i.id === r);
|
101
|
-
if (t.disabled) return;
|
102
|
-
V(o), P(t);
|
103
|
-
}
|
104
|
-
}, P = (e) => {
|
105
|
-
a.range ? U(e) : a.multiple ? j(e) : W(e);
|
106
|
-
}, U = (e) => {
|
107
|
-
if (!Array.isArray(a.modelValue)) return;
|
108
|
-
const r = e.original.toISOString();
|
109
|
-
if (a.modelValue.length !== 1) s("update:modelValue", [r]);
|
110
|
-
else {
|
111
|
-
const o = E([a.modelValue[0], e.original.toISOString()]);
|
112
|
-
s("update:modelValue", o);
|
113
|
-
}
|
114
|
-
}, j = (e) => {
|
115
|
-
if (Array.isArray(a.modelValue))
|
116
|
-
if (e.selected) {
|
117
|
-
const r = e.original.toISOString(), o = a.modelValue.filter((t) => t !== r);
|
118
|
-
s("update:modelValue", o);
|
119
|
-
} else {
|
120
|
-
const r = E([...a.modelValue, e.original.toISOString()]);
|
121
|
-
s("update:modelValue", r);
|
122
|
-
}
|
123
|
-
}, W = (e) => {
|
124
|
-
e.selected ? s("update:modelValue", null) : s("update:modelValue", e.original.toISOString());
|
125
|
-
}, $ = () => {
|
126
|
-
const e = a.cursor.clone().add(1, "day");
|
127
|
-
d(e) || (s("update:cursor", e), l());
|
128
|
-
}, q = () => {
|
129
|
-
const e = a.cursor.clone().subtract(1, "day");
|
130
|
-
d(e) || (s("update:cursor", e), l());
|
131
|
-
}, z = () => {
|
132
|
-
const e = a.cursor.clone().subtract(1, "week");
|
133
|
-
d(e) || (s("update:cursor", e), l());
|
134
|
-
}, G = () => {
|
135
|
-
const e = a.cursor.clone().add(1, "week");
|
136
|
-
d(e) || (s("update:cursor", e), l());
|
137
|
-
}, J = () => {
|
138
|
-
const e = a.cursor.clone().endOf("week");
|
139
|
-
d(e) || (s("update:cursor", e), l());
|
140
|
-
}, Q = () => {
|
141
|
-
const e = a.cursor.clone().startOf("week");
|
142
|
-
d(e) || (s("update:cursor", e), l());
|
143
|
-
}, X = (e) => {
|
144
|
-
if (e.shiftKey) {
|
145
|
-
const r = a.cursor.clone().subtract(1, "year");
|
146
|
-
if (d(r)) return;
|
147
|
-
s("update:cursor", r);
|
148
|
-
} else {
|
149
|
-
const r = a.cursor.clone().subtract(1, "month");
|
150
|
-
if (d(r)) return;
|
151
|
-
s("update:cursor", r);
|
152
|
-
}
|
153
|
-
l();
|
154
|
-
}, Y = (e) => {
|
155
|
-
if (e.shiftKey) {
|
156
|
-
const r = a.cursor.clone().add(1, "year");
|
157
|
-
if (d(r)) return;
|
158
|
-
s("update:cursor", r);
|
159
|
-
} else {
|
160
|
-
const r = a.cursor.clone().add(1, "month");
|
161
|
-
if (d(r)) return;
|
162
|
-
s("update:cursor", r);
|
163
|
-
}
|
164
|
-
l();
|
165
|
-
};
|
166
|
-
return (e, r) => (c(), u("div", {
|
167
|
-
ref_key: "calendar",
|
168
|
-
ref: g,
|
169
|
-
class: k(["bb-base-date-picker__days-selector", { "bb-base-date-picker__days-selector--hidden": !e.current }]),
|
170
|
-
onKeydown: [
|
171
|
-
f(p(G, ["prevent"]), ["down"]),
|
172
|
-
f(p(J, ["prevent"]), ["end"]),
|
173
|
-
f(p(Q, ["prevent"]), ["home"]),
|
174
|
-
f(p(q, ["prevent"]), ["left"]),
|
175
|
-
f(p(Y, ["prevent"]), ["page-down"]),
|
176
|
-
f(p(X, ["prevent"]), ["page-up"]),
|
177
|
-
f(p($, ["prevent"]), ["right"]),
|
178
|
-
f(p(z, ["prevent"]), ["up"])
|
179
|
-
]
|
180
|
-
}, [
|
181
|
-
ue(he, {
|
182
|
-
direction: w.value,
|
183
|
-
gap: 30
|
184
|
-
}, {
|
185
|
-
default: fe(() => [
|
186
|
-
(c(), u("div", {
|
187
|
-
key: e.cursor.month().toString(),
|
188
|
-
class: "bb-base-date-picker__month"
|
189
|
-
}, [
|
190
|
-
M("div", _e, [
|
191
|
-
(c(!0), u(O, null, S(K.value, (o) => (c(), u("div", {
|
192
|
-
key: o.id,
|
193
|
-
abbr: o.accessibleLabel,
|
194
|
-
class: "bb-base-date-picker__header-cell"
|
195
|
-
}, C(o.label), 9, ke))), 128))
|
196
|
-
]),
|
197
|
-
(c(!0), u(O, null, S(v.value, (o) => (c(), u("div", {
|
198
|
-
key: o[0].id,
|
199
|
-
class: "bb-base-date-picker__week"
|
200
|
-
}, [
|
201
|
-
(c(!0), u(O, null, S(o, (t) => (c(), u("div", {
|
202
|
-
key: t.id,
|
203
|
-
class: k({
|
204
|
-
"bb-base-date-picker__date--current": t.current,
|
205
|
-
"bb-base-date-picker__date--disabled": e.disabled || t.disabled,
|
206
|
-
"bb-base-date-picker__date--first": t.first,
|
207
|
-
"bb-base-date-picker__date--highlighted": t.highlighted,
|
208
|
-
"bb-base-date-picker__date--last": t.last,
|
209
|
-
"bb-base-date-picker__date--middle": t.middle,
|
210
|
-
"bb-base-date-picker__date--selected": t.selected,
|
211
|
-
"bb-base-date-picker__date--today": t.today,
|
212
|
-
"bb-base-date-picker__date": !0
|
213
|
-
})
|
214
|
-
}, [
|
215
|
-
M("button", {
|
216
|
-
id: t.buttonId,
|
217
|
-
class: k("bb-base-date-picker__date-button"),
|
218
|
-
disabled: e.disabled || t.disabled,
|
219
|
-
tabindex: Number(t.current) - 1,
|
220
|
-
type: "button",
|
221
|
-
onClick: H
|
222
|
-
}, C(t.label), 9, Oe),
|
223
|
-
L(e.$slots, "day", {
|
224
|
-
first: t.first,
|
225
|
-
highlighted: t.highlighted,
|
226
|
-
item: t.original,
|
227
|
-
label: t.label,
|
228
|
-
last: t.last,
|
229
|
-
middle: t.middle,
|
230
|
-
selected: t.selected
|
231
|
-
}),
|
232
|
-
L(e.$slots, t.slotName, {
|
233
|
-
first: t.first,
|
234
|
-
highlighted: t.highlighted,
|
235
|
-
item: t.original,
|
236
|
-
label: t.label,
|
237
|
-
last: t.last,
|
238
|
-
middle: t.middle,
|
239
|
-
selected: t.selected
|
240
|
-
})
|
241
|
-
], 2))), 128))
|
242
|
-
]))), 128))
|
243
|
-
]))
|
244
|
-
]),
|
245
|
-
_: 3
|
246
|
-
}, 8, ["direction"])
|
247
|
-
], 42, ye));
|
248
|
-
}
|
249
|
-
});
|
15
|
+
});
|
16
|
+
})(n);
|
17
|
+
var i = n.exports;
|
18
|
+
const x = /* @__PURE__ */ p(i);
|
250
19
|
export {
|
251
|
-
|
20
|
+
x as default
|
252
21
|
};
|