maz-ui 3.31.7-beta.13 → 3.31.7-beta.14
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/MazCarousel.d.ts +5 -0
- package/components/MazCarousel.mjs +1 -1
- package/components/assets/MazCarousel.css +1 -1
- package/components/chunks/{MazBtn-spGsztYS.mjs → MazBtn-KD6OHRo9.mjs} +2 -2
- package/components/chunks/MazCarousel-A825UbFI.mjs +121 -0
- package/components/chunks/{MazSpinner-L2usRZ-4.mjs → MazSpinner-s5aXbEWc.mjs} +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazCarousel.vue.d.ts +5 -0
- package/components/chunks/MazCarousel-0SdA9AUx.mjs +0 -110
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export type Props = {
|
|
2
|
+
/** Do not display the scroll buttons */
|
|
2
3
|
noScrollBtn?: boolean;
|
|
4
|
+
/** Aria label for the previous button */
|
|
3
5
|
ariaLabelPreviousButton?: string;
|
|
6
|
+
/** Aria label for the next button */
|
|
4
7
|
ariaLabelNextButton?: string;
|
|
8
|
+
/** Hide the scrollbar when not active */
|
|
9
|
+
hideScrollbar?: boolean;
|
|
5
10
|
};
|
|
6
11
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
7
12
|
ariaLabelPreviousButton: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-carousel[data-v-
|
|
1
|
+
.m-carousel[data-v-ec2bbebd]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.m-carousel__header[data-v-ec2bbebd]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.m-carousel__header.--has-title[data-v-ec2bbebd]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.m-carousel__header__actions[data-v-ec2bbebd]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.m-carousel__header__actions[data-v-ec2bbebd]>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.m-carousel__items[data-v-ec2bbebd]{z-index:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.m-carousel__items[data-v-ec2bbebd]>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.m-carousel__items[data-v-ec2bbebd]{overflow-y:hidden;padding-top:1rem;padding-bottom:1rem;padding-left:.75rem;scroll-behavior:smooth}.m-carousel__items__spacer[data-v-ec2bbebd]{-webkit-box-flex:0;-ms-flex:0 0 1px;flex:0 0 1px;width:1px;height:1px}.m-carousel__btn.--muted[data-v-ec2bbebd]{color:var(--maz-color-muted);fill:currentColor}.m-carousel :not(.--hide-scrollbar) .m-carousel__items[data-v-ec2bbebd]{overflow-x:auto}.m-carousel.--hide-scrollbar .m-carousel__items[data-v-ec2bbebd]{overflow-x:hidden}.m-carousel.--hide-scrollbar:hover .m-carousel__items[data-v-ec2bbebd],.m-carousel.--hide-scrollbar:focus-within .m-carousel__items[data-v-ec2bbebd],.m-carousel.--hide-scrollbar:active .m-carousel__items[data-v-ec2bbebd],.m-carousel.--hide-scrollbar:focus .m-carousel__items[data-v-ec2bbebd]{overflow-x:auto}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../assets/MazBtn.css";
|
|
2
2
|
import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as S, onBeforeMount as w, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as A, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
|
|
3
|
-
import { _ as D } from "./MazCarousel-
|
|
3
|
+
import { _ as D } from "./MazCarousel-A825UbFI.mjs";
|
|
4
4
|
const P = /* @__PURE__ */ E({
|
|
5
5
|
__name: "MazBtn",
|
|
6
6
|
props: {
|
|
@@ -26,7 +26,7 @@ const P = /* @__PURE__ */ E({
|
|
|
26
26
|
contentClass: { default: void 0 }
|
|
27
27
|
},
|
|
28
28
|
setup(g) {
|
|
29
|
-
const B = h(() => import("./MazSpinner-
|
|
29
|
+
const B = h(() => import("./MazSpinner-s5aXbEWc.mjs")), f = h(() => import("./MazIcon-C329_2BT.mjs")), { href: k, to: I } = R(), p = S(), e = g;
|
|
30
30
|
w(() => {
|
|
31
31
|
e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
32
32
|
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import "../assets/MazCarousel.css";
|
|
2
|
+
import { defineComponent as g, defineAsyncComponent as v, useSlots as N, ref as f, openBlock as a, createElementBlock as r, normalizeClass as c, renderSlot as n, createCommentVNode as i, createVNode as u, unref as d, withCtx as B, createElementVNode as k, pushScopeId as W, popScopeId as x } from "vue";
|
|
3
|
+
const $ = (t) => (W("data-v-ec2bbebd"), t = t(), x(), t), T = { key: 0 }, V = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "m-carousel__header__actions"
|
|
6
|
+
}, w = /* @__PURE__ */ $(() => /* @__PURE__ */ k(
|
|
7
|
+
"div",
|
|
8
|
+
{ class: "m-carousel__items__spacer" },
|
|
9
|
+
null,
|
|
10
|
+
-1
|
|
11
|
+
/* HOISTED */
|
|
12
|
+
)), E = /* @__PURE__ */ g({
|
|
13
|
+
__name: "MazCarousel",
|
|
14
|
+
props: {
|
|
15
|
+
noScrollBtn: { type: Boolean },
|
|
16
|
+
ariaLabelPreviousButton: { default: "Scroll to previous items" },
|
|
17
|
+
ariaLabelNextButton: { default: "Scroll to next items" },
|
|
18
|
+
hideScrollbar: { type: Boolean }
|
|
19
|
+
},
|
|
20
|
+
setup(t) {
|
|
21
|
+
const l = v(() => import("./MazBtn-KD6OHRo9.mjs")), s = v(() => import("./chevron-left-48sF6neb.mjs")), m = v(() => import("./chevron-right-VgbFQPBM.mjs")), p = t, h = N(), b = f(!1), S = f(!1), _ = f(), y = () => !p.noScrollBtn || h.title, C = () => !!h.title, I = () => {
|
|
22
|
+
const e = _.value;
|
|
23
|
+
e == null || e.scrollTo(e.scrollLeft + e.clientWidth, 0);
|
|
24
|
+
}, L = () => {
|
|
25
|
+
const e = _.value;
|
|
26
|
+
e == null || e.scrollTo(e.scrollLeft - e.clientWidth, 0);
|
|
27
|
+
}, z = (e) => {
|
|
28
|
+
const o = e.target;
|
|
29
|
+
if (!o)
|
|
30
|
+
return;
|
|
31
|
+
b.value = o.scrollLeft >= 20;
|
|
32
|
+
const M = o.scrollWidth - o.clientWidth;
|
|
33
|
+
S.value = o.scrollLeft >= M - 20;
|
|
34
|
+
};
|
|
35
|
+
return (e, o) => (a(), r(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
class: c(["m-carousel", {
|
|
39
|
+
"--hide-scrollbar": e.hideScrollbar
|
|
40
|
+
}])
|
|
41
|
+
},
|
|
42
|
+
[
|
|
43
|
+
y() ? (a(), r(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
key: 0,
|
|
47
|
+
class: c(["m-carousel__header", { "--has-title": C() }])
|
|
48
|
+
},
|
|
49
|
+
[
|
|
50
|
+
C() ? (a(), r("div", T, [
|
|
51
|
+
n(e.$slots, "title", {}, void 0, !0)
|
|
52
|
+
])) : i("v-if", !0),
|
|
53
|
+
e.noScrollBtn ? i("v-if", !0) : (a(), r("div", V, [
|
|
54
|
+
u(d(l), {
|
|
55
|
+
color: "transparent",
|
|
56
|
+
class: c(["m-carousel__btn", { "--muted": !b.value }]),
|
|
57
|
+
"no-elevation": "",
|
|
58
|
+
fab: "",
|
|
59
|
+
"aria-label": e.ariaLabelPreviousButton,
|
|
60
|
+
onClick: L
|
|
61
|
+
}, {
|
|
62
|
+
default: B(() => [
|
|
63
|
+
n(e.$slots, "previous-icon", {}, () => [
|
|
64
|
+
u(d(s), { class: "maz-text-lg" })
|
|
65
|
+
], !0)
|
|
66
|
+
]),
|
|
67
|
+
_: 3
|
|
68
|
+
/* FORWARDED */
|
|
69
|
+
}, 8, ["class", "aria-label"]),
|
|
70
|
+
u(d(l), {
|
|
71
|
+
color: "transparent",
|
|
72
|
+
class: c(["m-carousel__btn", { "--muted": S.value }]),
|
|
73
|
+
fab: "",
|
|
74
|
+
"no-elevation": "",
|
|
75
|
+
"aria-label": e.ariaLabelNextButton,
|
|
76
|
+
onClick: I
|
|
77
|
+
}, {
|
|
78
|
+
default: B(() => [
|
|
79
|
+
n(e.$slots, "next-icon", {}, () => [
|
|
80
|
+
u(d(m), { class: "maz-text-lg" })
|
|
81
|
+
], !0)
|
|
82
|
+
]),
|
|
83
|
+
_: 3
|
|
84
|
+
/* FORWARDED */
|
|
85
|
+
}, 8, ["class", "aria-label"])
|
|
86
|
+
]))
|
|
87
|
+
],
|
|
88
|
+
2
|
|
89
|
+
/* CLASS */
|
|
90
|
+
)) : i("v-if", !0),
|
|
91
|
+
k(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
ref_key: "MazCarouselItems",
|
|
95
|
+
ref: _,
|
|
96
|
+
class: "m-carousel__items",
|
|
97
|
+
onScroll: z
|
|
98
|
+
},
|
|
99
|
+
[
|
|
100
|
+
i(" Insert your items "),
|
|
101
|
+
n(e.$slots, "default", {}, void 0, !0),
|
|
102
|
+
w
|
|
103
|
+
],
|
|
104
|
+
544
|
|
105
|
+
/* NEED_HYDRATION, NEED_PATCH */
|
|
106
|
+
)
|
|
107
|
+
],
|
|
108
|
+
2
|
|
109
|
+
/* CLASS */
|
|
110
|
+
));
|
|
111
|
+
}
|
|
112
|
+
}), P = (t, l) => {
|
|
113
|
+
const s = t.__vccOpts || t;
|
|
114
|
+
for (const [m, p] of l)
|
|
115
|
+
s[m] = p;
|
|
116
|
+
return s;
|
|
117
|
+
}, O = /* @__PURE__ */ P(E, [["__scopeId", "data-v-ec2bbebd"]]);
|
|
118
|
+
export {
|
|
119
|
+
O as M,
|
|
120
|
+
P as _
|
|
121
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../assets/MazSpinner.css";
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./MazCarousel-
|
|
3
|
+
import { _ as p } from "./MazCarousel-A825UbFI.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
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" },
|
package/nuxt/index.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export type Props = {
|
|
2
|
+
/** Do not display the scroll buttons */
|
|
2
3
|
noScrollBtn?: boolean;
|
|
4
|
+
/** Aria label for the previous button */
|
|
3
5
|
ariaLabelPreviousButton?: string;
|
|
6
|
+
/** Aria label for the next button */
|
|
4
7
|
ariaLabelNextButton?: string;
|
|
8
|
+
/** Hide the scrollbar when not active */
|
|
9
|
+
hideScrollbar?: boolean;
|
|
5
10
|
};
|
|
6
11
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
7
12
|
ariaLabelPreviousButton: string;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import "../assets/MazCarousel.css";
|
|
2
|
-
import { defineComponent as g, defineAsyncComponent as p, useSlots as x, ref as v, openBlock as a, createElementBlock as r, normalizeClass as f, renderSlot as n, createCommentVNode as c, createVNode as i, unref as u, withCtx as B, createElementVNode as k, pushScopeId as N, popScopeId as W } from "vue";
|
|
3
|
-
const $ = (t) => (N("data-v-2247b7dd"), t = t(), W(), t), T = { class: "m-carousel" }, V = { key: 0 }, w = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "m-carousel__header__actions"
|
|
6
|
-
}, E = /* @__PURE__ */ $(() => /* @__PURE__ */ k(
|
|
7
|
-
"div",
|
|
8
|
-
{ class: "m-carousel__items__spacer" },
|
|
9
|
-
null,
|
|
10
|
-
-1
|
|
11
|
-
/* HOISTED */
|
|
12
|
-
)), P = /* @__PURE__ */ g({
|
|
13
|
-
__name: "MazCarousel",
|
|
14
|
-
props: {
|
|
15
|
-
noScrollBtn: { type: Boolean },
|
|
16
|
-
ariaLabelPreviousButton: { default: "Scroll to previous items" },
|
|
17
|
-
ariaLabelNextButton: { default: "Scroll to next items" }
|
|
18
|
-
},
|
|
19
|
-
setup(t) {
|
|
20
|
-
const s = p(() => import("./MazBtn-spGsztYS.mjs")), l = p(() => import("./chevron-left-48sF6neb.mjs")), d = p(() => import("./chevron-right-VgbFQPBM.mjs")), _ = t, h = x(), S = v(!1), b = v(!1), m = v(), I = () => !_.noScrollBtn || h.title, C = () => !!h.title, L = () => {
|
|
21
|
-
const e = m.value;
|
|
22
|
-
e == null || e.scrollTo(e.scrollLeft + e.clientWidth, 0);
|
|
23
|
-
}, y = () => {
|
|
24
|
-
const e = m.value;
|
|
25
|
-
e == null || e.scrollTo(e.scrollLeft - e.clientWidth, 0);
|
|
26
|
-
}, z = (e) => {
|
|
27
|
-
const o = e.target;
|
|
28
|
-
if (!o)
|
|
29
|
-
return;
|
|
30
|
-
S.value = o.scrollLeft >= 20;
|
|
31
|
-
const M = o.scrollWidth - o.clientWidth;
|
|
32
|
-
b.value = o.scrollLeft >= M - 20;
|
|
33
|
-
};
|
|
34
|
-
return (e, o) => (a(), r("div", T, [
|
|
35
|
-
I() ? (a(), r(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
key: 0,
|
|
39
|
-
class: f(["m-carousel__header", { "--has-title": C() }])
|
|
40
|
-
},
|
|
41
|
-
[
|
|
42
|
-
C() ? (a(), r("div", V, [
|
|
43
|
-
n(e.$slots, "title", {}, void 0, !0)
|
|
44
|
-
])) : c("v-if", !0),
|
|
45
|
-
e.noScrollBtn ? c("v-if", !0) : (a(), r("div", w, [
|
|
46
|
-
i(u(s), {
|
|
47
|
-
color: "transparent",
|
|
48
|
-
class: f(["m-carousel__btn", { "--muted": !S.value }]),
|
|
49
|
-
"no-elevation": "",
|
|
50
|
-
fab: "",
|
|
51
|
-
"aria-label": e.ariaLabelPreviousButton,
|
|
52
|
-
onClick: y
|
|
53
|
-
}, {
|
|
54
|
-
default: B(() => [
|
|
55
|
-
n(e.$slots, "previous-icon", {}, () => [
|
|
56
|
-
i(u(l), { class: "maz-text-lg" })
|
|
57
|
-
], !0)
|
|
58
|
-
]),
|
|
59
|
-
_: 3
|
|
60
|
-
/* FORWARDED */
|
|
61
|
-
}, 8, ["class", "aria-label"]),
|
|
62
|
-
i(u(s), {
|
|
63
|
-
color: "transparent",
|
|
64
|
-
class: f(["m-carousel__btn", { "--muted": b.value }]),
|
|
65
|
-
fab: "",
|
|
66
|
-
"no-elevation": "",
|
|
67
|
-
"aria-label": e.ariaLabelNextButton,
|
|
68
|
-
onClick: L
|
|
69
|
-
}, {
|
|
70
|
-
default: B(() => [
|
|
71
|
-
n(e.$slots, "next-icon", {}, () => [
|
|
72
|
-
i(u(d), { class: "maz-text-lg" })
|
|
73
|
-
], !0)
|
|
74
|
-
]),
|
|
75
|
-
_: 3
|
|
76
|
-
/* FORWARDED */
|
|
77
|
-
}, 8, ["class", "aria-label"])
|
|
78
|
-
]))
|
|
79
|
-
],
|
|
80
|
-
2
|
|
81
|
-
/* CLASS */
|
|
82
|
-
)) : c("v-if", !0),
|
|
83
|
-
k(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
ref_key: "MazCarouselItems",
|
|
87
|
-
ref: m,
|
|
88
|
-
class: "m-carousel__items",
|
|
89
|
-
onScroll: z
|
|
90
|
-
},
|
|
91
|
-
[
|
|
92
|
-
c(" Insert your items "),
|
|
93
|
-
n(e.$slots, "default", {}, void 0, !0),
|
|
94
|
-
E
|
|
95
|
-
],
|
|
96
|
-
544
|
|
97
|
-
/* NEED_HYDRATION, NEED_PATCH */
|
|
98
|
-
)
|
|
99
|
-
]));
|
|
100
|
-
}
|
|
101
|
-
}), A = (t, s) => {
|
|
102
|
-
const l = t.__vccOpts || t;
|
|
103
|
-
for (const [d, _] of s)
|
|
104
|
-
l[d] = _;
|
|
105
|
-
return l;
|
|
106
|
-
}, R = /* @__PURE__ */ A(P, [["__scopeId", "data-v-2247b7dd"]]);
|
|
107
|
-
export {
|
|
108
|
-
R as M,
|
|
109
|
-
A as _
|
|
110
|
-
};
|