maz-ui 3.22.4 → 3.23.1
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 +2 -2
- package/components/MazBackdrop.mjs +67 -107
- package/components/MazBadge.mjs +41 -50
- package/components/MazBottomSheet.mjs +2 -2
- package/components/MazBtn.mjs +2 -2
- package/components/MazCard.mjs +2 -2
- package/components/MazCarousel.mjs +2 -2
- package/components/MazChart.mjs +53 -63
- package/components/MazCheckbox.mjs +84 -128
- package/components/MazDialog.mjs +2 -2
- package/components/MazDialogPromise.mjs +3 -3
- package/components/MazDrawer.mjs +2 -2
- package/components/MazDropdown.mjs +2 -2
- package/components/MazDropzone.mjs +2 -2
- package/components/MazFullscreenLoader.mjs +14 -18
- package/components/MazGallery.mjs +352 -558
- package/components/MazIcon.mjs +76 -140
- package/components/MazInput.mjs +2 -2
- package/components/MazInputNumber.mjs +72 -99
- package/components/MazInputPrice.mjs +2 -2
- package/components/MazInputTags.mjs +2 -2
- package/components/MazLazyImg.mjs +2 -2
- package/components/MazPhoneNumberInput.mjs +2 -2
- package/components/MazPicker.mjs +2 -2
- package/components/MazRadio.mjs +65 -94
- package/components/MazRadioButtons.mjs +64 -78
- package/components/MazSelect.mjs +2 -2
- package/components/MazSlider.mjs +213 -325
- package/components/MazSpinner.mjs +25 -34
- package/components/MazStepper.mjs +2 -2
- package/components/MazSwitch.mjs +43 -60
- package/components/MazTabs.mjs +16 -25
- package/components/MazTabsBar.mjs +2 -2
- package/components/MazTabsContent.mjs +34 -43
- package/components/MazTabsContentItem.mjs +49 -63
- package/components/MazTextarea.mjs +124 -169
- package/components/MazTransitionExpand.mjs +36 -54
- package/components/assets/MazBackdrop.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/chunks/MazAvatar-1636f58b.mjs +126 -0
- package/components/chunks/MazBottomSheet-c24f92f8.mjs +217 -0
- package/components/chunks/MazBtn-124f3700.mjs +153 -0
- package/components/chunks/MazBtn-1e61862b.mjs +153 -0
- package/components/chunks/MazBtn-2d1d1ba5.mjs +153 -0
- package/components/chunks/MazBtn-3d74f737.mjs +153 -0
- package/components/chunks/MazBtn-4a447126.mjs +153 -0
- package/components/chunks/MazBtn-555928ed.mjs +153 -0
- package/components/chunks/MazBtn-571454f6.mjs +153 -0
- package/components/chunks/MazBtn-5e426592.mjs +153 -0
- package/components/chunks/MazBtn-683effc1.mjs +153 -0
- package/components/chunks/MazBtn-6905cc39.mjs +153 -0
- package/components/chunks/MazBtn-6ce4cfd3.mjs +153 -0
- package/components/chunks/MazBtn-74656d5b.mjs +153 -0
- package/components/chunks/MazBtn-7706b2da.mjs +158 -0
- package/components/chunks/MazBtn-a7a913dd.mjs +153 -0
- package/components/chunks/MazBtn-fb3c7af8.mjs +153 -0
- package/components/chunks/MazCard-bcc36489.mjs +214 -0
- package/components/chunks/MazCarousel-6da75122.mjs +107 -0
- package/components/chunks/MazCheckbox-040dc2c4.mjs +117 -0
- package/components/chunks/MazCheckbox-3a2b48b4.mjs +117 -0
- package/components/chunks/MazDialog-44eda544.mjs +250 -0
- package/components/chunks/MazDialogPromise-eec5acde.mjs +419 -0
- package/components/chunks/MazDrawer-b628b37e.mjs +206 -0
- package/components/chunks/MazDropdown-6f2248b0.mjs +345 -0
- package/components/chunks/MazDropzone-8cac10a6.mjs +242 -0
- package/components/chunks/MazGallery-6b8ecedf.mjs +617 -0
- package/components/chunks/MazIcon-52a76873.mjs +101 -0
- package/components/chunks/MazIcon-95e31ff8.mjs +96 -0
- package/components/chunks/MazInput-1ed4f946.mjs +283 -0
- package/components/chunks/MazInput-8a217995.mjs +271 -0
- package/components/chunks/MazInput-c51881ea.mjs +278 -0
- package/components/chunks/MazInputPrice-cd348d46.mjs +392 -0
- package/components/chunks/MazInputTags-aa95fae7.mjs +446 -0
- package/components/chunks/MazLazyImg-0412ab38.mjs +259 -0
- package/components/chunks/MazLazyImg-47d3449a.mjs +254 -0
- package/components/chunks/MazPhoneNumberInput-e1bf46f9.mjs +1216 -0
- package/components/chunks/MazPicker-e4620d8b.mjs +1140 -0
- package/components/chunks/MazPickerCalendar-da62262c.mjs +535 -0
- package/components/chunks/MazPickerHeader-a2e041eb.mjs +186 -0
- package/components/chunks/MazPickerMonthSwitcher-5bf8bd08.mjs +97 -0
- package/components/chunks/MazPickerShortcuts-7f95430e.mjs +74 -0
- package/components/chunks/MazPickerTime-717402ae.mjs +219 -0
- package/components/chunks/MazPickerYearSwitcher-85f97b6d.mjs +106 -0
- package/components/chunks/MazSelect-6ff6bb96.mjs +652 -0
- package/components/chunks/MazSpinner-054f948c.mjs +39 -0
- package/components/chunks/MazSpinner-059ee1d2.mjs +39 -0
- package/components/chunks/MazSpinner-08ee440b.mjs +39 -0
- package/components/chunks/MazSpinner-13403729.mjs +39 -0
- package/components/chunks/MazSpinner-44011019.mjs +39 -0
- package/components/chunks/MazSpinner-452a1534.mjs +39 -0
- package/components/chunks/MazSpinner-4c02cfd2.mjs +39 -0
- package/components/chunks/MazSpinner-51aa73ca.mjs +39 -0
- package/components/chunks/MazSpinner-6d1d24d5.mjs +39 -0
- package/components/chunks/MazSpinner-6e7c4705.mjs +39 -0
- package/components/chunks/MazSpinner-7895f54f.mjs +39 -0
- package/components/chunks/MazSpinner-7eee202e.mjs +39 -0
- package/components/chunks/MazSpinner-805e14a6.mjs +39 -0
- package/components/chunks/MazSpinner-85080b43.mjs +39 -0
- package/components/chunks/MazSpinner-a13a50c9.mjs +39 -0
- package/components/chunks/MazSpinner-a6d61cee.mjs +43 -0
- package/components/chunks/MazSpinner-c67b05bb.mjs +39 -0
- package/components/chunks/MazSpinner-caa33afc.mjs +39 -0
- package/components/chunks/MazSpinner-cb8fbe9a.mjs +39 -0
- package/components/chunks/MazSpinner-d9ef329f.mjs +39 -0
- package/components/chunks/MazStepper-39f018f3.mjs +191 -0
- package/components/chunks/MazTabsBar-27965f16.mjs +132 -0
- package/components/chunks/MazTransitionExpand-55cfbecb.mjs +41 -0
- package/components/chunks/MazTransitionExpand-cd24498f.mjs +41 -0
- package/components/chunks/_plugin-vue_export-helper-dad06003.mjs +9 -0
- package/components/chunks/check-31d7ba2f.mjs +30 -0
- package/components/chunks/check-c9b483c0.mjs +30 -0
- package/components/chunks/{check-circle-7acfa4c4.mjs → check-circle-59c383ed.mjs} +10 -12
- package/components/chunks/chevron-down-2b60111a.mjs +30 -0
- package/components/chunks/chevron-left-39b4621e.mjs +30 -0
- package/components/chunks/chevron-right-949a60fa.mjs +30 -0
- package/components/chunks/debounce-19c516b6.mjs +11 -0
- package/components/chunks/examples.mobile.json-f63d22fb.mjs +4 -0
- package/components/chunks/{exclamation-circle-2e115536.mjs → exclamation-circle-e2620aab.mjs} +10 -12
- package/components/chunks/{exclamation-triangle-10eb48dc.mjs → exclamation-triangle-21bf116a.mjs} +10 -12
- package/components/chunks/{eye-fbb13657.mjs → eye-dc12ce09.mjs} +12 -15
- package/components/chunks/{eye-slash-342420ff.mjs → eye-slash-fa42a017.mjs} +10 -12
- package/components/chunks/{magnifying-glass-5dffa35e.mjs → magnifying-glass-908981c0.mjs} +10 -12
- package/components/chunks/minus-e71140e1.mjs +30 -0
- package/components/chunks/no-photography-4c6c77cf.mjs +4 -0
- package/components/chunks/{no-photography-b0d08d6f.mjs → no-photography-be94ddda.mjs} +12 -15
- package/components/chunks/{no-symbol-975ce547.mjs → no-symbol-87477ad0.mjs} +10 -12
- package/components/chunks/{pencil-2f766dc8.mjs → pencil-4c35b4e7.mjs} +10 -12
- package/components/chunks/plus-c20544c3.mjs +30 -0
- package/components/chunks/x-mark-35f2f1e7.mjs +30 -0
- package/components/chunks/x-mark-7761acf4.mjs +29 -0
- package/modules/chunks/MazBtn-2f302422.cjs +1 -0
- package/modules/chunks/MazBtn-760c3b29.mjs +153 -0
- package/modules/chunks/MazIcon-0bd6b78e.mjs +96 -0
- package/modules/chunks/MazIcon-599a907f.cjs +1 -0
- package/modules/chunks/MazSpinner-03bd76bd.mjs +39 -0
- package/modules/chunks/MazSpinner-6ffa8db1.cjs +1 -0
- package/modules/chunks/{arrow-top-right-on-square-32bbe5a1.mjs → arrow-top-right-on-square-15191934.mjs} +10 -12
- package/modules/chunks/arrow-top-right-on-square-8e4ea6e2.cjs +1 -0
- package/modules/chunks/chevron-left-36731110.cjs +1 -0
- package/modules/chunks/chevron-left-39b4621e.mjs +30 -0
- package/modules/chunks/index-6a90ef88.mjs +1618 -0
- package/modules/chunks/index-794680d2.cjs +124 -0
- package/modules/chunks/{link-4eb05848.mjs → link-bb14441d.mjs} +10 -12
- package/modules/chunks/link-c7791a2a.cjs +1 -0
- package/modules/chunks/no-photography-0f6fcaf4.cjs +1 -0
- package/modules/chunks/no-photography-4c6c77cf.mjs +4 -0
- package/modules/chunks/x-mark-35f2f1e7.mjs +30 -0
- package/modules/chunks/x-mark-a28deca5.cjs +1 -0
- package/modules/index.cjs +1 -0
- package/modules/index.mjs +42 -42
- package/nuxt/index.json +1 -1
- package/package.json +14 -4
- package/types/resolvers/index.d.ts +1 -0
- package/types/resolvers/unplugin-vue-components-resolver.d.ts +8 -0
- package/types/utils/index.d.ts +3 -0
- package/components/chunks/MazAvatar-358d78d4.mjs +0 -138
- package/components/chunks/MazBottomSheet-61090f4a.mjs +0 -267
- package/components/chunks/MazBtn-0e02f0da.mjs +0 -184
- package/components/chunks/MazBtn-1daf9063.mjs +0 -184
- package/components/chunks/MazBtn-2f4fa942.mjs +0 -184
- package/components/chunks/MazBtn-31c6b731.mjs +0 -184
- package/components/chunks/MazBtn-48382169.mjs +0 -184
- package/components/chunks/MazBtn-4e1e116e.mjs +0 -184
- package/components/chunks/MazBtn-50abc4c5.mjs +0 -184
- package/components/chunks/MazBtn-84e12b6a.mjs +0 -184
- package/components/chunks/MazBtn-b42e3575.mjs +0 -184
- package/components/chunks/MazBtn-b56a7278.mjs +0 -184
- package/components/chunks/MazBtn-bbd6e9c8.mjs +0 -184
- package/components/chunks/MazBtn-cf0c8fcb.mjs +0 -184
- package/components/chunks/MazBtn-d92908b2.mjs +0 -191
- package/components/chunks/MazBtn-f48da79c.mjs +0 -184
- package/components/chunks/MazBtn-fec4c3b7.mjs +0 -184
- package/components/chunks/MazCard-4331dca0.mjs +0 -237
- package/components/chunks/MazCarousel-7825c7c9.mjs +0 -133
- package/components/chunks/MazCheckbox-ab5ddda2.mjs +0 -153
- package/components/chunks/MazCheckbox-e0bbe6ec.mjs +0 -153
- package/components/chunks/MazDialog-83e54b8c.mjs +0 -290
- package/components/chunks/MazDialogPromise-6967e821.mjs +0 -474
- package/components/chunks/MazDrawer-d778b3d2.mjs +0 -256
- package/components/chunks/MazDropdown-6f4482d7.mjs +0 -426
- package/components/chunks/MazDropzone-d1bb62dc.mjs +0 -325
- package/components/chunks/MazGallery-b2dc4286.mjs +0 -821
- package/components/chunks/MazIcon-b779da0a.mjs +0 -159
- package/components/chunks/MazIcon-bda198b4.mjs +0 -165
- package/components/chunks/MazInput-713b00d0.mjs +0 -326
- package/components/chunks/MazInput-b9386887.mjs +0 -341
- package/components/chunks/MazInput-c33627dd.mjs +0 -334
- package/components/chunks/MazInputPrice-452297f5.mjs +0 -481
- package/components/chunks/MazInputTags-7a463b81.mjs +0 -526
- package/components/chunks/MazLazyImg-6e395356.mjs +0 -336
- package/components/chunks/MazLazyImg-e0d8b6d0.mjs +0 -329
- package/components/chunks/MazPhoneNumberInput-48fe2445.mjs +0 -1536
- package/components/chunks/MazPicker-50fc11d1.mjs +0 -1352
- package/components/chunks/MazPickerCalendar-cacb361c.mjs +0 -689
- package/components/chunks/MazPickerHeader-63d45179.mjs +0 -216
- package/components/chunks/MazPickerMonthSwitcher-913c6e2c.mjs +0 -110
- package/components/chunks/MazPickerShortcuts-c6fabfc6.mjs +0 -88
- package/components/chunks/MazPickerTime-5e4475da.mjs +0 -301
- package/components/chunks/MazPickerYearSwitcher-dd4fa89c.mjs +0 -125
- package/components/chunks/MazSelect-2e5cd411.mjs +0 -850
- package/components/chunks/MazSpinner-022d7bee.mjs +0 -46
- package/components/chunks/MazSpinner-100c99b8.mjs +0 -46
- package/components/chunks/MazSpinner-191ad23b.mjs +0 -46
- package/components/chunks/MazSpinner-3155378b.mjs +0 -46
- package/components/chunks/MazSpinner-339a9006.mjs +0 -46
- package/components/chunks/MazSpinner-53979e96.mjs +0 -46
- package/components/chunks/MazSpinner-68d2f2ac.mjs +0 -46
- package/components/chunks/MazSpinner-6b563b22.mjs +0 -46
- package/components/chunks/MazSpinner-7cdc13e7.mjs +0 -46
- package/components/chunks/MazSpinner-8859d658.mjs +0 -46
- package/components/chunks/MazSpinner-8e180605.mjs +0 -52
- package/components/chunks/MazSpinner-9950424b.mjs +0 -46
- package/components/chunks/MazSpinner-c8270a93.mjs +0 -46
- package/components/chunks/MazSpinner-cb491238.mjs +0 -46
- package/components/chunks/MazSpinner-cb6f99f3.mjs +0 -46
- package/components/chunks/MazSpinner-ce4be8f1.mjs +0 -46
- package/components/chunks/MazSpinner-e5a9f319.mjs +0 -46
- package/components/chunks/MazSpinner-e92bd359.mjs +0 -46
- package/components/chunks/MazSpinner-eea9056d.mjs +0 -46
- package/components/chunks/MazSpinner-f1e69f29.mjs +0 -46
- package/components/chunks/MazStepper-4c19dbfc.mjs +0 -255
- package/components/chunks/MazTabsBar-3c2e2d69.mjs +0 -157
- package/components/chunks/MazTransitionExpand-474b00d4.mjs +0 -57
- package/components/chunks/MazTransitionExpand-f9e5a2d6.mjs +0 -57
- package/components/chunks/_plugin-vue_export-helper-cc2b3d55.mjs +0 -10
- package/components/chunks/check-8da249b1.mjs +0 -32
- package/components/chunks/check-f2fcce10.mjs +0 -32
- package/components/chunks/chevron-down-a78b9604.mjs +0 -32
- package/components/chunks/chevron-left-3365d59b.mjs +0 -32
- package/components/chunks/chevron-right-02f9e837.mjs +0 -32
- package/components/chunks/debounce-7d66ffa9.mjs +0 -12
- package/components/chunks/examples.mobile.json-618ba782.mjs +0 -4
- package/components/chunks/minus-c9cdee90.mjs +0 -32
- package/components/chunks/no-photography-7f2be516.mjs +0 -4
- package/components/chunks/plus-b1b0a5a8.mjs +0 -32
- package/components/chunks/x-mark-3b05101b.mjs +0 -31
- package/components/chunks/x-mark-c6ff45dd.mjs +0 -32
- package/modules/chunks/MazBtn-90ffd148.mjs +0 -184
- package/modules/chunks/MazIcon-988edef7.mjs +0 -159
- package/modules/chunks/MazSpinner-a16a3d8f.mjs +0 -46
- package/modules/chunks/chevron-left-3365d59b.mjs +0 -32
- package/modules/chunks/index-b1625fc2.mjs +0 -2315
- package/modules/chunks/no-photography-7f2be516.mjs +0 -4
- package/modules/chunks/x-mark-c6ff45dd.mjs +0 -32
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
import "../assets/MazSelect.css";
|
|
2
|
+
import { computed as r, defineComponent as ce, defineAsyncComponent as S, ref as d, getCurrentInstance as de, onMounted as we, useSlots as ke, openBlock as m, createElementBlock as z, normalizeClass as M, normalizeStyle as Q, createElementVNode as D, renderSlot as E, createVNode as w, unref as y, createCommentVNode as p, withDirectives as Se, mergeProps as me, toHandlers as xe, vModelDynamic as Ie, createTextVNode as Be, toDisplayString as fe, createBlock as R, withModifiers as q, withCtx as H, useCssVars as Ce, onBeforeMount as Ke, Transition as $e, Fragment as Ae, renderList as Le, nextTick as oe } from "vue";
|
|
3
|
+
function Me(l, f) {
|
|
4
|
+
let v;
|
|
5
|
+
return function(...x) {
|
|
6
|
+
clearTimeout(v), v = setTimeout(() => {
|
|
7
|
+
l.apply(this, x);
|
|
8
|
+
}, f);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
const ye = ({
|
|
12
|
+
componentName: l,
|
|
13
|
+
instance: f,
|
|
14
|
+
providedId: v
|
|
15
|
+
}) => r(() => v ?? `${l}-${f == null ? void 0 : f.uid}`), De = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "m-input-wrapper-left"
|
|
18
|
+
}, Ne = { class: "m-input-wrapper-input" }, Te = ["id", "type", "name", "placeholder", "aria-label", "disabled", "readonly", "required"], Pe = { key: 0 }, Fe = {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: "m-input-wrapper-right"
|
|
21
|
+
}, qe = /* @__PURE__ */ ce({
|
|
22
|
+
inheritAttrs: !1,
|
|
23
|
+
__name: "MazInput",
|
|
24
|
+
props: {
|
|
25
|
+
style: { type: [String, Array, Object], default: void 0 },
|
|
26
|
+
class: { type: String, default: void 0 },
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: [String, Number, Boolean],
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
placeholder: { type: String, default: void 0 },
|
|
32
|
+
color: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "primary"
|
|
35
|
+
},
|
|
36
|
+
label: { type: String, default: void 0 },
|
|
37
|
+
name: { type: String, default: "input" },
|
|
38
|
+
type: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "text",
|
|
41
|
+
validator: (l) => [
|
|
42
|
+
"text",
|
|
43
|
+
"date",
|
|
44
|
+
"number",
|
|
45
|
+
"tel",
|
|
46
|
+
"search",
|
|
47
|
+
"url",
|
|
48
|
+
"password",
|
|
49
|
+
"month",
|
|
50
|
+
"time",
|
|
51
|
+
"week",
|
|
52
|
+
"email"
|
|
53
|
+
].includes(l)
|
|
54
|
+
},
|
|
55
|
+
required: { type: Boolean, default: !1 },
|
|
56
|
+
disabled: { type: Boolean, default: !1 },
|
|
57
|
+
readonly: { type: Boolean, default: !1 },
|
|
58
|
+
id: { type: String, default: void 0 },
|
|
59
|
+
error: { type: Boolean, default: !1 },
|
|
60
|
+
success: { type: Boolean, default: !1 },
|
|
61
|
+
warning: { type: Boolean, default: !1 },
|
|
62
|
+
hint: { type: String, default: void 0 },
|
|
63
|
+
inputClasses: { type: String, default: void 0 },
|
|
64
|
+
noBorder: { type: Boolean, default: !1 },
|
|
65
|
+
noRadius: { type: Boolean, default: !1 },
|
|
66
|
+
size: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "md",
|
|
69
|
+
validator: (l) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(l)
|
|
70
|
+
},
|
|
71
|
+
debounce: { type: Boolean, default: !1 },
|
|
72
|
+
debounceDelay: { type: Number, default: 500 },
|
|
73
|
+
validButton: { type: Boolean, default: !1 },
|
|
74
|
+
validButtonLoading: { type: Boolean, default: !1 },
|
|
75
|
+
autoFocus: { type: Boolean, default: !1 },
|
|
76
|
+
borderActive: { type: Boolean, default: !1 },
|
|
77
|
+
leftIcon: { type: String, default: void 0 },
|
|
78
|
+
rightIcon: { type: String, default: void 0 }
|
|
79
|
+
},
|
|
80
|
+
emits: ["focus", "blur", "update:model-value", "click", "change", "update"],
|
|
81
|
+
setup(l, { emit: f }) {
|
|
82
|
+
const v = S(() => import("./MazBtn-74656d5b.mjs")), x = S(() => import("./MazIcon-52a76873.mjs")), N = S(() => import("./eye-slash-fa42a017.mjs")), Z = S(() => import("./eye-dc12ce09.mjs")), G = S(() => import("./check-31d7ba2f.mjs")), e = l, b = f, g = d(!1), s = d(!1), K = d(), J = de(), X = ye({
|
|
83
|
+
componentName: "MazInput",
|
|
84
|
+
instance: J,
|
|
85
|
+
providedId: e.id
|
|
86
|
+
});
|
|
87
|
+
we(() => {
|
|
88
|
+
var n;
|
|
89
|
+
e.autoFocus && ((n = K.value) == null || n.focus());
|
|
90
|
+
});
|
|
91
|
+
const Y = r(() => e.class), k = r(() => e.type === "password"), _ = r(() => g.value ? "text" : e.type), $ = r(() => {
|
|
92
|
+
if (!e.noBorder) {
|
|
93
|
+
if (e.error)
|
|
94
|
+
return "maz-border-danger";
|
|
95
|
+
if (e.success)
|
|
96
|
+
return "maz-border-success";
|
|
97
|
+
if (e.warning)
|
|
98
|
+
return "maz-border-warning";
|
|
99
|
+
if (s.value || e.borderActive) {
|
|
100
|
+
if (e.color === "black")
|
|
101
|
+
return "maz-border-black";
|
|
102
|
+
if (e.color === "danger")
|
|
103
|
+
return "maz-border-danger";
|
|
104
|
+
if (e.color === "info")
|
|
105
|
+
return "maz-border-info";
|
|
106
|
+
if (e.color === "primary")
|
|
107
|
+
return "maz-border-primary";
|
|
108
|
+
if (e.color === "secondary")
|
|
109
|
+
return "maz-border-secondary";
|
|
110
|
+
if (e.color === "success")
|
|
111
|
+
return "maz-border-success";
|
|
112
|
+
if (e.color === "warning")
|
|
113
|
+
return "maz-border-warning";
|
|
114
|
+
if (e.color === "white")
|
|
115
|
+
return "maz-border-white";
|
|
116
|
+
}
|
|
117
|
+
return "--default-border";
|
|
118
|
+
}
|
|
119
|
+
}), A = ke(), O = r(() => {
|
|
120
|
+
const { required: n, placeholder: c } = e;
|
|
121
|
+
if (c)
|
|
122
|
+
return n ? `${c} *` : c;
|
|
123
|
+
}), U = r(() => e.modelValue !== void 0 && e.modelValue !== ""), T = r({
|
|
124
|
+
get: () => e.modelValue,
|
|
125
|
+
set: (n) => j(n)
|
|
126
|
+
}), B = r(() => (!!e.label || !!e.hint) && (s.value || !!U.value || !!e.placeholder || ["date", "month", "week"].includes(e.type))), P = r(() => !!e.label || !!e.hint), ee = () => !!A["right-icon"] || k.value || !!A["valid-button"] || e.validButton || !!e.rightIcon, te = () => !!A["left-icon"] || !!e.leftIcon, C = (n) => {
|
|
127
|
+
b("focus", n), s.value = !0;
|
|
128
|
+
}, I = (n) => {
|
|
129
|
+
b("blur", n), s.value = !1;
|
|
130
|
+
}, W = (n) => b("change", n), F = Me((n) => {
|
|
131
|
+
b("update:model-value", n);
|
|
132
|
+
}, e.debounceDelay), j = (n) => {
|
|
133
|
+
if (e.debounce)
|
|
134
|
+
return F(n);
|
|
135
|
+
b("update:model-value", n);
|
|
136
|
+
};
|
|
137
|
+
return (n, c) => (m(), z(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
class: M(["m-input", [
|
|
141
|
+
{
|
|
142
|
+
"--is-focused": s.value || l.borderActive,
|
|
143
|
+
"--should-up": B.value,
|
|
144
|
+
"--has-label": P.value,
|
|
145
|
+
"--is-disabled": l.disabled,
|
|
146
|
+
"--is-readonly": l.readonly,
|
|
147
|
+
"--has-z-2": l.error || l.warning || l.success,
|
|
148
|
+
"--has-state": l.error || l.warning || l.success
|
|
149
|
+
},
|
|
150
|
+
Y.value,
|
|
151
|
+
`--${l.color}`,
|
|
152
|
+
`--${l.size}`
|
|
153
|
+
]]),
|
|
154
|
+
style: Q(l.style)
|
|
155
|
+
},
|
|
156
|
+
[
|
|
157
|
+
D(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
class: M(["m-input-wrapper", [l.inputClasses, $.value, { "maz-rounded": !l.noRadius }]])
|
|
161
|
+
},
|
|
162
|
+
[
|
|
163
|
+
te() ? (m(), z("div", De, [
|
|
164
|
+
n.$slots["left-icon"] || l.leftIcon ? E(n.$slots, "left-icon", { key: 0 }, () => [
|
|
165
|
+
w(y(x), {
|
|
166
|
+
name: l.leftIcon,
|
|
167
|
+
class: "maz-text-xl maz-text-muted"
|
|
168
|
+
}, null, 8, ["name"])
|
|
169
|
+
], !0) : p("v-if", !0)
|
|
170
|
+
])) : p("v-if", !0),
|
|
171
|
+
D("div", Ne, [
|
|
172
|
+
Se(D("input", me({
|
|
173
|
+
id: y(X),
|
|
174
|
+
ref_key: "input",
|
|
175
|
+
ref: K,
|
|
176
|
+
"onUpdate:modelValue": c[0] || (c[0] = (V) => T.value = V),
|
|
177
|
+
type: _.value,
|
|
178
|
+
name: l.name
|
|
179
|
+
}, n.$attrs, {
|
|
180
|
+
placeholder: O.value,
|
|
181
|
+
"aria-label": l.label || l.placeholder,
|
|
182
|
+
disabled: l.disabled,
|
|
183
|
+
readonly: l.readonly,
|
|
184
|
+
required: l.required,
|
|
185
|
+
class: "m-input-input"
|
|
186
|
+
}, xe({
|
|
187
|
+
blur: I,
|
|
188
|
+
focus: C,
|
|
189
|
+
change: W
|
|
190
|
+
}, !0), {
|
|
191
|
+
onClick: c[1] || (c[1] = (V) => n.$emit("click", V))
|
|
192
|
+
}), null, 16, Te), [
|
|
193
|
+
[Ie, T.value]
|
|
194
|
+
]),
|
|
195
|
+
l.label || l.hint ? (m(), z(
|
|
196
|
+
"span",
|
|
197
|
+
{
|
|
198
|
+
key: 0,
|
|
199
|
+
ref: "label",
|
|
200
|
+
class: M(["m-input-label", [
|
|
201
|
+
{
|
|
202
|
+
"maz-text-danger-600": l.error,
|
|
203
|
+
"maz-text-success-600": l.success,
|
|
204
|
+
"maz-text-warning-600": l.warning
|
|
205
|
+
}
|
|
206
|
+
]])
|
|
207
|
+
},
|
|
208
|
+
[
|
|
209
|
+
Be(
|
|
210
|
+
fe(l.hint || l.label) + " ",
|
|
211
|
+
1
|
|
212
|
+
/* TEXT */
|
|
213
|
+
),
|
|
214
|
+
l.required ? (m(), z("sup", Pe, "*")) : p("v-if", !0)
|
|
215
|
+
],
|
|
216
|
+
2
|
|
217
|
+
/* CLASS */
|
|
218
|
+
)) : p("v-if", !0)
|
|
219
|
+
]),
|
|
220
|
+
ee() ? (m(), z("div", Fe, [
|
|
221
|
+
n.$slots["right-icon"] || l.rightIcon ? E(n.$slots, "right-icon", { key: 0 }, () => [
|
|
222
|
+
w(y(x), {
|
|
223
|
+
name: l.rightIcon,
|
|
224
|
+
class: "maz-text-xl maz-text-muted"
|
|
225
|
+
}, null, 8, ["name"])
|
|
226
|
+
], !0) : p("v-if", !0),
|
|
227
|
+
k.value ? (m(), R(y(v), {
|
|
228
|
+
key: 1,
|
|
229
|
+
color: "transparent",
|
|
230
|
+
tabindex: "-1",
|
|
231
|
+
size: "mini",
|
|
232
|
+
onClick: c[2] || (c[2] = q((V) => g.value = !g.value, ["stop"]))
|
|
233
|
+
}, {
|
|
234
|
+
default: H(() => [
|
|
235
|
+
g.value ? (m(), R(y(N), {
|
|
236
|
+
key: 0,
|
|
237
|
+
class: "maz-text-xl maz-text-muted"
|
|
238
|
+
})) : (m(), R(y(Z), {
|
|
239
|
+
key: 1,
|
|
240
|
+
class: "maz-text-xl maz-text-muted"
|
|
241
|
+
}))
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
/* STABLE */
|
|
245
|
+
})) : p("v-if", !0),
|
|
246
|
+
n.$slots["valid-button"] || l.validButton ? E(n.$slots, "valid-button", { key: 2 }, () => [
|
|
247
|
+
w(y(v), {
|
|
248
|
+
color: "transparent",
|
|
249
|
+
disabled: l.disabled,
|
|
250
|
+
tabindex: "-1",
|
|
251
|
+
loading: l.validButtonLoading,
|
|
252
|
+
class: "m-input-valid-button",
|
|
253
|
+
size: "mini",
|
|
254
|
+
type: "submit"
|
|
255
|
+
}, {
|
|
256
|
+
default: H(() => [
|
|
257
|
+
w(y(G), { class: "maz-text-2xl maz-text-normal" })
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
/* STABLE */
|
|
261
|
+
}, 8, ["disabled", "loading"])
|
|
262
|
+
], !0) : p("v-if", !0)
|
|
263
|
+
])) : p("v-if", !0)
|
|
264
|
+
],
|
|
265
|
+
2
|
|
266
|
+
/* CLASS */
|
|
267
|
+
)
|
|
268
|
+
],
|
|
269
|
+
6
|
|
270
|
+
/* CLASS, STYLE */
|
|
271
|
+
));
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
const pe = (l, f) => {
|
|
275
|
+
const v = l.__vccOpts || l;
|
|
276
|
+
for (const [x, N] of f)
|
|
277
|
+
v[x] = N;
|
|
278
|
+
return v;
|
|
279
|
+
}, re = /* @__PURE__ */ pe(qe, [["__scopeId", "data-v-32fa5093"]]);
|
|
280
|
+
d("system");
|
|
281
|
+
d("system");
|
|
282
|
+
d();
|
|
283
|
+
d([]);
|
|
284
|
+
let ne = null;
|
|
285
|
+
function Ee(l, f) {
|
|
286
|
+
ne && clearTimeout(ne), ne = setTimeout(l, f);
|
|
287
|
+
}
|
|
288
|
+
const He = ["onClick"], Oe = {
|
|
289
|
+
key: 0,
|
|
290
|
+
tabindex: "-1",
|
|
291
|
+
class: "m-select-list__search-wrapper"
|
|
292
|
+
}, Ue = { class: "m-select-list__no-results" }, We = {
|
|
293
|
+
key: 2,
|
|
294
|
+
class: "m-select-list__scroll-wrapper",
|
|
295
|
+
tabindex: "-1"
|
|
296
|
+
}, je = ["onClick"], Qe = /* @__PURE__ */ ce({
|
|
297
|
+
inheritAttrs: !1,
|
|
298
|
+
__name: "MazSelect",
|
|
299
|
+
props: {
|
|
300
|
+
style: { type: [String, Array, Object], default: void 0 },
|
|
301
|
+
class: { type: String, default: void 0 },
|
|
302
|
+
modelValue: {
|
|
303
|
+
type: [Number, String, Boolean, Array],
|
|
304
|
+
default: void 0
|
|
305
|
+
},
|
|
306
|
+
id: { type: String, default: void 0 },
|
|
307
|
+
options: { type: Array, default: void 0 },
|
|
308
|
+
optionValueKey: { type: String, default: "value" },
|
|
309
|
+
optionLabelKey: { type: String, default: "label" },
|
|
310
|
+
optionInputValueKey: { type: String, default: "label" },
|
|
311
|
+
listPosition: {
|
|
312
|
+
type: String,
|
|
313
|
+
default: "bottom left",
|
|
314
|
+
validator: (l) => ["top", "top right", "top left", "bottom", "bottom right", "bottom left"].includes(
|
|
315
|
+
l
|
|
316
|
+
)
|
|
317
|
+
},
|
|
318
|
+
required: { type: Boolean, default: !1 },
|
|
319
|
+
disabled: { type: Boolean, default: !1 },
|
|
320
|
+
open: { type: Boolean, default: !1 },
|
|
321
|
+
/** Choose color of the input */
|
|
322
|
+
color: {
|
|
323
|
+
type: String,
|
|
324
|
+
default: "primary"
|
|
325
|
+
},
|
|
326
|
+
/** Choose the option list item height */
|
|
327
|
+
itemHeight: { type: Number, default: 40 },
|
|
328
|
+
maxListHeight: { type: Number, default: 240 },
|
|
329
|
+
/** Add max-width value to option list */
|
|
330
|
+
maxListWidth: { type: Number, default: void 0 },
|
|
331
|
+
/** Choose size of the input */
|
|
332
|
+
size: {
|
|
333
|
+
type: String,
|
|
334
|
+
default: "md",
|
|
335
|
+
validator: (l) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(l)
|
|
336
|
+
},
|
|
337
|
+
/** Display search input in option list */
|
|
338
|
+
search: { type: Boolean, default: !1 },
|
|
339
|
+
/** Search input placeholder */
|
|
340
|
+
searchPlaceholder: { type: String, default: "Search in options" },
|
|
341
|
+
/** Enable feature to select multiple values */
|
|
342
|
+
multiple: { type: Boolean, default: !1 }
|
|
343
|
+
},
|
|
344
|
+
emits: [
|
|
345
|
+
"close",
|
|
346
|
+
"open",
|
|
347
|
+
"blur",
|
|
348
|
+
"focus",
|
|
349
|
+
"change",
|
|
350
|
+
"update:model-value",
|
|
351
|
+
/** On selected value, returns the option object */
|
|
352
|
+
"selected-option"
|
|
353
|
+
],
|
|
354
|
+
setup(l, { emit: f }) {
|
|
355
|
+
Ce((t) => ({
|
|
356
|
+
"1e2ca234": Y.value,
|
|
357
|
+
a001241a: J.value,
|
|
358
|
+
"75c5211b": X.value
|
|
359
|
+
}));
|
|
360
|
+
const v = S(() => import("./MazCheckbox-3a2b48b4.mjs")), x = S(() => import("./magnifying-glass-908981c0.mjs")), N = S(() => import("./chevron-down-2b60111a.mjs")), Z = S(() => import("./no-symbol-87477ad0.mjs")), G = de(), e = l, b = f, g = d(!1), s = d(), K = r(
|
|
361
|
+
() => ["black", "transparent", "white"].includes(e.color)
|
|
362
|
+
), J = r(
|
|
363
|
+
() => K.value ? "var(--maz-color-black)" : `var(--maz-color-${e.color}-800)`
|
|
364
|
+
), X = r(
|
|
365
|
+
() => K.value ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-100)`
|
|
366
|
+
), Y = r(
|
|
367
|
+
() => K.value ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-200)`
|
|
368
|
+
), k = r(() => g.value || e.open), _ = ye({
|
|
369
|
+
componentName: "MazSelect",
|
|
370
|
+
instance: G,
|
|
371
|
+
providedId: e.id
|
|
372
|
+
}), $ = r(
|
|
373
|
+
() => {
|
|
374
|
+
var t;
|
|
375
|
+
return ((t = e.options) == null ? void 0 : t.filter((a) => e.multiple ? Array.isArray(e.modelValue) ? e.modelValue.includes(a[e.optionValueKey]) && !B(a[e.optionValueKey]) : !1 : e.modelValue === a[e.optionValueKey] && !B(a[e.optionValueKey]))) ?? [];
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
Ke(() => {
|
|
379
|
+
var t;
|
|
380
|
+
(t = e.options) != null && t.length || console.warn("[maz-ui](MazSelect) you must provide options"), ae();
|
|
381
|
+
});
|
|
382
|
+
const A = d(), O = d(), U = d(), T = d(), B = (t) => t == null;
|
|
383
|
+
function P(t) {
|
|
384
|
+
var o;
|
|
385
|
+
return (((o = $.value) == null ? void 0 : o.some(
|
|
386
|
+
(i) => i[e.optionValueKey] === t[e.optionValueKey]
|
|
387
|
+
)) ?? !1) && !B(t[e.optionValueKey]);
|
|
388
|
+
}
|
|
389
|
+
const ee = r(() => {
|
|
390
|
+
var t, a;
|
|
391
|
+
return e.multiple && e.modelValue && Array.isArray(e.modelValue) ? e.modelValue.map(
|
|
392
|
+
(o) => {
|
|
393
|
+
var i, u;
|
|
394
|
+
return (u = (i = e.options) == null ? void 0 : i.find((h) => h[e.optionValueKey] === o)) == null ? void 0 : u[e.optionInputValueKey];
|
|
395
|
+
}
|
|
396
|
+
).join(", ") : (a = (t = e.options) == null ? void 0 : t.find((o) => o[e.optionValueKey] === e.modelValue)) == null ? void 0 : a[e.optionInputValueKey];
|
|
397
|
+
}), te = r(
|
|
398
|
+
() => e.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
399
|
+
), C = d(""), I = d("");
|
|
400
|
+
function W(t) {
|
|
401
|
+
return t.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
|
|
402
|
+
}
|
|
403
|
+
const F = (t, a) => a && t && W(t.toString().toLocaleLowerCase().trim()).includes(
|
|
404
|
+
W(a.toLocaleLowerCase().trim())
|
|
405
|
+
);
|
|
406
|
+
function j(t) {
|
|
407
|
+
var a;
|
|
408
|
+
return t ? (a = e.options) == null ? void 0 : a.filter((o) => {
|
|
409
|
+
const i = o[e.optionLabelKey], u = o[e.optionValueKey], h = o[e.optionInputValueKey];
|
|
410
|
+
return F(i, t) || F(u, t) || F(h, t);
|
|
411
|
+
}) : e.options;
|
|
412
|
+
}
|
|
413
|
+
const n = r(() => j(C.value)), c = async (t) => {
|
|
414
|
+
var a;
|
|
415
|
+
if (t && ("relatedTarget" in t && ((a = A.value) != null && a.contains(t.relatedTarget)) || t.type === "keydown"))
|
|
416
|
+
return t.preventDefault();
|
|
417
|
+
await oe(), g.value = !1, s.value = 0, b("close", t);
|
|
418
|
+
}, V = async (t) => {
|
|
419
|
+
e.disabled || k.value || (t == null || t.preventDefault(), g.value = !0, await le(), b("focus", t), b("open", g.value));
|
|
420
|
+
};
|
|
421
|
+
function ie() {
|
|
422
|
+
var t, a;
|
|
423
|
+
(a = ((t = O.value) == null ? void 0 : t.$el).querySelector("input")) == null || a.focus();
|
|
424
|
+
}
|
|
425
|
+
function ve(t) {
|
|
426
|
+
g.value ? c(t) : ie();
|
|
427
|
+
}
|
|
428
|
+
function be(t) {
|
|
429
|
+
var a, o;
|
|
430
|
+
C.value = t, (o = ((a = U.value) == null ? void 0 : a.$el).querySelector("input")) == null || o.focus();
|
|
431
|
+
}
|
|
432
|
+
function he(t) {
|
|
433
|
+
var o;
|
|
434
|
+
t === "Backspace" && I.value.length > 0 ? I.value = I.value.slice(0, -1) : I.value += t;
|
|
435
|
+
const a = j(I.value);
|
|
436
|
+
a != null && a.length && (s.value = (o = n.value) == null ? void 0 : o.findIndex(
|
|
437
|
+
(i) => i[e.optionValueKey] === a[0][e.optionValueKey]
|
|
438
|
+
), typeof s.value == "number" && s.value >= 0 && le(s.value)), Ee(() => {
|
|
439
|
+
I.value = "";
|
|
440
|
+
}, 1e3);
|
|
441
|
+
}
|
|
442
|
+
const ge = (t) => {
|
|
443
|
+
const a = t.key;
|
|
444
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(a) ? (t.preventDefault(), V(t), e.search ? be(a) : he(a)) : se(t);
|
|
445
|
+
}, se = (t) => {
|
|
446
|
+
const a = t.code, o = ["ArrowUp", "ArrowDown"].includes(a), i = ["Enter", "Space"].includes(a), u = a === "Escape" && k.value;
|
|
447
|
+
o ? ze(t, s.value) : i ? Ve(t, s.value) : u && c();
|
|
448
|
+
}, ze = (t, a) => {
|
|
449
|
+
var u;
|
|
450
|
+
t.preventDefault();
|
|
451
|
+
const o = t.code;
|
|
452
|
+
k.value || V(t);
|
|
453
|
+
const i = (u = n.value) == null ? void 0 : u.length;
|
|
454
|
+
i && (typeof a == "number" ? a === i - 1 && o === "ArrowDown" ? s.value = 0 : a === 0 && o === "ArrowUp" ? s.value = i - 1 : s.value = o === "ArrowDown" ? a + 1 : a - 1 : s.value = o === "ArrowDown" ? 0 : i - 1, le(s.value));
|
|
455
|
+
}, Ve = (t, a) => {
|
|
456
|
+
var i, u, h;
|
|
457
|
+
if (t.preventDefault(), !k.value)
|
|
458
|
+
return V(t);
|
|
459
|
+
const o = a ? ((i = n.value) == null ? void 0 : i[a]) ?? ((u = n.value) == null ? void 0 : u[0]) : (h = n.value) == null ? void 0 : h[0];
|
|
460
|
+
B(o) || ue(o);
|
|
461
|
+
};
|
|
462
|
+
async function le(t) {
|
|
463
|
+
var o, i;
|
|
464
|
+
await oe(), typeof t != "number" && ae();
|
|
465
|
+
const a = t ?? s.value;
|
|
466
|
+
typeof a == "number" && a >= 0 && ((i = (o = T.value) == null ? void 0 : o.querySelectorAll(".m-select-list-item")[a]) == null || i.scrollIntoView({
|
|
467
|
+
behavior: "auto",
|
|
468
|
+
block: "nearest",
|
|
469
|
+
inline: "start"
|
|
470
|
+
}));
|
|
471
|
+
}
|
|
472
|
+
function ae(t) {
|
|
473
|
+
var o;
|
|
474
|
+
const a = (o = n.value) == null ? void 0 : o.findIndex((i) => {
|
|
475
|
+
var u, h;
|
|
476
|
+
return e.multiple && Array.isArray(e.modelValue) ? t ? t[e.optionValueKey] === i[e.optionValueKey] : [...e.modelValue].reverse()[0] === i[e.optionValueKey] : ((h = (u = $.value) == null ? void 0 : u[0]) == null ? void 0 : h[e.optionValueKey]) === i[e.optionValueKey];
|
|
477
|
+
});
|
|
478
|
+
s.value = a && a >= 0 ? a : 0;
|
|
479
|
+
}
|
|
480
|
+
const ue = (t, a = !0) => {
|
|
481
|
+
var h;
|
|
482
|
+
a && !e.multiple && oe(() => c()), C.value = "";
|
|
483
|
+
const o = (h = $.value) == null ? void 0 : h.some(
|
|
484
|
+
(L) => L[e.optionValueKey] === t[e.optionValueKey]
|
|
485
|
+
);
|
|
486
|
+
let i = $.value;
|
|
487
|
+
o && e.multiple ? i = i == null ? void 0 : i.filter(
|
|
488
|
+
(L) => L[e.optionValueKey] !== t[e.optionValueKey]
|
|
489
|
+
) : e.multiple ? i.push(t) : i = [t];
|
|
490
|
+
const u = i.map((L) => L[e.optionValueKey]);
|
|
491
|
+
b("update:model-value", e.multiple ? u : u[0]), b("selected-option", t), ae(t), ie();
|
|
492
|
+
};
|
|
493
|
+
return (t, a) => (m(), z(
|
|
494
|
+
"div",
|
|
495
|
+
{
|
|
496
|
+
ref_key: "mazSelectElement",
|
|
497
|
+
ref: A,
|
|
498
|
+
class: M(["m-select", [{ "--is-open": k.value, "--disabled": l.disabled }, e.class]]),
|
|
499
|
+
style: Q(l.style),
|
|
500
|
+
onBlurCapture: c
|
|
501
|
+
},
|
|
502
|
+
[
|
|
503
|
+
w(re, me({
|
|
504
|
+
id: y(_),
|
|
505
|
+
ref_key: "mazInputComponent",
|
|
506
|
+
ref: O,
|
|
507
|
+
class: "m-select-input"
|
|
508
|
+
}, t.$attrs, {
|
|
509
|
+
required: l.required,
|
|
510
|
+
"border-active": g.value,
|
|
511
|
+
color: l.color,
|
|
512
|
+
"model-value": ee.value,
|
|
513
|
+
autocomplete: "off",
|
|
514
|
+
size: l.size,
|
|
515
|
+
disabled: l.disabled,
|
|
516
|
+
onFocus: q(V, ["prevent", "stop"]),
|
|
517
|
+
onClick: q(V, ["prevent", "stop"]),
|
|
518
|
+
onChange: a[0] || (a[0] = (o) => b("change", o)),
|
|
519
|
+
onKeydown: ge
|
|
520
|
+
}), {
|
|
521
|
+
"right-icon": H(() => [
|
|
522
|
+
D("button", {
|
|
523
|
+
tabindex: "-1",
|
|
524
|
+
type: "button",
|
|
525
|
+
class: "m-select-input__toggle-button maz-custom",
|
|
526
|
+
onClick: q(ve, ["stop"])
|
|
527
|
+
}, [
|
|
528
|
+
w(y(N), { class: "m-select-chevron maz-text-xl" })
|
|
529
|
+
], 8, He)
|
|
530
|
+
]),
|
|
531
|
+
_: 1
|
|
532
|
+
/* STABLE */
|
|
533
|
+
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled", "onFocus", "onClick"]),
|
|
534
|
+
w($e, { name: te.value }, {
|
|
535
|
+
default: H(() => [
|
|
536
|
+
k.value ? (m(), z(
|
|
537
|
+
"div",
|
|
538
|
+
{
|
|
539
|
+
key: 0,
|
|
540
|
+
ref_key: "optionsListElement",
|
|
541
|
+
ref: T,
|
|
542
|
+
class: M(["m-select-list", {
|
|
543
|
+
"--top": l.listPosition.includes("top"),
|
|
544
|
+
"--left": l.listPosition.includes("left"),
|
|
545
|
+
"--right": l.listPosition.includes("right"),
|
|
546
|
+
"--bottom": l.listPosition.includes("bottom")
|
|
547
|
+
}]),
|
|
548
|
+
style: Q({
|
|
549
|
+
maxHeight: `${l.maxListHeight}px`,
|
|
550
|
+
maxWidth: `${l.maxListWidth}px`
|
|
551
|
+
})
|
|
552
|
+
},
|
|
553
|
+
[
|
|
554
|
+
l.search ? (m(), z("div", Oe, [
|
|
555
|
+
w(re, {
|
|
556
|
+
ref_key: "searchInputComponent",
|
|
557
|
+
ref: U,
|
|
558
|
+
modelValue: C.value,
|
|
559
|
+
"onUpdate:modelValue": [
|
|
560
|
+
a[1] || (a[1] = (o) => C.value = o),
|
|
561
|
+
a[2] || (a[2] = (o) => s.value = 0)
|
|
562
|
+
],
|
|
563
|
+
size: "sm",
|
|
564
|
+
color: l.color,
|
|
565
|
+
placeholder: l.searchPlaceholder,
|
|
566
|
+
name: "search",
|
|
567
|
+
autocomplete: "off",
|
|
568
|
+
tabindex: "-1",
|
|
569
|
+
class: "m-select-list__search-input",
|
|
570
|
+
onKeydown: se
|
|
571
|
+
}, {
|
|
572
|
+
"left-icon": H(() => [
|
|
573
|
+
w(y(x), { class: "maz-h-[1.3rem] maz-w-[1.3rem]" })
|
|
574
|
+
]),
|
|
575
|
+
_: 1
|
|
576
|
+
/* STABLE */
|
|
577
|
+
}, 8, ["modelValue", "color", "placeholder"])
|
|
578
|
+
])) : p("v-if", !0),
|
|
579
|
+
p(`
|
|
580
|
+
@slot No results slot - Displayed when no results corresponding with seeach query
|
|
581
|
+
`),
|
|
582
|
+
!n.value || n.value.length <= 0 ? E(t.$slots, "no-results", { key: 1 }, () => [
|
|
583
|
+
D("span", Ue, [
|
|
584
|
+
w(y(Z), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
585
|
+
])
|
|
586
|
+
], !0) : (m(), z("div", We, [
|
|
587
|
+
(m(!0), z(
|
|
588
|
+
Ae,
|
|
589
|
+
null,
|
|
590
|
+
Le(n.value, (o, i) => (m(), z("button", {
|
|
591
|
+
key: i,
|
|
592
|
+
tabindex: "-1",
|
|
593
|
+
type: "button",
|
|
594
|
+
class: M(["m-select-list-item maz-custom", [
|
|
595
|
+
{
|
|
596
|
+
"--is-keyboard-selected": s.value === i,
|
|
597
|
+
"--is-selected": P(o),
|
|
598
|
+
"--is-none-value": B(o[l.optionValueKey])
|
|
599
|
+
}
|
|
600
|
+
]]),
|
|
601
|
+
style: Q({ minHeight: `${l.itemHeight}px` }),
|
|
602
|
+
onClick: q((u) => ue(o), ["prevent", "stop"])
|
|
603
|
+
}, [
|
|
604
|
+
l.multiple ? (m(), R(y(v), {
|
|
605
|
+
key: 0,
|
|
606
|
+
tabindex: "-1",
|
|
607
|
+
"model-value": P(o),
|
|
608
|
+
size: "sm",
|
|
609
|
+
color: l.color
|
|
610
|
+
}, null, 8, ["model-value", "color"])) : p("v-if", !0),
|
|
611
|
+
p(`
|
|
612
|
+
@slot Custom option
|
|
613
|
+
@binding {Object} option
|
|
614
|
+
@binding {Boolean} is-selected
|
|
615
|
+
`),
|
|
616
|
+
E(t.$slots, "default", {
|
|
617
|
+
option: o,
|
|
618
|
+
isSelected: P(o)
|
|
619
|
+
}, () => [
|
|
620
|
+
D(
|
|
621
|
+
"span",
|
|
622
|
+
null,
|
|
623
|
+
fe(o[l.optionLabelKey]),
|
|
624
|
+
1
|
|
625
|
+
/* TEXT */
|
|
626
|
+
)
|
|
627
|
+
], !0)
|
|
628
|
+
], 14, je))),
|
|
629
|
+
128
|
|
630
|
+
/* KEYED_FRAGMENT */
|
|
631
|
+
))
|
|
632
|
+
]))
|
|
633
|
+
],
|
|
634
|
+
6
|
|
635
|
+
/* CLASS, STYLE */
|
|
636
|
+
)) : p("v-if", !0)
|
|
637
|
+
]),
|
|
638
|
+
_: 3
|
|
639
|
+
/* FORWARDED */
|
|
640
|
+
}, 8, ["name"])
|
|
641
|
+
],
|
|
642
|
+
38
|
|
643
|
+
/* CLASS, STYLE, HYDRATE_EVENTS */
|
|
644
|
+
));
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
const Ge = /* @__PURE__ */ pe(Qe, [["__scopeId", "data-v-441d5cd5"]]);
|
|
648
|
+
export {
|
|
649
|
+
Ge as M,
|
|
650
|
+
pe as _,
|
|
651
|
+
ye as u
|
|
652
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "../assets/MazSpinner.css";
|
|
2
|
+
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as p, createElementVNode as r } from "vue";
|
|
3
|
+
import { _ as i } from "./MazBtn-7706b2da.mjs";
|
|
4
|
+
const a = (e) => (s("data-v-c67298ec"), e = e(), p(), e), _ = ["width", "height"], d = /* @__PURE__ */ a(() => /* @__PURE__ */ r(
|
|
5
|
+
"path",
|
|
6
|
+
{ 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" },
|
|
7
|
+
null,
|
|
8
|
+
-1
|
|
9
|
+
/* HOISTED */
|
|
10
|
+
)), l = [
|
|
11
|
+
d
|
|
12
|
+
], m = /* @__PURE__ */ t({
|
|
13
|
+
__name: "MazSpinner",
|
|
14
|
+
props: {
|
|
15
|
+
size: { type: String, default: "2em" },
|
|
16
|
+
color: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "primary"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(e) {
|
|
22
|
+
return (h, u) => (o(), c("svg", {
|
|
23
|
+
width: e.size,
|
|
24
|
+
height: e.size,
|
|
25
|
+
version: "1.1",
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
x: "0px",
|
|
28
|
+
y: "0px",
|
|
29
|
+
viewBox: "0 0 50 50",
|
|
30
|
+
"xml:space": "preserve",
|
|
31
|
+
class: n(["m-spinner", `m-spinner--${e.color}`]),
|
|
32
|
+
style: { "enable-background": "new 0 0 50 50" }
|
|
33
|
+
}, l, 10, _));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const w = /* @__PURE__ */ i(m, [["__scopeId", "data-v-c67298ec"]]);
|
|
37
|
+
export {
|
|
38
|
+
w as default
|
|
39
|
+
};
|