maz-ui 4.1.8-beta.0 → 4.1.8-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/components/MazAccordion.vue.d.ts +36 -0
  2. package/dist/components/MazAnimatedCounter.vue.d.ts +59 -0
  3. package/dist/components/MazAnimatedElement.vue.d.ts +44 -0
  4. package/dist/components/MazAnimatedText.vue.d.ts +57 -0
  5. package/dist/components/MazAvatar.vue.d.ts +99 -0
  6. package/dist/components/MazBackdrop.vue.d.ts +91 -0
  7. package/dist/components/MazBadge.vue.d.ts +61 -0
  8. package/dist/components/MazBottomSheet.vue.d.ts +35 -0
  9. package/dist/components/MazBtn.vue.d.ts +105 -0
  10. package/dist/components/MazCard.vue.d.ts +81 -0
  11. package/dist/components/MazCardSpotlight.vue.d.ts +57 -0
  12. package/dist/components/MazCarousel.vue.d.ts +48 -0
  13. package/dist/components/MazChart.vue.d.ts +53 -0
  14. package/dist/components/MazCheckbox.vue.d.ts +55 -0
  15. package/dist/components/MazChecklist.vue.d.ts +87 -0
  16. package/dist/components/MazCircularProgressBar.vue.d.ts +106 -0
  17. package/dist/components/MazDatePicker/MazPickerCalendar.vue.d.ts +28 -0
  18. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -0
  19. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +133 -0
  20. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +142 -0
  21. package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.vue.d.ts +42 -0
  22. package/dist/components/MazDatePicker/MazPickerContainer.vue.d.ts +38 -0
  23. package/dist/components/MazDatePicker/MazPickerHeader.vue.d.ts +15 -0
  24. package/dist/components/MazDatePicker/MazPickerMonthSwitcher.vue.d.ts +44 -0
  25. package/dist/components/MazDatePicker/MazPickerShortcuts.vue.d.ts +16 -0
  26. package/dist/components/MazDatePicker/MazPickerTime.vue.d.ts +107 -0
  27. package/dist/components/MazDatePicker/MazPickerYearSwitcher.vue.d.ts +36 -0
  28. package/dist/components/MazDatePicker/types.d.ts +14 -0
  29. package/dist/components/MazDatePicker/utils.d.ts +61 -0
  30. package/dist/components/MazDatePicker.vue.d.ts +567 -0
  31. package/dist/components/MazDialog.vue.d.ts +247 -0
  32. package/dist/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
  33. package/dist/components/MazDialogConfirm.vue.d.ts +270 -0
  34. package/dist/components/MazDrawer.vue.d.ts +52 -0
  35. package/dist/components/MazDropdown.vue.d.ts +246 -0
  36. package/dist/components/MazDropzone.vue.d.ts +294 -0
  37. package/dist/components/MazExpandAnimation.vue.d.ts +44 -0
  38. package/dist/components/MazFullscreenLoader.vue.d.ts +26 -0
  39. package/dist/components/MazGallery.vue.d.ts +85 -0
  40. package/dist/components/MazIcon.vue.d.ts +33 -0
  41. package/dist/components/MazInput.vue.d.ts +225 -0
  42. package/dist/components/MazInputCode.vue.d.ts +49 -0
  43. package/dist/components/MazInputNumber.vue.d.ts +125 -0
  44. package/dist/components/MazInputPhoneNumber/PhoneInput.vue.d.ts +29 -0
  45. package/dist/components/MazInputPhoneNumber/useLibphonenumber.d.ts +26 -0
  46. package/dist/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +26 -0
  47. package/dist/components/MazInputPhoneNumber.vue.d.ts +421 -0
  48. package/dist/components/MazInputPrice.vue.d.ts +48 -0
  49. package/dist/components/MazInputTags.vue.d.ts +51 -0
  50. package/dist/components/MazLazyImg.vue.d.ts +78 -0
  51. package/dist/components/MazLink.vue.d.ts +116 -0
  52. package/dist/components/MazLoadingBar.vue.d.ts +12 -0
  53. package/dist/components/MazPagination.vue.d.ts +83 -0
  54. package/dist/components/MazPopover.vue.d.ts +258 -0
  55. package/dist/components/MazPullToRefresh.vue.d.ts +52 -0
  56. package/dist/components/MazRadio.vue.d.ts +55 -0
  57. package/dist/components/MazRadioButtons.vue.d.ts +74 -0
  58. package/dist/components/MazReadingProgressBar.vue.d.ts +55 -0
  59. package/dist/components/MazSelect.vue.d.ts +209 -0
  60. package/dist/components/MazSelectCountry.vue.d.ts +171 -0
  61. package/dist/components/MazSlider/utils.d.ts +15 -0
  62. package/dist/components/MazSlider.vue.d.ts +31 -0
  63. package/dist/components/MazSpinner.vue.d.ts +15 -0
  64. package/dist/components/MazStepper.vue.d.ts +60 -0
  65. package/dist/components/MazSwitch.vue.d.ts +69 -0
  66. package/dist/components/MazTable.vue.d.ts +324 -0
  67. package/dist/components/MazTableCell.vue.d.ts +17 -0
  68. package/dist/components/MazTableRow.vue.d.ts +23 -0
  69. package/dist/components/MazTableTitle.vue.d.ts +17 -0
  70. package/dist/components/MazTabs.vue.d.ts +30 -0
  71. package/dist/components/MazTabsBar.vue.d.ts +96 -0
  72. package/dist/components/MazTabsContent.vue.d.ts +17 -0
  73. package/dist/components/MazTabsContentItem.vue.d.ts +31 -0
  74. package/dist/components/MazTextarea.vue.d.ts +88 -0
  75. package/dist/components/constantes.d.ts +2 -0
  76. package/dist/components/index.d.ts +109 -0
  77. package/dist/components/types.d.ts +4 -0
  78. package/dist/composables/index.d.ts +22 -0
  79. package/dist/composables/useAos.d.ts +2 -0
  80. package/dist/composables/useBreakpoints.d.ts +38 -0
  81. package/dist/composables/useDialog.d.ts +2 -0
  82. package/dist/composables/useDisplayNames.d.ts +101 -0
  83. package/dist/composables/useDropzone.d.ts +27 -0
  84. package/dist/composables/useFormField.d.ts +16 -0
  85. package/dist/composables/useFormValidator/config.d.ts +7 -0
  86. package/dist/composables/useFormValidator/dom-events.d.ts +19 -0
  87. package/dist/composables/useFormValidator/state-management.d.ts +72 -0
  88. package/dist/composables/useFormValidator/types.d.ts +98 -0
  89. package/dist/composables/useFormValidator/validation.d.ts +37 -0
  90. package/dist/composables/useFormValidator.d.ts +23 -0
  91. package/dist/composables/useFreezeValue.d.ts +5 -0
  92. package/dist/composables/useIdleTimeout.d.ts +5 -0
  93. package/dist/composables/useInjectStrict.d.ts +2 -0
  94. package/dist/composables/useInstanceUniqId.d.ts +4 -0
  95. package/dist/composables/useMountComponent.d.ts +14 -0
  96. package/dist/composables/useMutationObserver.d.ts +13 -0
  97. package/dist/composables/useReadingTime.d.ts +25 -0
  98. package/dist/composables/useStringMatching.d.ts +5 -0
  99. package/dist/composables/useSwipe.d.ts +14 -0
  100. package/dist/composables/useTimer.d.ts +30 -0
  101. package/dist/composables/useToast.d.ts +22 -0
  102. package/dist/composables/useUserVisibility.d.ts +5 -0
  103. package/dist/composables/useWait.d.ts +2 -0
  104. package/dist/composables/useWindowSize.d.ts +32 -0
  105. package/dist/directives/index.d.ts +5 -0
  106. package/dist/directives/vClickOutside.d.ts +36 -0
  107. package/dist/directives/vFullscreenImg/MazFullscreenImg.vue.d.ts +50 -0
  108. package/dist/directives/vFullscreenImg/fullscreen-img.directive.d.ts +5 -0
  109. package/dist/directives/vFullscreenImg/fullscreen-img.handler.d.ts +36 -0
  110. package/dist/directives/vFullscreenImg.d.ts +11 -0
  111. package/dist/directives/vLazyImg/lazy-img.directive.d.ts +5 -0
  112. package/dist/directives/vLazyImg/lazy-img.handler.d.ts +38 -0
  113. package/dist/directives/vLazyImg/types.d.ts +29 -0
  114. package/dist/directives/vLazyImg.d.ts +12 -0
  115. package/dist/directives/vTooltip.d.ts +54 -0
  116. package/dist/directives/vZoomImg/style.d.ts +1 -0
  117. package/dist/directives/vZoomImg/svgs.d.ts +3 -0
  118. package/dist/directives/vZoomImg/zoom-img.directive.d.ts +8 -0
  119. package/dist/directives/vZoomImg/zoom-img.handler.d.ts +46 -0
  120. package/dist/directives/vZoomImg.d.ts +10 -0
  121. package/dist/index.d.ts +1 -0
  122. package/dist/plugins/aos.d.ts +81 -0
  123. package/dist/plugins/dialog/DialogHandler.d.ts +16 -0
  124. package/dist/plugins/dialog.d.ts +26 -0
  125. package/dist/plugins/index.d.ts +5 -0
  126. package/dist/plugins/maz-ui.d.ts +43 -0
  127. package/dist/plugins/toast/MazToast.vue.d.ts +34 -0
  128. package/dist/plugins/toast/ToastHandler.d.ts +29 -0
  129. package/dist/plugins/toast/types.d.ts +104 -0
  130. package/dist/plugins/toast.d.ts +25 -0
  131. package/dist/plugins/wait.d.ts +33 -0
  132. package/dist/resolvers/MazComponentsResolver.d.ts +10 -0
  133. package/dist/resolvers/MazDirectivesResolver.d.ts +11 -0
  134. package/dist/resolvers/MazModulesResolver.d.ts +11 -0
  135. package/dist/resolvers/index.d.ts +3 -0
  136. package/dist/tailwindcss/index.d.ts +6 -0
  137. package/dist/tailwindcss/tailwind.config.d.ts +89 -0
  138. package/dist/tailwindcss/utils/colors.d.ts +7 -0
  139. package/dist/tailwindcss/variables/breakpoints.d.ts +15 -0
  140. package/dist/tailwindcss/variables/colors.d.ts +21 -0
  141. package/dist/tailwindcss/variables/design-tokens.d.ts +35 -0
  142. package/dist/tailwindcss/variables/utilities.d.ts +17 -0
  143. package/dist/tailwindcss/variables/z-indexes.d.ts +14 -0
  144. package/package.json +9 -9
@@ -0,0 +1,246 @@
1
+ import { IconComponent } from '@maz-ui/icons';
2
+ import { HTMLAttributes } from 'vue';
3
+ import { RouteLocationRaw } from 'vue-router';
4
+ import { MazLinkProps } from './MazLink.vue';
5
+ import { MazPopoverProps } from './MazPopover.vue';
6
+ import { MazColor, MazSize } from './types';
7
+ type __VLS_Props = MazDropdownProps;
8
+ type MazDropdownItemBase = Record<string, unknown> & {
9
+ label: string;
10
+ class?: unknown;
11
+ color?: MazColor;
12
+ };
13
+ type MazDropdownLinkItem = MazDropdownItemBase & MazLinkProps & {
14
+ target?: string;
15
+ href?: string;
16
+ to?: RouteLocationRaw;
17
+ };
18
+ type MazDropdownActionItem = MazDropdownItemBase & {
19
+ onClick?: () => unknown;
20
+ };
21
+ export type MazDropdownMenuItem = (MazDropdownLinkItem & {
22
+ action?: never;
23
+ }) | (MazDropdownActionItem & {
24
+ href?: never;
25
+ to?: never;
26
+ target?: never;
27
+ });
28
+ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue' | 'role'> {
29
+ /**
30
+ * Controls whether the dropdown menu is open
31
+ * @model
32
+ * @type {boolean}
33
+ * @default false
34
+ */
35
+ modelValue?: boolean;
36
+ /**
37
+ * Inline styles to apply to the component root element
38
+ * @type {HTMLAttributes['style']}
39
+ */
40
+ style?: HTMLAttributes['style'];
41
+ /**
42
+ * CSS classes to apply to the component root element
43
+ * @type {HTMLAttributes['class']}
44
+ */
45
+ class?: HTMLAttributes['class'];
46
+ /**
47
+ * Menu items to display in the dropdown
48
+ * Each item can be either a link (with href/to properties) or an action (with onClick function)
49
+ * @type {MazDropdownMenuItem[]}
50
+ * @default []
51
+ * @example
52
+ * [
53
+ * { label: 'Profile', href: '/profile' },
54
+ * { label: 'Settings', onClick: () => console.log('Settings clicked') }
55
+ * ]
56
+ */
57
+ items?: MazDropdownMenuItem[];
58
+ /**
59
+ * Unique identifier for the dropdown component
60
+ * @type {string}
61
+ */
62
+ id?: string;
63
+ /**
64
+ * Determines how the dropdown should be triggered
65
+ * @type {MazPopoverProps['trigger']}
66
+ * @values click, hover, manual, adaptive
67
+ * @default 'adaptive'
68
+ */
69
+ trigger?: MazPopoverProps['trigger'];
70
+ /**
71
+ * Color theme for the dropdown button
72
+ * @type {MazColor}
73
+ * @values primary, secondary, info, success, warning, destructive, transparent, contrast, accent
74
+ * @default 'transparent'
75
+ */
76
+ color?: MazColor;
77
+ /**
78
+ * Position of the menu relative to trigger
79
+ * @values auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end
80
+ * @default 'auto'
81
+ */
82
+ position?: MazPopoverProps['position'];
83
+ /**
84
+ * Controls whether the dropdown menu closes when a menu item is clicked
85
+ * @type {boolean}
86
+ * @default true
87
+ */
88
+ closeOnClick?: boolean;
89
+ /**
90
+ * Disables the dropdown functionality
91
+ * @type {boolean}
92
+ * @default false
93
+ */
94
+ disabled?: boolean;
95
+ /**
96
+ * Controls whether to show the chevron icon in the trigger button
97
+ * @type {boolean}
98
+ * @default true
99
+ */
100
+ chevron?: boolean;
101
+ /**
102
+ * Accessible description for screen readers describing the dropdown functionality
103
+ * If not provided, the default translation of MazUiTranslations plugin will be used
104
+ * @type {string}
105
+ * @default MazUiTranslationsSchema['dropdown']['screenReaderDescription']
106
+ */
107
+ screenReaderDescription?: string;
108
+ /**
109
+ * Additional CSS classes to apply to the dropdown menu panel
110
+ * Useful for customizing the dropdown appearance (background, border, etc.)
111
+ * @type {HTMLAttributes['class']}
112
+ */
113
+ menuPanelClass?: HTMLAttributes['class'];
114
+ /**
115
+ * Inline styles to apply to the dropdown menu panel
116
+ * Useful for custom styling. You may use `!important` to override default styles
117
+ * @type {HTMLAttributes['style']}
118
+ */
119
+ menuPanelStyle?: HTMLAttributes['style'];
120
+ /**
121
+ * Makes the dropdown button expand to full width of its container
122
+ * @type {boolean}
123
+ * @default false
124
+ */
125
+ block?: boolean;
126
+ /**
127
+ * Icon to use instead of the default chevron for the dropdown indicator
128
+ * Can be either an icon name string or a Vue component
129
+ * @type {string | IconComponent}
130
+ * @example 'arrow-down'
131
+ * @example ArrowDownIcon (import { ArrowDownIcon } from '@maz-ui/icons')
132
+ */
133
+ dropdownIcon?: string | IconComponent;
134
+ /**
135
+ * Controls whether the dropdown icon rotates when the dropdown is opened
136
+ * @type {boolean}
137
+ * @default true
138
+ */
139
+ dropdownIconAnimation?: boolean;
140
+ /**
141
+ * Size of the dropdown button
142
+ * @type {MazSize}
143
+ * @values mini, xs, sm, md, lg, xl
144
+ * @default 'md'
145
+ */
146
+ size?: MazSize;
147
+ /**
148
+ * Transition to use when the dropdown is opened or closed
149
+ * @type {MazPopoverProps['transition']}
150
+ * @values 'scale-pop' | 'scale-fade' | string
151
+ * @default 'scale-pop'
152
+ */
153
+ transition?: MazPopoverProps['transition'];
154
+ }
155
+ declare const __VLS_defaults: {
156
+ modelValue: boolean;
157
+ };
158
+ type __VLS_PublicProps = {
159
+ modelValue?: typeof __VLS_defaults['modelValue'];
160
+ } & __VLS_Props;
161
+ declare function __VLS_template(): {
162
+ attrs: Partial<{}>;
163
+ slots: {
164
+ 'screen-reader-description'?(_: {}): any;
165
+ trigger?(_: {
166
+ isOpen: boolean;
167
+ toggle: () => void;
168
+ close: () => void;
169
+ open: () => void;
170
+ }): any;
171
+ default?(_: {}): any;
172
+ 'dropdown-icon'?(_: {
173
+ isOpen: boolean;
174
+ toggle: () => void;
175
+ close: () => void;
176
+ open: () => void;
177
+ }): any;
178
+ dropdown?(_: {
179
+ items: MazDropdownMenuItem[];
180
+ open: () => void;
181
+ close: () => void;
182
+ isOpen: boolean;
183
+ toggle: () => void;
184
+ }): any;
185
+ menuitem?(_: {
186
+ item: MazDropdownMenuItem;
187
+ open: () => void;
188
+ close: () => void;
189
+ isOpen: boolean;
190
+ toggle: () => void;
191
+ }): any;
192
+ 'menuitem-label'?(_: {
193
+ item: Record<string, unknown> & {
194
+ label: string;
195
+ class?: unknown;
196
+ color?: MazColor;
197
+ } & MazLinkProps & {
198
+ target?: string;
199
+ href?: string;
200
+ to?: RouteLocationRaw;
201
+ } & {
202
+ action?: never;
203
+ };
204
+ open: () => void;
205
+ close: () => void;
206
+ isOpen: boolean;
207
+ toggle: () => void;
208
+ }): any;
209
+ 'menuitem-label'?(_: {
210
+ item: Record<string, unknown> & {
211
+ label: string;
212
+ class?: unknown;
213
+ color?: MazColor;
214
+ } & {
215
+ onClick?: () => unknown;
216
+ } & {
217
+ href?: never;
218
+ to?: never;
219
+ target?: never;
220
+ };
221
+ open: () => void;
222
+ close: () => void;
223
+ isOpen: boolean;
224
+ toggle: () => void;
225
+ }): any;
226
+ };
227
+ refs: {};
228
+ rootEl: any;
229
+ };
230
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
231
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
232
+ "update:model-value": (value: boolean) => any;
233
+ "update:modelValue": (value: boolean) => any;
234
+ "menuitem-clicked": (event: Event) => any;
235
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
236
+ "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
237
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
238
+ "onMenuitem-clicked"?: ((event: Event) => any) | undefined;
239
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
240
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
241
+ export default _default;
242
+ type __VLS_WithTemplateSlots<T, S> = T & {
243
+ new (): {
244
+ $slots: S;
245
+ };
246
+ };
@@ -0,0 +1,294 @@
1
+ import { MazUiTranslationsNestedSchema } from '@maz-ui/translations';
2
+ import { DeepPartial } from '@maz-ui/utils';
3
+ import { MazBtnProps } from './MazBtn.vue';
4
+ import { MazSpinnerProps } from './MazSpinner.vue';
5
+ import { MazColor } from './types';
6
+ type __VLS_Props = MazDropzoneProps;
7
+ export type MazDropzoneErrorCode = 'FILE_SIZE_EXCEEDED' | 'MAX_FILES_EXCEEDED' | 'FILE_TYPE_NOT_ALLOWED' | 'FILE_DUPLICATED' | 'FILE_UPLOAD_ERROR' | 'NO_FILES_TO_UPLOAD' | 'FILE_UPLOAD_ERROR_MULTIPLE' | 'NO_URL' | 'FILE_SIZE_TOO_SMALL';
8
+ export type MazDropzoneProps = {
9
+ /**
10
+ * The id of the dropzone
11
+ */
12
+ id?: string;
13
+ /**
14
+ * Allow multiple files to be uploaded.
15
+ * @default false
16
+ */
17
+ multiple?: boolean;
18
+ /**
19
+ * Allowed data types/MIME types for files (e.g. ['application/json'])
20
+ * @default ['*\/*']
21
+ */
22
+ dataTypes?: string[];
23
+ /**
24
+ * Prevent default behavior for unhandled drag & drop events.
25
+ * @default true
26
+ */
27
+ preventDefaultForUnhandled?: boolean;
28
+ /**
29
+ * Maximum file size in MB.
30
+ */
31
+ maxFileSize?: number;
32
+ /**
33
+ * Maximum number of files allowed.
34
+ */
35
+ maxFiles?: number;
36
+ /**
37
+ * Disable the dropzone
38
+ */
39
+ disabled?: boolean;
40
+ /**
41
+ * Show file preview
42
+ */
43
+ preview?: boolean;
44
+ /**
45
+ * Minimum file size in MB
46
+ */
47
+ minFileSize?: number;
48
+ /**
49
+ * Allow duplicates
50
+ * @default false
51
+ */
52
+ allowDuplicates?: boolean;
53
+ /**
54
+ * Translations
55
+ * @description Custom translations for the component
56
+ * @type {Partial<MazUiTranslationsNestedSchema['dropzone']>}
57
+ */
58
+ translations?: DeepPartial<MazUiTranslationsNestedSchema['dropzone']>;
59
+ /**
60
+ * Main color of the component
61
+ * @default 'primary'
62
+ */
63
+ color?: MazColor;
64
+ /**
65
+ * MazBtn props [MazBtn props](/components/maz-btn#props)
66
+ * @default {}
67
+ */
68
+ removeFileBtnProps?: MazBtnProps;
69
+ /**
70
+ * MazSpinner props [MazSpinner props](/components/maz-spinner#props)
71
+ * @default {}
72
+ */
73
+ spinnerProps?: MazSpinnerProps;
74
+ /**
75
+ * Auto upload files
76
+ * @description If set to `multiple`, all files will be uploaded at once in a single request. If set to `single`, files will be uploaded one by one in separate requests. If set to `false`, no upload will be done automatically.
77
+ * @default false
78
+ */
79
+ autoUpload?: 'multiple' | 'single' | false;
80
+ /**
81
+ * Upload URL
82
+ * @description If set, files will be uploaded to the given URL.
83
+ */
84
+ url?: string;
85
+ /**
86
+ * Request options
87
+ * @description Request options to be used for the upload (using fetch) [Request options](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options)
88
+ * @example `{ mode: 'no-cors', headers: { 'Content-Type': 'multipart/form-data', 'Authorization': 'Bearer 1234567890' } }`
89
+ */
90
+ requestOptions?: RequestInit;
91
+ /**
92
+ * Transform the body of the request
93
+ */
94
+ transformBody?: (formData: FormData) => RequestInit['body'];
95
+ /**
96
+ * Maximum number of concurrent uploads
97
+ * @description Limit the number of files uploaded simultaneously to avoid overwhelming the server
98
+ * @default 5
99
+ */
100
+ maxConcurrentUploads?: number;
101
+ };
102
+ export interface MazDropzoneFileData {
103
+ file: File;
104
+ name?: string;
105
+ size?: number;
106
+ type?: string;
107
+ lastModified?: number;
108
+ sizeInMb?: string;
109
+ thumbnail?: string | undefined;
110
+ lastModifiedDate?: Date;
111
+ uploading?: boolean;
112
+ success?: boolean;
113
+ error?: boolean;
114
+ url?: string;
115
+ }
116
+ declare function getFormData(file: File): FormData;
117
+ declare function getFormDataMultiple(): FormData;
118
+ declare function uploadFilesMultiple(): Promise<void>;
119
+ declare function uploadFiles(): Promise<void>;
120
+ declare function handleFileInputClick(): void;
121
+ declare function reset(): void;
122
+ declare function addFile(file: File): void;
123
+ declare function removeFile(file: File): void;
124
+ type __VLS_PublicProps = {
125
+ modelValue?: MazDropzoneFileData[];
126
+ } & __VLS_Props;
127
+ declare function __VLS_template(): {
128
+ attrs: Partial<{}>;
129
+ slots: {
130
+ 'files-area'?(_: {
131
+ filesData: MazDropzoneFileData[];
132
+ }): any;
133
+ 'file-item'?(_: {
134
+ file: MazDropzoneFileData;
135
+ }): any;
136
+ 'no-files-area'?(_: {
137
+ selectFile: typeof handleFileInputClick;
138
+ }): any;
139
+ 'upload-icon'?(_: {}): any;
140
+ };
141
+ refs: {
142
+ dropZoneRef: HTMLLabelElement;
143
+ fileInput: HTMLInputElement;
144
+ };
145
+ rootEl: HTMLLabelElement;
146
+ };
147
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
148
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
149
+ /**
150
+ * Upload files
151
+ * @description With this method, the files are uploaded one by one (a request for each file)
152
+ * @usage `mazDropzoneInstance.value?.uploadFiles()`
153
+ */
154
+ uploadFiles: typeof uploadFiles;
155
+ /**
156
+ * Upload multiple files
157
+ * @description With this method, the files are uploaded all at once in a single request
158
+ * @usage `mazDropzoneInstance.value?.uploadFilesMultiple()`
159
+ */
160
+ uploadFilesMultiple: typeof uploadFilesMultiple;
161
+ /**
162
+ * Get form data
163
+ * @description Get the form data of one file
164
+ * @usage `const formData = mazDropzoneInstance.value?.getFormData(file)`
165
+ */
166
+ getFormData: typeof getFormData;
167
+ /**
168
+ * Get form data multiple
169
+ * @description Get the form data of all files
170
+ * @usage `const formData = mazDropzoneInstance.value?.getFormDataMultiple()`
171
+ */
172
+ getFormDataMultiple: typeof getFormDataMultiple;
173
+ /**
174
+ * Reset the files
175
+ * @description Remove all files from the dropzone
176
+ * @usage `mazDropzoneInstance.value?.reset()`
177
+ */
178
+ reset: typeof reset;
179
+ /**
180
+ * Check if the files are uploading
181
+ * @type boolean
182
+ * @description Check if the files are uploading
183
+ * @usage `const isUploading = mazDropzoneInstance.value?.isUploading`
184
+ */
185
+ isUploading: import('vue').Ref<boolean, boolean>;
186
+ /**
187
+ * Add a file to the dropzone
188
+ * @description Add a file manually to the dropzone
189
+ * @usage `mazDropzoneInstance.value?.addFile(file)`
190
+ */
191
+ addFile: typeof addFile;
192
+ /**
193
+ * Remove a file from the dropzone
194
+ * @description Remove a file manually from the dropzone
195
+ * @usage `mazDropzoneInstance.value?.removeFile(file)`
196
+ */
197
+ removeFile: typeof removeFile;
198
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
199
+ drop: (values: {
200
+ files: File[] | null;
201
+ event: DragEvent;
202
+ }) => any;
203
+ error: (values: {
204
+ files: File[] | null;
205
+ event: DragEvent | null;
206
+ code: MazDropzoneErrorCode;
207
+ }) => any;
208
+ add: (value: File) => any;
209
+ enter: (values: {
210
+ files: File[] | null;
211
+ event: DragEvent;
212
+ }) => any;
213
+ over: (values: {
214
+ files: File[] | null;
215
+ event: DragEvent;
216
+ }) => any;
217
+ leave: (values: {
218
+ files: File[] | null;
219
+ event: DragEvent;
220
+ }) => any;
221
+ "update:modelValue": (value: MazDropzoneFileData[]) => any;
222
+ remove: (value: File) => any;
223
+ "upload-error": (values: {
224
+ file: File;
225
+ code: MazDropzoneErrorCode;
226
+ error: unknown;
227
+ }) => any;
228
+ "upload-error-multiple": (values: {
229
+ files: File[];
230
+ code: MazDropzoneErrorCode;
231
+ error: unknown;
232
+ }) => any;
233
+ "upload-success": (values: {
234
+ file: File;
235
+ response?: Response;
236
+ }) => any;
237
+ "upload-success-multiple": (values: {
238
+ files: File[];
239
+ response?: Response;
240
+ }) => any;
241
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
242
+ onDrop?: ((values: {
243
+ files: File[] | null;
244
+ event: DragEvent;
245
+ }) => any) | undefined;
246
+ onError?: ((values: {
247
+ files: File[] | null;
248
+ event: DragEvent | null;
249
+ code: MazDropzoneErrorCode;
250
+ }) => any) | undefined;
251
+ onAdd?: ((value: File) => any) | undefined;
252
+ onEnter?: ((values: {
253
+ files: File[] | null;
254
+ event: DragEvent;
255
+ }) => any) | undefined;
256
+ onOver?: ((values: {
257
+ files: File[] | null;
258
+ event: DragEvent;
259
+ }) => any) | undefined;
260
+ onLeave?: ((values: {
261
+ files: File[] | null;
262
+ event: DragEvent;
263
+ }) => any) | undefined;
264
+ "onUpdate:modelValue"?: ((value: MazDropzoneFileData[]) => any) | undefined;
265
+ onRemove?: ((value: File) => any) | undefined;
266
+ "onUpload-error"?: ((values: {
267
+ file: File;
268
+ code: MazDropzoneErrorCode;
269
+ error: unknown;
270
+ }) => any) | undefined;
271
+ "onUpload-error-multiple"?: ((values: {
272
+ files: File[];
273
+ code: MazDropzoneErrorCode;
274
+ error: unknown;
275
+ }) => any) | undefined;
276
+ "onUpload-success"?: ((values: {
277
+ file: File;
278
+ response?: Response;
279
+ }) => any) | undefined;
280
+ "onUpload-success-multiple"?: ((values: {
281
+ files: File[];
282
+ response?: Response;
283
+ }) => any) | undefined;
284
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
285
+ dropZoneRef: HTMLLabelElement;
286
+ fileInput: HTMLInputElement;
287
+ }, HTMLLabelElement>;
288
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
289
+ export default _default;
290
+ type __VLS_WithTemplateSlots<T, S> = T & {
291
+ new (): {
292
+ $slots: S;
293
+ };
294
+ };
@@ -0,0 +1,44 @@
1
+ export interface MazExpandAnimationProps {
2
+ /**
3
+ * Duration of the animation in milliseconds
4
+ * @default '300ms'
5
+ */
6
+ duration?: string;
7
+ /**
8
+ * Timing function of the animation
9
+ * @default 'ease-in-out'
10
+ */
11
+ timingFunction?: string;
12
+ }
13
+ type __VLS_Props = MazExpandAnimationProps;
14
+ type __VLS_PublicProps = {
15
+ modelValue?: boolean;
16
+ } & __VLS_Props;
17
+ declare function __VLS_template(): {
18
+ attrs: Partial<{}>;
19
+ slots: {
20
+ default?(_: {}): any;
21
+ };
22
+ refs: {
23
+ expandAnimationRef: HTMLDivElement;
24
+ };
25
+ rootEl: any;
26
+ };
27
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ "update:modelValue": (value: boolean) => any;
30
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
31
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
32
+ }>, {
33
+ duration: string;
34
+ timingFunction: string;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
36
+ expandAnimationRef: HTMLDivElement;
37
+ }, any>;
38
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
+ export default _default;
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,26 @@
1
+ import { MazColor } from './types';
2
+ export interface MazFullscreenLoaderProps {
3
+ /** The color of the spinner */
4
+ color?: MazColor;
5
+ /** The size of the spinner */
6
+ size?: string;
7
+ /** The selector to teleport the loader */
8
+ teleportSelector?: string;
9
+ }
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<MazFullscreenLoaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazFullscreenLoaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,85 @@
1
+ export type MazGalleryImage = {
2
+ thumbnail?: string;
3
+ src: string;
4
+ alt?: string;
5
+ } | string;
6
+ export interface MazGalleryProps {
7
+ /**
8
+ * Array of string or object: `['https://via.placeholder.com/500', 'https://via.placeholder.com/600']` or `[{ slug: 'https://via.placeholder.com/500', alt: 'image descripton' }, { slug: 'https://via.placeholder.com/600', alt: 'image descripton' }]`
9
+ */
10
+ images?: MazGalleryImage[];
11
+ /**
12
+ * Images count shown (max: 5)
13
+ * @type number
14
+ * @default 5
15
+ */
16
+ displayedCount?: number;
17
+ /**
18
+ * Remove transparent layer with the remain count (ex: +2)
19
+ * @type boolean
20
+ * @default true
21
+ */
22
+ remaining?: boolean;
23
+ /**
24
+ * Height of gallery - set to `false` to remove default height
25
+ * @type number | string | false
26
+ * @default 150
27
+ */
28
+ height?: number | string | false;
29
+ /**
30
+ * Width of gallery - set to `false` to remove default width
31
+ * @type number | string | false
32
+ * @default '100%'
33
+ */
34
+ width?: number | string | false;
35
+ /**
36
+ * Disable the border radius of the gallery
37
+ * @type boolean
38
+ * @default false
39
+ */
40
+ radius?: boolean;
41
+ /**
42
+ * Disable full size display when clicking on image
43
+ * @type boolean
44
+ * @default false
45
+ */
46
+ zoom?: boolean;
47
+ /**
48
+ * Layer with photography icon when no images is provided
49
+ * @type boolean
50
+ * @default true
51
+ */
52
+ hasEmptyLayer?: boolean;
53
+ /**
54
+ * Lazy load image - if false, images are directly loaded
55
+ * @type boolean
56
+ * @default true
57
+ */
58
+ lazy?: boolean;
59
+ /**
60
+ * Disable blur effect on image hover
61
+ * @type boolean
62
+ * @default true
63
+ */
64
+ blur?: boolean;
65
+ /**
66
+ * Disable scale animation effect on image hover
67
+ * @type boolean
68
+ * @default true
69
+ */
70
+ scale?: boolean;
71
+ /**
72
+ * Choose color of borders between images - Should be a CSS color or CSS variable - Ex: `#000` or `hsl(var(--maz-background-300))`
73
+ * @type string
74
+ * @default 'transparent'
75
+ */
76
+ separatorColor?: string;
77
+ /**
78
+ * Choose background color of the gallery - Should be a CSS color or CSS variable - Ex: `#000` or `hsl(var(--maz-background-300))`
79
+ * @type string
80
+ * @default 'hsl(var(--maz-background-300))'
81
+ */
82
+ backgroundColor?: string;
83
+ }
84
+ declare const _default: import('vue').DefineComponent<MazGalleryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazGalleryProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
85
+ export default _default;