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.
Files changed (238) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/MazAccordion.DUQCf8vy.css +1 -0
  3. package/dist/assets/{MazAnimatedCounter.CTG-PC5W.css → MazAnimatedCounter.DkZNPRLp.css} +1 -1
  4. package/dist/assets/MazAnimatedText.DDqCxrFX.css +1 -0
  5. package/dist/assets/MazBackdrop.BnhcmjbP.css +1 -0
  6. package/dist/assets/{MazBadge.DN8tdE8_.css → MazBadge.ChI2DaTU.css} +1 -1
  7. package/dist/assets/MazBtn.BFhP-9HO.css +1 -0
  8. package/dist/assets/MazCard.DBuQhXtl.css +1 -0
  9. package/dist/assets/{MazCardSpotlight.Dy-wuLQq.css → MazCardSpotlight.IbPp_y0j.css} +1 -1
  10. package/dist/assets/MazCheckbox.aH1IKnrR.css +1 -0
  11. package/dist/assets/MazChecklist.BzF5KtZ3.css +1 -0
  12. package/dist/assets/MazDatePicker.8GyrtM-j.css +1 -0
  13. package/dist/assets/MazDropzone.CXu1QtnY.css +1 -0
  14. package/dist/assets/MazInput.ByolKDfx.css +1 -0
  15. package/dist/assets/MazInputCode.FA2z4HQd.css +1 -0
  16. package/dist/assets/MazInputPhoneNumber.CrXS7DOY.css +1 -0
  17. package/dist/assets/MazInputTags.KNTpDHof.css +1 -0
  18. package/dist/assets/MazLazyImg.NlPRN3Nk.css +1 -0
  19. package/dist/assets/MazLink.CFscNMFr.css +1 -0
  20. package/dist/assets/MazPickerCalendarMonth.Boe_8k4x.css +1 -0
  21. package/dist/assets/MazPickerMonthSwitcher.CszcpCcY.css +1 -0
  22. package/dist/assets/{MazPickerYearSwitcher.Dl30Dwor.css → MazPickerYearSwitcher.Cn-nS-Vv.css} +1 -1
  23. package/dist/assets/MazPopover.rBpotMKW.css +1 -0
  24. package/dist/assets/MazPullToRefresh.BQ64UvzA.css +1 -0
  25. package/dist/assets/MazRadio.aTHM-mpx.css +1 -0
  26. package/dist/assets/MazRadioButtons.SGytq4d7.css +1 -0
  27. package/dist/assets/MazReadingProgressBar.CwBVXE3g.css +1 -0
  28. package/dist/assets/MazSelect.CwjnAZiu.css +1 -0
  29. package/dist/assets/{MazSelectCountry.D2Qudf0K.css → MazSelectCountry.t3GsKyqw.css} +1 -1
  30. package/dist/assets/{MazSlider.D5SgmZLH.css → MazSlider.y4qpnD0N.css} +1 -1
  31. package/dist/assets/MazStepper.BD2gDGAX.css +1 -0
  32. package/dist/assets/MazSwitch.Bxmh2iFj.css +1 -0
  33. package/dist/assets/{MazTable.B1tkeUfE.css → MazTable.DMlQdImb.css} +1 -1
  34. package/dist/assets/MazTableRow.DgBXpK9J.css +1 -0
  35. package/dist/assets/{MazTabsBar.B9N_jdqU.css → MazTabsBar.gcS2Fc-B.css} +1 -1
  36. package/dist/assets/{MazTabsContentItem.CHfy19ZF.css → MazTabsContentItem.C84SDmj0.css} +1 -1
  37. package/dist/assets/MazTextarea.li9dWBax.css +1 -0
  38. package/dist/assets/{PhoneInput.CyWO76iq.css → PhoneInput.BJiKqOF6.css} +1 -1
  39. package/dist/assets/{fullscreen-img.pvt6196l.css → fullscreen-img.Bkuz1GOX.css} +1 -1
  40. package/dist/assets/{toast.kunueRvo.css → toast.CC2VQab8.css} +1 -1
  41. package/dist/chunks/{MazDatePicker.CT5yJhSN.js → MazDatePicker.De3Ltb2F.js} +29 -31
  42. 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
  43. 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
  44. package/dist/chunks/{MazInputPhoneNumber.Uwhn1Q9j.js → MazInputPhoneNumber.Ch-PCGiv.js} +14 -12
  45. 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
  46. package/dist/chunks/{MazPickerCalendar.RS6ZMdDK.js → MazPickerCalendar.DKXNI8O4.js} +1 -1
  47. package/dist/chunks/{MazPickerCalendarMonth.hQBSVkc9.js → MazPickerCalendarMonth.DKBqgrNp.js} +5 -5
  48. package/dist/chunks/{MazPickerCalendarSwitcher.Cp2ux3E4.js → MazPickerCalendarSwitcher.CzIZol3Z.js} +1 -1
  49. package/dist/chunks/{MazPickerContainer.DnfB3Dqg.js → MazPickerContainer.Mrh-Q52I.js} +1 -1
  50. package/dist/chunks/{MazPickerHeader.Dlz2yJ1D.js → MazPickerHeader.Bm9vIrtB.js} +1 -1
  51. package/dist/chunks/{MazPickerMonthSwitcher.BpfCGGxQ.js → MazPickerMonthSwitcher.BSD2GtY6.js} +5 -6
  52. package/dist/chunks/{MazPickerTime.EuWWNfid.js → MazPickerTime.D0hilq5b.js} +1 -1
  53. package/dist/chunks/{MazPickerYearSwitcher.D4aO09D3.js → MazPickerYearSwitcher.BIUYJMvj.js} +8 -27
  54. 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
  55. 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
  56. package/dist/chunks/{PhoneInput.CPjyZ8Sq.js → PhoneInput.BzL1_XS5.js} +5 -4
  57. package/dist/chunks/{utils.BBuYjMbK.js → dom-events.Bbe7wDQl.js} +221 -115
  58. package/dist/chunks/{en.BzBlrE0C.js → en.Q_4-KljL.js} +12 -0
  59. package/dist/chunks/{fullscreen-img.directive.CyOHexcO.js → fullscreen-img.directive.Be383en8.js} +2 -2
  60. package/dist/chunks/{lazy-img.directive.D5zCo3Zi.js → lazy-img.directive.BLFnGqQa.js} +1 -1
  61. package/dist/chunks/types.D0Bp_UhS.js +6 -0
  62. package/dist/chunks/{normalizeString.CFe2M8S_.js → useStringMatching.Ba1yCuA4.js} +40 -1
  63. package/dist/chunks/{useTranslations.BXuww4ux.js → useTranslations.D5aoYwD7.js} +1 -1
  64. package/dist/chunks/vClickOutside.DIOiluy0.js +107 -0
  65. package/dist/components/MazAccordion.js +2 -2
  66. package/dist/components/MazAnimatedCounter.js +3 -3
  67. package/dist/components/MazAnimatedText.js +2 -2
  68. package/dist/components/MazBackdrop.js +3 -3
  69. package/dist/components/MazBadge.js +5 -4
  70. package/dist/components/MazBtn.js +9 -7
  71. package/dist/components/MazCard.js +2 -2
  72. package/dist/components/MazCardSpotlight.js +4 -4
  73. package/dist/components/MazCarousel.js +1 -1
  74. package/dist/components/MazCheckbox.js +10 -12
  75. package/dist/components/MazChecklist.js +4 -5
  76. package/dist/components/MazDatePicker.js +1 -1
  77. package/dist/components/MazDialogConfirm.js +6 -0
  78. package/dist/components/MazDropdown.js +1 -1
  79. package/dist/components/MazDropzone.js +5 -5
  80. package/dist/components/MazGallery.js +2 -2
  81. package/dist/components/MazInput.js +21 -16
  82. package/dist/components/MazInputCode.js +2 -2
  83. package/dist/components/MazInputPhoneNumber.js +1 -1
  84. package/dist/components/MazInputPrice.js +1 -1
  85. package/dist/components/MazInputTags.js +2 -2
  86. package/dist/components/MazLazyImg.js +9 -9
  87. package/dist/components/MazLink.js +9 -5
  88. package/dist/components/MazPagination.js +1 -1
  89. package/dist/components/MazPopover.js +177 -89
  90. package/dist/components/MazPullToRefresh.js +8 -3
  91. package/dist/components/MazRadio.js +8 -16
  92. package/dist/components/MazRadioButtons.js +7 -6
  93. package/dist/components/MazReadingProgressBar.js +10 -3
  94. package/dist/components/MazSelect.js +24 -14
  95. package/dist/components/MazSelectCountry.js +15 -9
  96. package/dist/components/MazSlider.js +2 -2
  97. package/dist/components/MazStepper.js +2 -2
  98. package/dist/components/MazSwitch.js +1 -1
  99. package/dist/components/MazTable.js +3 -3
  100. package/dist/components/MazTableCell.js +1 -1
  101. package/dist/components/MazTableRow.js +3 -3
  102. package/dist/components/MazTableTitle.js +1 -1
  103. package/dist/components/MazTabsBar.js +6 -6
  104. package/dist/components/MazTabsContentItem.js +6 -7
  105. package/dist/components/MazTextarea.js +24 -3
  106. package/dist/components/index.js +8 -8
  107. package/dist/composables/index.js +4 -2
  108. package/dist/composables/useAos.js +1 -1
  109. package/dist/composables/useDialog.js +1 -1
  110. package/dist/composables/useDisplayNames.js +7 -1
  111. package/dist/composables/useDropzone.js +7 -7
  112. package/dist/composables/useFormField.js +15 -19
  113. package/dist/composables/useFormValidator.js +58 -29
  114. package/dist/composables/useIdleTimeout.js +108 -1
  115. package/dist/composables/useInjectStrict.js +2 -2
  116. package/dist/composables/useStringMatching.js +3 -40
  117. package/dist/composables/useSwipe.js +77 -1
  118. package/dist/composables/useToast.js +1 -1
  119. package/dist/composables/useUserVisibility.js +47 -1
  120. package/dist/composables/useWait.js +1 -1
  121. package/dist/composables/useWindowSize.js +1 -1
  122. package/dist/css/main.css +1 -1
  123. package/dist/directives/index.js +7 -7
  124. package/dist/directives/vClickOutside.js +4 -102
  125. package/dist/directives/vFullscreenImg.js +1 -1
  126. package/dist/directives/vLazyImg.js +2 -2
  127. package/dist/directives/vTooltip.js +97 -60
  128. package/dist/index.js +1 -114
  129. package/dist/plugins/dialog.js +3 -3
  130. package/dist/plugins/maz-ui.js +150 -143
  131. package/dist/plugins/toast.js +8 -11
  132. package/dist/resolvers/MazComponentsResolver.js +7 -1
  133. package/dist/resolvers/MazDirectivesResolver.js +1 -1
  134. package/dist/resolvers/MazModulesResolver.js +3 -1
  135. package/dist/tailwindcss/tailwind.config.js +5 -2
  136. package/dist/tailwindcss/variables/design-tokens.js +3 -0
  137. package/dist/types/components/MazAccordion.vue.d.ts +15 -2
  138. package/dist/types/components/MazBtn.vue.d.ts +1 -0
  139. package/dist/types/components/MazCard.vue.d.ts +1 -1
  140. package/dist/types/components/MazCheckbox.vue.d.ts +0 -6
  141. package/dist/types/components/MazChecklist.vue.d.ts +1 -1
  142. package/dist/types/components/MazDatePicker.vue.d.ts +15 -23
  143. package/dist/types/components/MazDialogConfirm/useMazDialogConfirm.d.ts +47 -0
  144. package/dist/types/components/{MazDialogPromise.vue.d.ts → MazDialogConfirm.vue.d.ts} +43 -10
  145. package/dist/types/components/MazDropdown.vue.d.ts +12 -12
  146. package/dist/types/components/MazInput.vue.d.ts +7 -0
  147. package/dist/types/components/MazInputNumber.vue.d.ts +2 -2
  148. package/dist/types/components/MazInputPhoneNumber/useLibphonenumber.d.ts +2 -2
  149. package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +6 -2
  150. package/dist/types/components/MazInputPhoneNumber.vue.d.ts +38 -15
  151. package/dist/types/components/MazInputTags.vue.d.ts +1 -1
  152. package/dist/types/components/MazLazyImg.vue.d.ts +8 -8
  153. package/dist/types/components/MazLink.vue.d.ts +11 -0
  154. package/dist/types/components/MazPopover.vue.d.ts +18 -15
  155. package/dist/types/components/MazRadioButtons.vue.d.ts +1 -1
  156. package/dist/types/components/MazSelect.vue.d.ts +2 -2
  157. package/dist/types/components/MazSelectCountry.vue.d.ts +13 -4
  158. package/dist/types/components/MazStepper.vue.d.ts +13 -2
  159. package/dist/types/components/MazTable.vue.d.ts +63 -2
  160. package/dist/types/components/index.d.ts +4 -4
  161. package/dist/types/components/types.d.ts +1 -0
  162. package/dist/types/composables/index.d.ts +2 -1
  163. package/dist/types/composables/useDisplayNames.d.ts +2 -2
  164. package/dist/types/composables/useDropzone.d.ts +3 -3
  165. package/dist/types/composables/useFormField.d.ts +16 -56
  166. package/dist/types/composables/useFormValidator/config.d.ts +2 -2
  167. package/dist/types/composables/useFormValidator/dom-events.d.ts +19 -0
  168. package/dist/types/composables/useFormValidator/state-management.d.ts +72 -0
  169. package/dist/types/composables/useFormValidator/types.d.ts +20 -32
  170. package/dist/types/composables/useFormValidator/validation.d.ts +37 -0
  171. package/dist/types/composables/useFormValidator.d.ts +16 -10
  172. package/dist/types/composables/useIdleTimeout.d.ts +1 -1
  173. package/dist/types/composables/useInjectStrict.d.ts +1 -1
  174. package/dist/types/composables/useSwipe.d.ts +1 -1
  175. package/dist/types/composables/useUserVisibility.d.ts +1 -1
  176. package/dist/types/directives/vClickOutside.d.ts +11 -18
  177. package/dist/types/directives/vFullscreenImg/fullscreen-img.directive.d.ts +3 -5
  178. package/dist/types/directives/vFullscreenImg.d.ts +9 -4
  179. package/dist/types/directives/vLazyImg/lazy-img.directive.d.ts +3 -5
  180. package/dist/types/directives/vLazyImg.d.ts +11 -6
  181. package/dist/types/directives/vTooltip.d.ts +14 -14
  182. package/dist/types/directives/vZoomImg/zoom-img.directive.d.ts +2 -0
  183. package/dist/types/directives/vZoomImg.d.ts +9 -5
  184. package/dist/types/index.d.ts +1 -1
  185. package/dist/types/plugins/aos.d.ts +30 -4
  186. package/dist/types/plugins/dialog/DialogHandler.d.ts +2 -2
  187. package/dist/types/plugins/dialog.d.ts +2 -4
  188. package/dist/types/plugins/maz-ui.d.ts +2 -63
  189. package/dist/types/plugins/toast.d.ts +2 -4
  190. package/dist/types/plugins/wait.d.ts +2 -3
  191. package/dist/types/tailwindcss/tailwind.config.d.ts +5 -0
  192. package/dist/types/tailwindcss/variables/design-tokens.d.ts +3 -0
  193. package/package.json +42 -39
  194. package/dist/assets/MazAccordion.esK3rR4p.css +0 -1
  195. package/dist/assets/MazAnimatedText.BrOwWuqf.css +0 -1
  196. package/dist/assets/MazBackdrop.DNpnLh63.css +0 -1
  197. package/dist/assets/MazBtn.BnRxVlqS.css +0 -1
  198. package/dist/assets/MazCard.C6nDaeIC.css +0 -1
  199. package/dist/assets/MazCheckbox.C_qIngLy.css +0 -1
  200. package/dist/assets/MazChecklist.CWK_Gl-t.css +0 -1
  201. package/dist/assets/MazDatePicker.V5JwKPrQ.css +0 -1
  202. package/dist/assets/MazDropzone.DafxQwbq.css +0 -1
  203. package/dist/assets/MazInput.DW2KOJHY.css +0 -1
  204. package/dist/assets/MazInputCode.CG6EJBEk.css +0 -1
  205. package/dist/assets/MazInputPhoneNumber.vpA2mrZn.css +0 -1
  206. package/dist/assets/MazInputTags.B_s9J3sw.css +0 -1
  207. package/dist/assets/MazLazyImg.BNaVtpfX.css +0 -1
  208. package/dist/assets/MazLink.CCfbrUs0.css +0 -1
  209. package/dist/assets/MazPickerCalendarMonth.zkrPVHDv.css +0 -1
  210. package/dist/assets/MazPickerMonthSwitcher.168v7Hs1.css +0 -1
  211. package/dist/assets/MazPopover.Bth9NWia.css +0 -1
  212. package/dist/assets/MazPullToRefresh.DABqbGtK.css +0 -1
  213. package/dist/assets/MazRadio.DKMFWwy_.css +0 -1
  214. package/dist/assets/MazRadioButtons.BA4rjgK9.css +0 -1
  215. package/dist/assets/MazReadingProgressBar.n1Is8_Y3.css +0 -1
  216. package/dist/assets/MazSelect.DZZpDg8z.css +0 -1
  217. package/dist/assets/MazStepper.DYMde9uq.css +0 -1
  218. package/dist/assets/MazSwitch.Z1ZMm7tx.css +0 -1
  219. package/dist/assets/MazTableRow.B78Bd4Kv.css +0 -1
  220. package/dist/assets/MazTextarea.Dz11mUeK.css +0 -1
  221. package/dist/chunks/TextareaAutogrow.C22LQx0k.js +0 -25
  222. package/dist/chunks/debounceCallback.B69vn57Q.js +0 -7
  223. package/dist/chunks/formatCurrency.C8NzW9Ii.js +0 -34
  224. package/dist/chunks/formatDate.DZ_OzdnV.js +0 -21
  225. package/dist/chunks/getCountryFlagUrl.dQjriBXx.js +0 -9
  226. package/dist/chunks/idleTimeout.-ICpdeGV.js +0 -111
  227. package/dist/chunks/isServer.BokzeB-Q.js +0 -6
  228. package/dist/chunks/isStandaloneMode.BpUpOTbA.js +0 -10
  229. package/dist/chunks/pascalCase.D_nuQ66I.js +0 -11
  230. package/dist/chunks/swipeHandler.8emelhOL.js +0 -80
  231. package/dist/chunks/throttle.DN8ARw0a.js +0 -11
  232. package/dist/chunks/throttleId.7PhWZjcS.js +0 -62
  233. package/dist/chunks/userVisibility.BbQSJASv.js +0 -50
  234. package/dist/chunks/x-mark.CTalOvvY.js +0 -23
  235. package/dist/components/MazDialogPromise.js +0 -6
  236. package/dist/types/components/MazDialogPromise/useMazDialogPromise.d.ts +0 -54
  237. package/dist/types/components/MazInputPhoneNumber/types.d.ts +0 -22
  238. package/dist/types/composables/useFormValidator/utils.d.ts +0 -116
@@ -249,11 +249,11 @@ declare function __VLS_template(): {
249
249
  $data: {};
250
250
  $props: {
251
251
  readonly modelValue?: boolean | undefined;
252
- readonly position?: import('./MazPopover.vue').PopoverPosition | undefined;
253
- readonly preferPosition?: import('./MazPopover.vue').PopoverPosition | undefined;
254
- readonly fallbackPosition?: import('./MazPopover.vue').PopoverPosition | undefined;
255
- readonly trigger?: import('./MazPopover.vue').PopoverTrigger | undefined;
256
- readonly role?: import('./MazPopover.vue').PopoverRole | undefined;
252
+ readonly position?: import('./MazPopover.vue').MazPopoverPosition | undefined;
253
+ readonly preferPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
254
+ readonly fallbackPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
255
+ readonly trigger?: import('./MazPopover.vue').MazPopoverTrigger | undefined;
256
+ readonly role?: import('./MazPopover.vue').MazPopoverRole | undefined;
257
257
  readonly ariaLabel?: string | undefined;
258
258
  readonly announceChanges?: boolean | undefined;
259
259
  readonly disabled?: boolean | undefined;
@@ -275,7 +275,7 @@ declare function __VLS_template(): {
275
275
  readonly trapFocus?: boolean | undefined;
276
276
  readonly keepOpenOnHover?: boolean | undefined;
277
277
  readonly block?: boolean | undefined;
278
- readonly positionDelay?: number | undefined;
278
+ readonly positionReference?: (string | HTMLElement) | undefined;
279
279
  readonly onClose?: (() => any) | undefined;
280
280
  readonly onToggle?: ((value: boolean) => any) | undefined;
281
281
  readonly onOpen?: (() => any) | undefined;
@@ -338,11 +338,7 @@ declare function __VLS_template(): {
338
338
  };
339
339
  $forceUpdate: () => void;
340
340
  $nextTick: typeof import('vue').nextTick;
341
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /**
342
- * CSS selector for a custom element that triggers the picker
343
- * @type {string}
344
- * @example '#my-button', '.trigger-class'
345
- */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
341
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
346
342
  } & Readonly<{}> & Omit<Readonly<{
347
343
  modelValue?: boolean;
348
344
  } & MazPopoverProps> & Readonly<{
@@ -407,7 +403,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
407
403
  hideHeader: boolean;
408
404
  inputFormat: Intl.DateTimeFormatOptions;
409
405
  autoClose: boolean;
410
- pickerPosition: import('./MazPopover.vue').PopoverPosition;
406
+ pickerPosition: import('./MazPopover.vue').MazPopoverPosition;
411
407
  onlyTime: boolean;
412
408
  useBrowserLocale: boolean;
413
409
  fetchLocal: boolean;
@@ -417,11 +413,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
417
413
  $data: {};
418
414
  $props: {
419
415
  readonly modelValue?: boolean | undefined;
420
- readonly position?: import('./MazPopover.vue').PopoverPosition | undefined;
421
- readonly preferPosition?: import('./MazPopover.vue').PopoverPosition | undefined;
422
- readonly fallbackPosition?: import('./MazPopover.vue').PopoverPosition | undefined;
423
- readonly trigger?: import('./MazPopover.vue').PopoverTrigger | undefined;
424
- readonly role?: import('./MazPopover.vue').PopoverRole | undefined;
416
+ readonly position?: import('./MazPopover.vue').MazPopoverPosition | undefined;
417
+ readonly preferPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
418
+ readonly fallbackPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
419
+ readonly trigger?: import('./MazPopover.vue').MazPopoverTrigger | undefined;
420
+ readonly role?: import('./MazPopover.vue').MazPopoverRole | undefined;
425
421
  readonly ariaLabel?: string | undefined;
426
422
  readonly announceChanges?: boolean | undefined;
427
423
  readonly disabled?: boolean | undefined;
@@ -443,7 +439,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
443
439
  readonly trapFocus?: boolean | undefined;
444
440
  readonly keepOpenOnHover?: boolean | undefined;
445
441
  readonly block?: boolean | undefined;
446
- readonly positionDelay?: number | undefined;
442
+ readonly positionReference?: (string | HTMLElement) | undefined;
447
443
  readonly onClose?: (() => any) | undefined;
448
444
  readonly onToggle?: ((value: boolean) => any) | undefined;
449
445
  readonly onOpen?: (() => any) | undefined;
@@ -506,11 +502,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
506
502
  };
507
503
  $forceUpdate: () => void;
508
504
  $nextTick: typeof import('vue').nextTick;
509
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /**
510
- * CSS selector for a custom element that triggers the picker
511
- * @type {string}
512
- * @example '#my-button', '.trigger-class'
513
- */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
505
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
514
506
  } & Readonly<{}> & Omit<Readonly<{
515
507
  modelValue?: boolean;
516
508
  } & MazPopoverProps> & Readonly<{
@@ -0,0 +1,47 @@
1
+ import { Ref } from 'vue';
2
+ import { MazBtnProps } from '../MazBtn.vue';
3
+ import { MazDialogConfirmInternalProps } from '../MazDialogConfirm.vue';
4
+ export interface MazDialogConfirmState {
5
+ id: string;
6
+ isActive: boolean;
7
+ accept: (value: unknown) => void;
8
+ reject?: (reason?: unknown) => void;
9
+ }
10
+ export interface MazDialogConfirmButtonAction extends Omit<MazBtnProps, 'type'> {
11
+ type: never;
12
+ text?: string;
13
+ onClick: () => unknown;
14
+ }
15
+ export interface MazDialogConfirmButtonPromised extends Omit<MazBtnProps, 'type'> {
16
+ text?: string;
17
+ type: 'accept' | 'reject';
18
+ response?: unknown;
19
+ }
20
+ export type MazDialogConfirmButton = MazDialogConfirmButtonPromised | MazDialogConfirmButtonAction;
21
+ export type MazDialogConfirmData = Omit<MazDialogConfirmInternalProps, 'identifier'>;
22
+ export declare const defaultData: {
23
+ buttons: undefined;
24
+ acceptText: string;
25
+ hideAcceptButton: false;
26
+ acceptProps: {
27
+ color: "success";
28
+ type: "accept";
29
+ response: string;
30
+ };
31
+ rejectText: string;
32
+ hideRejectButton: false;
33
+ rejectProps: {
34
+ color: "destructive";
35
+ type: "reject";
36
+ response: string;
37
+ };
38
+ };
39
+ declare function showDialogAndWaitChoice(identifier: string, callback?: () => unknown): Promise<unknown>;
40
+ export declare function useMazDialogConfirm(): {
41
+ data: Ref<MazDialogConfirmData, MazDialogConfirmData>;
42
+ dialogState: Ref<MazDialogConfirmState[], MazDialogConfirmState[]>;
43
+ showDialogAndWaitChoice: typeof showDialogAndWaitChoice;
44
+ reject: (currentDialog: MazDialogConfirmState, response?: unknown, onClick?: () => unknown) => Promise<unknown>;
45
+ accept: (currentDialog: MazDialogConfirmState, response?: unknown, onClick?: () => unknown) => Promise<unknown>;
46
+ };
47
+ export {};
@@ -1,7 +1,8 @@
1
- import { MazDialogProps } from './MazDialog.vue';
2
- import { MazDialogPromiseButton, MazDialogPromiseData } from './MazDialogPromise/useMazDialogPromise';
3
1
  import { ComponentPublicInstance, ComputedRef } from 'vue';
4
- export interface MazDialogPromiseInternalProps {
2
+ import { MazBtnProps } from './MazBtn.vue';
3
+ import { MazDialogProps } from './MazDialog.vue';
4
+ import { MazDialogConfirmButton, MazDialogConfirmData } from './MazDialogConfirm/useMazDialogConfirm';
5
+ export interface MazDialogConfirmInternalProps {
5
6
  /**
6
7
  * Uniq identifier of the dialog
7
8
  * @description This is used to identify the dialog in the state
@@ -15,22 +16,54 @@ export interface MazDialogPromiseInternalProps {
15
16
  * Dialog message displayed in the body
16
17
  */
17
18
  message?: string;
19
+ /**
20
+ * Text for the reject button - will be applied only if buttons props is not provided
21
+ * @default undefined
22
+ */
23
+ rejectText?: string;
24
+ /**
25
+ * Props for the reject button - will be applied only if buttons props is not provided
26
+ * @default { color: 'destructive', type: 'reject', text: 'Cancel', response: 'reject' }
27
+ * @type {Omit<MazBtnProps, 'type'> & MazDialogConfirmButton}
28
+ */
29
+ rejectProps?: Omit<MazBtnProps, 'type'> & MazDialogConfirmButton;
30
+ /**
31
+ * Whether to display the reject button
32
+ * @default true
33
+ */
34
+ hideRejectButton?: boolean;
35
+ /**
36
+ * Text for the accept button
37
+ * @default undefined
38
+ */
39
+ acceptText?: string;
40
+ /**
41
+ * Props for the accept button - will be applied only if buttons props is not provided
42
+ * @default { color: 'success', type: 'accept', text: 'Confirm', response: 'accept' }
43
+ * @type {Omit<MazBtnProps, 'type'> & MazDialogConfirmButton}
44
+ */
45
+ acceptProps?: Omit<MazBtnProps, 'type'> & MazDialogConfirmButton;
46
+ /**
47
+ * Whether to display the accept button
48
+ * @default true
49
+ */
50
+ hideAcceptButton?: boolean;
18
51
  /**
19
52
  * Buttons to display in the footer
20
- * @default [{ text: 'Confirm', color: 'success', type: 'accept' }, { text: 'Cancel', color: 'destructive', type: 'reject' }]
53
+ * @default undefined
21
54
  */
22
- buttons?: MazDialogPromiseButton[];
55
+ buttons?: MazDialogConfirmButton[];
23
56
  }
24
- export type MazDialogPromiseProps = MazDialogPromiseInternalProps & MazDialogPromiseData & MazDialogProps;
25
- export { useMazDialogPromise } from './MazDialogPromise/useMazDialogPromise';
26
- export type { MazDialogPromiseButton, MazDialogPromiseData } from './MazDialogPromise/useMazDialogPromise';
27
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<MazDialogPromiseProps, {
57
+ export type MazDialogConfirmProps = MazDialogConfirmInternalProps & MazDialogConfirmData & MazDialogProps;
58
+ export { useMazDialogConfirm } from './MazDialogConfirm/useMazDialogConfirm';
59
+ export type { MazDialogConfirmButton, MazDialogConfirmData } from './MazDialogConfirm/useMazDialogConfirm';
60
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<MazDialogConfirmProps, {
28
61
  close: () => void;
29
62
  isActive: ComputedRef<boolean>;
30
63
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
31
64
  close: (value: void) => any;
32
65
  open: (value: void) => any;
33
- }, string, import('vue').PublicProps, Readonly<MazDialogPromiseProps> & Readonly<{
66
+ }, string, import('vue').PublicProps, Readonly<MazDialogConfirmProps> & Readonly<{
34
67
  onClose?: ((value?: void | undefined) => any) | undefined;
35
68
  onOpen?: ((value?: void | undefined) => any) | undefined;
36
69
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -2,25 +2,25 @@ import { IconComponent } from '@maz-ui/icons';
2
2
  import { HTMLAttributes } from 'vue';
3
3
  import { RouteLocationRaw } from 'vue-router';
4
4
  import { MazLinkProps } from './MazLink.vue';
5
- import { MazColor, MazSize } from './types';
6
5
  import { MazPopoverProps } from './MazPopover.vue';
6
+ import { MazColor, MazSize } from './types';
7
7
  type __VLS_Props = MazDropdownProps;
8
- type ItemBase = Record<string, unknown> & {
8
+ type MazDropdownItemBase = Record<string, unknown> & {
9
9
  label: string;
10
10
  class?: unknown;
11
11
  color?: MazColor;
12
12
  };
13
- type LinkItem = ItemBase & MazLinkProps & {
13
+ type MazDropdownLinkItem = MazDropdownItemBase & MazLinkProps & {
14
14
  target?: string;
15
15
  href?: string;
16
16
  to?: RouteLocationRaw;
17
17
  };
18
- type ActionItem = ItemBase & {
18
+ type MazDropdownActionItem = MazDropdownItemBase & {
19
19
  onClick?: () => unknown;
20
20
  };
21
- export type MenuItem = (LinkItem & {
21
+ export type MazDropdownMenuItem = (MazDropdownLinkItem & {
22
22
  action?: never;
23
- }) | (ActionItem & {
23
+ }) | (MazDropdownActionItem & {
24
24
  href?: never;
25
25
  to?: never;
26
26
  target?: never;
@@ -46,7 +46,7 @@ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue'> {
46
46
  /**
47
47
  * Menu items to display in the dropdown
48
48
  * Each item can be either a link (with href/to properties) or an action (with onClick function)
49
- * @type {MenuItem[]}
49
+ * @type {MazDropdownMenuItem[]}
50
50
  * @default []
51
51
  * @example
52
52
  * [
@@ -54,7 +54,7 @@ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue'> {
54
54
  * { label: 'Settings', onClick: () => console.log('Settings clicked') }
55
55
  * ]
56
56
  */
57
- items?: MenuItem[];
57
+ items?: MazDropdownMenuItem[];
58
58
  /**
59
59
  * Unique identifier for the dropdown component
60
60
  * @type {string}
@@ -63,8 +63,8 @@ export interface MazDropdownProps extends Omit<MazPopoverProps, 'modelValue'> {
63
63
  /**
64
64
  * Determines how the dropdown should be triggered
65
65
  * @type {MazPopoverProps['trigger']}
66
- * @values click, hover, manual
67
- * @default 'click'
66
+ * @values click, hover, manual, adaptive
67
+ * @default 'adaptive'
68
68
  */
69
69
  trigger?: MazPopoverProps['trigger'];
70
70
  /**
@@ -172,14 +172,14 @@ declare function __VLS_template(): {
172
172
  open: () => void;
173
173
  }): any;
174
174
  dropdown?(_: {
175
- items: MenuItem[];
175
+ items: MazDropdownMenuItem[];
176
176
  open: () => void;
177
177
  close: () => void;
178
178
  isOpen: true;
179
179
  toggle: () => void;
180
180
  }): any;
181
181
  menuitem?(_: {
182
- item: MenuItem;
182
+ item: MazDropdownMenuItem;
183
183
  open: () => void;
184
184
  close: () => void;
185
185
  isOpen: true;
@@ -192,6 +192,12 @@ export interface MazInputProps<T = MazInputValue> {
192
192
  * @example "email"
193
193
  */
194
194
  autocomplete?: string;
195
+ /**
196
+ * Loading state for the input field. Used to show a loading spinner
197
+ * @note Spinner can be replace with the `loader` slot
198
+ * @default false
199
+ */
200
+ loading?: boolean;
195
201
  }
196
202
  declare const _default: <T extends MazInputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
197
203
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
@@ -207,6 +213,7 @@ declare const _default: <T extends MazInputValue>(__VLS_props: NonNullable<Await
207
213
  slots: {
208
214
  'left-icon'?(_: {}): any;
209
215
  'right-icon'?(_: {}): any;
216
+ loader?(_: {}): any;
210
217
  };
211
218
  emit: ((evt: "blur", event: Event) => void) & ((evt: "change", event: Event) => void) & ((evt: "click", event: Event) => void) & ((evt: "focus", event: Event) => void) & ((evt: "input", event: Event) => void) & ((evt: "update:model-value", value?: T | undefined) => void);
212
219
  }>) => import('vue').VNode & {
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes } from 'vue';
2
- import { MazSize } from './types';
3
2
  import { MazInputProps } from './MazInput.vue';
3
+ import { MazSize } from './types';
4
4
  export interface MazInputNumberProps {
5
5
  /**
6
6
  * The inline style object for the component.
@@ -119,7 +119,7 @@ declare const _default: import('vue').DefineComponent<MazInputNumberProps, {}, {
119
119
  step: number;
120
120
  min: number;
121
121
  max: number;
122
- inputmode: "search" | "text" | "none" | "email" | "tel" | "decimal" | "url" | "numeric";
122
+ inputmode: "search" | "text" | "none" | "decimal" | "email" | "url" | "numeric" | "tel";
123
123
  textCenter: boolean;
124
124
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
125
125
  export default _default;
@@ -1,11 +1,11 @@
1
1
  import { CountryCode, Examples, getCountries, getCountryCallingCode } from 'libphonenumber-js';
2
- import { Results } from './types';
2
+ import { MazInputPhoneNumberData } from '../MazInputPhoneNumber.vue';
3
3
  declare function isCountryAvailable(locale: string): boolean;
4
4
  declare function getPhoneNumberResults({ phoneNumber, countryCode, checkCountryCode, }: {
5
5
  phoneNumber?: string | undefined | null;
6
6
  countryCode?: CountryCode | undefined | null;
7
7
  checkCountryCode?: boolean;
8
- }): Results;
8
+ }): MazInputPhoneNumberData;
9
9
  declare function getPhoneNumberExamplesFile(): Promise<Examples>;
10
10
  declare function getPhoneNumberExample(countryCode?: CountryCode | undefined | null): string | undefined;
11
11
  declare function getAsYouTypeFormat(countryCode?: CountryCode | undefined | null, phoneNumber?: string | undefined | null): string | undefined;
@@ -1,10 +1,14 @@
1
1
  import { CountryCode } from 'libphonenumber-js';
2
- import { Country } from './types';
2
+ export interface CountryOption {
3
+ code: CountryCode;
4
+ dialCode: string;
5
+ name: string;
6
+ }
3
7
  declare function getBrowserLocale(): {
4
8
  locale: string;
5
9
  browserLocale: string;
6
10
  } | undefined;
7
- declare function getCountryList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): Country[] | undefined;
11
+ declare function getCountryList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): CountryOption[] | undefined;
8
12
  declare function fetchCountryCode(): Promise<{
9
13
  data: CountryCode;
10
14
  error: undefined;
@@ -1,9 +1,24 @@
1
1
  import { MazTranslationsNestedSchema } from '@maz-ui/translations/src/types.js';
2
- import { CountryCode } from 'libphonenumber-js';
2
+ import { CountryCallingCode, CountryCode, NationalNumber, NumberType } from 'libphonenumber-js';
3
3
  import { HTMLAttributes } from 'vue';
4
- import { Results } from './MazInputPhoneNumber/types';
5
4
  import { MazPopoverProps } from './MazPopover.vue';
6
5
  import { MazColor, MazSize } from './types';
6
+ export interface MazInputPhoneNumberData {
7
+ isValid: boolean;
8
+ isPossible?: boolean;
9
+ countryCode?: CountryCode | undefined | null;
10
+ parsedCountryCode?: CountryCode | undefined | null;
11
+ countryCallingCode?: CountryCallingCode;
12
+ nationalNumber?: NationalNumber;
13
+ type?: NumberType;
14
+ formatInternational?: string;
15
+ formatNational?: string;
16
+ uri?: string;
17
+ e164?: string;
18
+ rfc3966?: string;
19
+ possibleCountries?: CountryCode[];
20
+ phoneNumber?: string | undefined | null;
21
+ }
7
22
  export interface MazInputPhoneNumberProps {
8
23
  /**
9
24
  * Style attribut of the component root element
@@ -213,7 +228,11 @@ export interface MazInputPhoneNumberProps {
213
228
  * @type {Record<string, unknown>}
214
229
  * @default { autocomplete: 'tel', name: 'phone', inputmode: 'tel' }
215
230
  */
216
- phoneInputAttributes?: Record<string, unknown>;
231
+ phoneInputAttributes?: Record<string, unknown> & {
232
+ name: string;
233
+ inputmode: HTMLAttributes['inputmode'];
234
+ autocomplete: string;
235
+ };
217
236
  }
218
237
  /** Models */
219
238
  declare const phoneNumber: import('vue').Ref<string | null | undefined, string | null | undefined>;
@@ -223,9 +242,9 @@ declare const results: import('vue').Ref<{
223
242
  isPossible?: boolean | undefined;
224
243
  countryCode?: CountryCode | null | undefined;
225
244
  parsedCountryCode?: CountryCode | null | undefined;
226
- countryCallingCode?: import('libphonenumber-js').CountryCallingCode | undefined;
227
- nationalNumber?: import('libphonenumber-js').NationalNumber | undefined;
228
- type?: import('libphonenumber-js').NumberType;
245
+ countryCallingCode?: CountryCallingCode | undefined;
246
+ nationalNumber?: NationalNumber | undefined;
247
+ type?: NumberType;
229
248
  formatInternational?: string | undefined;
230
249
  formatNational?: string | undefined;
231
250
  uri?: string | undefined;
@@ -233,14 +252,14 @@ declare const results: import('vue').Ref<{
233
252
  rfc3966?: string | undefined;
234
253
  possibleCountries?: CountryCode[] | undefined;
235
254
  phoneNumber?: string | undefined | null | undefined;
236
- }, Results | {
255
+ }, MazInputPhoneNumberData | {
237
256
  isValid: boolean;
238
257
  isPossible?: boolean | undefined;
239
258
  countryCode?: CountryCode | null | undefined;
240
259
  parsedCountryCode?: CountryCode | null | undefined;
241
- countryCallingCode?: import('libphonenumber-js').CountryCallingCode | undefined;
242
- nationalNumber?: import('libphonenumber-js').NationalNumber | undefined;
243
- type?: import('libphonenumber-js').NumberType;
260
+ countryCallingCode?: CountryCallingCode | undefined;
261
+ nationalNumber?: NationalNumber | undefined;
262
+ type?: NumberType;
244
263
  formatInternational?: string | undefined;
245
264
  formatNational?: string | undefined;
246
265
  uri?: string | undefined;
@@ -264,7 +283,7 @@ declare function __VLS_template(): {
264
283
  }): any;
265
284
  'country-list-flag'?(_: {
266
285
  countryCode: CountryCode;
267
- option: import('./MazInputPhoneNumber/types').Country;
286
+ option: import('./MazInputPhoneNumber/useMazInputPhoneNumber').CountryOption;
268
287
  isSelected: boolean;
269
288
  }): any;
270
289
  };
@@ -316,12 +335,12 @@ declare function __VLS_template(): {
316
335
  };
317
336
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
318
337
  declare const __VLS_component: import('vue').DefineComponent<MazInputPhoneNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
319
- data: (results: Results) => any;
338
+ data: (results: MazInputPhoneNumberData) => any;
320
339
  "update:model-value": (value: string | null | undefined) => any;
321
340
  "country-code": (countryCode?: CountryCode | null | undefined) => any;
322
341
  "update:country-code": (countryCode?: CountryCode | null | undefined) => any;
323
342
  }, string, import('vue').PublicProps, Readonly<MazInputPhoneNumberProps> & Readonly<{
324
- onData?: ((results: Results) => any) | undefined;
343
+ onData?: ((results: MazInputPhoneNumberData) => any) | undefined;
325
344
  "onUpdate:model-value"?: ((value: string | null | undefined) => any) | undefined;
326
345
  "onCountry-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
327
346
  "onUpdate:country-code"?: ((countryCode?: CountryCode | null | undefined) => any) | undefined;
@@ -333,7 +352,7 @@ declare const __VLS_component: import('vue').DefineComponent<MazInputPhoneNumber
333
352
  orientation: "row" | "col" | "responsive";
334
353
  example: boolean;
335
354
  useBrowserLocale: boolean;
336
- listPosition: import('./MazPopover.vue').PopoverPosition;
355
+ listPosition: import('./MazPopover.vue').MazPopoverPosition;
337
356
  searchThreshold: number;
338
357
  hideFlags: boolean;
339
358
  showCodeInList: boolean;
@@ -345,7 +364,11 @@ declare const __VLS_component: import('vue').DefineComponent<MazInputPhoneNumber
345
364
  validationSuccess: boolean;
346
365
  displayCountryName: boolean;
347
366
  countrySelectAttributes: Record<string, unknown>;
348
- phoneInputAttributes: Record<string, unknown>;
367
+ phoneInputAttributes: Record<string, unknown> & {
368
+ name: string;
369
+ inputmode: HTMLAttributes["inputmode"];
370
+ autocomplete: string;
371
+ };
349
372
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
350
373
  PhoneInputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
351
374
  modelValue?: string | undefined | null;
@@ -44,8 +44,8 @@ declare const _default: import('vue').DefineComponent<MazInputTagsProps, {}, {},
44
44
  class: HTMLAttributes["class"];
45
45
  color: MazColor;
46
46
  disabled: boolean;
47
- modelValue: (string | number)[];
48
47
  placeholder: string;
48
+ modelValue: (string | number)[];
49
49
  addTagsOnBlur: boolean;
50
50
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
51
51
  export default _default;
@@ -47,15 +47,15 @@ declare function __VLS_template(): {
47
47
  };
48
48
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
49
49
  declare const __VLS_component: import('vue').DefineComponent<MazLazyImgProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
50
- error: (el: HTMLElement) => any;
51
- loaded: (el: HTMLElement) => any;
52
- loading: (el: HTMLElement) => any;
53
- intersecting: (el: HTMLElement) => any;
50
+ error: (el: Element) => any;
51
+ loaded: (el: Element) => any;
52
+ loading: (el: Element) => any;
53
+ intersecting: (el: Element) => any;
54
54
  }, string, import('vue').PublicProps, Readonly<MazLazyImgProps> & Readonly<{
55
- onError?: ((el: HTMLElement) => any) | undefined;
56
- onLoaded?: ((el: HTMLElement) => any) | undefined;
57
- onLoading?: ((el: HTMLElement) => any) | undefined;
58
- onIntersecting?: ((el: HTMLElement) => any) | undefined;
55
+ onError?: ((el: Element) => any) | undefined;
56
+ onLoaded?: ((el: Element) => any) | undefined;
57
+ onLoading?: ((el: Element) => any) | undefined;
58
+ onIntersecting?: ((el: Element) => any) | undefined;
59
59
  }>, {
60
60
  src: MazImage | null;
61
61
  style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
@@ -1,7 +1,18 @@
1
1
  import { IconComponent } from '@maz-ui/icons';
2
+ import { HTMLAttributes } from 'vue';
2
3
  import { RouteLocationRaw } from 'vue-router';
3
4
  import { MazColor } from './types';
4
5
  export interface MazLinkProps {
6
+ /**
7
+ * The class attribute of the link
8
+ * @default undefined
9
+ */
10
+ class?: HTMLAttributes['class'];
11
+ /**
12
+ * The style attribute of the link
13
+ * @default undefined
14
+ */
15
+ style?: HTMLAttributes['style'];
5
16
  /**
6
17
  * The component to use for the link - if not provided, it will be `router-link` if `to` is provided, will be `a` if `href` is provided, otherwise it will be `button`, you can force the component to be used with `as` prop
7
18
  * @default depends on the provided props
@@ -1,9 +1,9 @@
1
1
  import { HTMLAttributes } from 'vue';
2
2
  import { MazColor } from './types';
3
3
  type __VLS_Props = MazPopoverProps;
4
- export type PopoverPosition = 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
5
- export type PopoverTrigger = 'click' | 'hover' | 'manual';
6
- export type PopoverRole = 'dialog' | 'tooltip' | 'menu';
4
+ export type MazPopoverPosition = 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
5
+ export type MazPopoverTrigger = 'click' | 'hover' | 'manual' | 'adaptive';
6
+ export type MazPopoverRole = 'dialog' | 'tooltip' | 'menu';
7
7
  export interface MazPopoverProps {
8
8
  /**
9
9
  * Controls the popover open state
@@ -18,35 +18,35 @@ export interface MazPopoverProps {
18
18
  * @default auto
19
19
  * @description Position of the popover relative to trigger
20
20
  */
21
- position?: PopoverPosition;
21
+ position?: MazPopoverPosition;
22
22
  /**
23
23
  * Preferred position of the popover relative to trigger when auto position is used
24
24
  * @values auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end
25
25
  * @default 'bottom-start'
26
26
  * @description Preferred position of the popover relative to trigger
27
27
  */
28
- preferPosition?: PopoverPosition;
28
+ preferPosition?: MazPopoverPosition;
29
29
  /**
30
30
  * Fallback position of the popover relative to trigger when prefer position is not visible
31
31
  * @values auto, top, bottom, left, right, top-start, top-end, bottom-start, bottom-end, left-start, left-end, right-start, right-end
32
32
  * @default auto
33
33
  * @description Fallback position of the popover relative to trigger
34
34
  */
35
- fallbackPosition?: PopoverPosition;
35
+ fallbackPosition?: MazPopoverPosition;
36
36
  /**
37
37
  * How the popover is triggered
38
- * @values click, hover, manual
38
+ * @values click, hover, manual, adaptive
39
39
  * @default click
40
- * @description How the popover is triggered
40
+ * @description How the popover is triggered. 'adaptive' uses hover on desktop and click on mobile
41
41
  */
42
- trigger?: PopoverTrigger;
42
+ trigger?: MazPopoverTrigger;
43
43
  /**
44
44
  * ARIA role for accessibility
45
45
  * @values dialog, tooltip
46
46
  * @default dialog
47
47
  * @description ARIA role for accessibility
48
48
  */
49
- role?: PopoverRole;
49
+ role?: MazPopoverRole;
50
50
  /**
51
51
  * ARIA label for the popover
52
52
  * @default undefined
@@ -155,11 +155,14 @@ export interface MazPopoverProps {
155
155
  */
156
156
  block?: boolean;
157
157
  /**
158
- * Delay before setting the position in milliseconds
159
- * @description Useful when the popover content is not immediately visible or rendered
160
- * @default 50
158
+ * CSS selector or element reference to use for positioning calculations
159
+ * @description When provided, the popover will position relative to this element instead of the trigger
160
+ * Useful for components with labels where you want to position relative to the actual input
161
+ * @type {string | HTMLElement}
162
+ * @default undefined
163
+ * @example "input" or "#my-input" or HTMLElement
161
164
  */
162
- positionDelay?: number;
165
+ positionReference?: string | HTMLElement;
163
166
  }
164
167
  declare function updatePosition(): void;
165
168
  declare function open(): void;
@@ -212,7 +215,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
212
215
  toggle: typeof toggle;
213
216
  /**
214
217
  * Check if the popover is open
215
- * @type {Ref<boolean>}
218
+ * @type {ComputedRef<boolean>}
216
219
  * @description Reactive reference to the popover open state
217
220
  * @usage `const isPopoverOpen = mazPopoverInstance.value?.isOpen`
218
221
  */
@@ -18,7 +18,7 @@ export interface MazRadioButtonsProps<T = string | number | boolean> {
18
18
  /** The name of the radio group */
19
19
  name?: string;
20
20
  /** The color of the selected radio buttons */
21
- color?: MazColor;
21
+ color?: MazColor | 'background';
22
22
  /** Add elevation to the radio buttons */
23
23
  elevation?: boolean;
24
24
  /**
@@ -1,8 +1,8 @@
1
1
  import { MazTranslationsNestedSchema } from '@maz-ui/translations/src/types.js';
2
2
  import { HTMLAttributes } from 'vue';
3
3
  import { MazInputValue } from './MazInput.vue';
4
- import { MazColor, MazSize } from './types';
5
4
  import { MazPopoverProps } from './MazPopover.vue';
5
+ import { MazColor, MazSize } from './types';
6
6
  export interface MazSelectNormalizedOption {
7
7
  [key: string]: MazInputValue;
8
8
  }
@@ -11,7 +11,7 @@ export interface MazSelectOptionWithOptGroup {
11
11
  options: (MazSelectNormalizedOption | string | number | boolean)[];
12
12
  }
13
13
  export type MazSelectOption = MazSelectNormalizedOption | string | number | boolean | MazSelectOptionWithOptGroup;
14
- export interface MazSelectProps<Value extends MazInputValue, Option extends MazSelectOption, Multiple extends boolean> {
14
+ export interface MazSelectProps<Value extends MazInputValue = MazInputValue, Option extends MazSelectOption = MazSelectOption, Multiple extends boolean = false> {
15
15
  /**
16
16
  * Style attribut of the component root element
17
17
  * @type {HTMLAttributes['style']}