maz-ui 3.47.0 → 3.47.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazCheckbox.d.ts +1 -6
- package/components/MazChecklist.d.ts +1 -4
- package/components/MazChecklist.mjs +1 -1
- package/components/MazDialog.d.ts +1 -6
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- package/components/MazDropzone.d.ts +1 -22
- package/components/MazDropzone.mjs +1 -1
- package/components/MazFullscreenLoader.d.ts +4 -5
- package/components/MazFullscreenLoader.mjs +29 -20
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.d.ts +1 -8
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.d.ts +1 -4
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLazyImg.d.ts +2 -0
- package/components/MazLazyImg.mjs +1 -1
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.d.ts +1 -20
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.mjs +1 -1
- package/components/MazRadio.d.ts +1 -6
- package/components/MazRadioButtons.d.ts +1 -6
- package/components/MazSelect.d.ts +1 -10
- package/components/MazSelect.mjs +1 -1
- package/components/MazSpinner.d.ts +13 -23
- package/components/MazSpinner.mjs +13 -16
- package/components/MazTable.d.ts +63 -58
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazLazyImg.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSpinner.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazAvatar-BmaVqPui.mjs → MazAvatar-DFoZvWmg.mjs} +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CvIiiTdM.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-BvdiOa8P.mjs → MazBottomSheet-DqK0EOsq.mjs} +1 -1
- package/components/chunks/{MazBtn-D_IQO-P2.mjs → MazBtn-BO3G90L3.mjs} +2 -2
- package/components/chunks/{MazBtn-CVDDOeLF.mjs → MazBtn-BRUaoP8j.mjs} +1 -1
- package/components/chunks/{MazBtn-B7rKmEGw.mjs → MazBtn-BhnOApJu.mjs} +2 -2
- package/components/chunks/{MazBtn-4g56EBmg.mjs → MazBtn-C28vKP_v.mjs} +1 -1
- package/components/chunks/{MazBtn-D6T9wOxO.mjs → MazBtn-C87UEsVs.mjs} +2 -2
- package/components/chunks/MazBtn-C_l3xuAh.mjs +118 -0
- package/components/chunks/{MazBtn-4jMQE2G-.mjs → MazBtn-CweCwE_4.mjs} +2 -2
- package/components/chunks/{MazBtn-B3i4Ypas.mjs → MazBtn-D7IKoL2c.mjs} +2 -2
- package/components/chunks/{MazBtn-BRdMg4tc.mjs → MazBtn-DJOUeES7.mjs} +2 -2
- package/components/chunks/{MazBtn-CEOWwReA.mjs → MazBtn-DVkwISlp.mjs} +2 -2
- package/components/chunks/{MazBtn-BAxR_dt3.mjs → MazBtn-DadFupkY.mjs} +2 -2
- package/components/chunks/{MazBtn-BvirhKh3.mjs → MazBtn-DzBXfedt.mjs} +1 -1
- package/components/chunks/{MazBtn-DYMxHlYa.mjs → MazBtn-GGcGrIH4.mjs} +2 -2
- package/components/chunks/MazBtn-Mu18egu5.mjs +118 -0
- package/components/chunks/{MazCard-StYuQv11.mjs → MazCard-FSXmHyhj.mjs} +1 -1
- package/components/chunks/{MazCarousel-DEO7Tz8F.mjs → MazCarousel-BEl86YGW.mjs} +1 -1
- package/components/chunks/{MazCheckbox-TiwCiE2s.mjs → MazCheckbox-2G4VkxDz.mjs} +1 -1
- package/components/chunks/{MazCheckbox-D9RW0OPf.mjs → MazCheckbox-BmnqBHaY.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CtiUQoBe.mjs → MazCheckbox-Cq9gpTEw.mjs} +1 -1
- package/components/chunks/{MazChecklist-B9bw1Mn4.mjs → MazChecklist-CY1Cv70T.mjs} +1 -1
- package/components/chunks/{MazDialog-C3urFx7y.mjs → MazDialog-CPgFpAlq.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-BuOWwo6n.mjs → MazDialogPromise-BCCdkrea.mjs} +119 -112
- package/components/chunks/{MazDropzone-D32tLLpO.mjs → MazDropzone-DKFkgqqD.mjs} +1 -1
- package/components/chunks/{MazGallery-BOmH2smL.mjs → MazGallery-BknvUeo1.mjs} +272 -229
- package/components/chunks/{MazGallery-DLNvXEka.mjs → MazGallery-CZOokGAt.mjs} +248 -205
- package/components/chunks/{MazIcon-DyrYf9Sl.mjs → MazIcon-z-jTiuyI.mjs} +1 -1
- package/components/chunks/{MazInput-BZ2U145p.mjs → MazInput-BQoQSRyL.mjs} +2 -2
- package/components/chunks/{MazInput-Bq_SbBRE.mjs → MazInput-CJQB68c-.mjs} +22 -22
- package/components/chunks/{MazInput-_rEW9XWJ.mjs → MazInput-oOA7gdLO.mjs} +23 -23
- package/components/chunks/{MazInputNumber-G8880Neu.mjs → MazInputNumber-B4mQJcVB.mjs} +2 -2
- package/components/chunks/{MazInputPrice-DROLM9PX.mjs → MazInputPrice-BrxE5WVf.mjs} +2 -2
- package/components/chunks/{MazInputTags-BRmcZBo4.mjs → MazInputTags-BVCej_gW.mjs} +233 -232
- package/components/chunks/{MazLazyImg-i-z6hcwF.mjs → MazLazyImg-B-6PQWEi.mjs} +9 -8
- package/components/chunks/{MazLazyImg-RHZ9wOy2.mjs → MazLazyImg-C03sUOXs.mjs} +6 -5
- package/components/chunks/{MazLoadingBar-DHFjKEEm.mjs → MazLoadingBar-Dwf55oHy.mjs} +1 -1
- package/components/chunks/{MazPagination-6MyYnTer.mjs → MazPagination-CHTMRRqE.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-r6OjPeRI.mjs → MazPhoneNumberInput-Cd25AzXc.mjs} +116 -115
- package/components/chunks/{MazPicker-B28fQccE.mjs → MazPicker-C78yxilJ.mjs} +3 -3
- package/components/chunks/{MazPickerMonthSwitcher-DrtbXCca.mjs → MazPickerMonthSwitcher-CyHYx8TT.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-TbhHaKoJ.mjs → MazPickerShortcuts-Bsi8cnox.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-KwUBj6Cb.mjs → MazPickerYearSwitcher-DLUSMAtz.mjs} +1 -1
- package/components/chunks/{MazPullToRefresh-CdVBfDl9.mjs → MazPullToRefresh-CFQX0soS.mjs} +1 -1
- package/components/chunks/{MazSelect-BvC9QQ6M.mjs → MazSelect-CQDoUpgp.mjs} +15 -14
- package/components/chunks/{MazSelect-DyQC9j4n.mjs → MazSelect-uCJPMXF-.mjs} +3 -3
- package/components/chunks/MazSpinner-2D0ZmAQz.mjs +34 -0
- package/components/chunks/MazSpinner-B9OwpEP_.mjs +34 -0
- package/components/chunks/MazSpinner-BT_717pD.mjs +34 -0
- package/components/chunks/MazSpinner-Bvb-lKER.mjs +34 -0
- package/components/chunks/MazSpinner-C-z3-68w.mjs +34 -0
- package/components/chunks/MazSpinner-C1Ip-Dwh.mjs +34 -0
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +34 -0
- package/components/chunks/MazSpinner-CAbYLlEZ.mjs +34 -0
- package/components/chunks/MazSpinner-CViChjTw.mjs +34 -0
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +34 -0
- package/components/chunks/MazSpinner-Cb3_S0zT.mjs +34 -0
- package/components/chunks/MazSpinner-Cqp-BMvL.mjs +34 -0
- package/components/chunks/MazSpinner-CsEQ9EXb.mjs +34 -0
- package/components/chunks/MazSpinner-D4C84xZe.mjs +34 -0
- package/components/chunks/MazSpinner-DjM6ktPY.mjs +34 -0
- package/components/chunks/{MazSpinner-ByWRmwig.mjs → MazSpinner-Du5o8JC_.mjs} +15 -14
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +34 -0
- package/components/chunks/MazSpinner-EFo8dM46.mjs +34 -0
- package/components/chunks/MazSpinner-QHjOczon.mjs +34 -0
- package/components/chunks/MazSpinner-XB6tX3Ld.mjs +34 -0
- package/components/chunks/MazSpinner-f6pBzqbu.mjs +34 -0
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +34 -0
- package/components/chunks/MazSpinner-w-S5uCxg.mjs +34 -0
- package/components/chunks/MazSpinner-yr9xVdAa.mjs +34 -0
- package/components/chunks/{MazTable-DozpABdn.mjs → MazTable-Cuz5QI08.mjs} +4 -4
- package/components/chunks/{MazTableCell-DPgvJ7vY.mjs → MazTableCell-D_OTOJiy.mjs} +1 -1
- package/components/chunks/{MazTableRow-CCcjwAV1.mjs → MazTableRow-BTcVAyOy.mjs} +1 -1
- package/components/chunks/{MazTableTitle-Df7F9Cjh.mjs → MazTableTitle-BDA9G6Zw.mjs} +1 -1
- package/components/chunks/{MazTabsBar-MZYefBb8.mjs → MazTabsBar-JkRzMDM6.mjs} +9 -10
- package/components/chunks/{MazTransitionExpand--vHzXjx7.mjs → MazTransitionExpand-C-FHhOGB.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/MazSpinner.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-BVxI1WwF.mjs → MazBtn-BSnVxud6.mjs} +2 -2
- package/modules/chunks/{MazBtn-DrB5FzZN.cjs → MazBtn-Bf9Cq5M7.cjs} +1 -1
- package/modules/chunks/{MazIcon-b8WRy8OV.mjs → MazIcon-DllGg8tw.mjs} +1 -1
- package/modules/chunks/{MazIcon-BMJqOZnG.cjs → MazIcon-dhyR9Q8a.cjs} +1 -1
- package/modules/chunks/MazSpinner-CiIyZ8gs.cjs +1 -0
- package/modules/chunks/MazSpinner-bdGjxsu6.mjs +34 -0
- package/modules/chunks/index-BPqjUr5e.cjs +149 -0
- package/modules/chunks/{index-Ch4k74ro.mjs → index-x2F1l5sr.mjs} +976 -940
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +10 -10
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazCheckbox.vue.d.ts +1 -6
- package/types/components/MazChecklist.vue.d.ts +1 -4
- package/types/components/MazDialog.vue.d.ts +1 -6
- package/types/components/MazDropzone.vue.d.ts +1 -22
- package/types/components/MazFullscreenLoader.vue.d.ts +4 -5
- package/types/components/MazInput.vue.d.ts +1 -8
- package/types/components/MazInputCode.vue.d.ts +1 -4
- package/types/components/MazLazyImg.vue.d.ts +2 -0
- package/types/components/MazPhoneNumberInput.vue.d.ts +1 -20
- package/types/components/MazRadio.vue.d.ts +1 -6
- package/types/components/MazRadioButtons.vue.d.ts +1 -6
- package/types/components/MazSelect.vue.d.ts +1 -10
- package/types/components/MazSpinner.vue.d.ts +13 -23
- package/types/components/MazTable.vue.d.ts +63 -58
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/types/modules/helpers/idle-timeout/types.d.ts +5 -3
- package/components/chunks/MazBtn-BF48_wJx.mjs +0 -118
- package/components/chunks/MazBtn-CGYoHDXm.mjs +0 -118
- package/components/chunks/MazSpinner-3vO8e4FF.mjs +0 -37
- package/components/chunks/MazSpinner-5w4SkOOl.mjs +0 -37
- package/components/chunks/MazSpinner-B0291afs.mjs +0 -37
- package/components/chunks/MazSpinner-B0aGd8rG.mjs +0 -37
- package/components/chunks/MazSpinner-BziSiJFV.mjs +0 -37
- package/components/chunks/MazSpinner-CKX-8iim.mjs +0 -37
- package/components/chunks/MazSpinner-CQ2XrZIS.mjs +0 -37
- package/components/chunks/MazSpinner-CQbd8Ovn.mjs +0 -37
- package/components/chunks/MazSpinner-CRW667yE.mjs +0 -37
- package/components/chunks/MazSpinner-Coq7N5iG.mjs +0 -37
- package/components/chunks/MazSpinner-D-7IOf2L.mjs +0 -37
- package/components/chunks/MazSpinner-D0t4IJyq.mjs +0 -37
- package/components/chunks/MazSpinner-D2pssr8S.mjs +0 -37
- package/components/chunks/MazSpinner-D5hiFgo4.mjs +0 -37
- package/components/chunks/MazSpinner-DkXUB0w5.mjs +0 -37
- package/components/chunks/MazSpinner-Dscrgjm1.mjs +0 -41
- package/components/chunks/MazSpinner-DyVjCwmM.mjs +0 -37
- package/components/chunks/MazSpinner-HZYglQFY.mjs +0 -37
- package/components/chunks/MazSpinner-JpzVmSvW.mjs +0 -37
- package/components/chunks/MazSpinner-Nu5h2A6E.mjs +0 -37
- package/components/chunks/MazSpinner-S6Bx7B15.mjs +0 -37
- package/components/chunks/MazSpinner-SgVUnAHk.mjs +0 -37
- package/components/chunks/MazSpinner-wR0F3mAY.mjs +0 -37
- package/modules/chunks/MazSpinner-6H0uaGkV.cjs +0 -1
- package/modules/chunks/MazSpinner-B-Tki1aV.mjs +0 -37
- package/modules/chunks/index-G8fhXnFU.cjs +0 -149
package/components/chunks/{MazPhoneNumberInput-r6OjPeRI.mjs → MazPhoneNumberInput-Cd25AzXc.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/MazPhoneNumberInput.css';var Ge = Object.defineProperty;
|
|
2
2
|
var Je = (n, o, e) => o in n ? Ge(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
|
|
3
3
|
var _ = (n, o, e) => Je(n, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { useId as Ze, computed as h, inject as Xe, defineComponent as se, defineAsyncComponent as q, withDirectives as ze, openBlock as b, createElementBlock as L, normalizeClass as F, normalizeStyle as ee, Fragment as be, renderList as Be, createElementVNode as j, mergeProps as oe, createVNode as H, unref as
|
|
4
|
+
import { useId as Ze, computed as h, inject as Xe, defineComponent as se, defineAsyncComponent as q, withDirectives as ze, openBlock as b, createElementBlock as L, normalizeClass as F, normalizeStyle as ee, Fragment as be, renderList as Be, createElementVNode as j, mergeProps as oe, createVNode as H, unref as k, createCommentVNode as z, renderSlot as N, ref as E, onMounted as Ie, useSlots as xe, createBlock as U, resolveDynamicComponent as Pe, toHandlers as _e, vModelDynamic as eo, createTextVNode as oo, toDisplayString as ue, withModifiers as ae, withCtx as G, useCssVars as to, onBeforeMount as lo, nextTick as ie, Transition as no, mergeModels as ke, useModel as ao, provide as so, watch as he } from "vue";
|
|
5
5
|
import { getCountries as Oe, getCountryCallingCode as ce, isSupportedCountry as ro, parsePhoneNumberFromString as io, AsYouType as uo, getExampleNumber as co } from "libphonenumber-js";
|
|
6
6
|
function Ae({
|
|
7
7
|
componentName: n,
|
|
@@ -10,7 +10,7 @@ function Ae({
|
|
|
10
10
|
const e = Ze();
|
|
11
11
|
return h(() => o ?? `${n}-${e}`);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Ee(n, o = "20x15") {
|
|
14
14
|
return `https://flagcdn.com/${o}/${n.toLowerCase()}.png`;
|
|
15
15
|
}
|
|
16
16
|
function Me(n, o) {
|
|
@@ -19,10 +19,10 @@ function Me(n, o) {
|
|
|
19
19
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${n}`);
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function po(n) {
|
|
23
23
|
return !!n;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", fo = {
|
|
26
26
|
baseClass: "m-lazy-img",
|
|
27
27
|
loadedClass: "m-lazy-loaded",
|
|
28
28
|
loadingClass: "m-lazy-loading",
|
|
@@ -151,16 +151,16 @@ class ho {
|
|
|
151
151
|
handleIntersectionObserver(o, e, t, r) {
|
|
152
152
|
var u, y;
|
|
153
153
|
this.observers.push(r);
|
|
154
|
-
for (const
|
|
155
|
-
if (
|
|
156
|
-
if ((y = (u = this.options).onIntersecting) == null || y.call(u,
|
|
154
|
+
for (const m of t)
|
|
155
|
+
if (m.isIntersecting) {
|
|
156
|
+
if ((y = (u = this.options).onIntersecting) == null || y.call(u, m.target), this.options.observerOnce && r.unobserve(o), this.options.loadOnce && this.hasImgLoaded)
|
|
157
157
|
return;
|
|
158
158
|
this.loadImage(o, e);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
createObserver(o, e) {
|
|
162
|
-
const t = (y,
|
|
163
|
-
this.handleIntersectionObserver(o, e, y,
|
|
162
|
+
const t = (y, m) => {
|
|
163
|
+
this.handleIntersectionObserver(o, e, y, m);
|
|
164
164
|
}, r = this.options.observerOptions;
|
|
165
165
|
new IntersectionObserver(t, r).observe(o);
|
|
166
166
|
}
|
|
@@ -177,7 +177,7 @@ class ho {
|
|
|
177
177
|
async add(o, e) {
|
|
178
178
|
if (this.hasBgImgMode(e) && this.isPictureElement(o))
|
|
179
179
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
180
|
-
setTimeout(() => this.setBaseClass(o), 0), o.getAttribute("src") || this.setImgSrc(o,
|
|
180
|
+
setTimeout(() => this.setBaseClass(o), 0), o.getAttribute("src") || this.setImgSrc(o, mo), await this.bindUpdateHandler(o, e, "bind");
|
|
181
181
|
}
|
|
182
182
|
async update(o, e) {
|
|
183
183
|
e.value !== e.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(o), await this.bindUpdateHandler(o, e, "update"));
|
|
@@ -220,27 +220,28 @@ const yo = {
|
|
|
220
220
|
imageHeightFull: { type: Boolean },
|
|
221
221
|
observerOptions: { default: void 0 },
|
|
222
222
|
fallbackSrc: { default: void 0 },
|
|
223
|
-
imgClass: {}
|
|
223
|
+
imgClass: {},
|
|
224
|
+
block: { type: Boolean }
|
|
224
225
|
},
|
|
225
226
|
emits: ["intersecting", "loading", "loaded", "error"],
|
|
226
227
|
setup(n) {
|
|
227
|
-
const o = n, e = q(() => import("./MazSpinner-
|
|
228
|
+
const o = n, e = q(() => import("./MazSpinner-C23CZ_Za.mjs")), t = h(() => o.image || o.src), r = h(() => {
|
|
228
229
|
var u;
|
|
229
230
|
return typeof t.value == "string" ? [{ srcset: t.value }] : (u = t.value) == null ? void 0 : u.sources;
|
|
230
231
|
});
|
|
231
232
|
return (u, y) => ze((b(), L(
|
|
232
233
|
"picture",
|
|
233
234
|
{
|
|
234
|
-
class: F(["m-lazy-img-component", [{ "--use-loader": !u.noLoader, "--height-full": u.imageHeightFull }, o.class]]),
|
|
235
|
+
class: F(["m-lazy-img-component", [{ "--use-loader": !u.noLoader, "--height-full": u.imageHeightFull, "--block": u.block }, o.class]]),
|
|
235
236
|
style: ee(u.style)
|
|
236
237
|
},
|
|
237
238
|
[
|
|
238
239
|
(b(!0), L(
|
|
239
240
|
be,
|
|
240
241
|
null,
|
|
241
|
-
Be(r.value, ({ srcset:
|
|
242
|
+
Be(r.value, ({ srcset: m, media: O }, $) => (b(), L("source", {
|
|
242
243
|
key: $,
|
|
243
|
-
"data-lazy-srcset":
|
|
244
|
+
"data-lazy-srcset": m,
|
|
244
245
|
media: O
|
|
245
246
|
}, null, 8, vo))),
|
|
246
247
|
128
|
|
@@ -253,23 +254,23 @@ const yo = {
|
|
|
253
254
|
class: u.imgClass
|
|
254
255
|
}), null, 16, go),
|
|
255
256
|
u.noLoader ? z("v-if", !0) : (b(), L("div", bo, [
|
|
256
|
-
H(
|
|
257
|
+
H(k(e), { size: "2em" })
|
|
257
258
|
])),
|
|
258
259
|
N(u.$slots, "default", {}, void 0, !0)
|
|
259
260
|
],
|
|
260
261
|
6
|
|
261
262
|
/* CLASS, STYLE */
|
|
262
263
|
)), [
|
|
263
|
-
[
|
|
264
|
+
[k(yo), {
|
|
264
265
|
noPhoto: u.noPhoto,
|
|
265
266
|
loadOnce: u.loadOnce,
|
|
266
267
|
observerOptions: u.observerOptions,
|
|
267
268
|
fallbackSrc: u.fallbackSrc,
|
|
268
269
|
observerOnce: !u.noObserverOnce,
|
|
269
|
-
onIntersecting: (
|
|
270
|
-
onLoading: (
|
|
271
|
-
onLoaded: (
|
|
272
|
-
onError: (
|
|
270
|
+
onIntersecting: (m) => u.$emit("intersecting", m),
|
|
271
|
+
onLoading: (m) => u.$emit("loading", m),
|
|
272
|
+
onLoaded: (m) => u.$emit("loaded", m),
|
|
273
|
+
onError: (m) => u.$emit("error", m)
|
|
273
274
|
}]
|
|
274
275
|
]);
|
|
275
276
|
}
|
|
@@ -278,7 +279,7 @@ const yo = {
|
|
|
278
279
|
for (const [t, r] of o)
|
|
279
280
|
e[t] = r;
|
|
280
281
|
return e;
|
|
281
|
-
}, Le = /* @__PURE__ */ re(Co, [["__scopeId", "data-v-
|
|
282
|
+
}, Le = /* @__PURE__ */ re(Co, [["__scopeId", "data-v-83e40430"]]), zo = {
|
|
282
283
|
removeAccents: !0,
|
|
283
284
|
caseSensitive: !1,
|
|
284
285
|
replaceSpaces: !0,
|
|
@@ -288,7 +289,7 @@ const yo = {
|
|
|
288
289
|
removeNumbers: !1,
|
|
289
290
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
290
291
|
};
|
|
291
|
-
function
|
|
292
|
+
function pe(n, o) {
|
|
292
293
|
const e = { ...zo, ...o }, t = {
|
|
293
294
|
À: "A",
|
|
294
295
|
Á: "A",
|
|
@@ -352,11 +353,11 @@ function Io(n, o) {
|
|
|
352
353
|
r[0][u] = u;
|
|
353
354
|
for (let u = 1; u <= e; u++)
|
|
354
355
|
for (let y = 1; y <= t; y++) {
|
|
355
|
-
const
|
|
356
|
+
const m = n[u - 1] === o[y - 1] ? 0 : 1;
|
|
356
357
|
r[u][y] = Math.min(
|
|
357
358
|
r[u - 1][y] + 1,
|
|
358
359
|
r[u][y - 1] + 1,
|
|
359
|
-
r[u - 1][y - 1] +
|
|
360
|
+
r[u - 1][y - 1] + m
|
|
360
361
|
);
|
|
361
362
|
}
|
|
362
363
|
return r[e][t];
|
|
@@ -370,9 +371,9 @@ function Ao(n, o, e = 0.75) {
|
|
|
370
371
|
}
|
|
371
372
|
function ye(n, o, e = 0.75) {
|
|
372
373
|
const t = h(
|
|
373
|
-
() =>
|
|
374
|
+
() => pe(typeof n == "string" ? n : n.value)
|
|
374
375
|
), r = h(
|
|
375
|
-
() =>
|
|
376
|
+
() => pe(typeof o == "string" ? o : o.value)
|
|
376
377
|
), u = h(() => typeof e == "number" ? e : e.value), y = h(() => Te(t.value, r.value));
|
|
377
378
|
return {
|
|
378
379
|
isMatching: h(
|
|
@@ -387,9 +388,9 @@ function Fe(n, o, e) {
|
|
|
387
388
|
const t = typeof e.value == "function" ? e.value : e.value.handler, r = typeof e.value == "object" ? e.value.exclude : void 0;
|
|
388
389
|
let u = !1;
|
|
389
390
|
if (r && r.length > 0) {
|
|
390
|
-
for (const
|
|
391
|
+
for (const m of r)
|
|
391
392
|
if (!u && n.target instanceof HTMLElement) {
|
|
392
|
-
const O = (y = document.querySelector(
|
|
393
|
+
const O = (y = document.querySelector(m)) == null ? void 0 : y.getAttribute("id");
|
|
393
394
|
u = n.target.getAttribute("id") === O;
|
|
394
395
|
}
|
|
395
396
|
}
|
|
@@ -414,11 +415,7 @@ const Vo = {
|
|
|
414
415
|
mounted: So,
|
|
415
416
|
unmounted: wo
|
|
416
417
|
};
|
|
417
|
-
let ve = null;
|
|
418
418
|
function Po(n, o) {
|
|
419
|
-
ve && clearTimeout(ve), ve = setTimeout(n, o);
|
|
420
|
-
}
|
|
421
|
-
function Eo(n, o) {
|
|
422
419
|
let e;
|
|
423
420
|
return function(...t) {
|
|
424
421
|
clearTimeout(e), e = setTimeout(() => {
|
|
@@ -426,7 +423,11 @@ function Eo(n, o) {
|
|
|
426
423
|
}, o);
|
|
427
424
|
};
|
|
428
425
|
}
|
|
429
|
-
|
|
426
|
+
let ve = null;
|
|
427
|
+
function ko(n, o) {
|
|
428
|
+
ve && clearTimeout(ve), ve = setTimeout(n, o);
|
|
429
|
+
}
|
|
430
|
+
const Eo = {
|
|
430
431
|
key: 0,
|
|
431
432
|
class: "m-input-wrapper-left"
|
|
432
433
|
}, Lo = { class: "m-input-wrapper-input" }, $o = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Bo = { key: 0 }, Oo = {
|
|
@@ -470,7 +471,7 @@ const ko = {
|
|
|
470
471
|
},
|
|
471
472
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
472
473
|
setup(n, { emit: o }) {
|
|
473
|
-
const e = n, t = o, r = q(() => import("./MazBtn-
|
|
474
|
+
const e = n, t = o, r = q(() => import("./MazBtn-C_l3xuAh.mjs")), u = q(() => import("./MazIcon-z-jTiuyI.mjs")), y = q(() => import("./eye-slash-BoO00xzs.mjs")), m = q(() => import("./eye-f8zAUc30.mjs")), O = q(() => import("./check-C9Q_W85g.mjs")), $ = E(!1), v = E(!1), P = E(), i = Ae({
|
|
474
475
|
componentName: "MazInput",
|
|
475
476
|
providedId: e.id
|
|
476
477
|
});
|
|
@@ -510,7 +511,7 @@ const ko = {
|
|
|
510
511
|
const { required: s, placeholder: M } = e;
|
|
511
512
|
if (M)
|
|
512
513
|
return s ? `${M} *` : M;
|
|
513
|
-
}), J = h(() => C.value !== void 0 && C.value !== ""), g =
|
|
514
|
+
}), J = h(() => C.value !== void 0 && C.value !== ""), g = Po(
|
|
514
515
|
(s) => {
|
|
515
516
|
t("update:model-value", s);
|
|
516
517
|
},
|
|
@@ -574,12 +575,12 @@ const ko = {
|
|
|
574
575
|
]])
|
|
575
576
|
},
|
|
576
577
|
[
|
|
577
|
-
w() ? (b(), L("div",
|
|
578
|
+
w() ? (b(), L("div", Eo, [
|
|
578
579
|
z(`
|
|
579
580
|
@slot left-icon - The icon to display on the left of the input
|
|
580
581
|
`),
|
|
581
582
|
s.$slots["left-icon"] || s.leftIcon ? N(s.$slots, "left-icon", { key: 0 }, () => [
|
|
582
|
-
typeof s.leftIcon == "string" ? (b(), U(
|
|
583
|
+
typeof s.leftIcon == "string" ? (b(), U(k(u), {
|
|
583
584
|
key: 0,
|
|
584
585
|
name: s.leftIcon,
|
|
585
586
|
class: "maz-text-xl maz-text-muted"
|
|
@@ -591,7 +592,7 @@ const ko = {
|
|
|
591
592
|
])) : z("v-if", !0),
|
|
592
593
|
j("div", Lo, [
|
|
593
594
|
ze(j("input", oe({
|
|
594
|
-
id:
|
|
595
|
+
id: k(i),
|
|
595
596
|
ref_key: "input",
|
|
596
597
|
ref: P,
|
|
597
598
|
"onUpdate:modelValue": M[0] || (M[0] = (x) => C.value = x),
|
|
@@ -644,7 +645,7 @@ const ko = {
|
|
|
644
645
|
@slot right-icon - The icon to display on the right of the input
|
|
645
646
|
`),
|
|
646
647
|
s.$slots["right-icon"] || s.rightIcon ? N(s.$slots, "right-icon", { key: 0 }, () => [
|
|
647
|
-
typeof s.rightIcon == "string" ? (b(), U(
|
|
648
|
+
typeof s.rightIcon == "string" ? (b(), U(k(u), {
|
|
648
649
|
key: 0,
|
|
649
650
|
name: s.rightIcon,
|
|
650
651
|
class: "maz-text-xl maz-text-muted"
|
|
@@ -653,7 +654,7 @@ const ko = {
|
|
|
653
654
|
class: "maz-text-xl maz-text-muted"
|
|
654
655
|
})) : z("v-if", !0)
|
|
655
656
|
], !0) : z("v-if", !0),
|
|
656
|
-
f.value ? (b(), U(
|
|
657
|
+
f.value ? (b(), U(k(r), {
|
|
657
658
|
key: 1,
|
|
658
659
|
color: "transparent",
|
|
659
660
|
tabindex: "-1",
|
|
@@ -661,10 +662,10 @@ const ko = {
|
|
|
661
662
|
onClick: M[2] || (M[2] = ae((x) => $.value = !$.value, ["stop"]))
|
|
662
663
|
}, {
|
|
663
664
|
default: G(() => [
|
|
664
|
-
$.value ? (b(), U(
|
|
665
|
+
$.value ? (b(), U(k(y), {
|
|
665
666
|
key: 0,
|
|
666
667
|
class: "maz-text-xl maz-text-muted"
|
|
667
|
-
})) : (b(), U(
|
|
668
|
+
})) : (b(), U(k(m), {
|
|
668
669
|
key: 1,
|
|
669
670
|
class: "maz-text-xl maz-text-muted"
|
|
670
671
|
}))
|
|
@@ -676,7 +677,7 @@ const ko = {
|
|
|
676
677
|
@slot valid-button - Replace the valid button by your own
|
|
677
678
|
`),
|
|
678
679
|
s.$slots["valid-button"] || s.validButton ? N(s.$slots, "valid-button", { key: 2 }, () => [
|
|
679
|
-
H(
|
|
680
|
+
H(k(r), {
|
|
680
681
|
color: "transparent",
|
|
681
682
|
disabled: s.disabled,
|
|
682
683
|
tabindex: "-1",
|
|
@@ -686,7 +687,7 @@ const ko = {
|
|
|
686
687
|
type: "submit"
|
|
687
688
|
}, {
|
|
688
689
|
default: G(() => [
|
|
689
|
-
H(
|
|
690
|
+
H(k(O), { class: "maz-text-2xl maz-text-normal" })
|
|
690
691
|
]),
|
|
691
692
|
_: 1
|
|
692
693
|
/* STABLE */
|
|
@@ -702,7 +703,7 @@ const ko = {
|
|
|
702
703
|
/* CLASS, STYLE */
|
|
703
704
|
));
|
|
704
705
|
}
|
|
705
|
-
}), Ce = /* @__PURE__ */ re(Mo, [["__scopeId", "data-v-
|
|
706
|
+
}), Ce = /* @__PURE__ */ re(Mo, [["__scopeId", "data-v-c42aaa7f"]]), To = ["aria-label"], Fo = { class: "m-select-list__no-results" }, No = {
|
|
706
707
|
key: 2,
|
|
707
708
|
class: "m-select-list__scroll-wrapper",
|
|
708
709
|
tabindex: "-1"
|
|
@@ -744,14 +745,14 @@ const ko = {
|
|
|
744
745
|
"215ff493": i.value,
|
|
745
746
|
"64d6cfbb": f.value
|
|
746
747
|
}));
|
|
747
|
-
const t = n, r = e, u = q(() => import("./MazCheckbox-
|
|
748
|
+
const t = n, r = e, u = q(() => import("./MazCheckbox-2G4VkxDz.mjs")), y = q(() => import("./magnifying-glass--nBiyXot.mjs")), m = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
748
749
|
o({
|
|
749
750
|
/** Method to open the option list */
|
|
750
751
|
openList: ne,
|
|
751
752
|
/** Method to close the option list */
|
|
752
753
|
closeList: le
|
|
753
754
|
});
|
|
754
|
-
const $ =
|
|
755
|
+
const $ = E(!1), v = E(), P = h(
|
|
755
756
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
756
757
|
), i = h(
|
|
757
758
|
() => P.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
@@ -783,13 +784,13 @@ const ko = {
|
|
|
783
784
|
const l = [];
|
|
784
785
|
if (!((d = t.options) != null && d.length))
|
|
785
786
|
return [];
|
|
786
|
-
for (const
|
|
787
|
-
typeof
|
|
788
|
-
{ label:
|
|
789
|
-
...
|
|
787
|
+
for (const p of t.options)
|
|
788
|
+
typeof p == "string" || typeof p == "number" || typeof p == "boolean" ? l.push(Y(p)) : typeof p == "object" && "options" in p && Array.isArray(p.options) ? l.push(
|
|
789
|
+
{ label: p.label, isOptGroup: !0 },
|
|
790
|
+
...p.options.map(
|
|
790
791
|
(c) => typeof c == "string" || typeof c == "number" || typeof c == "boolean" ? Y(c) : J(c)
|
|
791
792
|
)
|
|
792
|
-
) : l.push(J(
|
|
793
|
+
) : l.push(J(p));
|
|
793
794
|
return l;
|
|
794
795
|
}), V = h(
|
|
795
796
|
() => {
|
|
@@ -801,13 +802,13 @@ const ko = {
|
|
|
801
802
|
var l;
|
|
802
803
|
(l = t.options) != null && l.length || console.warn("[maz-ui](MazSelect) you must provide options"), fe();
|
|
803
804
|
});
|
|
804
|
-
const C =
|
|
805
|
+
const C = E(), W = E(), Z = E(), a = E();
|
|
805
806
|
function w(l) {
|
|
806
807
|
return l == null;
|
|
807
808
|
}
|
|
808
809
|
function K(l) {
|
|
809
|
-
var
|
|
810
|
-
return (((
|
|
810
|
+
var p;
|
|
811
|
+
return (((p = V.value) == null ? void 0 : p.some(
|
|
811
812
|
(c) => c[t.optionValueKey] === l[t.optionValueKey]
|
|
812
813
|
)) ?? !1) && !w(l[t.optionValueKey]);
|
|
813
814
|
}
|
|
@@ -815,34 +816,34 @@ const ko = {
|
|
|
815
816
|
var d;
|
|
816
817
|
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
817
818
|
return t.modelValue.map(
|
|
818
|
-
(
|
|
819
|
+
(p) => {
|
|
819
820
|
var c, A;
|
|
820
|
-
return (A = (c = g.value) == null ? void 0 : c.find((B) => B[t.optionValueKey] ===
|
|
821
|
+
return (A = (c = g.value) == null ? void 0 : c.find((B) => B[t.optionValueKey] === p)) == null ? void 0 : A[t.optionInputValueKey];
|
|
821
822
|
}
|
|
822
823
|
).join(", ");
|
|
823
824
|
const l = (d = g.value) == null ? void 0 : d.find(
|
|
824
|
-
(
|
|
825
|
+
(p) => p[t.optionValueKey] === t.modelValue
|
|
825
826
|
);
|
|
826
827
|
return w(t.modelValue) || l == null ? void 0 : l[t.optionInputValueKey];
|
|
827
828
|
}), te = h(
|
|
828
829
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
829
|
-
), X =
|
|
830
|
+
), X = E(""), s = E("");
|
|
830
831
|
function M(l, d) {
|
|
831
|
-
return d && l &&
|
|
832
|
+
return d && l && pe(l).includes(pe(d));
|
|
832
833
|
}
|
|
833
834
|
function x(l) {
|
|
834
835
|
var d;
|
|
835
|
-
return l ? (d = g.value) == null ? void 0 : d.filter((
|
|
836
|
-
const c =
|
|
836
|
+
return l ? (d = g.value) == null ? void 0 : d.filter((p) => {
|
|
837
|
+
const c = p[t.optionLabelKey], A = p[t.optionValueKey], B = p[t.optionInputValueKey], D = t.searchThreshold;
|
|
837
838
|
return M(c, l) || M(B, l) || M(A, l) || typeof c == "string" && ye(c, l, D).isMatching.value || typeof B == "string" && ye(B, l, D).isMatching.value || typeof A == "string" && ye(A, l, D).isMatching.value;
|
|
838
839
|
}) : g.value;
|
|
839
840
|
}
|
|
840
841
|
const Q = h(() => x(X.value));
|
|
841
842
|
async function le(l) {
|
|
842
|
-
var
|
|
843
|
+
var p, c;
|
|
843
844
|
if (!S.value)
|
|
844
845
|
return;
|
|
845
|
-
if (l && ("relatedTarget" in l && ((
|
|
846
|
+
if (l && ("relatedTarget" in l && ((p = C.value) != null && p.contains(l.relatedTarget)) || l.type === "keydown"))
|
|
846
847
|
return l.preventDefault();
|
|
847
848
|
const d = l && "relatedTarget" in l && l.relatedTarget instanceof HTMLElement && l.relatedTarget.getAttribute("id");
|
|
848
849
|
if ((c = t.excludeSelectors) != null && c.includes(`#${d}`))
|
|
@@ -850,7 +851,7 @@ const ko = {
|
|
|
850
851
|
await ie(), $.value = !1, v.value = 0, r("close", l);
|
|
851
852
|
}
|
|
852
853
|
async function ne(l) {
|
|
853
|
-
t.disabled || S.value || (l == null || l.preventDefault(), $.value = !0, await
|
|
854
|
+
t.disabled || S.value || (l == null || l.preventDefault(), $.value = !0, await me(), r("focus", l), r("open", $.value));
|
|
854
855
|
}
|
|
855
856
|
function we() {
|
|
856
857
|
var l, d;
|
|
@@ -864,16 +865,16 @@ const ko = {
|
|
|
864
865
|
$.value ? le(l) : we();
|
|
865
866
|
}
|
|
866
867
|
function qe(l) {
|
|
867
|
-
var d,
|
|
868
|
-
X.value = l, (
|
|
868
|
+
var d, p;
|
|
869
|
+
X.value = l, (p = ((d = Z.value) == null ? void 0 : d.$el).querySelector("input")) == null || p.focus();
|
|
869
870
|
}
|
|
870
871
|
function je(l) {
|
|
871
|
-
var
|
|
872
|
+
var p;
|
|
872
873
|
l === "Backspace" && s.value.length > 0 ? s.value = s.value.slice(0, -1) : s.value += l;
|
|
873
874
|
const d = x(s.value);
|
|
874
|
-
d != null && d.length && (v.value = (
|
|
875
|
+
d != null && d.length && (v.value = (p = Q.value) == null ? void 0 : p.findIndex(
|
|
875
876
|
(c) => c[t.optionValueKey] === d[0][t.optionValueKey]
|
|
876
|
-
), typeof v.value == "number" && v.value >= 0 &&
|
|
877
|
+
), typeof v.value == "number" && v.value >= 0 && me(v.value)), ko(() => {
|
|
877
878
|
s.value = "";
|
|
878
879
|
}, 1e3);
|
|
879
880
|
}
|
|
@@ -882,30 +883,30 @@ const ko = {
|
|
|
882
883
|
/^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(), ne(l), t.search ? qe(d) : je(d)) : Se(l);
|
|
883
884
|
}
|
|
884
885
|
function Se(l, d = !0) {
|
|
885
|
-
const
|
|
886
|
+
const p = l.code, c = ["ArrowUp", "ArrowDown"].includes(p), A = (d ? ["Enter", "Space"] : ["Enter"]).includes(p), B = p === "Escape" && S.value;
|
|
886
887
|
c ? We(l, v.value) : A ? Qe(l, v.value) : B && le(l);
|
|
887
888
|
}
|
|
888
889
|
function We(l, d) {
|
|
889
890
|
var A;
|
|
890
891
|
l.preventDefault();
|
|
891
|
-
const
|
|
892
|
+
const p = l.code;
|
|
892
893
|
S.value || ne(l);
|
|
893
894
|
const c = (A = Q.value) == null ? void 0 : A.length;
|
|
894
|
-
c && (typeof d == "number" ? d === c - 1 &&
|
|
895
|
+
c && (typeof d == "number" ? d === c - 1 && p === "ArrowDown" ? v.value = 0 : d === 0 && p === "ArrowUp" ? v.value = c - 1 : v.value = p === "ArrowDown" ? d + 1 : d - 1 : v.value = p === "ArrowDown" ? 0 : c - 1, me(v.value));
|
|
895
896
|
}
|
|
896
897
|
function Qe(l, d) {
|
|
897
898
|
var c, A, B;
|
|
898
899
|
if (l.preventDefault(), !S.value)
|
|
899
900
|
return ne(l);
|
|
900
|
-
const
|
|
901
|
-
w(
|
|
901
|
+
const p = d ? ((c = Q.value) == null ? void 0 : c[d]) ?? ((A = Q.value) == null ? void 0 : A[0]) : (B = Q.value) == null ? void 0 : B[0];
|
|
902
|
+
w(p) || Ve(p);
|
|
902
903
|
}
|
|
903
|
-
async function
|
|
904
|
-
var
|
|
904
|
+
async function me(l) {
|
|
905
|
+
var p, c;
|
|
905
906
|
await ie(), typeof l != "number" && fe();
|
|
906
907
|
const d = l ?? v.value;
|
|
907
908
|
if (typeof d == "number" && d >= 0) {
|
|
908
|
-
const A = (
|
|
909
|
+
const A = (p = a.value) == null ? void 0 : p.querySelectorAll(".m-select-list-item");
|
|
909
910
|
(c = A == null ? void 0 : A[d]) == null || c.scrollIntoView({
|
|
910
911
|
behavior: "auto",
|
|
911
912
|
block: "nearest",
|
|
@@ -914,8 +915,8 @@ const ko = {
|
|
|
914
915
|
}
|
|
915
916
|
}
|
|
916
917
|
function fe(l) {
|
|
917
|
-
var
|
|
918
|
-
const d = (
|
|
918
|
+
var p;
|
|
919
|
+
const d = (p = Q.value) == null ? void 0 : p.findIndex((c) => {
|
|
919
920
|
var A, B;
|
|
920
921
|
return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] === c[t.optionValueKey] : [...t.modelValue].reverse()[0] === c[t.optionValueKey] : ((B = (A = V.value) == null ? void 0 : A[0]) == null ? void 0 : B[t.optionValueKey]) === c[t.optionValueKey];
|
|
921
922
|
});
|
|
@@ -924,18 +925,18 @@ const ko = {
|
|
|
924
925
|
function Ve(l, d = !0) {
|
|
925
926
|
var B;
|
|
926
927
|
d && !t.multiple && ie(() => le()), X.value = "";
|
|
927
|
-
const
|
|
928
|
+
const p = (B = V.value) == null ? void 0 : B.some(
|
|
928
929
|
(D) => D[t.optionValueKey] === l[t.optionValueKey]
|
|
929
930
|
);
|
|
930
931
|
let c = V.value;
|
|
931
|
-
|
|
932
|
+
p && t.multiple ? c = c == null ? void 0 : c.filter(
|
|
932
933
|
(D) => D[t.optionValueKey] !== l[t.optionValueKey]
|
|
933
934
|
) : t.multiple ? c.push(l) : c = [l];
|
|
934
935
|
const A = c.map((D) => D[t.optionValueKey]);
|
|
935
936
|
r("update:model-value", t.multiple ? A : A[0]), r("selected-option", l), Re(), fe(l), we();
|
|
936
937
|
}
|
|
937
938
|
return (l, d) => {
|
|
938
|
-
var
|
|
939
|
+
var p;
|
|
939
940
|
return ze((b(), L(
|
|
940
941
|
"div",
|
|
941
942
|
{
|
|
@@ -950,7 +951,7 @@ const ko = {
|
|
|
950
951
|
},
|
|
951
952
|
[
|
|
952
953
|
H(Ce, oe({
|
|
953
|
-
id:
|
|
954
|
+
id: k(R),
|
|
954
955
|
ref_key: "mazInputComponent",
|
|
955
956
|
ref: W,
|
|
956
957
|
class: "m-select-input"
|
|
@@ -978,7 +979,7 @@ const ko = {
|
|
|
978
979
|
"aria-label": `${S.value ? "collapse" : "expand"} list of options`,
|
|
979
980
|
onClick: ae(De, ["stop"])
|
|
980
981
|
}, [
|
|
981
|
-
H(
|
|
982
|
+
H(k(m), { class: "m-select-chevron maz-text-xl" })
|
|
982
983
|
], 8, To)
|
|
983
984
|
]),
|
|
984
985
|
_: 1
|
|
@@ -1023,7 +1024,7 @@ const ko = {
|
|
|
1023
1024
|
autocomplete: "off",
|
|
1024
1025
|
tabindex: "-1",
|
|
1025
1026
|
class: "m-select-list__search-input maz-flex-none",
|
|
1026
|
-
"left-icon":
|
|
1027
|
+
"left-icon": k(y),
|
|
1027
1028
|
onKeydown: d[3] || (d[3] = (c) => Se(c, !1))
|
|
1028
1029
|
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : z("v-if", !0),
|
|
1029
1030
|
z(`
|
|
@@ -1031,7 +1032,7 @@ const ko = {
|
|
|
1031
1032
|
`),
|
|
1032
1033
|
!Q.value || Q.value.length <= 0 ? N(l.$slots, "no-results", { key: 1 }, () => [
|
|
1033
1034
|
j("span", Fo, [
|
|
1034
|
-
H(
|
|
1035
|
+
H(k(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
1035
1036
|
])
|
|
1036
1037
|
], !0) : (b(), L("div", No, [
|
|
1037
1038
|
(b(!0), L(
|
|
@@ -1070,7 +1071,7 @@ const ko = {
|
|
|
1070
1071
|
style: ee(l.itemHeight ? { height: `${l.itemHeight}px` } : void 0),
|
|
1071
1072
|
onClick: ae((B) => Ve(c), ["prevent", "stop"])
|
|
1072
1073
|
}, [
|
|
1073
|
-
l.multiple ? (b(), U(
|
|
1074
|
+
l.multiple ? (b(), U(k(u), {
|
|
1074
1075
|
key: 0,
|
|
1075
1076
|
tabindex: "-1",
|
|
1076
1077
|
"model-value": K(c),
|
|
@@ -1115,8 +1116,8 @@ const ko = {
|
|
|
1115
1116
|
6
|
|
1116
1117
|
/* CLASS, STYLE */
|
|
1117
1118
|
)), [
|
|
1118
|
-
[
|
|
1119
|
-
exclude: (
|
|
1119
|
+
[k(Vo), {
|
|
1120
|
+
exclude: (p = l.excludeSelectors) != null && p.length ? l.excludeSelectors : [],
|
|
1120
1121
|
handler: le
|
|
1121
1122
|
}]
|
|
1122
1123
|
]);
|
|
@@ -1147,14 +1148,14 @@ function qo(n, o) {
|
|
|
1147
1148
|
const y = Do(n, u, o);
|
|
1148
1149
|
if (y)
|
|
1149
1150
|
try {
|
|
1150
|
-
const
|
|
1151
|
+
const m = ce(u);
|
|
1151
1152
|
e.push({
|
|
1152
1153
|
iso2: u,
|
|
1153
|
-
dialCode:
|
|
1154
|
+
dialCode: m,
|
|
1154
1155
|
name: y
|
|
1155
1156
|
});
|
|
1156
|
-
} catch (
|
|
1157
|
-
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${
|
|
1157
|
+
} catch (m) {
|
|
1158
|
+
console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${m}`);
|
|
1158
1159
|
}
|
|
1159
1160
|
}
|
|
1160
1161
|
return e;
|
|
@@ -1213,7 +1214,7 @@ const Wo = ["id"], Qo = {
|
|
|
1213
1214
|
},
|
|
1214
1215
|
emits: ["update:model-value"],
|
|
1215
1216
|
setup(n) {
|
|
1216
|
-
const o = n, { phoneNumber: e } = Me("data"), t =
|
|
1217
|
+
const o = n, { phoneNumber: e } = Me("data"), t = E(), { getCountriesList: r } = Ue(), u = h(() => r(o.countryLocale, o.customCountriesList)), y = h(
|
|
1217
1218
|
() => {
|
|
1218
1219
|
var i;
|
|
1219
1220
|
return (i = u.value) == null ? void 0 : i.filter((f) => {
|
|
@@ -1221,7 +1222,7 @@ const Wo = ["id"], Qo = {
|
|
|
1221
1222
|
return !((I = o.ignoredCountries) != null && I.includes(f.iso2));
|
|
1222
1223
|
});
|
|
1223
1224
|
}
|
|
1224
|
-
),
|
|
1225
|
+
), m = h(() => {
|
|
1225
1226
|
const i = o.onlyCountries || o.preferredCountries;
|
|
1226
1227
|
return i == null ? void 0 : i.map(
|
|
1227
1228
|
(f) => {
|
|
@@ -1238,7 +1239,7 @@ const Wo = ["id"], Qo = {
|
|
|
1238
1239
|
});
|
|
1239
1240
|
}
|
|
1240
1241
|
), $ = h(
|
|
1241
|
-
() => o.preferredCountries ? [...
|
|
1242
|
+
() => o.preferredCountries ? [...m.value ?? [], ...O.value ?? []] : o.onlyCountries ? m.value : y.value
|
|
1242
1243
|
), v = h(
|
|
1243
1244
|
() => {
|
|
1244
1245
|
var i;
|
|
@@ -1247,7 +1248,7 @@ const Wo = ["id"], Qo = {
|
|
|
1247
1248
|
...f,
|
|
1248
1249
|
dialCode: `+${f.dialCode}`
|
|
1249
1250
|
} : void 0
|
|
1250
|
-
).filter(
|
|
1251
|
+
).filter(po);
|
|
1251
1252
|
}
|
|
1252
1253
|
);
|
|
1253
1254
|
async function P() {
|
|
@@ -1277,7 +1278,7 @@ const Wo = ["id"], Qo = {
|
|
|
1277
1278
|
`),
|
|
1278
1279
|
N(i.$slots, "selector-flag", { countryCode: i.modelValue }, () => [
|
|
1279
1280
|
H(Le, {
|
|
1280
|
-
src:
|
|
1281
|
+
src: k(Ee)(i.modelValue, "h20"),
|
|
1281
1282
|
alt: i.modelValue,
|
|
1282
1283
|
width: "20",
|
|
1283
1284
|
height: "20",
|
|
@@ -1308,7 +1309,7 @@ const Wo = ["id"], Qo = {
|
|
|
1308
1309
|
"search-placeholder": i.locales.countrySelector.searchPlaceholder,
|
|
1309
1310
|
"search-threshold": i.searchThreshold,
|
|
1310
1311
|
options: v.value,
|
|
1311
|
-
hint:
|
|
1312
|
+
hint: k(e) && !i.modelValue ? i.locales.countrySelector.error : void 0,
|
|
1312
1313
|
label: i.locales.countrySelector.placeholder,
|
|
1313
1314
|
style: {
|
|
1314
1315
|
width: i.width
|
|
@@ -1341,7 +1342,7 @@ const Wo = ["id"], Qo = {
|
|
|
1341
1342
|
isSelected: S
|
|
1342
1343
|
}, () => [
|
|
1343
1344
|
H(Le, {
|
|
1344
|
-
src:
|
|
1345
|
+
src: k(Ee)(I.iso2, "h20"),
|
|
1345
1346
|
alt: `${I.name} flag`,
|
|
1346
1347
|
width: "20",
|
|
1347
1348
|
height: "20",
|
|
@@ -1465,7 +1466,7 @@ function He() {
|
|
|
1465
1466
|
}
|
|
1466
1467
|
const tt = /* @__PURE__ */ se({
|
|
1467
1468
|
__name: "PhoneInput",
|
|
1468
|
-
props: /* @__PURE__ */
|
|
1469
|
+
props: /* @__PURE__ */ ke({
|
|
1469
1470
|
id: {},
|
|
1470
1471
|
color: {},
|
|
1471
1472
|
size: {},
|
|
@@ -1483,9 +1484,9 @@ const tt = /* @__PURE__ */ se({
|
|
|
1483
1484
|
modelValue: {},
|
|
1484
1485
|
modelModifiers: {}
|
|
1485
1486
|
}),
|
|
1486
|
-
emits: /* @__PURE__ */
|
|
1487
|
+
emits: /* @__PURE__ */ ke(["update:model-value"], ["update:modelValue"]),
|
|
1487
1488
|
setup(n, { emit: o }) {
|
|
1488
|
-
const e = n, t = o, r = ao(n, "modelValue"), { getPhoneNumberExamplesFile: u, getPhoneNumberExample: y } = He(), { selectionRange:
|
|
1489
|
+
const e = n, t = o, r = ao(n, "modelValue"), { getPhoneNumberExamplesFile: u, getPhoneNumberExample: y } = He(), { selectionRange: m, results: O, selectedCountry: $ } = Me("data"), v = E(), P = E(!1);
|
|
1489
1490
|
function i(g, V) {
|
|
1490
1491
|
const C = y(g, V);
|
|
1491
1492
|
return C ? `${e.locales.phoneInput.example} ${C}` : void 0;
|
|
@@ -1505,7 +1506,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1505
1506
|
placeholder: f.value
|
|
1506
1507
|
} : {
|
|
1507
1508
|
label: f.value
|
|
1508
|
-
}), S =
|
|
1509
|
+
}), S = E();
|
|
1509
1510
|
async function R() {
|
|
1510
1511
|
try {
|
|
1511
1512
|
if (v.value)
|
|
@@ -1520,7 +1521,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1520
1521
|
}
|
|
1521
1522
|
function J(g, V) {
|
|
1522
1523
|
const C = g.$el.querySelector("input");
|
|
1523
|
-
|
|
1524
|
+
m.value.start = C == null ? void 0 : C.selectionStart, m.value.end = C == null ? void 0 : C.selectionEnd, m.value.cursorAtEnd = V && typeof m.value.start == "number" && V.length > 0 ? m.value.start >= V.length : !0;
|
|
1524
1525
|
}
|
|
1525
1526
|
return Ie(() => {
|
|
1526
1527
|
e.noExample || R();
|
|
@@ -1538,7 +1539,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1538
1539
|
class: ["m-phone-input", [
|
|
1539
1540
|
{
|
|
1540
1541
|
"--border-radius": g.hasRadius,
|
|
1541
|
-
"--error": g.error || !
|
|
1542
|
+
"--error": g.error || !k(O).isValid,
|
|
1542
1543
|
"--focused": P.value
|
|
1543
1544
|
}
|
|
1544
1545
|
]],
|
|
@@ -1602,13 +1603,13 @@ const tt = /* @__PURE__ */ se({
|
|
|
1602
1603
|
},
|
|
1603
1604
|
emits: ["update:model-value", "country-code", "update:country-code", "update", "data"],
|
|
1604
1605
|
setup(n, { emit: o }) {
|
|
1605
|
-
const e = n, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: y } = Ue(), { isCountryAvailable:
|
|
1606
|
+
const e = n, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: y } = Ue(), { isCountryAvailable: m, getPhoneNumberResults: O, getAsYouTypeFormat: $ } = He(), v = Ae({
|
|
1606
1607
|
componentName: "MazPhoneNumberInput",
|
|
1607
1608
|
providedId: e.id
|
|
1608
|
-
}), P =
|
|
1609
|
+
}), P = E(""), i = E(), f = E({
|
|
1609
1610
|
isValid: !1,
|
|
1610
1611
|
countryCode: void 0
|
|
1611
|
-
}), I =
|
|
1612
|
+
}), I = E(), S = E({
|
|
1612
1613
|
start: 0,
|
|
1613
1614
|
end: 0,
|
|
1614
1615
|
cursorAtEnd: !0
|
|
@@ -1634,7 +1635,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1634
1635
|
C(w);
|
|
1635
1636
|
}
|
|
1636
1637
|
});
|
|
1637
|
-
const Y =
|
|
1638
|
+
const Y = E();
|
|
1638
1639
|
function J() {
|
|
1639
1640
|
var a;
|
|
1640
1641
|
return (a = Y.value) == null ? void 0 : a.$el.querySelector("input");
|
|
@@ -1650,7 +1651,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1650
1651
|
}
|
|
1651
1652
|
function C(a) {
|
|
1652
1653
|
if (a) {
|
|
1653
|
-
if (!
|
|
1654
|
+
if (!m(a)) {
|
|
1654
1655
|
i.value = void 0;
|
|
1655
1656
|
return;
|
|
1656
1657
|
}
|
|
@@ -1729,7 +1730,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1729
1730
|
[
|
|
1730
1731
|
a.noCountrySelector ? z("v-if", !0) : (b(), U(Jo, oe({
|
|
1731
1732
|
key: 0,
|
|
1732
|
-
id:
|
|
1733
|
+
id: k(v)
|
|
1733
1734
|
}, a.countrySelectAttributes, {
|
|
1734
1735
|
"model-value": i.value,
|
|
1735
1736
|
color: a.color,
|
|
@@ -1783,7 +1784,7 @@ const tt = /* @__PURE__ */ se({
|
|
|
1783
1784
|
/* FORWARDED */
|
|
1784
1785
|
}, 16, ["id", "model-value", "color", "size", "country-locale", "country-selector-display-name", "custom-countries-list", "ignored-countries", "list-position", "no-flags", "no-search", "exclude-selectors", "error", "success", "locales", "disabled", "search-threshold", "show-code-on-list", "only-countries", "preferred-countries", "width"])),
|
|
1785
1786
|
H(lt, oe({
|
|
1786
|
-
id:
|
|
1787
|
+
id: k(v),
|
|
1787
1788
|
ref_key: "PhoneInputRef",
|
|
1788
1789
|
ref: Y,
|
|
1789
1790
|
modelValue: P.value,
|