maz-ui 3.11.0 → 3.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazBottomSheet.mjs +80 -44
- package/components/MazBtn.mjs +72 -36
- package/components/MazCard.mjs +78 -42
- package/components/MazCarousel.mjs +77 -41
- package/components/MazChart.mjs +43 -17
- package/components/MazDialog.mjs +79 -44
- package/components/MazDialogPromise.mjs +79 -44
- package/components/MazDrawer.mjs +77 -41
- package/components/MazIcon.mjs +2 -2
- package/components/MazInput.mjs +72 -36
- package/components/MazInputNumber.mjs +72 -36
- package/components/MazInputPrice.mjs +72 -36
- package/components/MazInputTags.mjs +79 -43
- package/components/MazPhoneNumberInput.mjs +75 -39
- package/components/MazPicker.mjs +88 -52
- package/components/MazSelect.mjs +75 -39
- package/components/MazStepper.mjs +2 -2
- package/components/MazTabsBar.mjs +105 -59
- package/components/MazTabsContent.mjs +3 -10
- package/components/MazTabsContentItem.mjs +2 -2
- package/components/MazTextarea.mjs +2 -2
- package/css/main.css +1 -1
- package/modules/index.mjs +9 -4
- package/package.json +23 -13
- package/tailwindcss/tailwind.config.ts +1 -26
- package/{components/MazBtn.d.ts → types/components/MazBtn.vue.d.ts} +19 -0
- package/types/components/MazChart.vue.d.ts +95 -0
- package/{components/MazTabsBar.d.ts → types/components/MazTabsBar.vue.d.ts} +11 -2
- package/types/components/index.d.ts +35 -0
- package/types/modules/composables/aos.d.ts +4 -0
- package/types/modules/composables/idle-timeout.d.ts +8 -0
- package/types/modules/composables/index.d.ts +7 -0
- package/types/modules/composables/instance-uniq-id.d.ts +8 -0
- package/types/modules/composables/theme-handler.d.ts +20 -0
- package/types/modules/composables/toaster.d.ts +4 -0
- package/types/modules/composables/user-visibilty.d.ts +8 -0
- package/types/modules/composables/wait.d.ts +4 -0
- package/types/modules/directives/click-outside.d.ts +10 -0
- package/types/modules/directives/closable.d.ts +4 -0
- package/types/modules/directives/index.d.ts +11 -0
- package/types/modules/directives/v-lazy-img/index.d.ts +8 -0
- package/types/modules/directives/v-lazy-img/lazy-img-handler.d.ts +38 -0
- package/types/modules/directives/v-lazy-img/lazy-img.d.ts +5 -0
- package/types/modules/directives/v-lazy-img/types.d.ts +31 -0
- package/types/modules/directives/v-zoom-img/index.d.ts +7 -0
- package/types/modules/directives/v-zoom-img/style.d.ts +1 -0
- package/types/modules/directives/v-zoom-img/svgs.d.ts +3 -0
- package/types/modules/directives/v-zoom-img/zoom-img.d.ts +2 -0
- package/types/modules/directives/v-zoom-img/zoom-img.handler.d.ts +48 -0
- package/types/modules/filters/capitalize.d.ts +1 -0
- package/types/modules/filters/currency.d.ts +4 -0
- package/types/modules/filters/date.d.ts +1 -0
- package/types/modules/filters/index.d.ts +16 -0
- package/types/modules/filters/number.d.ts +1 -0
- package/types/modules/filters/telephone.d.ts +1 -0
- package/types/modules/helpers/debounce.d.ts +7 -0
- package/types/modules/helpers/idle-timeout/idle-timeout-handler.d.ts +29 -0
- package/types/modules/helpers/idle-timeout/index.d.ts +2 -0
- package/types/modules/helpers/idle-timeout/types.d.ts +12 -0
- package/types/modules/helpers/index.d.ts +9 -0
- package/types/modules/helpers/inject-strict.d.ts +1 -0
- package/types/modules/helpers/is-client.d.ts +1 -0
- package/types/modules/helpers/mount-component.d.ts +13 -0
- package/types/modules/helpers/script-loader.d.ts +19 -0
- package/types/modules/helpers/sleep.d.ts +1 -0
- package/types/modules/helpers/truthy-filter.d.ts +2 -0
- package/types/modules/helpers/user-visibility/index.d.ts +2 -0
- package/types/modules/helpers/user-visibility/types.d.ts +10 -0
- package/types/modules/helpers/user-visibility/user-visibility-handler.d.ts +19 -0
- package/types/modules/index.d.ts +5 -0
- package/types/modules/plugins/aos/index.d.ts +35 -0
- package/types/modules/plugins/index.d.ts +3 -0
- package/types/modules/plugins/toaster/MazToast.vue.d.ts +83 -0
- package/types/modules/plugins/toaster/index.d.ts +10 -0
- package/types/modules/plugins/toaster/timer.d.ts +11 -0
- package/types/modules/plugins/toaster/toaster-handler.d.ts +16 -0
- package/types/modules/plugins/toaster/types.d.ts +6 -0
- package/types/modules/plugins/wait/index.d.ts +14 -0
- package/types/modules/plugins/wait/utils.d.ts +7 -0
- package/types/nuxt/index.d.ts +41 -0
- package/types/nuxt/runtime/composables/use-toast.d.ts +2 -0
- package/types/nuxt/runtime/plugins/toaster.d.ts +7 -0
- package/types/tailwindcss/tailwind.config.d.ts +3 -0
- package/types/tailwindcss/utils/colors.d.ts +20 -0
- package/types/tailwindcss/variables/breakpoints.d.ts +14 -0
- package/types/tailwindcss/variables/colors.d.ts +29 -0
- package/types/tailwindcss/variables/utilities.d.ts +19 -0
- package/types/tailwindcss/variables/z-indexes.d.ts +14 -0
- package/components/MazAvatar.umd.js +0 -2
- package/components/MazBackdrop.umd.js +0 -2
- package/components/MazBadge.umd.js +0 -2
- package/components/MazBottomSheet.umd.js +0 -2
- package/components/MazBtn.umd.js +0 -2
- package/components/MazCard.umd.js +0 -2
- package/components/MazCarousel.umd.js +0 -2
- package/components/MazChart.umd.js +0 -1
- package/components/MazCheckbox.umd.js +0 -2
- package/components/MazDialog.umd.js +0 -2
- package/components/MazDialogPromise.umd.js +0 -2
- package/components/MazDrawer.umd.js +0 -2
- package/components/MazDropzone.umd.js +0 -2
- package/components/MazGallery.umd.js +0 -2
- package/components/MazIcon.umd.js +0 -2
- package/components/MazInput.umd.js +0 -2
- package/components/MazInputNumber.umd.js +0 -2
- package/components/MazInputPrice.umd.js +0 -2
- package/components/MazInputTags.umd.js +0 -2
- package/components/MazLazyImg.umd.js +0 -2
- package/components/MazPhoneNumberInput.umd.js +0 -2
- package/components/MazPicker.umd.js +0 -2
- package/components/MazRadioButtons.umd.js +0 -2
- package/components/MazSelect.umd.js +0 -2
- package/components/MazSlider.umd.js +0 -2
- package/components/MazSpinner.umd.js +0 -2
- package/components/MazStepper.umd.js +0 -2
- package/components/MazSwitch.umd.js +0 -2
- package/components/MazTabs.umd.js +0 -1
- package/components/MazTabsBar.umd.js +0 -2
- package/components/MazTabsContent.umd.js +0 -2
- package/components/MazTabsContentItem.umd.js +0 -2
- package/components/MazTextarea.umd.js +0 -2
- package/components/MazTransitionExpand.umd.js +0 -2
- package/components/index.d.ts +0 -35
- package/modules/index.d.ts +0 -338
- package/modules/index.umd.js +0 -2
- /package/{components/MazAvatar.d.ts → types/components/MazAvatar.vue.d.ts} +0 -0
- /package/{components/MazBackdrop.d.ts → types/components/MazBackdrop.vue.d.ts} +0 -0
- /package/{components/MazBadge.d.ts → types/components/MazBadge.vue.d.ts} +0 -0
- /package/{components/MazBottomSheet.d.ts → types/components/MazBottomSheet.vue.d.ts} +0 -0
- /package/{components/MazCard.d.ts → types/components/MazCard.vue.d.ts} +0 -0
- /package/{components/MazCarousel.d.ts → types/components/MazCarousel.vue.d.ts} +0 -0
- /package/{components/MazCheckbox.d.ts → types/components/MazCheckbox.vue.d.ts} +0 -0
- /package/{components/MazDialog.d.ts → types/components/MazDialog.vue.d.ts} +0 -0
- /package/{components → types/components}/MazDialogPromise/use-maz-dialog-promise.d.ts +0 -0
- /package/{components/MazDialogPromise.d.ts → types/components/MazDialogPromise.vue.d.ts} +0 -0
- /package/{components/MazDrawer.d.ts → types/components/MazDrawer.vue.d.ts} +0 -0
- /package/{components/MazDropzone.d.ts → types/components/MazDropzone.vue.d.ts} +0 -0
- /package/{components/MazGallery.d.ts → types/components/MazGallery.vue.d.ts} +0 -0
- /package/{components/MazIcon.d.ts → types/components/MazIcon.vue.d.ts} +0 -0
- /package/{components/MazInput.d.ts → types/components/MazInput.vue.d.ts} +0 -0
- /package/{components/MazInputNumber.d.ts → types/components/MazInputNumber.vue.d.ts} +0 -0
- /package/{components/MazInputPrice.d.ts → types/components/MazInputPrice.vue.d.ts} +0 -0
- /package/{components/MazInputTags.d.ts → types/components/MazInputTags.vue.d.ts} +0 -0
- /package/{components/MazLazyImg.d.ts → types/components/MazLazyImg.vue.d.ts} +0 -0
- /package/{components → types/components}/MazPhoneNumberInput/constantes/locales.d.ts +0 -0
- /package/{components → types/components}/MazPhoneNumberInput/types.d.ts +0 -0
- /package/{components → types/components}/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +0 -0
- /package/{components → types/components}/MazPhoneNumberInput/utils/index.d.ts +0 -0
- /package/{components/MazPhoneNumberInput.d.ts → types/components/MazPhoneNumberInput.vue.d.ts} +0 -0
- /package/{components → types/components}/MazPicker/MazPickerCalendar.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerContainer.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerFooter.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerHeader.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerMonthSwitcher.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerShortcuts.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerTime.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/MazPickerYearSwitcher.vue.d.ts +0 -0
- /package/{components → types/components}/MazPicker/types.d.ts +0 -0
- /package/{components → types/components}/MazPicker/utils.d.ts +0 -0
- /package/{components/MazPicker.d.ts → types/components/MazPicker.vue.d.ts} +0 -0
- /package/{components/MazRadioButtons.d.ts → types/components/MazRadioButtons.vue.d.ts} +0 -0
- /package/{components/MazSelect.d.ts → types/components/MazSelect.vue.d.ts} +0 -0
- /package/{components → types/components}/MazSlider/utils.d.ts +0 -0
- /package/{components/MazSlider.d.ts → types/components/MazSlider.vue.d.ts} +0 -0
- /package/{components/MazSpinner.d.ts → types/components/MazSpinner.vue.d.ts} +0 -0
- /package/{components/MazStepper.d.ts → types/components/MazStepper.vue.d.ts} +0 -0
- /package/{components/MazSwitch.d.ts → types/components/MazSwitch.vue.d.ts} +0 -0
- /package/{components/MazTabs.d.ts → types/components/MazTabs.vue.d.ts} +0 -0
- /package/{components/MazTabsContent.d.ts → types/components/MazTabsContent.vue.d.ts} +0 -0
- /package/{components/MazTabsContentItem.d.ts → types/components/MazTabsContentItem.vue.d.ts} +0 -0
- /package/{components → types/components}/MazTextarea/textarea-autogrow.d.ts +0 -0
- /package/{components/MazTextarea.d.ts → types/components/MazTextarea.vue.d.ts} +0 -0
- /package/{components/MazTransitionExpand.d.ts → types/components/MazTransitionExpand.vue.d.ts} +0 -0
- /package/{components → types/components}/component-list.d.ts +0 -0
- /package/{components → types/components}/types.d.ts +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ClassOptions, LazyImgBinding, vLazyImgOptions } from './types';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export declare const DEFAULT_OPTIONS: ClassOptions;
|
|
4
|
+
export declare class LazyImg {
|
|
5
|
+
private observers;
|
|
6
|
+
private readonly defaultOptions;
|
|
7
|
+
private options;
|
|
8
|
+
private onImgLoadedCallback;
|
|
9
|
+
private onImgErrorCallback;
|
|
10
|
+
private hasImgLoaded;
|
|
11
|
+
constructor(opts?: vLazyImgOptions);
|
|
12
|
+
private loadErrorPhoto;
|
|
13
|
+
private buildOptions;
|
|
14
|
+
private removeClass;
|
|
15
|
+
private addClass;
|
|
16
|
+
private removeAllStateClasses;
|
|
17
|
+
private setBaseClass;
|
|
18
|
+
private imageIsLoading;
|
|
19
|
+
private imageHasNoPhoto;
|
|
20
|
+
private imageIsLoaded;
|
|
21
|
+
private imageHasError;
|
|
22
|
+
private getImageUrl;
|
|
23
|
+
private setPictureSourceUrls;
|
|
24
|
+
private hasBgImgMode;
|
|
25
|
+
private isPictureElement;
|
|
26
|
+
private getImgElement;
|
|
27
|
+
private setDefaultPhoto;
|
|
28
|
+
private addEventListenerToImg;
|
|
29
|
+
private loadImage;
|
|
30
|
+
setImgSrc(el: HTMLElement, src: string): void;
|
|
31
|
+
private handleIntersectionObserver;
|
|
32
|
+
private createObserver;
|
|
33
|
+
private imageHandler;
|
|
34
|
+
private bindUpdateHandler;
|
|
35
|
+
add(el: HTMLElement, binding: LazyImgBinding): Promise<void>;
|
|
36
|
+
update(el: HTMLElement, binding: LazyImgBinding): Promise<void>;
|
|
37
|
+
remove(el: HTMLElement, binding: LazyImgBinding): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const vLazyImg: {
|
|
2
|
+
created(el: HTMLElement, binding: import("vue").DirectiveBinding<import("./types").vLazyImgBinding>): void;
|
|
3
|
+
updated(el: HTMLElement, binding: import("vue").DirectiveBinding<import("./types").vLazyImgBinding>): void;
|
|
4
|
+
unmounted(el: HTMLElement, binding: import("vue").DirectiveBinding<import("./types").vLazyImgBinding>): void;
|
|
5
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DirectiveBinding, ObjectDirective } from 'vue';
|
|
2
|
+
export interface ClassOptions {
|
|
3
|
+
baseClass: string;
|
|
4
|
+
loadingClass: string;
|
|
5
|
+
loadedClass: string;
|
|
6
|
+
errorClass: string;
|
|
7
|
+
noPhotoClass: string;
|
|
8
|
+
noPhoto: boolean;
|
|
9
|
+
noUseErrorPhoto: boolean;
|
|
10
|
+
observerOnce: boolean;
|
|
11
|
+
loadOnce: boolean;
|
|
12
|
+
observerOptions: {
|
|
13
|
+
root?: HTMLElement | null;
|
|
14
|
+
threshold: number;
|
|
15
|
+
rootMargin?: string;
|
|
16
|
+
};
|
|
17
|
+
errorPhoto?: string;
|
|
18
|
+
onLoading?: (el: Element) => unknown;
|
|
19
|
+
onLoaded?: (el: Element) => unknown;
|
|
20
|
+
onError?: (el: Element) => unknown;
|
|
21
|
+
onIntersecting?: (el: Element) => unknown;
|
|
22
|
+
}
|
|
23
|
+
export type vLazyImgOptions = Partial<ClassOptions>;
|
|
24
|
+
interface vLazyImgBindingOptions extends vLazyImgOptions {
|
|
25
|
+
src?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type vLazyImgBinding = string | vLazyImgBindingOptions;
|
|
29
|
+
export type LazyImgBinding = DirectiveBinding<vLazyImgBinding>;
|
|
30
|
+
export type LazyImgDirective = ObjectDirective<HTMLElement, vLazyImgBinding>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const style = "\n.maz-zoom-img {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1rem;\n z-index: 1050;\n background-color: hsla(238, 15%, 40%, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.maz-zoom-img,\n.maz-zoom-img * {\n box-sizing: border-box;\n}\n\n.maz-zoom-img .maz-zoom-img__wrapper {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n min-height: 0;\n max-width: 100%;\n max-height: 100%;\n transition: all 300ms ease-in-out;\n opacity: 0;\n transform: scale(0.5);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {\n opacity: 1;\n transform: scale(1);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: hsla(238, 15%, 40%, 0.7);\n border-radius: 1rem;\n z-index: 2;\n min-width: 60px;\n min-height: 60px;\n}\n.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {\n display: none;\n}\n\n@-webkit-keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {\n animation: spin .6s linear infinite;\n}\n\n.maz-zoom-img img {\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n border-radius: 1rem;\n}\n\n.maz-zoom-img .maz-zoom-btn {\n margin: 0 auto;\n border: none;\n background-color: hsla(0, 0%, 7%, 0.5);\n box-shadow: 0 0 0.5rem 0 hsla(0, 0%, 0%, 0.2);\n height: 2.2rem;\n min-height: 2.2rem;\n width: 2.2rem;\n min-width: 2.2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 2.2rem;\n cursor: pointer;\n flex: 0 0 auto;\n outline: none;\n}\n\n.maz-zoom-img .maz-zoom-btn svg {\n fill: white;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {\n position: absolute;\n left: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {\n position: absolute;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn:hover {\n background-color: hsl(0, 0%, 0%);\n}";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { DirectiveBinding } from 'vue';
|
|
2
|
+
export interface vZoomImgOptions {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
scale?: boolean;
|
|
5
|
+
blur?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface vZoomImgBindingOptions extends vZoomImgOptions {
|
|
8
|
+
src: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
}
|
|
11
|
+
export type vZoomImgBinding = string | vZoomImgBindingOptions;
|
|
12
|
+
export interface BindingData extends DirectiveBinding {
|
|
13
|
+
value: vZoomImgBinding;
|
|
14
|
+
}
|
|
15
|
+
export declare class VueZoomImg {
|
|
16
|
+
private options;
|
|
17
|
+
private loader;
|
|
18
|
+
private wrapper;
|
|
19
|
+
private img;
|
|
20
|
+
private keydownHandler;
|
|
21
|
+
private onImgLoadedCallback;
|
|
22
|
+
private buttonsAdded;
|
|
23
|
+
private defaultOptions;
|
|
24
|
+
private mouseEnterListener;
|
|
25
|
+
private mouseLeaveListener;
|
|
26
|
+
private renderPreviewListener;
|
|
27
|
+
constructor(binding: BindingData);
|
|
28
|
+
private buildOptions;
|
|
29
|
+
get allInstances(): HTMLElement[];
|
|
30
|
+
create(el: HTMLElement): void;
|
|
31
|
+
update(binding: BindingData): void;
|
|
32
|
+
remove(el: HTMLElement): void;
|
|
33
|
+
private renderPreview;
|
|
34
|
+
private onImgLoaded;
|
|
35
|
+
private getLoader;
|
|
36
|
+
private mouseLeave;
|
|
37
|
+
private mouseEnter;
|
|
38
|
+
private keydownLister;
|
|
39
|
+
private getButton;
|
|
40
|
+
private closePreview;
|
|
41
|
+
private getNewInstanceIndex;
|
|
42
|
+
private nextPreviousImage;
|
|
43
|
+
private useNextInstance;
|
|
44
|
+
private addStyle;
|
|
45
|
+
private keyboardEventHandler;
|
|
46
|
+
private imgEventHandler;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalize: (value: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const date: (date: string | number | Date, locale: string, options?: Intl.DateTimeFormatOptions) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
declare const filters: {
|
|
3
|
+
capitalize: (value: string) => string;
|
|
4
|
+
currency: (number: string | number, locale: string, options: import("./currency").FilterCurrencyOptions) => string;
|
|
5
|
+
date: (date: string | number | Date, locale: string, options?: Intl.DateTimeFormatOptions | undefined) => string;
|
|
6
|
+
number: (number: string | number, locale: string, options?: Intl.NumberFormatOptions | undefined) => string;
|
|
7
|
+
};
|
|
8
|
+
export type Filters = typeof filters;
|
|
9
|
+
declare const installFilters: {
|
|
10
|
+
install(app: App): void;
|
|
11
|
+
};
|
|
12
|
+
export { installFilters };
|
|
13
|
+
export * from './capitalize';
|
|
14
|
+
export * from './currency';
|
|
15
|
+
export * from './date';
|
|
16
|
+
export * from './number';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const number: (number: number | string, locale: string, options?: Intl.NumberFormatOptions) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const telephone: (telephone: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type ArgumentTypes<F extends (...args: any[]) => void> = F extends (...args: infer A) => any ? A : never;
|
|
2
|
+
type MethodTypes = {
|
|
3
|
+
cancel: () => void;
|
|
4
|
+
flush: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function debounce<T extends (...args: any[]) => void>(fn: T, wait?: number, callFirst?: boolean): ((...args: ArgumentTypes<T>) => void) & MethodTypes;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IdleTimeoutOptions, IdleTimeoutCallback } from './types';
|
|
2
|
+
export declare class IdleTimeout {
|
|
3
|
+
private readonly callback;
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
private options;
|
|
6
|
+
private timeoutHandler?;
|
|
7
|
+
private isIdle;
|
|
8
|
+
private isDestroy;
|
|
9
|
+
private startTime;
|
|
10
|
+
private remainingTime;
|
|
11
|
+
private lastClientX;
|
|
12
|
+
private lastClientY;
|
|
13
|
+
private eventNames;
|
|
14
|
+
constructor(callback: IdleTimeoutCallback, options?: IdleTimeoutOptions);
|
|
15
|
+
get element(): HTMLElement | Document;
|
|
16
|
+
start(): void;
|
|
17
|
+
pause(): void;
|
|
18
|
+
resume(): void;
|
|
19
|
+
reset(): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
private resetTimeout;
|
|
22
|
+
private handleEvent;
|
|
23
|
+
private handleTimeout;
|
|
24
|
+
get destroyed(): boolean;
|
|
25
|
+
get timeout(): number;
|
|
26
|
+
set timeout(value: number);
|
|
27
|
+
get idle(): boolean;
|
|
28
|
+
set idle(value: boolean);
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type IdleTimeoutCallback = ({ isIdle, eventType, }: {
|
|
2
|
+
isIdle: boolean;
|
|
3
|
+
eventType?: string;
|
|
4
|
+
}) => void;
|
|
5
|
+
export interface IdleTimeoutStrictOption {
|
|
6
|
+
element?: HTMLElement | Document;
|
|
7
|
+
timeout: number;
|
|
8
|
+
once: boolean;
|
|
9
|
+
immediate: boolean;
|
|
10
|
+
ssr: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type IdleTimeoutOptions = Partial<IdleTimeoutStrictOption>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './inject-strict';
|
|
2
|
+
export * from './debounce';
|
|
3
|
+
export * from './truthy-filter';
|
|
4
|
+
export * from './mount-component';
|
|
5
|
+
export * from './idle-timeout';
|
|
6
|
+
export * from './user-visibility';
|
|
7
|
+
export * from './sleep';
|
|
8
|
+
export * from './is-client';
|
|
9
|
+
export * from './script-loader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function injectStrict<T>(key: string, fallback?: T): NonNullable<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isClient(): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { App, Component } from 'vue';
|
|
2
|
+
export declare function mount(component: Component, { props, children, element, app, }?: {
|
|
3
|
+
props?: Record<string, unknown>;
|
|
4
|
+
children?: unknown;
|
|
5
|
+
app?: App;
|
|
6
|
+
element?: HTMLElement;
|
|
7
|
+
}): {
|
|
8
|
+
vNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}>;
|
|
11
|
+
destroy: () => void;
|
|
12
|
+
el: HTMLElement | undefined;
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ScriptLoaderOptions {
|
|
2
|
+
identifier: string;
|
|
3
|
+
src: string;
|
|
4
|
+
once?: boolean;
|
|
5
|
+
async?: boolean;
|
|
6
|
+
defer?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class ScriptLoader {
|
|
9
|
+
private src;
|
|
10
|
+
private script?;
|
|
11
|
+
private once;
|
|
12
|
+
private async;
|
|
13
|
+
private defer;
|
|
14
|
+
private identifier;
|
|
15
|
+
constructor({ src, identifier, once, async, defer }: ScriptLoaderOptions);
|
|
16
|
+
removeTag(tag: Element | string): void;
|
|
17
|
+
load(): Promise<unknown>;
|
|
18
|
+
private injectScript;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sleep: (duration: number) => Promise<unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type UserVisibilyCallback = ({ isVisible }: {
|
|
2
|
+
isVisible: boolean;
|
|
3
|
+
}) => void;
|
|
4
|
+
export type UserVisibilyStrictOptions = {
|
|
5
|
+
ssr: boolean;
|
|
6
|
+
immediate: boolean;
|
|
7
|
+
timeout: number;
|
|
8
|
+
once: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type UserVisibilyOptions = Partial<UserVisibilyStrictOptions>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { UserVisibilyCallback, UserVisibilyOptions } from './types';
|
|
2
|
+
export declare class UserVisibility {
|
|
3
|
+
private readonly callback;
|
|
4
|
+
private eventHandlerFunction;
|
|
5
|
+
private event;
|
|
6
|
+
private timeoutHandler?;
|
|
7
|
+
private options;
|
|
8
|
+
private readonly defaultOptions;
|
|
9
|
+
private isVisible;
|
|
10
|
+
constructor(callback: UserVisibilyCallback, options?: UserVisibilyOptions);
|
|
11
|
+
start(): void;
|
|
12
|
+
private emitCallback;
|
|
13
|
+
private eventHandler;
|
|
14
|
+
private clearTimeout;
|
|
15
|
+
private initTimeout;
|
|
16
|
+
private addEventListener;
|
|
17
|
+
private removeEventListener;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import type { Router } from 'vue-router';
|
|
3
|
+
export interface AosOptions {
|
|
4
|
+
routerHook?: (args: any) => () => void;
|
|
5
|
+
router?: Router;
|
|
6
|
+
delay?: number;
|
|
7
|
+
observer?: IntersectionObserverInit;
|
|
8
|
+
animation?: {
|
|
9
|
+
once?: boolean;
|
|
10
|
+
duration?: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface ClassOptions extends Omit<AosOptions, 'router'> {
|
|
14
|
+
delay: number;
|
|
15
|
+
observer: IntersectionObserverInit & {
|
|
16
|
+
threshold: number | number[];
|
|
17
|
+
rootMargin: string;
|
|
18
|
+
};
|
|
19
|
+
animation: {
|
|
20
|
+
once: boolean;
|
|
21
|
+
duration: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
declare class AosHandler {
|
|
25
|
+
options: ClassOptions;
|
|
26
|
+
constructor(options?: Omit<AosOptions, 'router'>);
|
|
27
|
+
runAnimations(): Promise<void> | undefined;
|
|
28
|
+
private handleObserver;
|
|
29
|
+
private handleIntersect;
|
|
30
|
+
}
|
|
31
|
+
export declare let instance: AosHandler;
|
|
32
|
+
export declare const plugin: {
|
|
33
|
+
install: (app: App, options?: AosOptions) => void;
|
|
34
|
+
};
|
|
35
|
+
export { AosHandler };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ToasterHandler, installToaster, toastInstance, type ToasterOptions, type ToasterPositions, } from './toaster';
|
|
2
|
+
export { WaitHandler, plugin as installWait, instance as waitInstance } from './wait';
|
|
3
|
+
export { AosHandler, plugin as installAos, instance as aosInstance, type AosOptions } from './aos';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { ToasterPositions } from './types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
position: {
|
|
5
|
+
type: PropType<ToasterPositions>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
maxToasts: {
|
|
9
|
+
type: (NumberConstructor | BooleanConstructor)[];
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
timeout: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
queue: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
noPauseOnHover: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: PropType<"success" | "info" | "warning" | "danger" | undefined>;
|
|
26
|
+
default: string;
|
|
27
|
+
validator: (value: string) => boolean;
|
|
28
|
+
};
|
|
29
|
+
message: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
persistent: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "click")[], "close" | "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
position: {
|
|
39
|
+
type: PropType<ToasterPositions>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
maxToasts: {
|
|
43
|
+
type: (NumberConstructor | BooleanConstructor)[];
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
timeout: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
default: number;
|
|
49
|
+
};
|
|
50
|
+
queue: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
noPauseOnHover: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
type: {
|
|
59
|
+
type: PropType<"success" | "info" | "warning" | "danger" | undefined>;
|
|
60
|
+
default: string;
|
|
61
|
+
validator: (value: string) => boolean;
|
|
62
|
+
};
|
|
63
|
+
message: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
persistent: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
}>> & {
|
|
72
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
73
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
type: "success" | "info" | "warning" | "danger" | undefined;
|
|
76
|
+
position: ToasterPositions;
|
|
77
|
+
timeout: number;
|
|
78
|
+
persistent: boolean;
|
|
79
|
+
maxToasts: number | boolean;
|
|
80
|
+
queue: boolean;
|
|
81
|
+
noPauseOnHover: boolean;
|
|
82
|
+
}, {}>;
|
|
83
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToasterOptions } from './types';
|
|
2
|
+
import { ToasterHandler } from './toaster-handler';
|
|
3
|
+
import type { App } from 'vue';
|
|
4
|
+
export declare let toastInstance: ToasterHandler;
|
|
5
|
+
export declare function createToaster(app: App, options?: ToasterOptions): ToasterHandler;
|
|
6
|
+
export declare const installToaster: {
|
|
7
|
+
install(app: App, options?: ToasterOptions): void;
|
|
8
|
+
};
|
|
9
|
+
export type { ToasterOptions, ToasterPositions } from './types';
|
|
10
|
+
export { ToasterHandler } from './toaster-handler';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class ToasterTimer {
|
|
2
|
+
callback: () => unknown;
|
|
3
|
+
delay: number;
|
|
4
|
+
timer: ReturnType<typeof setTimeout>;
|
|
5
|
+
startedAt: number;
|
|
6
|
+
constructor(callback: () => unknown, delay: number);
|
|
7
|
+
pause(): void;
|
|
8
|
+
resume(): void;
|
|
9
|
+
start(): void;
|
|
10
|
+
stop(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import type { ToasterOptions } from './types';
|
|
3
|
+
export interface LocalToasterOptions extends ToasterOptions {
|
|
4
|
+
type?: 'success' | 'info' | 'warning' | 'danger';
|
|
5
|
+
}
|
|
6
|
+
export declare class ToasterHandler {
|
|
7
|
+
private readonly app;
|
|
8
|
+
private readonly globalOptions;
|
|
9
|
+
constructor(app: App, globalOptions: ToasterOptions);
|
|
10
|
+
private show;
|
|
11
|
+
private getLocalOptions;
|
|
12
|
+
success(message: string, options?: ToasterOptions): void;
|
|
13
|
+
error(message: string, options?: ToasterOptions): void;
|
|
14
|
+
info(message: string, options?: ToasterOptions): void;
|
|
15
|
+
warning(message: string, options?: ToasterOptions): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type App } from 'vue';
|
|
2
|
+
import type { LoaderId } from './utils';
|
|
3
|
+
export declare class WaitHandler {
|
|
4
|
+
private _loaders;
|
|
5
|
+
get loaders(): import("vue").ComputedRef<unknown[]>;
|
|
6
|
+
stop(loaderId?: LoaderId): void;
|
|
7
|
+
start(loaderId?: LoaderId): () => void;
|
|
8
|
+
get anyLoading(): import("vue").ComputedRef<boolean>;
|
|
9
|
+
isLoading(loaderId?: LoaderId): boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const instance: WaitHandler;
|
|
12
|
+
export declare const plugin: {
|
|
13
|
+
install: (app: App) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type LoaderId = unknown;
|
|
2
|
+
export declare const DEFAULT_LOADER: LoaderId;
|
|
3
|
+
export declare const uniq: (array: LoaderId[]) => unknown[];
|
|
4
|
+
export declare const contains: (array: Array<LoaderId>) => (predicate?: LoaderId | VoidFunction) => boolean;
|
|
5
|
+
export declare const hasItems: (array: LoaderId[]) => boolean;
|
|
6
|
+
export declare const push: (array: LoaderId[]) => (item?: LoaderId) => unknown[];
|
|
7
|
+
export declare const pop: (array: LoaderId[]) => (item?: LoaderId) => unknown[];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface MazUiNuxtOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Install the toaster plugin and enable auto import of toaster composable
|
|
4
|
+
*/
|
|
5
|
+
injectToaster?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Enable auto import of useCurrency composable
|
|
8
|
+
*/
|
|
9
|
+
injectUseCurrency?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Enable auto import of useTheme composable
|
|
12
|
+
*/
|
|
13
|
+
injectUseThemeHandler?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* install global of v-fullscreen-img directive
|
|
16
|
+
*/
|
|
17
|
+
installFullscreenImgDirective?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Enable auto import of all components
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
injectComponents?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Enable Nuxt Devtools integration
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
devtools?: boolean;
|
|
28
|
+
}
|
|
29
|
+
declare module '@nuxt/schema' {
|
|
30
|
+
interface PublicRuntimeConfig {
|
|
31
|
+
mazUi?: MazUiNuxtOptions;
|
|
32
|
+
}
|
|
33
|
+
interface NuxtConfig {
|
|
34
|
+
mazUi?: MazUiNuxtOptions;
|
|
35
|
+
}
|
|
36
|
+
interface NuxtOptions {
|
|
37
|
+
mazUi?: MazUiNuxtOptions;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
declare const _default: import("@nuxt/schema").NuxtModule<MazUiNuxtOptions>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare function getColors(): {
|
|
2
|
+
transparent: string;
|
|
3
|
+
black: string;
|
|
4
|
+
'black-contrast': string;
|
|
5
|
+
white: string;
|
|
6
|
+
'white-contrast': string;
|
|
7
|
+
current: string;
|
|
8
|
+
normal: string;
|
|
9
|
+
color: string;
|
|
10
|
+
'color-light': string;
|
|
11
|
+
'color-lighter': string;
|
|
12
|
+
theme: string;
|
|
13
|
+
'theme-hover': string;
|
|
14
|
+
'bg-dark': string;
|
|
15
|
+
'bg-light': string;
|
|
16
|
+
light: string;
|
|
17
|
+
dark: string;
|
|
18
|
+
muted: string;
|
|
19
|
+
overlay: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const screens: {
|
|
2
|
+
'mob-s': string;
|
|
3
|
+
'mob-m': string;
|
|
4
|
+
'mob-l': string;
|
|
5
|
+
'tab-s': string;
|
|
6
|
+
'tab-m': string;
|
|
7
|
+
'tab-l': string;
|
|
8
|
+
'lap-s': string;
|
|
9
|
+
'lap-m': string;
|
|
10
|
+
'lap-l': string;
|
|
11
|
+
'lap-xl': string;
|
|
12
|
+
'lap-2xl': string;
|
|
13
|
+
'lap-3xl': string;
|
|
14
|
+
};
|