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,117 @@
|
|
|
1
|
+
import "../assets/MazCheckbox.css";
|
|
2
|
+
import { defineComponent as g, useCssVars as C, getCurrentInstance as _, computed as t, openBlock as S, createElementBlock as I, unref as r, normalizeClass as m, createElementVNode as f, mergeProps as w, createVNode as B, renderSlot as A } from "vue";
|
|
3
|
+
import { u as N, _ as M } from "./MazPhoneNumberInput-e1bf46f9.mjs";
|
|
4
|
+
import E from "./check-31d7ba2f.mjs";
|
|
5
|
+
const q = ["for", "aria-checked"], D = ["id", "checked", "disabled", "name"], H = /* @__PURE__ */ g({
|
|
6
|
+
__name: "MazCheckbox",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: [Boolean, Array],
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
id: { type: String, default: void 0 },
|
|
13
|
+
color: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "primary"
|
|
16
|
+
},
|
|
17
|
+
value: { type: [String, Number, Boolean], default: void 0 },
|
|
18
|
+
name: { type: String, default: "m-checkbox" },
|
|
19
|
+
size: { type: String, default: "md" },
|
|
20
|
+
disabled: { type: Boolean, default: !1 }
|
|
21
|
+
},
|
|
22
|
+
emits: [
|
|
23
|
+
/* emitted when value change */
|
|
24
|
+
"update:model-value",
|
|
25
|
+
/* emited when value change */
|
|
26
|
+
"change"
|
|
27
|
+
],
|
|
28
|
+
setup(l, { emit: p }) {
|
|
29
|
+
C((a) => ({
|
|
30
|
+
"40cdf8ce": k.value,
|
|
31
|
+
"25e00d0a": x.value,
|
|
32
|
+
"5692b564": y.value,
|
|
33
|
+
"9df23cde": z.value
|
|
34
|
+
}));
|
|
35
|
+
const b = _(), e = l, n = p, s = N({
|
|
36
|
+
componentName: "MazCheckbox",
|
|
37
|
+
instance: b,
|
|
38
|
+
providedId: e.id
|
|
39
|
+
}), d = t(
|
|
40
|
+
() => typeof e.value != "boolean" && Array.isArray(e.modelValue) ? e.modelValue.includes(e.value) : typeof e.modelValue == "boolean" ? e.modelValue : !1
|
|
41
|
+
), x = t(() => {
|
|
42
|
+
switch (e.size) {
|
|
43
|
+
case "xl":
|
|
44
|
+
return "2.25rem";
|
|
45
|
+
case "lg":
|
|
46
|
+
return "2rem";
|
|
47
|
+
default:
|
|
48
|
+
return "1.625rem";
|
|
49
|
+
case "sm":
|
|
50
|
+
return "1.425rem";
|
|
51
|
+
case "xs":
|
|
52
|
+
return "1.325rem";
|
|
53
|
+
case "mini":
|
|
54
|
+
return "1.2rem";
|
|
55
|
+
}
|
|
56
|
+
}), h = t(() => {
|
|
57
|
+
switch (e.size) {
|
|
58
|
+
case "xl":
|
|
59
|
+
return "maz-text-2xl";
|
|
60
|
+
case "lg":
|
|
61
|
+
return "maz-text-xl";
|
|
62
|
+
default:
|
|
63
|
+
return "maz-text-lg";
|
|
64
|
+
case "sm":
|
|
65
|
+
return "maz-text-base";
|
|
66
|
+
case "xs":
|
|
67
|
+
return "maz-text-sm";
|
|
68
|
+
case "mini":
|
|
69
|
+
return "maz-text-xs";
|
|
70
|
+
}
|
|
71
|
+
}), k = t(() => `var(--maz-color-${e.color}-contrast)`), y = t(() => `var(--maz-color-${e.color})`), z = t(
|
|
72
|
+
() => ["black", "transparent"].includes(e.color) ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-alpha)`
|
|
73
|
+
);
|
|
74
|
+
function V(a) {
|
|
75
|
+
["Space"].includes(a.code) && (a.preventDefault(), u(e.value ?? !e.modelValue));
|
|
76
|
+
}
|
|
77
|
+
function v(a) {
|
|
78
|
+
return typeof a == "boolean" && (typeof e.modelValue == "boolean" || e.modelValue === void 0 || e.modelValue === null) ? !e.modelValue : Array.isArray(e.modelValue) && typeof a != "boolean" ? e.modelValue.includes(a) ? e.modelValue.filter((o) => o !== a) : [...e.modelValue, a] : [a];
|
|
79
|
+
}
|
|
80
|
+
function u(a) {
|
|
81
|
+
const o = v(a);
|
|
82
|
+
n("update:model-value", o), n("change", o);
|
|
83
|
+
}
|
|
84
|
+
return (a, o) => (S(), I("label", {
|
|
85
|
+
for: r(s),
|
|
86
|
+
class: m(["m-checkbox", { "--disabled": l.disabled }]),
|
|
87
|
+
tabindex: "0",
|
|
88
|
+
role: "checkbox",
|
|
89
|
+
"aria-checked": d.value,
|
|
90
|
+
onKeydown: V
|
|
91
|
+
}, [
|
|
92
|
+
f("input", w({
|
|
93
|
+
id: r(s),
|
|
94
|
+
checked: d.value
|
|
95
|
+
}, a.$attrs, {
|
|
96
|
+
tabindex: "-1",
|
|
97
|
+
disabled: l.disabled,
|
|
98
|
+
name: l.name,
|
|
99
|
+
type: "checkbox",
|
|
100
|
+
onChange: o[0] || (o[0] = (c) => {
|
|
101
|
+
var i;
|
|
102
|
+
return u(l.value ?? ((i = c == null ? void 0 : c.target) == null ? void 0 : i.checked));
|
|
103
|
+
})
|
|
104
|
+
}), null, 16, D),
|
|
105
|
+
f("span", null, [
|
|
106
|
+
B(r(E), {
|
|
107
|
+
class: m(["check-icon", h.value])
|
|
108
|
+
}, null, 8, ["class"])
|
|
109
|
+
]),
|
|
110
|
+
A(a.$slots, "default", {}, void 0, !0)
|
|
111
|
+
], 42, q));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const j = /* @__PURE__ */ M(H, [["__scopeId", "data-v-141a5e53"]]);
|
|
115
|
+
export {
|
|
116
|
+
j as default
|
|
117
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import "../assets/MazCheckbox.css";
|
|
2
|
+
import { defineComponent as g, useCssVars as C, getCurrentInstance as _, computed as t, openBlock as S, createElementBlock as I, unref as r, normalizeClass as m, createElementVNode as f, mergeProps as w, createVNode as B, renderSlot as A } from "vue";
|
|
3
|
+
import { u as N, _ as M } from "./MazSelect-6ff6bb96.mjs";
|
|
4
|
+
import E from "./check-31d7ba2f.mjs";
|
|
5
|
+
const q = ["for", "aria-checked"], D = ["id", "checked", "disabled", "name"], H = /* @__PURE__ */ g({
|
|
6
|
+
__name: "MazCheckbox",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: [Boolean, Array],
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
id: { type: String, default: void 0 },
|
|
13
|
+
color: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "primary"
|
|
16
|
+
},
|
|
17
|
+
value: { type: [String, Number, Boolean], default: void 0 },
|
|
18
|
+
name: { type: String, default: "m-checkbox" },
|
|
19
|
+
size: { type: String, default: "md" },
|
|
20
|
+
disabled: { type: Boolean, default: !1 }
|
|
21
|
+
},
|
|
22
|
+
emits: [
|
|
23
|
+
/* emitted when value change */
|
|
24
|
+
"update:model-value",
|
|
25
|
+
/* emited when value change */
|
|
26
|
+
"change"
|
|
27
|
+
],
|
|
28
|
+
setup(l, { emit: p }) {
|
|
29
|
+
C((a) => ({
|
|
30
|
+
"40cdf8ce": k.value,
|
|
31
|
+
"25e00d0a": x.value,
|
|
32
|
+
"5692b564": y.value,
|
|
33
|
+
"9df23cde": z.value
|
|
34
|
+
}));
|
|
35
|
+
const b = _(), e = l, n = p, s = N({
|
|
36
|
+
componentName: "MazCheckbox",
|
|
37
|
+
instance: b,
|
|
38
|
+
providedId: e.id
|
|
39
|
+
}), d = t(
|
|
40
|
+
() => typeof e.value != "boolean" && Array.isArray(e.modelValue) ? e.modelValue.includes(e.value) : typeof e.modelValue == "boolean" ? e.modelValue : !1
|
|
41
|
+
), x = t(() => {
|
|
42
|
+
switch (e.size) {
|
|
43
|
+
case "xl":
|
|
44
|
+
return "2.25rem";
|
|
45
|
+
case "lg":
|
|
46
|
+
return "2rem";
|
|
47
|
+
default:
|
|
48
|
+
return "1.625rem";
|
|
49
|
+
case "sm":
|
|
50
|
+
return "1.425rem";
|
|
51
|
+
case "xs":
|
|
52
|
+
return "1.325rem";
|
|
53
|
+
case "mini":
|
|
54
|
+
return "1.2rem";
|
|
55
|
+
}
|
|
56
|
+
}), h = t(() => {
|
|
57
|
+
switch (e.size) {
|
|
58
|
+
case "xl":
|
|
59
|
+
return "maz-text-2xl";
|
|
60
|
+
case "lg":
|
|
61
|
+
return "maz-text-xl";
|
|
62
|
+
default:
|
|
63
|
+
return "maz-text-lg";
|
|
64
|
+
case "sm":
|
|
65
|
+
return "maz-text-base";
|
|
66
|
+
case "xs":
|
|
67
|
+
return "maz-text-sm";
|
|
68
|
+
case "mini":
|
|
69
|
+
return "maz-text-xs";
|
|
70
|
+
}
|
|
71
|
+
}), k = t(() => `var(--maz-color-${e.color}-contrast)`), y = t(() => `var(--maz-color-${e.color})`), z = t(
|
|
72
|
+
() => ["black", "transparent"].includes(e.color) ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-alpha)`
|
|
73
|
+
);
|
|
74
|
+
function V(a) {
|
|
75
|
+
["Space"].includes(a.code) && (a.preventDefault(), u(e.value ?? !e.modelValue));
|
|
76
|
+
}
|
|
77
|
+
function v(a) {
|
|
78
|
+
return typeof a == "boolean" && (typeof e.modelValue == "boolean" || e.modelValue === void 0 || e.modelValue === null) ? !e.modelValue : Array.isArray(e.modelValue) && typeof a != "boolean" ? e.modelValue.includes(a) ? e.modelValue.filter((o) => o !== a) : [...e.modelValue, a] : [a];
|
|
79
|
+
}
|
|
80
|
+
function u(a) {
|
|
81
|
+
const o = v(a);
|
|
82
|
+
n("update:model-value", o), n("change", o);
|
|
83
|
+
}
|
|
84
|
+
return (a, o) => (S(), I("label", {
|
|
85
|
+
for: r(s),
|
|
86
|
+
class: m(["m-checkbox", { "--disabled": l.disabled }]),
|
|
87
|
+
tabindex: "0",
|
|
88
|
+
role: "checkbox",
|
|
89
|
+
"aria-checked": d.value,
|
|
90
|
+
onKeydown: V
|
|
91
|
+
}, [
|
|
92
|
+
f("input", w({
|
|
93
|
+
id: r(s),
|
|
94
|
+
checked: d.value
|
|
95
|
+
}, a.$attrs, {
|
|
96
|
+
tabindex: "-1",
|
|
97
|
+
disabled: l.disabled,
|
|
98
|
+
name: l.name,
|
|
99
|
+
type: "checkbox",
|
|
100
|
+
onChange: o[0] || (o[0] = (c) => {
|
|
101
|
+
var i;
|
|
102
|
+
return u(l.value ?? ((i = c == null ? void 0 : c.target) == null ? void 0 : i.checked));
|
|
103
|
+
})
|
|
104
|
+
}), null, 16, D),
|
|
105
|
+
f("span", null, [
|
|
106
|
+
B(r(E), {
|
|
107
|
+
class: m(["check-icon", h.value])
|
|
108
|
+
}, null, 8, ["class"])
|
|
109
|
+
]),
|
|
110
|
+
A(a.$slots, "default", {}, void 0, !0)
|
|
111
|
+
], 42, q));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const j = /* @__PURE__ */ M(H, [["__scopeId", "data-v-141a5e53"]]);
|
|
115
|
+
export {
|
|
116
|
+
j as default
|
|
117
|
+
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import "../assets/MazDialog.css";
|
|
2
|
+
import { defineComponent as $, ref as D, onMounted as L, watch as w, openBlock as c, createBlock as v, Teleport as V, createVNode as S, Transition as O, withCtx as y, createElementBlock as k, normalizeClass as b, createElementVNode as m, withModifiers as _, mergeProps as g, renderSlot as u, createCommentVNode as d, defineAsyncComponent as B, useAttrs as N, computed as h, createTextVNode as T, toDisplayString as F, unref as E } from "vue";
|
|
3
|
+
const z = "--backdrop-present", P = () => {
|
|
4
|
+
document.documentElement.classList.add(z);
|
|
5
|
+
}, H = async () => {
|
|
6
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(z);
|
|
7
|
+
}, K = $({
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { type: Boolean, default: !1 },
|
|
11
|
+
teleportSelector: { type: String, default: "body" },
|
|
12
|
+
beforeClose: {
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14
|
+
type: Function,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
persistent: { type: Boolean, default: !1 },
|
|
18
|
+
noCloseOnEscKey: { type: Boolean, default: !1 },
|
|
19
|
+
transitionName: { type: String, default: "backdrop-anim" },
|
|
20
|
+
backdropClass: { type: [Array, String, Object], default: void 0 },
|
|
21
|
+
backdropContentClass: {
|
|
22
|
+
type: [Array, String, Object],
|
|
23
|
+
default: void 0
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["open", "before-close", "close", "update:model-value"],
|
|
27
|
+
setup(e, { emit: n }) {
|
|
28
|
+
const s = D(e.modelValue), a = () => {
|
|
29
|
+
i(!1);
|
|
30
|
+
}, i = async (r) => {
|
|
31
|
+
var A;
|
|
32
|
+
r || (n("before-close"), await ((A = e.beforeClose) == null ? void 0 : A.call(e))), s.value = r;
|
|
33
|
+
}, f = () => {
|
|
34
|
+
n("open");
|
|
35
|
+
}, t = () => {
|
|
36
|
+
n("update:model-value", !1), n("close"), p();
|
|
37
|
+
}, l = () => {
|
|
38
|
+
e.persistent || a();
|
|
39
|
+
}, o = (r) => {
|
|
40
|
+
!e.noCloseOnEscKey && r.key === "Escape" && !e.persistent && a();
|
|
41
|
+
}, C = () => {
|
|
42
|
+
P(), document.addEventListener("keyup", o, !1);
|
|
43
|
+
}, p = () => {
|
|
44
|
+
document.removeEventListener("keyup", o), H();
|
|
45
|
+
};
|
|
46
|
+
return L(() => {
|
|
47
|
+
e.modelValue ? C() : p();
|
|
48
|
+
}), w(
|
|
49
|
+
() => e.modelValue,
|
|
50
|
+
(r) => {
|
|
51
|
+
s.value = r, r ? C() : p();
|
|
52
|
+
}
|
|
53
|
+
), {
|
|
54
|
+
onBackdropAnimationEnter: f,
|
|
55
|
+
onBackdropAnimationLeave: t,
|
|
56
|
+
onBackdropClicked: l,
|
|
57
|
+
close: a,
|
|
58
|
+
present: s,
|
|
59
|
+
toggleModal: i,
|
|
60
|
+
onKeyPress: o
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const M = (e, n) => {
|
|
65
|
+
const s = e.__vccOpts || e;
|
|
66
|
+
for (const [a, i] of n)
|
|
67
|
+
s[a] = i;
|
|
68
|
+
return s;
|
|
69
|
+
};
|
|
70
|
+
function W(e, n, s, a, i, f) {
|
|
71
|
+
return c(), v(V, { to: e.teleportSelector }, [
|
|
72
|
+
S(O, {
|
|
73
|
+
appear: "",
|
|
74
|
+
name: e.transitionName,
|
|
75
|
+
onAfterEnter: e.onBackdropAnimationEnter,
|
|
76
|
+
onAfterLeave: e.onBackdropAnimationLeave
|
|
77
|
+
}, {
|
|
78
|
+
default: y(() => [
|
|
79
|
+
e.present ? (c(), k(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
key: 0,
|
|
83
|
+
class: b(["m-backdrop --present", [e.backdropClass]]),
|
|
84
|
+
tabindex: "-1",
|
|
85
|
+
role: "dialog"
|
|
86
|
+
},
|
|
87
|
+
[
|
|
88
|
+
m(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
class: b(["m-backdrop-overlay", { "--disabled": e.persistent }]),
|
|
92
|
+
tabindex: "-1",
|
|
93
|
+
onClick: n[0] || (n[0] = _((...t) => e.onBackdropClicked && e.onBackdropClicked(...t), ["self"]))
|
|
94
|
+
},
|
|
95
|
+
null,
|
|
96
|
+
2
|
|
97
|
+
/* CLASS */
|
|
98
|
+
),
|
|
99
|
+
m(
|
|
100
|
+
"div",
|
|
101
|
+
g({
|
|
102
|
+
class: ["m-backdrop-content", e.backdropContentClass]
|
|
103
|
+
}, e.$attrs, {
|
|
104
|
+
role: "document",
|
|
105
|
+
tabindex: "0"
|
|
106
|
+
}),
|
|
107
|
+
[
|
|
108
|
+
u(e.$slots, "default", { close: e.close })
|
|
109
|
+
],
|
|
110
|
+
16
|
|
111
|
+
/* FULL_PROPS */
|
|
112
|
+
)
|
|
113
|
+
],
|
|
114
|
+
2
|
|
115
|
+
/* CLASS */
|
|
116
|
+
)) : d("v-if", !0)
|
|
117
|
+
]),
|
|
118
|
+
_: 3
|
|
119
|
+
/* FORWARDED */
|
|
120
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
121
|
+
], 8, ["to"]);
|
|
122
|
+
}
|
|
123
|
+
const j = /* @__PURE__ */ M(K, [["render", W]]), I = {
|
|
124
|
+
key: 0,
|
|
125
|
+
class: "maz-my-0 maz-text-xl maz-font-semibold"
|
|
126
|
+
}, q = { class: "m-dialog-content" }, U = {
|
|
127
|
+
key: 0,
|
|
128
|
+
class: "m-dialog-footer"
|
|
129
|
+
}, X = /* @__PURE__ */ $({
|
|
130
|
+
__name: "MazDialog",
|
|
131
|
+
props: {
|
|
132
|
+
/** Modal's title in header */
|
|
133
|
+
title: { type: String, default: void 0 },
|
|
134
|
+
/** Remove the close button in header */
|
|
135
|
+
noClose: { type: Boolean, default: !1 },
|
|
136
|
+
/** Modal's width */
|
|
137
|
+
width: { type: String, default: "500px" },
|
|
138
|
+
/** Modal's max-width */
|
|
139
|
+
maxWidth: { type: String, default: "95vw" },
|
|
140
|
+
/** Modal's max-height */
|
|
141
|
+
maxHeight: { type: String, default: "95vh" },
|
|
142
|
+
/** Modal's content becomes scrollable - warning: a overflow is applied */
|
|
143
|
+
scrollable: { type: Boolean, default: !1 }
|
|
144
|
+
},
|
|
145
|
+
emits: [
|
|
146
|
+
/** Model binding */
|
|
147
|
+
"update:model-value",
|
|
148
|
+
/** Emitted when dialog is closed (after animation) */
|
|
149
|
+
"close",
|
|
150
|
+
/** Emitted when dialog is opened (after animation) */
|
|
151
|
+
"open"
|
|
152
|
+
],
|
|
153
|
+
setup(e) {
|
|
154
|
+
const n = B(() => import("./MazBtn-6905cc39.mjs")), s = B(() => import("./x-mark-35f2f1e7.mjs")), a = N(), i = h(() => ({
|
|
155
|
+
...a,
|
|
156
|
+
class: void 0,
|
|
157
|
+
style: void 0
|
|
158
|
+
})), f = h(() => ({
|
|
159
|
+
class: a.class,
|
|
160
|
+
style: a.style
|
|
161
|
+
}));
|
|
162
|
+
return (t, l) => (c(), v(
|
|
163
|
+
j,
|
|
164
|
+
g(i.value, {
|
|
165
|
+
"transition-name": "modal-anim",
|
|
166
|
+
onClose: l[0] || (l[0] = (o) => t.$emit("close", o)),
|
|
167
|
+
onOpen: l[1] || (l[1] = (o) => t.$emit("open", o)),
|
|
168
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => t.$emit("update:model-value", o))
|
|
169
|
+
}),
|
|
170
|
+
{
|
|
171
|
+
default: y(({ close: o }) => [
|
|
172
|
+
m(
|
|
173
|
+
"div",
|
|
174
|
+
g({
|
|
175
|
+
class: ["m-dialog", { "--scrollable": e.scrollable }],
|
|
176
|
+
style: [{ width: e.width, maxWidth: e.maxWidth, maxHeight: e.maxHeight }]
|
|
177
|
+
}, f.value),
|
|
178
|
+
[
|
|
179
|
+
d(`
|
|
180
|
+
@slot Header slot
|
|
181
|
+
@binding {Function} close close function
|
|
182
|
+
`),
|
|
183
|
+
u(t.$slots, "header", { close: o }, () => [
|
|
184
|
+
m(
|
|
185
|
+
"div",
|
|
186
|
+
{
|
|
187
|
+
class: b(["m-dialog-header", { "--has-title": t.$slots.title || e.title }])
|
|
188
|
+
},
|
|
189
|
+
[
|
|
190
|
+
t.$slots.title || e.title ? (c(), k("h2", I, [
|
|
191
|
+
d(`
|
|
192
|
+
@slot Title slot in the header
|
|
193
|
+
`),
|
|
194
|
+
u(t.$slots, "title", {}, () => [
|
|
195
|
+
T(
|
|
196
|
+
F(e.title),
|
|
197
|
+
1
|
|
198
|
+
/* TEXT */
|
|
199
|
+
)
|
|
200
|
+
], !0)
|
|
201
|
+
])) : d("v-if", !0),
|
|
202
|
+
e.noClose ? d("v-if", !0) : (c(), v(E(n), {
|
|
203
|
+
key: 1,
|
|
204
|
+
class: "m-dialog-closebtn",
|
|
205
|
+
color: "transparent",
|
|
206
|
+
onClick: o
|
|
207
|
+
}, {
|
|
208
|
+
default: y(() => [
|
|
209
|
+
S(E(s), { class: "maz-text-lg" })
|
|
210
|
+
]),
|
|
211
|
+
_: 2
|
|
212
|
+
/* DYNAMIC */
|
|
213
|
+
}, 1032, ["onClick"]))
|
|
214
|
+
],
|
|
215
|
+
2
|
|
216
|
+
/* CLASS */
|
|
217
|
+
)
|
|
218
|
+
], !0),
|
|
219
|
+
m("div", q, [
|
|
220
|
+
d(`
|
|
221
|
+
@slot Default content
|
|
222
|
+
@binding {Function} close close function
|
|
223
|
+
`),
|
|
224
|
+
u(t.$slots, "default", { close: o }, void 0, !0)
|
|
225
|
+
]),
|
|
226
|
+
t.$slots.footer ? (c(), k("div", U, [
|
|
227
|
+
d(`
|
|
228
|
+
@slot Footer slot
|
|
229
|
+
@binding {Function} close close function
|
|
230
|
+
`),
|
|
231
|
+
u(t.$slots, "footer", { close: o }, void 0, !0)
|
|
232
|
+
])) : d("v-if", !0)
|
|
233
|
+
],
|
|
234
|
+
16
|
|
235
|
+
/* FULL_PROPS */
|
|
236
|
+
)
|
|
237
|
+
]),
|
|
238
|
+
_: 3
|
|
239
|
+
/* FORWARDED */
|
|
240
|
+
},
|
|
241
|
+
16
|
|
242
|
+
/* FULL_PROPS */
|
|
243
|
+
));
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
const Q = /* @__PURE__ */ M(X, [["__scopeId", "data-v-085e6d92"]]);
|
|
247
|
+
export {
|
|
248
|
+
Q as M,
|
|
249
|
+
M as _
|
|
250
|
+
};
|