@nmorph/nmorph-ui-kit 3.0.11 → 3.0.13
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/dist/assets/icons/cross.svg.js +1 -1
- package/dist/components/basic/nmorph-button/NmorphButton.vue.js +11 -10
- package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +9 -9
- package/dist/components/feedback/nmorph-guide/NmorphGuide.vue2.js +82 -73
- package/dist/components/feedback/nmorph-guide/NmorphGuideStep.css +1 -1
- package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue.js +22 -23
- package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue2.js +36 -28
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.css +1 -1
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.js +21 -27
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +4 -4
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.css +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/package.json.js +1 -1
- package/dist/src/components/feedback/nmorph-guide/NmorphGuide.vue.d.ts +2 -0
- package/dist/src/components/feedback/nmorph-guide/types.d.ts +5 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import './NmorphButton.css';
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as e, createElementBlock as r, normalizeStyle as
|
|
2
|
+
import d from "./NmorphButton.vue2.js";
|
|
3
|
+
import { openBlock as e, createElementBlock as r, normalizeStyle as s, normalizeClass as c, createElementVNode as m, createBlock as l, withCtx as a, createVNode as p, renderSlot as t, Fragment as h, createCommentVNode as i, toDisplayString as _ } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import f from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const y = ["disabled", "loading", "type", "tabindex", "aria-pressed"], b = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "nmorph-button__label"
|
|
9
|
-
},
|
|
9
|
+
}, g = {
|
|
10
10
|
key: 3,
|
|
11
11
|
class: "nmorph-button__label"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function k(n, N, S, o, I, v) {
|
|
14
14
|
return e(), r(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
class: c(o.modifiers),
|
|
18
|
-
style:
|
|
18
|
+
style: s(o.buttonColorStyles)
|
|
19
19
|
},
|
|
20
20
|
[
|
|
21
21
|
m("button", {
|
|
@@ -30,14 +30,15 @@ function g(n, N, S, o, v, B) {
|
|
|
30
30
|
}, [
|
|
31
31
|
o.props.loading ? (e(), l(o.NmorphIcon, {
|
|
32
32
|
key: 0,
|
|
33
|
-
|
|
33
|
+
width: o.loadingIconSize,
|
|
34
|
+
height: o.loadingIconSize
|
|
34
35
|
}, {
|
|
35
36
|
default: a(() => [
|
|
36
37
|
p(o.NmorphIconLoader)
|
|
37
38
|
]),
|
|
38
39
|
_: 1
|
|
39
40
|
/* STABLE */
|
|
40
|
-
}, 8, ["
|
|
41
|
+
}, 8, ["width", "height"])) : o.hasIconOnlySlot ? (e(), l(o.NmorphIcon, { key: 1 }, {
|
|
41
42
|
default: a(() => [
|
|
42
43
|
t(n.$slots, "icon-only")
|
|
43
44
|
]),
|
|
@@ -59,7 +60,7 @@ function g(n, N, S, o, v, B) {
|
|
|
59
60
|
])) : t(n.$slots, "default", { key: 2 }),
|
|
60
61
|
o.props.text !== void 0 ? (e(), r(
|
|
61
62
|
"span",
|
|
62
|
-
|
|
63
|
+
g,
|
|
63
64
|
_(o.props.text),
|
|
64
65
|
1
|
|
65
66
|
/* TEXT */
|
|
@@ -75,7 +76,7 @@ function g(n, N, S, o, v, B) {
|
|
|
75
76
|
/* CLASS, STYLE */
|
|
76
77
|
);
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
+
const z = /* @__PURE__ */ f(d, [["render", k], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/basic/nmorph-button/NmorphButton.vue"]]);
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
+
z as default
|
|
81
82
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './NmorphButton.css';
|
|
2
|
-
import { defineComponent as N, useSlots as
|
|
2
|
+
import { defineComponent as N, useSlots as x, computed as l, ref as _, Fragment as I, Comment as k, Text as c } from "vue";
|
|
3
3
|
import { useModifiers as O } from "../../../utils/create-modifiers.js";
|
|
4
4
|
import { NmorphComponentThickness as C } from "../../../types/common.types.js";
|
|
5
5
|
import M from "../../../assets/icons/loading.svg.js";
|
|
@@ -30,9 +30,9 @@ const E = /* @__PURE__ */ N({
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:model-value"],
|
|
32
32
|
setup(m, { expose: y, emit: h }) {
|
|
33
|
-
const e = m, n = h, r =
|
|
34
|
-
(o) => o.type ===
|
|
35
|
-
), u = (t) => t.type ===
|
|
33
|
+
const e = m, n = h, r = x(), g = l(() => !!r.icon), i = l(() => !!r["icon-only"]), s = l(() => e.active || !!e.modelValue), a = (t) => t.flatMap(
|
|
34
|
+
(o) => o.type === I && Array.isArray(o.children) ? a(o.children) : o
|
|
35
|
+
), u = (t) => t.type === k || t.type === c && typeof t.children == "string" && t.children.trim() === "", b = () => {
|
|
36
36
|
const t = a(r.default?.() ?? []).filter((o) => !u(o));
|
|
37
37
|
return t.length > 0 && t.every((o) => o.type === c);
|
|
38
38
|
}, v = l(
|
|
@@ -51,10 +51,10 @@ const E = /* @__PURE__ */ N({
|
|
|
51
51
|
e.danger && "danger"
|
|
52
52
|
]
|
|
53
53
|
})
|
|
54
|
-
), d =
|
|
55
|
-
thin: "
|
|
56
|
-
basic: "
|
|
57
|
-
thick: "
|
|
54
|
+
), d = _(null), p = {
|
|
55
|
+
thin: "12px",
|
|
56
|
+
basic: "16px",
|
|
57
|
+
thick: "24px"
|
|
58
58
|
}, q = l(() => p[e.thickness]), B = l(() => e.color ? {
|
|
59
59
|
"--nmorph-private-button-color": e.color,
|
|
60
60
|
"--nmorph-private-button-plain-color": e.color,
|
|
@@ -63,7 +63,7 @@ const E = /* @__PURE__ */ N({
|
|
|
63
63
|
!e.toggle || e.disabled || e.loading || n("update:model-value", !e.modelValue);
|
|
64
64
|
};
|
|
65
65
|
y({ buttonDOMElement: d });
|
|
66
|
-
const f = { props: e, emit: n, slots: r, hasIconSlot: g, hasIconOnlySlot: i, active: s, flattenSlotNodes: a, isEmptySlotNode: u, hasTextOnlyDefaultSlot: b, modifiers: v, buttonDOMElement: d,
|
|
66
|
+
const f = { props: e, emit: n, slots: r, hasIconSlot: g, hasIconOnlySlot: i, active: s, flattenSlotNodes: a, isEmptySlotNode: u, hasTextOnlyDefaultSlot: b, modifiers: v, buttonDOMElement: d, loadingIconSizeMap: p, loadingIconSize: q, buttonColorStyles: B, toggleClickHandler: S, get NmorphIcon() {
|
|
67
67
|
return H;
|
|
68
68
|
}, get NmorphIconLoader() {
|
|
69
69
|
return M;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './NmorphGuide.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useZIndex as
|
|
4
|
-
import { nmorphGuideInjectionKey as
|
|
5
|
-
const
|
|
2
|
+
import { defineComponent as A, ref as N, computed as r, watch as V, provide as W } from "vue";
|
|
3
|
+
import { useZIndex as G } from "../../../hooks/use-z-index.js";
|
|
4
|
+
import { nmorphGuideInjectionKey as K } from "./types.js";
|
|
5
|
+
const L = /* @__PURE__ */ A({
|
|
6
6
|
__name: "NmorphGuide",
|
|
7
7
|
props: {
|
|
8
8
|
modelValue: { type: Boolean, required: !1, default: !1 },
|
|
@@ -13,6 +13,8 @@ const E = /* @__PURE__ */ j({
|
|
|
13
13
|
showClose: { type: Boolean, required: !1, default: !0 },
|
|
14
14
|
showProgress: { type: Boolean, required: !1, default: !0 },
|
|
15
15
|
bordered: { type: Boolean, required: !1, default: !1 },
|
|
16
|
+
targetOutlineColor: { type: null, required: !1, default: "success" },
|
|
17
|
+
targetOutlineOffset: { type: [Number, String], required: !1, default: "var(--indentation-02)" },
|
|
16
18
|
backText: { type: String, required: !1, default: "Back" },
|
|
17
19
|
nextText: { type: String, required: !1, default: "Next" },
|
|
18
20
|
finishText: { type: String, required: !1, default: "Finish" },
|
|
@@ -24,108 +26,115 @@ const E = /* @__PURE__ */ j({
|
|
|
24
26
|
maxWidth: { type: [Number, String], required: !1, default: "280px" }
|
|
25
27
|
},
|
|
26
28
|
emits: ["update:model-value", "update:active-step", "change", "back", "next", "finish", "close"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
+
setup(F, { expose: P, emit: j }) {
|
|
30
|
+
const O = {
|
|
31
|
+
accent: "var(--nmorph-accent-color)",
|
|
32
|
+
success: "var(--nmorph-success-color)",
|
|
33
|
+
error: "var(--nmorph-error-color)",
|
|
34
|
+
warning: "var(--nmorph-warn-color)"
|
|
35
|
+
}, t = F, i = j, u = N({}), m = N(void 0);
|
|
29
36
|
let f = 0;
|
|
30
|
-
const d = (e) => String(e), b =
|
|
37
|
+
const d = (e) => String(e), b = r(() => {
|
|
31
38
|
const e = /* @__PURE__ */ new Map();
|
|
32
|
-
return t.steps.forEach((
|
|
33
|
-
e.set(d(
|
|
34
|
-
...
|
|
35
|
-
order:
|
|
39
|
+
return t.steps.forEach((o, a) => {
|
|
40
|
+
e.set(d(o.name), {
|
|
41
|
+
...o,
|
|
42
|
+
order: o.order ?? a
|
|
36
43
|
});
|
|
37
44
|
}), e;
|
|
38
|
-
}),
|
|
45
|
+
}), l = r(
|
|
39
46
|
() => Object.values(u.value).map((e) => ({
|
|
40
47
|
...e,
|
|
41
48
|
...b.value.get(d(e.name)),
|
|
42
49
|
registrationOrder: e.registrationOrder
|
|
43
|
-
})).filter((e) => !e.disabled).sort((e,
|
|
44
|
-
const
|
|
45
|
-
return
|
|
50
|
+
})).filter((e) => !e.disabled).sort((e, o) => {
|
|
51
|
+
const a = e.order ?? e.registrationOrder, z = o.order ?? o.registrationOrder;
|
|
52
|
+
return a - z;
|
|
46
53
|
})
|
|
47
|
-
),
|
|
48
|
-
const
|
|
49
|
-
|
|
54
|
+
), x = r(() => t.modelValue && l.value.length > 0), T = G(x, () => t.zIndex), q = r(() => t.activeStep ?? m.value), n = r(() => l.value.findIndex((e) => e.name === q.value)), s = r(() => l.value[n.value] ?? null), w = r(() => n.value <= 0), C = r(() => n.value >= l.value.length - 1), _ = r(() => O[t.targetOutlineColor] || t.targetOutlineColor), p = (e) => {
|
|
55
|
+
const o = l.value.find((a) => a.name === e);
|
|
56
|
+
o && (m.value = e, i("update:active-step", e), i("change", o, l.value.indexOf(o)));
|
|
50
57
|
}, c = (e) => {
|
|
51
|
-
const
|
|
52
|
-
|
|
58
|
+
const o = l.value[e];
|
|
59
|
+
o && p(o.name);
|
|
53
60
|
}, v = () => {
|
|
54
|
-
i("update:model-value", !1), i("close",
|
|
55
|
-
},
|
|
56
|
-
i("finish",
|
|
61
|
+
i("update:model-value", !1), i("close", s.value, n.value);
|
|
62
|
+
}, g = () => {
|
|
63
|
+
i("finish", s.value, n.value), t.closeOnFinish && v();
|
|
57
64
|
}, h = () => {
|
|
58
|
-
if (
|
|
59
|
-
if (i("back",
|
|
60
|
-
t.loop && c(
|
|
65
|
+
if (s.value) {
|
|
66
|
+
if (i("back", s.value, n.value), w.value) {
|
|
67
|
+
t.loop && c(l.value.length - 1);
|
|
61
68
|
return;
|
|
62
69
|
}
|
|
63
|
-
c(
|
|
70
|
+
c(n.value - 1);
|
|
64
71
|
}
|
|
65
|
-
},
|
|
66
|
-
if (
|
|
67
|
-
if (i("next",
|
|
68
|
-
t.loop ? c(0) :
|
|
72
|
+
}, y = () => {
|
|
73
|
+
if (s.value) {
|
|
74
|
+
if (i("next", s.value, n.value), C.value) {
|
|
75
|
+
t.loop ? c(0) : g();
|
|
69
76
|
return;
|
|
70
77
|
}
|
|
71
|
-
c(
|
|
78
|
+
c(n.value + 1);
|
|
72
79
|
}
|
|
73
|
-
},
|
|
80
|
+
}, S = (e) => {
|
|
74
81
|
p(e);
|
|
75
|
-
},
|
|
76
|
-
const
|
|
82
|
+
}, k = (e) => {
|
|
83
|
+
const o = d(e.name), a = u.value[o];
|
|
77
84
|
u.value = {
|
|
78
85
|
...u.value,
|
|
79
|
-
[
|
|
80
|
-
...
|
|
86
|
+
[o]: {
|
|
87
|
+
...a,
|
|
81
88
|
...e,
|
|
82
|
-
registrationOrder:
|
|
89
|
+
registrationOrder: a?.registrationOrder ?? f
|
|
83
90
|
}
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
delete o
|
|
91
|
+
}, a || (f += 1);
|
|
92
|
+
}, I = (e) => {
|
|
93
|
+
const o = d(e), a = { ...u.value };
|
|
94
|
+
delete a[o], u.value = a;
|
|
88
95
|
};
|
|
89
|
-
|
|
90
|
-
[() => t.modelValue,
|
|
91
|
-
([e,
|
|
92
|
-
!e ||
|
|
96
|
+
V(
|
|
97
|
+
[() => t.modelValue, l, s],
|
|
98
|
+
([e, o, a]) => {
|
|
99
|
+
!e || a || o.length === 0 || p(o[0].name);
|
|
93
100
|
},
|
|
94
101
|
{ immediate: !0 }
|
|
95
|
-
),
|
|
96
|
-
active:
|
|
97
|
-
activeStep:
|
|
98
|
-
activeIndex:
|
|
99
|
-
steps:
|
|
100
|
-
loop:
|
|
101
|
-
showClose:
|
|
102
|
-
showProgress:
|
|
103
|
-
bordered:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
), W(K, {
|
|
103
|
+
active: x,
|
|
104
|
+
activeStep: s,
|
|
105
|
+
activeIndex: n,
|
|
106
|
+
steps: l,
|
|
107
|
+
loop: r(() => t.loop),
|
|
108
|
+
showClose: r(() => t.showClose),
|
|
109
|
+
showProgress: r(() => t.showProgress),
|
|
110
|
+
bordered: r(() => t.bordered),
|
|
111
|
+
targetOutlineColor: _,
|
|
112
|
+
targetOutlineOffset: r(() => t.targetOutlineOffset),
|
|
113
|
+
backText: r(() => t.backText),
|
|
114
|
+
nextText: r(() => t.nextText),
|
|
115
|
+
finishText: r(() => t.finishText),
|
|
116
|
+
closeText: r(() => t.closeText),
|
|
108
117
|
zIndex: T,
|
|
109
|
-
teleportTo:
|
|
110
|
-
disabledTeleport:
|
|
111
|
-
width:
|
|
112
|
-
maxWidth:
|
|
113
|
-
registerStep:
|
|
114
|
-
unregisterStep:
|
|
115
|
-
goToStep:
|
|
118
|
+
teleportTo: r(() => t.teleportTo),
|
|
119
|
+
disabledTeleport: r(() => t.disabledTeleport),
|
|
120
|
+
width: r(() => t.width),
|
|
121
|
+
maxWidth: r(() => t.maxWidth),
|
|
122
|
+
registerStep: k,
|
|
123
|
+
unregisterStep: I,
|
|
124
|
+
goToStep: S,
|
|
116
125
|
back: h,
|
|
117
|
-
next:
|
|
118
|
-
finish:
|
|
126
|
+
next: y,
|
|
127
|
+
finish: g,
|
|
119
128
|
close: v
|
|
120
|
-
}),
|
|
121
|
-
const
|
|
129
|
+
}), P({ back: h, next: y, finish: g, close: v, goToStep: S });
|
|
130
|
+
const B = { targetOutlineColorMap: O, props: t, emit: i, registeredSteps: u, internalActiveStep: m, get registrationCursor() {
|
|
122
131
|
return f;
|
|
123
132
|
}, set registrationCursor(e) {
|
|
124
133
|
f = e;
|
|
125
|
-
}, getStepKey: d, stepOverrides: b, steps:
|
|
126
|
-
return Object.defineProperty(
|
|
134
|
+
}, getStepKey: d, stepOverrides: b, steps: l, active: x, guideZIndex: T, activeStepName: q, activeIndex: n, activeStep: s, isFirstStep: w, isLastStep: C, targetOutlineColor: _, setActiveStep: p, goToIndex: c, close: v, finish: g, back: h, next: y, goToStep: S, registerStep: k, unregisterStep: I };
|
|
135
|
+
return Object.defineProperty(B, "__isScriptSetup", { enumerable: !1, value: !0 }), B;
|
|
127
136
|
}
|
|
128
137
|
});
|
|
129
138
|
export {
|
|
130
|
-
|
|
139
|
+
L as default
|
|
131
140
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-guide-step__card{display:grid;gap:var(--indentation-03);box-sizing:border-box;min-width:min(240px,100vw - 48px);padding:var(--indentation-02);border-radius:var(--default-border-radius)}.nmorph-guide-step__tooltip--bordered{box-sizing:border-box;border:var(--nmorph-plain-border)}.nmorph-guide-step__image{display:block;width:100%;max-height:140px;border-radius:var(--default-border-radius);object-fit:cover}.nmorph-guide-step__body{display:grid;gap:var(--indentation-02)}.nmorph-guide-step__progress{color:var(--nmorph-placeholder-text-color);font-size:var(--nmorph-typography-body-small-font-size);line-height:var(--nmorph-typography-body-small-line-height)}.nmorph-guide-step__title{margin:0;color:var(--nmorph-text-color);font-size:var(--nmorph-typography-title-small-font-size);line-height:var(--nmorph-typography-title-small-line-height)}.nmorph-guide-step__text{margin:0;color:var(--nmorph-text-color);font-size:var(--nmorph-typography-body-font-size);line-height:var(--nmorph-typography-body-line-height)}.nmorph-guide-step__actions{display:flex;gap:var(--indentation-02);align-items:center}.nmorph-guide-step__spacer{flex:1 1 auto}
|
|
1
|
+
.nmorph-guide-step .nmorph-tooltip__trigger{position:relative;border-radius:var(--nmorph-private-guide-target-outline-radius, var(--border-radius-120))}.nmorph-guide-step .nmorph-tooltip__trigger:after{position:absolute;z-index:1;border:2px solid var(--nmorph-private-guide-target-outline-color, var(--nmorph-success-color));border-radius:inherit;box-shadow:0 0 0 1px color-mix(in srgb,var(--nmorph-private-guide-target-outline-color, var(--nmorph-success-color)) 18%,transparent),0 0 8px color-mix(in srgb,var(--nmorph-private-guide-target-outline-color, var(--nmorph-success-color)) 28%,transparent),inset 0 0 4px color-mix(in srgb,var(--nmorph-private-guide-target-outline-color, var(--nmorph-success-color)) 18%,transparent);transform:scale(.98);opacity:0;transition:opacity var(--transition-02) ease,transform var(--transition-02) ease;pointer-events:none;inset:calc(-1 * var(--nmorph-private-guide-target-outline-offset, var(--indentation-02)));content:""}.nmorph-guide-step.nmorph-guide-step--active .nmorph-tooltip__trigger:after{transform:scale(1);opacity:1}.nmorph-guide-step__card{display:grid;gap:var(--indentation-03);box-sizing:border-box;min-width:min(240px,100vw - 48px);padding:var(--indentation-02);border-radius:var(--default-border-radius)}.nmorph-guide-step__tooltip--bordered{box-sizing:border-box;border:var(--nmorph-plain-border)}.nmorph-guide-step__image{display:block;width:100%;max-height:140px;border-radius:var(--default-border-radius);object-fit:cover}.nmorph-guide-step__body{display:grid;gap:var(--indentation-02)}.nmorph-guide-step__progress{color:var(--nmorph-placeholder-text-color);font-size:var(--nmorph-typography-body-small-font-size);line-height:var(--nmorph-typography-body-small-line-height)}.nmorph-guide-step__title{margin:0;color:var(--nmorph-text-color);font-size:var(--nmorph-typography-title-small-font-size);line-height:var(--nmorph-typography-title-small-line-height)}.nmorph-guide-step__text{margin:0;color:var(--nmorph-text-color);font-size:var(--nmorph-typography-body-font-size);line-height:var(--nmorph-typography-body-line-height)}.nmorph-guide-step__actions{display:flex;gap:var(--indentation-02);align-items:center}.nmorph-guide-step__spacer{flex:1 1 auto}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import './NmorphGuideStep.css';
|
|
2
2
|
import p from "./NmorphGuideStep.vue2.js";
|
|
3
|
-
import { openBlock as t, createBlock as s, withCtx as a, renderSlot as c, normalizeProps as
|
|
3
|
+
import { openBlock as t, createBlock as s, normalizeStyle as m, normalizeClass as h, withCtx as a, renderSlot as c, normalizeProps as _, mergeProps as u, createElementBlock as i, createCommentVNode as o, createElementVNode as d, toDisplayString as l, createVNode as g } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import v from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const x = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "nmorph-guide-step__card",
|
|
9
9
|
role: "dialog",
|
|
10
10
|
"aria-live": "polite"
|
|
11
|
-
},
|
|
11
|
+
}, S = ["src", "alt"], f = { class: "nmorph-guide-step__body" }, k = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "nmorph-guide-step__progress"
|
|
14
|
-
},
|
|
14
|
+
}, b = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "nmorph-guide-step__title"
|
|
17
|
-
},
|
|
17
|
+
}, y = {
|
|
18
18
|
key: 2,
|
|
19
19
|
class: "nmorph-guide-step__text"
|
|
20
|
-
},
|
|
21
|
-
function
|
|
20
|
+
}, w = { class: "nmorph-guide-step__actions" };
|
|
21
|
+
function C(n, r, N, e, P, T) {
|
|
22
22
|
return t(), s(e.NmorphTooltip, {
|
|
23
|
+
class: h(["nmorph-guide-step", e.isActive && "nmorph-guide-step--active"]),
|
|
24
|
+
style: m(e.styles),
|
|
23
25
|
"force-show": e.isActive,
|
|
24
26
|
position: e.tooltipPosition,
|
|
25
27
|
"z-index": e.guide?.zIndex.value,
|
|
@@ -33,14 +35,14 @@ function w(d, r, y, e, C, N) {
|
|
|
33
35
|
disabled: !e.guide || e.props.disabled
|
|
34
36
|
}, {
|
|
35
37
|
content: a(() => [
|
|
36
|
-
e.hasCustomContent && e.stepSlotProps ? c(
|
|
38
|
+
e.hasCustomContent && e.stepSlotProps ? c(n.$slots, "content", _(u({ key: 0 }, e.stepSlotProps))) : e.currentStep && e.stepSlotProps ? (t(), i("div", x, [
|
|
37
39
|
e.currentStep.imageSrc ? (t(), i("img", {
|
|
38
40
|
key: 0,
|
|
39
41
|
class: "nmorph-guide-step__image",
|
|
40
42
|
src: e.currentStep.imageSrc,
|
|
41
43
|
alt: e.currentStep.imageAlt || e.currentStep.title || ""
|
|
42
|
-
}, null, 8,
|
|
43
|
-
|
|
44
|
+
}, null, 8, S)) : o("v-if", !0),
|
|
45
|
+
d("div", f, [
|
|
44
46
|
e.guide?.showProgress.value ? (t(), i(
|
|
45
47
|
"div",
|
|
46
48
|
k,
|
|
@@ -50,29 +52,28 @@ function w(d, r, y, e, C, N) {
|
|
|
50
52
|
)) : o("v-if", !0),
|
|
51
53
|
e.currentStep.title ? (t(), i(
|
|
52
54
|
"h3",
|
|
53
|
-
|
|
55
|
+
b,
|
|
54
56
|
l(e.currentStep.title),
|
|
55
57
|
1
|
|
56
58
|
/* TEXT */
|
|
57
59
|
)) : o("v-if", !0),
|
|
58
60
|
e.currentStep.text ? (t(), i(
|
|
59
61
|
"p",
|
|
60
|
-
|
|
62
|
+
y,
|
|
61
63
|
l(e.currentStep.text),
|
|
62
64
|
1
|
|
63
65
|
/* TEXT */
|
|
64
66
|
)) : o("v-if", !0)
|
|
65
67
|
]),
|
|
66
|
-
|
|
68
|
+
d("div", w, [
|
|
67
69
|
e.guide?.showClose.value ? (t(), s(e.NmorphButton, {
|
|
68
70
|
key: 0,
|
|
69
71
|
class: "nmorph-guide-step__close",
|
|
70
72
|
text: e.guide.closeText.value,
|
|
71
73
|
design: "plain",
|
|
72
|
-
thickness: "thin",
|
|
73
74
|
onClick: e.guide.close
|
|
74
75
|
}, null, 8, ["text", "onClick"])) : o("v-if", !0),
|
|
75
|
-
r[1] || (r[1] =
|
|
76
|
+
r[1] || (r[1] = d(
|
|
76
77
|
"span",
|
|
77
78
|
{ class: "nmorph-guide-step__spacer" },
|
|
78
79
|
null,
|
|
@@ -83,7 +84,6 @@ function w(d, r, y, e, C, N) {
|
|
|
83
84
|
class: "nmorph-guide-step__back",
|
|
84
85
|
text: e.guide?.backText.value,
|
|
85
86
|
design: "plain",
|
|
86
|
-
thickness: "thin",
|
|
87
87
|
disabled: e.isFirstStep && !e.guide?.loop.value,
|
|
88
88
|
onClick: e.guide?.back
|
|
89
89
|
}, null, 8, ["text", "disabled", "onClick"]),
|
|
@@ -91,20 +91,19 @@ function w(d, r, y, e, C, N) {
|
|
|
91
91
|
class: "nmorph-guide-step__next",
|
|
92
92
|
text: e.isLastStep && !e.guide?.loop.value ? e.guide?.finishText.value : e.guide?.nextText.value,
|
|
93
93
|
design: "plain",
|
|
94
|
-
|
|
95
|
-
onClick: r[0] || (r[0] = (P) => e.isLastStep && !e.guide?.loop.value ? e.guide?.finish() : e.guide?.next())
|
|
94
|
+
onClick: r[0] || (r[0] = (z) => e.isLastStep && !e.guide?.loop.value ? e.guide?.finish() : e.guide?.next())
|
|
96
95
|
}, null, 8, ["text"])
|
|
97
96
|
])
|
|
98
97
|
])) : o("v-if", !0)
|
|
99
98
|
]),
|
|
100
99
|
default: a(() => [
|
|
101
|
-
c(
|
|
100
|
+
c(n.$slots, "default")
|
|
102
101
|
]),
|
|
103
102
|
_: 3
|
|
104
103
|
/* FORWARDED */
|
|
105
|
-
}, 8, ["force-show", "position", "z-index", "teleport-to", "disabled-teleport", "width", "max-width", "content-class", "hide-triangle", "disabled"]);
|
|
104
|
+
}, 8, ["class", "style", "force-show", "position", "z-index", "teleport-to", "disabled-teleport", "width", "max-width", "content-class", "hide-triangle", "disabled"]);
|
|
106
105
|
}
|
|
107
|
-
const
|
|
106
|
+
const G = /* @__PURE__ */ v(p, [["render", C], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-guide/NmorphGuideStep.vue"]]);
|
|
108
107
|
export {
|
|
109
|
-
|
|
108
|
+
G as default
|
|
110
109
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import './NmorphGuideStep.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
2
|
+
import { defineComponent as b, inject as h, useSlots as y, computed as o, watch as x, onBeforeUnmount as _ } from "vue";
|
|
3
|
+
import { createCssSizeVariables as q, createCssVariables as C } from "../../../utils/common.js";
|
|
4
|
+
import B from "../../basic/nmorph-button/NmorphButton.vue.js";
|
|
5
|
+
import N from "../nmorph-tooltip/NmorphTooltip.vue.js";
|
|
6
|
+
import { nmorphGuideInjectionKey as A } from "./types.js";
|
|
7
|
+
const F = /* @__PURE__ */ b({
|
|
7
8
|
__name: "NmorphGuideStep",
|
|
8
9
|
props: {
|
|
9
10
|
name: { type: [String, Number], required: !0 },
|
|
@@ -15,41 +16,48 @@ const I = /* @__PURE__ */ g({
|
|
|
15
16
|
order: { type: Number, required: !1, default: void 0 },
|
|
16
17
|
disabled: { type: Boolean, required: !1, default: !1 }
|
|
17
18
|
},
|
|
18
|
-
setup(p, { expose:
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
setup(p, { expose: m }) {
|
|
20
|
+
m();
|
|
21
|
+
const t = p, e = h(A, null), n = y(), r = o(() => e?.activeStep.value ?? null), i = o(() => e?.activeIndex.value ?? -1), a = o(() => e?.steps.value.length ?? 0), s = o(() => i.value <= 0), l = o(() => i.value >= a.value - 1), c = o(() => !!(e?.active.value && r.value?.name === t.name)), d = o(() => r.value?.position ?? t.position), f = o(() => !!n.content), v = o(() => ({
|
|
22
|
+
...C({
|
|
23
|
+
"--nmorph-private-guide-target-outline-color": e?.targetOutlineColor.value
|
|
24
|
+
}),
|
|
25
|
+
...q({
|
|
26
|
+
"--nmorph-private-guide-target-outline-offset": e?.targetOutlineOffset.value
|
|
27
|
+
})
|
|
28
|
+
})), g = o(() => !e || !r.value ? null : {
|
|
29
|
+
step: r.value,
|
|
30
|
+
index: i.value,
|
|
31
|
+
total: a.value,
|
|
24
32
|
isFirst: s.value,
|
|
25
33
|
isLast: l.value,
|
|
26
|
-
back:
|
|
27
|
-
next:
|
|
28
|
-
close:
|
|
29
|
-
finish:
|
|
34
|
+
back: e.back,
|
|
35
|
+
next: e.next,
|
|
36
|
+
close: e.close,
|
|
37
|
+
finish: e.finish
|
|
30
38
|
});
|
|
31
|
-
|
|
39
|
+
x(
|
|
32
40
|
() => ({
|
|
33
|
-
name:
|
|
34
|
-
title:
|
|
35
|
-
text:
|
|
36
|
-
imageSrc:
|
|
37
|
-
imageAlt:
|
|
38
|
-
position:
|
|
39
|
-
order:
|
|
40
|
-
disabled:
|
|
41
|
+
name: t.name,
|
|
42
|
+
title: t.title,
|
|
43
|
+
text: t.text,
|
|
44
|
+
imageSrc: t.imageSrc,
|
|
45
|
+
imageAlt: t.imageAlt,
|
|
46
|
+
position: t.position,
|
|
47
|
+
order: t.order,
|
|
48
|
+
disabled: t.disabled
|
|
41
49
|
}),
|
|
42
50
|
(S) => {
|
|
43
|
-
|
|
51
|
+
e?.registerStep(S);
|
|
44
52
|
},
|
|
45
53
|
{ immediate: !0 }
|
|
46
54
|
), _(() => {
|
|
47
|
-
|
|
55
|
+
e?.unregisterStep(t.name);
|
|
48
56
|
});
|
|
49
|
-
const u = { props:
|
|
57
|
+
const u = { props: t, guide: e, slots: n, currentStep: r, currentIndex: i, totalSteps: a, isFirstStep: s, isLastStep: l, isActive: c, tooltipPosition: d, hasCustomContent: f, styles: v, stepSlotProps: g, NmorphButton: B, NmorphTooltip: N };
|
|
50
58
|
return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
|
|
51
59
|
}
|
|
52
60
|
});
|
|
53
61
|
export {
|
|
54
|
-
|
|
62
|
+
F as default
|
|
55
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-autocomplete .nmorph-autocomplete__input-content{position:relative}.nmorph-autocomplete.nmorph-autocomplete--open .nmorph-autocomplete__input-content{z-index:var(--nmorph-private-autocomplete-input-z-index)}.nmorph-autocomplete__list{padding:var(--indentation-01) 0}.nmorph-autocomplete__list-item{display:flex;align-items:center;box-sizing:border-box;min-width:0;padding:var(--indentation-00) var(--default-indentation-input);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.nmorph-autocomplete__loading{display:flex;justify-content:center;align-items:center;height:100px}.nmorph-autocomplete__list-item:hover,.nmorph-autocomplete__list-item--focused{color:var(--nmorph-
|
|
1
|
+
.nmorph-autocomplete .nmorph-autocomplete__input-content{position:relative}.nmorph-autocomplete.nmorph-autocomplete--open .nmorph-autocomplete__input-content{z-index:var(--nmorph-private-autocomplete-input-z-index)}.nmorph-autocomplete__list{padding:var(--indentation-01) 0}.nmorph-autocomplete__list-item{display:flex;align-items:center;box-sizing:border-box;min-width:0;padding:var(--indentation-00) var(--default-indentation-input);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.nmorph-autocomplete__loading{display:flex;justify-content:center;align-items:center;height:100px}.nmorph-autocomplete__list-item:hover,.nmorph-autocomplete__list-item--focused{color:var(--nmorph-focus-text-color);background:var(--nmorph-accent-color);--nmorph-private-icon-color: var(--nmorph-focus-text-color)}.nmorph-autocomplete__list-item:hover :where(*),.nmorph-autocomplete__list-item--focused :where(*){color:inherit}.nmorph-autocomplete__list--virtual{overflow-y:auto}.nmorph-autocomplete__list--virtual .nmorph-autocomplete__list-item{height:var(--nmorph-private-autocomplete-virtual-item-height);overflow:hidden}.nmorph-autocomplete__list--dynamic .nmorph-autocomplete__list-item{height:auto}.nmorph-autocomplete__virtual-spacer{position:relative}.nmorph-autocomplete__virtual-content{position:absolute;top:0;right:0;left:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-error-box{display:flex;align-items:center;overflow:hidden}.nmorph-error-box .nmorph-error-box__error{margin:var(--indentation-00);margin-left:var(--default-indentation-input);color:var(--nmorph-error-text-color);text-align:left}.nmorph-error-box.nmorph-error-box--empty:not(.nmorph-error-box--static-height){display:none}
|
|
1
|
+
.nmorph-error-box{display:flex;align-items:center;min-width:0;overflow:hidden}.nmorph-error-box.nmorph--basic-component,.nmorph-error-box.nmorph--thin-component,.nmorph-error-box.nmorph--thick-component{height:auto;min-height:var(--nmorph-private-control-height)}.nmorph-error-box .nmorph-error-box__error{flex:1 1 auto;min-width:0;margin:var(--indentation-02) var(--indentation-00);margin-left:var(--default-indentation-input);color:var(--nmorph-error-text-color);line-height:var(--nmorph-typography-body-line-height);text-align:left;overflow-wrap:anywhere}.nmorph-error-box.nmorph-error-box--empty:not(.nmorph-error-box--static-height){display:none}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
import './NmorphErrorBox.css';
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as
|
|
2
|
+
import n from "./NmorphErrorBox.vue2.js";
|
|
3
|
+
import { openBlock as o, createElementBlock as e, normalizeClass as m, createVNode as t, Transition as i, withCtx as c, toDisplayString as p, createCommentVNode as a } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
return
|
|
5
|
+
import s from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
function f(l, _, h, r, d, u) {
|
|
7
|
+
return o(), e(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
|
-
class: m(
|
|
10
|
+
class: m(r.modifiers)
|
|
11
11
|
},
|
|
12
12
|
[
|
|
13
|
-
i
|
|
13
|
+
t(i, {
|
|
14
14
|
name: "list",
|
|
15
|
-
|
|
15
|
+
mode: "out-in"
|
|
16
16
|
}, {
|
|
17
|
-
default:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
1
|
|
29
|
-
/* TEXT */
|
|
30
|
-
))),
|
|
31
|
-
128
|
|
32
|
-
/* KEYED_FRAGMENT */
|
|
33
|
-
))
|
|
17
|
+
default: c(() => [
|
|
18
|
+
r.currentError ? (o(), e(
|
|
19
|
+
"p",
|
|
20
|
+
{
|
|
21
|
+
key: r.currentError,
|
|
22
|
+
class: "nmorph-error-box__error"
|
|
23
|
+
},
|
|
24
|
+
p(r.currentError),
|
|
25
|
+
1
|
|
26
|
+
/* TEXT */
|
|
27
|
+
)) : a("v-if", !0)
|
|
34
28
|
]),
|
|
35
29
|
_: 1
|
|
36
30
|
/* STABLE */
|
|
@@ -40,7 +34,7 @@ function _(h, d, u, e, x, k) {
|
|
|
40
34
|
/* CLASS */
|
|
41
35
|
);
|
|
42
36
|
}
|
|
43
|
-
const
|
|
37
|
+
const N = /* @__PURE__ */ s(n, [["render", f], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue"]]);
|
|
44
38
|
export {
|
|
45
|
-
|
|
39
|
+
N as default
|
|
46
40
|
};
|