maz-ui 4.1.7-beta.1 → 4.1.7-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/MazCard.BrbmsHeG.css +1 -0
- package/dist/assets/MazSelect.BX67LsNc.css +1 -0
- package/dist/chunks/{MazDatePicker.B3DDfxjV.js → MazDatePicker.DI69gr3i.js} +22 -22
- package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.D_CzEKlT.js → MazDropdown.vue_vue_type_style_index_0_lang.FpQyExxD.js} +2 -2
- package/dist/chunks/{MazInputNumber.vue_vue_type_style_index_0_lang.B0D4Zzds.js → MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js} +2 -2
- package/dist/chunks/{MazInputPhoneNumber.CDy6n_Qj.js → MazInputPhoneNumber.CfClhmow.js} +7 -7
- package/dist/chunks/{MazInputPrice.vue_vue_type_script_setup_true_lang.3pKYuG8H.js → MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js} +18 -18
- package/dist/chunks/{MazPickerCalendar.B5IHMawO.js → MazPickerCalendar.DouWTWHn.js} +1 -1
- package/dist/chunks/{MazPickerCalendarMonth.TJfbseNp.js → MazPickerCalendarMonth.DKCt3__u.js} +6 -6
- package/dist/chunks/{MazPickerCalendarSwitcher.lOvJV15Q.js → MazPickerCalendarSwitcher.C01uOHRy.js} +8 -8
- package/dist/chunks/{MazPickerContainer.DP0fFknc.js → MazPickerContainer.CFRr8ziz.js} +1 -1
- package/dist/chunks/{MazPickerHeader.JAJVo08c.js → MazPickerHeader.CcE5eDEe.js} +12 -12
- package/dist/chunks/{MazPickerMonthSwitcher.C3OsIZfi.js → MazPickerMonthSwitcher.BlPMSBuX.js} +8 -8
- package/dist/chunks/{MazPickerTime.BpMRZUGU.js → MazPickerTime.D7KXPIQ7.js} +1 -1
- package/dist/chunks/{MazPickerYearSwitcher.Da4W6W5q.js → MazPickerYearSwitcher.oPES1_VL.js} +2 -2
- package/dist/chunks/{MazTabsContent.vue_vue_type_script_setup_true_lang.hIwO-24k.js → MazTabsContent.vue_vue_type_script_setup_true_lang.arGqYTL5.js} +2 -2
- package/dist/chunks/{PhoneInput.DukRZp5u.js → PhoneInput.BE6bXfav.js} +1 -1
- package/dist/chunks/capitalize.BF6CDS_4.js +6 -0
- package/dist/chunks/checkAvailability.aTpZidex.js +16 -0
- package/dist/chunks/debounce.Brzkn9pm.js +11 -0
- package/dist/chunks/{dom-events.H9KIOv83.js → dom-events.CfOiauCR.js} +41 -41
- package/dist/chunks/{fullscreen-img.directive.D9oQ3Gni.js → fullscreen-img.directive.B8ESs0MK.js} +2 -2
- package/dist/chunks/{isClient.8V3qjGdO.js → isClient.WI4oSt66.js} +2 -2
- package/dist/chunks/{mazUi.CaSMOKic.js → mazUi.raWwR54O.js} +2 -2
- package/dist/chunks/{obsidian.C6upWOVF.js → obsidian.Cy0R8RHy.js} +2 -2
- package/dist/chunks/{ocean.ehMlC0HV.js → ocean.pHrY5H_S.js} +2 -2
- package/dist/chunks/pascalCase.GdDKKQ-O.js +19 -0
- package/dist/chunks/{pristine.DMG3eBuN.js → pristine.CxBZzgUG.js} +2 -2
- package/dist/chunks/sleep.BLRH1qZG.js +6 -0
- package/dist/chunks/truthyFilter.C2WOKUCG.js +6 -0
- package/dist/chunks/{useStringMatching.DzSigyZ7.js → useStringMatching.CqudA-tS.js} +25 -25
- package/dist/chunks/{vClickOutside.CJBKY5no.js → vClickOutside.DIOiluy0.js} +6 -6
- package/dist/components/MazAnimatedCounter.js +3 -3
- package/dist/components/MazAnimatedText.js +2 -2
- package/dist/components/MazCard.js +6 -6
- package/dist/components/MazChecklist.js +4 -4
- package/dist/components/MazDatePicker.js +1 -1
- package/dist/components/MazDropdown.js +1 -1
- package/dist/components/MazDropzone.js +3 -3
- package/dist/components/MazGallery.js +1 -1
- package/dist/components/MazInput.js +2 -2
- package/dist/components/MazInputNumber.js +1 -1
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazInputPrice.js +1 -1
- package/dist/components/MazInputTags.js +3 -3
- package/dist/components/MazPopover.js +9 -9
- package/dist/components/MazPullToRefresh.js +6 -6
- package/dist/components/MazReadingProgressBar.js +7 -7
- package/dist/components/MazSelect.js +67 -57
- package/dist/components/MazSelect.vue.d.ts +21 -4
- package/dist/components/MazSelectCountry.js +15 -13
- package/dist/components/MazSlider.js +34 -34
- package/dist/components/MazTabsBar.js +2 -2
- package/dist/components/MazTabsContent.js +1 -1
- package/dist/components/MazTextarea.js +5 -5
- package/dist/components/index.js +6 -6
- package/dist/composables/index.js +1 -1
- package/dist/composables/useDisplayNames.js +2 -2
- package/dist/composables/useDropzone.js +2 -2
- package/dist/composables/useFormField.js +2 -2
- package/dist/composables/useFormValidator.js +1 -1
- package/dist/composables/useIdleTimeout.js +27 -27
- package/dist/composables/useMutationObserver.js +4 -4
- package/dist/composables/useStringMatching.js +1 -1
- package/dist/composables/useSwipe.js +22 -22
- package/dist/composables/useUserVisibility.js +8 -8
- package/dist/composables/useWindowSize.js +2 -2
- package/dist/directives/index.js +2 -2
- package/dist/directives/vClickOutside.js +1 -1
- package/dist/directives/vFullscreenImg.js +1 -1
- package/dist/plugins/aos.js +5 -5
- package/dist/plugins/maz-ui.js +208 -208
- package/dist/resolvers/MazComponentsResolver.js +4 -4
- package/dist/resolvers/MazDirectivesResolver.js +2 -2
- package/dist/resolvers/MazModulesResolver.js +3 -3
- package/dist/types/components/MazSelect.vue.d.ts +21 -4
- package/package.json +8 -8
- package/dist/assets/MazCard.BRq-osHV.css +0 -1
- package/dist/assets/MazSelect.BjrOOGvL.css +0 -1
- package/dist/chunks/capitalize.CVQ1jDrh.js +0 -6
- package/dist/chunks/checkAvailability.UFZSC8-1.js +0 -16
- package/dist/chunks/debounce.DhXdop6X.js +0 -11
- package/dist/chunks/pascalCase.BKTE3qqE.js +0 -19
- package/dist/chunks/sleep.Ci7GE4BQ.js +0 -6
- package/dist/chunks/truthyFilter.DZvXmxeK.js +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, nextTick, createElementBlock, openBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { d as debounce } from "../chunks/debounce.Brzkn9pm.js";
|
|
3
3
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
4
4
|
import '../assets/MazSlider.WcnBC9zc.css';function getOffset(elem) {
|
|
5
5
|
const doc = document.documentElement, body = document.body, rect = elem.getBoundingClientRect();
|
|
@@ -52,7 +52,7 @@ const _hoisted_1 = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], _hoisted
|
|
|
52
52
|
() => [computedValue.value, __props.min, __props.max, __props.log].join(","),
|
|
53
53
|
() => buildComponent(!0)
|
|
54
54
|
);
|
|
55
|
-
const resizeListenerFunction =
|
|
55
|
+
const resizeListenerFunction = debounce(() => buildComponent(), 300);
|
|
56
56
|
onMounted(() => {
|
|
57
57
|
buildComponent(!0), window.addEventListener("resize", resizeListenerFunction);
|
|
58
58
|
}), onBeforeUnmount(() => {
|
|
@@ -66,11 +66,11 @@ const _hoisted_1 = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], _hoisted
|
|
|
66
66
|
function roundToStep(value) {
|
|
67
67
|
return Math.round((value - __props.min) / __props.step) * __props.step + __props.min;
|
|
68
68
|
}
|
|
69
|
-
function cursorKeyDown(event,
|
|
70
|
-
event.key === "ArrowLeft" ? tmpValues.value && isBetween(tmpValues.value[
|
|
69
|
+
function cursorKeyDown(event, i) {
|
|
70
|
+
event.key === "ArrowLeft" ? tmpValues.value && isBetween(tmpValues.value[i] - __props.step, tmpValues.value[i - 1], tmpValues.value[i + 1], "minus") && (tmpValues.value[i] = Math.max(__props.min, tmpValues.value[i] - __props.step), emitValue(tmpValues.value)) : event.key === "ArrowRight" && tmpValues.value && isBetween(tmpValues.value[i] + __props.step, tmpValues.value[i - 1], tmpValues.value[i + 1], "plus") && (tmpValues.value[i] = Math.min(__props.max, tmpValues.value[i] + __props.step), emitValue(tmpValues.value));
|
|
71
71
|
}
|
|
72
|
-
function blurCursor(
|
|
73
|
-
activeCursor.value = void 0, setBtnStyle(
|
|
72
|
+
function blurCursor(i) {
|
|
73
|
+
activeCursor.value = void 0, setBtnStyle(i);
|
|
74
74
|
}
|
|
75
75
|
function checkValues() {
|
|
76
76
|
const valuesChecked = computedValue.value.map((v) => {
|
|
@@ -83,20 +83,20 @@ const _hoisted_1 = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], _hoisted
|
|
|
83
83
|
const valueToEmit = hasMultipleValues.value ? [...values] : values[0];
|
|
84
84
|
emits("update:model-value", valueToEmit);
|
|
85
85
|
}
|
|
86
|
-
function getLabel(
|
|
87
|
-
return __props.labels ? __props.labels[
|
|
86
|
+
function getLabel(i) {
|
|
87
|
+
return __props.labels ? __props.labels[i] : void 0;
|
|
88
88
|
}
|
|
89
|
-
function setBtnDividers(
|
|
90
|
-
setBtnStyle(
|
|
89
|
+
function setBtnDividers(i) {
|
|
90
|
+
setBtnStyle(i), __props.divider && setDividers();
|
|
91
91
|
}
|
|
92
|
-
async function setBtnStyle(
|
|
92
|
+
async function setBtnStyle(i) {
|
|
93
93
|
await nextTick();
|
|
94
94
|
const currentCursor = document.querySelectorAll(".m-slider .m-slider__btn");
|
|
95
95
|
if (currentCursor) {
|
|
96
|
-
const width = currentCursor[
|
|
97
|
-
left: typeof buttonPositions.value?.[
|
|
96
|
+
const width = currentCursor[i]?.clientWidth + 16, btnStyle = {
|
|
97
|
+
left: typeof buttonPositions.value?.[i] == "number" ? `${buttonPositions.value[i] - width / 2 || 1}px` : ""
|
|
98
98
|
};
|
|
99
|
-
buttonStyles.value[
|
|
99
|
+
buttonStyles.value[i] = btnStyle;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
function setDividers() {
|
|
@@ -104,11 +104,11 @@ const _hoisted_1 = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], _hoisted
|
|
|
104
104
|
const base = [...buttonPositions.value];
|
|
105
105
|
base.push(0);
|
|
106
106
|
const baseLength = base.length, middle = Math.round(baseLength / 2);
|
|
107
|
-
dividers.value = base.map((pos,
|
|
108
|
-
left:
|
|
107
|
+
dividers.value = base.map((pos, i) => ({
|
|
108
|
+
left: i === 0 ? 0 : `${base[i - 1]}px`,
|
|
109
109
|
// ATTENTION: buttonPositions.value[i - 1]
|
|
110
|
-
right:
|
|
111
|
-
backgroundColor: middle ===
|
|
110
|
+
right: i + 1 === baseLength ? 0 : `calc( 100% - ${pos}px )`,
|
|
111
|
+
backgroundColor: middle === i + 1 ? void 0 : i < middle ? `rgba(255, 255, 255, ${getOpacityCoeff(i, middle, baseLength)})` : `rgba(0, 0, 0, ${getOpacityCoeff(i, middle, baseLength)})`
|
|
112
112
|
// darken
|
|
113
113
|
}));
|
|
114
114
|
}
|
|
@@ -132,8 +132,8 @@ const _hoisted_1 = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], _hoisted
|
|
|
132
132
|
);
|
|
133
133
|
console.warn("[maz-ui][MazSlider] ref component not found");
|
|
134
134
|
}
|
|
135
|
-
function handleMousedown(_event,
|
|
136
|
-
activeCursor.value === void 0 && (activeCursor.value =
|
|
135
|
+
function handleMousedown(_event, i) {
|
|
136
|
+
activeCursor.value === void 0 && (activeCursor.value = i, setBtnDividers(i));
|
|
137
137
|
}
|
|
138
138
|
async function handleMouseup() {
|
|
139
139
|
if (activeCursor.value === void 0)
|
|
@@ -174,27 +174,27 @@ const _hoisted_1 = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], _hoisted
|
|
|
174
174
|
"aria-valuemin": _ctx.min,
|
|
175
175
|
"aria-valuemax": _ctx.max
|
|
176
176
|
}, [
|
|
177
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(dividers.value, (div,
|
|
178
|
-
key: `divider-${
|
|
177
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(dividers.value, (div, i) => (openBlock(), createElementBlock("div", {
|
|
178
|
+
key: `divider-${i}`,
|
|
179
179
|
style: normalizeStyle([div]),
|
|
180
180
|
class: "m-slider__divider"
|
|
181
181
|
}, null, 4))), 128)),
|
|
182
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(computedValue.value, (_btn,
|
|
183
|
-
key: `cursor-${
|
|
182
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(computedValue.value, (_btn, i) => (openBlock(), createElementBlock("button", {
|
|
183
|
+
key: `cursor-${i}`,
|
|
184
184
|
type: "button",
|
|
185
|
-
"data-label": getLabel(
|
|
185
|
+
"data-label": getLabel(i),
|
|
186
186
|
class: normalizeClass(["m-slider__btn", {
|
|
187
|
-
"active-cursor":
|
|
187
|
+
"active-cursor": i === activeCursor.value && _ctx.cursorAnim
|
|
188
188
|
}]),
|
|
189
|
-
style: normalizeStyle([buttonStyles.value[
|
|
190
|
-
onMousedownPassive: ($event) => handleMousedown($event,
|
|
191
|
-
onTouchstartPassive: ($event) => handleMousedown($event,
|
|
192
|
-
onFocusPassive: ($event) => handleMousedown($event,
|
|
193
|
-
onBlurPassive: ($event) => blurCursor(
|
|
194
|
-
onTouchendPassive: ($event) => blurCursor(
|
|
195
|
-
onKeydownPassive: ($event) => cursorKeyDown($event,
|
|
189
|
+
style: normalizeStyle([buttonStyles.value[i]]),
|
|
190
|
+
onMousedownPassive: ($event) => handleMousedown($event, i),
|
|
191
|
+
onTouchstartPassive: ($event) => handleMousedown($event, i),
|
|
192
|
+
onFocusPassive: ($event) => handleMousedown($event, i),
|
|
193
|
+
onBlurPassive: ($event) => blurCursor(i),
|
|
194
|
+
onTouchendPassive: ($event) => blurCursor(i),
|
|
195
|
+
onKeydownPassive: ($event) => cursorKeyDown($event, i)
|
|
196
196
|
}, [
|
|
197
|
-
createElementVNode("span", null, toDisplayString(tmpValues.value?.[
|
|
197
|
+
createElementVNode("span", null, toDisplayString(tmpValues.value?.[i]), 1)
|
|
198
198
|
], 46, _hoisted_2))), 128))
|
|
199
199
|
], 8, _hoisted_1)
|
|
200
200
|
], 38));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, ref, computed, onBeforeMount, onMounted, watch, createElementBlock, openBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, renderSlot, createTextVNode, createBlock, createCommentVNode, toDisplayString, unref, mergeProps, withCtx } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { s as sleep } from "../chunks/sleep.BLRH1qZG.js";
|
|
3
3
|
import { useInjectStrict } from "../composables/useInjectStrict.js";
|
|
4
4
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
5
5
|
import '../assets/MazTabsBar.BRr1XiYu.css';const _hoisted_1 = ["disabled", "onClick"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -38,7 +38,7 @@ import '../assets/MazTabsBar.BRr1XiYu.css';const _hoisted_1 = ["disabled", "onCl
|
|
|
38
38
|
async function setIndicatorAndScroll() {
|
|
39
39
|
if (!__props.autoScroll)
|
|
40
40
|
return;
|
|
41
|
-
await
|
|
41
|
+
await sleep(150);
|
|
42
42
|
const tabsBar = tabsBarRef.value, activeTab = itemRefs.value[currentTab.value - 1];
|
|
43
43
|
if (!tabsBar || !activeTab)
|
|
44
44
|
return;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, onBeforeUnmount, useSlots, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass, createCommentVNode, withDirectives, renderSlot, createTextVNode, toDisplayString, createElementVNode, mergeProps, toHandlers, vModelText } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { d as debounce } from "../chunks/debounce.Brzkn9pm.js";
|
|
3
3
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
4
4
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
5
|
-
import '../assets/MazTextarea.C9sZpRDZ.css';class
|
|
5
|
+
import '../assets/MazTextarea.C9sZpRDZ.css';class TextareaAutogrow {
|
|
6
6
|
element;
|
|
7
|
-
constructor(
|
|
8
|
-
this.element =
|
|
7
|
+
constructor(element) {
|
|
8
|
+
this.element = element, this.onFocus = this.onFocus.bind(this), this.autogrow = this.autogrow.bind(this), this.onResize = debounce(this.onResize.bind(this), 200), this.connect();
|
|
9
9
|
}
|
|
10
10
|
connect() {
|
|
11
11
|
this.element.addEventListener("focus", this.onFocus), this.element.style.resize = "none", this.element.style.boxSizing = "border-box";
|
|
@@ -60,7 +60,7 @@ const _hoisted_1 = ["for"], _hoisted_2 = ["for"], _hoisted_3 = { key: 1 }, _hois
|
|
|
60
60
|
providedId: props.id
|
|
61
61
|
}), TextareaElement = ref(), isFocused = ref(!1), hasValue = computed(() => props.modelValue !== void 0 && props.modelValue !== "");
|
|
62
62
|
onMounted(() => {
|
|
63
|
-
TextareaElement.value && (textareaAutogrow = new
|
|
63
|
+
TextareaElement.value && (textareaAutogrow = new TextareaAutogrow(TextareaElement.value));
|
|
64
64
|
}), onBeforeUnmount(() => {
|
|
65
65
|
textareaAutogrow?.disconnect();
|
|
66
66
|
});
|
package/dist/components/index.js
CHANGED
|
@@ -14,11 +14,11 @@ import { _ } from "../chunks/MazChart.vue_vue_type_script_setup_true_lang.JSYXGy
|
|
|
14
14
|
import { default as default14 } from "./MazCheckbox.js";
|
|
15
15
|
import { default as default15 } from "./MazChecklist.js";
|
|
16
16
|
import { default as default16 } from "./MazCircularProgressBar.js";
|
|
17
|
-
import { M } from "../chunks/MazDatePicker.
|
|
17
|
+
import { M } from "../chunks/MazDatePicker.DI69gr3i.js";
|
|
18
18
|
import { default as default17 } from "./MazDialog.js";
|
|
19
19
|
import { _ as _2, u } from "../chunks/MazDialogConfirm.vue_vue_type_script_setup_true_lang.DuEcluOw.js";
|
|
20
20
|
import { default as default18 } from "./MazDrawer.js";
|
|
21
|
-
import { _ as _3 } from "../chunks/MazDropdown.vue_vue_type_style_index_0_lang.
|
|
21
|
+
import { _ as _3 } from "../chunks/MazDropdown.vue_vue_type_style_index_0_lang.FpQyExxD.js";
|
|
22
22
|
import { default as default19 } from "./MazDropzone.js";
|
|
23
23
|
import { default as default20 } from "./MazExpandAnimation.js";
|
|
24
24
|
import { default as default21 } from "./MazFullscreenLoader.js";
|
|
@@ -26,9 +26,9 @@ import { default as default22 } from "./MazGallery.js";
|
|
|
26
26
|
import { default as default23 } from "./MazIcon.js";
|
|
27
27
|
import { default as default24 } from "./MazInput.js";
|
|
28
28
|
import { default as default25 } from "./MazInputCode.js";
|
|
29
|
-
import { _ as _4 } from "../chunks/MazInputNumber.vue_vue_type_style_index_0_lang.
|
|
30
|
-
import { M as M2 } from "../chunks/MazInputPhoneNumber.
|
|
31
|
-
import { _ as _5 } from "../chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.
|
|
29
|
+
import { _ as _4 } from "../chunks/MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js";
|
|
30
|
+
import { M as M2 } from "../chunks/MazInputPhoneNumber.CfClhmow.js";
|
|
31
|
+
import { _ as _5 } from "../chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js";
|
|
32
32
|
import { default as default26 } from "./MazInputTags.js";
|
|
33
33
|
import { default as default27 } from "./MazLazyImg.js";
|
|
34
34
|
import { default as default28 } from "./MazLink.js";
|
|
@@ -51,7 +51,7 @@ import { default as default43 } from "./MazTableRow.js";
|
|
|
51
51
|
import { default as default44 } from "./MazTableTitle.js";
|
|
52
52
|
import { _ as _7 } from "../chunks/MazTabs.vue_vue_type_script_setup_true_lang.CvFvUU0o.js";
|
|
53
53
|
import { default as default45 } from "./MazTabsBar.js";
|
|
54
|
-
import { _ as _8 } from "../chunks/MazTabsContent.vue_vue_type_script_setup_true_lang.
|
|
54
|
+
import { _ as _8 } from "../chunks/MazTabsContent.vue_vue_type_script_setup_true_lang.arGqYTL5.js";
|
|
55
55
|
import { default as default46 } from "./MazTabsContentItem.js";
|
|
56
56
|
import { default as default47 } from "./MazTextarea.js";
|
|
57
57
|
export {
|
|
@@ -12,7 +12,7 @@ import { useInstanceUniqId } from "./useInstanceUniqId.js";
|
|
|
12
12
|
import { useMountComponent } from "./useMountComponent.js";
|
|
13
13
|
import { useMutationObserver } from "./useMutationObserver.js";
|
|
14
14
|
import { useReadingTime } from "./useReadingTime.js";
|
|
15
|
-
import { u } from "../chunks/useStringMatching.
|
|
15
|
+
import { u } from "../chunks/useStringMatching.CqudA-tS.js";
|
|
16
16
|
import { useSwipe } from "./useSwipe.js";
|
|
17
17
|
import { useTimer } from "./useTimer.js";
|
|
18
18
|
import { useToast } from "./useToast.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as truthyFilter } from "../chunks/truthyFilter.C2WOKUCG.js";
|
|
2
2
|
import { toValue, computed } from "vue";
|
|
3
3
|
const bcp47Codes = ["af-ZA", "sq-AL", "ar-DZ", "ar-BH", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-AE", "ar-YE", "hy-AM", "Cy-az-AZ", "Lt-az-AZ", "eu-ES", "be-BY", "bg-BG", "ca-ES", "zh-CN", "zh-HK", "zh-MO", "zh-SG", "zh-TW", "zh-CHS", "zh-CHT", "hr-HR", "cs-CZ", "da-DK", "div-MV", "nl-BE", "nl-NL", "en-AU", "en-BZ", "en-CA", "en-CB", "en-IE", "en-JM", "en-NZ", "en-PH", "en-ZA", "en-TT", "en-GB", "en-US", "en-ZW", "et-EE", "fo-FO", "fa-IR", "fi-FI", "fr-BE", "fr-CA", "fr-FR", "fr-LU", "fr-MC", "fr-CH", "gl-ES", "ka-GE", "de-AT", "de-DE", "de-LI", "de-LU", "de-CH", "el-GR", "gu-IN", "he-IL", "hi-IN", "hu-HU", "is-IS", "id-ID", "it-IT", "it-CH", "ja-JP", "kn-IN", "kk-KZ", "kok-IN", "ko-KR", "ky-KZ", "lv-LV", "lt-LT", "mk-MK", "ms-BN", "ms-MY", "mr-IN", "mn-MN", "nb-NO", "nn-NO", "pl-PL", "pt-BR", "pt-PT", "pa-IN", "ro-RO", "ru-RU", "sa-IN", "Cy-sr-SP", "Lt-sr-SP", "sk-SK", "sl-SI", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-SV", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PY", "es-PE", "es-PR", "es-ES", "es-UY", "es-VE", "sw-KE", "sv-FI", "sv-SE", "syr-SY", "ta-IN", "tt-RU", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur-PK", "Cy-uz-UZ", "Lt-uz-UZ", "vi-VN"], countryCodes = ["AA", "AC", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TA", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"], iso6391Codes = ["aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu"], displayNamesCodes = [...iso6391Codes, ...bcp47Codes, ...countryCodes], DEFAULT_DISPLAY_NAMES_OPTIONS = {
|
|
4
4
|
type: "region",
|
|
@@ -87,7 +87,7 @@ function getAllDisplayNames(options) {
|
|
|
87
87
|
});
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
|
-
const result = mappedResults.filter(
|
|
90
|
+
const result = mappedResults.filter(truthyFilter).sort((a, b) => a.name && b.name ? a.name.localeCompare(b.name) : 0).sort((a, b) => {
|
|
91
91
|
const aIndex = resolvedPreferredCodes?.indexOf(a.code) ?? -1, bIndex = resolvedPreferredCodes?.indexOf(b.code) ?? -1;
|
|
92
92
|
return aIndex !== -1 && bIndex !== -1 ? aIndex - bIndex : aIndex !== -1 ? -1 : bIndex !== -1 ? 1 : 0;
|
|
93
93
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
2
|
import { ref, shallowRef, watch, toValue, onBeforeUnmount, unref } from "vue";
|
|
3
3
|
function useDropzone(target, options = {}) {
|
|
4
4
|
const isOverDropZone = ref(!1), isOverError = ref(!1), files = shallowRef(null);
|
|
5
5
|
let counter = 0, isValid = !0;
|
|
6
|
-
if (
|
|
6
|
+
if (isClient()) {
|
|
7
7
|
let getFiles = function(event) {
|
|
8
8
|
const list = Array.from(event.dataTransfer?.files ?? []);
|
|
9
9
|
return list.length === 0 ? null : multiple ? list : [list[0]];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as getContext, f as fieldHasValidation, i as updateFieldState, j as
|
|
1
|
+
import { e as getContext, f as fieldHasValidation, i as updateFieldState, j as isEqual, k as setFieldValidationState, l as getValidationEvents, h as hasModeIncludes, r as removeEventFromInteractiveElements, m as findInteractiveElements, n as addEventToInteractiveElements, o as handleFieldBlur } from "../chunks/dom-events.CfOiauCR.js";
|
|
2
2
|
import { computed, onMounted, onUnmounted } from "vue";
|
|
3
3
|
import { useFreezeValue } from "./useFreezeValue.js";
|
|
4
4
|
function useFormField(name, options) {
|
|
@@ -21,7 +21,7 @@ function useFormField(name, options) {
|
|
|
21
21
|
payload: payload.value,
|
|
22
22
|
schema: internalSchema.value,
|
|
23
23
|
options: { ...formOptions, ...finalOpts }
|
|
24
|
-
}), finalOpts.defaultValue !== void 0 && !
|
|
24
|
+
}), finalOpts.defaultValue !== void 0 && !isEqual(payload.value[name], finalOpts.defaultValue)) {
|
|
25
25
|
const initialValue = finalOpts.defaultValue;
|
|
26
26
|
payload.value[name] = initialValue, fieldsStates.value[name].initialValue = useFreezeValue(initialValue);
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, toValue, computed, watch, provide, nextTick } from "vue";
|
|
2
|
-
import { g as getInstance, a as getFieldsStates, b as getFieldsErrors, c as getErrorMessages, u as updateFieldsStates, v as validateForm, C as CONFIG, s as scrollToError, h as hasModeIncludes, d as handleFieldInput } from "../chunks/dom-events.
|
|
2
|
+
import { g as getInstance, a as getFieldsStates, b as getFieldsErrors, c as getErrorMessages, u as updateFieldsStates, v as validateForm, C as CONFIG, s as scrollToError, h as hasModeIncludes, d as handleFieldInput } from "../chunks/dom-events.CfOiauCR.js";
|
|
3
3
|
function createValidationProcessor(fieldsToValidate, fieldsStates, payload, internalSchema, isSubmitted) {
|
|
4
4
|
return () => {
|
|
5
5
|
fieldsToValidate.forEach((name) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
this.callback =
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
|
+
class IdleTimeout {
|
|
3
|
+
constructor(callback, options) {
|
|
4
|
+
this.callback = callback, this.options = {
|
|
5
5
|
...this.defaultOptions,
|
|
6
|
-
...
|
|
7
|
-
},
|
|
6
|
+
...options
|
|
7
|
+
}, isClient() && this.start();
|
|
8
8
|
}
|
|
9
9
|
defaultOptions = {
|
|
10
10
|
element: void 0,
|
|
@@ -38,17 +38,17 @@ class l {
|
|
|
38
38
|
return this.options.element ?? document.body;
|
|
39
39
|
}
|
|
40
40
|
start() {
|
|
41
|
-
if (!
|
|
41
|
+
if (!isClient()) {
|
|
42
42
|
console.warn("[IdleTimeout](start) you should run this method on client side");
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
|
-
for (const
|
|
46
|
-
this.element.addEventListener(
|
|
45
|
+
for (const eventName of this.eventNames)
|
|
46
|
+
this.element.addEventListener(eventName, this.handleEvent);
|
|
47
47
|
this.resetTimeout(), this.options.immediate && this.callback({ isIdle: !1, instance: this });
|
|
48
48
|
}
|
|
49
49
|
pause() {
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
const remainingTime = this.startTime + this.options.timeout - Date.now();
|
|
51
|
+
remainingTime <= 0 || (this.remainingTime = remainingTime, this.timeoutHandler && (clearTimeout(this.timeoutHandler), this.timeoutHandler = void 0));
|
|
52
52
|
}
|
|
53
53
|
resume() {
|
|
54
54
|
this.remainingTime <= 0 || (this.resetTimeout(), this.callback({ isIdle: this.isIdle, instance: this }), this.remainingTime = 0);
|
|
@@ -57,13 +57,13 @@ class l {
|
|
|
57
57
|
this.isDestroy = !1, this.isIdle = !1, this.remainingTime = 0, this.resetTimeout(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
58
58
|
}
|
|
59
59
|
destroy() {
|
|
60
|
-
if (!
|
|
60
|
+
if (!isClient()) {
|
|
61
61
|
console.warn("[IdleTimeout](destroy) you should run this method on client side");
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
this.isDestroy = !0;
|
|
65
|
-
for (const
|
|
66
|
-
this.element.removeEventListener(
|
|
65
|
+
for (const eventName of this.eventNames)
|
|
66
|
+
this.element.removeEventListener(eventName, this.handleEvent);
|
|
67
67
|
this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
68
68
|
}
|
|
69
69
|
resetTimeout() {
|
|
@@ -72,19 +72,19 @@ class l {
|
|
|
72
72
|
this.remainingTime || this.options.timeout
|
|
73
73
|
), this.startTime = Date.now();
|
|
74
74
|
}
|
|
75
|
-
handleEvent = (
|
|
75
|
+
handleEvent = (event) => {
|
|
76
76
|
try {
|
|
77
77
|
if (this.remainingTime > 0)
|
|
78
78
|
return;
|
|
79
|
-
if (
|
|
80
|
-
const { clientX
|
|
81
|
-
if (
|
|
79
|
+
if (event.type === "mousemove") {
|
|
80
|
+
const { clientX, clientY } = event;
|
|
81
|
+
if (clientX === void 0 && clientY === void 0 || clientX === this.lastClientX && clientY === this.lastClientY)
|
|
82
82
|
return;
|
|
83
|
-
this.lastClientX =
|
|
83
|
+
this.lastClientX = clientX, this.lastClientY = clientY;
|
|
84
84
|
}
|
|
85
|
-
this.resetTimeout(), this.callback({ isIdle: this.isIdle, eventType:
|
|
86
|
-
} catch (
|
|
87
|
-
throw new Error(`[IdleTimeout](handleEvent) ${
|
|
85
|
+
this.resetTimeout(), this.callback({ isIdle: this.isIdle, eventType: event.type, instance: this });
|
|
86
|
+
} catch (error) {
|
|
87
|
+
throw new Error(`[IdleTimeout](handleEvent) ${error}`);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
handleTimeout() {
|
|
@@ -96,21 +96,21 @@ class l {
|
|
|
96
96
|
get timeout() {
|
|
97
97
|
return this.options.timeout;
|
|
98
98
|
}
|
|
99
|
-
set timeout(
|
|
100
|
-
this.options.timeout =
|
|
99
|
+
set timeout(value) {
|
|
100
|
+
this.options.timeout = value;
|
|
101
101
|
}
|
|
102
102
|
get idle() {
|
|
103
103
|
return this.isIdle;
|
|
104
104
|
}
|
|
105
|
-
set idle(
|
|
106
|
-
|
|
105
|
+
set idle(value) {
|
|
106
|
+
value ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
function useIdleTimeout({
|
|
110
110
|
callback,
|
|
111
111
|
options
|
|
112
112
|
}) {
|
|
113
|
-
return new
|
|
113
|
+
return new IdleTimeout(callback, options);
|
|
114
114
|
}
|
|
115
115
|
export {
|
|
116
116
|
useIdleTimeout
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
|
+
import { t as truthyFilter } from "../chunks/truthyFilter.C2WOKUCG.js";
|
|
3
3
|
import { ref, onMounted, computed, toValue, watch } from "vue";
|
|
4
4
|
function useMutationObserver(target, callback, options = {}) {
|
|
5
5
|
const {
|
|
6
|
-
internalWindow =
|
|
6
|
+
internalWindow = isClient() ? globalThis : void 0,
|
|
7
7
|
...mutationOptions
|
|
8
8
|
} = options;
|
|
9
9
|
let observer;
|
|
@@ -16,7 +16,7 @@ function useMutationObserver(target, callback, options = {}) {
|
|
|
16
16
|
}, targets = computed(() => {
|
|
17
17
|
const value = toValue(target);
|
|
18
18
|
let element;
|
|
19
|
-
return value && "$el" in value ? element = value.$el : value && (element = value), new Set([element].filter(
|
|
19
|
+
return value && "$el" in value ? element = value.$el : value && (element = value), new Set([element].filter(truthyFilter));
|
|
20
20
|
}), stopWatch = watch(
|
|
21
21
|
targets,
|
|
22
22
|
(newTargets) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref, computed, toValue } from "vue";
|
|
2
|
-
const
|
|
2
|
+
const defaultOptions = {
|
|
3
3
|
preventDefaultOnTouchMove: !1,
|
|
4
4
|
preventDefaultOnMouseWheel: !1,
|
|
5
5
|
threshold: 50,
|
|
6
6
|
immediate: !1,
|
|
7
7
|
triggerOnEnd: !1
|
|
8
8
|
};
|
|
9
|
-
class
|
|
10
|
-
constructor(
|
|
11
|
-
this.inputOption =
|
|
9
|
+
class Swipe {
|
|
10
|
+
constructor(inputOption) {
|
|
11
|
+
this.inputOption = inputOption, this.options = { ...defaultOptions, ...inputOption }, this.onToucheStartCallback = this.toucheStartHandler.bind(this), this.onToucheMoveCallback = this.handleTouchMove.bind(this), this.onToucheEndCallback = this.handleTouchEnd.bind(this), this.onMouseWheelCallback = this.handleMouseWheel.bind(this), this.start = this.startListening.bind(this), this.stop = this.stopListening.bind(this), this.options.element && this.setElement(this.options.element), this.options.immediate && this.start();
|
|
12
12
|
}
|
|
13
13
|
element;
|
|
14
14
|
xStart;
|
|
@@ -30,28 +30,28 @@ class n {
|
|
|
30
30
|
stopListening() {
|
|
31
31
|
this.element?.removeEventListener("touchstart", this.onToucheStartCallback), this.element?.removeEventListener("touchmove", this.onToucheMoveCallback), this.element?.removeEventListener("touchend", this.onToucheEndCallback), this.options.preventDefaultOnMouseWheel && this.element?.removeEventListener("mousewheel", this.onMouseWheelCallback);
|
|
32
32
|
}
|
|
33
|
-
setElement(
|
|
34
|
-
if (!
|
|
33
|
+
setElement(element) {
|
|
34
|
+
if (!element) {
|
|
35
35
|
console.error(
|
|
36
36
|
"[maz-ui][SwipeHandler](setElement) Element should be provided. Its can be a string selector or an HTMLElement"
|
|
37
37
|
);
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
if (typeof
|
|
41
|
-
const
|
|
42
|
-
if (!(
|
|
40
|
+
if (typeof element == "string") {
|
|
41
|
+
const foundElement = document.querySelector(element);
|
|
42
|
+
if (!(foundElement instanceof HTMLElement)) {
|
|
43
43
|
console.error("[maz-ui][SwipeHandler](setElement) String selector for element is not found");
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
this.element =
|
|
46
|
+
this.element = foundElement;
|
|
47
47
|
} else
|
|
48
|
-
this.element =
|
|
48
|
+
this.element = element;
|
|
49
49
|
}
|
|
50
|
-
handleMouseWheel(
|
|
51
|
-
|
|
50
|
+
handleMouseWheel(event) {
|
|
51
|
+
event.preventDefault();
|
|
52
52
|
}
|
|
53
|
-
toucheStartHandler(
|
|
54
|
-
this.xStart =
|
|
53
|
+
toucheStartHandler(event) {
|
|
54
|
+
this.xStart = event.touches[0].clientX, this.yStart = event.touches[0].clientY, this.emitValuesChanged();
|
|
55
55
|
}
|
|
56
56
|
emitValuesChanged() {
|
|
57
57
|
this.options.onValuesChanged?.({
|
|
@@ -63,21 +63,21 @@ class n {
|
|
|
63
63
|
yDiff: this.yDiff
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
handleTouchMove(
|
|
67
|
-
this.options.preventDefaultOnTouchMove &&
|
|
66
|
+
handleTouchMove(event) {
|
|
67
|
+
this.options.preventDefaultOnTouchMove && event.cancelable && event.preventDefault(), this.xEnd = event.touches[0].clientX, this.yEnd = event.touches[0].clientY, !(!this.xStart || !this.yStart) && (this.xDiff = this.xStart - this.xEnd, this.yDiff = this.yStart - this.yEnd, this.emitValuesChanged(), this.options.triggerOnEnd || this.runCallbacks(event));
|
|
68
68
|
}
|
|
69
|
-
handleTouchEnd(
|
|
70
|
-
this.runCallbacks(
|
|
69
|
+
handleTouchEnd(event) {
|
|
70
|
+
this.runCallbacks(event), this.emitValuesChanged();
|
|
71
71
|
}
|
|
72
|
-
runCallbacks(
|
|
73
|
-
typeof this.xDiff != "number" || typeof this.yDiff != "number" || Math.abs(this.xDiff) < this.options.threshold && Math.abs(this.yDiff) < this.options.threshold || (Math.abs(this.xDiff) > Math.abs(this.yDiff) ? this.xDiff > 0 ? this.options.onLeft?.(
|
|
72
|
+
runCallbacks(event) {
|
|
73
|
+
typeof this.xDiff != "number" || typeof this.yDiff != "number" || Math.abs(this.xDiff) < this.options.threshold && Math.abs(this.yDiff) < this.options.threshold || (Math.abs(this.xDiff) > Math.abs(this.yDiff) ? this.xDiff > 0 ? this.options.onLeft?.(event) : this.options.onRight?.(event) : this.yDiff > 0 ? this.options.onUp?.(event) : this.options.onDown?.(event), this.resetValues());
|
|
74
74
|
}
|
|
75
75
|
resetValues() {
|
|
76
76
|
this.xStart = void 0, this.yStart = void 0, this.xEnd = void 0, this.yEnd = void 0, this.xDiff = void 0, this.yDiff = void 0, this.emitValuesChanged();
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
function useSwipe(options) {
|
|
80
|
-
const xDiff = ref(), yDiff = ref(), xStart = ref(), xEnd = ref(), yStart = ref(), yEnd = ref(), element = computed(() => toValue(options.element)), swiper = new
|
|
80
|
+
const xDiff = ref(), yDiff = ref(), xStart = ref(), xEnd = ref(), yStart = ref(), yEnd = ref(), element = computed(() => toValue(options.element)), swiper = new Swipe({
|
|
81
81
|
...options,
|
|
82
82
|
element: element.value,
|
|
83
83
|
onValuesChanged(values) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
this.callback =
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
|
+
class UserVisibility {
|
|
3
|
+
constructor(callback, options) {
|
|
4
|
+
this.callback = callback, this.options = {
|
|
5
5
|
...this.defaultOptions,
|
|
6
|
-
...
|
|
7
|
-
}, this.eventHandlerFunction = this.eventHandler.bind(this),
|
|
6
|
+
...options
|
|
7
|
+
}, this.eventHandlerFunction = this.eventHandler.bind(this), isClient() && this.start();
|
|
8
8
|
}
|
|
9
9
|
eventHandlerFunction;
|
|
10
10
|
event = "visibilitychange";
|
|
@@ -17,7 +17,7 @@ class o {
|
|
|
17
17
|
};
|
|
18
18
|
isVisible = !1;
|
|
19
19
|
start() {
|
|
20
|
-
if (!
|
|
20
|
+
if (!isClient()) {
|
|
21
21
|
console.warn("[UserVisibility](start) you should run this method on client side");
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -49,7 +49,7 @@ function useUserVisibility({
|
|
|
49
49
|
callback,
|
|
50
50
|
options
|
|
51
51
|
}) {
|
|
52
|
-
return new
|
|
52
|
+
return new UserVisibility(callback, options);
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
55
55
|
useUserVisibility
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
2
|
import { ref, onMounted, onUnmounted } from "vue";
|
|
3
3
|
function useWindowSize(options = {}) {
|
|
4
4
|
const {
|
|
5
|
-
internalWindow =
|
|
5
|
+
internalWindow = isClient() ? globalThis : void 0,
|
|
6
6
|
initialWidth = Number.POSITIVE_INFINITY,
|
|
7
7
|
initialHeight = Number.POSITIVE_INFINITY,
|
|
8
8
|
includeScrollbar = !0
|
package/dist/directives/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d, p } from "../chunks/vClickOutside.
|
|
1
|
+
import { d, p } from "../chunks/vClickOutside.DIOiluy0.js";
|
|
2
2
|
import { vFullscreenImgInstall } from "./vFullscreenImg.js";
|
|
3
3
|
import { vLazyImgInstall } from "./vLazyImg.js";
|
|
4
4
|
import { vTooltip, vTooltipInstall } from "./vTooltip.js";
|
|
5
5
|
import { vZoomImg, vZoomImgInstall } from "./vZoomImg.js";
|
|
6
|
-
import { d as d2 } from "../chunks/fullscreen-img.directive.
|
|
6
|
+
import { d as d2 } from "../chunks/fullscreen-img.directive.B8ESs0MK.js";
|
|
7
7
|
import { d as d3 } from "../chunks/lazy-img.directive.BLFnGqQa.js";
|
|
8
8
|
export {
|
|
9
9
|
d as vClickOutside,
|