maz-ui 3.40.1 → 3.40.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/components/MazDropdown.d.ts +16 -5
- package/components/MazDropdown.mjs +5 -5
- package/components/MazStepper.mjs +1 -1
- package/components/assets/MazStepper.css +1 -1
- package/components/chunks/MazStepper-BvKEjtJo.mjs +233 -0
- package/components/chunks/{MazTransitionExpand-bxr35omV.mjs → MazTransitionExpand-C6uOt--l.mjs} +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazDropdown.vue.d.ts +16 -5
- package/components/chunks/MazStepper-D4JNpXUs.mjs +0 -236
|
@@ -9,7 +9,7 @@ export type MenuItem = {
|
|
|
9
9
|
target?: string;
|
|
10
10
|
href?: string;
|
|
11
11
|
to?: RouteLocationRaw;
|
|
12
|
-
class?:
|
|
12
|
+
class?: unknown;
|
|
13
13
|
} & Record<string, unknown>;
|
|
14
14
|
export type Props = {
|
|
15
15
|
style?: HTMLAttributes['style'];
|
|
@@ -20,11 +20,19 @@ export type Props = {
|
|
|
20
20
|
open?: boolean;
|
|
21
21
|
/** id of the menu */
|
|
22
22
|
id?: string;
|
|
23
|
-
/** Should open the dropdown on click, hover or both
|
|
23
|
+
/** Should open the dropdown on click, hover or both
|
|
24
|
+
* @default 'both'
|
|
25
|
+
*/
|
|
24
26
|
trigger?: 'click' | 'hover' | 'both';
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Button color
|
|
29
|
+
* @default 'transparent'
|
|
30
|
+
*/
|
|
26
31
|
color?: Color;
|
|
27
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Position of the dropdown
|
|
34
|
+
* @default 'bottom left'
|
|
35
|
+
*/
|
|
28
36
|
position?: Position;
|
|
29
37
|
/** Disable close menu on menuitem clicked */
|
|
30
38
|
noCloseOnClick?: boolean;
|
|
@@ -32,7 +40,10 @@ export type Props = {
|
|
|
32
40
|
disabled?: boolean;
|
|
33
41
|
/** Remove chevron icon in main button */
|
|
34
42
|
noChevron?: boolean;
|
|
35
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Description read by screen reader (accessibility)
|
|
45
|
+
* @default 'Open menu dropdown'
|
|
46
|
+
*/
|
|
36
47
|
screenReaderDescription?: string;
|
|
37
48
|
};
|
|
38
49
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './assets/MazDropdown.css';
|
|
2
|
-
import { getCurrentInstance as Y, computed as Z, nextTick as x, defineComponent as ee, defineAsyncComponent as
|
|
2
|
+
import { getCurrentInstance as Y, computed as Z, nextTick as x, defineComponent as ee, defineAsyncComponent as A, ref as I, watch as L, resolveComponent as oe, withDirectives as T, openBlock as b, createElementBlock as w, unref as d, normalizeClass as y, normalizeStyle as ne, createElementVNode as D, withModifiers as E, renderSlot as f, createTextVNode as $, toDisplayString as M, createCommentVNode as k, createVNode as U, mergeProps as te, withCtx as B, createBlock as N, Transition as le, Fragment as S, renderList as se, vShow as re } from "vue";
|
|
3
3
|
function ae({
|
|
4
4
|
componentName: n,
|
|
5
5
|
providedId: t
|
|
@@ -68,7 +68,7 @@ const de = {
|
|
|
68
68
|
noCloseOnClick: { type: Boolean },
|
|
69
69
|
disabled: { type: Boolean },
|
|
70
70
|
noChevron: { type: Boolean },
|
|
71
|
-
screenReaderDescription: { default: "
|
|
71
|
+
screenReaderDescription: { default: "Open menu dropdown" }
|
|
72
72
|
},
|
|
73
73
|
emits: [
|
|
74
74
|
/**
|
|
@@ -83,7 +83,7 @@ const de = {
|
|
|
83
83
|
"update:open"
|
|
84
84
|
],
|
|
85
85
|
setup(n, { emit: t }) {
|
|
86
|
-
const a =
|
|
86
|
+
const a = A(() => import("./chunks/MazBtn-C1Hevhzu.mjs").then((e) => e.M)), m = A(() => import("./chunks/chevron-down-CzMH-gFW.mjs")), s = n, g = t, p = ae({
|
|
87
87
|
componentName: "MazDropdown",
|
|
88
88
|
providedId: s.id
|
|
89
89
|
}), i = I(s.open), r = I();
|
|
@@ -120,7 +120,7 @@ const de = {
|
|
|
120
120
|
function h() {
|
|
121
121
|
s.noCloseOnClick === !1 && u(!1);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function O(e) {
|
|
124
124
|
e.key === "Escape" ? (e.preventDefault(), u(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? W(e) : e.key === "Enter" && typeof r.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${p.value} .menuitem`)[r.value].click(), h());
|
|
125
125
|
}
|
|
126
126
|
function J(e) {
|
|
@@ -137,7 +137,7 @@ const de = {
|
|
|
137
137
|
return L(
|
|
138
138
|
() => i.value,
|
|
139
139
|
(e) => {
|
|
140
|
-
e ? document.addEventListener("keydown",
|
|
140
|
+
e ? document.addEventListener("keydown", O) : document.removeEventListener("keydown", O), r.value = void 0;
|
|
141
141
|
}
|
|
142
142
|
), L(
|
|
143
143
|
() => s.open,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-stepper__right[data-v-
|
|
1
|
+
.m-stepper__right[data-v-a12addd1]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:.875rem;line-height:1.25rem;color:var(--maz-color-primary)}.m-stepper__header[data-v-a12addd1]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.m-stepper__header[data-v-a12addd1]>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.m-stepper__header[data-v-a12addd1]{border-radius:var(--maz-border-radius);padding:.5rem 1rem;text-align:left;outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.2s;transition-duration:.2s}.m-stepper__header__content[data-v-a12addd1]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:none;flex:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.m-stepper__header[data-v-a12addd1]:not(:disabled):hover{background-color:var(--maz-color-bg-lighter)}.m-stepper__header[data-v-a12addd1]:not(:disabled):focus{background-color:var(--maz-color-bg-lighter)}.m-stepper__header[data-v-a12addd1]:disabled{cursor:not-allowed}.m-stepper__header.--disabled[data-v-a12addd1]{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.m-stepper__header.--disabled:is([class~=dark] *[data-v-a12addd1]){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.m-stepper__header.--is-current-step[data-v-a12addd1]{cursor:default}.m-stepper__header__wrapper[data-v-a12addd1]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.m-stepper__header__wrapper[data-v-a12addd1]>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.m-stepper__header.--success .m-stepper__count__circle[data-v-a12addd1]{--tw-scale-x: 1;--tw-scale-y: 1;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));background-color:var(--maz-color-success)}.m-stepper__header.--success .m-stepper__right[data-v-a12addd1]{color:var(--maz-color-success)}.m-stepper__header.--success svg[data-v-a12addd1]{color:var(--maz-color-success-contrast)}.m-stepper__header.--warning .m-stepper__count__circle[data-v-a12addd1]{--tw-scale-x: 1;--tw-scale-y: 1;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));background-color:var(--maz-color-warning)}.m-stepper__header.--warning .m-stepper__right[data-v-a12addd1]{color:var(--maz-color-warning)}.m-stepper__header.--warning svg[data-v-a12addd1]{color:var(--maz-color-warning-contrast)}.m-stepper__header.--error .m-stepper__count__circle[data-v-a12addd1]{--tw-scale-x: 1;--tw-scale-y: 1;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));background-color:var(--maz-color-danger)}.m-stepper__header.--error .m-stepper__right[data-v-a12addd1]{color:var(--maz-color-danger)}.m-stepper__header.--error svg[data-v-a12addd1]{color:var(--maz-color-danger-contrast)}.m-stepper__title[data-v-a12addd1]{font-size:1.125rem;line-height:1.75rem}.m-stepper__subtitle[data-v-a12addd1]{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;color:var(--maz-color-muted)}.m-stepper__count[data-v-a12addd1]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;height:2rem;width:2rem;-webkit-box-flex:0;-ms-flex:none;flex:none;overflow:hidden;border-radius:9999px;font-size:1.125rem;line-height:1.75rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background-color:var(--1267f4e6);color:var(--a1870a04)}.m-stepper__count__circle[data-v-a12addd1]{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;--tw-scale-x: 0;--tw-scale-y: 0;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-stepper__count svg[data-v-a12addd1]{color:var(--maz-color-success-contrast)}.m-stepper__content[data-v-a12addd1]{margin-left:1.95rem;border-left-width:2px;border-color:transparent;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem}.m-stepper__content__wrapper[data-v-a12addd1]{padding-top:.5rem;padding-bottom:.5rem}.m-stepper__content[data-v-a12addd1]:not(.--no-border){border-color:var(--maz-color-bg-light)}.m-stepper__content:not(.--no-border):is([class~=dark] *[data-v-a12addd1]){border-color:var(--maz-color-bg-lighter)}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import '../assets/MazStepper.css';
|
|
2
|
+
import { defineComponent as J, useCssVars as K, defineAsyncComponent as v, computed as b, useSlots as Q, ref as U, openBlock as a, createElementBlock as c, Fragment as g, renderList as X, normalizeClass as A, createElementVNode as u, createBlock as z, resolveDynamicComponent as P, createCommentVNode as l, renderSlot as m, unref as T, createTextVNode as y, toDisplayString as $, createVNode as Y, withCtx as Z, withDirectives as ee, vShow as te } from "vue";
|
|
3
|
+
const oe = { class: "m-stepper" }, ne = ["disabled", "onClick"], se = { class: "m-stepper__header__wrapper" }, ae = { class: "m-stepper__count --primary" }, le = { class: "m-stepper__count__circle" }, ie = { class: "m-stepper__header__content" }, re = { class: "m-stepper__title" }, ce = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "m-stepper__subtitle"
|
|
6
|
+
}, ue = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "m-stepper__right"
|
|
9
|
+
}, de = { class: "m-stepper__content__wrapper" }, pe = /* @__PURE__ */ J({
|
|
10
|
+
__name: "MazStepper",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: { default: void 0 },
|
|
13
|
+
steps: { default: void 0 },
|
|
14
|
+
color: { default: "primary" },
|
|
15
|
+
disabledNextSteps: { type: Boolean },
|
|
16
|
+
disabledPreviousSteps: { type: Boolean },
|
|
17
|
+
autoValidateSteps: { type: Boolean },
|
|
18
|
+
allStepsOpened: { type: Boolean },
|
|
19
|
+
allStepsValidated: { type: Boolean },
|
|
20
|
+
canCloseSteps: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:model-value"],
|
|
23
|
+
setup(f, { emit: C }) {
|
|
24
|
+
K((t) => ({
|
|
25
|
+
"1267f4e6": R.value,
|
|
26
|
+
a1870a04: q.value
|
|
27
|
+
}));
|
|
28
|
+
const S = v(() => import("./MazIcon-Cxrv3_OK.mjs")), k = v(() => import("./MazTransitionExpand-C6uOt--l.mjs")), I = v(() => import("./check-circle-CtCMBYyp.mjs")), W = v(
|
|
29
|
+
() => import("./exclamation-circle-DzBJ8vGa.mjs")
|
|
30
|
+
), j = v(() => import("./exclamation-triangle-BfZLmRbP.mjs")), n = f, L = C, R = b(() => `var(--maz-color-${n.color})`), q = b(() => `var(--maz-color-${n.color}-contrast)`), E = Q(), h = b(
|
|
31
|
+
() => Object.keys(E).filter((t) => t.startsWith("content-")).length
|
|
32
|
+
), N = U(1), s = b({
|
|
33
|
+
get: () => n.modelValue ?? N.value,
|
|
34
|
+
set: (t) => {
|
|
35
|
+
N.value = t, L("update:model-value", t);
|
|
36
|
+
}
|
|
37
|
+
}), V = (t) => F(t) ? { icon: I, class: "--success" } : O(t) ? { icon: j, class: "--warning" } : B(t) ? { icon: W, class: "--error" } : { class: "--normal" };
|
|
38
|
+
function p(t) {
|
|
39
|
+
var o, e;
|
|
40
|
+
return (e = (o = n.steps) == null ? void 0 : o[t - 1]) == null ? void 0 : e.icon;
|
|
41
|
+
}
|
|
42
|
+
const D = (t, o) => {
|
|
43
|
+
var e, i;
|
|
44
|
+
return (i = (e = n.steps) == null ? void 0 : e[o - 1]) == null ? void 0 : i[t];
|
|
45
|
+
}, w = (t) => {
|
|
46
|
+
s.value === t && n.canCloseSteps ? s.value = 0 : t < 1 ? s.value = 1 : t > h.value ? s.value = h.value : s.value = t;
|
|
47
|
+
}, x = (t, o) => {
|
|
48
|
+
var r, _;
|
|
49
|
+
const e = t === "titleInfo" ? "title-info" : t, i = Object.keys(E).filter((H) => H.startsWith(`${e}-`)).includes(`${e}-${o}`), d = !!((_ = (r = n.steps) == null ? void 0 : r[o - 1]) != null && _[t]);
|
|
50
|
+
return i || d;
|
|
51
|
+
}, F = (t) => {
|
|
52
|
+
var d, r;
|
|
53
|
+
const o = (r = (d = n.steps) == null ? void 0 : d[t - 1]) == null ? void 0 : r.success, e = B(t) || O(t), i = n.autoValidateSteps && t < s.value && !e;
|
|
54
|
+
return o ?? (i || n.allStepsValidated);
|
|
55
|
+
}, M = (t) => {
|
|
56
|
+
var r, _;
|
|
57
|
+
const o = (_ = (r = n.steps) == null ? void 0 : r[t - 1]) == null ? void 0 : _.disabled, e = s.value === t && !n.canCloseSteps, i = n.disabledNextSteps && t > s.value, d = n.disabledPreviousSteps && t < s.value;
|
|
58
|
+
return o ?? (e || i || d || n.allStepsOpened);
|
|
59
|
+
}, B = (t) => {
|
|
60
|
+
var o, e;
|
|
61
|
+
return (e = (o = n.steps) == null ? void 0 : o[t - 1]) == null ? void 0 : e.error;
|
|
62
|
+
}, O = (t) => {
|
|
63
|
+
var o, e;
|
|
64
|
+
return (e = (o = n.steps) == null ? void 0 : o[t - 1]) == null ? void 0 : e.warning;
|
|
65
|
+
}, G = (t) => t === h.value;
|
|
66
|
+
return (t, o) => (a(), c("div", oe, [
|
|
67
|
+
(a(!0), c(
|
|
68
|
+
g,
|
|
69
|
+
null,
|
|
70
|
+
X(h.value, (e) => (a(), c(
|
|
71
|
+
g,
|
|
72
|
+
{ key: e },
|
|
73
|
+
[
|
|
74
|
+
x("title", e) ? (a(), c("button", {
|
|
75
|
+
key: 0,
|
|
76
|
+
type: "button",
|
|
77
|
+
disabled: M(e),
|
|
78
|
+
class: A(["m-stepper__header", [
|
|
79
|
+
{
|
|
80
|
+
"--is-current-step": e === s.value || t.allStepsOpened,
|
|
81
|
+
"--disabled": e !== s.value && !t.allStepsOpened && M(e)
|
|
82
|
+
},
|
|
83
|
+
`${V(e).class}`
|
|
84
|
+
]]),
|
|
85
|
+
onClick: (i) => w(e)
|
|
86
|
+
}, [
|
|
87
|
+
u("div", se, [
|
|
88
|
+
u("span", ae, [
|
|
89
|
+
u("div", le, [
|
|
90
|
+
V(e).icon ? (a(), z(P(V(e).icon), {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "icon maz-text-xl"
|
|
93
|
+
})) : l("v-if", !0)
|
|
94
|
+
]),
|
|
95
|
+
l(`
|
|
96
|
+
@slot icon-\${step} - Replace step number in the circle by an icon for the step
|
|
97
|
+
`),
|
|
98
|
+
m(t.$slots, `icon-${e}`, {}, () => [
|
|
99
|
+
p(e) ? (a(), c(
|
|
100
|
+
g,
|
|
101
|
+
{ key: 0 },
|
|
102
|
+
[
|
|
103
|
+
typeof p(e) == "string" ? (a(), z(T(S), {
|
|
104
|
+
key: 0,
|
|
105
|
+
name: p(e)
|
|
106
|
+
}, null, 8, ["name"])) : p(e) ? (a(), z(P(p(e)), { key: 1 })) : l("v-if", !0)
|
|
107
|
+
],
|
|
108
|
+
64
|
|
109
|
+
/* STABLE_FRAGMENT */
|
|
110
|
+
)) : (a(), c(
|
|
111
|
+
g,
|
|
112
|
+
{ key: 1 },
|
|
113
|
+
[
|
|
114
|
+
y(
|
|
115
|
+
$(e),
|
|
116
|
+
1
|
|
117
|
+
/* TEXT */
|
|
118
|
+
)
|
|
119
|
+
],
|
|
120
|
+
64
|
|
121
|
+
/* STABLE_FRAGMENT */
|
|
122
|
+
))
|
|
123
|
+
], !0)
|
|
124
|
+
]),
|
|
125
|
+
u("div", ie, [
|
|
126
|
+
u("span", re, [
|
|
127
|
+
l(`
|
|
128
|
+
@slot title-\${step} - Title of the step
|
|
129
|
+
`),
|
|
130
|
+
m(t.$slots, `title-${e}`, {}, () => [
|
|
131
|
+
y(
|
|
132
|
+
$(D("title", e)),
|
|
133
|
+
1
|
|
134
|
+
/* TEXT */
|
|
135
|
+
)
|
|
136
|
+
], !0)
|
|
137
|
+
]),
|
|
138
|
+
x("subtitle", e) ? (a(), c("span", ce, [
|
|
139
|
+
l(`
|
|
140
|
+
@slot title-\${step} - Subtitle of the step
|
|
141
|
+
`),
|
|
142
|
+
m(t.$slots, `subtitle-${e}`, {}, () => [
|
|
143
|
+
y(
|
|
144
|
+
$(D("subtitle", e)),
|
|
145
|
+
1
|
|
146
|
+
/* TEXT */
|
|
147
|
+
)
|
|
148
|
+
], !0)
|
|
149
|
+
])) : l("v-if", !0)
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
x("titleInfo", e) ? (a(), c("span", ue, [
|
|
153
|
+
l(`
|
|
154
|
+
@slot title-info-\${step} - Info of the right of the step
|
|
155
|
+
`),
|
|
156
|
+
m(t.$slots, `title-info-${e}`, {}, () => [
|
|
157
|
+
y(
|
|
158
|
+
$(D("titleInfo", e)),
|
|
159
|
+
1
|
|
160
|
+
/* TEXT */
|
|
161
|
+
)
|
|
162
|
+
], !0)
|
|
163
|
+
])) : l("v-if", !0)
|
|
164
|
+
], 10, ne)) : l("v-if", !0),
|
|
165
|
+
u(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
class: A(["m-stepper__content", {
|
|
169
|
+
"--no-border": G(e)
|
|
170
|
+
}])
|
|
171
|
+
},
|
|
172
|
+
[
|
|
173
|
+
Y(
|
|
174
|
+
T(k),
|
|
175
|
+
null,
|
|
176
|
+
{
|
|
177
|
+
default: Z(() => [
|
|
178
|
+
ee(u(
|
|
179
|
+
"div",
|
|
180
|
+
null,
|
|
181
|
+
[
|
|
182
|
+
u("div", de, [
|
|
183
|
+
l(` @slot content-\${step} - Content of the step
|
|
184
|
+
@binding {boolean} validated - If the step is validated
|
|
185
|
+
@binding {boolean} error - If the step has an error
|
|
186
|
+
@binding {boolean} warning - If the step has a warning
|
|
187
|
+
@binding {Function} previous-step - Function to go to the previous step
|
|
188
|
+
@binding {Function} next-step - Function to go to the next step
|
|
189
|
+
`),
|
|
190
|
+
m(t.$slots, `content-${e}`, {
|
|
191
|
+
validated: F(e),
|
|
192
|
+
error: B(e),
|
|
193
|
+
warning: O(e),
|
|
194
|
+
nextStep: () => w(e + 1),
|
|
195
|
+
previousStep: () => w(e - 1)
|
|
196
|
+
}, void 0, !0)
|
|
197
|
+
])
|
|
198
|
+
],
|
|
199
|
+
512
|
|
200
|
+
/* NEED_PATCH */
|
|
201
|
+
), [
|
|
202
|
+
[te, t.allStepsOpened || s.value === e]
|
|
203
|
+
])
|
|
204
|
+
]),
|
|
205
|
+
_: 2
|
|
206
|
+
/* DYNAMIC */
|
|
207
|
+
},
|
|
208
|
+
1024
|
|
209
|
+
/* DYNAMIC_SLOTS */
|
|
210
|
+
)
|
|
211
|
+
],
|
|
212
|
+
2
|
|
213
|
+
/* CLASS */
|
|
214
|
+
)
|
|
215
|
+
],
|
|
216
|
+
64
|
|
217
|
+
/* STABLE_FRAGMENT */
|
|
218
|
+
))),
|
|
219
|
+
128
|
|
220
|
+
/* KEYED_FRAGMENT */
|
|
221
|
+
))
|
|
222
|
+
]));
|
|
223
|
+
}
|
|
224
|
+
}), _e = (f, C) => {
|
|
225
|
+
const S = f.__vccOpts || f;
|
|
226
|
+
for (const [k, I] of C)
|
|
227
|
+
S[k] = I;
|
|
228
|
+
return S;
|
|
229
|
+
}, me = /* @__PURE__ */ _e(pe, [["__scopeId", "data-v-a12addd1"]]);
|
|
230
|
+
export {
|
|
231
|
+
me as M,
|
|
232
|
+
_e as _
|
|
233
|
+
};
|
package/components/chunks/{MazTransitionExpand-bxr35omV.mjs → MazTransitionExpand-C6uOt--l.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/MazTransitionExpand.css';
|
|
2
2
|
import { defineComponent as e, useCssVars as p, openBlock as d, createBlock as h, TransitionGroup as u, withCtx as y, renderSlot as g, nextTick as s } from "vue";
|
|
3
|
-
import { _ as l } from "./MazStepper-
|
|
3
|
+
import { _ as l } from "./MazStepper-BvKEjtJo.mjs";
|
|
4
4
|
const f = /* @__PURE__ */ e({
|
|
5
5
|
__name: "MazTransitionExpand",
|
|
6
6
|
props: {
|
package/nuxt/index.json
CHANGED
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export type MenuItem = {
|
|
|
9
9
|
target?: string;
|
|
10
10
|
href?: string;
|
|
11
11
|
to?: RouteLocationRaw;
|
|
12
|
-
class?:
|
|
12
|
+
class?: unknown;
|
|
13
13
|
} & Record<string, unknown>;
|
|
14
14
|
export type Props = {
|
|
15
15
|
style?: HTMLAttributes['style'];
|
|
@@ -20,11 +20,19 @@ export type Props = {
|
|
|
20
20
|
open?: boolean;
|
|
21
21
|
/** id of the menu */
|
|
22
22
|
id?: string;
|
|
23
|
-
/** Should open the dropdown on click, hover or both
|
|
23
|
+
/** Should open the dropdown on click, hover or both
|
|
24
|
+
* @default 'both'
|
|
25
|
+
*/
|
|
24
26
|
trigger?: 'click' | 'hover' | 'both';
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Button color
|
|
29
|
+
* @default 'transparent'
|
|
30
|
+
*/
|
|
26
31
|
color?: Color;
|
|
27
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Position of the dropdown
|
|
34
|
+
* @default 'bottom left'
|
|
35
|
+
*/
|
|
28
36
|
position?: Position;
|
|
29
37
|
/** Disable close menu on menuitem clicked */
|
|
30
38
|
noCloseOnClick?: boolean;
|
|
@@ -32,7 +40,10 @@ export type Props = {
|
|
|
32
40
|
disabled?: boolean;
|
|
33
41
|
/** Remove chevron icon in main button */
|
|
34
42
|
noChevron?: boolean;
|
|
35
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Description read by screen reader (accessibility)
|
|
45
|
+
* @default 'Open menu dropdown'
|
|
46
|
+
*/
|
|
36
47
|
screenReaderDescription?: string;
|
|
37
48
|
};
|
|
38
49
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import '../assets/MazStepper.css';
|
|
2
|
-
import { defineComponent as G, useCssVars as H, defineAsyncComponent as h, computed as b, useSlots as J, ref as K, resolveComponent as Q, openBlock as l, createElementBlock as c, Fragment as g, renderList as U, normalizeClass as A, createElementVNode as u, createBlock as O, resolveDynamicComponent as P, createCommentVNode as r, renderSlot as v, createTextVNode as y, toDisplayString as $, createVNode as X, unref as Y, withCtx as Z, withDirectives as ee, vShow as te } from "vue";
|
|
3
|
-
const oe = { class: "m-stepper" }, ne = ["disabled", "onClick"], se = { class: "m-stepper__header__wrapper" }, ae = { class: "m-stepper__count --primary" }, le = { class: "m-stepper__count__circle" }, re = { class: "m-stepper__header__content" }, ie = { class: "m-stepper__title" }, ce = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-stepper__subtitle"
|
|
6
|
-
}, ue = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "m-stepper__right"
|
|
9
|
-
}, de = { class: "m-stepper__content__wrapper" }, pe = /* @__PURE__ */ G({
|
|
10
|
-
__name: "MazStepper",
|
|
11
|
-
props: {
|
|
12
|
-
modelValue: { default: void 0 },
|
|
13
|
-
steps: { default: void 0 },
|
|
14
|
-
color: { default: "primary" },
|
|
15
|
-
disabledNextSteps: { type: Boolean },
|
|
16
|
-
disabledPreviousSteps: { type: Boolean },
|
|
17
|
-
autoValidateSteps: { type: Boolean },
|
|
18
|
-
allStepsOpened: { type: Boolean },
|
|
19
|
-
allStepsValidated: { type: Boolean },
|
|
20
|
-
canCloseSteps: { type: Boolean }
|
|
21
|
-
},
|
|
22
|
-
emits: ["update:model-value"],
|
|
23
|
-
setup(m, { emit: C }) {
|
|
24
|
-
H((e) => ({
|
|
25
|
-
c426040e: j.value,
|
|
26
|
-
"6da38b51": L.value
|
|
27
|
-
}));
|
|
28
|
-
const f = h(() => import("./MazTransitionExpand-bxr35omV.mjs")), k = h(() => import("./check-circle-CtCMBYyp.mjs")), I = h(
|
|
29
|
-
() => import("./exclamation-circle-DzBJ8vGa.mjs")
|
|
30
|
-
), T = h(() => import("./exclamation-triangle-BfZLmRbP.mjs")), s = m, W = C, j = b(() => `var(--maz-color-${s.color})`), L = b(() => `var(--maz-color-${s.color}-contrast)`), E = J(), S = b(
|
|
31
|
-
() => Object.keys(E).filter((e) => e.startsWith("content-")).length
|
|
32
|
-
), M = K(1), a = b({
|
|
33
|
-
get: () => s.modelValue ?? M.value,
|
|
34
|
-
set: (e) => {
|
|
35
|
-
M.value = e, W("update:model-value", e);
|
|
36
|
-
}
|
|
37
|
-
}), V = (e) => N(e) ? { icon: k, class: "--success" } : z(e) ? { icon: T, class: "--warning" } : B(e) ? { icon: I, class: "--error" } : { class: "--normal" };
|
|
38
|
-
function p(e) {
|
|
39
|
-
var n, o;
|
|
40
|
-
return (o = (n = s.steps) == null ? void 0 : n[e - 1]) == null ? void 0 : o.icon;
|
|
41
|
-
}
|
|
42
|
-
const D = (e, n) => {
|
|
43
|
-
var o, t;
|
|
44
|
-
return (t = (o = s.steps) == null ? void 0 : o[n - 1]) == null ? void 0 : t[e];
|
|
45
|
-
}, w = (e) => {
|
|
46
|
-
a.value === e && s.canCloseSteps ? a.value = 0 : e < 1 ? a.value = 1 : e > S.value ? a.value = S.value : a.value = e;
|
|
47
|
-
}, x = (e, n) => {
|
|
48
|
-
var i, _;
|
|
49
|
-
const o = e === "titleInfo" ? "title-info" : e, t = Object.keys(E).filter((q) => q.startsWith(`${o}-`)).includes(`${o}-${n}`), d = !!((_ = (i = s.steps) == null ? void 0 : i[n - 1]) != null && _[e]);
|
|
50
|
-
return t || d;
|
|
51
|
-
}, N = (e) => {
|
|
52
|
-
var d, i;
|
|
53
|
-
const n = (i = (d = s.steps) == null ? void 0 : d[e - 1]) == null ? void 0 : i.success, o = B(e) || z(e), t = s.autoValidateSteps && e < a.value && !o;
|
|
54
|
-
return n ?? (t || s.allStepsValidated);
|
|
55
|
-
}, F = (e) => {
|
|
56
|
-
var i, _;
|
|
57
|
-
const n = (_ = (i = s.steps) == null ? void 0 : i[e - 1]) == null ? void 0 : _.disabled, o = a.value === e && !s.canCloseSteps, t = s.disabledNextSteps && e > a.value, d = s.disabledPreviousSteps && e < a.value;
|
|
58
|
-
return n ?? (o || t || d || s.allStepsOpened);
|
|
59
|
-
}, B = (e) => {
|
|
60
|
-
var n, o;
|
|
61
|
-
return (o = (n = s.steps) == null ? void 0 : n[e - 1]) == null ? void 0 : o.error;
|
|
62
|
-
}, z = (e) => {
|
|
63
|
-
var n, o;
|
|
64
|
-
return (o = (n = s.steps) == null ? void 0 : n[e - 1]) == null ? void 0 : o.warning;
|
|
65
|
-
}, R = (e) => e === S.value;
|
|
66
|
-
return (e, n) => {
|
|
67
|
-
const o = Q("MazIcon");
|
|
68
|
-
return l(), c("div", oe, [
|
|
69
|
-
(l(!0), c(
|
|
70
|
-
g,
|
|
71
|
-
null,
|
|
72
|
-
U(S.value, (t) => (l(), c(
|
|
73
|
-
g,
|
|
74
|
-
{ key: t },
|
|
75
|
-
[
|
|
76
|
-
x("title", t) ? (l(), c("button", {
|
|
77
|
-
key: 0,
|
|
78
|
-
type: "button",
|
|
79
|
-
disabled: F(t),
|
|
80
|
-
class: A(["m-stepper__header", [
|
|
81
|
-
{
|
|
82
|
-
"--is-current-step": t === a.value || e.allStepsOpened,
|
|
83
|
-
"--disabled": t !== a.value && !e.allStepsOpened && F(t)
|
|
84
|
-
},
|
|
85
|
-
`${V(t).class}`
|
|
86
|
-
]]),
|
|
87
|
-
onClick: (d) => w(t)
|
|
88
|
-
}, [
|
|
89
|
-
u("div", se, [
|
|
90
|
-
u("span", ae, [
|
|
91
|
-
u("div", le, [
|
|
92
|
-
V(t).icon ? (l(), O(P(V(t).icon), {
|
|
93
|
-
key: 0,
|
|
94
|
-
class: "icon maz-text-xl"
|
|
95
|
-
})) : r("v-if", !0)
|
|
96
|
-
]),
|
|
97
|
-
r(`
|
|
98
|
-
@slot icon-\${step} - Replace step number in the circle by an icon for the step
|
|
99
|
-
`),
|
|
100
|
-
v(e.$slots, `icon-${t}`, {}, () => [
|
|
101
|
-
p(t) ? (l(), c(
|
|
102
|
-
g,
|
|
103
|
-
{ key: 0 },
|
|
104
|
-
[
|
|
105
|
-
typeof p(t) == "string" ? (l(), O(o, {
|
|
106
|
-
key: 0,
|
|
107
|
-
name: p(t)
|
|
108
|
-
}, null, 8, ["name"])) : p(t) ? (l(), O(P(p(t)), { key: 1 })) : r("v-if", !0)
|
|
109
|
-
],
|
|
110
|
-
64
|
|
111
|
-
/* STABLE_FRAGMENT */
|
|
112
|
-
)) : (l(), c(
|
|
113
|
-
g,
|
|
114
|
-
{ key: 1 },
|
|
115
|
-
[
|
|
116
|
-
y(
|
|
117
|
-
$(t),
|
|
118
|
-
1
|
|
119
|
-
/* TEXT */
|
|
120
|
-
)
|
|
121
|
-
],
|
|
122
|
-
64
|
|
123
|
-
/* STABLE_FRAGMENT */
|
|
124
|
-
))
|
|
125
|
-
], !0)
|
|
126
|
-
]),
|
|
127
|
-
u("div", re, [
|
|
128
|
-
u("span", ie, [
|
|
129
|
-
r(`
|
|
130
|
-
@slot title-\${step} - Title of the step
|
|
131
|
-
`),
|
|
132
|
-
v(e.$slots, `title-${t}`, {}, () => [
|
|
133
|
-
y(
|
|
134
|
-
$(D("title", t)),
|
|
135
|
-
1
|
|
136
|
-
/* TEXT */
|
|
137
|
-
)
|
|
138
|
-
], !0)
|
|
139
|
-
]),
|
|
140
|
-
x("subtitle", t) ? (l(), c("span", ce, [
|
|
141
|
-
r(`
|
|
142
|
-
@slot title-\${step} - Subtitle of the step
|
|
143
|
-
`),
|
|
144
|
-
v(e.$slots, `subtitle-${t}`, {}, () => [
|
|
145
|
-
y(
|
|
146
|
-
$(D("subtitle", t)),
|
|
147
|
-
1
|
|
148
|
-
/* TEXT */
|
|
149
|
-
)
|
|
150
|
-
], !0)
|
|
151
|
-
])) : r("v-if", !0)
|
|
152
|
-
])
|
|
153
|
-
]),
|
|
154
|
-
x("titleInfo", t) ? (l(), c("span", ue, [
|
|
155
|
-
r(`
|
|
156
|
-
@slot title-info-\${step} - Info of the right of the step
|
|
157
|
-
`),
|
|
158
|
-
v(e.$slots, `title-info-${t}`, {}, () => [
|
|
159
|
-
y(
|
|
160
|
-
$(D("titleInfo", t)),
|
|
161
|
-
1
|
|
162
|
-
/* TEXT */
|
|
163
|
-
)
|
|
164
|
-
], !0)
|
|
165
|
-
])) : r("v-if", !0)
|
|
166
|
-
], 10, ne)) : r("v-if", !0),
|
|
167
|
-
u(
|
|
168
|
-
"div",
|
|
169
|
-
{
|
|
170
|
-
class: A(["m-stepper__content", {
|
|
171
|
-
"--no-border": R(t)
|
|
172
|
-
}])
|
|
173
|
-
},
|
|
174
|
-
[
|
|
175
|
-
X(
|
|
176
|
-
Y(f),
|
|
177
|
-
null,
|
|
178
|
-
{
|
|
179
|
-
default: Z(() => [
|
|
180
|
-
ee(u(
|
|
181
|
-
"div",
|
|
182
|
-
null,
|
|
183
|
-
[
|
|
184
|
-
u("div", de, [
|
|
185
|
-
r(` @slot content-\${step} - Content of the step
|
|
186
|
-
@binding {boolean} validated - If the step is validated
|
|
187
|
-
@binding {boolean} error - If the step has an error
|
|
188
|
-
@binding {boolean} warning - If the step has a warning
|
|
189
|
-
@binding {Function} previous-step - Function to go to the previous step
|
|
190
|
-
@binding {Function} next-step - Function to go to the next step
|
|
191
|
-
`),
|
|
192
|
-
v(e.$slots, `content-${t}`, {
|
|
193
|
-
validated: N(t),
|
|
194
|
-
error: B(t),
|
|
195
|
-
warning: z(t),
|
|
196
|
-
nextStep: () => w(t + 1),
|
|
197
|
-
previousStep: () => w(t - 1)
|
|
198
|
-
}, void 0, !0)
|
|
199
|
-
])
|
|
200
|
-
],
|
|
201
|
-
512
|
|
202
|
-
/* NEED_PATCH */
|
|
203
|
-
), [
|
|
204
|
-
[te, e.allStepsOpened || a.value === t]
|
|
205
|
-
])
|
|
206
|
-
]),
|
|
207
|
-
_: 2
|
|
208
|
-
/* DYNAMIC */
|
|
209
|
-
},
|
|
210
|
-
1024
|
|
211
|
-
/* DYNAMIC_SLOTS */
|
|
212
|
-
)
|
|
213
|
-
],
|
|
214
|
-
2
|
|
215
|
-
/* CLASS */
|
|
216
|
-
)
|
|
217
|
-
],
|
|
218
|
-
64
|
|
219
|
-
/* STABLE_FRAGMENT */
|
|
220
|
-
))),
|
|
221
|
-
128
|
|
222
|
-
/* KEYED_FRAGMENT */
|
|
223
|
-
))
|
|
224
|
-
]);
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
}), _e = (m, C) => {
|
|
228
|
-
const f = m.__vccOpts || m;
|
|
229
|
-
for (const [k, I] of C)
|
|
230
|
-
f[k] = I;
|
|
231
|
-
return f;
|
|
232
|
-
}, me = /* @__PURE__ */ _e(pe, [["__scopeId", "data-v-0ac06ca5"]]);
|
|
233
|
-
export {
|
|
234
|
-
me as M,
|
|
235
|
-
_e as _
|
|
236
|
-
};
|