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
@@ -1,7 +1,6 @@
1
- import { createElementBlock, openBlock, createElementVNode, defineComponent, mergeModels, defineAsyncComponent, computed, useModel, useTemplateRef, onBeforeMount, ref, watch, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createVNode, renderSlot, withDirectives, mergeProps, createCommentVNode, vShow } from "vue";
2
- import { MazCalendar, MazClock } from "@maz-ui/icons";
3
- import { u as useTranslations } from "./useTranslations.BXuww4ux.js";
4
- import { f as formatDate } from "./formatDate.DZ_OzdnV.js";
1
+ import { defineComponent, mergeModels, defineAsyncComponent, computed, useModel, useTemplateRef, onBeforeMount, ref, watch, createBlock, openBlock, unref, normalizeStyle, normalizeClass, withCtx, createVNode, renderSlot, withDirectives, mergeProps, createCommentVNode, vShow } from "vue";
2
+ import { MazChevronDown, MazCalendar, MazClock } from "@maz-ui/icons";
3
+ import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
5
4
  import dayjs from "dayjs";
6
5
  import customParseFormat from "dayjs/plugin/customParseFormat";
7
6
  import isBetween from "dayjs/plugin/isBetween";
@@ -9,25 +8,24 @@ import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
9
8
  import { c as capitalize } from "./capitalize.BF6CDS_4.js";
10
9
  import weekday from "dayjs/plugin/weekday";
11
10
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
12
- import '../assets/MazDatePicker.V5JwKPrQ.css';const _hoisted_1 = {
13
- xmlns: "http://www.w3.org/2000/svg",
14
- width: "1em",
15
- height: "1em",
16
- fill: "none",
17
- viewBox: "0 0 24 24"
11
+ import '../assets/MazDatePicker.8GyrtM-j.css';const DEFAULT_OPTIONS = {
12
+ month: "short",
13
+ day: "numeric",
14
+ year: "numeric"
18
15
  };
19
- function render(_ctx, _cache) {
20
- return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
21
- createElementVNode("path", {
22
- stroke: "currentColor",
23
- "stroke-linecap": "round",
24
- "stroke-linejoin": "round",
25
- "stroke-width": "1.5",
26
- d: "m19.5 8.25-7.5 7.5-7.5-7.5"
27
- }, null, -1)
28
- ]));
16
+ function formatDate(date, locale, options) {
17
+ if (locale === void 0)
18
+ throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
19
+ if (typeof locale != "string")
20
+ throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
21
+ const opts = options ?? DEFAULT_OPTIONS;
22
+ try {
23
+ const usedDate = date instanceof Date ? date : new Date(date);
24
+ return new Intl.DateTimeFormat(locale, opts).format(usedDate);
25
+ } catch (error) {
26
+ throw new Error(`[maz-ui](FilterDate) ${error}`);
27
+ }
29
28
  }
30
- const MazChevronDownIcon = { render };
31
29
  dayjs.extend(weekday);
32
30
  function getFormattedDate({
33
31
  value,
@@ -237,7 +235,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
237
235
  setup(__props, { emit: __emit }) {
238
236
  const props = __props, emits = __emit, { t, locale } = useTranslations();
239
237
  dayjs.extend(customParseFormat), dayjs.extend(isBetween);
240
- const MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazPopover = defineAsyncComponent(() => import("../components/MazPopover.js")), MazPickerContainer = defineAsyncComponent(() => import("./MazPickerContainer.DnfB3Dqg.js")), instanceId = useInstanceUniqId({ componentName: "MazDatePicker", providedId: props.id }), currentValue = computed({
238
+ const MazInput = defineAsyncComponent(() => import("../components/MazInput.js")), MazPopover = defineAsyncComponent(() => import("../components/MazPopover.js")), MazPickerContainer = defineAsyncComponent(() => import("./MazPickerContainer.Mrh-Q52I.js")), instanceId = useInstanceUniqId({ componentName: "MazDatePicker", providedId: props.id }), currentValue = computed({
241
239
  get: () => typeof props.modelValue == "object" || props.range ? {
242
240
  start: typeof props.modelValue == "object" && props.modelValue.start ? dayjs(props.modelValue.start, props.format).format() : void 0,
243
241
  end: typeof props.modelValue == "object" && props.modelValue.end ? dayjs(props.modelValue.end, props.format).format() : void 0
@@ -407,7 +405,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
407
405
  disabled: _ctx.disabled,
408
406
  block: _ctx.block,
409
407
  "prefer-position": _ctx.pickerPosition,
410
- "position-delay": 100,
411
408
  "fallback-position": "top-start"
412
409
  }, {
413
410
  trigger: withCtx(({ isOpen, close, open: openPicker, toggle: togglePicker }) => [
@@ -439,7 +436,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
439
436
  })) : createCommentVNode("", !0)
440
437
  ]),
441
438
  "right-icon": withCtx(() => [
442
- createVNode(unref(MazChevronDownIcon), { class: "m-date-picker__button__chevron maz-text-lg" })
439
+ createVNode(unref(MazChevronDown), { class: "m-date-picker__button__chevron maz-text-lg" })
443
440
  ]),
444
441
  _: 1
445
442
  }, 16, ["model-value", "label", "disabled", "placeholder", "color"]), [
@@ -481,16 +478,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
481
478
  _: 3
482
479
  }, 8, ["style", "class", "disabled", "block", "prefer-position"]));
483
480
  }
484
- }), MazDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d69298f5"]]);
481
+ }), MazDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f42bdf0e"]]);
485
482
  export {
486
483
  MazDatePicker as M,
487
- getDaysInMonth as a,
488
- getFirstDayOfMonth as b,
489
- isRangeValue as c,
490
- isValidDate as d,
491
- isSameDay as e,
492
- findNearestNumberInList as f,
484
+ findNearestNumberInList as a,
485
+ getDaysInMonth as b,
486
+ getFirstDayOfMonth as c,
487
+ isRangeValue as d,
488
+ isValidDate as e,
489
+ formatDate as f,
493
490
  getDaysOfWeek as g,
491
+ isSameDay as h,
494
492
  isSameDate as i,
495
493
  scrollToTarget as s
496
494
  };
@@ -1,17 +1,21 @@
1
- import { ref, defineComponent, createPropsRestProxy, defineAsyncComponent, computed, createBlock, openBlock, mergeProps, unref, withCtx, renderSlot, createElementVNode, createElementBlock, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
1
+ import { ref, defineComponent, createPropsRestProxy, defineAsyncComponent, computed, createBlock, openBlock, mergeProps, unref, withCtx, renderSlot, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import MazDialog from "../components/MazDialog.js";
3
3
  const defaultData = {
4
- buttons: [{
5
- text: "Confirm",
4
+ buttons: void 0,
5
+ acceptText: "Confirm",
6
+ hideAcceptButton: !1,
7
+ acceptProps: {
6
8
  color: "success",
7
9
  type: "accept",
8
10
  response: "accept"
9
- }, {
10
- text: "Cancel",
11
+ },
12
+ rejectText: "Cancel",
13
+ hideRejectButton: !1,
14
+ rejectProps: {
11
15
  color: "destructive",
12
16
  type: "reject",
13
17
  response: "reject"
14
- }]
18
+ }
15
19
  }, data = ref(defaultData), dialogState = ref([]);
16
20
  function showDialogAndWaitChoice(identifier, callback) {
17
21
  return new Promise((resolve, reject) => {
@@ -39,7 +43,7 @@ function responseDialog(type, currentDialog, response) {
39
43
  removeDialogFromState(currentDialog.id);
40
44
  }, 500), response;
41
45
  }
42
- function useMazDialogPromise() {
46
+ function useMazDialogConfirm() {
43
47
  return {
44
48
  data,
45
49
  dialogState,
@@ -49,11 +53,17 @@ function useMazDialogPromise() {
49
53
  };
50
54
  }
51
55
  const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main = /* @__PURE__ */ defineComponent({
52
- __name: "MazDialogPromise",
56
+ __name: "MazDialogConfirm",
53
57
  props: {
54
58
  identifier: {},
55
59
  title: {},
56
60
  message: {},
61
+ rejectText: {},
62
+ rejectProps: {},
63
+ hideRejectButton: { type: Boolean },
64
+ acceptText: {},
65
+ acceptProps: {},
66
+ hideAcceptButton: { type: Boolean },
57
67
  buttons: {},
58
68
  modelValue: { type: Boolean },
59
69
  hideCloseButton: { type: Boolean },
@@ -74,10 +84,43 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
74
84
  },
75
85
  emits: ["open", "close"],
76
86
  setup(__props, { expose: __expose }) {
77
- const dialogProps = createPropsRestProxy(__props, ["identifier", "message", "buttons", "title", "modelValue", "closeOnEscape"]), MazBtn = defineAsyncComponent(() => import("../components/MazBtn.js")), { dialogState: dialogState2, reject, accept, data: composableData } = useMazDialogPromise(), currentData = computed(() => ({
78
- ...defaultData,
79
- ...composableData.value
80
- })), currentButtons = computed(() => __props.buttons ?? currentData.value.buttons), currentModal = computed(
87
+ const dialogProps = createPropsRestProxy(__props, ["identifier", "message", "buttons", "title", "modelValue", "closeOnEscape", "rejectText", "acceptText", "rejectProps", "acceptProps", "hideRejectButton", "hideAcceptButton"]), MazBtn = defineAsyncComponent(() => import("../components/MazBtn.js")), { dialogState: dialogState2, reject, accept, data: data2 } = useMazDialogConfirm(), currentData = computed(() => {
88
+ const baseData = {
89
+ ...defaultData,
90
+ ...data2.value,
91
+ hideAcceptButton: data2.value.hideAcceptButton ?? defaultData.hideAcceptButton,
92
+ hideRejectButton: data2.value.hideRejectButton ?? defaultData.hideRejectButton,
93
+ acceptProps: {
94
+ ...defaultData.acceptProps,
95
+ ...data2.value.acceptProps,
96
+ text: __props.acceptText ?? data2.value.acceptText ?? data2.value.acceptProps?.text ?? defaultData.acceptText,
97
+ type: data2.value.acceptProps?.type ?? defaultData.acceptProps.type
98
+ },
99
+ rejectProps: {
100
+ ...defaultData.rejectProps,
101
+ ...data2.value.rejectProps,
102
+ text: __props.rejectText ?? data2.value.rejectText ?? data2.value.rejectProps?.text ?? defaultData.rejectText,
103
+ type: data2.value.rejectProps?.type ?? defaultData.rejectProps.type
104
+ }
105
+ };
106
+ return {
107
+ ...baseData,
108
+ acceptText: __props.acceptText ?? baseData.acceptText,
109
+ rejectText: __props.rejectText ?? baseData.rejectText,
110
+ hideAcceptButton: __props.hideAcceptButton ?? baseData.hideAcceptButton,
111
+ hideRejectButton: __props.hideRejectButton ?? baseData.hideRejectButton,
112
+ acceptProps: {
113
+ ...baseData.acceptProps,
114
+ ...__props.acceptProps,
115
+ text: __props.acceptText ?? __props.acceptProps?.text ?? baseData.acceptText ?? baseData.acceptProps.text
116
+ },
117
+ rejectProps: {
118
+ ...baseData.rejectProps,
119
+ ...__props.rejectProps,
120
+ text: __props.rejectText ?? __props.rejectProps?.text ?? baseData.rejectText ?? baseData.rejectProps?.text
121
+ }
122
+ };
123
+ }), currentButtons = computed(() => __props.buttons ?? currentData.value.buttons), currentModal = computed(
81
124
  () => dialogState2.value.find(({ id }) => id === __props.identifier)
82
125
  ), dialog = ref();
83
126
  __expose({
@@ -93,7 +136,7 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
93
136
  isActive: computed(() => currentModal.value?.isActive ?? __props.modelValue ?? !1)
94
137
  });
95
138
  function isPromiseButton(button) {
96
- return "type" in button && (button.type === "accept" || button.type === "reject");
139
+ return button ? "type" in button && (button.type === "accept" || button.type === "reject") : !1;
97
140
  }
98
141
  function buttonClick(currentModal2, button) {
99
142
  return isPromiseButton(button) ? button.type === "accept" ? accept(currentModal2, button.response) : reject(currentModal2, button.response) : accept(currentModal2, void 0, button.onClick);
@@ -104,9 +147,9 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
104
147
  }, { ..._ctx.$attrs, ...dialogProps }, {
105
148
  "close-on-escape": _ctx.closeOnEscape,
106
149
  "model-value": currentModal.value?.isActive ?? _ctx.modelValue ?? !1,
107
- onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close", $event)),
108
- onOpen: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("open", $event)),
109
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(reject)(currentModal.value))
150
+ onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close", $event)),
151
+ onOpen: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("open", $event)),
152
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(reject)(currentModal.value))
110
153
  }), {
111
154
  title: withCtx(() => [
112
155
  renderSlot(_ctx.$slots, "title", {}, () => [
@@ -138,7 +181,24 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
138
181
  createTextVNode(toDisplayString(button.text), 1)
139
182
  ]),
140
183
  _: 2
141
- }, 1040, ["onClick"]))), 128)) : createCommentVNode("", !0)
184
+ }, 1040, ["onClick"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
185
+ currentData.value.hideAcceptButton ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: 0 }, {
186
+ ...currentData.value.acceptProps,
187
+ type: "button",
188
+ // onClick: undefined,
189
+ text: currentData.value.acceptText ?? currentData.value.acceptProps?.text
190
+ }, {
191
+ onClick: _cache[0] || (_cache[0] = ($event) => isPromiseButton(currentData.value.acceptProps) ? unref(accept)(currentModal.value, currentData.value.acceptProps.response) : currentData.value.acceptProps?.onClick?.())
192
+ }), null, 16)),
193
+ currentData.value.hideRejectButton ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: 1 }, {
194
+ ...currentData.value.rejectProps,
195
+ type: "button",
196
+ onClick: void 0,
197
+ text: currentData.value.rejectText ?? currentData.value.rejectProps?.text
198
+ }, {
199
+ onClick: _cache[1] || (_cache[1] = ($event) => isPromiseButton(currentData.value.rejectProps) ? unref(reject)(currentModal.value, currentData.value.rejectProps.response) : currentData.value.rejectProps?.onClick?.())
200
+ }), null, 16))
201
+ ], 64))
142
202
  ])
143
203
  ])
144
204
  ]),
@@ -148,5 +208,5 @@ const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main =
148
208
  });
149
209
  export {
150
210
  _sfc_main as _,
151
- useMazDialogPromise as u
211
+ useMazDialogConfirm as u
152
212
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent, mergeModels, defineAsyncComponent, useModel, computed, watch, createBlock, openBlock, normalizeStyle, normalizeClass, withCtx, createElementVNode, unref, renderSlot, createElementBlock, Fragment, renderList, createCommentVNode, mergeProps, withModifiers, createTextVNode, toDisplayString, withKeys, createVNode, createSlots, resolveDynamicComponent } from "vue";
1
+ import { defineComponent, mergeModels, defineAsyncComponent, useModel, computed, watch, createBlock, openBlock, normalizeStyle, normalizeClass, withCtx, createElementVNode, unref, renderSlot, createElementBlock, Fragment, renderList, mergeProps, withModifiers, createTextVNode, toDisplayString, withKeys, createVNode, createSlots, resolveDynamicComponent } from "vue";
2
2
  import { MazChevronDown } from "@maz-ui/icons";
3
- import { u as useTranslations } from "./useTranslations.BXuww4ux.js";
3
+ import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
4
4
  import { i as isClient } from "./isClient.WI4oSt66.js";
5
5
  import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
6
6
  import MazPopover from "../components/MazPopover.js";
7
- import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expanded", "onClick", "onKeypress"], _hoisted_2 = ["id"], _hoisted_3 = ["id"], _hoisted_4 = ["onClick", "onKeypress"], _sfc_main = /* @__PURE__ */ defineComponent({
7
+ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expanded"], _hoisted_2 = ["id"], _hoisted_3 = ["id"], _hoisted_4 = ["onClick", "onKeypress"], _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  inheritAttrs: !1,
9
9
  __name: "MazDropdown",
10
10
  props: /* @__PURE__ */ mergeModels({
@@ -13,7 +13,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
13
13
  class: {},
14
14
  items: { default: () => [] },
15
15
  id: {},
16
- trigger: { default: "click" },
16
+ trigger: { default: "adaptive" },
17
17
  color: { default: "transparent" },
18
18
  position: { default: "auto" },
19
19
  preferPosition: { default: "bottom-start" },
@@ -46,7 +46,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
46
46
  ariaDescribedby: {},
47
47
  trapFocus: { type: Boolean },
48
48
  keepOpenOnHover: { type: Boolean },
49
- positionDelay: {}
49
+ positionReference: {}
50
50
  }, {
51
51
  modelValue: { type: Boolean, required: !1, default: !1 },
52
52
  modelModifiers: {}
@@ -60,9 +60,6 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
60
60
  function setDropdown(value) {
61
61
  __props.disabled || (modelValue.value = value);
62
62
  }
63
- function isActionItem(item) {
64
- return "onClick" in item;
65
- }
66
63
  function isLinkItem(item) {
67
64
  return "href" in item || "to" in item;
68
65
  }
@@ -103,23 +100,17 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
103
100
  color: "background",
104
101
  position: _ctx.position,
105
102
  disabled: _ctx.disabled,
106
- "keep-open-on-hover": _ctx.trigger === "hover",
103
+ "keep-open-on-hover": _ctx.trigger === "hover" || _ctx.trigger === "adaptive",
107
104
  block: _ctx.block,
108
105
  "onUpdate:modelValue": setDropdown
109
106
  }, {
110
107
  trigger: withCtx(({ toggle, close, isOpen, open }) => [
111
108
  createElementVNode("div", {
112
109
  id: unref(instanceId),
113
- role: "button",
114
- tabindex: "0",
110
+ tabindex: "-1",
115
111
  class: "m-dropdown__wrapper",
116
112
  "aria-expanded": modelValue.value,
117
- "aria-haspopup": "menu",
118
- onClick: withModifiers(toggle, ["stop"]),
119
- onKeypress: [
120
- withKeys(withModifiers(toggle, ["stop", "prevent"]), ["enter"]),
121
- withKeys(withModifiers(toggle, ["stop", "prevent"]), ["space"])
122
- ]
113
+ "aria-haspopup": "menu"
123
114
  }, [
124
115
  createElementVNode("span", {
125
116
  id: `${unref(instanceId)}-labelspan`,
@@ -140,7 +131,6 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
140
131
  color: _ctx.color,
141
132
  disabled: _ctx.disabled
142
133
  }, _ctx.$attrs, {
143
- tabindex: "-1",
144
134
  block: _ctx.block,
145
135
  size: _ctx.size
146
136
  }), createSlots({
@@ -175,7 +165,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
175
165
  } : void 0
176
166
  ]), 1040, ["aria-labelledby", "color", "disabled", "block", "size"])
177
167
  ])
178
- ], 40, _hoisted_1)
168
+ ], 8, _hoisted_1)
179
169
  ]),
180
170
  default: withCtx(({ open, close, isOpen, toggle }) => [
181
171
  createElementVNode("div", {
@@ -224,11 +214,11 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
224
214
  ])
225
215
  ]),
226
216
  _: 2
227
- }, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : isActionItem(item) ? (openBlock(), createElementBlock("button", mergeProps({
217
+ }, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : (openBlock(), createElementBlock("button", mergeProps({
228
218
  key: 1,
229
219
  type: "button"
230
220
  }, { ref_for: !0 }, { ...item, onClick: void 0 }, {
231
- class: ["menuitem menuitem__button", [item.class, `--${item.color ?? "contrast"}`]],
221
+ class: ["menuitem menuitem__button", [item.class, item.color ? `--${item.color}` : ""]],
232
222
  onClick: withModifiers(($event) => runAction(item, $event), ["stop"]),
233
223
  onKeypress: withKeys(withModifiers(($event) => runAction(item, $event), ["stop", "prevent"]), ["enter"])
234
224
  }), [
@@ -241,7 +231,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
241
231
  }, () => [
242
232
  createTextVNode(toDisplayString(item.label), 1)
243
233
  ])
244
- ], 16, _hoisted_4)) : createCommentVNode("", !0)
234
+ ], 16, _hoisted_4))
245
235
  ])), 128))
246
236
  ])
247
237
  ], 14, _hoisted_3)
@@ -1,9 +1,9 @@
1
- import { ref, defineComponent, defineAsyncComponent, computed, onBeforeMount, onMounted, watch, provide, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, createCommentVNode, createVNode, unref, mergeProps, withCtx, createElementVNode, toDisplayString, renderSlot, nextTick } from "vue";
2
- import { u as useTranslations } from "./useTranslations.BXuww4ux.js";
1
+ import { ref, defineComponent, defineAsyncComponent, computed, onBeforeMount, onMounted, watch, provide, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createBlock, createCommentVNode, createVNode, mergeProps, withCtx, createElementVNode, toDisplayString, renderSlot, nextTick } from "vue";
2
+ import { u as useTranslations } from "./useTranslations.D5aoYwD7.js";
3
3
  import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
4
4
  import { getCountryCallingCode, getCountries, isSupportedCountry, getExampleNumber, parsePhoneNumberFromString, AsYouType } from "libphonenumber-js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
6
- import '../assets/MazInputPhoneNumber.vpA2mrZn.css';const examples = ref();
6
+ import '../assets/MazInputPhoneNumber.CrXS7DOY.css';const examples = ref();
7
7
  function isCountryAvailable(locale) {
8
8
  try {
9
9
  const response = isSupportedCountry(locale);
@@ -98,9 +98,9 @@ async function fetchLocaleIp() {
98
98
  }
99
99
  }
100
100
  function getBrowserLocale() {
101
- if (typeof window > "u")
101
+ if (typeof globalThis.window > "u")
102
102
  return;
103
- const browserLocale = window.navigator.language;
103
+ const browserLocale = globalThis.navigator.language;
104
104
  if (!browserLocale)
105
105
  return;
106
106
  let locale = browserLocale.slice(3, 7).toUpperCase();
@@ -156,7 +156,7 @@ function useMazInputPhoneNumber() {
156
156
  getCountryList
157
157
  };
158
158
  }
159
- const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_main = /* @__PURE__ */ defineComponent({
159
+ const _hoisted_1 = ["id"], _hoisted_2 = { class: "m-input-phone-number__country-list-code" }, _sfc_main = /* @__PURE__ */ defineComponent({
160
160
  name: "MazInputPhoneNumber",
161
161
  inheritAttrs: !1,
162
162
  __name: "MazInputPhoneNumber",
@@ -209,7 +209,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
209
209
  },
210
210
  emits: ["update:model-value", "country-code", "update:country-code", "data"],
211
211
  setup(__props, { emit: __emit }) {
212
- const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.CPjyZ8Sq.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
212
+ const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.BzL1_XS5.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
213
213
  componentName: "MazInputPhoneNumber",
214
214
  providedId: props.id
215
215
  }), phoneNumber = ref(), selectedCountry = ref(), { t } = useTranslations(), messages = computed(() => ({
@@ -273,7 +273,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
273
273
  updateTheResults({ phone: newPhoneNumber }), results.value.parsedCountryCode && results.value.parsedCountryCode !== selectedCountry.value && onCountryChanged({
274
274
  countryCode: results.value.parsedCountryCode,
275
275
  updateResults: !1
276
- }), results.value.isValid && hasAutoFormat.value ? phoneNumber.value = results.value.formatNational?.trim().replaceAll(new RegExp(/\D/g), "") : phoneNumber.value = newPhoneNumber, isPhoneNumberInternalUpdate.value = !0, results.value.e164 ? emits("update:model-value", results.value.e164) : emits("update:model-value", results.value.phoneNumber), setTimeout(() => {
276
+ }), results.value.isValid && hasAutoFormat.value ? phoneNumber.value = results.value.formatNational?.trim().replace(new RegExp(/\D/g), "") : phoneNumber.value = newPhoneNumber, isPhoneNumberInternalUpdate.value = !0, results.value.e164 ? emits("update:model-value", results.value.e164) : emits("update:model-value", results.value.phoneNumber), setTimeout(() => {
277
277
  isPhoneNumberInternalUpdate.value = !1;
278
278
  }, 0);
279
279
  }
@@ -323,6 +323,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
323
323
  phoneNumber,
324
324
  results
325
325
  }), (_ctx, _cache) => (openBlock(), createElementBlock("div", {
326
+ id: unref(instanceId),
326
327
  class: normalizeClass(["m-input-phone-number m-reset-css", [props.class, { "--block": _ctx.block }, _ctx.orientation ? `--${_ctx.orientation}` : void 0]]),
327
328
  style: normalizeStyle(_ctx.style)
328
329
  }, [
@@ -367,7 +368,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
367
368
  }, void 0, !0)
368
369
  ]),
369
370
  "country-list-code": withCtx(({ option }) => [
370
- createElementVNode("span", _hoisted_1, " +" + toDisplayString(option.dialCode), 1)
371
+ createElementVNode("span", _hoisted_2, " +" + toDisplayString(option.dialCode), 1)
371
372
  ]),
372
373
  _: 3
373
374
  }, 16, ["id", "model-value", "option-input-value-key", "color", "size", "locale", "countries-list", "list-position", "hide-flags", "search", "block", "error", "success", "translations", "hint", "options", "disabled", "search-threshold", "format-input-value", "show-code-in-list", "label"])),
@@ -384,6 +385,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
384
385
  example: _ctx.example,
385
386
  block: "",
386
387
  disabled: _ctx.disabled,
388
+ name: _ctx.phoneInputAttributes.name,
387
389
  "has-radius": !_ctx.hideCountrySelect,
388
390
  success: _ctx.success || (_ctx.validationSuccess ? results.value.isValid : !1),
389
391
  error: _ctx.error || (_ctx.validationError ? !!phoneNumber.value && !results.value.isValid : !1),
@@ -391,10 +393,10 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
391
393
  label: _ctx.label,
392
394
  placeholder: _ctx.placeholder,
393
395
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => onPhoneNumberChanged({ newPhoneNumber: $event }))
394
- }), null, 16, ["id", "model-value", "color", "size", "auto-format", "example", "disabled", "has-radius", "success", "error", "locales", "label", "placeholder"])
395
- ], 6));
396
+ }), null, 16, ["id", "model-value", "color", "size", "auto-format", "example", "disabled", "name", "has-radius", "success", "error", "locales", "label", "placeholder"])
397
+ ], 14, _hoisted_1));
396
398
  }
397
- }), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4fb69048"]]);
399
+ }), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-941c0e2b"]]);
398
400
  export {
399
401
  MazInputPhoneNumber as M,
400
402
  useLibphonenumber as u
@@ -1,7 +1,37 @@
1
1
  import { defineComponent, ref, watch, computed, onMounted, createBlock, openBlock, withKeys, unref, nextTick } from "vue";
2
2
  import { MazBanknotes } from "@maz-ui/icons";
3
- import { f as formatCurrency } from "./formatCurrency.C8NzW9Ii.js";
4
3
  import MazInput from "../components/MazInput.js";
4
+ const DEFAULT_OPTIONS = {
5
+ style: "currency",
6
+ minimumFractionDigits: 2,
7
+ round: !1
8
+ };
9
+ function getFormattedCurrency(number, locale, options) {
10
+ let numberToFormat = +number;
11
+ return options.round && (numberToFormat = Math.floor(numberToFormat), options.minimumFractionDigits = 0), new Intl.NumberFormat(locale, options).format(numberToFormat);
12
+ }
13
+ function validRequiredAttributes(number, locale, options) {
14
+ if (number === void 0)
15
+ throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
16
+ if (locale === void 0)
17
+ throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");
18
+ if (typeof locale != "string")
19
+ throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");
20
+ if (options.currency === void 0)
21
+ throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
22
+ }
23
+ function formatCurrency(number, locale, options) {
24
+ const options_ = {
25
+ ...DEFAULT_OPTIONS,
26
+ ...options
27
+ };
28
+ validRequiredAttributes(number, locale, options_);
29
+ try {
30
+ return getFormattedCurrency(number, locale, options_);
31
+ } catch (error) {
32
+ throw new Error(`[maz-ui](FilterCurrency) ${error}`);
33
+ }
34
+ }
5
35
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
36
  __name: "MazInputPrice",
7
37
  props: {
@@ -21,7 +21,7 @@ import '../assets/MazPickerCalendar.CHpWIzhL.css';const _hoisted_1 = { class: "m
21
21
  },
22
22
  emits: ["update:model-value", "update:calendar-date"],
23
23
  setup(__props, { emit: __emit }) {
24
- const props = __props, emits = __emit, MazDatePickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.hQBSVkc9.js")), MazDatePickerCalendarSwitcher = defineAsyncComponent(() => import("./MazPickerCalendarSwitcher.Cp2ux3E4.js")), MazDatePickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher.BpfCGGxQ.js")), MazDatePickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts.CMySiKny.js")), MazDatePickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher.D4aO09D3.js")), hoverredDay = ref(), hasShortcuts = computed(
24
+ const props = __props, emits = __emit, MazDatePickerCalendarMonth = defineAsyncComponent(() => import("./MazPickerCalendarMonth.DKBqgrNp.js")), MazDatePickerCalendarSwitcher = defineAsyncComponent(() => import("./MazPickerCalendarSwitcher.CzIZol3Z.js")), MazDatePickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher.BSD2GtY6.js")), MazDatePickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts.CMySiKny.js")), MazDatePickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher.BIUYJMvj.js")), hoverredDay = ref(), hasShortcuts = computed(
25
25
  () => props.shortcuts && props.shortcuts.length > 0 && props.range
26
26
  ), monthSwitcherOpen = ref(!1), yearSwitcherOpen = ref(!1), currentValue = computed({
27
27
  get: () => props.modelValue,
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, toDisplayString, useCssVars, ref, watch, createVNode, TransitionGroup, withCtx, normalizeClass, createBlock, createElementVNode } from "vue";
2
2
  import dayjs from "dayjs";
3
- import { g as getDaysOfWeek, a as getDaysInMonth, b as getFirstDayOfMonth, c as isRangeValue, i as isSameDate, d as isValidDate, e as isSameDay } from "./MazDatePicker.CT5yJhSN.js";
3
+ import { g as getDaysOfWeek, b as getDaysInMonth, c as getFirstDayOfMonth, d as isRangeValue, i as isSameDate, e as isValidDate, h as isSameDay } from "./MazDatePicker.De3Ltb2F.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
5
5
  import { d as debounce } from "./debounce.Brzkn9pm.js";
6
6
  import MazBtn from "../components/MazBtn.js";
7
- import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { class: "maz-picker-calendar-days" }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
7
+ import '../assets/MazPickerCalendarMonth.Boe_8k4x.css';const _hoisted_1 = { class: "maz-picker-calendar-days" }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
8
8
  __name: "MazPickerCalendarDays",
9
9
  props: {
10
10
  locale: { type: String, required: !0 },
@@ -39,8 +39,8 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
39
39
  emits: ["update:model-value", "update:hoverred-day"],
40
40
  setup(__props, { emit: __emit }) {
41
41
  useCssVars((_ctx) => ({
42
- "0022af95": hoverColor.value,
43
- 14174568: hoverTextColor.value
42
+ "4994ba23": hoverColor.value,
43
+ "2d754e14": hoverTextColor.value
44
44
  }));
45
45
  const props = __props, emits = __emit, MazDatePickerGrid = ref(), transitionName = ref("maz-slidenext"), calendarDateArray = computed(() => [props.calendarDate]), hoverColor = computed(() => `hsl(var(--maz-${props.color}) / 20%)`), hoverTextColor = computed(() => `hsl(var(--maz-${props.color}-foreground))`), modelValue = computed({
46
46
  get: () => props.modelValue,
@@ -185,7 +185,7 @@ import '../assets/MazPickerCalendarMonth.zkrPVHDv.css';const _hoisted_1 = { clas
185
185
  }, 8, ["name"])
186
186
  ], 512));
187
187
  }
188
- }), MazDatePickerCalendarGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f2c2da11"]]), _sfc_main = /* @__PURE__ */ defineComponent({
188
+ }), MazDatePickerCalendarGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-39e153c9"]]), _sfc_main = /* @__PURE__ */ defineComponent({
189
189
  __name: "MazPickerCalendarMonth",
190
190
  props: {
191
191
  modelValue: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, createVNode, withCtx, unref, createTextVNode, toDisplayString } from "vue";
2
2
  import { MazChevronLeft } from "@maz-ui/icons";
3
3
  import { c as capitalize } from "./capitalize.BF6CDS_4.js";
4
- import { f as formatDate } from "./formatDate.DZ_OzdnV.js";
4
+ import { f as formatDate } from "./MazDatePicker.De3Ltb2F.js";
5
5
  import dayjs from "dayjs";
6
6
  import MazBtn from "../components/MazBtn.js";
7
7
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
@@ -30,7 +30,7 @@ import '../assets/MazPickerContainer.k3DGjyHC.css';const _hoisted_1 = { class: "
30
30
  },
31
31
  emits: ["update:model-value", "update:calendar-date", "close"],
32
32
  setup(__props, { emit: __emit }) {
33
- const emits = __emit, MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar.RS6ZMdDK.js")), MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader.Dlz2yJ1D.js")), MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime.EuWWNfid.js")), lastTimeValue = ref(typeof __props.modelValue == "string" && __props.hasTime ? dayjs(__props.modelValue).format("HH:mm") : "00:00");
33
+ const emits = __emit, MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar.DKXNI8O4.js")), MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader.Bm9vIrtB.js")), MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime.D0hilq5b.js")), lastTimeValue = ref(typeof __props.modelValue == "string" && __props.hasTime ? dayjs(__props.modelValue).format("HH:mm") : "00:00");
34
34
  function saveLastTimeValue(value) {
35
35
  lastTimeValue.value = dayjs(value).format("HH:mm"), emits("update:model-value", value);
36
36
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, ref, watch, createElementBlock, openBlock, normalizeClass, createCommentVNode, createVNode, TransitionGroup, withCtx, Fragment, renderList, toDisplayString } from "vue";
2
2
  import { c as capitalize } from "./capitalize.BF6CDS_4.js";
3
- import { f as formatDate } from "./formatDate.DZ_OzdnV.js";
3
+ import { f as formatDate } from "./MazDatePicker.De3Ltb2F.js";
4
4
  import dayjs from "dayjs";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
6
6
  import '../assets/MazPickerHeader.ZYCJY5bX.css';const _hoisted_1 = {
@@ -1,12 +1,11 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, normalizeClass, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
2
- import { X as XMark } from "./x-mark.CTalOvvY.js";
2
+ import { MazXMark } from "@maz-ui/icons";
3
3
  import { c as capitalize } from "./capitalize.BF6CDS_4.js";
4
- import { f as formatDate } from "./formatDate.DZ_OzdnV.js";
4
+ import { f as formatDate, i as isSameDate } from "./MazDatePicker.De3Ltb2F.js";
5
5
  import dayjs from "dayjs";
6
6
  import MazBtn from "../components/MazBtn.js";
7
- import { i as isSameDate } from "./MazDatePicker.CT5yJhSN.js";
8
7
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
9
- import '../assets/MazPickerMonthSwitcher.168v7Hs1.css';const _hoisted_1 = { class: "maz-picker-month-switcher" }, _hoisted_2 = { class: "maz-picker-month-switcher__header" }, _sfc_main = /* @__PURE__ */ defineComponent({
8
+ import '../assets/MazPickerMonthSwitcher.CszcpCcY.css';const _hoisted_1 = { class: "maz-picker-month-switcher" }, _hoisted_2 = { class: "maz-picker-month-switcher__header" }, _sfc_main = /* @__PURE__ */ defineComponent({
10
9
  __name: "MazPickerMonthSwitcher",
11
10
  props: {
12
11
  calendarDate: { type: String, required: !0 },
@@ -50,7 +49,7 @@ import '../assets/MazPickerMonthSwitcher.168v7Hs1.css';const _hoisted_1 = { clas
50
49
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("close", $event), ["stop"]))
51
50
  }, {
52
51
  default: withCtx(() => [
53
- createVNode(unref(XMark), { class: "maz-text-lg" })
52
+ createVNode(unref(MazXMark), { class: "maz-text-lg" })
54
53
  ]),
55
54
  _: 1
56
55
  })
@@ -76,7 +75,7 @@ import '../assets/MazPickerMonthSwitcher.168v7Hs1.css';const _hoisted_1 = { clas
76
75
  ], 2)
77
76
  ]));
78
77
  }
79
- }), MazPickerMonthSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f5e01456"]]);
78
+ }), MazPickerMonthSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-656f003a"]]);
80
79
  export {
81
80
  MazPickerMonthSwitcher as default
82
81
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, onMounted, watch, nextTick, createElementBlock, openBlock, normalizeClass, Fragment, renderList, createElementVNode, normalizeStyle, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
2
2
  import dayjs from "dayjs";
3
3
  import MazBtn from "../components/MazBtn.js";
4
- import { f as findNearestNumberInList, s as scrollToTarget } from "./MazDatePicker.CT5yJhSN.js";
4
+ import { a as findNearestNumberInList, s as scrollToTarget } from "./MazDatePicker.De3Ltb2F.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
6
6
  import '../assets/MazPickerTime.yINUjbDZ.css';const _hoisted_1 = { class: "m-date-picker-time__column__items" }, _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "MazPickerTime",