@nmorph/nmorph-ui-kit 2.2.19 → 2.2.20
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/circle-close.svg.js +4 -4
- package/dist/assets/icons/clock.svg.js +2 -2
- package/dist/assets/icons/folder-opened.svg.js +8 -8
- package/dist/components/basic/nmorph-button/NmorphButton.css +1 -1
- package/dist/components/basic/nmorph-link/NmorphLink.vue.js +16 -15
- package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +17 -14
- package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
- package/dist/components/data/nmorph-badge/NmorphBadge.vue.js +23 -23
- package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +27 -23
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +14 -13
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +68 -65
- package/dist/components/data/nmorph-calendar/utils.js +4 -3
- package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
- package/dist/components/data/nmorph-card/NmorphCard.vue.js +27 -26
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +21 -13
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +39 -42
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +25 -36
- package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +15 -11
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.css +1 -1
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.js +14 -13
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +42 -27
- package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -0
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +64 -0
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +43 -0
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.css +1 -1
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +64 -61
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +70 -60
- package/dist/components/data/nmorph-progress/NmorphProgress.vue.js +24 -29
- package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +25 -14
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue.js +20 -19
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +15 -12
- package/dist/components/data/nmorph-table/NmorphTable.vue.js +35 -31
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +64 -50
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.css +1 -1
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue.js +8 -8
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +26 -22
- package/dist/components/feedback/nmorph-callout/NmorphCallout.css +1 -1
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +16 -15
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +11 -8
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +13 -13
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +33 -19
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +1 -1
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.css +1 -1
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue.js +16 -15
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +39 -32
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.css +1 -1
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue.js +7 -7
- package/dist/components/form/nmorph-select/NmorphSelect.vue.js +40 -39
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +53 -50
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.js +16 -15
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -16
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue.js +16 -15
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +26 -19
- package/dist/components/form/nmorph-slider/NmorphSlider.vue.js +4 -4
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +48 -38
- package/dist/components/form/nmorph-switch/NmorphSwitch.css +1 -1
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +18 -17
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +38 -27
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -0
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +183 -0
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +111 -0
- package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.css +1 -1
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +9 -8
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +14 -14
- package/dist/hooks/use-common-styles.js +75 -9
- package/dist/hooks/use-virtual-list.js +3 -1
- package/dist/index.es.js +654 -650
- package/dist/index.umd.js +101 -35
- package/dist/locales/en.js +1 -0
- package/dist/locales/ru.js +1 -0
- package/dist/locales/zh.js +1 -0
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -0
- package/dist/src/components/data/index.d.ts +1 -0
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +2 -0
- package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +2 -0
- package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +7 -5
- package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +1 -3
- package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +2 -0
- package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +36 -0
- package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +6 -0
- package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +6 -0
- package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -0
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +6 -0
- package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -0
- package/dist/src/components/feedback/nmorph-alert/types.d.ts +1 -0
- package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +2 -0
- package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +8 -0
- package/dist/src/components/form/index.d.ts +2 -0
- package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +4 -0
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +2 -0
- package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +2 -0
- package/dist/src/components/form/nmorph-select/types.d.ts +2 -0
- package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +6 -0
- package/dist/src/components/form/nmorph-slider/types.d.ts +4 -0
- package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +8 -0
- package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +44 -0
- package/dist/src/components/form/nmorph-time-picker/types.d.ts +6 -0
- package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -3
- package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -2
- package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +6 -5
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import './NmorphImagePreview.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
2
|
+
import { defineComponent as z, ref as m, watch as A, computed as l } from "vue";
|
|
3
|
+
import { useModifiers as F } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import H from "../../../assets/icons/shrink.svg.js";
|
|
5
|
+
import R from "../../../assets/icons/rotate-right.svg.js";
|
|
6
|
+
import T from "../../../assets/icons/rotate-left.svg.js";
|
|
7
|
+
import D from "../../../assets/icons/zoom-in.svg.js";
|
|
8
|
+
import V from "../../../assets/icons/zoom-out.svg.js";
|
|
9
|
+
import P from "../../../assets/icons/enlarge.svg.js";
|
|
10
|
+
import Z from "../../../assets/icons/chevron-down.svg.js";
|
|
11
|
+
import $ from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
|
|
12
|
+
import j from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
13
|
+
import E from "../../basic/nmorph-button/NmorphButton.vue.js";
|
|
14
|
+
import G from "../nmorph-image/NmorphImage.vue.js";
|
|
15
|
+
const le = /* @__PURE__ */ z({
|
|
16
16
|
__name: "NmorphImagePreview",
|
|
17
17
|
props: {
|
|
18
18
|
modelValue: { type: Boolean, required: !1, default: !1 },
|
|
@@ -23,56 +23,55 @@ const te = /* @__PURE__ */ A({
|
|
|
23
23
|
minScaleLevel: { type: Number, required: !1, default: 0.2 },
|
|
24
24
|
maxScaleLevel: { type: Number, required: !1, default: 4 },
|
|
25
25
|
zIndex: { type: Number, required: !1, default: void 0 },
|
|
26
|
-
showTrigger: { type: Boolean, required: !1, default: !0 }
|
|
26
|
+
showTrigger: { type: Boolean, required: !1, default: !0 },
|
|
27
|
+
width: { type: [Number, String], required: !1, default: void 0 },
|
|
28
|
+
height: { type: [Number, String], required: !1, default: void 0 },
|
|
29
|
+
navigationButtonMargin: { type: [Number, String], required: !1, default: void 0 }
|
|
27
30
|
},
|
|
28
31
|
emits: ["update:model-value"],
|
|
29
|
-
setup(
|
|
30
|
-
|
|
31
|
-
const e =
|
|
32
|
-
|
|
32
|
+
setup(y, { expose: S, emit: I }) {
|
|
33
|
+
S();
|
|
34
|
+
const e = y, n = m(e.modelValue);
|
|
35
|
+
A(
|
|
33
36
|
() => e.modelValue,
|
|
34
|
-
(
|
|
37
|
+
(t) => n.value = t
|
|
35
38
|
);
|
|
36
|
-
const
|
|
37
|
-
() =>
|
|
38
|
-
"nmorph-image-preview": [`${
|
|
39
|
+
const b = l(
|
|
40
|
+
() => F({
|
|
41
|
+
"nmorph-image-preview": [`${n.value && "opened"}`]
|
|
39
42
|
})
|
|
40
|
-
),
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
}, s = () => {
|
|
45
|
-
o.value = o.value + 90, o.value >= 360 && (o.value = 0);
|
|
43
|
+
), a = m(e.initialIndex), q = l(() => typeof e.src == "string" ? e.src : e.src[a.value]), r = m(1), x = () => {
|
|
44
|
+
n.value = !0, s("update:model-value", n.value);
|
|
45
|
+
}, w = () => {
|
|
46
|
+
n.value = !1, s("update:model-value", n.value);
|
|
46
47
|
}, c = () => {
|
|
47
|
-
o.value = o.value
|
|
48
|
+
o.value = o.value + 90, o.value >= 360 && (o.value = 0);
|
|
48
49
|
}, p = () => {
|
|
50
|
+
o.value = o.value - 90, o.value <= -360 && (o.value = 0);
|
|
51
|
+
}, d = () => {
|
|
49
52
|
r.value < e.maxScaleLevel && (r.value += e.scaleStep), r.value = parseFloat(r.value.toFixed(3));
|
|
50
53
|
}, v = () => {
|
|
51
54
|
r.value > e.minScaleLevel && (r.value -= e.scaleStep), r.value = parseFloat(r.value.toFixed(3));
|
|
52
|
-
},
|
|
55
|
+
}, f = l(() => r.value < 1), h = () => {
|
|
53
56
|
r.value = 1;
|
|
54
|
-
},
|
|
57
|
+
}, g = () => {
|
|
55
58
|
r.value = 1;
|
|
56
|
-
}, o =
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
let
|
|
64
|
-
icon: F,
|
|
65
|
-
handler: h
|
|
66
|
-
};
|
|
67
|
-
return d.value && (a = {
|
|
68
|
-
icon: D,
|
|
69
|
-
handler: f
|
|
70
|
-
}), a;
|
|
71
|
-
}), O = [
|
|
72
|
-
{
|
|
59
|
+
}, o = m(0), _ = () => {
|
|
60
|
+
const t = e.src.length - 1, i = a.value - 1;
|
|
61
|
+
i < 0 ? a.value = t : a.value = i;
|
|
62
|
+
}, L = () => {
|
|
63
|
+
const t = e.src.length - 1, i = a.value + 1;
|
|
64
|
+
i > t ? a.value = 0 : a.value = i;
|
|
65
|
+
}, B = l(() => {
|
|
66
|
+
let t = {
|
|
73
67
|
icon: H,
|
|
74
|
-
handler:
|
|
75
|
-
}
|
|
68
|
+
handler: g
|
|
69
|
+
};
|
|
70
|
+
return f.value && (t = {
|
|
71
|
+
icon: P,
|
|
72
|
+
handler: h
|
|
73
|
+
}), t;
|
|
74
|
+
}), C = [
|
|
76
75
|
{
|
|
77
76
|
icon: R,
|
|
78
77
|
handler: c
|
|
@@ -82,23 +81,34 @@ const te = /* @__PURE__ */ A({
|
|
|
82
81
|
handler: p
|
|
83
82
|
},
|
|
84
83
|
{
|
|
85
|
-
icon:
|
|
84
|
+
icon: D,
|
|
85
|
+
handler: d
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
icon: V,
|
|
86
89
|
handler: v
|
|
87
90
|
}
|
|
88
|
-
],
|
|
89
|
-
|
|
91
|
+
], s = I, M = l(() => Array.isArray(e.src) && e.src.length > 0), u = (t) => typeof t == "number" ? `${t}px` : t, O = l(() => ({
|
|
92
|
+
...e.width !== void 0 && { "--width": u(e.width) },
|
|
93
|
+
...e.height !== void 0 && { "--height": u(e.height) }
|
|
94
|
+
})), k = l(() => ({
|
|
95
|
+
...e.navigationButtonMargin !== void 0 && {
|
|
96
|
+
"--nmorph-image-preview-btn-margin": u(e.navigationButtonMargin)
|
|
97
|
+
}
|
|
98
|
+
})), N = { props: e, open: n, modifiers: b, currentIndex: a, triggerSource: q, scaleLevel: r, clickHandler: x, closeHandler: w, rotateRight: c, rotateLeft: p, zoomIn: d, zoomOut: v, isLevelChangedToMin: f, enlargeToNormal: h, shrinkToNormal: g, rotateLevel: o, previousHandler: _, nextHandler: L, enlargeShrinkActionData: B, actions: C, emit: s, multipleSources: M, getCssSize: u, triggerStyle: O, portalStyle: k, get NmorphImage() {
|
|
99
|
+
return G;
|
|
90
100
|
}, get NmorphButton() {
|
|
91
|
-
return
|
|
101
|
+
return E;
|
|
92
102
|
}, get NmorphIcon() {
|
|
93
|
-
return
|
|
103
|
+
return j;
|
|
94
104
|
}, get NmorphOverlay() {
|
|
95
|
-
return
|
|
105
|
+
return $;
|
|
96
106
|
}, get NmorphIconChevronDown() {
|
|
97
|
-
return
|
|
107
|
+
return Z;
|
|
98
108
|
} };
|
|
99
|
-
return Object.defineProperty(
|
|
109
|
+
return Object.defineProperty(N, "__isScriptSetup", { enumerable: !1, value: !0 }), N;
|
|
100
110
|
}
|
|
101
111
|
});
|
|
102
112
|
export {
|
|
103
|
-
|
|
113
|
+
le as default
|
|
104
114
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './NmorphProgress.css';
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as e, createElementBlock as
|
|
2
|
+
import _ from "./NmorphProgress.vue2.js";
|
|
3
|
+
import { openBlock as e, createElementBlock as s, normalizeStyle as d, normalizeClass as p, createElementVNode as o, renderSlot as c, createTextVNode as n, toDisplayString as a, createCommentVNode as i } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import h from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const m = {
|
|
@@ -15,26 +15,21 @@ const m = {
|
|
|
15
15
|
}, k = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "nmorph-progress__circle"
|
|
18
|
-
}, S = { class: "nmorph-progress__circle-inner-part" }, z = ["width", "height"],
|
|
19
|
-
function
|
|
20
|
-
return e(),
|
|
18
|
+
}, S = { class: "nmorph-progress__circle-inner-part" }, z = ["width", "height"], x = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"];
|
|
19
|
+
function N(t, P, l, r, D, V) {
|
|
20
|
+
return e(), s(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
class:
|
|
24
|
-
style: d(
|
|
25
|
-
"--nmorph-progress-percentage": r.displayPercentage,
|
|
26
|
-
"--nmorph-progress-color": r.color,
|
|
27
|
-
"--nmorph-progress-animation": r.animation,
|
|
28
|
-
"--nmorph-progress-circle-size": r.circleContainerSize
|
|
29
|
-
})
|
|
23
|
+
class: p(r.modifiers),
|
|
24
|
+
style: d(r.styles)
|
|
30
25
|
},
|
|
31
26
|
[
|
|
32
|
-
r.props.type === "linear" ? (e(),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
l.valueInside ? (e(),
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
r.props.type === "linear" ? (e(), s("div", m, [
|
|
28
|
+
o("div", g, [
|
|
29
|
+
o("div", f, [
|
|
30
|
+
l.valueInside ? (e(), s("div", y, [
|
|
31
|
+
c(t.$slots, "inner-text", {}, () => [
|
|
32
|
+
n(
|
|
38
33
|
a(r.displayPercentage),
|
|
39
34
|
1
|
|
40
35
|
/* TEXT */
|
|
@@ -43,9 +38,9 @@ function x(c, N, l, r, C, D) {
|
|
|
43
38
|
])) : i("v-if", !0)
|
|
44
39
|
])
|
|
45
40
|
]),
|
|
46
|
-
l.valueRightSide ? (e(),
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
l.valueRightSide ? (e(), s("div", v, [
|
|
42
|
+
c(t.$slots, "right-side", {}, () => [
|
|
43
|
+
n(
|
|
49
44
|
a(r.displayPercentage),
|
|
50
45
|
1
|
|
51
46
|
/* TEXT */
|
|
@@ -53,21 +48,21 @@ function x(c, N, l, r, C, D) {
|
|
|
53
48
|
])
|
|
54
49
|
])) : i("v-if", !0)
|
|
55
50
|
])) : i("v-if", !0),
|
|
56
|
-
r.props.type === "circle" ? (e(),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
r.props.type === "circle" ? (e(), s("div", k, [
|
|
52
|
+
o("div", S, [
|
|
53
|
+
c(t.$slots, "circle-inner-part", {}, () => [
|
|
54
|
+
n(
|
|
60
55
|
a(r.displayPercentage),
|
|
61
56
|
1
|
|
62
57
|
/* TEXT */
|
|
63
58
|
)
|
|
64
59
|
])
|
|
65
60
|
]),
|
|
66
|
-
(e(),
|
|
61
|
+
(e(), s("svg", {
|
|
67
62
|
width: r.props.circleSize,
|
|
68
63
|
height: r.props.circleSize
|
|
69
64
|
}, [
|
|
70
|
-
|
|
65
|
+
o("circle", {
|
|
71
66
|
ref: "circle",
|
|
72
67
|
class: "nmorph-progress__circle-ring",
|
|
73
68
|
cx: r.props.circleSize / 2,
|
|
@@ -75,7 +70,7 @@ function x(c, N, l, r, C, D) {
|
|
|
75
70
|
r: r.props.circleSize / 2 - 2,
|
|
76
71
|
"stroke-dasharray": r.strokeDasharray,
|
|
77
72
|
"stroke-dashoffset": r.strokeDashoffset
|
|
78
|
-
}, null, 8,
|
|
73
|
+
}, null, 8, x)
|
|
79
74
|
], 8, z))
|
|
80
75
|
])) : i("v-if", !0)
|
|
81
76
|
],
|
|
@@ -83,7 +78,7 @@ function x(c, N, l, r, C, D) {
|
|
|
83
78
|
/* CLASS, STYLE */
|
|
84
79
|
);
|
|
85
80
|
}
|
|
86
|
-
const E = /* @__PURE__ */ h(
|
|
81
|
+
const E = /* @__PURE__ */ h(_, [["render", N], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-progress/NmorphProgress.vue"]]);
|
|
87
82
|
export {
|
|
88
83
|
E as default
|
|
89
84
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './NmorphProgress.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
const
|
|
2
|
+
import { defineComponent as y, computed as r, ref as p, onMounted as S } from "vue";
|
|
3
|
+
import { useModifiers as q } from "../../../utils/create-modifiers.js";
|
|
4
|
+
const A = /* @__PURE__ */ y({
|
|
5
5
|
__name: "NmorphProgress",
|
|
6
6
|
props: {
|
|
7
7
|
type: { type: String, required: !1, default: "linear" },
|
|
@@ -10,22 +10,33 @@ const q = /* @__PURE__ */ v({
|
|
|
10
10
|
valueInside: { type: Boolean, required: !1, default: !1 },
|
|
11
11
|
valueRightSide: { type: Boolean, required: !1, default: !0 },
|
|
12
12
|
indeterminate: { type: Boolean, required: !1, default: !1 },
|
|
13
|
-
circleSize: { type: Number, required: !1, default: 120 }
|
|
13
|
+
circleSize: { type: Number, required: !1, default: 120 },
|
|
14
|
+
height: { type: [Number, String], required: !1, default: void 0 },
|
|
15
|
+
widthTransition: { type: String, required: !1, default: void 0 },
|
|
16
|
+
indeterminateAnimation: { type: String, required: !1, default: void 0 }
|
|
14
17
|
},
|
|
15
|
-
setup(
|
|
16
|
-
|
|
17
|
-
const e =
|
|
18
|
-
() =>
|
|
18
|
+
setup(d, { expose: f }) {
|
|
19
|
+
f();
|
|
20
|
+
const e = d, m = r(
|
|
21
|
+
() => q({
|
|
19
22
|
"nmorph-progress": []
|
|
20
23
|
})
|
|
21
|
-
),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
), o = r(() => Array.isArray(e.color) ? e.color.find((n) => n.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), a = r(() => e.indeterminate ? "var(--animation)" : "none"), i = p(null), t = p(1), g = r(() => `${t.value} ${t.value}`), h = r(() => t.value - e.percentage / 100 * t.value);
|
|
25
|
+
S(() => {
|
|
26
|
+
i.value && (t.value = 2 * Math.PI * i.value.r.baseVal.value);
|
|
24
27
|
});
|
|
25
|
-
const
|
|
26
|
-
|
|
28
|
+
const s = r(() => `${e.circleSize}px`), l = r(() => `${e.percentage}%`), u = (n) => typeof n == "number" ? `${n}px` : n, v = r(() => ({
|
|
29
|
+
"--nmorph-progress-percentage": l.value,
|
|
30
|
+
"--nmorph-progress-color": o.value,
|
|
31
|
+
"--nmorph-progress-animation": a.value,
|
|
32
|
+
"--nmorph-progress-circle-size": s.value,
|
|
33
|
+
...e.height !== void 0 && { "--height": u(e.height) },
|
|
34
|
+
...e.widthTransition !== void 0 && { "--width-transition": e.widthTransition },
|
|
35
|
+
...e.indeterminateAnimation !== void 0 && { "--animation": e.indeterminateAnimation }
|
|
36
|
+
})), c = { props: e, modifiers: m, color: o, animation: a, circle: i, circumference: t, strokeDasharray: g, strokeDashoffset: h, circleContainerSize: s, displayPercentage: l, getCssSize: u, styles: v };
|
|
37
|
+
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
27
38
|
}
|
|
28
39
|
});
|
|
29
40
|
export {
|
|
30
|
-
|
|
41
|
+
A as default
|
|
31
42
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import './NmorphSkeleton.css';
|
|
2
2
|
import m from "./NmorphSkeleton.vue2.js";
|
|
3
|
-
import { openBlock as
|
|
3
|
+
import { openBlock as o, createElementBlock as r, normalizeStyle as p, normalizeClass as c, Fragment as d, renderList as _, createBlock as h, createCommentVNode as f, withDirectives as s, createElementVNode as n, renderSlot as l, vShow as i } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import k from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const v = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "nmorph-skeleton__rows"
|
|
9
|
-
},
|
|
10
|
-
function
|
|
11
|
-
return
|
|
9
|
+
}, w = { class: "nmorph-skeleton__template" }, y = { class: "nmorph-skeleton__default" };
|
|
10
|
+
function S(t, g, N, e, u, B) {
|
|
11
|
+
return o(), r(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
|
-
class:
|
|
14
|
+
class: c(e.modifiers),
|
|
15
|
+
style: p(e.styles)
|
|
15
16
|
},
|
|
16
17
|
[
|
|
17
|
-
|
|
18
|
-
(
|
|
19
|
-
|
|
18
|
+
e.props.rows && e.props.loading ? (o(), r("div", v, [
|
|
19
|
+
(o(!0), r(
|
|
20
|
+
d,
|
|
20
21
|
null,
|
|
21
|
-
|
|
22
|
+
_(e.props.rows, (a) => (o(), h(e.NmorphSkeletonItem, {
|
|
22
23
|
key: a,
|
|
23
24
|
width: "100%",
|
|
24
25
|
height: "14px",
|
|
@@ -27,35 +28,35 @@ function g(t, N, S, o, u, y) {
|
|
|
27
28
|
128
|
|
28
29
|
/* KEYED_FRAGMENT */
|
|
29
30
|
))
|
|
30
|
-
])) :
|
|
31
|
+
])) : f("v-if", !0),
|
|
31
32
|
s(n(
|
|
32
33
|
"div",
|
|
33
|
-
|
|
34
|
+
w,
|
|
34
35
|
[
|
|
35
36
|
l(t.$slots, "template")
|
|
36
37
|
],
|
|
37
38
|
512
|
|
38
39
|
/* NEED_PATCH */
|
|
39
40
|
), [
|
|
40
|
-
[i, !
|
|
41
|
+
[i, !e.props.rows && e.props.loading]
|
|
41
42
|
]),
|
|
42
43
|
s(n(
|
|
43
44
|
"div",
|
|
44
|
-
|
|
45
|
+
y,
|
|
45
46
|
[
|
|
46
47
|
l(t.$slots, "default")
|
|
47
48
|
],
|
|
48
49
|
512
|
|
49
50
|
/* NEED_PATCH */
|
|
50
51
|
), [
|
|
51
|
-
[i, !
|
|
52
|
+
[i, !e.props.loading]
|
|
52
53
|
])
|
|
53
54
|
],
|
|
54
|
-
|
|
55
|
-
/* CLASS */
|
|
55
|
+
6
|
|
56
|
+
/* CLASS, STYLE */
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
|
-
const E = /* @__PURE__ */
|
|
59
|
+
const E = /* @__PURE__ */ k(m, [["render", S], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-skeleton/NmorphSkeleton.vue"]]);
|
|
59
60
|
export {
|
|
60
61
|
E as default
|
|
61
62
|
};
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import './NmorphSkeleton.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
2
|
+
import { defineComponent as d, computed as o } from "vue";
|
|
3
|
+
import { useModifiers as l } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import s from "./components/NmorphSkeletonItem.vue.js";
|
|
5
|
+
const f = /* @__PURE__ */ d({
|
|
6
6
|
__name: "NmorphSkeleton",
|
|
7
7
|
props: {
|
|
8
8
|
animated: { type: Boolean, required: !1, default: !0 },
|
|
9
9
|
loading: { type: Boolean, required: !1, default: !0 },
|
|
10
|
-
rows: { type: Number, required: !1, default: 0 }
|
|
10
|
+
rows: { type: Number, required: !1, default: 0 },
|
|
11
|
+
loadingGradient: { type: String, required: !1, default: void 0 }
|
|
11
12
|
},
|
|
12
|
-
setup(
|
|
13
|
-
|
|
14
|
-
const e =
|
|
15
|
-
() =>
|
|
13
|
+
setup(r, { expose: n }) {
|
|
14
|
+
n();
|
|
15
|
+
const e = r, a = o(
|
|
16
|
+
() => l({
|
|
16
17
|
"nmorph-skeleton": [`${e.animated && e.loading && "loading"}`]
|
|
17
18
|
})
|
|
18
|
-
),
|
|
19
|
-
|
|
19
|
+
), i = o(() => ({
|
|
20
|
+
...e.loadingGradient !== void 0 && { "--loading-gradient": e.loadingGradient }
|
|
21
|
+
})), t = { props: e, modifiers: a, styles: i, get NmorphSkeletonItem() {
|
|
22
|
+
return s;
|
|
20
23
|
} };
|
|
21
24
|
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
22
25
|
}
|
|
23
26
|
});
|
|
24
27
|
export {
|
|
25
|
-
|
|
28
|
+
f as default
|
|
26
29
|
};
|