maz-ui 3.47.2-beta.0 → 3.47.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.mjs +36 -37
- package/components/MazAnimatedCounter.mjs +14 -16
- 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.mjs +23 -32
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +66 -71
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +162 -185
- package/components/MazExpandAnimation.mjs +20 -21
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +30 -31
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +18 -30
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +37 -42
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +24 -28
- package/components/MazTable.d.ts +6 -6
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTextarea.mjs +32 -34
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazBadge-CvIiiTdM.mjs → MazBadge-CqppWg2j.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
- package/{modules/chunks/MazBtn-BSnVxud6.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
- package/components/chunks/{MazBtn-DVkwISlp.mjs → MazBtn-40lm8-AL.mjs} +37 -49
- package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
- package/components/chunks/{MazBtn-BO3G90L3.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
- package/components/chunks/{MazBtn-DJOUeES7.mjs → MazBtn-BijEMn4r.mjs} +37 -49
- package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
- package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
- package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
- package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
- package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
- package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
- package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
- package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
- package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
- package/components/chunks/{MazCard-FSXmHyhj.mjs → MazCard-BYB8y1_u.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
- package/components/chunks/{MazCheckbox-2G4VkxDz.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Cq9gpTEw.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BmnqBHaY.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
- package/components/chunks/{MazChecklist-CY1Cv70T.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
- package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
- package/components/chunks/{MazGallery-BknvUeo1.mjs → MazGallery-CXQiXWFr.mjs} +32 -33
- package/components/chunks/{MazGallery-CZOokGAt.mjs → MazGallery-VTZUhBKC.mjs} +33 -34
- package/components/chunks/{MazIcon-z-jTiuyI.mjs → MazIcon-BF5TFzse.mjs} +1 -1
- package/components/chunks/{MazInput-oOA7gdLO.mjs → MazInput-DC3S-CVu.mjs} +44 -53
- package/components/chunks/{MazInput-BQoQSRyL.mjs → MazInput-DzWkS-g8.mjs} +40 -49
- package/components/chunks/{MazInput-CJQB68c-.mjs → MazInput-NE6H-10w.mjs} +42 -51
- package/components/chunks/{MazInputNumber-B4mQJcVB.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
- package/components/chunks/{MazInputPrice-BrxE5WVf.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
- package/components/chunks/{MazInputTags-BVCej_gW.mjs → MazInputTags-Dj3sW-e5.mjs} +181 -202
- package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
- package/components/chunks/{MazLoadingBar-Dwf55oHy.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
- package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
- package/components/chunks/{MazPhoneNumberInput-Cd25AzXc.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +500 -544
- package/components/chunks/{MazPicker-C78yxilJ.mjs → MazPicker-DwWiIYAR.mjs} +243 -264
- package/components/chunks/{MazPickerMonthSwitcher-CyHYx8TT.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Bsi8cnox.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DLUSMAtz.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
- package/components/chunks/{MazSelect-CQDoUpgp.mjs → MazSelect-BJ07NVXQ.mjs} +149 -170
- package/components/chunks/{MazSelect-uCJPMXF-.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
- package/components/chunks/{MazSpinner-BT_717pD.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
- package/components/chunks/{MazSpinner-B9OwpEP_.mjs → MazSpinner-BymqEMBk.mjs} +1 -1
- package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
- package/components/chunks/{MazSpinner-EFo8dM46.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
- package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
- package/components/chunks/MazSpinner-DS58mtzm.mjs +34 -0
- package/components/chunks/{MazSpinner-2D0ZmAQz.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1Ip-Dwh.mjs → MazSpinner-Dmkr_r9u.mjs} +1 -1
- package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
- package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
- package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
- package/components/chunks/{MazTable-Cuz5QI08.mjs → MazTable-BJDPdIJB.mjs} +183 -227
- package/components/chunks/{MazTableCell-D_OTOJiy.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
- package/components/chunks/{MazTableRow-BTcVAyOy.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
- package/components/chunks/{MazTableTitle-BDA9G6Zw.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
- package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
- package/components/chunks/{MazTransitionExpand-C-FHhOGB.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
- package/modules/chunks/{MazIcon-dhyR9Q8a.cjs → MazIcon-CkuzyufF.cjs} +1 -1
- package/modules/chunks/{MazIcon-DllGg8tw.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
- package/modules/chunks/{MazSpinner-bdGjxsu6.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CiIyZ8gs.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
- package/modules/chunks/index-CUNN0eIB.cjs +124 -0
- package/modules/chunks/{index-x2F1l5sr.mjs → index-CxFUggmu.mjs} +257 -292
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazTable.vue.d.ts +6 -6
- package/types/modules/composables/useFormValidator/types.d.ts +5 -1
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
- package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-C87UEsVs.mjs +0 -118
- package/components/chunks/MazBtn-C_l3xuAh.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DadFupkY.mjs +0 -118
- package/components/chunks/MazBtn-GGcGrIH4.mjs +0 -118
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +0 -34
- package/components/chunks/MazSpinner-CViChjTw.mjs +0 -34
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +0 -34
- package/components/chunks/MazSpinner-D4C84xZe.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +0 -34
- package/components/chunks/MazSpinner-w-S5uCxg.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTabsBar-JkRzMDM6.mjs +0 -203
- package/modules/chunks/MazBtn-Bf9Cq5M7.cjs +0 -9
- package/modules/chunks/index-BPqjUr5e.cjs +0 -149
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openBlock as u, createElementBlock as g, createElementVNode as
|
|
2
|
-
import '../assets/MazInputPrice.css';const
|
|
1
|
+
import { openBlock as u, createElementBlock as g, createElementVNode as T, useId as Q, computed as i, defineComponent as D, defineAsyncComponent as z, ref as w, onMounted as O, useSlots as X, normalizeClass as S, normalizeStyle as Z, renderSlot as $, createBlock as v, unref as f, resolveDynamicComponent as q, createCommentVNode as d, withDirectives as x, mergeProps as _, toHandlers as ee, vModelDynamic as te, createTextVNode as oe, toDisplayString as ne, withModifiers as re, withCtx as A, createVNode as P, watch as ae, withKeys as le, nextTick as ue } from "vue";
|
|
2
|
+
import '../assets/MazInputPrice.css';const ie = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
width: "1em",
|
|
5
5
|
height: "1em",
|
|
@@ -7,8 +7,8 @@ import '../assets/MazInputPrice.css';const ue = {
|
|
|
7
7
|
viewBox: "0 0 24 24"
|
|
8
8
|
};
|
|
9
9
|
function se(l, r) {
|
|
10
|
-
return u(), g("svg",
|
|
11
|
-
|
|
10
|
+
return u(), g("svg", ie, r[0] || (r[0] = [
|
|
11
|
+
T(
|
|
12
12
|
"path",
|
|
13
13
|
{
|
|
14
14
|
stroke: "currentColor",
|
|
@@ -50,8 +50,8 @@ function pe(l, r, t) {
|
|
|
50
50
|
fe(l, r, n);
|
|
51
51
|
try {
|
|
52
52
|
return me(l, r, n);
|
|
53
|
-
} catch (
|
|
54
|
-
throw new Error(`[maz-ui](FilterCurrency) ${
|
|
53
|
+
} catch (s) {
|
|
54
|
+
throw new Error(`[maz-ui](FilterCurrency) ${s}`);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
function ve({
|
|
@@ -59,7 +59,7 @@ function ve({
|
|
|
59
59
|
providedId: r
|
|
60
60
|
}) {
|
|
61
61
|
const t = Q();
|
|
62
|
-
return
|
|
62
|
+
return i(() => r ?? `${l}-${t}`);
|
|
63
63
|
}
|
|
64
64
|
function ye(l, r) {
|
|
65
65
|
let t;
|
|
@@ -113,7 +113,7 @@ const be = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
115
115
|
setup(l, { emit: r }) {
|
|
116
|
-
const t = l, n = r,
|
|
116
|
+
const t = l, n = r, s = z(() => import("./MazBtn-40lm8-AL.mjs")), b = z(() => import("./MazIcon-BbvBov5G.mjs")), C = z(() => import("./eye-slash-BoO00xzs.mjs")), I = z(() => import("./eye-f8zAUc30.mjs")), k = z(() => import("./check-BmubdHc_.mjs")), p = w(!1), y = w(!1), h = w(), E = ve({
|
|
117
117
|
componentName: "MazInput",
|
|
118
118
|
providedId: t.id
|
|
119
119
|
});
|
|
@@ -121,7 +121,7 @@ const be = {
|
|
|
121
121
|
var e;
|
|
122
122
|
t.autoFocus && ((e = h.value) == null || e.focus());
|
|
123
123
|
});
|
|
124
|
-
const B =
|
|
124
|
+
const B = i(() => t.type === "password"), M = i(() => p.value ? "text" : t.type), V = i(() => {
|
|
125
125
|
if (!t.noBorder) {
|
|
126
126
|
if (t.error)
|
|
127
127
|
return "maz-border-danger";
|
|
@@ -149,25 +149,25 @@ const be = {
|
|
|
149
149
|
}
|
|
150
150
|
return "--default-border";
|
|
151
151
|
}
|
|
152
|
-
}), o = X(), c =
|
|
152
|
+
}), o = X(), c = i(() => {
|
|
153
153
|
const { required: e, placeholder: m } = t;
|
|
154
154
|
if (m)
|
|
155
155
|
return e ? `${m} *` : m;
|
|
156
|
-
}), a =
|
|
156
|
+
}), a = i(() => F.value !== void 0 && F.value !== ""), H = ye(
|
|
157
157
|
(e) => {
|
|
158
158
|
n("update:model-value", e);
|
|
159
159
|
},
|
|
160
160
|
typeof t.debounce == "number" ? t.debounce : t.debounceDelay ?? 500
|
|
161
161
|
);
|
|
162
|
-
function
|
|
162
|
+
function R(e) {
|
|
163
163
|
if (t.debounce)
|
|
164
|
-
return
|
|
164
|
+
return H(e);
|
|
165
165
|
n("update:model-value", e);
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const F = i({
|
|
168
168
|
get: () => t.modelValue,
|
|
169
|
-
set: (e) =>
|
|
170
|
-
}), U =
|
|
169
|
+
set: (e) => R(e)
|
|
170
|
+
}), U = i(() => (!!t.label || !!t.hint) && (y.value || !!a.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), j = i(() => !!t.label || !!t.hint);
|
|
171
171
|
function L() {
|
|
172
172
|
return !!o["right-icon"] || B.value || !!o["valid-button"] || t.validButton || !!t.rightIcon;
|
|
173
173
|
}
|
|
@@ -207,7 +207,7 @@ const be = {
|
|
|
207
207
|
style: Z(e.style)
|
|
208
208
|
},
|
|
209
209
|
[
|
|
210
|
-
|
|
210
|
+
T(
|
|
211
211
|
"div",
|
|
212
212
|
{
|
|
213
213
|
class: S(["m-input-wrapper", [
|
|
@@ -218,9 +218,6 @@ const be = {
|
|
|
218
218
|
},
|
|
219
219
|
[
|
|
220
220
|
K() ? (u(), g("div", be, [
|
|
221
|
-
i(`
|
|
222
|
-
@slot left-icon - The icon to display on the left of the input
|
|
223
|
-
`),
|
|
224
221
|
e.$slots["left-icon"] || e.leftIcon ? $(e.$slots, "left-icon", { key: 0 }, () => [
|
|
225
222
|
typeof e.leftIcon == "string" ? (u(), v(f(b), {
|
|
226
223
|
key: 0,
|
|
@@ -229,15 +226,15 @@ const be = {
|
|
|
229
226
|
}, null, 8, ["name"])) : e.leftIcon ? (u(), v(q(e.leftIcon), {
|
|
230
227
|
key: 1,
|
|
231
228
|
class: "maz-text-xl maz-text-muted"
|
|
232
|
-
})) :
|
|
233
|
-
], !0) :
|
|
234
|
-
])) :
|
|
235
|
-
|
|
236
|
-
x(
|
|
229
|
+
})) : d("v-if", !0)
|
|
230
|
+
], !0) : d("v-if", !0)
|
|
231
|
+
])) : d("v-if", !0),
|
|
232
|
+
T("div", he, [
|
|
233
|
+
x(T("input", _({
|
|
237
234
|
id: f(E),
|
|
238
235
|
ref_key: "input",
|
|
239
236
|
ref: h,
|
|
240
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
237
|
+
"onUpdate:modelValue": m[0] || (m[0] = (N) => F.value = N),
|
|
241
238
|
type: M.value,
|
|
242
239
|
name: e.name
|
|
243
240
|
}, e.$attrs, {
|
|
@@ -254,9 +251,9 @@ const be = {
|
|
|
254
251
|
change: W,
|
|
255
252
|
input: J
|
|
256
253
|
}, !0), {
|
|
257
|
-
onClick: m[1] || (m[1] = (
|
|
254
|
+
onClick: m[1] || (m[1] = (N) => e.$emit("click", N))
|
|
258
255
|
}), null, 16, ge), [
|
|
259
|
-
[te,
|
|
256
|
+
[te, F.value]
|
|
260
257
|
]),
|
|
261
258
|
e.label || e.hint ? (u(), g(
|
|
262
259
|
"span",
|
|
@@ -276,16 +273,13 @@ const be = {
|
|
|
276
273
|
1
|
|
277
274
|
/* TEXT */
|
|
278
275
|
),
|
|
279
|
-
e.required ? (u(), g("sup", ze, "*")) :
|
|
276
|
+
e.required ? (u(), g("sup", ze, "*")) : d("v-if", !0)
|
|
280
277
|
],
|
|
281
278
|
2
|
|
282
279
|
/* CLASS */
|
|
283
|
-
)) :
|
|
280
|
+
)) : d("v-if", !0)
|
|
284
281
|
]),
|
|
285
282
|
L() ? (u(), g("div", we, [
|
|
286
|
-
i(`
|
|
287
|
-
@slot right-icon - The icon to display on the right of the input
|
|
288
|
-
`),
|
|
289
283
|
e.$slots["right-icon"] || e.rightIcon ? $(e.$slots, "right-icon", { key: 0 }, () => [
|
|
290
284
|
typeof e.rightIcon == "string" ? (u(), v(f(b), {
|
|
291
285
|
key: 0,
|
|
@@ -294,14 +288,14 @@ const be = {
|
|
|
294
288
|
}, null, 8, ["name"])) : e.rightIcon ? (u(), v(q(e.rightIcon), {
|
|
295
289
|
key: 1,
|
|
296
290
|
class: "maz-text-xl maz-text-muted"
|
|
297
|
-
})) :
|
|
298
|
-
], !0) :
|
|
299
|
-
B.value ? (u(), v(f(
|
|
291
|
+
})) : d("v-if", !0)
|
|
292
|
+
], !0) : d("v-if", !0),
|
|
293
|
+
B.value ? (u(), v(f(s), {
|
|
300
294
|
key: 1,
|
|
301
295
|
color: "transparent",
|
|
302
296
|
tabindex: "-1",
|
|
303
297
|
size: "mini",
|
|
304
|
-
onClick: m[2] || (m[2] = re((
|
|
298
|
+
onClick: m[2] || (m[2] = re((N) => p.value = !p.value, ["stop"]))
|
|
305
299
|
}, {
|
|
306
300
|
default: A(() => [
|
|
307
301
|
p.value ? (u(), v(f(C), {
|
|
@@ -314,12 +308,9 @@ const be = {
|
|
|
314
308
|
]),
|
|
315
309
|
_: 1
|
|
316
310
|
/* STABLE */
|
|
317
|
-
})) :
|
|
318
|
-
i(`
|
|
319
|
-
@slot valid-button - Replace the valid button by your own
|
|
320
|
-
`),
|
|
311
|
+
})) : d("v-if", !0),
|
|
321
312
|
e.$slots["valid-button"] || e.validButton ? $(e.$slots, "valid-button", { key: 2 }, () => [
|
|
322
|
-
P(f(
|
|
313
|
+
P(f(s), {
|
|
323
314
|
color: "transparent",
|
|
324
315
|
disabled: e.disabled,
|
|
325
316
|
tabindex: "-1",
|
|
@@ -334,8 +325,8 @@ const be = {
|
|
|
334
325
|
_: 1
|
|
335
326
|
/* STABLE */
|
|
336
327
|
}, 8, ["disabled", "loading"])
|
|
337
|
-
], !0) :
|
|
338
|
-
])) :
|
|
328
|
+
], !0) : d("v-if", !0)
|
|
329
|
+
])) : d("v-if", !0)
|
|
339
330
|
],
|
|
340
331
|
2
|
|
341
332
|
/* CLASS */
|
|
@@ -347,10 +338,10 @@ const be = {
|
|
|
347
338
|
}
|
|
348
339
|
}), ke = (l, r) => {
|
|
349
340
|
const t = l.__vccOpts || l;
|
|
350
|
-
for (const [n,
|
|
351
|
-
t[n] =
|
|
341
|
+
for (const [n, s] of r)
|
|
342
|
+
t[n] = s;
|
|
352
343
|
return t;
|
|
353
|
-
}, Be = /* @__PURE__ */ ke(Ie, [["__scopeId", "data-v-c42aaa7f"]]),
|
|
344
|
+
}, Be = /* @__PURE__ */ ke(Ie, [["__scopeId", "data-v-c42aaa7f"]]), Fe = /* @__PURE__ */ D({
|
|
354
345
|
__name: "MazInputPrice",
|
|
355
346
|
props: {
|
|
356
347
|
modelValue: { default: void 0 },
|
|
@@ -368,12 +359,12 @@ const be = {
|
|
|
368
359
|
},
|
|
369
360
|
emits: ["update:model-value", "input", "formatted", "blur", "focus"],
|
|
370
361
|
setup(l, { emit: r }) {
|
|
371
|
-
const t = l, n = r,
|
|
362
|
+
const t = l, n = r, s = w(p(t.modelValue));
|
|
372
363
|
ae(() => t.modelValue, V);
|
|
373
|
-
const b = w(!1), C =
|
|
364
|
+
const b = w(!1), C = i(() => {
|
|
374
365
|
var o;
|
|
375
366
|
return (o = t.modelValue) == null ? void 0 : o.toString();
|
|
376
|
-
}), I =
|
|
367
|
+
}), I = i(() => t.modelValue), k = i(
|
|
377
368
|
() => typeof I.value == "number" ? pe(I.value, t.locale, { ...t.currencyOptions, currency: t.currency }) : void 0
|
|
378
369
|
);
|
|
379
370
|
function p(o) {
|
|
@@ -381,7 +372,7 @@ const be = {
|
|
|
381
372
|
let a = typeof o == "string" ? Number.parseFloat(o.replace(",", ".").replaceAll(/[^\d.]/g, "")) : o;
|
|
382
373
|
return a = c && a ? -a : a, (typeof a != "number" || Number.isNaN(a)) && (a = void 0), a && a < t.min && (a = t.min), a && a > t.max && (a = t.max), a;
|
|
383
374
|
}
|
|
384
|
-
const y =
|
|
375
|
+
const y = i(() => {
|
|
385
376
|
if (b.value)
|
|
386
377
|
return C.value;
|
|
387
378
|
if (typeof t.modelValue == "number")
|
|
@@ -389,22 +380,22 @@ const be = {
|
|
|
389
380
|
});
|
|
390
381
|
async function h(o) {
|
|
391
382
|
const c = p(o);
|
|
392
|
-
n("update:model-value", c), await
|
|
383
|
+
n("update:model-value", c), await ue(), n("formatted", k.value);
|
|
393
384
|
}
|
|
394
385
|
O(() => {
|
|
395
386
|
h(t.modelValue);
|
|
396
387
|
});
|
|
397
388
|
function E(o) {
|
|
398
|
-
b.value = !1, h(
|
|
389
|
+
b.value = !1, h(s.value), n("blur", o);
|
|
399
390
|
}
|
|
400
391
|
function B(o) {
|
|
401
392
|
b.value = !0, n("focus", o);
|
|
402
393
|
}
|
|
403
394
|
function M() {
|
|
404
|
-
n("input",
|
|
395
|
+
n("input", s.value);
|
|
405
396
|
}
|
|
406
397
|
function V(o) {
|
|
407
|
-
|
|
398
|
+
s.value = p(o);
|
|
408
399
|
}
|
|
409
400
|
return (o, c) => (u(), v(Be, {
|
|
410
401
|
"model-value": y.value,
|
|
@@ -417,11 +408,11 @@ const be = {
|
|
|
417
408
|
onFocus: B,
|
|
418
409
|
onBlur: E,
|
|
419
410
|
onInput: M,
|
|
420
|
-
onKeydown: c[0] || (c[0] = le((a) => h(
|
|
411
|
+
onKeydown: c[0] || (c[0] = le((a) => h(s.value), ["enter"])),
|
|
421
412
|
"onUpdate:modelValue": c[1] || (c[1] = (a) => V(a))
|
|
422
413
|
}, {
|
|
423
414
|
"left-icon": A(() => [
|
|
424
|
-
o.noIcon ?
|
|
415
|
+
o.noIcon ? d("v-if", !0) : $(o.$slots, "left-icon", { key: 0 }, () => [
|
|
425
416
|
P(f(de), { class: "maz-text-xl" })
|
|
426
417
|
])
|
|
427
418
|
]),
|
|
@@ -432,5 +423,5 @@ const be = {
|
|
|
432
423
|
});
|
|
433
424
|
export {
|
|
434
425
|
ke as _,
|
|
435
|
-
|
|
426
|
+
Fe as a
|
|
436
427
|
};
|