maz-ui 3.5.0 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/components/MazAvatar.d.ts +156 -149
  2. package/components/MazAvatar.mjs +656 -0
  3. package/components/MazAvatar.umd.js +2 -0
  4. package/components/MazBackdrop.d.ts +89 -89
  5. package/components/MazBackdrop.mjs +140 -0
  6. package/components/MazBackdrop.umd.js +2 -0
  7. package/components/MazBadge.d.ts +73 -68
  8. package/components/MazBadge.mjs +61 -0
  9. package/components/MazBadge.umd.js +2 -0
  10. package/components/MazBottomSheet.d.ts +36 -29
  11. package/components/MazBottomSheet.mjs +553 -0
  12. package/components/MazBottomSheet.umd.js +2 -0
  13. package/components/MazBtn.d.ts +178 -171
  14. package/components/MazBtn.mjs +371 -0
  15. package/components/MazBtn.umd.js +2 -0
  16. package/components/MazCard.d.ts +194 -183
  17. package/components/MazCard.mjs +1390 -0
  18. package/components/MazCard.umd.js +2 -0
  19. package/components/MazCarousel.d.ts +24 -16
  20. package/components/MazCarousel.mjs +469 -0
  21. package/components/MazCarousel.umd.js +2 -0
  22. package/components/MazChart/includes.d.ts +11 -11
  23. package/components/MazChart.d.ts +114 -114
  24. package/components/MazChart.mjs +135 -0
  25. package/components/MazChart.umd.js +2 -0
  26. package/components/MazCheckbox.d.ts +54 -49
  27. package/components/MazCheckbox.mjs +86 -0
  28. package/components/MazCheckbox.umd.js +2 -0
  29. package/components/MazDialog.d.ts +40 -29
  30. package/components/MazDialog.mjs +566 -0
  31. package/components/MazDialog.umd.js +2 -0
  32. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +30 -30
  33. package/components/MazDialogPromise.d.ts +36 -28
  34. package/components/MazDialogPromise.mjs +692 -0
  35. package/components/MazDialogPromise.umd.js +2 -0
  36. package/components/MazDrawer.d.ts +69 -59
  37. package/components/MazDrawer.mjs +572 -0
  38. package/components/MazDrawer.umd.js +2 -0
  39. package/components/MazDropzone.d.ts +128 -128
  40. package/components/MazDropzone.mjs +369 -0
  41. package/components/MazDropzone.umd.js +2 -0
  42. package/components/MazGallery.d.ts +144 -144
  43. package/components/MazGallery.mjs +948 -0
  44. package/components/MazGallery.umd.js +2 -0
  45. package/components/MazIcon.d.ts +64 -66
  46. package/components/MazIcon.mjs +161 -0
  47. package/components/MazIcon.umd.js +2 -0
  48. package/components/MazInput.d.ts +276 -276
  49. package/components/MazInput.mjs +750 -0
  50. package/components/MazInput.umd.js +2 -0
  51. package/components/MazInputNumber.d.ts +65 -67
  52. package/components/MazInputNumber.mjs +857 -0
  53. package/components/MazInputNumber.umd.js +2 -0
  54. package/components/MazInputPrice.d.ts +69 -64
  55. package/components/MazInputPrice.mjs +889 -0
  56. package/components/MazInputPrice.umd.js +2 -0
  57. package/components/MazInputTags.d.ts +94 -96
  58. package/components/MazInputTags.mjs +904 -0
  59. package/components/MazInputTags.umd.js +2 -0
  60. package/components/MazLazyImg.d.ts +85 -80
  61. package/components/MazLazyImg.mjs +376 -0
  62. package/components/MazLazyImg.umd.js +2 -0
  63. package/components/MazPhoneNumberInput/constantes/locales.d.ts +12 -12
  64. package/components/MazPhoneNumberInput/types.d.ts +21 -21
  65. package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +2 -2
  66. package/components/MazPhoneNumberInput/utils/index.d.ts +12 -12
  67. package/components/MazPhoneNumberInput.d.ts +253 -255
  68. package/components/MazPhoneNumberInput.mjs +1907 -0
  69. package/components/MazPhoneNumberInput.umd.js +2 -0
  70. package/components/MazPicker/MazPickerCalendar.vue.d.ts +135 -137
  71. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -22
  72. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +112 -114
  73. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +122 -124
  74. package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +36 -38
  75. package/components/MazPicker/MazPickerContainer.vue.d.ts +210 -212
  76. package/components/MazPicker/MazPickerFooter.vue.d.ts +16 -0
  77. package/components/MazPicker/MazPickerHeader.vue.d.ts +82 -84
  78. package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +41 -43
  79. package/components/MazPicker/MazPickerShortcuts.vue.d.ts +60 -62
  80. package/components/MazPicker/MazPickerTime.vue.d.ts +127 -129
  81. package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +33 -35
  82. package/components/MazPicker/types.d.ts +15 -15
  83. package/components/MazPicker/utils.d.ts +54 -54
  84. package/components/MazPicker.d.ts +311 -313
  85. package/components/MazPicker.mjs +2942 -0
  86. package/components/MazPicker.umd.js +2 -0
  87. package/components/MazRadioButtons.d.ts +77 -69
  88. package/components/MazRadioButtons.mjs +80 -0
  89. package/components/MazRadioButtons.umd.js +2 -0
  90. package/components/MazSelect.d.ts +185 -176
  91. package/components/MazSelect.mjs +1085 -0
  92. package/components/MazSelect.umd.js +2 -0
  93. package/components/MazSlider/utils.d.ts +15 -15
  94. package/components/MazSlider.d.ts +94 -96
  95. package/components/MazSlider.mjs +377 -0
  96. package/components/MazSlider.umd.js +2 -0
  97. package/components/MazSpinner.d.ts +28 -30
  98. package/components/MazSpinner.mjs +59 -0
  99. package/components/MazSpinner.umd.js +2 -0
  100. package/components/MazStepper.d.ts +71 -73
  101. package/components/MazStepper.mjs +227 -0
  102. package/components/MazStepper.umd.js +2 -0
  103. package/components/MazSwitch.d.ts +54 -56
  104. package/components/MazSwitch.mjs +61 -0
  105. package/components/MazSwitch.umd.js +2 -0
  106. package/components/MazTabsBar.d.ts +47 -49
  107. package/components/MazTabsBar.mjs +470 -0
  108. package/components/MazTabsBar.umd.js +2 -0
  109. package/components/MazTabsContent.d.ts +21 -16
  110. package/components/MazTabsContent.mjs +89 -0
  111. package/components/MazTabsContent.umd.js +2 -0
  112. package/components/MazTabsContentItem.d.ts +19 -14
  113. package/components/MazTabsContentItem.mjs +61 -0
  114. package/components/MazTabsContentItem.umd.js +2 -0
  115. package/components/MazTextarea/textarea-autogrow.d.ts +9 -9
  116. package/components/MazTextarea.d.ts +123 -125
  117. package/components/MazTextarea.mjs +260 -0
  118. package/components/MazTextarea.umd.js +2 -0
  119. package/components/MazTransitionExpand.d.ts +9 -4
  120. package/components/MazTransitionExpand.mjs +62 -0
  121. package/components/MazTransitionExpand.umd.js +2 -0
  122. package/components/index.d.ts +33 -33
  123. package/components/index.mjs +35 -0
  124. package/components/index.umd.js +35 -0
  125. package/components/no_photo-410a8f01.mjs +4 -0
  126. package/components/types.d.ts +17 -17
  127. package/css/main.css +1 -1
  128. package/maz-ui.d.ts +234 -232
  129. package/modules/maz-ui.mjs +1892 -0
  130. package/modules/maz-ui.umd.js +2 -0
  131. package/modules/no_photo-410a8f01.mjs +4 -0
  132. package/package.json +43 -52
  133. package/tailwindcss/tailwind.config.js +6 -7
  134. package/tailwindcss/utils/colors.js +1 -3
  135. package/tailwindcss/variables/breakpoints.js +1 -2
  136. package/tailwindcss/variables/utilities.js +1 -2
  137. package/tailwindcss/variables/z-indexes.js +1 -1
  138. package/components/MazAvatar.js +0 -3
  139. package/components/MazBackdrop.js +0 -3
  140. package/components/MazBadge.js +0 -1
  141. package/components/MazBottomSheet.js +0 -3
  142. package/components/MazBtn.js +0 -3
  143. package/components/MazCard.js +0 -3
  144. package/components/MazCarousel.js +0 -3
  145. package/components/MazChart.js +0 -1
  146. package/components/MazCheckbox.js +0 -1
  147. package/components/MazDialog.js +0 -3
  148. package/components/MazDialogPromise.js +0 -3
  149. package/components/MazDrawer.js +0 -3
  150. package/components/MazDropzone.js +0 -3
  151. package/components/MazGallery.js +0 -3
  152. package/components/MazIcon.js +0 -3
  153. package/components/MazInput.js +0 -3
  154. package/components/MazInputNumber.js +0 -3
  155. package/components/MazInputPrice.js +0 -3
  156. package/components/MazInputTags.js +0 -3
  157. package/components/MazLazyImg.js +0 -3
  158. package/components/MazPhoneNumberInput.js +0 -3
  159. package/components/MazPicker.js +0 -3
  160. package/components/MazRadioButtons.js +0 -1
  161. package/components/MazSelect.js +0 -3
  162. package/components/MazSlider.js +0 -3
  163. package/components/MazSpinner.js +0 -1
  164. package/components/MazStepper.js +0 -1
  165. package/components/MazSwitch.js +0 -1
  166. package/components/MazTabsBar.js +0 -3
  167. package/components/MazTabsContent.js +0 -1
  168. package/components/MazTabsContentItem.js +0 -3
  169. package/components/MazTextarea.js +0 -1
  170. package/components/MazTransitionExpand.js +0 -1
  171. package/components/index.js +0 -35
  172. package/components/no_photo-a72545e4.js +0 -1
  173. package/modules/index.js +0 -3
  174. package/modules/no_photo-a72545e4.js +0 -1
@@ -0,0 +1,2 @@
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode("@-webkit-keyframes maz-spin-503fe527{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes maz-spin-503fe527{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.m-spinner[data-v-503fe527]{-webkit-animation:maz-spin-503fe527 1s linear infinite;animation:maz-spin-503fe527 1s linear infinite;fill:currentColor;color:var(--maz-color-white);margin:0!important}.m-spinner--primary[data-v-503fe527]{color:var(--maz-color-primary)}.m-spinner--secondary[data-v-503fe527]{color:var(--maz-color-secondary)}.m-spinner--info[data-v-503fe527]{color:var(--maz-color-info)}.m-spinner--warning[data-v-503fe527]{color:var(--maz-color-warning)}.m-spinner--danger[data-v-503fe527]{color:var(--maz-color-danger)}.m-spinner--success[data-v-503fe527]{color:var(--maz-color-success)}.m-spinner--black[data-v-503fe527]{color:var(--maz-color-black)}.m-spinner--white[data-v-503fe527],.m-spinner--transparent[data-v-503fe527]{color:var(--maz-color-white)}.m-lazy-img-component[data-v-2dd96791]{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;background-color:var(--maz-color-bg-lighter);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-lazy-img-component-loader[data-v-2dd96791]{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-lazy-img-component:not(.m-lazy-error,.m-lazy-no-photo) img[data-v-2dd96791]{height:100%;width:100%}.m-lazy-img-component.--height-full img[data-v-2dd96791]{max-height:100%!important;width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;max-width:-webkit-min-content!important;max-width:-moz-min-content!important;max-width:min-content!important}.m-lazy-img-component:not(.m-lazy-loaded,.m-lazy-no-photo) .m-lazy-img-component-loader[data-v-2dd96791]{display:-webkit-box;display:-ms-flexbox;display:flex}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ var __defProp=Object.defineProperty,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__publicField=(e,t,s)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,s),s);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).MazLazyImg=t(e.Vue)}(this,(function(e){"use strict";const t={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}};class s{constructor(e={}){__publicField(this,"observers",[]),__publicField(this,"defaultOptions",t),__publicField(this,"options"),__publicField(this,"onImgLoadedCallback"),__publicField(this,"onImgErrorCallback"),__publicField(this,"hasImgLoaded",!1),this.options=this.buildOptions(e),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}async loadErrorPhoto(){const{default:e}=await Promise.resolve().then((()=>u));return e}buildOptions(e){return{...this.defaultOptions,...e,observerOptions:{...this.defaultOptions.observerOptions,...e.observerOptions}}}removeClass(e,t){e.classList.remove(t)}addClass(e,t){e.classList.add(t)}removeAllStateClasses(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}setBaseClass(e){this.addClass(e,this.options.baseClass)}imageIsLoading(e){var t,s;this.addClass(e,this.options.loadingClass),null==(s=(t=this.options).onLoading)||s.call(t,e)}imageHasNoPhoto(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}imageIsLoaded(e){var t,s;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null==(s=(t=this.options).onLoaded)||s.call(t,e)}imageHasError(e,t){var s,o;console.warn("[maz-ui][MazLazyImg] Error while loading image",t),this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),null==(o=(s=this.options).onError)||o.call(s,e),this.setDefaultPhoto(e)}getImageUrl(e,t){const s=this.getImgElement(e).getAttribute("data-src");if(s)return s;const o="object"==typeof t.value?t.value.src:t.value;return o||console.warn("[maz-ui][MazLazyImg] src url is not defined"),o}async setPictureSourceUrls(e){const t=e.querySelectorAll("source");if(t.length>0)for await(const s of t){const e=s.getAttribute("data-srcset");e?s.srcset=e:console.warn('[maz-ui][MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"')}else console.warn('[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(e)}hasBgImgMode(e){return"bg-image"===e.arg}isPictureElement(e){return e instanceof HTMLPictureElement}getImgElement(e){return this.isPictureElement(e)?e.querySelector("img"):e}async setDefaultPhoto(e){if(this.options.noUseErrorPhoto)return;const t=this.options.errorPhoto??await this.loadErrorPhoto(),s=e.querySelectorAll("source");if(s.length>0)for await(const o of s)o.srcset=t;else this.setImgSrc(e,t)}addEventListenerToImg(e){const t=this.getImgElement(e);t.addEventListener("load",(()=>this.onImgLoadedCallback(e)),{once:!0}),t.addEventListener("error",(t=>this.onImgErrorCallback(e,t)),{once:!0})}async loadImage(e,t){if(this.imageIsLoading(e),this.isPictureElement(e))this.addEventListenerToImg(e),await this.setPictureSourceUrls(e);else{const s=this.getImageUrl(e,t);if(!s)return this.imageHasError(e);this.hasBgImgMode(t)?(e.style.backgroundImage=`url('${s}')`,this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,s))}}setImgSrc(e,t){this.getImgElement(e).src=t}handleIntersectionObserver(e,t,s,o){var a,i;this.observers.push(o);for(const r of s)if(r.isIntersecting){if(null==(i=(a=this.options).onIntersecting)||i.call(a,r.target),this.options.observerOnce&&o.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}createObserver(e,t){const s=this.options.observerOptions;new IntersectionObserver(((s,o)=>{this.handleIntersectionObserver(e,t,s,o)}),s).observe(e)}async imageHandler(e,t,s){if("update"===s)for await(const o of this.observers)o.unobserve(e);window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t)}async bindUpdateHandler(e,t,s){if(this.options.noPhoto)return this.imageHasNoPhoto(e);await this.imageHandler(e,t,s)}async add(e,t){if(this.hasBgImgMode(t)&&this.isPictureElement(e))throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');setTimeout((()=>this.setBaseClass(e)),0),e.getAttribute("src")||this.setImgSrc(e,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),await this.bindUpdateHandler(e,t,"bind")}async update(e,t){t.value!==t.oldValue&&(this.hasImgLoaded=!1,this.removeAllStateClasses(e),await this.bindUpdateHandler(e,t,"update"))}remove(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);for(const s of this.observers)s.unobserve(e);this.observers=[]}}let o;const a={created(e,t){const a="object"==typeof t.value?t.value:{};o=new s(a),o.add(e,t)},updated(e,t){o.update(e,t)},unmounted(e,t){o.remove(e,t)}},i=["width","height"],r=[(t=>(e.pushScopeId("data-v-503fe527"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},null,-1)))],n=(e,t)=>{const s=e.__vccOpts||e;for(const[o,a]of t)s[o]=a;return s},l=n(e.defineComponent({__name:"MazSpinner",props:{size:{type:String,default:"2em"},color:{type:String,default:"primary",validator:e=>["info","white","success","warning","danger","primary","black","secondary","transparent"].includes(e)}},setup:t=>(s,o)=>(e.openBlock(),e.createElementBlock("svg",{width:t.size,height:t.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:e.normalizeClass(["m-spinner",`m-spinner--${t.color}`]),style:{"enable-background":"new 0 0 50 50"}},r,10,i))}),[["__scopeId","data-v-503fe527"]]),d=["data-srcset","media"],c={key:0,class:"m-lazy-img-component-loader"},g=n(e.defineComponent({__name:"MazLazyImg",props:{image:{type:[String,Object],default:void 0},noPhoto:{type:Boolean,default:!1},noLoader:{type:Boolean,default:!1},noObserverOnce:{type:Boolean,default:!1},loadOnce:{type:Boolean,default:!1},imageHeightFull:{type:Boolean,default:!1},observerOptions:{type:Object,default:null}},emits:["intersecting","loading","loaded","error"],setup(t){const s=t,o=e.computed((()=>{var e;return"string"==typeof s.image?[{srcset:s.image}]:null==(e=s.image)?void 0:e.sources}));return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("picture",{class:e.normalizeClass(["m-lazy-img-component",{"-use-loader":!t.noLoader,"--height-full":t.imageHeightFull}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(({srcset:t,media:s},o)=>(e.openBlock(),e.createElementBlock("source",{key:o,"data-srcset":t,media:s},null,8,d)))),128)),e.createElementVNode("img",e.mergeProps(s.$attrs,{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}),null,16),t.noLoader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",c,[e.createVNode(l,{color:"black",size:"2em"})])),e.renderSlot(s.$slots,"default",{},void 0,!0)],2)),[[e.unref(a),{noPhoto:t.noPhoto,observerOnce:!t.noObserverOnce,loadOnce:t.loadOnce,onIntersecting:e=>s.$emit("intersecting",e),onLoading:e=>s.$emit("loading",e),onLoaded:e=>s.$emit("loaded",e),onError:e=>s.$emit("error",e),observerOptions:t.observerOptions}]])}}),[["__scopeId","data-v-2dd96791"]]),u=Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjQ4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjQ4cHgiIGZpbGw9IiNjZGNkY2QiPgogIDxnPgogICAgPHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+CiAgICA8Zz4KICAgICAgPHBhdGggZD0iTTguOSw2LjA3TDcuNDgsNC42Nkw5LDNoNmwxLjgzLDJIMjBjMS4xLDAsMiwwLjksMiwydjEyYzAsMC4wNS0wLjAxLDAuMS0wLjAyLDAuMTZMMjAsMTcuMTdWN2gtNC4wNWwtMS44My0ySDkuODggTDguOSw2LjA3eiBNMjAuNDksMjMuMzFMMTguMTcsMjFINGMtMS4xLDAtMi0wLjktMi0yVjdjMC0wLjU5LDAuMjctMS4xMiwwLjY4LTEuNDlsLTItMkwyLjEsMi4xbDE5LjgsMTkuOEwyMC40OSwyMy4zMXogTTkuMTksMTIuMDJDOS4wOCwxMi4zMyw5LDEyLjY1LDksMTNjMCwxLjY2LDEuMzQsMywzLDNjMC4zNSwwLDAuNjctMC4wOCwwLjk4LTAuMTlMOS4xOSwxMi4wMnogTTE2LjE3LDE5bC0xLjY4LTEuNjggQzEzLjc2LDE3Ljc1LDEyLjkxLDE4LDEyLDE4Yy0yLjc2LDAtNS0yLjI0LTUtNWMwLTAuOTEsMC4yNS0xLjc2LDAuNjgtMi40OUw0LjE3LDdINHYxMkgxNi4xN3ogTTE0LjgxLDExLjk4bDIuMDcsMi4wNyBDMTYuOTYsMTMuNzEsMTcsMTMuMzYsMTcsMTNjMC0yLjc2LTIuMjQtNS01LTVjLTAuMzYsMC0wLjcxLDAuMDQtMS4wNiwwLjEybDIuMDcsMi4wN0MxMy44NSwxMC40OSwxNC41MSwxMS4xNSwxNC44MSwxMS45OHoiLz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPg=="},Symbol.toStringTag,{value:"Module"}));return g}));
@@ -1,12 +1,12 @@
1
- declare const _default: {
2
- countrySelector: {
3
- placeholder: string;
4
- error: string;
5
- searchPlaceholder: string;
6
- };
7
- phoneInput: {
8
- placeholder: string;
9
- example: string;
10
- };
11
- };
12
- export default _default;
1
+ declare const _default: {
2
+ countrySelector: {
3
+ placeholder: string;
4
+ error: string;
5
+ searchPlaceholder: string;
6
+ };
7
+ phoneInput: {
8
+ placeholder: string;
9
+ example: string;
10
+ };
11
+ };
12
+ export default _default;
@@ -1,21 +1,21 @@
1
- import type { CountryCallingCode, CountryCode, NationalNumber, NumberType } from 'libphonenumber-js';
2
- import type locales from './constantes/locales';
3
- export type Result = {
4
- isValid: boolean;
5
- isPossible?: boolean;
6
- countryCode?: CountryCode;
7
- countryCallingCode?: CountryCallingCode;
8
- nationalNumber?: NationalNumber;
9
- type?: NumberType;
10
- formatInternational?: string;
11
- formatNational?: string;
12
- uri?: string;
13
- e164?: string;
14
- rfc3966?: string;
15
- };
16
- export type Translations = typeof locales;
17
- export type Country = {
18
- iso2: CountryCode;
19
- dialCode: CountryCallingCode;
20
- name: string;
21
- };
1
+ import type { CountryCallingCode, CountryCode, NationalNumber, NumberType } from 'libphonenumber-js';
2
+ import type locales from './constantes/locales';
3
+ export type Result = {
4
+ isValid: boolean;
5
+ isPossible?: boolean;
6
+ countryCode?: CountryCode;
7
+ countryCallingCode?: CountryCallingCode;
8
+ nationalNumber?: NationalNumber;
9
+ type?: NumberType;
10
+ formatInternational?: string;
11
+ formatNational?: string;
12
+ uri?: string;
13
+ e164?: string;
14
+ rfc3966?: string;
15
+ };
16
+ export type Translations = typeof locales;
17
+ export type Country = {
18
+ iso2: CountryCode;
19
+ dialCode: CountryCallingCode;
20
+ name: string;
21
+ };
@@ -1,2 +1,2 @@
1
- import type { CountryCode } from 'libphonenumber-js';
2
- export declare const countriesNameListByIsoCode: Record<CountryCode, string>;
1
+ import type { CountryCode } from 'libphonenumber-js';
2
+ export declare const countriesNameListByIsoCode: Record<CountryCode, string>;
@@ -1,12 +1,12 @@
1
- import { type CountryCode, type Examples } from 'libphonenumber-js';
2
- import type { Country, Result } from '../types';
3
- export declare function getCountryName(code: CountryCode | string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): string | undefined;
4
- export declare function loadPhoneNumberExamplesFile(): Promise<Examples>;
5
- export declare function getExamplePhoneNumber(countryCode: CountryCode): import("libphonenumber-js").PhoneNumber | undefined;
6
- export declare function sanitizePhoneNumber(input?: string): string | undefined;
7
- export declare function getCountriesList(customCountriesNameListByIsoCode?: Record<CountryCode, string>): Country[] | undefined;
8
- export declare function browserLocale(): string | undefined;
9
- export declare function isCountryAvailable(locale: string): boolean;
10
- export declare const getResultsFromPhoneNumber: (countryCode?: CountryCode, phoneNumber?: string) => Result;
11
- export declare function getAsYouTypeFormat(countryCode: CountryCode, phoneNumber?: string): string | undefined;
12
- export declare function fetchCountryCode(): Promise<string | undefined>;
1
+ import { type CountryCode, type Examples } from 'libphonenumber-js';
2
+ import type { Country, Result } from '../types';
3
+ export declare function getCountryName(code: CountryCode | string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): string | undefined;
4
+ export declare function loadPhoneNumberExamplesFile(): Promise<Examples>;
5
+ export declare function getExamplePhoneNumber(countryCode: CountryCode): import("libphonenumber-js").PhoneNumber | undefined;
6
+ export declare function sanitizePhoneNumber(input?: string): string | undefined;
7
+ export declare function getCountriesList(customCountriesNameListByIsoCode?: Record<CountryCode, string>): Country[] | undefined;
8
+ export declare function browserLocale(): string | undefined;
9
+ export declare function isCountryAvailable(locale: string): boolean;
10
+ export declare const getResultsFromPhoneNumber: (countryCode?: CountryCode, phoneNumber?: string) => Result;
11
+ export declare function getAsYouTypeFormat(countryCode: CountryCode, phoneNumber?: string): string | undefined;
12
+ export declare function fetchCountryCode(): Promise<string | undefined>;
@@ -1,255 +1,253 @@
1
- import type { CountryCode } from 'libphonenumber-js';
2
- import type { Color, Position, Size } from './types';
3
- import { type PropType } from 'vue';
4
- export type { Color, Size, Position } from './types';
5
- export type { CountryCode } from 'libphonenumber-js';
6
- export type { Result, Translations } from './MazPhoneNumberInput/types';
7
- declare const _default: import("vue").DefineComponent<{
8
- modelValue: {
9
- type: StringConstructor;
10
- validator: (prop: string) => boolean;
11
- default: undefined;
12
- };
13
- id: {
14
- type: StringConstructor;
15
- default: undefined;
16
- };
17
- placeholder: {
18
- type: StringConstructor;
19
- default: undefined;
20
- };
21
- defaultPhoneNumber: {
22
- type: StringConstructor;
23
- default: undefined;
24
- };
25
- defaultCountryCode: {
26
- type: PropType<string>;
27
- default: undefined;
28
- validator: (code: string) => boolean;
29
- };
30
- preferredCountries: {
31
- type: PropType<CountryCode[]>;
32
- default: undefined;
33
- };
34
- ignoredCountries: {
35
- type: PropType<CountryCode[]>;
36
- default: undefined;
37
- };
38
- onlyCountries: {
39
- type: PropType<CountryCode[]>;
40
- default: undefined;
41
- };
42
- translations: {
43
- type: PropType<{
44
- countrySelector: {
45
- placeholder: string;
46
- error: string;
47
- searchPlaceholder: string;
48
- };
49
- phoneInput: {
50
- placeholder: string;
51
- example: string;
52
- };
53
- }>;
54
- default: undefined;
55
- };
56
- listPosition: {
57
- type: PropType<Position>;
58
- default: string;
59
- validator: (value: Position) => boolean;
60
- };
61
- color: {
62
- type: PropType<Color>;
63
- default: string;
64
- validator: (value: string) => boolean;
65
- };
66
- size: {
67
- type: PropType<Size>;
68
- default: string;
69
- validator: (value: string) => boolean;
70
- };
71
- noFlags: {
72
- type: BooleanConstructor;
73
- default: boolean;
74
- };
75
- disabled: {
76
- type: BooleanConstructor;
77
- default: boolean;
78
- };
79
- noExample: {
80
- type: BooleanConstructor;
81
- default: boolean;
82
- };
83
- noSearch: {
84
- type: BooleanConstructor;
85
- default: boolean;
86
- };
87
- noUseBrowserLocale: {
88
- type: BooleanConstructor;
89
- default: boolean;
90
- };
91
- fetchCountry: {
92
- type: BooleanConstructor;
93
- default: boolean;
94
- };
95
- noCountrySelector: {
96
- type: BooleanConstructor;
97
- default: boolean;
98
- };
99
- showCodeOnList: {
100
- type: BooleanConstructor;
101
- default: boolean;
102
- };
103
- error: {
104
- type: BooleanConstructor;
105
- default: boolean;
106
- };
107
- customCountriesList: {
108
- type: PropType<Record<CountryCode, string>>;
109
- default: undefined;
110
- };
111
- }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
112
- [key: string]: any;
113
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update" | "update:model-value" | "country-code")[], "update" | "update:model-value" | "country-code", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
114
- modelValue: {
115
- type: StringConstructor;
116
- validator: (prop: string) => boolean;
117
- default: undefined;
118
- };
119
- id: {
120
- type: StringConstructor;
121
- default: undefined;
122
- };
123
- placeholder: {
124
- type: StringConstructor;
125
- default: undefined;
126
- };
127
- defaultPhoneNumber: {
128
- type: StringConstructor;
129
- default: undefined;
130
- };
131
- defaultCountryCode: {
132
- type: PropType<string>;
133
- default: undefined;
134
- validator: (code: string) => boolean;
135
- };
136
- preferredCountries: {
137
- type: PropType<CountryCode[]>;
138
- default: undefined;
139
- };
140
- ignoredCountries: {
141
- type: PropType<CountryCode[]>;
142
- default: undefined;
143
- };
144
- onlyCountries: {
145
- type: PropType<CountryCode[]>;
146
- default: undefined;
147
- };
148
- translations: {
149
- type: PropType<{
150
- countrySelector: {
151
- placeholder: string;
152
- error: string;
153
- searchPlaceholder: string;
154
- };
155
- phoneInput: {
156
- placeholder: string;
157
- example: string;
158
- };
159
- }>;
160
- default: undefined;
161
- };
162
- listPosition: {
163
- type: PropType<Position>;
164
- default: string;
165
- validator: (value: Position) => boolean;
166
- };
167
- color: {
168
- type: PropType<Color>;
169
- default: string;
170
- validator: (value: string) => boolean;
171
- };
172
- size: {
173
- type: PropType<Size>;
174
- default: string;
175
- validator: (value: string) => boolean;
176
- };
177
- noFlags: {
178
- type: BooleanConstructor;
179
- default: boolean;
180
- };
181
- disabled: {
182
- type: BooleanConstructor;
183
- default: boolean;
184
- };
185
- noExample: {
186
- type: BooleanConstructor;
187
- default: boolean;
188
- };
189
- noSearch: {
190
- type: BooleanConstructor;
191
- default: boolean;
192
- };
193
- noUseBrowserLocale: {
194
- type: BooleanConstructor;
195
- default: boolean;
196
- };
197
- fetchCountry: {
198
- type: BooleanConstructor;
199
- default: boolean;
200
- };
201
- noCountrySelector: {
202
- type: BooleanConstructor;
203
- default: boolean;
204
- };
205
- showCodeOnList: {
206
- type: BooleanConstructor;
207
- default: boolean;
208
- };
209
- error: {
210
- type: BooleanConstructor;
211
- default: boolean;
212
- };
213
- customCountriesList: {
214
- type: PropType<Record<CountryCode, string>>;
215
- default: undefined;
216
- };
217
- }>> & {
218
- onUpdate?: ((...args: any[]) => any) | undefined;
219
- "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
220
- "onCountry-code"?: ((...args: any[]) => any) | undefined;
221
- }, {
222
- id: string;
223
- modelValue: string;
224
- placeholder: string;
225
- defaultPhoneNumber: string;
226
- defaultCountryCode: string;
227
- preferredCountries: CountryCode[];
228
- ignoredCountries: CountryCode[];
229
- onlyCountries: CountryCode[];
230
- translations: {
231
- countrySelector: {
232
- placeholder: string;
233
- error: string;
234
- searchPlaceholder: string;
235
- };
236
- phoneInput: {
237
- placeholder: string;
238
- example: string;
239
- };
240
- };
241
- listPosition: Position;
242
- color: Color;
243
- size: Size;
244
- noFlags: boolean;
245
- disabled: boolean;
246
- noExample: boolean;
247
- noSearch: boolean;
248
- noUseBrowserLocale: boolean;
249
- fetchCountry: boolean;
250
- noCountrySelector: boolean;
251
- showCodeOnList: boolean;
252
- error: boolean;
253
- customCountriesList: Record<CountryCode, string>;
254
- }>;
255
- export default _default;
1
+ import type { CountryCode } from 'libphonenumber-js';
2
+ import type { Color, Position, Size } from './types';
3
+ import { type PropType } from 'vue';
4
+ export type { Color, Size, Position } from './types';
5
+ export type { CountryCode } from 'libphonenumber-js';
6
+ export type { Result, Translations } from './MazPhoneNumberInput/types';
7
+ declare const _default: import("vue").DefineComponent<{
8
+ modelValue: {
9
+ type: StringConstructor;
10
+ validator: (prop: string) => boolean;
11
+ default: undefined;
12
+ };
13
+ id: {
14
+ type: StringConstructor;
15
+ default: undefined;
16
+ };
17
+ placeholder: {
18
+ type: StringConstructor;
19
+ default: undefined;
20
+ };
21
+ defaultPhoneNumber: {
22
+ type: StringConstructor;
23
+ default: undefined;
24
+ };
25
+ defaultCountryCode: {
26
+ type: PropType<string>;
27
+ default: undefined;
28
+ validator: (code: string) => boolean;
29
+ };
30
+ preferredCountries: {
31
+ type: PropType<CountryCode[]>;
32
+ default: undefined;
33
+ };
34
+ ignoredCountries: {
35
+ type: PropType<CountryCode[]>;
36
+ default: undefined;
37
+ };
38
+ onlyCountries: {
39
+ type: PropType<CountryCode[]>;
40
+ default: undefined;
41
+ };
42
+ translations: {
43
+ type: PropType<{
44
+ countrySelector: {
45
+ placeholder: string;
46
+ error: string;
47
+ searchPlaceholder: string;
48
+ };
49
+ phoneInput: {
50
+ placeholder: string;
51
+ example: string;
52
+ };
53
+ }>;
54
+ default: undefined;
55
+ };
56
+ listPosition: {
57
+ type: PropType<Position>;
58
+ default: string;
59
+ validator: (value: Position) => boolean;
60
+ };
61
+ color: {
62
+ type: PropType<Color>;
63
+ default: string;
64
+ validator: (value: string) => boolean;
65
+ };
66
+ size: {
67
+ type: PropType<Size>;
68
+ default: string;
69
+ validator: (value: string) => boolean;
70
+ };
71
+ noFlags: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ disabled: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ noExample: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ noSearch: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ noUseBrowserLocale: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ fetchCountry: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ noCountrySelector: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ showCodeOnList: {
100
+ type: BooleanConstructor;
101
+ default: boolean;
102
+ };
103
+ error: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ customCountriesList: {
108
+ type: PropType<Record<CountryCode, string>>;
109
+ default: undefined;
110
+ };
111
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update" | "update:model-value" | "country-code")[], "update" | "update:model-value" | "country-code", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
112
+ modelValue: {
113
+ type: StringConstructor;
114
+ validator: (prop: string) => boolean;
115
+ default: undefined;
116
+ };
117
+ id: {
118
+ type: StringConstructor;
119
+ default: undefined;
120
+ };
121
+ placeholder: {
122
+ type: StringConstructor;
123
+ default: undefined;
124
+ };
125
+ defaultPhoneNumber: {
126
+ type: StringConstructor;
127
+ default: undefined;
128
+ };
129
+ defaultCountryCode: {
130
+ type: PropType<string>;
131
+ default: undefined;
132
+ validator: (code: string) => boolean;
133
+ };
134
+ preferredCountries: {
135
+ type: PropType<CountryCode[]>;
136
+ default: undefined;
137
+ };
138
+ ignoredCountries: {
139
+ type: PropType<CountryCode[]>;
140
+ default: undefined;
141
+ };
142
+ onlyCountries: {
143
+ type: PropType<CountryCode[]>;
144
+ default: undefined;
145
+ };
146
+ translations: {
147
+ type: PropType<{
148
+ countrySelector: {
149
+ placeholder: string;
150
+ error: string;
151
+ searchPlaceholder: string;
152
+ };
153
+ phoneInput: {
154
+ placeholder: string;
155
+ example: string;
156
+ };
157
+ }>;
158
+ default: undefined;
159
+ };
160
+ listPosition: {
161
+ type: PropType<Position>;
162
+ default: string;
163
+ validator: (value: Position) => boolean;
164
+ };
165
+ color: {
166
+ type: PropType<Color>;
167
+ default: string;
168
+ validator: (value: string) => boolean;
169
+ };
170
+ size: {
171
+ type: PropType<Size>;
172
+ default: string;
173
+ validator: (value: string) => boolean;
174
+ };
175
+ noFlags: {
176
+ type: BooleanConstructor;
177
+ default: boolean;
178
+ };
179
+ disabled: {
180
+ type: BooleanConstructor;
181
+ default: boolean;
182
+ };
183
+ noExample: {
184
+ type: BooleanConstructor;
185
+ default: boolean;
186
+ };
187
+ noSearch: {
188
+ type: BooleanConstructor;
189
+ default: boolean;
190
+ };
191
+ noUseBrowserLocale: {
192
+ type: BooleanConstructor;
193
+ default: boolean;
194
+ };
195
+ fetchCountry: {
196
+ type: BooleanConstructor;
197
+ default: boolean;
198
+ };
199
+ noCountrySelector: {
200
+ type: BooleanConstructor;
201
+ default: boolean;
202
+ };
203
+ showCodeOnList: {
204
+ type: BooleanConstructor;
205
+ default: boolean;
206
+ };
207
+ error: {
208
+ type: BooleanConstructor;
209
+ default: boolean;
210
+ };
211
+ customCountriesList: {
212
+ type: PropType<Record<CountryCode, string>>;
213
+ default: undefined;
214
+ };
215
+ }>> & {
216
+ "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
217
+ onUpdate?: ((...args: any[]) => any) | undefined;
218
+ "onCountry-code"?: ((...args: any[]) => any) | undefined;
219
+ }, {
220
+ error: boolean;
221
+ size: Size;
222
+ color: Color;
223
+ modelValue: string;
224
+ disabled: boolean;
225
+ id: string;
226
+ placeholder: string;
227
+ listPosition: Position;
228
+ defaultPhoneNumber: string;
229
+ defaultCountryCode: string;
230
+ preferredCountries: CountryCode[];
231
+ ignoredCountries: CountryCode[];
232
+ onlyCountries: CountryCode[];
233
+ translations: {
234
+ countrySelector: {
235
+ placeholder: string;
236
+ error: string;
237
+ searchPlaceholder: string;
238
+ };
239
+ phoneInput: {
240
+ placeholder: string;
241
+ example: string;
242
+ };
243
+ };
244
+ noFlags: boolean;
245
+ noExample: boolean;
246
+ noSearch: boolean;
247
+ noUseBrowserLocale: boolean;
248
+ fetchCountry: boolean;
249
+ noCountrySelector: boolean;
250
+ showCodeOnList: boolean;
251
+ customCountriesList: Record<CountryCode, string>;
252
+ }>;
253
+ export default _default;