maz-ui 3.44.4-beta.7 → 3.44.4-beta.9
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/MazBackdrop.d.ts +1 -1
- package/components/MazCheckbox.d.ts +45 -65
- package/components/MazCheckbox.mjs +97 -71
- package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +105 -29
- package/components/MazDropdown.d.ts +4 -4
- package/components/MazDropdown.mjs +1 -12
- package/components/MazDropzone.d.ts +3 -3
- package/components/MazInput.d.ts +3 -3
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.d.ts +17 -67
- package/components/MazInputCode.mjs +109 -93
- package/components/MazInputNumber.d.ts +9 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.d.ts +23 -6
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.d.ts +6 -4
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.d.ts +41 -87
- package/components/MazRadio.mjs +85 -57
- package/components/MazRadioButtons.d.ts +40 -67
- package/components/MazRadioButtons.mjs +157 -122
- package/components/MazReadingProgressBar.mjs +29 -28
- package/components/MazSelect.d.ts +3 -3
- package/components/MazSelect.mjs +1 -1
- package/components/MazSwitch.d.ts +15 -1
- package/components/MazSwitch.mjs +79 -36
- package/components/MazTable.d.ts +6 -34
- package/components/MazTable.mjs +1 -1
- package/components/MazTextarea.d.ts +7 -5
- package/components/MazTextarea.mjs +9 -4
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputCode.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazRadioButtons.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/chunks/{MazBtn-YtY4PeyZ.mjs → MazBtn-BGGyg-rm.mjs} +2 -2
- package/components/chunks/{MazBtn-B6TXxFme.mjs → MazBtn-BPU_AqTZ.mjs} +2 -2
- package/components/chunks/{MazBtn-BURByjBO.mjs → MazBtn-BpA0sObZ.mjs} +2 -2
- package/components/chunks/{MazBtn-DeLJCP2D.mjs → MazBtn-lTOX3L3D.mjs} +2 -2
- package/components/chunks/MazCheckbox-Bn3Dj9NV.mjs +145 -0
- package/components/chunks/MazCheckbox-Dd9Lbwu5.mjs +145 -0
- package/components/chunks/{MazIcon-CwITLbPL.mjs → MazIcon-AqrraC4c.mjs} +1 -1
- package/components/chunks/{MazIcon-x_aGvHlZ.mjs → MazIcon-CACuxev1.mjs} +1 -1
- package/components/chunks/{MazInput-DtXDTEbn.mjs → MazInput-BhKgHfCf.mjs} +2 -2
- package/components/chunks/{MazInputNumber-Bbo6UwHG.mjs → MazInputNumber-F6IVaJOM.mjs} +58 -50
- package/components/chunks/{MazInputPrice-CSft00gJ.mjs → MazInputPrice-B6uSbUfK.mjs} +172 -152
- package/components/chunks/{MazInputTags-CMLyznXG.mjs → MazInputTags-RknxybLY.mjs} +45 -40
- package/components/chunks/{MazPhoneNumberInput-fo2MtuWB.mjs → MazPhoneNumberInput-D12Ibm8u.mjs} +200 -196
- package/components/chunks/{MazPicker-Df-LRtwz.mjs → MazPicker-BI9ZeVKO.mjs} +3 -3
- package/components/chunks/{MazPickerMonthSwitcher-CrrfUDPA.mjs → MazPickerMonthSwitcher-BpZqdD5K.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Dpm1ra_Y.mjs → MazPickerShortcuts-BFYu-DCq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-BIeGuXI7.mjs → MazPickerYearSwitcher-DOixNBLR.mjs} +1 -1
- package/components/chunks/{MazSelect-xBiD7HuJ.mjs → MazSelect-3IfnAYTM.mjs} +187 -183
- package/components/chunks/{MazSpinner-CvucKhXp.mjs → MazSpinner-BjWSi43k.mjs} +1 -1
- package/components/chunks/{MazSpinner-QIX5R4Hk.mjs → MazSpinner-BuoLivqP.mjs} +1 -1
- package/components/chunks/{MazSpinner-BzQ5Fn3J.mjs → MazSpinner-Cfum6OA7.mjs} +1 -1
- package/components/chunks/MazSpinner-D6To61E2.mjs +37 -0
- package/components/chunks/{MazSpinner-Cytz0rab.mjs → MazSpinner-DBxRDGWB.mjs} +1 -1
- package/components/chunks/{MazSpinner-C5MXwcx7.mjs → MazSpinner-DMoNTx6P.mjs} +1 -1
- package/components/chunks/MazSpinner-DSuBq7vR.mjs +37 -0
- package/components/chunks/{MazSpinner-Bj5hXQuh.mjs → MazSpinner-DfLymjp0.mjs} +1 -1
- package/components/chunks/{MazTable-1D7GRSpa.mjs → MazTable-C6u9AHMK.mjs} +694 -664
- package/css/main.css +1 -1
- package/modules/chunks/{MazBtn-D7qEKqya.mjs → MazBtn-CRXv0h6A.mjs} +2 -2
- package/modules/chunks/{MazBtn-BN6jcbJx.cjs → MazBtn-ESi64rk1.cjs} +1 -1
- package/modules/chunks/{MazIcon-2NIMk5qW.mjs → MazIcon-BCJS1Geo.mjs} +1 -1
- package/modules/chunks/{MazIcon-CJO12Sfi.cjs → MazIcon-Cv_9xeNS.cjs} +1 -1
- package/modules/chunks/{MazSpinner-CjKo06vg.cjs → MazSpinner-CexHrCCW.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BsBvhcRd.mjs → MazSpinner-DggGj5LA.mjs} +1 -1
- package/modules/chunks/index--QQ7NnV6.cjs +1 -0
- package/modules/chunks/index-DDzZfuaO.cjs +124 -0
- package/modules/chunks/{index-IH_7hv2n.mjs → index-DLSZ-jVW.mjs} +654 -618
- package/modules/chunks/{index-CLMC2m3A.mjs → index-TsZCzVnS.mjs} +1102 -928
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +44 -43
- package/nuxt/index.d.mts +5 -0
- package/nuxt/index.d.ts +5 -0
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +12 -0
- package/package.json +29 -25
- package/types/components/MazBackdrop.vue.d.ts +1 -1
- package/types/components/MazCheckbox.vue.d.ts +45 -65
- package/types/components/MazDialogPromise/use-maz-dialog-promise.d.ts +105 -29
- package/types/components/MazDropdown.vue.d.ts +4 -4
- package/types/components/MazDropzone.vue.d.ts +3 -3
- package/types/components/MazInput.vue.d.ts +3 -3
- package/types/components/MazInputCode.vue.d.ts +17 -67
- package/types/components/MazInputNumber.vue.d.ts +9 -1
- package/types/components/MazInputPrice.vue.d.ts +23 -6
- package/types/components/MazInputTags.vue.d.ts +6 -4
- package/types/components/MazRadio.vue.d.ts +41 -87
- package/types/components/MazRadioButtons.vue.d.ts +40 -67
- package/types/components/MazSelect.vue.d.ts +3 -3
- package/types/components/MazSwitch.vue.d.ts +15 -1
- package/types/components/MazTable.vue.d.ts +6 -34
- package/types/components/MazTextarea.vue.d.ts +7 -5
- package/types/modules/composables/use-breakpoints.d.ts +1 -1
- package/types/modules/composables/use-form-validator/config.d.ts +7 -0
- package/types/modules/composables/use-form-validator/index.d.ts +15 -38
- package/types/modules/composables/use-form-validator/types.d.ts +45 -26
- package/types/modules/composables/use-form-validator/utils.d.ts +90 -27
- package/types/modules/composables/use-swipe.d.ts +6 -6
- package/types/modules/composables/use-theme-handler.d.ts +2 -2
- package/types/modules/composables/use-timer.d.ts +1 -1
- package/types/modules/composables/use-window-size.d.ts +2 -2
- package/types/modules/helpers/check-availability.d.ts +5 -0
- package/types/modules/helpers/debounce-id.d.ts +6 -0
- package/types/modules/helpers/index.d.ts +1 -0
- package/types/modules/helpers/{throttle-async.d.ts → throttle-id.d.ts} +2 -2
- package/types/modules/helpers/throttle.d.ts +1 -1
- package/components/chunks/MazCheckbox-BMzMZ-_l.mjs +0 -119
- package/components/chunks/MazCheckbox-B_Rx3ZCe.mjs +0 -119
- package/components/chunks/MazSpinner-DDmCKWOx.mjs +0 -37
- package/components/chunks/MazSpinner-DIa-qXiV.mjs +0 -37
- package/modules/chunks/index-7Gl8PhoH.cjs +0 -124
- package/modules/chunks/index-bVxwbrqO.cjs +0 -1
- package/types/modules/helpers/debounce-async.d.ts +0 -6
|
@@ -34,7 +34,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
34
|
onBackdropAnimationLeave: typeof onBackdropAnimationLeave;
|
|
35
35
|
onBackdropClicked: typeof onBackdropClicked;
|
|
36
36
|
close: typeof close;
|
|
37
|
-
present: import("vue").Ref<boolean>;
|
|
37
|
+
present: import("vue").Ref<boolean, boolean>;
|
|
38
38
|
toggleModal: typeof toggleModal;
|
|
39
39
|
onKeyPress: typeof onKeyPress;
|
|
40
40
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
@@ -1,82 +1,62 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import type { Color, Size } from './types';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export interface Props<T = boolean | (string | number)[]> {
|
|
4
|
+
/** Style attribut of the component root element */
|
|
5
5
|
style?: HTMLAttributes['style'];
|
|
6
|
+
/** Class attribut of the component root element */
|
|
6
7
|
class?: HTMLAttributes['class'];
|
|
7
|
-
|
|
8
|
+
/** The model value of the checkbox */
|
|
9
|
+
modelValue?: T;
|
|
10
|
+
/** The id of the checkbox */
|
|
8
11
|
id?: string;
|
|
12
|
+
/** The color of the checkbox */
|
|
9
13
|
color?: Color;
|
|
14
|
+
/** The value of the checkbox when selected */
|
|
10
15
|
value?: string | number | boolean;
|
|
16
|
+
/** The name of the checkbox */
|
|
11
17
|
name?: string;
|
|
18
|
+
/** The size of the checkbox */
|
|
12
19
|
size?: Size;
|
|
20
|
+
/** Text label */
|
|
13
21
|
label?: string;
|
|
22
|
+
/** If the checkbox is disabled */
|
|
14
23
|
disabled?: boolean;
|
|
24
|
+
/** Whether there is an error with the input. */
|
|
25
|
+
error?: boolean;
|
|
26
|
+
/** Whether the input is successful. */
|
|
27
|
+
success?: boolean;
|
|
28
|
+
/** Whether there is a warning with the input. */
|
|
29
|
+
warning?: boolean;
|
|
30
|
+
/** The hint text to display below the input. */
|
|
31
|
+
hint?: string;
|
|
15
32
|
}
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
export type { Color, Size } from './types';
|
|
34
|
+
declare const _default: <T extends boolean | (string | number)[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
35
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
36
|
+
onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
37
|
+
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
38
|
+
onChange?: ((value: T) => any) | undefined;
|
|
39
|
+
"onUpdate:model-value"?: ((value: T) => any) | undefined;
|
|
40
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
41
|
+
onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
42
|
+
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
43
|
+
onChange?: ((value: T) => any) | undefined;
|
|
44
|
+
"onUpdate:model-value"?: ((value: T) => any) | undefined;
|
|
45
|
+
}, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:model-value"> & Props<T>> & import("vue").PublicProps;
|
|
46
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
47
|
+
attrs: any;
|
|
48
|
+
slots: ReturnType<() => {
|
|
49
|
+
default?(_: {
|
|
50
|
+
value: string | number | boolean | undefined;
|
|
51
|
+
}): any;
|
|
52
|
+
}>;
|
|
53
|
+
emit: (((evt: "blur", value: FocusEvent) => void) & ((evt: "change", value: T) => void) & ((evt: "focus", value: FocusEvent) => void) & ((evt: "update:model-value", value: T) => void)) & {};
|
|
54
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}> & {
|
|
57
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
58
|
};
|
|
19
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
20
|
-
style: undefined;
|
|
21
|
-
class: undefined;
|
|
22
|
-
modelValue: undefined;
|
|
23
|
-
label: undefined;
|
|
24
|
-
id: undefined;
|
|
25
|
-
color: string;
|
|
26
|
-
value: undefined;
|
|
27
|
-
name: string;
|
|
28
|
-
size: string;
|
|
29
|
-
disabled: boolean;
|
|
30
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
-
change: (...args: any[]) => void;
|
|
32
|
-
"update:model-value": (...args: any[]) => void;
|
|
33
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
34
|
-
style: undefined;
|
|
35
|
-
class: undefined;
|
|
36
|
-
modelValue: undefined;
|
|
37
|
-
label: undefined;
|
|
38
|
-
id: undefined;
|
|
39
|
-
color: string;
|
|
40
|
-
value: undefined;
|
|
41
|
-
name: string;
|
|
42
|
-
size: string;
|
|
43
|
-
disabled: boolean;
|
|
44
|
-
}>>> & {
|
|
45
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
46
|
-
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
47
|
-
}, {
|
|
48
|
-
size: Size;
|
|
49
|
-
label: string;
|
|
50
|
-
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
51
|
-
name: string;
|
|
52
|
-
id: string;
|
|
53
|
-
value: string | number | boolean;
|
|
54
|
-
disabled: boolean;
|
|
55
|
-
color: Color;
|
|
56
|
-
class: HTMLAttributes["class"];
|
|
57
|
-
modelValue: boolean | (string | number)[];
|
|
58
|
-
}, {}>;
|
|
59
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
60
59
|
export default _default;
|
|
61
|
-
type __VLS_WithDefaults<P, D> = {
|
|
62
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
63
|
-
default: D[K];
|
|
64
|
-
}> : P[K];
|
|
65
|
-
};
|
|
66
60
|
type __VLS_Prettify<T> = {
|
|
67
61
|
[K in keyof T]: T[K];
|
|
68
62
|
} & {};
|
|
69
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
70
|
-
new (): {
|
|
71
|
-
$slots: S;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
75
|
-
type __VLS_TypePropsToOption<T> = {
|
|
76
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
77
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
78
|
-
} : {
|
|
79
|
-
type: import('vue').PropType<T[K]>;
|
|
80
|
-
required: true;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import './assets/MazCheckbox.css';function
|
|
3
|
-
componentName:
|
|
4
|
-
providedId:
|
|
1
|
+
import { getCurrentInstance as I, computed as n, openBlock as f, createElementBlock as h, createElementVNode as c, defineComponent as S, useCssVars as N, ref as E, unref as i, normalizeClass as m, normalizeStyle as $, mergeProps as A, createVNode as M, renderSlot as D, createTextVNode as R, toDisplayString as k, createCommentVNode as j } from "vue";
|
|
2
|
+
import './assets/MazCheckbox.css';function q({
|
|
3
|
+
componentName: r,
|
|
4
|
+
providedId: t
|
|
5
5
|
}) {
|
|
6
|
-
const e =
|
|
7
|
-
return
|
|
6
|
+
const e = I();
|
|
7
|
+
return n(() => t ?? `${r}-${e == null ? void 0 : e.uid}`);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const F = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
11
|
width: "1em",
|
|
12
12
|
height: "1em",
|
|
13
13
|
fill: "none",
|
|
14
14
|
viewBox: "0 0 24 24"
|
|
15
|
-
},
|
|
15
|
+
}, H = /* @__PURE__ */ c(
|
|
16
16
|
"path",
|
|
17
17
|
{
|
|
18
18
|
stroke: "currentColor",
|
|
@@ -24,46 +24,45 @@ const D = {
|
|
|
24
24
|
null,
|
|
25
25
|
-1
|
|
26
26
|
/* HOISTED */
|
|
27
|
-
),
|
|
28
|
-
|
|
27
|
+
), K = [
|
|
28
|
+
H
|
|
29
29
|
];
|
|
30
|
-
function
|
|
31
|
-
return
|
|
30
|
+
function O(r, t) {
|
|
31
|
+
return f(), h("svg", F, [...K]);
|
|
32
32
|
}
|
|
33
|
-
const
|
|
33
|
+
const P = { render: O }, T = ["for", "aria-checked"], U = ["id", "checked", "disabled", "name"], G = { class: "m-checkbox__text" }, J = /* @__PURE__ */ S({
|
|
34
34
|
inheritAttrs: !1,
|
|
35
35
|
__name: "MazCheckbox",
|
|
36
36
|
props: {
|
|
37
37
|
style: { default: void 0 },
|
|
38
38
|
class: { default: void 0 },
|
|
39
|
-
modelValue: {
|
|
39
|
+
modelValue: { default: void 0 },
|
|
40
40
|
id: { default: void 0 },
|
|
41
41
|
color: { default: "primary" },
|
|
42
42
|
value: { type: [String, Number, Boolean], default: void 0 },
|
|
43
43
|
name: { default: "m-checkbox" },
|
|
44
44
|
size: { default: "md" },
|
|
45
45
|
label: { default: void 0 },
|
|
46
|
-
disabled: { type: Boolean, default: !1 }
|
|
46
|
+
disabled: { type: Boolean, default: !1 },
|
|
47
|
+
error: { type: Boolean },
|
|
48
|
+
success: { type: Boolean },
|
|
49
|
+
warning: { type: Boolean },
|
|
50
|
+
hint: {}
|
|
47
51
|
},
|
|
48
|
-
emits: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
C((o) => ({
|
|
56
|
-
"30ad0e00": v.value,
|
|
57
|
-
"46bd1cbc": k.value,
|
|
58
|
-
"7c7c6907": y.value,
|
|
59
|
-
"47a52c6c": V.value
|
|
52
|
+
emits: ["update:model-value", "change", "blur", "focus"],
|
|
53
|
+
setup(r, { emit: t }) {
|
|
54
|
+
N((o) => ({
|
|
55
|
+
"2fc45926": z.value,
|
|
56
|
+
"5b22a362": y.value,
|
|
57
|
+
"09741efa": w.value,
|
|
58
|
+
"087c113d": V.value
|
|
60
59
|
}));
|
|
61
|
-
const e =
|
|
60
|
+
const e = r, l = t, s = q({
|
|
62
61
|
componentName: "MazCheckbox",
|
|
63
62
|
providedId: e.id
|
|
64
|
-
}),
|
|
63
|
+
}), p = n(
|
|
65
64
|
() => typeof e.value != "boolean" && Array.isArray(e.modelValue) ? e.modelValue.includes(e.value) : typeof e.modelValue == "boolean" ? e.modelValue : !1
|
|
66
|
-
),
|
|
65
|
+
), y = n(() => {
|
|
67
66
|
switch (e.size) {
|
|
68
67
|
case "xl":
|
|
69
68
|
return "2.25rem";
|
|
@@ -78,7 +77,7 @@ const H = { render: q }, K = ["for", "aria-checked"], O = ["id", "checked", "dis
|
|
|
78
77
|
default:
|
|
79
78
|
return "1.625rem";
|
|
80
79
|
}
|
|
81
|
-
}),
|
|
80
|
+
}), g = n(() => {
|
|
82
81
|
switch (e.size) {
|
|
83
82
|
case "xl":
|
|
84
83
|
return "maz-text-2xl";
|
|
@@ -93,61 +92,88 @@ const H = { render: q }, K = ["for", "aria-checked"], O = ["id", "checked", "dis
|
|
|
93
92
|
default:
|
|
94
93
|
return "maz-text-lg";
|
|
95
94
|
}
|
|
96
|
-
}),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
function z(o) {
|
|
100
|
-
["Space"].includes(o.code) && (o.preventDefault(), m(e.value ?? !e.modelValue));
|
|
95
|
+
}), z = n(() => `var(--maz-color-${e.color}-contrast)`), w = n(() => `var(--maz-color-${e.color})`), V = n(() => e.error ? "var(--maz-color-danger)" : e.warning ? "var(--maz-color-warning)" : e.success ? "var(--maz-color-success)" : ["black", "transparent"].includes(e.color) ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-alpha)`);
|
|
96
|
+
function x(o) {
|
|
97
|
+
["Space"].includes(o.code) && (o.preventDefault(), b(e.value ?? !e.modelValue));
|
|
101
98
|
}
|
|
102
|
-
function
|
|
103
|
-
return typeof o == "boolean" && (typeof e.modelValue == "boolean" || e.modelValue === void 0 || e.modelValue === null) ? !e.modelValue : Array.isArray(e.modelValue) && typeof o != "boolean" ? e.modelValue.includes(o) ? e.modelValue.filter((
|
|
99
|
+
function C(o) {
|
|
100
|
+
return typeof o == "boolean" && (typeof e.modelValue == "boolean" || e.modelValue === void 0 || e.modelValue === null) ? !e.modelValue : Array.isArray(e.modelValue) && typeof o != "boolean" ? e.modelValue.includes(o) ? e.modelValue.filter((a) => a !== o) : [...e.modelValue, o] : [o];
|
|
104
101
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
107
|
-
|
|
102
|
+
function b(o) {
|
|
103
|
+
const a = C(o);
|
|
104
|
+
l("update:model-value", a), l("change", a);
|
|
108
105
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
const u = E();
|
|
107
|
+
function _(o) {
|
|
108
|
+
var a;
|
|
109
|
+
(a = u.value) == null || a.dispatchEvent(new Event("blur")), l("blur", o);
|
|
110
|
+
}
|
|
111
|
+
function B(o) {
|
|
112
|
+
var a;
|
|
113
|
+
(a = u.value) == null || a.dispatchEvent(new Event("focus")), l("focus", o);
|
|
114
|
+
}
|
|
115
|
+
return (o, a) => (f(), h("label", {
|
|
116
|
+
for: i(s),
|
|
117
|
+
class: m(["m-checkbox", [{ "--disabled": o.disabled, "--error": o.error, "--warning": o.warning, "--success": o.success }, e.class]]),
|
|
112
118
|
tabindex: "0",
|
|
113
|
-
style:
|
|
119
|
+
style: $(o.style),
|
|
114
120
|
role: "checkbox",
|
|
115
|
-
"aria-checked":
|
|
116
|
-
onKeydown:
|
|
121
|
+
"aria-checked": p.value,
|
|
122
|
+
onKeydown: x,
|
|
123
|
+
onBlur: _,
|
|
124
|
+
onFocus: B
|
|
117
125
|
}, [
|
|
118
|
-
|
|
119
|
-
id:
|
|
120
|
-
|
|
126
|
+
c("input", A({
|
|
127
|
+
id: i(s),
|
|
128
|
+
ref_key: "inputRef",
|
|
129
|
+
ref: u,
|
|
130
|
+
checked: p.value
|
|
121
131
|
}, o.$attrs, {
|
|
122
132
|
tabindex: "-1",
|
|
123
133
|
disabled: o.disabled,
|
|
124
134
|
name: o.name,
|
|
125
135
|
type: "checkbox",
|
|
126
|
-
onChange:
|
|
127
|
-
var
|
|
128
|
-
return
|
|
136
|
+
onChange: a[0] || (a[0] = (d) => {
|
|
137
|
+
var v;
|
|
138
|
+
return b(o.value ?? ((v = d == null ? void 0 : d.target) == null ? void 0 : v.checked));
|
|
129
139
|
})
|
|
130
|
-
}), null, 16,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
class:
|
|
140
|
+
}), null, 16, U),
|
|
141
|
+
c("span", null, [
|
|
142
|
+
M(i(P), {
|
|
143
|
+
class: m(["check-icon", g.value])
|
|
134
144
|
}, null, 8, ["class"])
|
|
135
145
|
]),
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
c("div", G, [
|
|
147
|
+
D(o.$slots, "default", { value: o.value }, () => [
|
|
148
|
+
R(
|
|
149
|
+
k(o.label),
|
|
150
|
+
1
|
|
151
|
+
/* TEXT */
|
|
152
|
+
)
|
|
153
|
+
], !0),
|
|
154
|
+
o.hint ? (f(), h(
|
|
155
|
+
"span",
|
|
156
|
+
{
|
|
157
|
+
key: 0,
|
|
158
|
+
class: m(["m-checkbox__hint", {
|
|
159
|
+
"--error": o.error,
|
|
160
|
+
"--success": o.success,
|
|
161
|
+
"--warning": o.warning
|
|
162
|
+
}])
|
|
163
|
+
},
|
|
164
|
+
k(o.hint),
|
|
165
|
+
3
|
|
166
|
+
/* TEXT, CLASS */
|
|
167
|
+
)) : j("v-if", !0)
|
|
168
|
+
])
|
|
169
|
+
], 46, T));
|
|
144
170
|
}
|
|
145
|
-
}),
|
|
146
|
-
const e =
|
|
147
|
-
for (const [
|
|
148
|
-
e[
|
|
171
|
+
}), L = (r, t) => {
|
|
172
|
+
const e = r.__vccOpts || r;
|
|
173
|
+
for (const [l, s] of t)
|
|
174
|
+
e[l] = s;
|
|
149
175
|
return e;
|
|
150
|
-
},
|
|
176
|
+
}, W = /* @__PURE__ */ L(J, [["__scopeId", "data-v-3b3da996"]]);
|
|
151
177
|
export {
|
|
152
|
-
|
|
178
|
+
W as default
|
|
153
179
|
};
|
|
@@ -70,43 +70,114 @@ declare function removeDialogFromState(identifier: string): {
|
|
|
70
70
|
id: string;
|
|
71
71
|
isActive: boolean;
|
|
72
72
|
resolve: (value: unknown) => void;
|
|
73
|
-
reject?: (reason?: unknown) => void;
|
|
73
|
+
reject?: ((reason?: unknown) => void) | undefined;
|
|
74
74
|
}[];
|
|
75
75
|
export declare function useMazDialogPromise(): {
|
|
76
76
|
data: import("vue").Ref<{
|
|
77
|
-
title?: string
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
title?: string
|
|
78
|
+
/**
|
|
79
|
+
* Dialog message
|
|
80
|
+
*/
|
|
81
|
+
| undefined;
|
|
82
|
+
message?: string
|
|
83
|
+
/**
|
|
84
|
+
* Dialog cancel text
|
|
85
|
+
* @default 'Cancel'
|
|
86
|
+
*/
|
|
87
|
+
| undefined;
|
|
88
|
+
cancelText?: string
|
|
89
|
+
/**
|
|
90
|
+
* Dialog cancel button
|
|
91
|
+
*/
|
|
92
|
+
| undefined;
|
|
80
93
|
cancelButton?: false | {
|
|
81
|
-
text?: string;
|
|
82
|
-
block?: boolean;
|
|
83
|
-
color?: Color;
|
|
84
|
-
disabled?: boolean;
|
|
85
|
-
loading?: boolean;
|
|
86
|
-
outline?: boolean;
|
|
87
|
-
rounded?: boolean;
|
|
88
|
-
size?: Size;
|
|
94
|
+
text?: string | undefined;
|
|
95
|
+
block?: boolean | undefined;
|
|
96
|
+
color?: Color | undefined;
|
|
97
|
+
disabled?: boolean | undefined;
|
|
98
|
+
loading?: boolean | undefined;
|
|
99
|
+
outline?: boolean | undefined;
|
|
100
|
+
rounded?: boolean | undefined;
|
|
101
|
+
size?: Size | undefined;
|
|
89
102
|
} | undefined;
|
|
90
|
-
confirmText?: string
|
|
103
|
+
confirmText?: string
|
|
104
|
+
/**
|
|
105
|
+
* Dialog confirm button
|
|
106
|
+
*/
|
|
107
|
+
| undefined;
|
|
91
108
|
confirmButton?: false | {
|
|
92
|
-
text?: string;
|
|
93
|
-
block?: boolean;
|
|
94
|
-
color?: Color;
|
|
95
|
-
disabled?: boolean;
|
|
96
|
-
loading?: boolean;
|
|
97
|
-
outline?: boolean;
|
|
98
|
-
rounded?: boolean;
|
|
99
|
-
size?: Size;
|
|
109
|
+
text?: string | undefined;
|
|
110
|
+
block?: boolean | undefined;
|
|
111
|
+
color?: Color | undefined;
|
|
112
|
+
disabled?: boolean | undefined;
|
|
113
|
+
loading?: boolean | undefined;
|
|
114
|
+
outline?: boolean | undefined;
|
|
115
|
+
rounded?: boolean | undefined;
|
|
116
|
+
size?: Size | undefined;
|
|
100
117
|
} | undefined;
|
|
101
118
|
buttons?: {
|
|
102
119
|
text: string;
|
|
103
|
-
block?: boolean;
|
|
104
|
-
color?: Color;
|
|
105
|
-
disabled?: boolean;
|
|
106
|
-
loading?: boolean;
|
|
107
|
-
outline?: boolean;
|
|
108
|
-
rounded?: boolean;
|
|
109
|
-
size?: Size;
|
|
120
|
+
block?: boolean | undefined;
|
|
121
|
+
color?: Color | undefined;
|
|
122
|
+
disabled?: boolean | undefined;
|
|
123
|
+
loading?: boolean | undefined;
|
|
124
|
+
outline?: boolean | undefined;
|
|
125
|
+
rounded?: boolean | undefined;
|
|
126
|
+
size?: Size | undefined;
|
|
127
|
+
type: "resolve" | "reject";
|
|
128
|
+
response?: unknown;
|
|
129
|
+
}[] | undefined;
|
|
130
|
+
}, DialogData | {
|
|
131
|
+
title?: string
|
|
132
|
+
/**
|
|
133
|
+
* Dialog message
|
|
134
|
+
*/
|
|
135
|
+
| undefined;
|
|
136
|
+
message?: string
|
|
137
|
+
/**
|
|
138
|
+
* Dialog cancel text
|
|
139
|
+
* @default 'Cancel'
|
|
140
|
+
*/
|
|
141
|
+
| undefined;
|
|
142
|
+
cancelText?: string
|
|
143
|
+
/**
|
|
144
|
+
* Dialog cancel button
|
|
145
|
+
*/
|
|
146
|
+
| undefined;
|
|
147
|
+
cancelButton?: false | {
|
|
148
|
+
text?: string | undefined;
|
|
149
|
+
block?: boolean | undefined;
|
|
150
|
+
color?: Color | undefined;
|
|
151
|
+
disabled?: boolean | undefined;
|
|
152
|
+
loading?: boolean | undefined;
|
|
153
|
+
outline?: boolean | undefined;
|
|
154
|
+
rounded?: boolean | undefined;
|
|
155
|
+
size?: Size | undefined;
|
|
156
|
+
} | undefined;
|
|
157
|
+
confirmText?: string
|
|
158
|
+
/**
|
|
159
|
+
* Dialog confirm button
|
|
160
|
+
*/
|
|
161
|
+
| undefined;
|
|
162
|
+
confirmButton?: false | {
|
|
163
|
+
text?: string | undefined;
|
|
164
|
+
block?: boolean | undefined;
|
|
165
|
+
color?: Color | undefined;
|
|
166
|
+
disabled?: boolean | undefined;
|
|
167
|
+
loading?: boolean | undefined;
|
|
168
|
+
outline?: boolean | undefined;
|
|
169
|
+
rounded?: boolean | undefined;
|
|
170
|
+
size?: Size | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
buttons?: {
|
|
173
|
+
text: string;
|
|
174
|
+
block?: boolean | undefined;
|
|
175
|
+
color?: Color | undefined;
|
|
176
|
+
disabled?: boolean | undefined;
|
|
177
|
+
loading?: boolean | undefined;
|
|
178
|
+
outline?: boolean | undefined;
|
|
179
|
+
rounded?: boolean | undefined;
|
|
180
|
+
size?: Size | undefined;
|
|
110
181
|
type: "resolve" | "reject";
|
|
111
182
|
response?: unknown;
|
|
112
183
|
}[] | undefined;
|
|
@@ -115,7 +186,12 @@ export declare function useMazDialogPromise(): {
|
|
|
115
186
|
id: string;
|
|
116
187
|
isActive: boolean;
|
|
117
188
|
resolve: (value: unknown) => void;
|
|
118
|
-
reject?: (reason?: unknown) => void;
|
|
189
|
+
reject?: ((reason?: unknown) => void) | undefined;
|
|
190
|
+
}[], DialogState[] | {
|
|
191
|
+
id: string;
|
|
192
|
+
isActive: boolean;
|
|
193
|
+
resolve: (value: unknown) => void;
|
|
194
|
+
reject?: ((reason?: unknown) => void) | undefined;
|
|
119
195
|
}[]>;
|
|
120
196
|
showDialogAndWaitChoice: typeof showDialogAndWaitChoice;
|
|
121
197
|
removeDialogFromState: typeof removeDialogFromState;
|
|
@@ -79,8 +79,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
79
79
|
position: string;
|
|
80
80
|
screenReaderDescription: string;
|
|
81
81
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
82
|
-
"menuitem-clicked": (
|
|
83
|
-
"update:open": (
|
|
82
|
+
"menuitem-clicked": (event: Event) => void;
|
|
83
|
+
"update:open": (value: boolean) => void;
|
|
84
84
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
85
85
|
class: undefined;
|
|
86
86
|
style: undefined;
|
|
@@ -91,8 +91,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
91
91
|
position: string;
|
|
92
92
|
screenReaderDescription: string;
|
|
93
93
|
}>>> & {
|
|
94
|
-
"onMenuitem-clicked"?: ((
|
|
95
|
-
"onUpdate:open"?: ((
|
|
94
|
+
"onMenuitem-clicked"?: ((event: Event) => any) | undefined;
|
|
95
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
96
96
|
}, {
|
|
97
97
|
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
98
98
|
id: string;
|
|
@@ -72,18 +72,7 @@ const de = {
|
|
|
72
72
|
noChevron: { type: Boolean },
|
|
73
73
|
screenReaderDescription: { default: "Open menu dropdown" }
|
|
74
74
|
},
|
|
75
|
-
emits: [
|
|
76
|
-
/**
|
|
77
|
-
* emitted when a menu item is clicked
|
|
78
|
-
*/
|
|
79
|
-
"menuitem-clicked",
|
|
80
|
-
/**
|
|
81
|
-
* Triggers when the number changes
|
|
82
|
-
*
|
|
83
|
-
* @property {boolean} open new value
|
|
84
|
-
*/
|
|
85
|
-
"update:open"
|
|
86
|
-
],
|
|
75
|
+
emits: ["menuitem-clicked", "update:open"],
|
|
87
76
|
setup(t, { emit: l }) {
|
|
88
77
|
const n = t, c = l, w = A(() => import("./chunks/MazBtn-BQ7aH6Qe.mjs").then((e) => e.M)), z = A(() => import("./chunks/chevron-down-CzMH-gFW.mjs")), f = ae({
|
|
89
78
|
componentName: "MazDropdown",
|
|
@@ -49,9 +49,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
default: boolean;
|
|
50
50
|
};
|
|
51
51
|
}, {
|
|
52
|
-
ButtonElement: import("vue").Ref<HTMLButtonElement | undefined>;
|
|
53
|
-
dropzoneReady: import("vue").Ref<boolean>;
|
|
54
|
-
dropzoneOptions: import("vue").Ref<MazDropzoneOptions | undefined>;
|
|
52
|
+
ButtonElement: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
53
|
+
dropzoneReady: import("vue").Ref<boolean, boolean>;
|
|
54
|
+
dropzoneOptions: import("vue").Ref<MazDropzoneOptions | undefined, MazDropzoneOptions | undefined>;
|
|
55
55
|
dropzoneStyle: import("vue").ComputedRef<{
|
|
56
56
|
width: string;
|
|
57
57
|
height: string;
|
package/components/MazInput.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Component, type ComponentPublicInstance, type FunctionalComponent, type HTMLAttributes, type SVGAttributes } from 'vue';
|
|
2
2
|
import type { Color, ModelValueSimple, Size } from './types';
|
|
3
|
-
export type { Color, Size, ModelValueSimple } from './types';
|
|
4
3
|
export type Icon = FunctionalComponent<SVGAttributes> | ComponentPublicInstance | Component;
|
|
5
4
|
export interface Props<T = ModelValueSimple> {
|
|
6
5
|
/** The style of the component */
|
|
@@ -81,7 +80,8 @@ export interface Props<T = ModelValueSimple> {
|
|
|
81
80
|
/** The input will be displayed in full width */
|
|
82
81
|
block?: boolean;
|
|
83
82
|
}
|
|
84
|
-
|
|
83
|
+
export type { Color, Size, ModelValueSimple } from './types';
|
|
84
|
+
declare const _default: <T extends ModelValueSimple>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
85
85
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
86
86
|
onFocus?: ((event: Event) => any) | undefined;
|
|
87
87
|
onBlur?: ((event: Event) => any) | undefined;
|
|
@@ -96,7 +96,7 @@ declare const _default: <T extends ModelValueSimple>(__VLS_props: Awaited<typeof
|
|
|
96
96
|
onInput?: ((event: Event) => any) | undefined;
|
|
97
97
|
onClick?: ((event: Event) => any) | undefined;
|
|
98
98
|
"onUpdate:model-value"?: ((value?: T | undefined) => any) | undefined;
|
|
99
|
-
}, never>, "onFocus" | "onBlur" | "onChange" | "onInput" | "onClick" | "onUpdate:model-value"> & Props<T>> &
|
|
99
|
+
}, never>, "onFocus" | "onBlur" | "onChange" | "onInput" | "onClick" | "onUpdate:model-value"> & Props<T>> & import("vue").PublicProps;
|
|
100
100
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
101
101
|
attrs: any;
|
|
102
102
|
slots: ReturnType<() => {
|
package/components/MazInput.mjs
CHANGED