maz-ui 4.0.0-beta.2 → 4.0.0-beta.21
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/README.md +1 -1
- package/dist/assets/MazAccordion.DUQCf8vy.css +1 -0
- package/dist/assets/{MazAnimatedCounter.CTG-PC5W.css → MazAnimatedCounter.DkZNPRLp.css} +1 -1
- package/dist/assets/MazAnimatedText.DDqCxrFX.css +1 -0
- package/dist/assets/MazBackdrop.BnhcmjbP.css +1 -0
- package/dist/assets/{MazBadge.DN8tdE8_.css → MazBadge.ChI2DaTU.css} +1 -1
- package/dist/assets/MazBtn.BFhP-9HO.css +1 -0
- package/dist/assets/MazCard.DBuQhXtl.css +1 -0
- package/dist/assets/{MazCardSpotlight.Dy-wuLQq.css → MazCardSpotlight.IbPp_y0j.css} +1 -1
- package/dist/assets/MazCheckbox.aH1IKnrR.css +1 -0
- package/dist/assets/MazChecklist.BzF5KtZ3.css +1 -0
- package/dist/assets/MazDatePicker.8GyrtM-j.css +1 -0
- package/dist/assets/MazDropzone.CXu1QtnY.css +1 -0
- package/dist/assets/MazInput.ByolKDfx.css +1 -0
- package/dist/assets/MazInputCode.FA2z4HQd.css +1 -0
- package/dist/assets/MazInputPhoneNumber.CrXS7DOY.css +1 -0
- package/dist/assets/MazInputTags.KNTpDHof.css +1 -0
- package/dist/assets/MazLazyImg.NlPRN3Nk.css +1 -0
- package/dist/assets/MazLink.CFscNMFr.css +1 -0
- package/dist/assets/MazPickerCalendarMonth.Boe_8k4x.css +1 -0
- package/dist/assets/MazPickerMonthSwitcher.CszcpCcY.css +1 -0
- package/dist/assets/{MazPickerYearSwitcher.Dl30Dwor.css → MazPickerYearSwitcher.Cn-nS-Vv.css} +1 -1
- package/dist/assets/MazPopover.rBpotMKW.css +1 -0
- package/dist/assets/MazPullToRefresh.BQ64UvzA.css +1 -0
- package/dist/assets/MazRadio.aTHM-mpx.css +1 -0
- package/dist/assets/MazRadioButtons.SGytq4d7.css +1 -0
- package/dist/assets/MazReadingProgressBar.CwBVXE3g.css +1 -0
- package/dist/assets/MazSelect.CwjnAZiu.css +1 -0
- package/dist/assets/{MazSelectCountry.D2Qudf0K.css → MazSelectCountry.t3GsKyqw.css} +1 -1
- package/dist/assets/{MazSlider.D5SgmZLH.css → MazSlider.y4qpnD0N.css} +1 -1
- package/dist/assets/MazStepper.BD2gDGAX.css +1 -0
- package/dist/assets/MazSwitch.Bxmh2iFj.css +1 -0
- package/dist/assets/{MazTable.B1tkeUfE.css → MazTable.DMlQdImb.css} +1 -1
- package/dist/assets/MazTableRow.DgBXpK9J.css +1 -0
- package/dist/assets/{MazTabsBar.B9N_jdqU.css → MazTabsBar.gcS2Fc-B.css} +1 -1
- package/dist/assets/{MazTabsContentItem.CHfy19ZF.css → MazTabsContentItem.C84SDmj0.css} +1 -1
- package/dist/assets/MazTextarea.li9dWBax.css +1 -0
- package/dist/assets/{PhoneInput.CyWO76iq.css → PhoneInput.BJiKqOF6.css} +1 -1
- package/dist/assets/{fullscreen-img.pvt6196l.css → fullscreen-img.Bkuz1GOX.css} +1 -1
- package/dist/assets/{toast.kunueRvo.css → toast.CC2VQab8.css} +1 -1
- package/dist/chunks/{MazDatePicker.CT5yJhSN.js → MazDatePicker.De3Ltb2F.js} +29 -31
- package/dist/chunks/{MazDialogPromise.vue_vue_type_script_setup_true_lang.BQvDEofz.js → MazDialogConfirm.vue_vue_type_script_setup_true_lang.Grn2kB3x.js} +78 -18
- package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.abk1IbMX.js → MazDropdown.vue_vue_type_style_index_0_lang.BES3jpuw.js} +12 -22
- package/dist/chunks/{MazInputPhoneNumber.Uwhn1Q9j.js → MazInputPhoneNumber.Ch-PCGiv.js} +14 -12
- package/dist/chunks/{MazInputPrice.vue_vue_type_script_setup_true_lang.GMKzSu7R.js → MazInputPrice.vue_vue_type_script_setup_true_lang.BA6TDX-T.js} +31 -1
- package/dist/chunks/{MazPickerCalendar.RS6ZMdDK.js → MazPickerCalendar.DKXNI8O4.js} +1 -1
- package/dist/chunks/{MazPickerCalendarMonth.hQBSVkc9.js → MazPickerCalendarMonth.DKBqgrNp.js} +5 -5
- package/dist/chunks/{MazPickerCalendarSwitcher.Cp2ux3E4.js → MazPickerCalendarSwitcher.CzIZol3Z.js} +1 -1
- package/dist/chunks/{MazPickerContainer.DnfB3Dqg.js → MazPickerContainer.Mrh-Q52I.js} +1 -1
- package/dist/chunks/{MazPickerHeader.Dlz2yJ1D.js → MazPickerHeader.Bm9vIrtB.js} +1 -1
- package/dist/chunks/{MazPickerMonthSwitcher.BpfCGGxQ.js → MazPickerMonthSwitcher.BSD2GtY6.js} +5 -6
- package/dist/chunks/{MazPickerTime.EuWWNfid.js → MazPickerTime.D0hilq5b.js} +1 -1
- package/dist/chunks/{MazPickerYearSwitcher.D4aO09D3.js → MazPickerYearSwitcher.BIUYJMvj.js} +8 -27
- package/dist/chunks/{MazSwitch.vue_vue_type_style_index_0_lang.DnCjlD6D.js → MazSwitch.vue_vue_type_style_index_0_lang.CU43Y1ky.js} +2 -2
- package/dist/chunks/{MazTable.vue_vue_type_script_setup_true_lang.bm7ng8fK.js → MazTable.vue_vue_type_script_setup_true_lang.BcTw9Tyh.js} +3 -3
- package/dist/chunks/{PhoneInput.CPjyZ8Sq.js → PhoneInput.BzL1_XS5.js} +5 -4
- package/dist/chunks/{utils.BBuYjMbK.js → dom-events.Bbe7wDQl.js} +221 -115
- package/dist/chunks/{en.BzBlrE0C.js → en.Q_4-KljL.js} +12 -0
- package/dist/chunks/{fullscreen-img.directive.CyOHexcO.js → fullscreen-img.directive.Be383en8.js} +2 -2
- package/dist/chunks/{lazy-img.directive.D5zCo3Zi.js → lazy-img.directive.BLFnGqQa.js} +1 -1
- package/dist/chunks/types.D0Bp_UhS.js +6 -0
- package/dist/chunks/{normalizeString.CFe2M8S_.js → useStringMatching.Ba1yCuA4.js} +40 -1
- package/dist/chunks/{useTranslations.BXuww4ux.js → useTranslations.D5aoYwD7.js} +1 -1
- package/dist/chunks/vClickOutside.DIOiluy0.js +107 -0
- package/dist/components/MazAccordion.js +2 -2
- package/dist/components/MazAnimatedCounter.js +3 -3
- package/dist/components/MazAnimatedText.js +2 -2
- package/dist/components/MazBackdrop.js +3 -3
- package/dist/components/MazBadge.js +5 -4
- package/dist/components/MazBtn.js +9 -7
- package/dist/components/MazCard.js +2 -2
- package/dist/components/MazCardSpotlight.js +4 -4
- package/dist/components/MazCarousel.js +1 -1
- package/dist/components/MazCheckbox.js +10 -12
- package/dist/components/MazChecklist.js +4 -5
- package/dist/components/MazDatePicker.js +1 -1
- package/dist/components/MazDialogConfirm.js +6 -0
- package/dist/components/MazDropdown.js +1 -1
- package/dist/components/MazDropzone.js +5 -5
- package/dist/components/MazGallery.js +2 -2
- package/dist/components/MazInput.js +21 -16
- package/dist/components/MazInputCode.js +2 -2
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazInputPrice.js +1 -1
- package/dist/components/MazInputTags.js +2 -2
- package/dist/components/MazLazyImg.js +9 -9
- package/dist/components/MazLink.js +9 -5
- package/dist/components/MazPagination.js +1 -1
- package/dist/components/MazPopover.js +177 -89
- package/dist/components/MazPullToRefresh.js +8 -3
- package/dist/components/MazRadio.js +8 -16
- package/dist/components/MazRadioButtons.js +7 -6
- package/dist/components/MazReadingProgressBar.js +10 -3
- package/dist/components/MazSelect.js +24 -14
- package/dist/components/MazSelectCountry.js +15 -9
- package/dist/components/MazSlider.js +2 -2
- package/dist/components/MazStepper.js +2 -2
- package/dist/components/MazSwitch.js +1 -1
- package/dist/components/MazTable.js +3 -3
- package/dist/components/MazTableCell.js +1 -1
- package/dist/components/MazTableRow.js +3 -3
- package/dist/components/MazTableTitle.js +1 -1
- package/dist/components/MazTabsBar.js +6 -6
- package/dist/components/MazTabsContentItem.js +6 -7
- package/dist/components/MazTextarea.js +24 -3
- package/dist/components/index.js +8 -8
- package/dist/composables/index.js +4 -2
- package/dist/composables/useAos.js +1 -1
- package/dist/composables/useDialog.js +1 -1
- package/dist/composables/useDisplayNames.js +7 -1
- package/dist/composables/useDropzone.js +7 -7
- package/dist/composables/useFormField.js +15 -19
- package/dist/composables/useFormValidator.js +58 -29
- package/dist/composables/useIdleTimeout.js +108 -1
- package/dist/composables/useInjectStrict.js +2 -2
- package/dist/composables/useStringMatching.js +3 -40
- package/dist/composables/useSwipe.js +77 -1
- package/dist/composables/useToast.js +1 -1
- package/dist/composables/useUserVisibility.js +47 -1
- package/dist/composables/useWait.js +1 -1
- package/dist/composables/useWindowSize.js +1 -1
- package/dist/css/main.css +1 -1
- package/dist/directives/index.js +7 -7
- package/dist/directives/vClickOutside.js +4 -102
- package/dist/directives/vFullscreenImg.js +1 -1
- package/dist/directives/vLazyImg.js +2 -2
- package/dist/directives/vTooltip.js +97 -60
- package/dist/index.js +1 -114
- package/dist/plugins/dialog.js +3 -3
- package/dist/plugins/maz-ui.js +150 -143
- package/dist/plugins/toast.js +8 -11
- package/dist/resolvers/MazComponentsResolver.js +7 -1
- package/dist/resolvers/MazDirectivesResolver.js +1 -1
- package/dist/resolvers/MazModulesResolver.js +3 -1
- package/dist/tailwindcss/tailwind.config.js +5 -2
- package/dist/tailwindcss/variables/design-tokens.js +3 -0
- package/dist/types/components/MazAccordion.vue.d.ts +15 -2
- package/dist/types/components/MazBtn.vue.d.ts +1 -0
- package/dist/types/components/MazCard.vue.d.ts +1 -1
- package/dist/types/components/MazCheckbox.vue.d.ts +0 -6
- package/dist/types/components/MazChecklist.vue.d.ts +1 -1
- package/dist/types/components/MazDatePicker.vue.d.ts +15 -23
- package/dist/types/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
- package/dist/types/components/{MazDialogPromise.vue.d.ts → MazDialogConfirm.vue.d.ts} +43 -10
- package/dist/types/components/MazDropdown.vue.d.ts +12 -12
- package/dist/types/components/MazInput.vue.d.ts +7 -0
- package/dist/types/components/MazInputNumber.vue.d.ts +2 -2
- package/dist/types/components/MazInputPhoneNumber/useLibphonenumber.d.ts +2 -2
- package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +6 -2
- package/dist/types/components/MazInputPhoneNumber.vue.d.ts +38 -15
- package/dist/types/components/MazInputTags.vue.d.ts +1 -1
- package/dist/types/components/MazLazyImg.vue.d.ts +8 -8
- package/dist/types/components/MazLink.vue.d.ts +11 -0
- package/dist/types/components/MazPopover.vue.d.ts +18 -15
- package/dist/types/components/MazRadioButtons.vue.d.ts +1 -1
- package/dist/types/components/MazSelect.vue.d.ts +2 -2
- package/dist/types/components/MazSelectCountry.vue.d.ts +13 -4
- package/dist/types/components/MazStepper.vue.d.ts +13 -2
- package/dist/types/components/MazTable.vue.d.ts +63 -2
- package/dist/types/components/index.d.ts +4 -4
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/composables/index.d.ts +2 -1
- package/dist/types/composables/useDisplayNames.d.ts +2 -2
- package/dist/types/composables/useDropzone.d.ts +3 -3
- package/dist/types/composables/useFormField.d.ts +16 -56
- package/dist/types/composables/useFormValidator/config.d.ts +2 -2
- package/dist/types/composables/useFormValidator/dom-events.d.ts +19 -0
- package/dist/types/composables/useFormValidator/state-management.d.ts +72 -0
- package/dist/types/composables/useFormValidator/types.d.ts +20 -32
- package/dist/types/composables/useFormValidator/validation.d.ts +37 -0
- package/dist/types/composables/useFormValidator.d.ts +16 -10
- package/dist/types/composables/useIdleTimeout.d.ts +1 -1
- package/dist/types/composables/useInjectStrict.d.ts +1 -1
- package/dist/types/composables/useSwipe.d.ts +1 -1
- package/dist/types/composables/useUserVisibility.d.ts +1 -1
- package/dist/types/directives/vClickOutside.d.ts +11 -18
- package/dist/types/directives/vFullscreenImg/fullscreen-img.directive.d.ts +3 -5
- package/dist/types/directives/vFullscreenImg.d.ts +9 -4
- package/dist/types/directives/vLazyImg/lazy-img.directive.d.ts +3 -5
- package/dist/types/directives/vLazyImg.d.ts +11 -6
- package/dist/types/directives/vTooltip.d.ts +14 -14
- package/dist/types/directives/vZoomImg/zoom-img.directive.d.ts +2 -0
- package/dist/types/directives/vZoomImg.d.ts +9 -5
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/aos.d.ts +30 -4
- package/dist/types/plugins/dialog/DialogHandler.d.ts +2 -2
- package/dist/types/plugins/dialog.d.ts +2 -4
- package/dist/types/plugins/maz-ui.d.ts +2 -63
- package/dist/types/plugins/toast.d.ts +2 -4
- package/dist/types/plugins/wait.d.ts +2 -3
- package/dist/types/tailwindcss/tailwind.config.d.ts +5 -0
- package/dist/types/tailwindcss/variables/design-tokens.d.ts +3 -0
- package/package.json +42 -39
- package/dist/assets/MazAccordion.esK3rR4p.css +0 -1
- package/dist/assets/MazAnimatedText.BrOwWuqf.css +0 -1
- package/dist/assets/MazBackdrop.DNpnLh63.css +0 -1
- package/dist/assets/MazBtn.BnRxVlqS.css +0 -1
- package/dist/assets/MazCard.C6nDaeIC.css +0 -1
- package/dist/assets/MazCheckbox.C_qIngLy.css +0 -1
- package/dist/assets/MazChecklist.CWK_Gl-t.css +0 -1
- package/dist/assets/MazDatePicker.V5JwKPrQ.css +0 -1
- package/dist/assets/MazDropzone.DafxQwbq.css +0 -1
- package/dist/assets/MazInput.DW2KOJHY.css +0 -1
- package/dist/assets/MazInputCode.CG6EJBEk.css +0 -1
- package/dist/assets/MazInputPhoneNumber.vpA2mrZn.css +0 -1
- package/dist/assets/MazInputTags.B_s9J3sw.css +0 -1
- package/dist/assets/MazLazyImg.BNaVtpfX.css +0 -1
- package/dist/assets/MazLink.CCfbrUs0.css +0 -1
- package/dist/assets/MazPickerCalendarMonth.zkrPVHDv.css +0 -1
- package/dist/assets/MazPickerMonthSwitcher.168v7Hs1.css +0 -1
- package/dist/assets/MazPopover.Bth9NWia.css +0 -1
- package/dist/assets/MazPullToRefresh.DABqbGtK.css +0 -1
- package/dist/assets/MazRadio.DKMFWwy_.css +0 -1
- package/dist/assets/MazRadioButtons.BA4rjgK9.css +0 -1
- package/dist/assets/MazReadingProgressBar.n1Is8_Y3.css +0 -1
- package/dist/assets/MazSelect.DZZpDg8z.css +0 -1
- package/dist/assets/MazStepper.DYMde9uq.css +0 -1
- package/dist/assets/MazSwitch.Z1ZMm7tx.css +0 -1
- package/dist/assets/MazTableRow.B78Bd4Kv.css +0 -1
- package/dist/assets/MazTextarea.Dz11mUeK.css +0 -1
- package/dist/chunks/TextareaAutogrow.C22LQx0k.js +0 -25
- package/dist/chunks/debounceCallback.B69vn57Q.js +0 -7
- package/dist/chunks/formatCurrency.C8NzW9Ii.js +0 -34
- package/dist/chunks/formatDate.DZ_OzdnV.js +0 -21
- package/dist/chunks/getCountryFlagUrl.dQjriBXx.js +0 -9
- package/dist/chunks/idleTimeout.-ICpdeGV.js +0 -111
- package/dist/chunks/isServer.BokzeB-Q.js +0 -6
- package/dist/chunks/isStandaloneMode.BpUpOTbA.js +0 -10
- package/dist/chunks/pascalCase.D_nuQ66I.js +0 -11
- package/dist/chunks/swipeHandler.8emelhOL.js +0 -80
- package/dist/chunks/throttle.DN8ARw0a.js +0 -11
- package/dist/chunks/throttleId.7PhWZjcS.js +0 -62
- package/dist/chunks/userVisibility.BbQSJASv.js +0 -50
- package/dist/chunks/x-mark.CTalOvvY.js +0 -23
- package/dist/components/MazDialogPromise.js +0 -6
- package/dist/types/components/MazDialogPromise/useMazDialogPromise.d.ts +0 -54
- package/dist/types/components/MazInputPhoneNumber/types.d.ts +0 -22
- package/dist/types/composables/useFormValidator/utils.d.ts +0 -116
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as isEqual } from "../chunks/throttleId.7PhWZjcS.js";
|
|
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.Bbe7wDQl.js";
|
|
3
2
|
import { computed, onMounted, onUnmounted } from "vue";
|
|
4
|
-
import { e as getContext, f as fieldHasValidation, i as updateFieldState, j as setFieldValidationState, k as getValidationEvents, d as hasModeIncludes, r as removeEventFromInteractiveElements, l as handleFieldBlur, m as findInteractiveElements, n as addEventToInteractiveElements } from "../chunks/utils.BBuYjMbK.js";
|
|
5
3
|
import { useFreezeValue } from "./useFreezeValue.js";
|
|
6
4
|
function useFormField(name, options) {
|
|
7
5
|
const opts = {
|
|
@@ -14,17 +12,17 @@ function useFormField(name, options) {
|
|
|
14
12
|
internalSchema,
|
|
15
13
|
errorMessages,
|
|
16
14
|
isSubmitted
|
|
17
|
-
} = getContext(opts.formIdentifier, "useFormField"), fieldMode = fieldHasValidation(name, internalSchema.value) ? options?.mode ?? formOptions.mode : void 0;
|
|
18
|
-
|
|
15
|
+
} = getContext(opts.formIdentifier, "useFormField"), finalOpts = opts, fieldMode = fieldHasValidation(name, internalSchema.value) ? options?.mode ?? formOptions.mode : void 0;
|
|
16
|
+
finalOpts.mode = fieldMode;
|
|
19
17
|
const fieldState = computed(() => fieldsStates.value[name]);
|
|
20
18
|
if (fieldsStates.value[name] = updateFieldState({
|
|
21
19
|
name,
|
|
22
20
|
fieldState: fieldState.value,
|
|
23
21
|
payload: payload.value,
|
|
24
22
|
schema: internalSchema.value,
|
|
25
|
-
options: { ...formOptions, ...
|
|
26
|
-
}),
|
|
27
|
-
const initialValue =
|
|
23
|
+
options: { ...formOptions, ...finalOpts }
|
|
24
|
+
}), finalOpts.defaultValue !== void 0 && !isEqual(payload.value[name], finalOpts.defaultValue)) {
|
|
25
|
+
const initialValue = finalOpts.defaultValue;
|
|
28
26
|
payload.value[name] = initialValue, fieldsStates.value[name].initialValue = useFreezeValue(initialValue);
|
|
29
27
|
}
|
|
30
28
|
fieldMode && setFieldValidationState({
|
|
@@ -46,27 +44,26 @@ function useFormField(name, options) {
|
|
|
46
44
|
}
|
|
47
45
|
const validationEvents = computed(
|
|
48
46
|
() => getValidationEvents({
|
|
49
|
-
hasRef: !!
|
|
47
|
+
hasRef: !!finalOpts.ref?.value,
|
|
50
48
|
onBlur,
|
|
51
49
|
fieldState: fieldState.value
|
|
52
50
|
})
|
|
53
51
|
);
|
|
54
|
-
if (
|
|
52
|
+
if (finalOpts.ref && fieldMode && hasModeIncludes(["eager", "blur", "progressive"], fieldMode)) {
|
|
55
53
|
let interactiveElements = [];
|
|
56
54
|
const handleInteractiveElements = (element) => {
|
|
57
|
-
interactiveElements
|
|
55
|
+
interactiveElements.length > 0 && removeEventFromInteractiveElements({
|
|
56
|
+
interactiveElements,
|
|
57
|
+
onBlur
|
|
58
|
+
}), interactiveElements = findInteractiveElements(element), addEventToInteractiveElements({
|
|
58
59
|
interactiveElements,
|
|
59
60
|
onBlur,
|
|
60
61
|
mode: fieldMode
|
|
61
62
|
});
|
|
62
63
|
};
|
|
63
64
|
onMounted(() => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
interactiveElement && handleInteractiveElements(interactiveElement);
|
|
67
|
-
}, {
|
|
68
|
-
errorMessage: `[maz-ui](useFormField) No element found for ref ${opts.ref} for field ${name}`
|
|
69
|
-
});
|
|
65
|
+
const element = finalOpts.ref?.value, elementToBind = element instanceof HTMLElement ? element : element?.$el;
|
|
66
|
+
elementToBind instanceof HTMLElement ? handleInteractiveElements(elementToBind) : console.warn(`[maz-ui](useFormField) No element found for ref in field '${String(name)}'. Make sure the ref is properly bound to an HTMLElement or Vue component (form identifier: ${String(formOptions.identifier)})`);
|
|
70
67
|
}), onUnmounted(() => {
|
|
71
68
|
removeEventFromInteractiveElements({
|
|
72
69
|
interactiveElements,
|
|
@@ -88,8 +85,7 @@ function useFormField(name, options) {
|
|
|
88
85
|
get: () => payload.value[name],
|
|
89
86
|
set: (value) => payload.value[name] = value
|
|
90
87
|
}),
|
|
91
|
-
validationEvents
|
|
92
|
-
onBlur
|
|
88
|
+
validationEvents
|
|
93
89
|
};
|
|
94
90
|
}
|
|
95
91
|
export {
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import { ref, 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
|
|
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.Bbe7wDQl.js";
|
|
3
|
+
function createValidationProcessor(fieldsToValidate, fieldsStates, payload, internalSchema, isSubmitted) {
|
|
4
|
+
return () => {
|
|
5
|
+
fieldsToValidate.forEach((name) => {
|
|
6
|
+
const fieldState = fieldsStates.value[name];
|
|
7
|
+
handleFieldInput({
|
|
8
|
+
name,
|
|
9
|
+
fieldState,
|
|
10
|
+
payload: payload.value,
|
|
11
|
+
schema: internalSchema.value,
|
|
12
|
+
isSubmitted: isSubmitted.value,
|
|
13
|
+
forceValidation: !0
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
3
18
|
function useFormValidator({ schema, defaultValues, model, options }) {
|
|
4
19
|
const instance = getInstance("useFormValidator"), opts = {
|
|
5
20
|
mode: CONFIG.mode,
|
|
@@ -8,13 +23,23 @@ function useFormValidator({ schema, defaultValues, model, options }) {
|
|
|
8
23
|
throttledFields: null,
|
|
9
24
|
identifier: "main-form-validator",
|
|
10
25
|
...options
|
|
11
|
-
}, internalDefaultValues = ref(defaultValues), payload = ref({ ...internalDefaultValues.value, ...model?.value }), internalSchema = ref(schema), fieldsStates = ref(
|
|
26
|
+
}, internalDefaultValues = ref(toValue(defaultValues)), payload = ref({ ...internalDefaultValues.value, ...model?.value }), internalSchema = ref(toValue(schema)), fieldsStates = ref(
|
|
12
27
|
getFieldsStates({
|
|
13
28
|
schema: internalSchema.value,
|
|
14
29
|
payload: payload.value,
|
|
15
30
|
options: opts
|
|
16
31
|
})
|
|
17
|
-
), isSubmitting = ref(!1), isSubmitted = ref(!1), isValid = computed(() =>
|
|
32
|
+
), isSubmitting = ref(!1), isSubmitted = ref(!1), isValid = computed(() => {
|
|
33
|
+
for (const key in fieldsStates.value)
|
|
34
|
+
if (!fieldsStates.value[key].valid)
|
|
35
|
+
return !1;
|
|
36
|
+
return !0;
|
|
37
|
+
}), isDirty = computed(() => {
|
|
38
|
+
for (const key in fieldsStates.value)
|
|
39
|
+
if (fieldsStates.value[key].dirty)
|
|
40
|
+
return !0;
|
|
41
|
+
return !1;
|
|
42
|
+
}), errors = computed(() => getFieldsErrors(fieldsStates.value)), errorMessages = computed(() => getErrorMessages(errors.value, fieldsStates.value));
|
|
18
43
|
model && watch(
|
|
19
44
|
payload,
|
|
20
45
|
(newModel) => {
|
|
@@ -39,39 +64,43 @@ function useFormValidator({ schema, defaultValues, model, options }) {
|
|
|
39
64
|
},
|
|
40
65
|
{ deep: !0 }
|
|
41
66
|
), internalValidateForm();
|
|
42
|
-
function internalValidateForm(
|
|
67
|
+
function internalValidateForm(setErrors = opts.mode === "aggressive") {
|
|
43
68
|
return validateForm({
|
|
44
69
|
fieldsStates: fieldsStates.value,
|
|
45
70
|
payload: payload.value,
|
|
46
71
|
schema: internalSchema.value,
|
|
47
|
-
|
|
72
|
+
setErrors
|
|
48
73
|
});
|
|
49
74
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
let payloadWatchStop = null;
|
|
76
|
+
function setupOptimizedWatch() {
|
|
77
|
+
payloadWatchStop && payloadWatchStop();
|
|
78
|
+
const payloadSnapshot = computed(() => {
|
|
79
|
+
const snapshot = {};
|
|
80
|
+
for (const key of Object.keys(internalSchema.value))
|
|
81
|
+
snapshot[key] = payload.value[key];
|
|
82
|
+
return snapshot;
|
|
83
|
+
});
|
|
84
|
+
payloadWatchStop = watch(
|
|
85
|
+
payloadSnapshot,
|
|
86
|
+
(newSnapshot, oldSnapshot) => {
|
|
87
|
+
const fieldsToValidate = Object.keys(internalSchema.value).filter((name) => {
|
|
88
|
+
const fieldState = fieldsStates.value[name];
|
|
89
|
+
return fieldState && newSnapshot[name] !== oldSnapshot?.[name] && hasModeIncludes(["aggressive", "lazy", "progressive"], fieldState.mode);
|
|
64
90
|
});
|
|
91
|
+
if (fieldsToValidate.length > 0) {
|
|
92
|
+
const processValidations = createValidationProcessor(
|
|
93
|
+
fieldsToValidate,
|
|
94
|
+
fieldsStates,
|
|
95
|
+
payload,
|
|
96
|
+
internalSchema,
|
|
97
|
+
isSubmitted
|
|
98
|
+
);
|
|
99
|
+
typeof requestIdleCallback < "u" ? requestIdleCallback(processValidations, { timeout: 100 }) : nextTick(processValidations);
|
|
100
|
+
}
|
|
65
101
|
},
|
|
66
|
-
{ deep:
|
|
102
|
+
{ deep: !0 }
|
|
67
103
|
);
|
|
68
|
-
watchedPayloadStopFunctions.push(watchStopFunc);
|
|
69
|
-
}
|
|
70
|
-
function addFieldsValidationWatch() {
|
|
71
|
-
for (const watchStopFunc of watchedPayloadStopFunctions)
|
|
72
|
-
watchStopFunc();
|
|
73
|
-
for (const name of Object.keys(internalSchema.value))
|
|
74
|
-
addFieldValidationWatch(name);
|
|
75
104
|
}
|
|
76
105
|
function handleSubmit(successCallback, enableScrollOrSelector) {
|
|
77
106
|
return async (event) => {
|
|
@@ -96,7 +125,7 @@ function useFormValidator({ schema, defaultValues, model, options }) {
|
|
|
96
125
|
errorMessages,
|
|
97
126
|
isSubmitted
|
|
98
127
|
};
|
|
99
|
-
return instance.formContexts ??= /* @__PURE__ */ new Map(), instance.formContexts.set(opts.identifier, context), provide(opts.identifier, context),
|
|
128
|
+
return instance.formContexts ??= /* @__PURE__ */ new Map(), instance.formContexts.set(opts.identifier, context), provide(opts.identifier, context), setupOptimizedWatch(), {
|
|
100
129
|
identifier: opts.identifier,
|
|
101
130
|
isDirty,
|
|
102
131
|
isSubmitting,
|
|
@@ -1,4 +1,111 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
|
+
class IdleTimeout {
|
|
3
|
+
constructor(callback, options) {
|
|
4
|
+
this.callback = callback, this.options = {
|
|
5
|
+
...this.defaultOptions,
|
|
6
|
+
...options
|
|
7
|
+
}, isClient() && this.start();
|
|
8
|
+
}
|
|
9
|
+
defaultOptions = {
|
|
10
|
+
element: void 0,
|
|
11
|
+
timeout: 60 * 1e3 * 5,
|
|
12
|
+
// 5 minutes
|
|
13
|
+
once: !1,
|
|
14
|
+
immediate: !0
|
|
15
|
+
};
|
|
16
|
+
options;
|
|
17
|
+
timeoutHandler;
|
|
18
|
+
isIdle = !1;
|
|
19
|
+
isDestroy = !1;
|
|
20
|
+
startTime = 0;
|
|
21
|
+
remainingTime = 0;
|
|
22
|
+
lastClientX = -1;
|
|
23
|
+
lastClientY = -1;
|
|
24
|
+
eventNames = [
|
|
25
|
+
"DOMMouseScroll",
|
|
26
|
+
"mousedown",
|
|
27
|
+
"mousemove",
|
|
28
|
+
"mousewheel",
|
|
29
|
+
"MSPointerDown",
|
|
30
|
+
"MSPointerMove",
|
|
31
|
+
"keydown",
|
|
32
|
+
"touchmove",
|
|
33
|
+
"touchstart",
|
|
34
|
+
"wheel",
|
|
35
|
+
"click"
|
|
36
|
+
];
|
|
37
|
+
get element() {
|
|
38
|
+
return this.options.element ?? document.body;
|
|
39
|
+
}
|
|
40
|
+
start() {
|
|
41
|
+
if (!isClient()) {
|
|
42
|
+
console.warn("[IdleTimeout](start) you should run this method on client side");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const eventName of this.eventNames)
|
|
46
|
+
this.element.addEventListener(eventName, this.handleEvent);
|
|
47
|
+
this.resetTimeout(), this.options.immediate && this.callback({ isIdle: !1, instance: this });
|
|
48
|
+
}
|
|
49
|
+
pause() {
|
|
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
|
+
}
|
|
53
|
+
resume() {
|
|
54
|
+
this.remainingTime <= 0 || (this.resetTimeout(), this.callback({ isIdle: this.isIdle, instance: this }), this.remainingTime = 0);
|
|
55
|
+
}
|
|
56
|
+
reset() {
|
|
57
|
+
this.isDestroy = !1, this.isIdle = !1, this.remainingTime = 0, this.resetTimeout(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
58
|
+
}
|
|
59
|
+
destroy() {
|
|
60
|
+
if (!isClient()) {
|
|
61
|
+
console.warn("[IdleTimeout](destroy) you should run this method on client side");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.isDestroy = !0;
|
|
65
|
+
for (const eventName of this.eventNames)
|
|
66
|
+
this.element.removeEventListener(eventName, this.handleEvent);
|
|
67
|
+
this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
68
|
+
}
|
|
69
|
+
resetTimeout() {
|
|
70
|
+
this.isIdle = !1, this.timeoutHandler && (clearTimeout(this.timeoutHandler), this.timeoutHandler = void 0), this.timeoutHandler = setTimeout(
|
|
71
|
+
this.handleTimeout.bind(this),
|
|
72
|
+
this.remainingTime || this.options.timeout
|
|
73
|
+
), this.startTime = Date.now();
|
|
74
|
+
}
|
|
75
|
+
handleEvent = (event) => {
|
|
76
|
+
try {
|
|
77
|
+
if (this.remainingTime > 0)
|
|
78
|
+
return;
|
|
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
|
+
return;
|
|
83
|
+
this.lastClientX = clientX, this.lastClientY = clientY;
|
|
84
|
+
}
|
|
85
|
+
this.resetTimeout(), this.callback({ isIdle: this.isIdle, eventType: event.type, instance: this });
|
|
86
|
+
} catch (error) {
|
|
87
|
+
throw new Error(`[IdleTimeout](handleEvent) ${error}`);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
handleTimeout() {
|
|
91
|
+
this.isIdle = !0, this.callback({ isIdle: this.isIdle, instance: this }), this.options.once && this.destroy();
|
|
92
|
+
}
|
|
93
|
+
get destroyed() {
|
|
94
|
+
return this.isDestroy;
|
|
95
|
+
}
|
|
96
|
+
get timeout() {
|
|
97
|
+
return this.options.timeout;
|
|
98
|
+
}
|
|
99
|
+
set timeout(value) {
|
|
100
|
+
this.options.timeout = value;
|
|
101
|
+
}
|
|
102
|
+
get idle() {
|
|
103
|
+
return this.isIdle;
|
|
104
|
+
}
|
|
105
|
+
set idle(value) {
|
|
106
|
+
value ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
107
|
+
}
|
|
108
|
+
}
|
|
2
109
|
function useIdleTimeout({
|
|
3
110
|
callback,
|
|
4
111
|
options
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { inject } from "vue";
|
|
2
|
-
function useInjectStrict(key, fallback) {
|
|
2
|
+
function useInjectStrict(key, fallback, errorMessage) {
|
|
3
3
|
const resolved = inject(key, fallback);
|
|
4
4
|
if (!resolved)
|
|
5
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${key.toString()}`);
|
|
5
|
+
throw new TypeError(errorMessage || `[maz-ui](injectStrict) Could not resolve ${key.toString()}`);
|
|
6
6
|
return resolved;
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
@@ -1,42 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
function levenshteinDistance(string1, string2) {
|
|
4
|
-
const length1 = string1.length, length2 = string2.length, matrix = [];
|
|
5
|
-
for (let index = 0; index <= length1; index++)
|
|
6
|
-
matrix[index] = [index];
|
|
7
|
-
for (let index = 0; index <= length2; index++)
|
|
8
|
-
matrix[0][index] = index;
|
|
9
|
-
for (let index = 1; index <= length1; index++)
|
|
10
|
-
for (let index_ = 1; index_ <= length2; index_++) {
|
|
11
|
-
const cost = string1[index - 1] === string2[index_ - 1] ? 0 : 1;
|
|
12
|
-
matrix[index][index_] = Math.min(
|
|
13
|
-
matrix[index - 1][index_] + 1,
|
|
14
|
-
matrix[index][index_ - 1] + 1,
|
|
15
|
-
matrix[index - 1][index_ - 1] + cost
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
return matrix[length1][length2];
|
|
19
|
-
}
|
|
20
|
-
function getMatchingScore(string1, string2) {
|
|
21
|
-
const distance = levenshteinDistance(string1, string2), maxLength = Math.max(string1.length, string2.length);
|
|
22
|
-
return 1 - distance / maxLength;
|
|
23
|
-
}
|
|
24
|
-
function getMatchingResults(string1, string2, threshold = 0.75) {
|
|
25
|
-
return getMatchingScore(string1, string2) >= threshold;
|
|
26
|
-
}
|
|
27
|
-
function useStringMatching(string1, string2, threshold = 0.75) {
|
|
28
|
-
const _string1 = computed(
|
|
29
|
-
() => normalizeString(toValue(string1))
|
|
30
|
-
), _string2 = computed(
|
|
31
|
-
() => normalizeString(toValue(string2))
|
|
32
|
-
), _threshold = computed(() => toValue(threshold)), score = computed(() => getMatchingScore(_string1.value, _string2.value));
|
|
33
|
-
return {
|
|
34
|
-
isMatching: computed(
|
|
35
|
-
() => getMatchingResults(_string1.value, _string2.value, _threshold.value)
|
|
36
|
-
),
|
|
37
|
-
score
|
|
38
|
-
};
|
|
39
|
-
}
|
|
1
|
+
import { u } from "../chunks/useStringMatching.Ba1yCuA4.js";
|
|
2
|
+
import "vue";
|
|
40
3
|
export {
|
|
41
|
-
useStringMatching
|
|
4
|
+
u as useStringMatching
|
|
42
5
|
};
|
|
@@ -1,5 +1,81 @@
|
|
|
1
|
-
import { S as Swipe } from "../chunks/swipeHandler.8emelhOL.js";
|
|
2
1
|
import { ref, computed, toValue } from "vue";
|
|
2
|
+
const defaultOptions = {
|
|
3
|
+
preventDefaultOnTouchMove: !1,
|
|
4
|
+
preventDefaultOnMouseWheel: !1,
|
|
5
|
+
threshold: 50,
|
|
6
|
+
immediate: !1,
|
|
7
|
+
triggerOnEnd: !1
|
|
8
|
+
};
|
|
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
|
+
}
|
|
13
|
+
element;
|
|
14
|
+
xStart;
|
|
15
|
+
yStart;
|
|
16
|
+
xEnd;
|
|
17
|
+
yEnd;
|
|
18
|
+
xDiff;
|
|
19
|
+
yDiff;
|
|
20
|
+
onToucheStartCallback;
|
|
21
|
+
onToucheMoveCallback;
|
|
22
|
+
onToucheEndCallback;
|
|
23
|
+
onMouseWheelCallback;
|
|
24
|
+
start;
|
|
25
|
+
stop;
|
|
26
|
+
options;
|
|
27
|
+
startListening() {
|
|
28
|
+
this.setElement(this.options.element), this.element?.addEventListener("touchstart", this.onToucheStartCallback, { passive: !0 }), this.element?.addEventListener("touchmove", this.onToucheMoveCallback, { passive: !0 }), this.options.triggerOnEnd && this.element?.addEventListener("touchend", this.onToucheEndCallback, { passive: !0 }), this.options.preventDefaultOnMouseWheel && this.element?.addEventListener("mousewheel", this.onMouseWheelCallback, { passive: !1 });
|
|
29
|
+
}
|
|
30
|
+
stopListening() {
|
|
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
|
+
}
|
|
33
|
+
setElement(element) {
|
|
34
|
+
if (!element) {
|
|
35
|
+
console.error(
|
|
36
|
+
"[maz-ui][SwipeHandler](setElement) Element should be provided. Its can be a string selector or an HTMLElement"
|
|
37
|
+
);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (typeof element == "string") {
|
|
41
|
+
const foundElement = document.querySelector(element);
|
|
42
|
+
if (!(foundElement instanceof HTMLElement)) {
|
|
43
|
+
console.error("[maz-ui][SwipeHandler](setElement) String selector for element is not found");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this.element = foundElement;
|
|
47
|
+
} else
|
|
48
|
+
this.element = element;
|
|
49
|
+
}
|
|
50
|
+
handleMouseWheel(event) {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
toucheStartHandler(event) {
|
|
54
|
+
this.xStart = event.touches[0].clientX, this.yStart = event.touches[0].clientY, this.emitValuesChanged();
|
|
55
|
+
}
|
|
56
|
+
emitValuesChanged() {
|
|
57
|
+
this.options.onValuesChanged?.({
|
|
58
|
+
xStart: this.xStart,
|
|
59
|
+
yStart: this.yStart,
|
|
60
|
+
xEnd: this.xEnd,
|
|
61
|
+
yEnd: this.yEnd,
|
|
62
|
+
xDiff: this.xDiff,
|
|
63
|
+
yDiff: this.yDiff
|
|
64
|
+
});
|
|
65
|
+
}
|
|
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
|
+
}
|
|
69
|
+
handleTouchEnd(event) {
|
|
70
|
+
this.runCallbacks(event), this.emitValuesChanged();
|
|
71
|
+
}
|
|
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
|
+
}
|
|
75
|
+
resetValues() {
|
|
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
|
+
}
|
|
78
|
+
}
|
|
3
79
|
function useSwipe(options) {
|
|
4
80
|
const xDiff = ref(), yDiff = ref(), xStart = ref(), xEnd = ref(), yStart = ref(), yEnd = ref(), element = computed(() => toValue(options.element)), swiper = new Swipe({
|
|
5
81
|
...options,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useInjectStrict } from "./useInjectStrict.js";
|
|
2
2
|
function useToast() {
|
|
3
|
-
const toast = useInjectStrict("mazToast");
|
|
3
|
+
const toast = useInjectStrict("mazToast", void 0, "[maz-ui](useToast) ToastPlugin is not installed");
|
|
4
4
|
return {
|
|
5
5
|
message: toast.message.bind(toast),
|
|
6
6
|
success: toast.success.bind(toast),
|
|
@@ -1,4 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
|
|
2
|
+
class UserVisibility {
|
|
3
|
+
constructor(callback, options) {
|
|
4
|
+
this.callback = callback, this.options = {
|
|
5
|
+
...this.defaultOptions,
|
|
6
|
+
...options
|
|
7
|
+
}, this.eventHandlerFunction = this.eventHandler.bind(this), isClient() && this.start();
|
|
8
|
+
}
|
|
9
|
+
eventHandlerFunction;
|
|
10
|
+
event = "visibilitychange";
|
|
11
|
+
timeoutHandler;
|
|
12
|
+
options;
|
|
13
|
+
defaultOptions = {
|
|
14
|
+
timeout: 5e3,
|
|
15
|
+
once: !1,
|
|
16
|
+
immediate: !0
|
|
17
|
+
};
|
|
18
|
+
isVisible = !1;
|
|
19
|
+
start() {
|
|
20
|
+
if (!isClient()) {
|
|
21
|
+
console.warn("[UserVisibility](start) you should run this method on client side");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.options.immediate && this.emitCallback(), this.addEventListener();
|
|
25
|
+
}
|
|
26
|
+
emitCallback() {
|
|
27
|
+
this.isVisible = document.visibilityState === "visible", this.callback({ isVisible: this.isVisible }), this.options.once && this.destroy();
|
|
28
|
+
}
|
|
29
|
+
eventHandler() {
|
|
30
|
+
document.visibilityState === "visible" && !this.isVisible ? (this.clearTimeout(), this.emitCallback()) : document.visibilityState === "hidden" && this.initTimeout();
|
|
31
|
+
}
|
|
32
|
+
clearTimeout() {
|
|
33
|
+
this.timeoutHandler && (clearTimeout(this.timeoutHandler), this.timeoutHandler = void 0);
|
|
34
|
+
}
|
|
35
|
+
initTimeout() {
|
|
36
|
+
this.clearTimeout(), this.timeoutHandler = setTimeout(this.emitCallback.bind(this), this.options.timeout);
|
|
37
|
+
}
|
|
38
|
+
addEventListener() {
|
|
39
|
+
document.addEventListener(this.event, this.eventHandlerFunction);
|
|
40
|
+
}
|
|
41
|
+
removeEventListener() {
|
|
42
|
+
document.removeEventListener(this.event, this.eventHandlerFunction);
|
|
43
|
+
}
|
|
44
|
+
destroy() {
|
|
45
|
+
this.removeEventListener(), this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
2
48
|
function useUserVisibility({
|
|
3
49
|
callback,
|
|
4
50
|
options
|
|
@@ -2,7 +2,7 @@ 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 = isClient() ?
|
|
5
|
+
internalWindow = isClient() ? globalThis : void 0,
|
|
6
6
|
initialWidth = Number.POSITIVE_INFINITY,
|
|
7
7
|
initialHeight = Number.POSITIVE_INFINITY,
|
|
8
8
|
includeScrollbar = !0
|
package/dist/css/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer maz-ui-reset, maz-ui-theme, maz-ui-animations, maz-ui-utilities;@layer maz-ui-reset{.m-reset-css,.m-reset-css *,.m-reset-css:after,.m-reset-css:before{border:0 solid;box-sizing:border-box}.m-reset-css button,.m-reset-css:is(button){background-color:inherit;padding:inherit}.m-reset-css button,.m-reset-css input,.m-reset-css optgroup,.m-reset-css select,.m-reset-css textarea,.m-reset-css:is(button),.m-reset-css:is(input),.m-reset-css:is(optgroup),.m-reset-css:is(select),.m-reset-css:is(textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0}}@layer maz-ui-utilities{:root{--maz-container-padding-mobile:1rem;--maz-container-padding-tablet:2rem;--maz-container-padding-desktop:2.5rem;--maz-container-padding-value:var(--maz-container-padding-mobile);--maz-container-width:calc(100% - var(--maz-container-padding-value)*2);--maz-container-padding:calc(50% - var(--maz-container-width)/2);--maz-container-max-width:1440px}@media only screen and (width >= 1520px){:root{--maz-container-width:var(--maz-container-max-width)}}@media (min-width:576px){:root{--maz-container-padding-value:var(--maz-container-padding-tablet)}}@media (min-width:1024px){:root{--maz-container-padding-value:var(--maz-container-padding-desktop)}}}@layer maz-ui-animations{.maz-scale-enter-active,.maz-scale-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-enter-from,.maz-scale-leave-to{opacity:.4;transform:scale(0);z-index:1}.maz-scale-fade-enter-active,.maz-scale-fade-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-fade-enter-from,.maz-scale-fade-leave-to{opacity:0;transform:scale(.5);z-index:1}.maz-scale-loading-enter-active,.maz-scale-loading-leave-active{opacity:1;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-scale-loading-enter-active .app-loader__content,.maz-scale-loading-leave-active .app-loader__content{opacity:1;transform:scale(1);transition:all .5s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-loading-enter-from .app-loader__content,.maz-scale-loading-leave-to .app-loader__content{opacity:.4;transform:scale(0);z-index:1}.maz-scale-loading-enter-from,.maz-scale-loading-leave-to{opacity:0;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-slidevnext-enter-active,.maz-slidevnext-leave-active,.maz-slidevprev-enter-active,.maz-slidevprev-leave-active{position:absolute;transition:all .2s}.maz-slidevnext-enter-from,.maz-slidevprev-leave-to{opacity:0;transform:translateY(100%)}.maz-slidevnext-leave-to,.maz-slidevprev-enter-from{opacity:0;transform:translateY(-100%)}.maz-slide-enter-active,.maz-slide-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slide-enter-from,.maz-slide-leave-to{opacity:0;transform:translateY(-20px);z-index:998}.maz-slideinvert-enter-active,.maz-slideinvert-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slideinvert-enter-from,.maz-slideinvert-leave-to{opacity:0;transform:translateY(40px);z-index:998}.maz-tags-enter-active,.maz-tags-leave-active{opacity:1;transform:translateX(0);transition:all .2s ease-in-out}.maz-tags-enter-from,.maz-tags-leave-to{opacity:0;transform:translateX(-100%);transition:all .2s ease-in-out}.maz-tags-invert-enter-active,.maz-tags-invert-leave-active{opacity:1;transform:translateX(0);transition:transform .2s,opacity .2s}.maz-tags-invert-enter-from,.maz-tags-invert-leave-to{opacity:0;transform:translateX(100%)}.maz-expand-enter-active,.maz-expand-leave-active{overflow:hidden;transition:all .2s ease-in-out;transition-property:opacity,height}.maz-expand-enter-from,.maz-expand-leave-to{height:0;opacity:0}.maz-tab-transition-enter-from{transform:translate(100%)}.maz-tab-transition-leave,.maz-tab-transition-leave-active{position:absolute!important;top:0}.maz-tab-transition-leave-to{position:absolute!important;transform:translate(-100%)}.maz-tab-reverse-transition-enter-from{transform:translate(-100%)}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-active{position:absolute!important;top:0}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-to{position:absolute!important;top:0;transform:translate(100%)}@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}}*,:after,:before{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }::backdrop{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }.maz-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.maz-invisible{visibility:hidden}.\!maz-absolute{position:absolute!important}.maz-relative{position:relative}.\!maz-my-0{margin-bottom:0!important;margin-top:0!important}.maz-ml-2{margin-left:.5rem}.maz-flex{display:flex}.maz-inline-flex{display:inline-flex}.maz-table{display:table}.maz-hidden{display:none}.maz-size-5{height:1.25rem;width:1.25rem}.maz-size-6{height:1.5rem;width:1.5rem}.maz-size-8{height:2rem;width:2rem}.maz-size-full{height:100%;width:100%}.maz-h-5{height:1.25rem}.maz-h-full{height:100%}.maz-w-5{width:1.25rem}.maz-w-full{width:100%}.maz-min-w-0{min-width:0}.maz-max-w-full{max-width:100%}.maz-max-w-xs{max-width:20rem}.maz-flex-1{flex:1 1 0%}.maz-flex-none{flex:none}.-maz-rotate-180{--maz-tw-rotate:-180deg}.-maz-rotate-180,.maz-rotate-180{transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y)) rotate(var(--maz-tw-rotate)) skewX(var(--maz-tw-skew-x)) skewY(var(--maz-tw-skew-y)) scaleX(var(--maz-tw-scale-x)) scaleY(var(--maz-tw-scale-y))}.maz-rotate-180{--maz-tw-rotate:180deg}.maz-flex-col{flex-direction:column}.maz-items-center{align-items:center}.maz-justify-end{justify-content:flex-end}.maz-justify-between{justify-content:space-between}.maz-gap-2{gap:.5rem}.maz-space-x-2>:not([hidden])~:not([hidden]){--maz-tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--maz-tw-space-x-reverse)));margin-right:calc(.5rem*var(--maz-tw-space-x-reverse))}.maz-overflow-hidden{overflow:hidden}.maz-overflow-x-auto{overflow-x:auto}.maz-truncate{overflow:hidden;text-overflow:ellipsis}.maz-truncate,.maz-whitespace-nowrap{white-space:nowrap}.maz-whitespace-pre-wrap{white-space:pre-wrap}.maz-break-words{overflow-wrap:break-word}.maz-rounded{border-radius:var(--maz-radius)}.maz-rounded-xl{border-radius:calc(var(--maz-radius) + 8px)}.maz-rounded-t{border-top-left-radius:var(--maz-radius);border-top-right-radius:var(--maz-radius)}.maz-border{border-width:var(--maz-border-width)}.maz-border-b{border-bottom-width:var(--maz-border-width)}.maz-border-t{border-top-width:var(--maz-border-width)}.maz-border-solid{border-style:solid}.\!maz-border-destructive{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-success{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-warning{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))!important}.maz-border-accent{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-accent)/var(--maz-tw-border-opacity,1))}.maz-border-contrast{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-contrast)/var(--maz-tw-border-opacity,1))}.maz-border-destructive{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))}.maz-border-divider{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1))}.maz-border-divider-400{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border-400)/var(--maz-tw-border-opacity,1))}.maz-border-info{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-info)/var(--maz-tw-border-opacity,1))}.maz-border-primary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-primary)/var(--maz-tw-border-opacity,1))}.maz-border-secondary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-secondary)/var(--maz-tw-border-opacity,1))}.maz-border-success{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))}.maz-border-transparent{border-color:transparent}.maz-border-warning{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))}.maz-bg-contrast-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-contrast-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-destructive-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-destructive-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-info-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-info-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-success-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-success-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-surface-400{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.maz-bg-warning-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-warning-700)/var(--maz-tw-bg-opacity,1))}.maz-p-2{padding:.5rem}.maz-p-3{padding:.75rem}.maz-p-4{padding:1rem}.maz-text-center{text-align:center}.maz-text-start{text-align:start}.maz-text-end{text-align:end}.maz-text-2xl{font-size:1.5rem;line-height:2rem}.maz-text-3xl{font-size:1.875rem;line-height:2.25rem}.maz-text-base{font-size:1rem;line-height:1.5rem}.maz-text-lg{font-size:1.125rem;line-height:1.75rem}.maz-text-sm{font-size:.875rem;line-height:1.25rem}.maz-text-xl{font-size:1.25rem;line-height:1.75rem}.maz-text-xs{font-size:.75rem;line-height:1rem}.maz-font-semibold{font-weight:600}.maz-text-destructive-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))}.maz-text-foreground{--maz-tw-text-opacity:1;color:hsl(var(--maz-foreground)/var(--maz-tw-text-opacity,1))}.maz-text-muted{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.maz-text-success-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))}.maz-text-warning-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))}.maz-shadow-elevation{--maz-tw-shadow-color:hsl(var(--maz-shadow)/1);--maz-tw-shadow:var(--maz-tw-shadow-colored)}.maz-drop-shadow-md{--maz-tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--maz-tw-blur) var(--maz-tw-brightness) var(--maz-tw-contrast) var(--maz-tw-grayscale) var(--maz-tw-hue-rotate) var(--maz-tw-invert) var(--maz-tw-saturate) var(--maz-tw-sepia) var(--maz-tw-drop-shadow)}.maz-flex-center{align-items:center;justify-content:center}.maz-padded-container{padding-inline:var(--maz-container-padding);width:100%}.maz-group:hover .group-hover\:maz-block{display:block}@media (min-width:640px){.tab-s\:maz-block{display:block}}
|
|
1
|
+
@layer maz-ui-reset, maz-ui-theme, maz-ui-animations, maz-ui-utilities;@layer maz-ui-reset{.m-reset-css,.m-reset-css *,.m-reset-css:after,.m-reset-css:before{border:0 solid;box-sizing:border-box}.m-reset-css button,.m-reset-css:is(button){background-color:inherit;padding:inherit}.m-reset-css button,.m-reset-css input,.m-reset-css optgroup,.m-reset-css select,.m-reset-css textarea,.m-reset-css:is(button),.m-reset-css:is(input),.m-reset-css:is(optgroup),.m-reset-css:is(select),.m-reset-css:is(textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0}}@layer maz-ui-utilities{:root{--maz-container-padding-mobile:1rem;--maz-container-padding-tablet:2rem;--maz-container-padding-desktop:2.5rem;--maz-container-padding-value:var(--maz-container-padding-mobile);--maz-container-width:calc(100% - var(--maz-container-padding-value)*2);--maz-container-padding:calc(50% - var(--maz-container-width)/2);--maz-container-max-width:1440px}@media only screen and (width >= 1520px){:root{--maz-container-width:var(--maz-container-max-width)}}@media (min-width:576px){:root{--maz-container-padding-value:var(--maz-container-padding-tablet)}}@media (min-width:1024px){:root{--maz-container-padding-value:var(--maz-container-padding-desktop)}}}@layer maz-ui-animations{.maz-scale-enter-active,.maz-scale-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-enter-from,.maz-scale-leave-to{opacity:.4;transform:scale(0);z-index:1}.maz-scale-fade-enter-active,.maz-scale-fade-leave-active{opacity:1;transition:all .2s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-fade-enter-from,.maz-scale-fade-leave-to{opacity:0;transform:scale(.5);z-index:1}.maz-scale-loading-enter-active,.maz-scale-loading-leave-active{opacity:1;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-scale-loading-enter-active .app-loader__content,.maz-scale-loading-leave-active .app-loader__content{opacity:1;transform:scale(1);transition:all .5s cubic-bezier(.4,.52,.26,.9);z-index:1}.maz-scale-loading-enter-from .app-loader__content,.maz-scale-loading-leave-to .app-loader__content{opacity:.4;transform:scale(0);z-index:1}.maz-scale-loading-enter-from,.maz-scale-loading-leave-to{opacity:0;transition:all .5s cubic-bezier(.4,.52,.26,.9)}.maz-slidevnext-enter-active,.maz-slidevnext-leave-active,.maz-slidevprev-enter-active,.maz-slidevprev-leave-active{position:absolute;transition:all .2s}.maz-slidevnext-enter-from,.maz-slidevprev-leave-to{opacity:0;transform:translateY(100%)}.maz-slidevnext-leave-to,.maz-slidevprev-enter-from{opacity:0;transform:translateY(-100%)}.maz-slide-enter-active,.maz-slide-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slide-enter-from,.maz-slide-leave-to{opacity:0;transform:translateY(-20px);z-index:998}.maz-slideinvert-enter-active,.maz-slideinvert-leave-active{opacity:1;transform:translateY(0);transition:all .2s ease-in-out;z-index:998}.maz-slideinvert-enter-from,.maz-slideinvert-leave-to{opacity:0;transform:translateY(40px);z-index:998}.maz-tags-enter-active,.maz-tags-leave-active{opacity:1;transform:translateX(0);transition:all .2s ease-in-out}.maz-tags-enter-from,.maz-tags-leave-to{opacity:0;transform:translateX(-100%);transition:all .2s ease-in-out}.maz-tags-invert-enter-active,.maz-tags-invert-leave-active{opacity:1;transform:translateX(0);transition:transform .2s,opacity .2s}.maz-tags-invert-enter-from,.maz-tags-invert-leave-to{opacity:0;transform:translateX(100%)}.maz-expand-enter-active,.maz-expand-leave-active{overflow:hidden;transition:all .2s ease-in-out;transition-property:opacity,height}.maz-expand-enter-from,.maz-expand-leave-to{height:0;opacity:0}.maz-tab-transition-enter-from{transform:translate(100%)}.maz-tab-transition-leave,.maz-tab-transition-leave-active{position:absolute!important;top:0}.maz-tab-transition-leave-to{position:absolute!important;transform:translate(-100%)}.maz-tab-reverse-transition-enter-from{transform:translate(-100%)}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-active{position:absolute!important;top:0}.maz-tab-reverse-transition-leave,.maz-tab-reverse-transition-leave-to{position:absolute!important;top:0;transform:translate(100%)}@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}}*,:after,:before{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }::backdrop{--maz-tw-border-spacing-x:0;--maz-tw-border-spacing-y:0;--maz-tw-translate-x:0;--maz-tw-translate-y:0;--maz-tw-rotate:0;--maz-tw-skew-x:0;--maz-tw-skew-y:0;--maz-tw-scale-x:1;--maz-tw-scale-y:1;--maz-tw-pan-x: ;--maz-tw-pan-y: ;--maz-tw-pinch-zoom: ;--maz-tw-scroll-snap-strictness:proximity;--maz-tw-gradient-from-position: ;--maz-tw-gradient-via-position: ;--maz-tw-gradient-to-position: ;--maz-tw-ordinal: ;--maz-tw-slashed-zero: ;--maz-tw-numeric-figure: ;--maz-tw-numeric-spacing: ;--maz-tw-numeric-fraction: ;--maz-tw-ring-inset: ;--maz-tw-ring-offset-width:0px;--maz-tw-ring-offset-color:#fff;--maz-tw-ring-color:rgba(59,130,246,.5);--maz-tw-ring-offset-shadow:0 0 #0000;--maz-tw-ring-shadow:0 0 #0000;--maz-tw-shadow:0 0 #0000;--maz-tw-shadow-colored:0 0 #0000;--maz-tw-blur: ;--maz-tw-brightness: ;--maz-tw-contrast: ;--maz-tw-grayscale: ;--maz-tw-hue-rotate: ;--maz-tw-invert: ;--maz-tw-saturate: ;--maz-tw-sepia: ;--maz-tw-drop-shadow: ;--maz-tw-backdrop-blur: ;--maz-tw-backdrop-brightness: ;--maz-tw-backdrop-contrast: ;--maz-tw-backdrop-grayscale: ;--maz-tw-backdrop-hue-rotate: ;--maz-tw-backdrop-invert: ;--maz-tw-backdrop-opacity: ;--maz-tw-backdrop-saturate: ;--maz-tw-backdrop-sepia: ;--maz-tw-contain-size: ;--maz-tw-contain-layout: ;--maz-tw-contain-paint: ;--maz-tw-contain-style: }.maz-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.maz-invisible{visibility:hidden}.\!maz-absolute{position:absolute!important}.maz-relative{position:relative}.\!maz-my-0{margin-bottom:0!important;margin-top:0!important}.maz-ml-2{margin-left:.5rem}.maz-flex{display:flex}.maz-inline-flex{display:inline-flex}.maz-table{display:table}.maz-hidden{display:none}.maz-size-5{height:1.25rem;width:1.25rem}.maz-size-6{height:1.5rem;width:1.5rem}.maz-size-8{height:2rem;width:2rem}.maz-size-full{height:100%;width:100%}.maz-h-5{height:1.25rem}.maz-h-full{height:100%}.maz-w-5{width:1.25rem}.maz-w-full{width:100%}.maz-min-w-0{min-width:0}.maz-max-w-full{max-width:100%}.maz-max-w-xs{max-width:20rem}.maz-flex-1{flex:1 1 0%}.maz-flex-none{flex:none}.-maz-rotate-180{--maz-tw-rotate:-180deg}.-maz-rotate-180,.maz-rotate-180{transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y)) rotate(var(--maz-tw-rotate)) skewX(var(--maz-tw-skew-x)) skewY(var(--maz-tw-skew-y)) scaleX(var(--maz-tw-scale-x)) scaleY(var(--maz-tw-scale-y))}.maz-rotate-180{--maz-tw-rotate:180deg}.maz-flex-col{flex-direction:column}.maz-items-center{align-items:center}.maz-justify-end{justify-content:flex-end}.maz-justify-between{justify-content:space-between}.maz-gap-2{gap:.5rem}.maz-space-x-2>:not([hidden])~:not([hidden]){--maz-tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--maz-tw-space-x-reverse)));margin-right:calc(.5rem*var(--maz-tw-space-x-reverse))}.maz-overflow-hidden{overflow:hidden}.maz-overflow-x-auto{overflow-x:auto}.maz-truncate{overflow:hidden;text-overflow:ellipsis}.maz-truncate,.maz-whitespace-nowrap{white-space:nowrap}.maz-whitespace-pre-wrap{white-space:pre-wrap}.maz-break-words{overflow-wrap:break-word}.maz-rounded{border-radius:var(--maz-radius)}.maz-rounded-xl{border-radius:calc(var(--maz-radius) + 8px)}.maz-rounded-t{border-top-left-radius:var(--maz-radius);border-top-right-radius:var(--maz-radius)}.maz-border{border-width:var(--maz-border-width)}.maz-border-b{border-bottom-width:var(--maz-border-width)}.maz-border-t{border-top-width:var(--maz-border-width)}.maz-border-solid{border-style:solid}.\!maz-border-destructive{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-success{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))!important}.\!maz-border-warning{--maz-tw-border-opacity:1!important;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))!important}.maz-border-accent{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-accent)/var(--maz-tw-border-opacity,1))}.maz-border-contrast{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-contrast)/var(--maz-tw-border-opacity,1))}.maz-border-destructive{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-destructive)/var(--maz-tw-border-opacity,1))}.maz-border-divider{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1))}.maz-border-divider-400{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border-400)/var(--maz-tw-border-opacity,1))}.maz-border-info{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-info)/var(--maz-tw-border-opacity,1))}.maz-border-primary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-primary)/var(--maz-tw-border-opacity,1))}.maz-border-secondary{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-secondary)/var(--maz-tw-border-opacity,1))}.maz-border-success{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-success)/var(--maz-tw-border-opacity,1))}.maz-border-transparent{border-color:transparent}.maz-border-warning{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-warning)/var(--maz-tw-border-opacity,1))}.maz-bg-contrast-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-contrast-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-destructive-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-destructive-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-info-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-info-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-success-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-success-700)/var(--maz-tw-bg-opacity,1))}.maz-bg-surface-400{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.maz-bg-warning-700{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-warning-700)/var(--maz-tw-bg-opacity,1))}.maz-p-2{padding:.5rem}.maz-p-3{padding:.75rem}.maz-p-4{padding:1rem}.maz-text-center{text-align:center}.maz-text-start{text-align:start}.maz-text-end{text-align:end}.maz-text-2xl{font-size:1.5rem;line-height:2rem}.maz-text-3xl{font-size:1.875rem;line-height:2.25rem}.maz-text-base{font-size:1rem;line-height:1.5rem}.maz-text-lg{font-size:1.125rem;line-height:1.75rem}.maz-text-sm{font-size:.875rem;line-height:1.25rem}.maz-text-xl{font-size:1.25rem;line-height:1.75rem}.maz-text-xs{font-size:.75rem;line-height:1rem}.maz-font-semibold{font-weight:600}.\!maz-text-destructive-600{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))!important}.\!maz-text-success-600{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))!important}.\!maz-text-warning-600{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))!important}.maz-text-destructive-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))}.maz-text-foreground{--maz-tw-text-opacity:1;color:hsl(var(--maz-foreground)/var(--maz-tw-text-opacity,1))}.maz-text-muted{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.maz-text-success-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))}.maz-text-warning-600{--maz-tw-text-opacity:1;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))}.maz-shadow-elevation{--maz-tw-shadow-color:hsl(var(--maz-shadow)/1);--maz-tw-shadow:var(--maz-tw-shadow-colored)}.maz-drop-shadow-md{--maz-tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--maz-tw-blur) var(--maz-tw-brightness) var(--maz-tw-contrast) var(--maz-tw-grayscale) var(--maz-tw-hue-rotate) var(--maz-tw-invert) var(--maz-tw-saturate) var(--maz-tw-sepia) var(--maz-tw-drop-shadow)}.maz-flex-center{align-items:center;justify-content:center}.maz-padded-container{padding-inline:var(--maz-container-padding);width:100%}.maz-group:hover .group-hover\:maz-block{display:block}@media (min-width:640px){.tab-s\:maz-block{display:block}}
|
package/dist/directives/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
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 } from "../chunks/fullscreen-img.directive.
|
|
7
|
-
import { d as
|
|
6
|
+
import { d as d2 } from "../chunks/fullscreen-img.directive.Be383en8.js";
|
|
7
|
+
import { d as d3 } from "../chunks/lazy-img.directive.BLFnGqQa.js";
|
|
8
8
|
export {
|
|
9
|
-
vClickOutside,
|
|
10
|
-
vClickOutsideInstall,
|
|
11
|
-
|
|
9
|
+
d as vClickOutside,
|
|
10
|
+
p as vClickOutsideInstall,
|
|
11
|
+
d2 as vFullscreenImg,
|
|
12
12
|
vFullscreenImgInstall,
|
|
13
|
-
|
|
13
|
+
d3 as vLazyImg,
|
|
14
14
|
vLazyImgInstall,
|
|
15
15
|
vTooltip,
|
|
16
16
|
vTooltipInstall,
|