maz-ui 3.22.4 → 3.23.1
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/MazAvatar.mjs +2 -2
- package/components/MazBackdrop.mjs +67 -107
- package/components/MazBadge.mjs +41 -50
- package/components/MazBottomSheet.mjs +2 -2
- package/components/MazBtn.mjs +2 -2
- package/components/MazCard.mjs +2 -2
- package/components/MazCarousel.mjs +2 -2
- package/components/MazChart.mjs +53 -63
- package/components/MazCheckbox.mjs +84 -128
- package/components/MazDialog.mjs +2 -2
- package/components/MazDialogPromise.mjs +3 -3
- package/components/MazDrawer.mjs +2 -2
- package/components/MazDropdown.mjs +2 -2
- package/components/MazDropzone.mjs +2 -2
- package/components/MazFullscreenLoader.mjs +14 -18
- package/components/MazGallery.mjs +352 -558
- package/components/MazIcon.mjs +76 -140
- package/components/MazInput.mjs +2 -2
- package/components/MazInputNumber.mjs +72 -99
- package/components/MazInputPrice.mjs +2 -2
- package/components/MazInputTags.mjs +2 -2
- package/components/MazLazyImg.mjs +2 -2
- package/components/MazPhoneNumberInput.mjs +2 -2
- package/components/MazPicker.mjs +2 -2
- package/components/MazRadio.mjs +65 -94
- package/components/MazRadioButtons.mjs +64 -78
- package/components/MazSelect.mjs +2 -2
- package/components/MazSlider.mjs +213 -325
- package/components/MazSpinner.mjs +25 -34
- package/components/MazStepper.mjs +2 -2
- package/components/MazSwitch.mjs +43 -60
- package/components/MazTabs.mjs +16 -25
- package/components/MazTabsBar.mjs +2 -2
- package/components/MazTabsContent.mjs +34 -43
- package/components/MazTabsContentItem.mjs +49 -63
- package/components/MazTextarea.mjs +124 -169
- package/components/MazTransitionExpand.mjs +36 -54
- package/components/assets/MazBackdrop.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/chunks/MazAvatar-1636f58b.mjs +126 -0
- package/components/chunks/MazBottomSheet-c24f92f8.mjs +217 -0
- package/components/chunks/MazBtn-124f3700.mjs +153 -0
- package/components/chunks/MazBtn-1e61862b.mjs +153 -0
- package/components/chunks/MazBtn-2d1d1ba5.mjs +153 -0
- package/components/chunks/MazBtn-3d74f737.mjs +153 -0
- package/components/chunks/MazBtn-4a447126.mjs +153 -0
- package/components/chunks/MazBtn-555928ed.mjs +153 -0
- package/components/chunks/MazBtn-571454f6.mjs +153 -0
- package/components/chunks/MazBtn-5e426592.mjs +153 -0
- package/components/chunks/MazBtn-683effc1.mjs +153 -0
- package/components/chunks/MazBtn-6905cc39.mjs +153 -0
- package/components/chunks/MazBtn-6ce4cfd3.mjs +153 -0
- package/components/chunks/MazBtn-74656d5b.mjs +153 -0
- package/components/chunks/MazBtn-7706b2da.mjs +158 -0
- package/components/chunks/MazBtn-a7a913dd.mjs +153 -0
- package/components/chunks/MazBtn-fb3c7af8.mjs +153 -0
- package/components/chunks/MazCard-bcc36489.mjs +214 -0
- package/components/chunks/MazCarousel-6da75122.mjs +107 -0
- package/components/chunks/MazCheckbox-040dc2c4.mjs +117 -0
- package/components/chunks/MazCheckbox-3a2b48b4.mjs +117 -0
- package/components/chunks/MazDialog-44eda544.mjs +250 -0
- package/components/chunks/MazDialogPromise-eec5acde.mjs +419 -0
- package/components/chunks/MazDrawer-b628b37e.mjs +206 -0
- package/components/chunks/MazDropdown-6f2248b0.mjs +345 -0
- package/components/chunks/MazDropzone-8cac10a6.mjs +242 -0
- package/components/chunks/MazGallery-6b8ecedf.mjs +617 -0
- package/components/chunks/MazIcon-52a76873.mjs +101 -0
- package/components/chunks/MazIcon-95e31ff8.mjs +96 -0
- package/components/chunks/MazInput-1ed4f946.mjs +283 -0
- package/components/chunks/MazInput-8a217995.mjs +271 -0
- package/components/chunks/MazInput-c51881ea.mjs +278 -0
- package/components/chunks/MazInputPrice-cd348d46.mjs +392 -0
- package/components/chunks/MazInputTags-aa95fae7.mjs +446 -0
- package/components/chunks/MazLazyImg-0412ab38.mjs +259 -0
- package/components/chunks/MazLazyImg-47d3449a.mjs +254 -0
- package/components/chunks/MazPhoneNumberInput-e1bf46f9.mjs +1216 -0
- package/components/chunks/MazPicker-e4620d8b.mjs +1140 -0
- package/components/chunks/MazPickerCalendar-da62262c.mjs +535 -0
- package/components/chunks/MazPickerHeader-a2e041eb.mjs +186 -0
- package/components/chunks/MazPickerMonthSwitcher-5bf8bd08.mjs +97 -0
- package/components/chunks/MazPickerShortcuts-7f95430e.mjs +74 -0
- package/components/chunks/MazPickerTime-717402ae.mjs +219 -0
- package/components/chunks/MazPickerYearSwitcher-85f97b6d.mjs +106 -0
- package/components/chunks/MazSelect-6ff6bb96.mjs +652 -0
- package/components/chunks/MazSpinner-054f948c.mjs +39 -0
- package/components/chunks/MazSpinner-059ee1d2.mjs +39 -0
- package/components/chunks/MazSpinner-08ee440b.mjs +39 -0
- package/components/chunks/MazSpinner-13403729.mjs +39 -0
- package/components/chunks/MazSpinner-44011019.mjs +39 -0
- package/components/chunks/MazSpinner-452a1534.mjs +39 -0
- package/components/chunks/MazSpinner-4c02cfd2.mjs +39 -0
- package/components/chunks/MazSpinner-51aa73ca.mjs +39 -0
- package/components/chunks/MazSpinner-6d1d24d5.mjs +39 -0
- package/components/chunks/MazSpinner-6e7c4705.mjs +39 -0
- package/components/chunks/MazSpinner-7895f54f.mjs +39 -0
- package/components/chunks/MazSpinner-7eee202e.mjs +39 -0
- package/components/chunks/MazSpinner-805e14a6.mjs +39 -0
- package/components/chunks/MazSpinner-85080b43.mjs +39 -0
- package/components/chunks/MazSpinner-a13a50c9.mjs +39 -0
- package/components/chunks/MazSpinner-a6d61cee.mjs +43 -0
- package/components/chunks/MazSpinner-c67b05bb.mjs +39 -0
- package/components/chunks/MazSpinner-caa33afc.mjs +39 -0
- package/components/chunks/MazSpinner-cb8fbe9a.mjs +39 -0
- package/components/chunks/MazSpinner-d9ef329f.mjs +39 -0
- package/components/chunks/MazStepper-39f018f3.mjs +191 -0
- package/components/chunks/MazTabsBar-27965f16.mjs +132 -0
- package/components/chunks/MazTransitionExpand-55cfbecb.mjs +41 -0
- package/components/chunks/MazTransitionExpand-cd24498f.mjs +41 -0
- package/components/chunks/_plugin-vue_export-helper-dad06003.mjs +9 -0
- package/components/chunks/check-31d7ba2f.mjs +30 -0
- package/components/chunks/check-c9b483c0.mjs +30 -0
- package/components/chunks/{check-circle-7acfa4c4.mjs → check-circle-59c383ed.mjs} +10 -12
- package/components/chunks/chevron-down-2b60111a.mjs +30 -0
- package/components/chunks/chevron-left-39b4621e.mjs +30 -0
- package/components/chunks/chevron-right-949a60fa.mjs +30 -0
- package/components/chunks/debounce-19c516b6.mjs +11 -0
- package/components/chunks/examples.mobile.json-f63d22fb.mjs +4 -0
- package/components/chunks/{exclamation-circle-2e115536.mjs → exclamation-circle-e2620aab.mjs} +10 -12
- package/components/chunks/{exclamation-triangle-10eb48dc.mjs → exclamation-triangle-21bf116a.mjs} +10 -12
- package/components/chunks/{eye-fbb13657.mjs → eye-dc12ce09.mjs} +12 -15
- package/components/chunks/{eye-slash-342420ff.mjs → eye-slash-fa42a017.mjs} +10 -12
- package/components/chunks/{magnifying-glass-5dffa35e.mjs → magnifying-glass-908981c0.mjs} +10 -12
- package/components/chunks/minus-e71140e1.mjs +30 -0
- package/components/chunks/no-photography-4c6c77cf.mjs +4 -0
- package/components/chunks/{no-photography-b0d08d6f.mjs → no-photography-be94ddda.mjs} +12 -15
- package/components/chunks/{no-symbol-975ce547.mjs → no-symbol-87477ad0.mjs} +10 -12
- package/components/chunks/{pencil-2f766dc8.mjs → pencil-4c35b4e7.mjs} +10 -12
- package/components/chunks/plus-c20544c3.mjs +30 -0
- package/components/chunks/x-mark-35f2f1e7.mjs +30 -0
- package/components/chunks/x-mark-7761acf4.mjs +29 -0
- package/modules/chunks/MazBtn-2f302422.cjs +1 -0
- package/modules/chunks/MazBtn-760c3b29.mjs +153 -0
- package/modules/chunks/MazIcon-0bd6b78e.mjs +96 -0
- package/modules/chunks/MazIcon-599a907f.cjs +1 -0
- package/modules/chunks/MazSpinner-03bd76bd.mjs +39 -0
- package/modules/chunks/MazSpinner-6ffa8db1.cjs +1 -0
- package/modules/chunks/{arrow-top-right-on-square-32bbe5a1.mjs → arrow-top-right-on-square-15191934.mjs} +10 -12
- package/modules/chunks/arrow-top-right-on-square-8e4ea6e2.cjs +1 -0
- package/modules/chunks/chevron-left-36731110.cjs +1 -0
- package/modules/chunks/chevron-left-39b4621e.mjs +30 -0
- package/modules/chunks/index-6a90ef88.mjs +1618 -0
- package/modules/chunks/index-794680d2.cjs +124 -0
- package/modules/chunks/{link-4eb05848.mjs → link-bb14441d.mjs} +10 -12
- package/modules/chunks/link-c7791a2a.cjs +1 -0
- package/modules/chunks/no-photography-0f6fcaf4.cjs +1 -0
- package/modules/chunks/no-photography-4c6c77cf.mjs +4 -0
- package/modules/chunks/x-mark-35f2f1e7.mjs +30 -0
- package/modules/chunks/x-mark-a28deca5.cjs +1 -0
- package/modules/index.cjs +1 -0
- package/modules/index.mjs +42 -42
- package/nuxt/index.json +1 -1
- package/package.json +14 -4
- package/types/resolvers/index.d.ts +1 -0
- package/types/resolvers/unplugin-vue-components-resolver.d.ts +8 -0
- package/types/utils/index.d.ts +3 -0
- package/components/chunks/MazAvatar-358d78d4.mjs +0 -138
- package/components/chunks/MazBottomSheet-61090f4a.mjs +0 -267
- package/components/chunks/MazBtn-0e02f0da.mjs +0 -184
- package/components/chunks/MazBtn-1daf9063.mjs +0 -184
- package/components/chunks/MazBtn-2f4fa942.mjs +0 -184
- package/components/chunks/MazBtn-31c6b731.mjs +0 -184
- package/components/chunks/MazBtn-48382169.mjs +0 -184
- package/components/chunks/MazBtn-4e1e116e.mjs +0 -184
- package/components/chunks/MazBtn-50abc4c5.mjs +0 -184
- package/components/chunks/MazBtn-84e12b6a.mjs +0 -184
- package/components/chunks/MazBtn-b42e3575.mjs +0 -184
- package/components/chunks/MazBtn-b56a7278.mjs +0 -184
- package/components/chunks/MazBtn-bbd6e9c8.mjs +0 -184
- package/components/chunks/MazBtn-cf0c8fcb.mjs +0 -184
- package/components/chunks/MazBtn-d92908b2.mjs +0 -191
- package/components/chunks/MazBtn-f48da79c.mjs +0 -184
- package/components/chunks/MazBtn-fec4c3b7.mjs +0 -184
- package/components/chunks/MazCard-4331dca0.mjs +0 -237
- package/components/chunks/MazCarousel-7825c7c9.mjs +0 -133
- package/components/chunks/MazCheckbox-ab5ddda2.mjs +0 -153
- package/components/chunks/MazCheckbox-e0bbe6ec.mjs +0 -153
- package/components/chunks/MazDialog-83e54b8c.mjs +0 -290
- package/components/chunks/MazDialogPromise-6967e821.mjs +0 -474
- package/components/chunks/MazDrawer-d778b3d2.mjs +0 -256
- package/components/chunks/MazDropdown-6f4482d7.mjs +0 -426
- package/components/chunks/MazDropzone-d1bb62dc.mjs +0 -325
- package/components/chunks/MazGallery-b2dc4286.mjs +0 -821
- package/components/chunks/MazIcon-b779da0a.mjs +0 -159
- package/components/chunks/MazIcon-bda198b4.mjs +0 -165
- package/components/chunks/MazInput-713b00d0.mjs +0 -326
- package/components/chunks/MazInput-b9386887.mjs +0 -341
- package/components/chunks/MazInput-c33627dd.mjs +0 -334
- package/components/chunks/MazInputPrice-452297f5.mjs +0 -481
- package/components/chunks/MazInputTags-7a463b81.mjs +0 -526
- package/components/chunks/MazLazyImg-6e395356.mjs +0 -336
- package/components/chunks/MazLazyImg-e0d8b6d0.mjs +0 -329
- package/components/chunks/MazPhoneNumberInput-48fe2445.mjs +0 -1536
- package/components/chunks/MazPicker-50fc11d1.mjs +0 -1352
- package/components/chunks/MazPickerCalendar-cacb361c.mjs +0 -689
- package/components/chunks/MazPickerHeader-63d45179.mjs +0 -216
- package/components/chunks/MazPickerMonthSwitcher-913c6e2c.mjs +0 -110
- package/components/chunks/MazPickerShortcuts-c6fabfc6.mjs +0 -88
- package/components/chunks/MazPickerTime-5e4475da.mjs +0 -301
- package/components/chunks/MazPickerYearSwitcher-dd4fa89c.mjs +0 -125
- package/components/chunks/MazSelect-2e5cd411.mjs +0 -850
- package/components/chunks/MazSpinner-022d7bee.mjs +0 -46
- package/components/chunks/MazSpinner-100c99b8.mjs +0 -46
- package/components/chunks/MazSpinner-191ad23b.mjs +0 -46
- package/components/chunks/MazSpinner-3155378b.mjs +0 -46
- package/components/chunks/MazSpinner-339a9006.mjs +0 -46
- package/components/chunks/MazSpinner-53979e96.mjs +0 -46
- package/components/chunks/MazSpinner-68d2f2ac.mjs +0 -46
- package/components/chunks/MazSpinner-6b563b22.mjs +0 -46
- package/components/chunks/MazSpinner-7cdc13e7.mjs +0 -46
- package/components/chunks/MazSpinner-8859d658.mjs +0 -46
- package/components/chunks/MazSpinner-8e180605.mjs +0 -52
- package/components/chunks/MazSpinner-9950424b.mjs +0 -46
- package/components/chunks/MazSpinner-c8270a93.mjs +0 -46
- package/components/chunks/MazSpinner-cb491238.mjs +0 -46
- package/components/chunks/MazSpinner-cb6f99f3.mjs +0 -46
- package/components/chunks/MazSpinner-ce4be8f1.mjs +0 -46
- package/components/chunks/MazSpinner-e5a9f319.mjs +0 -46
- package/components/chunks/MazSpinner-e92bd359.mjs +0 -46
- package/components/chunks/MazSpinner-eea9056d.mjs +0 -46
- package/components/chunks/MazSpinner-f1e69f29.mjs +0 -46
- package/components/chunks/MazStepper-4c19dbfc.mjs +0 -255
- package/components/chunks/MazTabsBar-3c2e2d69.mjs +0 -157
- package/components/chunks/MazTransitionExpand-474b00d4.mjs +0 -57
- package/components/chunks/MazTransitionExpand-f9e5a2d6.mjs +0 -57
- package/components/chunks/_plugin-vue_export-helper-cc2b3d55.mjs +0 -10
- package/components/chunks/check-8da249b1.mjs +0 -32
- package/components/chunks/check-f2fcce10.mjs +0 -32
- package/components/chunks/chevron-down-a78b9604.mjs +0 -32
- package/components/chunks/chevron-left-3365d59b.mjs +0 -32
- package/components/chunks/chevron-right-02f9e837.mjs +0 -32
- package/components/chunks/debounce-7d66ffa9.mjs +0 -12
- package/components/chunks/examples.mobile.json-618ba782.mjs +0 -4
- package/components/chunks/minus-c9cdee90.mjs +0 -32
- package/components/chunks/no-photography-7f2be516.mjs +0 -4
- package/components/chunks/plus-b1b0a5a8.mjs +0 -32
- package/components/chunks/x-mark-3b05101b.mjs +0 -31
- package/components/chunks/x-mark-c6ff45dd.mjs +0 -32
- package/modules/chunks/MazBtn-90ffd148.mjs +0 -184
- package/modules/chunks/MazIcon-988edef7.mjs +0 -159
- package/modules/chunks/MazSpinner-a16a3d8f.mjs +0 -46
- package/modules/chunks/chevron-left-3365d59b.mjs +0 -32
- package/modules/chunks/index-b1625fc2.mjs +0 -2315
- package/modules/chunks/no-photography-7f2be516.mjs +0 -4
- package/modules/chunks/x-mark-c6ff45dd.mjs +0 -32
package/components/MazIcon.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { inject, defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock, Fragment
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
if (!
|
|
5
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${
|
|
6
|
-
|
|
7
|
-
return resolved;
|
|
1
|
+
import { inject as b, defineComponent as C, ref as g, computed as p, onMounted as P, watchEffect as _, openBlock as h, createElementBlock as S, Fragment as $, createCommentVNode as a, mergeProps as A, nextTick as q } from "vue";
|
|
2
|
+
function H(l, u) {
|
|
3
|
+
const s = b(l, u);
|
|
4
|
+
if (!s)
|
|
5
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${l}`);
|
|
6
|
+
return s;
|
|
8
7
|
}
|
|
9
|
-
const
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
const I = ["innerHTML"], G = /* @__PURE__ */ C({
|
|
11
9
|
__name: "MazIcon",
|
|
12
10
|
props: {
|
|
13
11
|
src: { type: String, default: void 0 },
|
|
@@ -17,149 +15,87 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
15
|
title: { type: String, default: void 0 },
|
|
18
16
|
transformSource: {
|
|
19
17
|
type: Function,
|
|
20
|
-
default: (
|
|
18
|
+
default: (l) => l
|
|
21
19
|
}
|
|
22
20
|
},
|
|
23
21
|
emits: ["loaded", "unloaded", "error"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
const svgElSource = ref();
|
|
27
|
-
const svgElem = ref();
|
|
28
|
-
const getMazIconPath = () => {
|
|
22
|
+
setup(l, { emit: u }) {
|
|
23
|
+
const s = {}, i = g(), v = g(), w = () => {
|
|
29
24
|
try {
|
|
30
|
-
return
|
|
25
|
+
return H("mazIconPath");
|
|
31
26
|
} catch {
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const props = __props;
|
|
36
|
-
const emits = __emit;
|
|
37
|
-
const iconPath = computed(() => props.path ?? getMazIconPath());
|
|
38
|
-
const fullSrc = computed(() => {
|
|
39
|
-
if (props.src) {
|
|
40
|
-
return props.src;
|
|
41
|
-
} else if (iconPath.value) {
|
|
42
|
-
return `${iconPath.value}/${props.name}.svg`;
|
|
43
|
-
} else {
|
|
44
|
-
return `/${props.name}.svg`;
|
|
27
|
+
return;
|
|
45
28
|
}
|
|
29
|
+
}, o = l, d = u, f = p(() => o.path ?? w()), E = p(() => o.src ? o.src : f.value ? `${f.value}/${o.name}.svg` : `/${o.name}.svg`);
|
|
30
|
+
P(() => {
|
|
31
|
+
!o.name && !o.src && console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop');
|
|
46
32
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (titleTags.length > 0) {
|
|
55
|
-
titleTags[0].textContent = title;
|
|
56
|
-
} else {
|
|
57
|
-
const titleEl = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
58
|
-
titleEl.textContent = title;
|
|
59
|
-
svg.append(titleEl);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const filterAttrs = (attrs) => {
|
|
63
|
-
return Object.keys(attrs).reduce((result, key) => {
|
|
64
|
-
if (attrs[key] !== false && attrs[key] !== null && attrs[key] !== void 0) {
|
|
65
|
-
result[key] = attrs[key];
|
|
66
|
-
}
|
|
67
|
-
return result;
|
|
68
|
-
}, {});
|
|
69
|
-
};
|
|
70
|
-
const getSvgAttrs = (svgEl) => {
|
|
71
|
-
const svgAttrs = {};
|
|
72
|
-
const attrs = svgEl.attributes;
|
|
73
|
-
if (!attrs) {
|
|
74
|
-
return svgAttrs;
|
|
75
|
-
}
|
|
76
|
-
for (let i = attrs.length - 1; i >= 0; i--) {
|
|
77
|
-
svgAttrs[attrs[i].name] = attrs[i].value;
|
|
78
|
-
}
|
|
79
|
-
return svgAttrs;
|
|
80
|
-
};
|
|
81
|
-
const getSvgContent = (svgEl) => {
|
|
82
|
-
let svgElNode = svgEl.cloneNode(true);
|
|
83
|
-
svgElNode = props.transformSource(svgEl);
|
|
84
|
-
if (props.title) {
|
|
85
|
-
setTitle(svgElNode, props.title);
|
|
86
|
-
}
|
|
87
|
-
return svgEl.innerHTML;
|
|
88
|
-
};
|
|
89
|
-
const getSource = async (src) => {
|
|
90
|
-
if (!cache[src]) {
|
|
91
|
-
cache[src] = download(src);
|
|
33
|
+
const y = (e, n) => {
|
|
34
|
+
const t = e.querySelectorAll("title");
|
|
35
|
+
if (t.length > 0)
|
|
36
|
+
t[0].textContent = n;
|
|
37
|
+
else {
|
|
38
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
39
|
+
r.textContent = n, e.append(r);
|
|
92
40
|
}
|
|
41
|
+
}, z = (e) => Object.keys(e).reduce((n, t) => (e[t] !== !1 && e[t] !== null && e[t] !== void 0 && (n[t] = e[t]), n), {}), M = (e) => {
|
|
42
|
+
const n = {}, t = e.attributes;
|
|
43
|
+
if (!t)
|
|
44
|
+
return n;
|
|
45
|
+
for (let r = t.length - 1; r >= 0; r--)
|
|
46
|
+
n[t[r].name] = t[r].value;
|
|
47
|
+
return n;
|
|
48
|
+
}, T = (e) => {
|
|
49
|
+
let n = e.cloneNode(!0);
|
|
50
|
+
return n = o.transformSource(e), o.title && y(n, o.title), e.innerHTML;
|
|
51
|
+
}, x = async (e) => {
|
|
52
|
+
s[e] || (s[e] = L(e));
|
|
93
53
|
try {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} catch (error) {
|
|
98
|
-
if (svgElSource.value) {
|
|
99
|
-
svgElSource.value = void 0;
|
|
100
|
-
emits("unloaded");
|
|
101
|
-
}
|
|
102
|
-
delete cache[src];
|
|
103
|
-
emits("error", error);
|
|
54
|
+
i.value = await s[e], await q(), d("loaded", v.value);
|
|
55
|
+
} catch (n) {
|
|
56
|
+
i.value && (i.value = void 0, d("unloaded")), delete s[e], d("error", n);
|
|
104
57
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const result = parser.parseFromString(request.responseText, "text/xml");
|
|
115
|
-
let svgEl = result.querySelectorAll("svg")[0];
|
|
116
|
-
if (svgEl) {
|
|
117
|
-
svgEl = props.transformSource(svgEl);
|
|
118
|
-
resolve(svgEl);
|
|
119
|
-
} else {
|
|
120
|
-
reject(new Error('Loaded file is not valid SVG"'));
|
|
121
|
-
}
|
|
122
|
-
} catch (error) {
|
|
123
|
-
reject(error);
|
|
124
|
-
}
|
|
125
|
-
} else {
|
|
126
|
-
reject(new Error("Error loading SVG"));
|
|
58
|
+
}, L = (e) => new Promise((n, t) => {
|
|
59
|
+
const r = new XMLHttpRequest();
|
|
60
|
+
r.open("GET", e, !0), r.addEventListener("load", () => {
|
|
61
|
+
if (r.status >= 200 && r.status < 400)
|
|
62
|
+
try {
|
|
63
|
+
let c = new DOMParser().parseFromString(r.responseText, "text/xml").querySelectorAll("svg")[0];
|
|
64
|
+
c ? (c = o.transformSource(c), n(c)) : t(new Error('Loaded file is not valid SVG"'));
|
|
65
|
+
} catch (m) {
|
|
66
|
+
t(m);
|
|
127
67
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
2112
|
|
158
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
159
|
-
);
|
|
160
|
-
};
|
|
68
|
+
else
|
|
69
|
+
t(new Error("Error loading SVG"));
|
|
70
|
+
}), r.addEventListener("error", () => t()), r.send();
|
|
71
|
+
});
|
|
72
|
+
return _(() => x(E.value)), (e, n) => (h(), S(
|
|
73
|
+
$,
|
|
74
|
+
null,
|
|
75
|
+
[
|
|
76
|
+
a(" eslint-disable vue/no-v-html "),
|
|
77
|
+
a(" eslint-disable vue/html-self-closing "),
|
|
78
|
+
i.value ? (h(), S("svg", A({
|
|
79
|
+
key: 0,
|
|
80
|
+
ref_key: "svgElem",
|
|
81
|
+
ref: v,
|
|
82
|
+
width: "1em",
|
|
83
|
+
height: "1em"
|
|
84
|
+
}, {
|
|
85
|
+
...M(i.value),
|
|
86
|
+
...z(e.$attrs)
|
|
87
|
+
}, {
|
|
88
|
+
style: `font-size: ${l.size}`,
|
|
89
|
+
innerHTML: T(i.value)
|
|
90
|
+
}), null, 16, I)) : a("v-if", !0),
|
|
91
|
+
a(" eslint-enable vue/no-v-html "),
|
|
92
|
+
a(" eslint-enable vue/html-self-closing ")
|
|
93
|
+
],
|
|
94
|
+
2112
|
|
95
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
96
|
+
));
|
|
161
97
|
}
|
|
162
98
|
});
|
|
163
99
|
export {
|
|
164
|
-
|
|
100
|
+
G as default
|
|
165
101
|
};
|
package/components/MazInput.mjs
CHANGED
|
@@ -1,117 +1,90 @@
|
|
|
1
1
|
import "./assets/MazInputNumber.css";
|
|
2
|
-
import { defineComponent, defineAsyncComponent, computed, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, mergeProps, withKeys, withModifiers } from "vue";
|
|
3
|
-
const
|
|
2
|
+
import { defineComponent as g, defineAsyncComponent as a, computed as l, openBlock as C, createElementBlock as h, normalizeClass as k, createVNode as i, unref as m, withCtx as f, mergeProps as w, withKeys as v, withModifiers as z } from "vue";
|
|
3
|
+
const T = /* @__PURE__ */ g({
|
|
4
4
|
__name: "MazInputNumber",
|
|
5
5
|
props: {
|
|
6
|
-
modelValue: { type: Number, required:
|
|
7
|
-
disabled: { type: Boolean, default:
|
|
6
|
+
modelValue: { type: Number, required: !0 },
|
|
7
|
+
disabled: { type: Boolean, default: !1 },
|
|
8
8
|
max: { type: Number, default: Number.POSITIVE_INFINITY },
|
|
9
9
|
min: { type: Number, default: Number.NEGATIVE_INFINITY },
|
|
10
10
|
step: { type: Number, default: 1 },
|
|
11
11
|
size: {
|
|
12
12
|
type: String,
|
|
13
13
|
default: "md",
|
|
14
|
-
validator: (
|
|
15
|
-
return ["mini", "xs", "sm", "md", "lg", "xl"].includes(value);
|
|
16
|
-
}
|
|
14
|
+
validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
|
|
17
15
|
}
|
|
18
16
|
},
|
|
19
17
|
emits: ["update:model-value"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const emits = __emit;
|
|
27
|
-
const currentValue = computed({
|
|
28
|
-
get: () => props.modelValue,
|
|
29
|
-
set: (value) => emitValue(value)
|
|
30
|
-
});
|
|
31
|
-
const checkValue = (value) => {
|
|
32
|
-
if (value <= props.min)
|
|
33
|
-
return props.min;
|
|
34
|
-
return value >= props.max ? props.max : value;
|
|
18
|
+
setup(e, { emit: I }) {
|
|
19
|
+
const s = a(() => import("./chunks/MazBtn-6ce4cfd3.mjs")), N = a(() => import("./chunks/MazInput-c51881ea.mjs")), x = a(() => import("./chunks/plus-c20544c3.mjs")), y = a(() => import("./chunks/minus-e71140e1.mjs")), t = e, _ = I, u = l({
|
|
20
|
+
get: () => t.modelValue,
|
|
21
|
+
set: (n) => d(n)
|
|
22
|
+
}), V = (n) => n <= t.min ? t.min : n >= t.max ? t.max : n, d = (n) => {
|
|
23
|
+
n = V(n), u.value !== n && _("update:model-value", n);
|
|
35
24
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
emitValue(currentValue.value);
|
|
43
|
-
const incrementDisabled = computed(() => props.modelValue >= props.max);
|
|
44
|
-
const decrementDisabled = computed(() => props.modelValue <= props.min);
|
|
45
|
-
const increment = () => {
|
|
46
|
-
if (props.disabled || incrementDisabled.value)
|
|
47
|
-
return;
|
|
48
|
-
currentValue.value = currentValue.value + 1 * props.step;
|
|
49
|
-
};
|
|
50
|
-
const decrement = () => {
|
|
51
|
-
if (props.disabled || decrementDisabled.value)
|
|
52
|
-
return;
|
|
53
|
-
currentValue.value = currentValue.value - 1 * props.step;
|
|
54
|
-
};
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
return openBlock(), createElementBlock(
|
|
57
|
-
"div",
|
|
58
|
-
{
|
|
59
|
-
class: normalizeClass(["m-input-number maz-align-center", [`m-input-number--${__props.size}`]])
|
|
60
|
-
},
|
|
61
|
-
[
|
|
62
|
-
createVNode(unref(MazBtn), {
|
|
63
|
-
color: "transparent",
|
|
64
|
-
"no-shadow": "",
|
|
65
|
-
size: __props.size,
|
|
66
|
-
class: "m-input-number__button m-input-number__decrement-button",
|
|
67
|
-
disabled: decrementDisabled.value || __props.disabled,
|
|
68
|
-
onClick: decrement
|
|
69
|
-
}, {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
createVNode(unref(MinusIcon), { class: "m-input-number__button__icon" })
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
/* STABLE */
|
|
75
|
-
}, 8, ["size", "disabled"]),
|
|
76
|
-
createVNode(unref(MazInput), mergeProps({
|
|
77
|
-
modelValue: currentValue.value,
|
|
78
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentValue.value = $event),
|
|
79
|
-
modelModifiers: { number: true },
|
|
80
|
-
type: "number",
|
|
81
|
-
class: "m-input-number__input maz-flex-1",
|
|
82
|
-
disabled: __props.disabled,
|
|
83
|
-
min: __props.min,
|
|
84
|
-
max: __props.max,
|
|
85
|
-
step: __props.step
|
|
86
|
-
}, _ctx.$attrs, {
|
|
87
|
-
size: __props.size,
|
|
88
|
-
onKeydown: [
|
|
89
|
-
withKeys(withModifiers(increment, ["prevent"]), ["up"]),
|
|
90
|
-
withKeys(withModifiers(decrement, ["prevent"]), ["down"])
|
|
91
|
-
]
|
|
92
|
-
}), null, 16, ["modelValue", "disabled", "min", "max", "step", "size", "onKeydown"]),
|
|
93
|
-
createVNode(unref(MazBtn), {
|
|
94
|
-
color: "transparent",
|
|
95
|
-
"no-shadow": "",
|
|
96
|
-
size: __props.size,
|
|
97
|
-
class: "m-input-number__button m-input-number__increment-button",
|
|
98
|
-
disabled: incrementDisabled.value || __props.disabled,
|
|
99
|
-
onClick: increment
|
|
100
|
-
}, {
|
|
101
|
-
default: withCtx(() => [
|
|
102
|
-
createVNode(unref(PlusIcon), { class: "m-input-number__button__icon" })
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
/* STABLE */
|
|
106
|
-
}, 8, ["size", "disabled"])
|
|
107
|
-
],
|
|
108
|
-
2
|
|
109
|
-
/* CLASS */
|
|
110
|
-
);
|
|
25
|
+
d(u.value);
|
|
26
|
+
const o = l(() => t.modelValue >= t.max), r = l(() => t.modelValue <= t.min), c = () => {
|
|
27
|
+
t.disabled || o.value || (u.value = u.value + 1 * t.step);
|
|
28
|
+
}, b = () => {
|
|
29
|
+
t.disabled || r.value || (u.value = u.value - 1 * t.step);
|
|
111
30
|
};
|
|
31
|
+
return (n, p) => (C(), h(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
class: k(["m-input-number maz-align-center", [`m-input-number--${e.size}`]])
|
|
35
|
+
},
|
|
36
|
+
[
|
|
37
|
+
i(m(s), {
|
|
38
|
+
color: "transparent",
|
|
39
|
+
"no-shadow": "",
|
|
40
|
+
size: e.size,
|
|
41
|
+
class: "m-input-number__button m-input-number__decrement-button",
|
|
42
|
+
disabled: r.value || e.disabled,
|
|
43
|
+
onClick: b
|
|
44
|
+
}, {
|
|
45
|
+
default: f(() => [
|
|
46
|
+
i(m(y), { class: "m-input-number__button__icon" })
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
/* STABLE */
|
|
50
|
+
}, 8, ["size", "disabled"]),
|
|
51
|
+
i(m(N), w({
|
|
52
|
+
modelValue: u.value,
|
|
53
|
+
"onUpdate:modelValue": p[0] || (p[0] = (M) => u.value = M),
|
|
54
|
+
modelModifiers: { number: !0 },
|
|
55
|
+
type: "number",
|
|
56
|
+
class: "m-input-number__input maz-flex-1",
|
|
57
|
+
disabled: e.disabled,
|
|
58
|
+
min: e.min,
|
|
59
|
+
max: e.max,
|
|
60
|
+
step: e.step
|
|
61
|
+
}, n.$attrs, {
|
|
62
|
+
size: e.size,
|
|
63
|
+
onKeydown: [
|
|
64
|
+
v(z(c, ["prevent"]), ["up"]),
|
|
65
|
+
v(z(b, ["prevent"]), ["down"])
|
|
66
|
+
]
|
|
67
|
+
}), null, 16, ["modelValue", "disabled", "min", "max", "step", "size", "onKeydown"]),
|
|
68
|
+
i(m(s), {
|
|
69
|
+
color: "transparent",
|
|
70
|
+
"no-shadow": "",
|
|
71
|
+
size: e.size,
|
|
72
|
+
class: "m-input-number__button m-input-number__increment-button",
|
|
73
|
+
disabled: o.value || e.disabled,
|
|
74
|
+
onClick: c
|
|
75
|
+
}, {
|
|
76
|
+
default: f(() => [
|
|
77
|
+
i(m(x), { class: "m-input-number__button__icon" })
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
/* STABLE */
|
|
81
|
+
}, 8, ["size", "disabled"])
|
|
82
|
+
],
|
|
83
|
+
2
|
|
84
|
+
/* CLASS */
|
|
85
|
+
));
|
|
112
86
|
}
|
|
113
87
|
});
|
|
114
|
-
const MazInputNumber_vue_vue_type_style_index_0_lang = "";
|
|
115
88
|
export {
|
|
116
|
-
|
|
89
|
+
T as default
|
|
117
90
|
};
|
package/components/MazPicker.mjs
CHANGED