maz-ui 3.31.0 → 3.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/components/MazAccordion.d.ts +2 -2
- package/components/MazAccordion.mjs +1 -1
- package/components/MazDropdown.d.ts +2 -2
- package/components/MazDropdown.mjs +16 -16
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazSelect.d.ts +2 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.d.ts +8 -0
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazAccordion-wRHTLK7X.mjs → MazAccordion-3KSb_aBw.mjs} +37 -37
- package/components/chunks/{MazBtn-bL_VYiL1.mjs → MazBtn-M7Pnxit5.mjs} +2 -2
- package/components/chunks/{MazBtn-A_B9pbiE.mjs → MazBtn-WsXG0JB8.mjs} +2 -2
- package/components/chunks/{MazCheckbox-eI5DclIt.mjs → MazCheckbox-4gr5TnSK.mjs} +1 -1
- package/components/chunks/{MazCheckbox-GE-RvDQj.mjs → MazCheckbox-EadIf3L9.mjs} +1 -1
- package/components/chunks/{MazIcon-icjrWrvA.mjs → MazIcon-002AxbwZ.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-BiFGrTa7.mjs → MazPhoneNumberInput-TdklZIjq.mjs} +155 -159
- package/components/chunks/{MazSelect-nwyPkcJ-.mjs → MazSelect-ABbMoI-M.mjs} +173 -177
- package/components/chunks/{MazSpinner-Q96BIyG0.mjs → MazSpinner-1Sy8XBOO.mjs} +1 -1
- package/components/chunks/{MazSpinner-OKizZUdU.mjs → MazSpinner-B2tSR6e8.mjs} +1 -1
- package/components/chunks/{MazSpinner-LpsGR4tG.mjs → MazSpinner-eGQPU8Yp.mjs} +1 -1
- package/components/chunks/{MazSpinner-kv0RbQpi.mjs → MazSpinner-liomP-Gb.mjs} +1 -1
- package/components/chunks/{MazTable-rnu9lv5r.mjs → MazTable-4_j2qksi.mjs} +611 -610
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +2 -2
- package/nuxt/types.d.mts +2 -2
- package/package.json +4 -4
- package/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
- package/types/components/MazAccordion.vue.d.ts +2 -2
- package/types/components/MazDropdown.vue.d.ts +2 -2
- package/types/components/MazSelect.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +8 -0
- package/types/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
package/README.md
CHANGED
|
@@ -8,26 +8,26 @@
|
|
|
8
8
|
[](https://www.npmjs.com/package/maz-ui)
|
|
9
9
|
[](https://npm-stat.com/charts.html?package=maz-ui)
|
|
10
10
|
|
|
11
|
-
[](https://bundlephobia.com/package/maz-ui)
|
|
11
|
+
<!-- [](https://bundlephobia.com/package/maz-ui)
|
|
12
12
|
[](https://bundlephobia.com/package/maz-ui)
|
|
13
13
|
[](https://bundlephobia.com/package/maz-ui)
|
|
14
|
-
[](https://bundlephobia.com/package/maz-ui)
|
|
14
|
+
[](https://bundlephobia.com/package/maz-ui) -->
|
|
15
15
|
|
|
16
16
|
[](https://codeclimate.com/github/LouisMazel/maz-ui/maintainability)
|
|
17
17
|
[](https://codeclimate.com/github/LouisMazel/maz-ui/test_coverage)
|
|
18
18
|

|
|
19
19
|
|
|
20
|
-
> [maz-ui](https://
|
|
20
|
+
> [maz-ui](https://maz-ui.com/) is a standalone components library and tools for [Vue.JS](https://vuejs.org) & [Nuxt.JS](https://nuxtjs.org/) (v3.x)
|
|
21
21
|
|
|
22
22
|
## Documentation & Components
|
|
23
23
|
|
|
24
|
-
[Documentation & Components](https://
|
|
24
|
+
[Documentation & Components](https://maz-ui.com/)
|
|
25
25
|
|
|
26
26
|
## Install
|
|
27
27
|
|
|
28
28
|
### maz-ui
|
|
29
29
|
|
|
30
|
-
[Getting Started](https://
|
|
30
|
+
[Getting Started](https://maz-ui.com/guide/getting-started)
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
npm install maz-ui
|
|
@@ -35,7 +35,7 @@ npm install maz-ui
|
|
|
35
35
|
|
|
36
36
|
### @mazui/cli
|
|
37
37
|
|
|
38
|
-
[Documentation & Commands](https://
|
|
38
|
+
[Documentation & Commands](https://maz-ui.com/guide/cli)
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
npm install @mazui/cli
|
|
@@ -2,7 +2,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
2
2
|
id?: string | undefined;
|
|
3
3
|
modelValue?: number | undefined;
|
|
4
4
|
}>, {
|
|
5
|
-
id:
|
|
5
|
+
id: undefined;
|
|
6
6
|
modelValue: number;
|
|
7
7
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
8
|
"update:model-value": (...args: any[]) => void;
|
|
@@ -10,7 +10,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
10
10
|
id?: string | undefined;
|
|
11
11
|
modelValue?: number | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
id:
|
|
13
|
+
id: undefined;
|
|
14
14
|
modelValue: number;
|
|
15
15
|
}>>> & {
|
|
16
16
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -36,7 +36,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
36
36
|
}>, {
|
|
37
37
|
class: undefined;
|
|
38
38
|
style: undefined;
|
|
39
|
-
id:
|
|
39
|
+
id: undefined;
|
|
40
40
|
trigger: string;
|
|
41
41
|
color: string;
|
|
42
42
|
position: string;
|
|
@@ -70,7 +70,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
70
70
|
}>, {
|
|
71
71
|
class: undefined;
|
|
72
72
|
style: undefined;
|
|
73
|
-
id:
|
|
73
|
+
id: undefined;
|
|
74
74
|
trigger: string;
|
|
75
75
|
color: string;
|
|
76
76
|
position: string;
|
|
@@ -7,20 +7,20 @@ const re = ({
|
|
|
7
7
|
}) => Y(() => c ?? `${n}-${t == null ? void 0 : t.uid}`);
|
|
8
8
|
function ie(n, t) {
|
|
9
9
|
let c;
|
|
10
|
-
return function(...
|
|
10
|
+
return function(...f) {
|
|
11
11
|
clearTimeout(c), c = setTimeout(() => {
|
|
12
|
-
n.apply(this,
|
|
12
|
+
n.apply(this, f);
|
|
13
13
|
}, t);
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touchstart" : "click", F = async (n, t) => {
|
|
17
17
|
V(n);
|
|
18
|
-
const c = t.instance,
|
|
18
|
+
const c = t.instance, f = t.value, s = typeof f == "function";
|
|
19
19
|
if (!s)
|
|
20
20
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
21
|
-
await Z(), n[B] = (
|
|
22
|
-
if ((!n || !n.contains(
|
|
23
|
-
return
|
|
21
|
+
await Z(), n[B] = (p) => {
|
|
22
|
+
if ((!n || !n.contains(p.target)) && f && s)
|
|
23
|
+
return f.call(c, p);
|
|
24
24
|
};
|
|
25
25
|
const g = _();
|
|
26
26
|
document.addEventListener(g, n[B], !1);
|
|
@@ -33,7 +33,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
33
33
|
mounted: F,
|
|
34
34
|
updated: ue,
|
|
35
35
|
unmounted: V
|
|
36
|
-
}, ce = ["id"],
|
|
36
|
+
}, ce = ["id"], fe = ["aria-expanded"], pe = ["id"], me = { class: "button-span" }, ve = ["target", "href"], be = ["onClick"], we = /* @__PURE__ */ x({
|
|
37
37
|
inheritAttrs: !1,
|
|
38
38
|
__name: "MazDropdown",
|
|
39
39
|
props: {
|
|
@@ -41,7 +41,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
41
41
|
class: { default: void 0 },
|
|
42
42
|
items: {},
|
|
43
43
|
open: { type: Boolean },
|
|
44
|
-
id: { default:
|
|
44
|
+
id: { default: void 0 },
|
|
45
45
|
trigger: { default: "both" },
|
|
46
46
|
color: { default: "transparent" },
|
|
47
47
|
position: { default: "bottom left" },
|
|
@@ -63,7 +63,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
63
63
|
"update:open"
|
|
64
64
|
],
|
|
65
65
|
setup(n, { emit: t }) {
|
|
66
|
-
const c = O(() => import("./chunks/MazBtn-C40ojVvW.mjs").then((e) => e.M)),
|
|
66
|
+
const c = O(() => import("./chunks/MazBtn-C40ojVvW.mjs").then((e) => e.M)), f = O(() => import("./chunks/chevron-down-bC0s_0yH.mjs")), s = n, g = t, p = re({
|
|
67
67
|
componentName: "MazDropdown",
|
|
68
68
|
instance: ee(),
|
|
69
69
|
providedId: s.id
|
|
@@ -102,7 +102,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
102
102
|
s.noCloseOnClick === !1 && i(!1);
|
|
103
103
|
}
|
|
104
104
|
function z(e) {
|
|
105
|
-
e.key === "Escape" ? (e.preventDefault(), i(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? W(e) : e.key === "Enter" && typeof a.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${
|
|
105
|
+
e.key === "Escape" ? (e.preventDefault(), i(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? W(e) : e.key === "Enter" && typeof a.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${p.value} .menuitem`)[a.value].click(), w());
|
|
106
106
|
}
|
|
107
107
|
function J(e) {
|
|
108
108
|
["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && r.value === !1 && (e.preventDefault(), i(!0));
|
|
@@ -126,7 +126,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
126
126
|
), (e, l) => {
|
|
127
127
|
const d = oe("RouterLink");
|
|
128
128
|
return T((v(), h("div", {
|
|
129
|
-
id: u(
|
|
129
|
+
id: u(p),
|
|
130
130
|
class: k(["m-dropdown", [s.class]]),
|
|
131
131
|
style: ne(e.style)
|
|
132
132
|
}, [
|
|
@@ -144,7 +144,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
144
144
|
onMouseleave: P
|
|
145
145
|
}, [
|
|
146
146
|
D("span", {
|
|
147
|
-
id: `${u(
|
|
147
|
+
id: `${u(p)}-labelspan`,
|
|
148
148
|
class: "maz-sr-only"
|
|
149
149
|
}, [
|
|
150
150
|
b(e.$slots, "screen-reader-description", {}, () => [
|
|
@@ -154,7 +154,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
154
154
|
/* TEXT */
|
|
155
155
|
)
|
|
156
156
|
])
|
|
157
|
-
], 8,
|
|
157
|
+
], 8, pe),
|
|
158
158
|
y(`
|
|
159
159
|
@slot Custom Element
|
|
160
160
|
@binding {Boolen} is-open close function
|
|
@@ -164,13 +164,13 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
164
164
|
U(u(c), te({
|
|
165
165
|
color: e.color,
|
|
166
166
|
disabled: e.disabled,
|
|
167
|
-
"aria-labelledby": `${u(
|
|
167
|
+
"aria-labelledby": `${u(p)}-labelspan`
|
|
168
168
|
}, e.$attrs, { tabindex: "-1" }), {
|
|
169
169
|
default: A(() => [
|
|
170
170
|
D("span", me, [
|
|
171
171
|
y(" @slot Button text "),
|
|
172
172
|
b(e.$slots, "default"),
|
|
173
|
-
e.noChevron ? y("v-if", !0) : (v(), N(u(
|
|
173
|
+
e.noChevron ? y("v-if", !0) : (v(), N(u(f), {
|
|
174
174
|
key: 0,
|
|
175
175
|
class: k([{ "maz-rotate-180": r.value }, "chevron-icon"])
|
|
176
176
|
}, null, 8, ["class"]))
|
|
@@ -181,7 +181,7 @@ const B = "__vue_click_away__", _ = () => document.ontouchstart === null ? "touc
|
|
|
181
181
|
/* FORWARDED */
|
|
182
182
|
}, 16, ["color", "disabled", "aria-labelledby"])
|
|
183
183
|
])
|
|
184
|
-
], 40,
|
|
184
|
+
], 40, fe),
|
|
185
185
|
U(le, {
|
|
186
186
|
name: "maz-scale-fade",
|
|
187
187
|
persisted: ""
|
|
@@ -53,7 +53,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
53
53
|
optionLabelKey: string;
|
|
54
54
|
optionInputValueKey: string;
|
|
55
55
|
listPosition: string;
|
|
56
|
-
itemHeight:
|
|
56
|
+
itemHeight: undefined;
|
|
57
57
|
maxListHeight: number;
|
|
58
58
|
maxListWidth: undefined;
|
|
59
59
|
size: string;
|
|
@@ -118,7 +118,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
118
118
|
optionLabelKey: string;
|
|
119
119
|
optionInputValueKey: string;
|
|
120
120
|
listPosition: string;
|
|
121
|
-
itemHeight:
|
|
121
|
+
itemHeight: undefined;
|
|
122
122
|
maxListHeight: number;
|
|
123
123
|
maxListWidth: undefined;
|
|
124
124
|
size: string;
|
package/components/MazSelect.mjs
CHANGED
package/components/MazTable.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
39
39
|
* @values `'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'mini'`
|
|
40
40
|
*/
|
|
41
41
|
size?: Size | undefined;
|
|
42
|
+
/** title of the table */
|
|
43
|
+
title?: string | undefined;
|
|
42
44
|
/** headers of the table */
|
|
43
45
|
headers?: Header[] | undefined;
|
|
44
46
|
/** allow sort feature to all columns */
|
|
@@ -107,6 +109,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
107
109
|
tableClass: undefined;
|
|
108
110
|
tableStyle: undefined;
|
|
109
111
|
modelValue: undefined;
|
|
112
|
+
title: undefined;
|
|
110
113
|
size: string;
|
|
111
114
|
rows: undefined;
|
|
112
115
|
searchQuery: undefined;
|
|
@@ -141,6 +144,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
141
144
|
* @values `'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'mini'`
|
|
142
145
|
*/
|
|
143
146
|
size?: Size | undefined;
|
|
147
|
+
/** title of the table */
|
|
148
|
+
title?: string | undefined;
|
|
144
149
|
/** headers of the table */
|
|
145
150
|
headers?: Header[] | undefined;
|
|
146
151
|
/** allow sort feature to all columns */
|
|
@@ -209,6 +214,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
209
214
|
tableClass: undefined;
|
|
210
215
|
tableStyle: undefined;
|
|
211
216
|
modelValue: undefined;
|
|
217
|
+
title: undefined;
|
|
212
218
|
size: string;
|
|
213
219
|
rows: undefined;
|
|
214
220
|
searchQuery: undefined;
|
|
@@ -236,6 +242,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
236
242
|
size: Size;
|
|
237
243
|
color: Color;
|
|
238
244
|
caption: string;
|
|
245
|
+
title: string;
|
|
239
246
|
modelValue: (string | number | boolean)[];
|
|
240
247
|
searchPlaceholder: string;
|
|
241
248
|
searchQuery: string;
|
|
@@ -277,6 +284,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
277
284
|
row: Row;
|
|
278
285
|
value: any;
|
|
279
286
|
}) => any>> & {
|
|
287
|
+
title?(_: {}): any;
|
|
280
288
|
caption?(_: {}): any;
|
|
281
289
|
thead?(_: {}): any;
|
|
282
290
|
header?(_: {
|
package/components/MazTable.mjs
CHANGED