maz-ui 3.47.1 → 3.47.2-beta.2
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/components/MazAccordion.mjs +36 -37
- package/components/MazAnimatedCounter.mjs +14 -16
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChart.mjs +23 -32
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +66 -71
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +162 -185
- package/components/MazExpandAnimation.mjs +20 -21
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +30 -31
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +18 -30
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +37 -42
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +24 -28
- package/components/MazTable.d.ts +31 -54
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTextarea.mjs +32 -34
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CqppWg2j.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
- package/{modules/chunks/MazBtn-CTqI4qhg.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
- package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-40lm8-AL.mjs} +37 -49
- package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
- package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
- package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BijEMn4r.mjs} +37 -49
- package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
- package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
- package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
- package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
- package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
- package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
- package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
- package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
- package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-BYB8y1_u.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
- package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-CXQiXWFr.mjs} +267 -225
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-VTZUhBKC.mjs} +249 -207
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-BF5TFzse.mjs} +1 -1
- package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-DC3S-CVu.mjs} +43 -52
- package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-DzWkS-g8.mjs} +41 -50
- package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-NE6H-10w.mjs} +38 -47
- package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
- package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-Dj3sW-e5.mjs} +189 -209
- package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
- package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
- package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +503 -547
- package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-DwWiIYAR.mjs} +244 -265
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
- package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-BJ07NVXQ.mjs} +160 -180
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
- package/components/chunks/MazSpinner-BymqEMBk.mjs +34 -0
- package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
- package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-DS58mtzm.mjs} +1 -1
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
- package/components/chunks/MazSpinner-Dmkr_r9u.mjs +34 -0
- package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
- package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
- package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-BJDPdIJB.mjs} +183 -227
- package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
- package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
- package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-CkuzyufF.cjs} +1 -1
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
- package/modules/chunks/index-CUNN0eIB.cjs +124 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-CxFUggmu.mjs} +925 -931
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazTable.vue.d.ts +31 -54
- package/types/modules/composables/useFormValidator/types.d.ts +5 -1
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
- package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BRnLMzhy.mjs +0 -118
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DlD5m7T4.mjs +0 -118
- package/components/chunks/MazBtn-Dt8lr0GH.mjs +0 -118
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazSpinner-Cg26sBU2.mjs +0 -34
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-DlMKBtyt.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-M4r0cykl.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTabsBar-MZYefBb8.mjs +0 -204
- package/modules/chunks/MazBtn-D_CpNgpD.cjs +0 -9
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { useId as
|
|
1
|
+
import { useId as ee, computed as oe, ref as y, nextTick as ne, defineComponent as te, defineAsyncComponent as D, watch as I, withDirectives as T, openBlock as v, createElementBlock as b, unref as a, normalizeClass as $, normalizeStyle as S, createElementVNode as L, withModifiers as E, renderSlot as p, createTextVNode as z, toDisplayString as B, createCommentVNode as O, createVNode as U, mergeProps as A, createSlots as re, withCtx as h, createBlock as N, Transition as le, Fragment as se, renderList as ie, vShow as ae } from "vue";
|
|
2
2
|
import './assets/MazDropdown.css';function ue({
|
|
3
3
|
componentName: t,
|
|
4
|
-
providedId:
|
|
4
|
+
providedId: r
|
|
5
5
|
}) {
|
|
6
|
-
const
|
|
7
|
-
return oe(() =>
|
|
6
|
+
const n = ee();
|
|
7
|
+
return oe(() => r ?? `${t}-${n}`);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
function
|
|
9
|
+
y("system");
|
|
10
|
+
y("system");
|
|
11
|
+
const w = "__maz-click-outside__";
|
|
12
|
+
function F() {
|
|
13
13
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
14
14
|
}
|
|
15
|
-
async function
|
|
15
|
+
async function P(t, r) {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
17
|
+
V(t);
|
|
18
|
+
const n = r.instance, c = r.value, d = typeof c == "function";
|
|
19
|
+
if (!d)
|
|
20
20
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
21
|
-
await
|
|
22
|
-
if ((!t || k.target && !t.contains(k.target)) && c &&
|
|
23
|
-
return c.call(
|
|
21
|
+
await ne(), t[w] = (k) => {
|
|
22
|
+
if ((!t || k.target && !t.contains(k.target)) && c && d)
|
|
23
|
+
return c.call(n, k);
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
document.addEventListener(
|
|
27
|
-
} catch (
|
|
28
|
-
console.error("[maz-ui](vClickOutside)",
|
|
25
|
+
const C = F();
|
|
26
|
+
document.addEventListener(C, t[w], { passive: !0 });
|
|
27
|
+
} catch (n) {
|
|
28
|
+
console.error("[maz-ui](vClickOutside)", n);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function V(t) {
|
|
32
32
|
try {
|
|
33
|
-
const
|
|
34
|
-
document.removeEventListener(
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("[maz-ui](vClickOutside)",
|
|
33
|
+
const r = F();
|
|
34
|
+
document.removeEventListener(r, t[w], !1), delete t[w];
|
|
35
|
+
} catch (r) {
|
|
36
|
+
console.error("[maz-ui](vClickOutside)", r);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function ce(t,
|
|
39
|
+
function ce(t, r) {
|
|
40
40
|
try {
|
|
41
|
-
if (
|
|
41
|
+
if (r.value === r.oldValue)
|
|
42
42
|
return;
|
|
43
|
-
|
|
44
|
-
} catch (
|
|
45
|
-
console.error("[maz-ui](vClickOutside)",
|
|
43
|
+
P(t, r);
|
|
44
|
+
} catch (n) {
|
|
45
|
+
console.error("[maz-ui](vClickOutside)", n);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
const de = {
|
|
49
|
-
mounted:
|
|
49
|
+
mounted: P,
|
|
50
50
|
updated: ce,
|
|
51
|
-
unmounted:
|
|
51
|
+
unmounted: V
|
|
52
52
|
};
|
|
53
|
-
function fe(t,
|
|
54
|
-
let
|
|
53
|
+
function fe(t, r) {
|
|
54
|
+
let n;
|
|
55
55
|
return function(...c) {
|
|
56
|
-
clearTimeout(
|
|
56
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
57
57
|
t.apply(this, c);
|
|
58
|
-
},
|
|
58
|
+
}, r);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const pe = {
|
|
62
62
|
cancelText: "Cancel",
|
|
63
63
|
confirmText: "Confirm",
|
|
64
64
|
cancelButton: {
|
|
@@ -70,9 +70,9 @@ const me = {
|
|
|
70
70
|
color: "success"
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const
|
|
73
|
+
y(pe);
|
|
74
|
+
y([]);
|
|
75
|
+
const me = ["id"], ve = ["aria-expanded"], ye = ["id"], ke = ["onClick"], he = /* @__PURE__ */ te({
|
|
76
76
|
inheritAttrs: !1,
|
|
77
77
|
__name: "MazDropdown",
|
|
78
78
|
props: {
|
|
@@ -93,75 +93,75 @@ const pe = ["id"], ve = ["aria-expanded"], ye = ["id"], be = ["onClick"], he = /
|
|
|
93
93
|
block: { type: Boolean }
|
|
94
94
|
},
|
|
95
95
|
emits: ["menuitem-clicked", "update:open"],
|
|
96
|
-
setup(t, { emit:
|
|
97
|
-
const
|
|
96
|
+
setup(t, { emit: r }) {
|
|
97
|
+
const n = t, c = r, d = ue({
|
|
98
98
|
componentName: "MazDropdown",
|
|
99
|
-
providedId:
|
|
100
|
-
}),
|
|
99
|
+
providedId: n.id
|
|
100
|
+
}), C = D(() => import("./chunks/MazBtn-cDJlUVVY.mjs")), k = D(() => import("./chunks/MazLink-C_3Wya94.mjs")), H = D(() => import("./chunks/chevron-down-BkvtON3b.mjs")), i = y(n.open), s = y(), f = fe((e) => {
|
|
101
101
|
u(e);
|
|
102
102
|
}, 200);
|
|
103
|
-
function
|
|
103
|
+
function R() {
|
|
104
104
|
i.value && u(!1);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function q() {
|
|
107
107
|
u(!i.value);
|
|
108
108
|
}
|
|
109
|
+
function K() {
|
|
110
|
+
["click"].includes(n.trigger) && q();
|
|
111
|
+
}
|
|
109
112
|
function Q() {
|
|
110
|
-
["
|
|
113
|
+
["hover", "both"].includes(n.trigger) && u(!0);
|
|
111
114
|
}
|
|
112
115
|
function j() {
|
|
113
|
-
["hover", "both"].includes(
|
|
116
|
+
["hover", "both"].includes(n.trigger) && (i.value === !1 ? u(!0) : f(!0));
|
|
114
117
|
}
|
|
115
118
|
function G() {
|
|
116
|
-
["hover", "both"].includes(
|
|
119
|
+
["hover", "both"].includes(n.trigger) && f(!1);
|
|
117
120
|
}
|
|
118
121
|
function J() {
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
function W() {
|
|
122
|
-
m(!1);
|
|
122
|
+
f(!1);
|
|
123
123
|
}
|
|
124
124
|
function u(e) {
|
|
125
|
-
|
|
125
|
+
n.disabled || (i.value = e, c("update:open", e));
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function W(e) {
|
|
128
128
|
return "action" in e;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function X(e) {
|
|
131
131
|
return "href" in e || "to" in e;
|
|
132
132
|
}
|
|
133
|
-
async function
|
|
134
|
-
var
|
|
135
|
-
c("menuitem-clicked",
|
|
133
|
+
async function Y(e, l) {
|
|
134
|
+
var o;
|
|
135
|
+
c("menuitem-clicked", l), await ((o = e.action) == null ? void 0 : o.call(e)), n.noCloseOnClick || g();
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
137
|
+
function g() {
|
|
138
|
+
n.noCloseOnClick === !1 && u(!1);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
e.key === "Escape" ? (e.preventDefault(), u(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ?
|
|
140
|
+
function M(e) {
|
|
141
|
+
e.key === "Escape" ? (e.preventDefault(), u(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? _(e) : e.key === "Enter" && typeof s.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${d.value} .menuitem`)[s.value].click(), g());
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Z(e) {
|
|
144
144
|
["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && i.value === !1 && (e.preventDefault(), u(!0));
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
var
|
|
146
|
+
function _(e) {
|
|
147
|
+
var m;
|
|
148
148
|
e.preventDefault();
|
|
149
|
-
const
|
|
149
|
+
const l = e.key;
|
|
150
150
|
i.value || u(!0);
|
|
151
|
-
const
|
|
152
|
-
|
|
151
|
+
const o = (m = n.items) == null ? void 0 : m.length;
|
|
152
|
+
o && (typeof s.value == "number" ? s.value === o - 1 && l === "ArrowDown" ? s.value = 0 : s.value === 0 && l === "ArrowUp" ? s.value = o - 1 : s.value = l === "ArrowDown" ? s.value + 1 : s.value - 1 : s.value = l === "ArrowDown" ? 0 : o - 1);
|
|
153
153
|
}
|
|
154
154
|
return I(
|
|
155
155
|
() => i.value,
|
|
156
156
|
(e) => {
|
|
157
|
-
e ? document.addEventListener("keydown",
|
|
157
|
+
e ? document.addEventListener("keydown", M) : document.removeEventListener("keydown", M), s.value = void 0;
|
|
158
158
|
}
|
|
159
159
|
), I(
|
|
160
|
-
() =>
|
|
160
|
+
() => n.open,
|
|
161
161
|
(e) => u(e)
|
|
162
|
-
), (e,
|
|
163
|
-
id: a(
|
|
164
|
-
class:
|
|
162
|
+
), (e, l) => T((v(), b("div", {
|
|
163
|
+
id: a(d),
|
|
164
|
+
class: $(["m-dropdown", [n.class, { "--block": e.block }]]),
|
|
165
165
|
style: S(e.style)
|
|
166
166
|
}, [
|
|
167
167
|
L("div", {
|
|
@@ -170,53 +170,47 @@ const pe = ["id"], ve = ["aria-expanded"], ye = ["id"], be = ["onClick"], he = /
|
|
|
170
170
|
class: "m-dropdown__wrapper",
|
|
171
171
|
"aria-expanded": i.value,
|
|
172
172
|
"aria-haspopup": "menu",
|
|
173
|
-
onClick:
|
|
174
|
-
onFocus:
|
|
175
|
-
onBlur:
|
|
176
|
-
onKeydown:
|
|
177
|
-
onMouseenter:
|
|
178
|
-
onMouseleave:
|
|
173
|
+
onClick: E(K, ["stop"]),
|
|
174
|
+
onFocus: Q,
|
|
175
|
+
onBlur: J,
|
|
176
|
+
onKeydown: Z,
|
|
177
|
+
onMouseenter: j,
|
|
178
|
+
onMouseleave: G
|
|
179
179
|
}, [
|
|
180
|
-
e.screenReaderDescription || e.$slots["screen-reader-description"] ? (
|
|
180
|
+
e.screenReaderDescription || e.$slots["screen-reader-description"] ? (v(), b("span", {
|
|
181
181
|
key: 0,
|
|
182
|
-
id: `${a(
|
|
182
|
+
id: `${a(d)}-labelspan`,
|
|
183
183
|
class: "maz-sr-only"
|
|
184
184
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
z(e.screenReaderDescription),
|
|
185
|
+
p(e.$slots, "screen-reader-description", {}, () => [
|
|
186
|
+
z(
|
|
187
|
+
B(e.screenReaderDescription),
|
|
189
188
|
1
|
|
190
189
|
/* TEXT */
|
|
191
190
|
)
|
|
192
191
|
])
|
|
193
|
-
], 8, ye)) :
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
@default \`<MazBtn />\`
|
|
198
|
-
`),
|
|
199
|
-
v(e.$slots, "element", { isOpen: i.value }, () => [
|
|
200
|
-
U(a(g), A({
|
|
201
|
-
"aria-labelledby": `${a(f)}-labelspan`,
|
|
192
|
+
], 8, ye)) : O("v-if", !0),
|
|
193
|
+
p(e.$slots, "element", { isOpen: i.value }, () => [
|
|
194
|
+
U(a(C), A({
|
|
195
|
+
"aria-labelledby": `${a(d)}-labelspan`,
|
|
202
196
|
color: e.color,
|
|
203
197
|
disabled: e.disabled
|
|
204
|
-
},
|
|
198
|
+
}, e.$attrs, {
|
|
205
199
|
tabindex: "-1",
|
|
206
200
|
block: e.block
|
|
207
201
|
}), re({
|
|
208
|
-
default:
|
|
209
|
-
|
|
202
|
+
default: h(() => [
|
|
203
|
+
p(e.$slots, "default")
|
|
210
204
|
]),
|
|
211
205
|
_: 2
|
|
212
206
|
/* DYNAMIC */
|
|
213
207
|
}, [
|
|
214
208
|
e.noChevron ? void 0 : {
|
|
215
209
|
name: "right-icon",
|
|
216
|
-
fn:
|
|
217
|
-
e.noChevron ?
|
|
210
|
+
fn: h(() => [
|
|
211
|
+
e.noChevron ? O("v-if", !0) : (v(), N(a(H), {
|
|
218
212
|
key: 0,
|
|
219
|
-
class:
|
|
213
|
+
class: $([{ "maz-rotate-180": i.value }, "chevron-icon"])
|
|
220
214
|
}, null, 8, ["class"]))
|
|
221
215
|
]),
|
|
222
216
|
key: "0"
|
|
@@ -224,17 +218,17 @@ const pe = ["id"], ve = ["aria-expanded"], ye = ["id"], be = ["onClick"], he = /
|
|
|
224
218
|
]), 1040, ["aria-labelledby", "color", "disabled", "block"])
|
|
225
219
|
])
|
|
226
220
|
], 40, ve),
|
|
227
|
-
U(
|
|
221
|
+
U(le, {
|
|
228
222
|
name: "maz-scale-fade",
|
|
229
223
|
persisted: ""
|
|
230
224
|
}, {
|
|
231
|
-
default:
|
|
225
|
+
default: h(() => [
|
|
232
226
|
T(L(
|
|
233
227
|
"div",
|
|
234
228
|
{
|
|
235
229
|
role: "menu",
|
|
236
230
|
"aria-label": "Menu",
|
|
237
|
-
class:
|
|
231
|
+
class: $(["menu", [{
|
|
238
232
|
"--top": e.position.includes("top"),
|
|
239
233
|
"--left": e.position.includes("left"),
|
|
240
234
|
"--right": e.position.includes("right"),
|
|
@@ -242,90 +236,73 @@ const pe = ["id"], ve = ["aria-expanded"], ye = ["id"], be = ["onClick"], he = /
|
|
|
242
236
|
}, e.menuPanelClass]]),
|
|
243
237
|
tabindex: "-1",
|
|
244
238
|
style: S(e.menuPanelStyle),
|
|
245
|
-
onFocus:
|
|
246
|
-
onBlur:
|
|
247
|
-
onMouseenter:
|
|
248
|
-
onMouseleave:
|
|
239
|
+
onFocus: l[0] || (l[0] = (o) => a(f)(!0)),
|
|
240
|
+
onBlur: l[1] || (l[1] = (o) => a(f)(!1)),
|
|
241
|
+
onMouseenter: l[2] || (l[2] = (o) => ["hover", "both"].includes(e.trigger) ? a(f)(!0) : void 0),
|
|
242
|
+
onMouseleave: l[3] || (l[3] = (o) => ["hover", "both"].includes(e.trigger) ? a(f)(!1) : void 0)
|
|
249
243
|
},
|
|
250
244
|
[
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
`),
|
|
255
|
-
v(e.$slots, "dropdown", { items: e.items }, () => [
|
|
256
|
-
(p(!0), h(
|
|
257
|
-
F,
|
|
245
|
+
p(e.$slots, "dropdown", { items: e.items }, () => [
|
|
246
|
+
(v(!0), b(
|
|
247
|
+
se,
|
|
258
248
|
null,
|
|
259
|
-
ie(e.items, (
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
]],
|
|
314
|
-
onClick: B((ee) => Z(n, ee), ["stop"])
|
|
315
|
-
}), [
|
|
316
|
-
v(e.$slots, "menuitem-label", { item: n }, () => [
|
|
317
|
-
M(
|
|
318
|
-
z(n.label),
|
|
319
|
-
1
|
|
320
|
-
/* TEXT */
|
|
321
|
-
)
|
|
322
|
-
])
|
|
323
|
-
], 16, be)) : d("v-if", !0)
|
|
249
|
+
ie(e.items, (o, m) => p(e.$slots, "menuitem", {
|
|
250
|
+
key: m,
|
|
251
|
+
item: o
|
|
252
|
+
}, () => [
|
|
253
|
+
X(o) ? (v(), N(a(k), A({
|
|
254
|
+
key: 0,
|
|
255
|
+
target: o.href ? o.target ?? "_self" : void 0,
|
|
256
|
+
to: o.to,
|
|
257
|
+
href: o.href,
|
|
258
|
+
color: o.color ?? "theme",
|
|
259
|
+
ref_for: !0
|
|
260
|
+
}, o, {
|
|
261
|
+
"underline-only-hover": o.underlineOnlyHover ?? !1,
|
|
262
|
+
class: ["menuitem", [
|
|
263
|
+
{
|
|
264
|
+
"--is-keyboard-selected": s.value === m
|
|
265
|
+
},
|
|
266
|
+
o.class
|
|
267
|
+
]],
|
|
268
|
+
tabindex: "-1",
|
|
269
|
+
onClick: E(g, ["stop"])
|
|
270
|
+
}), {
|
|
271
|
+
default: h(() => [
|
|
272
|
+
p(e.$slots, "menuitem-label", { item: o }, () => [
|
|
273
|
+
z(
|
|
274
|
+
B(o.label),
|
|
275
|
+
1
|
|
276
|
+
/* TEXT */
|
|
277
|
+
)
|
|
278
|
+
])
|
|
279
|
+
]),
|
|
280
|
+
_: 2
|
|
281
|
+
/* DYNAMIC */
|
|
282
|
+
}, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : W(o) ? (v(), b("button", A({
|
|
283
|
+
key: 1,
|
|
284
|
+
tabindex: "-1",
|
|
285
|
+
type: "button",
|
|
286
|
+
ref_for: !0
|
|
287
|
+
}, o, {
|
|
288
|
+
class: ["menuitem menuitem__button", [
|
|
289
|
+
{
|
|
290
|
+
"--is-keyboard-selected": s.value === m
|
|
291
|
+
},
|
|
292
|
+
o.class,
|
|
293
|
+
`--${o.color ?? "theme"}`
|
|
294
|
+
]],
|
|
295
|
+
onClick: E((x) => Y(o, x), ["stop"])
|
|
296
|
+
}), [
|
|
297
|
+
p(e.$slots, "menuitem-label", { item: o }, () => [
|
|
298
|
+
z(
|
|
299
|
+
B(o.label),
|
|
300
|
+
1
|
|
301
|
+
/* TEXT */
|
|
302
|
+
)
|
|
324
303
|
])
|
|
325
|
-
],
|
|
326
|
-
|
|
327
|
-
/* STABLE_FRAGMENT */
|
|
328
|
-
))),
|
|
304
|
+
], 16, ke)) : O("v-if", !0)
|
|
305
|
+
])),
|
|
329
306
|
128
|
|
330
307
|
/* KEYED_FRAGMENT */
|
|
331
308
|
))
|
|
@@ -340,8 +317,8 @@ const pe = ["id"], ve = ["aria-expanded"], ye = ["id"], be = ["onClick"], he = /
|
|
|
340
317
|
_: 3
|
|
341
318
|
/* FORWARDED */
|
|
342
319
|
})
|
|
343
|
-
], 14,
|
|
344
|
-
[a(de),
|
|
320
|
+
], 14, me)), [
|
|
321
|
+
[a(de), R]
|
|
345
322
|
]);
|
|
346
323
|
}
|
|
347
324
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/MazExpandAnimation.css';const
|
|
1
|
+
import { defineComponent as l, mergeModels as u, useCssVars as m, useModel as f, ref as d, onMounted as v, onUnmounted as c, openBlock as p, createElementBlock as _, normalizeClass as E, createElementVNode as x, mergeProps as h, renderSlot as g } from "vue";
|
|
2
|
+
import './assets/MazExpandAnimation.css';const M = ["aria-hidden"], A = /* @__PURE__ */ l({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "MazExpandAnimation",
|
|
5
5
|
props: /* @__PURE__ */ u({
|
|
@@ -15,22 +15,22 @@ import './assets/MazExpandAnimation.css';const V = ["aria-hidden"], A = /* @__PU
|
|
|
15
15
|
"3628b947": e.duration,
|
|
16
16
|
"239277b5": e.timingFunction
|
|
17
17
|
}));
|
|
18
|
-
const n = f(i, "modelValue"),
|
|
18
|
+
const n = f(i, "modelValue"), t = d(!n.value), a = d();
|
|
19
19
|
function s() {
|
|
20
|
-
n.value || (
|
|
20
|
+
n.value || (t.value = !0);
|
|
21
21
|
}
|
|
22
22
|
function r() {
|
|
23
|
-
n.value && (
|
|
23
|
+
n.value && (t.value = !1);
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return v(() => {
|
|
26
26
|
var e, o;
|
|
27
|
-
(e =
|
|
28
|
-
}),
|
|
27
|
+
(e = a.value) == null || e.addEventListener("transitionstart", s, !1), (o = a.value) == null || o.addEventListener("transitionend", r, !1);
|
|
28
|
+
}), c(() => {
|
|
29
29
|
var e, o;
|
|
30
|
-
(e =
|
|
30
|
+
(e = a.value) == null || e.removeEventListener("transitionstart", s, !1), (o = a.value) == null || o.removeEventListener("transitionend", r, !1);
|
|
31
31
|
}), (e, o) => (p(), _("div", {
|
|
32
32
|
ref_key: "expandAnimationRef",
|
|
33
|
-
ref:
|
|
33
|
+
ref: a,
|
|
34
34
|
class: E(["m-expand-animation", { "m-expand-animation--expanded": n.value }]),
|
|
35
35
|
"aria-hidden": !n.value,
|
|
36
36
|
role: "region"
|
|
@@ -39,24 +39,23 @@ import './assets/MazExpandAnimation.css';const V = ["aria-hidden"], A = /* @__PU
|
|
|
39
39
|
"div",
|
|
40
40
|
h({ class: "m-expand-animation__inner" }, e.$attrs, {
|
|
41
41
|
class: {
|
|
42
|
-
"--overflow-hidden":
|
|
42
|
+
"--overflow-hidden": t.value
|
|
43
43
|
}
|
|
44
44
|
}),
|
|
45
45
|
[
|
|
46
|
-
g("
|
|
47
|
-
M(e.$slots, "default", {}, void 0, !0)
|
|
46
|
+
g(e.$slots, "default", {}, void 0, !0)
|
|
48
47
|
],
|
|
49
48
|
16
|
|
50
49
|
/* FULL_PROPS */
|
|
51
50
|
)
|
|
52
|
-
], 10,
|
|
51
|
+
], 10, M));
|
|
53
52
|
}
|
|
54
|
-
}),
|
|
55
|
-
const
|
|
56
|
-
for (const [
|
|
57
|
-
a
|
|
58
|
-
return
|
|
59
|
-
},
|
|
53
|
+
}), V = (i, n) => {
|
|
54
|
+
const t = i.__vccOpts || i;
|
|
55
|
+
for (const [a, s] of n)
|
|
56
|
+
t[a] = s;
|
|
57
|
+
return t;
|
|
58
|
+
}, k = /* @__PURE__ */ V(A, [["__scopeId", "data-v-b7ca6b97"]]);
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
k as default
|
|
62
61
|
};
|
package/components/MazInput.mjs
CHANGED