maz-ui 3.46.0 → 3.46.1-beta.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.d.ts +12 -0
- package/components/MazAvatar.mjs +1 -1
- package/components/MazDropdown.d.ts +39 -9
- package/components/MazDropdown.mjs +226 -236
- package/components/MazLink.d.ts +6 -2
- package/components/MazLink.mjs +3 -3
- package/components/MazPicker.d.ts +2 -2
- package/components/MazTable.d.ts +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/chunks/MazAvatar-BXZpFUaZ.mjs +154 -0
- package/components/chunks/MazBtn-qFUqOv5D.mjs +150 -0
- package/components/chunks/{MazLazyImg-BmmDjOiK.mjs → MazLazyImg-D2seDVoC.mjs} +2 -2
- package/components/chunks/MazLink-CJ1canOj.mjs +79 -0
- package/components/chunks/MazSpinner-SgVUnAHk.mjs +37 -0
- package/components/chunks/{MazSpinner-DfHwN_9D.mjs → MazSpinner-gYRmfrSM.mjs} +1 -1
- package/components/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazAvatar.vue.d.ts +12 -0
- package/types/components/MazDropdown.vue.d.ts +39 -9
- package/types/components/MazLink.vue.d.ts +6 -2
- package/types/components/MazPicker.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +1 -1
- package/components/chunks/MazAvatar-DVjTbmNj.mjs +0 -127
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import type { RouteLocationRaw } from 'vue-router';
|
|
2
2
|
import type { Color } from './MazBtn.vue';
|
|
3
|
+
import type { Props as MazLinkProps } from './MazLink.vue';
|
|
3
4
|
import type { Position } from './types';
|
|
4
5
|
import { type HTMLAttributes } from 'vue';
|
|
5
6
|
export type { Color, Position };
|
|
6
|
-
|
|
7
|
+
type ItemBase = Record<string, unknown> & {
|
|
7
8
|
label: string;
|
|
8
|
-
|
|
9
|
+
class?: unknown;
|
|
10
|
+
color?: Color;
|
|
11
|
+
};
|
|
12
|
+
type LinkItem = ItemBase & MazLinkProps & {
|
|
9
13
|
target?: string;
|
|
10
14
|
href?: string;
|
|
11
15
|
to?: RouteLocationRaw;
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
};
|
|
17
|
+
type ActionItem = ItemBase & {
|
|
18
|
+
action?: () => unknown;
|
|
19
|
+
};
|
|
20
|
+
export type MenuItem = (LinkItem & {
|
|
21
|
+
action?: never;
|
|
22
|
+
}) | (ActionItem & {
|
|
23
|
+
href?: never;
|
|
24
|
+
to?: never;
|
|
25
|
+
target?: never;
|
|
26
|
+
});
|
|
14
27
|
export interface Props {
|
|
15
28
|
style?: HTMLAttributes['style'];
|
|
16
29
|
class?: HTMLAttributes['class'];
|
|
@@ -61,13 +74,30 @@ declare function __VLS_template(): {
|
|
|
61
74
|
item: MenuItem;
|
|
62
75
|
}): any;
|
|
63
76
|
"menuitem-label"?(_: {
|
|
64
|
-
item:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
item: Record<string, unknown> & {
|
|
78
|
+
label: string;
|
|
79
|
+
class?: unknown;
|
|
80
|
+
color?: Color;
|
|
81
|
+
} & MazLinkProps & {
|
|
82
|
+
target?: string;
|
|
83
|
+
href?: string;
|
|
84
|
+
to?: RouteLocationRaw;
|
|
85
|
+
} & {
|
|
86
|
+
action?: never;
|
|
87
|
+
};
|
|
68
88
|
}): any;
|
|
69
89
|
"menuitem-label"?(_: {
|
|
70
|
-
item:
|
|
90
|
+
item: Record<string, unknown> & {
|
|
91
|
+
label: string;
|
|
92
|
+
class?: unknown;
|
|
93
|
+
color?: Color;
|
|
94
|
+
} & {
|
|
95
|
+
action?: () => unknown;
|
|
96
|
+
} & {
|
|
97
|
+
href?: never;
|
|
98
|
+
to?: never;
|
|
99
|
+
target?: never;
|
|
100
|
+
};
|
|
71
101
|
}): any;
|
|
72
102
|
};
|
|
73
103
|
refs: {};
|
|
@@ -36,7 +36,10 @@ export interface Props {
|
|
|
36
36
|
underline?: boolean;
|
|
37
37
|
/** Add an underline only on hover */
|
|
38
38
|
underlineOnlyHover?: boolean;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Add an external icon to the link if target is '_blank'
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
40
43
|
autoExternal?: boolean;
|
|
41
44
|
/**
|
|
42
45
|
* The name of the icon or component to display on the left of the text
|
|
@@ -69,11 +72,12 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
|
|
|
69
72
|
to: RouteLocationRaw;
|
|
70
73
|
id: string;
|
|
71
74
|
target: "_blank" | "_self" | "_parent" | "_top" | string;
|
|
75
|
+
underline: boolean;
|
|
72
76
|
download: string;
|
|
73
77
|
rel: string;
|
|
74
78
|
ariaLabel: string;
|
|
75
|
-
underline: boolean;
|
|
76
79
|
underlineOnlyHover: boolean;
|
|
80
|
+
autoExternal: boolean;
|
|
77
81
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
78
82
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
79
83
|
export default _default;
|
|
@@ -93,16 +93,16 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
93
93
|
format: string;
|
|
94
94
|
modelValue: string | Partial<import("./MazPicker/types").RangeValue>;
|
|
95
95
|
open: boolean;
|
|
96
|
+
double: boolean;
|
|
97
|
+
inline: boolean;
|
|
96
98
|
locale: string;
|
|
97
99
|
placeholder: string;
|
|
98
|
-
inline: boolean;
|
|
99
100
|
noUseBrowserLocale: boolean;
|
|
100
101
|
minDate: string;
|
|
101
102
|
maxDate: string;
|
|
102
103
|
disabledWeekly: number[];
|
|
103
104
|
disabledDates: string[];
|
|
104
105
|
firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
105
|
-
double: boolean;
|
|
106
106
|
shortcuts: PickerShortcut[];
|
|
107
107
|
shortcut: string;
|
|
108
108
|
noShortcuts: boolean;
|
|
@@ -164,8 +164,8 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
|
|
|
164
164
|
size: Size;
|
|
165
165
|
color: Color;
|
|
166
166
|
modelValue: (string | boolean | number)[];
|
|
167
|
-
totalPages: number;
|
|
168
167
|
page: number;
|
|
168
|
+
totalPages: number;
|
|
169
169
|
searchPlaceholder: string;
|
|
170
170
|
searchQuery: string;
|
|
171
171
|
captionSide: "top" | "bottom";
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, defineAsyncComponent as m, computed as f, openBlock as i, createBlock as c, resolveDynamicComponent as $, normalizeStyle as v, normalizeClass as k, withCtx as w, createElementVNode as b, unref as y, createCommentVNode as n, renderSlot as u, toDisplayString as g, createElementBlock as C, createVNode as S } from "vue";
|
|
2
|
-
import '../assets/MazAvatar.css';const I = ["tabindex"], L = { class: "m-avatar__initial" }, E = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "m-avatar__caption"
|
|
5
|
-
}, M = /* @__PURE__ */ B({
|
|
6
|
-
__name: "MazAvatar",
|
|
7
|
-
props: {
|
|
8
|
-
src: { default: void 0 },
|
|
9
|
-
caption: { default: void 0 },
|
|
10
|
-
href: { default: void 0 },
|
|
11
|
-
to: { default: void 0 },
|
|
12
|
-
alt: { default: "avatar image" },
|
|
13
|
-
target: { default: "_self" },
|
|
14
|
-
size: { default: void 0 },
|
|
15
|
-
bordered: { type: Boolean },
|
|
16
|
-
clickable: { type: Boolean },
|
|
17
|
-
square: { type: Boolean },
|
|
18
|
-
noElevation: { type: Boolean },
|
|
19
|
-
showCaption: { type: Boolean },
|
|
20
|
-
imageHeightFull: { type: Boolean },
|
|
21
|
-
noLoader: { type: Boolean },
|
|
22
|
-
buttonColor: { default: "info" },
|
|
23
|
-
noClickableIcon: { type: Boolean },
|
|
24
|
-
letterCount: { default: void 0 },
|
|
25
|
-
roundedSize: { default: "full" },
|
|
26
|
-
fallbackSrc: { default: void 0 },
|
|
27
|
-
noPhoto: { type: Boolean }
|
|
28
|
-
},
|
|
29
|
-
emits: ["click", "intersecting", "loading", "loaded", "error"],
|
|
30
|
-
setup(l) {
|
|
31
|
-
const t = l, r = m(() => import("./MazLazyImg-BmmDjOiK.mjs")), s = m(() => import("./pencil-Z-mPplOz.mjs")), d = f(() => t.to ? "RouterLink" : t.href ? "a" : "div"), p = f(() => !!t.to || !!t.href);
|
|
32
|
-
function z(o, e = t.letterCount) {
|
|
33
|
-
return o.split(" ").map((h) => h[0]).join("").slice(0, e);
|
|
34
|
-
}
|
|
35
|
-
return (o, e) => (i(), c($(d.value), {
|
|
36
|
-
style: v({ fontSize: o.size }),
|
|
37
|
-
class: k(["m-avatar", [
|
|
38
|
-
{
|
|
39
|
-
"--has-link": p.value
|
|
40
|
-
}
|
|
41
|
-
]]),
|
|
42
|
-
href: o.href,
|
|
43
|
-
to: o.to,
|
|
44
|
-
target: p.value ? o.target : void 0
|
|
45
|
-
}, {
|
|
46
|
-
default: w(() => [
|
|
47
|
-
b("div", {
|
|
48
|
-
class: k(["m-avatar__wrapper", [
|
|
49
|
-
{
|
|
50
|
-
"--has-shadow": !o.noElevation,
|
|
51
|
-
"--bordered": o.bordered,
|
|
52
|
-
"--clickable": o.clickable,
|
|
53
|
-
"--has-initial": !o.src && o.caption
|
|
54
|
-
},
|
|
55
|
-
`--rounded-${o.square ? "none" : o.roundedSize}`
|
|
56
|
-
]]),
|
|
57
|
-
tabindex: o.clickable ? 0 : -1
|
|
58
|
-
}, [
|
|
59
|
-
o.src || !o.src && !o.caption ? (i(), c(y(r), {
|
|
60
|
-
key: 0,
|
|
61
|
-
class: "m-avatar__picture maz-w-full maz-max-w-full",
|
|
62
|
-
image: o.src,
|
|
63
|
-
alt: o.alt,
|
|
64
|
-
"no-photo": o.noPhoto,
|
|
65
|
-
"image-height-full": "",
|
|
66
|
-
"no-loader": o.noLoader,
|
|
67
|
-
"fallback-src": o.fallbackSrc,
|
|
68
|
-
onClick: e[0] || (e[0] = (a) => o.clickable ? o.$emit("click", a) : null),
|
|
69
|
-
onError: e[1] || (e[1] = (a) => o.$emit("error", a)),
|
|
70
|
-
onLoaded: e[2] || (e[2] = (a) => o.$emit("loaded", a)),
|
|
71
|
-
onLoading: e[3] || (e[3] = (a) => o.$emit("loading", a)),
|
|
72
|
-
onIntersecting: e[4] || (e[4] = (a) => o.$emit("intersecting", a))
|
|
73
|
-
}, null, 8, ["image", "alt", "no-photo", "no-loader", "fallback-src"])) : n("v-if", !0),
|
|
74
|
-
o.caption && !o.src ? u(o.$slots, "round-text", { key: 1 }, () => [
|
|
75
|
-
b(
|
|
76
|
-
"span",
|
|
77
|
-
L,
|
|
78
|
-
g(z(o.caption)),
|
|
79
|
-
1
|
|
80
|
-
/* TEXT */
|
|
81
|
-
)
|
|
82
|
-
], !0) : n("v-if", !0),
|
|
83
|
-
o.clickable ? (i(), C(
|
|
84
|
-
"button",
|
|
85
|
-
{
|
|
86
|
-
key: 2,
|
|
87
|
-
type: "button",
|
|
88
|
-
tabindex: "-1",
|
|
89
|
-
class: "m-avatar__button",
|
|
90
|
-
style: v({
|
|
91
|
-
backgroundColor: o.src ? `var(--maz-color-${o.buttonColor}-alpha)` : `var(--maz-color-${o.buttonColor})`
|
|
92
|
-
}),
|
|
93
|
-
onClick: e[5] || (e[5] = (a) => o.$emit("click", a))
|
|
94
|
-
},
|
|
95
|
-
[
|
|
96
|
-
o.noClickableIcon ? n("v-if", !0) : u(o.$slots, "icon", { key: 0 }, () => [
|
|
97
|
-
S(y(s), { class: "m-avatar__button__icon" })
|
|
98
|
-
], !0)
|
|
99
|
-
],
|
|
100
|
-
4
|
|
101
|
-
/* STYLE */
|
|
102
|
-
)) : n("v-if", !0)
|
|
103
|
-
], 10, I),
|
|
104
|
-
u(o.$slots, "caption", {}, () => [
|
|
105
|
-
o.showCaption && o.caption ? (i(), C(
|
|
106
|
-
"p",
|
|
107
|
-
E,
|
|
108
|
-
g(o.caption),
|
|
109
|
-
1
|
|
110
|
-
/* TEXT */
|
|
111
|
-
)) : n("v-if", !0)
|
|
112
|
-
], !0)
|
|
113
|
-
]),
|
|
114
|
-
_: 3
|
|
115
|
-
/* FORWARDED */
|
|
116
|
-
}, 8, ["style", "class", "href", "to", "target"]));
|
|
117
|
-
}
|
|
118
|
-
}), A = (l, t) => {
|
|
119
|
-
const r = l.__vccOpts || l;
|
|
120
|
-
for (const [s, d] of t)
|
|
121
|
-
r[s] = d;
|
|
122
|
-
return r;
|
|
123
|
-
}, q = /* @__PURE__ */ A(M, [["__scopeId", "data-v-d3a7fd0c"]]);
|
|
124
|
-
export {
|
|
125
|
-
q as M,
|
|
126
|
-
A as _
|
|
127
|
-
};
|