@nmorph/nmorph-ui-kit 2.2.19 → 2.2.21
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/assets/icons/forward-filled.svg.js +21 -0
- package/dist/assets/icons/forward.svg.js +24 -0
- package/dist/assets/icons/reply-filled.svg.js +21 -0
- package/dist/assets/icons/reply.svg.js +24 -0
- package/dist/assets/icons/send-filled.svg.js +21 -0
- package/dist/assets/icons/send.svg.js +21 -0
- 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 +51 -45
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +74 -62
- 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/icons.js +377 -365
- package/dist/index.es.js +666 -650
- package/dist/index.umd.js +99 -33
- 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-icon/NmorphIcons.d.ts +6 -0
- 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 +10 -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,29 +1,30 @@
|
|
|
1
1
|
import './NmorphCollapseItem.css';
|
|
2
2
|
import i from "./NmorphCollapseItem.vue2.js";
|
|
3
|
-
import { openBlock as
|
|
3
|
+
import { openBlock as n, createElementBlock as a, normalizeStyle as l, normalizeClass as r, createElementVNode as o, withModifiers as c, renderSlot as s, createTextVNode as m, toDisplayString as p } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import d from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const _ = {
|
|
7
7
|
ref: "collapseItemDOMElContent",
|
|
8
8
|
class: "nmorph-collapse-item__inner-wrapper"
|
|
9
9
|
};
|
|
10
|
-
function f(t, h,
|
|
11
|
-
return
|
|
10
|
+
function f(t, h, y, e, k, v) {
|
|
11
|
+
return n(), a(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
|
-
class:
|
|
15
|
-
|
|
14
|
+
class: r(e.modifiers),
|
|
15
|
+
style: l(e.styles)
|
|
16
16
|
},
|
|
17
17
|
[
|
|
18
18
|
o(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
|
-
class:
|
|
21
|
+
class: r(["nmorph-collapse-item__title", e.titleModifiers]),
|
|
22
|
+
onClick: c(e.clickHandler, ["stop"])
|
|
22
23
|
},
|
|
23
24
|
[
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
s(t.$slots, "title", {}, () => [
|
|
26
|
+
m(
|
|
27
|
+
p(e.props.title),
|
|
27
28
|
1
|
|
28
29
|
/* TEXT */
|
|
29
30
|
)
|
|
@@ -36,14 +37,14 @@ function f(t, h, k, e, v, C) {
|
|
|
36
37
|
"div",
|
|
37
38
|
{
|
|
38
39
|
class: "nmorph-collapse-item__content",
|
|
39
|
-
style:
|
|
40
|
+
style: l({ height: `${e.contentHeight}px` })
|
|
40
41
|
},
|
|
41
42
|
[
|
|
42
43
|
o(
|
|
43
44
|
"div",
|
|
44
45
|
_,
|
|
45
46
|
[
|
|
46
|
-
|
|
47
|
+
s(t.$slots, "default")
|
|
47
48
|
],
|
|
48
49
|
512
|
|
49
50
|
/* NEED_PATCH */
|
|
@@ -53,8 +54,8 @@ function f(t, h, k, e, v, C) {
|
|
|
53
54
|
/* STYLE */
|
|
54
55
|
)
|
|
55
56
|
],
|
|
56
|
-
|
|
57
|
-
/* CLASS */
|
|
57
|
+
6
|
|
58
|
+
/* CLASS, STYLE */
|
|
58
59
|
);
|
|
59
60
|
}
|
|
60
61
|
const E = /* @__PURE__ */ d(i, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue"]]);
|
|
@@ -1,45 +1,60 @@
|
|
|
1
1
|
import './NmorphCollapseItem.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { NmorphComponentHeight as
|
|
5
|
-
const
|
|
2
|
+
import { defineComponent as H, ref as u, computed as d, inject as b, onMounted as z, onBeforeUnmount as M, watch as h, nextTick as w } from "vue";
|
|
3
|
+
import { useModifiers as g } from "../../../../../utils/create-modifiers.js";
|
|
4
|
+
import { NmorphComponentHeight as $ } from "../../../../../types/index.js";
|
|
5
|
+
const D = /* @__PURE__ */ H({
|
|
6
6
|
__name: "NmorphCollapseItem",
|
|
7
7
|
props: {
|
|
8
8
|
height: { type: null, required: !1, default: "basic" },
|
|
9
|
-
block: { type: Boolean, required: !1, default: !
|
|
9
|
+
block: { type: Boolean, required: !1, default: !1 },
|
|
10
|
+
transitionSpeed: { type: [Number, String], required: !1, default: void 0 },
|
|
10
11
|
name: { type: String, required: !0 },
|
|
11
12
|
title: { type: String, required: !1, default: "" },
|
|
12
13
|
disabled: { type: Boolean, required: !1, default: !1 }
|
|
13
14
|
},
|
|
14
15
|
emits: ["click-item"],
|
|
15
|
-
setup(
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
() =>
|
|
19
|
-
"nmorph-collapse-item": [
|
|
16
|
+
setup(y, { expose: O, emit: _ }) {
|
|
17
|
+
O();
|
|
18
|
+
const e = y, p = _, n = u(!1), k = d(
|
|
19
|
+
() => g({
|
|
20
|
+
"nmorph-collapse-item": [
|
|
21
|
+
`${e.disabled && "disabled"}`,
|
|
22
|
+
`${e.block && "block"}`,
|
|
23
|
+
`${n.value && "is-open"}`
|
|
24
|
+
]
|
|
20
25
|
})
|
|
21
|
-
),
|
|
22
|
-
() =>
|
|
23
|
-
nmorph: [
|
|
26
|
+
), S = d(
|
|
27
|
+
() => g({
|
|
28
|
+
nmorph: [$[e.height]]
|
|
24
29
|
})
|
|
25
|
-
),
|
|
26
|
-
|
|
30
|
+
), c = (t) => typeof t == "number" ? `${t}ms` : t, C = d(() => ({
|
|
31
|
+
...e.transitionSpeed !== void 0 && { "--transition-speed": c(e.transitionSpeed) }
|
|
32
|
+
})), o = b("collapse-data"), m = b("update-model"), r = u(null), f = u(0);
|
|
33
|
+
let s = null;
|
|
34
|
+
const l = (t) => Array.isArray(t) ? t.includes(e.name) : t === e.name, a = () => {
|
|
35
|
+
f.value = n.value && r.value ? r.value.scrollHeight : 0;
|
|
36
|
+
}, i = () => w(a), q = () => {
|
|
37
|
+
e.disabled || e.block || (n.value = !n.value, m?.(e.name, n.value), p("click-item", { id: e.name, isOpen: n.value }));
|
|
27
38
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}),
|
|
31
|
-
()
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
z(() => {
|
|
40
|
+
n.value = l(o?.value), i(), "ResizeObserver" in window && r.value && (s = new ResizeObserver(a), s.observe(r.value));
|
|
41
|
+
}), M(() => {
|
|
42
|
+
s?.disconnect();
|
|
43
|
+
}), h(
|
|
44
|
+
() => o?.value,
|
|
45
|
+
(t) => {
|
|
46
|
+
n.value = l(t), i();
|
|
34
47
|
},
|
|
35
48
|
{ deep: !0 }
|
|
36
|
-
),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
), h(n, i);
|
|
50
|
+
const v = { props: e, emit: p, isOpen: n, modifiers: k, titleModifiers: S, getCssDuration: c, styles: C, collapseData: o, updateModel: m, collapseItemDOMElContent: r, contentHeight: f, get resizeObserver() {
|
|
51
|
+
return s;
|
|
52
|
+
}, set resizeObserver(t) {
|
|
53
|
+
s = t;
|
|
54
|
+
}, isValueOpen: l, updateContentHeight: a, updateContentHeightAfterRender: i, clickHandler: q };
|
|
55
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
41
56
|
}
|
|
42
57
|
});
|
|
43
58
|
export {
|
|
44
|
-
|
|
59
|
+
D as default
|
|
45
60
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nmorph-empty{display:flex;flex-direction:column;gap:8px;justify-content:center;align-items:center;box-sizing:border-box;width:100%;min-height:var(--nmorph-empty-min-height);padding:var(--nmorph-empty-padding);color:var(--nmorph-text-color);text-align:center;border-radius:var(--default-border-radius)}.nmorph-empty .nmorph-empty__icon{display:flex;justify-content:center;align-items:center;width:var(--nmorph-empty-icon-size);height:var(--nmorph-empty-icon-size);color:var(--nmorph-semi-contrast-text-color)}.nmorph-empty .nmorph-empty__icon .nmorph-icon{--color: var(--nmorph-semi-contrast-text-color)}.nmorph-empty .nmorph-empty__title{font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-regular)}.nmorph-empty .nmorph-empty__description{max-width:420px;color:var(--nmorph-semi-contrast-text-color);font-weight:400;font-size:var(--font-size-small);line-height:var(--line-height-loose)}.nmorph-empty .nmorph-empty__action{display:flex;justify-content:center;margin-top:4px}.nmorph-empty.nmorph-empty--nmorph{background:var(--nmorph-main-color)}.nmorph-empty.nmorph-empty--nmorph.nmorph--shadow-inset{box-shadow:var(--nmorph-shadow-inset)}.nmorph-empty.nmorph-empty--nmorph.nmorph--shadow-outset{box-shadow:var(--nmorph-shadow-outset)}.nmorph-empty.nmorph-empty--common{border:1px solid var(--nmorph-gray-color)}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import './NmorphEmpty.css';
|
|
2
|
+
import c from "./NmorphEmpty.vue2.js";
|
|
3
|
+
import { openBlock as t, createElementBlock as i, normalizeStyle as m, normalizeClass as d, renderSlot as r, createVNode as n, withCtx as p, createCommentVNode as s, createElementVNode as h, createTextVNode as l, toDisplayString as a } from "vue";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const y = ["role", "aria-label"], f = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "nmorph-empty__icon",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, v = { class: "nmorph-empty__title" }, N = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "nmorph-empty__description"
|
|
13
|
+
}, S = {
|
|
14
|
+
key: 2,
|
|
15
|
+
class: "nmorph-empty__action"
|
|
16
|
+
};
|
|
17
|
+
function k(e, z, b, o, g, C) {
|
|
18
|
+
return t(), i("div", {
|
|
19
|
+
class: d(o.modifiers),
|
|
20
|
+
style: m(o.styles),
|
|
21
|
+
role: o.props.role,
|
|
22
|
+
"aria-label": o.label
|
|
23
|
+
}, [
|
|
24
|
+
o.hasIcon ? (t(), i("div", f, [
|
|
25
|
+
r(e.$slots, "icon", {}, () => [
|
|
26
|
+
n(o.NmorphIcon, {
|
|
27
|
+
width: o.getCssSize(o.props.iconSize),
|
|
28
|
+
height: o.getCssSize(o.props.iconSize)
|
|
29
|
+
}, {
|
|
30
|
+
default: p(() => [
|
|
31
|
+
n(o.NmorphIconFolderOpened)
|
|
32
|
+
]),
|
|
33
|
+
_: 1
|
|
34
|
+
/* STABLE */
|
|
35
|
+
}, 8, ["width", "height"])
|
|
36
|
+
])
|
|
37
|
+
])) : s("v-if", !0),
|
|
38
|
+
h("div", v, [
|
|
39
|
+
r(e.$slots, "title", {}, () => [
|
|
40
|
+
l(
|
|
41
|
+
a(o.props.title),
|
|
42
|
+
1
|
|
43
|
+
/* TEXT */
|
|
44
|
+
)
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
o.hasDescription ? (t(), i("div", N, [
|
|
48
|
+
r(e.$slots, "description", {}, () => [
|
|
49
|
+
l(
|
|
50
|
+
a(o.props.description),
|
|
51
|
+
1
|
|
52
|
+
/* TEXT */
|
|
53
|
+
)
|
|
54
|
+
])
|
|
55
|
+
])) : s("v-if", !0),
|
|
56
|
+
o.slots.action ? (t(), i("div", S, [
|
|
57
|
+
r(e.$slots, "action")
|
|
58
|
+
])) : s("v-if", !0)
|
|
59
|
+
], 14, y);
|
|
60
|
+
}
|
|
61
|
+
const B = /* @__PURE__ */ _(c, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-empty/NmorphEmpty.vue"]]);
|
|
62
|
+
export {
|
|
63
|
+
B as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import './NmorphEmpty.css';
|
|
2
|
+
import { defineComponent as f, useSlots as c, computed as t } from "vue";
|
|
3
|
+
import { NmorphShadowType as h } from "../../../types/index.js";
|
|
4
|
+
import { useModifiers as y } from "../../../utils/create-modifiers.js";
|
|
5
|
+
import g from "../../../assets/icons/folder-opened.svg.js";
|
|
6
|
+
import S from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
7
|
+
const z = /* @__PURE__ */ f({
|
|
8
|
+
__name: "NmorphEmpty",
|
|
9
|
+
props: {
|
|
10
|
+
title: { type: String, required: !1, default: "No data" },
|
|
11
|
+
description: { type: String, required: !1, default: "" },
|
|
12
|
+
iconSize: { type: [Number, String], required: !1, default: 56 },
|
|
13
|
+
minHeight: { type: [Number, String], required: !1, default: 160 },
|
|
14
|
+
padding: { type: [Number, String], required: !1, default: "var(--indentation-05)" },
|
|
15
|
+
design: { type: String, required: !1, default: "nmorph" },
|
|
16
|
+
shadowType: { type: null, required: !1, default: "inset" },
|
|
17
|
+
hideIcon: { type: Boolean, required: !1, default: !1 },
|
|
18
|
+
role: { type: String, required: !1, default: "status" },
|
|
19
|
+
ariaLabel: { type: String, required: !1, default: void 0 },
|
|
20
|
+
ariaOrientation: { type: String, required: !1, default: void 0 }
|
|
21
|
+
},
|
|
22
|
+
setup(p, { expose: s }) {
|
|
23
|
+
s();
|
|
24
|
+
const e = p, o = c(), r = (i) => typeof i == "number" ? `${i}px` : i, a = t(() => !e.hideIcon || !!o.icon), d = t(() => !!(e.description || o.description)), l = t(() => e.ariaLabel || e.title), m = t(
|
|
25
|
+
() => y({
|
|
26
|
+
nmorph: [e.design === "nmorph" ? h[e.shadowType] : ""],
|
|
27
|
+
"nmorph-empty": [e.design]
|
|
28
|
+
})
|
|
29
|
+
), u = t(() => ({
|
|
30
|
+
"--nmorph-empty-icon-size": r(e.iconSize),
|
|
31
|
+
"--nmorph-empty-min-height": r(e.minHeight),
|
|
32
|
+
"--nmorph-empty-padding": r(e.padding)
|
|
33
|
+
})), n = { props: e, slots: o, getCssSize: r, hasIcon: a, hasDescription: d, label: l, modifiers: m, styles: u, get NmorphIcon() {
|
|
34
|
+
return S;
|
|
35
|
+
}, get NmorphIconFolderOpened() {
|
|
36
|
+
return g;
|
|
37
|
+
} };
|
|
38
|
+
return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
z as default
|
|
43
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-image-preview{--width: 50px;--height: 50px;width:var(--width);height:var(--height);overflow:hidden}.nmorph-image-preview .nmorph-image-preview__trigger{position:relative;width:100%;height:100%;cursor:pointer}.nmorph-image-preview .nmorph-image-preview__trigger:hover{filter:brightness(.8)}.nmorph-image-preview .nmorph-image-preview__trigger .nmorph-image{width:100%;height:100%}.nmorph-image-preview__portal{display:contents}.nmorph-image-preview__portal .nmorph-image-preview__content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:var(--transition-04) opacity ease-in-out}.nmorph-image-preview__portal .nmorph-image-preview__actions{position:absolute;bottom:-50px;left:50%;z-index:2;display:flex;height:0;transform:translate(-50%);transition:ease-in-out bottom var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__action-element{margin-right:var(--indentation-03)}.nmorph-image-preview__portal .nmorph-button__content{box-shadow:none}.nmorph-image-preview__portal .nmorph-image-preview__left,.nmorph-image-preview__portal .nmorph-image-preview__right{z-index:2}.nmorph-image-preview__portal .nmorph-image-preview__left{position:absolute;top:50%;left:-100%;transform:rotate(90deg) translate(-50%);transition:ease-in-out left var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__right{position:absolute;top:50%;right:-100%;transform:rotate(270deg) translate(50%);transition:ease-in-out right var(--transition-03)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__actions{bottom:50px}.nmorph-image-preview__portal.nmorph-image-preview--opened{--nmorph-image-preview-btn-margin: 20px}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__left{left:var(--nmorph-image-preview-btn-margin)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__right{right:var(--nmorph-image-preview-btn-margin)}
|
|
1
|
+
.nmorph-image-preview{--width: 50px;--height: 50px;width:var(--width);height:var(--height);overflow:hidden}.nmorph-image-preview .nmorph-image-preview__trigger{position:relative;width:100%;height:100%;cursor:pointer}.nmorph-image-preview .nmorph-image-preview__trigger:hover{filter:brightness(.8)}.nmorph-image-preview .nmorph-image-preview__trigger .nmorph-image{width:100%;height:100%}.nmorph-image-preview__portal{display:contents}.nmorph-image-preview__portal .nmorph-image-preview__content{position:absolute;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:min(100vw - 96px,960px);height:min(100vh - 180px,720px);transform:translate(-50%,-50%);transition:var(--transition-04) opacity ease-in-out}.nmorph-image-preview__portal .nmorph-image-preview__content .nmorph-image{width:100%;height:100%}.nmorph-image-preview__portal .nmorph-image-preview__content .nmorph-image img{width:100%;height:100%;object-fit:contain}.nmorph-image-preview__portal .nmorph-image-preview__actions{position:absolute;bottom:-50px;left:50%;z-index:2;display:flex;height:0;transform:translate(-50%);transition:ease-in-out bottom var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__action-element{margin-right:var(--indentation-03)}.nmorph-image-preview__portal .nmorph-button__content{box-shadow:none}.nmorph-image-preview__portal .nmorph-image-preview__left,.nmorph-image-preview__portal .nmorph-image-preview__right{z-index:2}.nmorph-image-preview__portal .nmorph-image-preview__left{position:absolute;top:50%;left:-100%;transform:rotate(90deg) translate(-50%);transition:ease-in-out left var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__right{position:absolute;top:50%;right:-100%;transform:rotate(270deg) translate(50%);transition:ease-in-out right var(--transition-03)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__actions{bottom:50px}.nmorph-image-preview__portal.nmorph-image-preview--opened{--nmorph-image-preview-btn-margin: 20px}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__left{left:var(--nmorph-image-preview-btn-margin)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__right{right:var(--nmorph-image-preview-btn-margin)}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import './NmorphImagePreview.css';
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as
|
|
2
|
+
import p from "./NmorphImagePreview.vue2.js";
|
|
3
|
+
import { openBlock as n, createElementBlock as i, Fragment as h, normalizeStyle as m, normalizeClass as v, createElementVNode as a, createVNode as e, createSlots as _, withCtx as r, renderSlot as t, createCommentVNode as d, createBlock as c, Teleport as k, renderList as w, resolveDynamicComponent as g } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import y from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const N = { class: "nmorph-image-preview__content" }, C = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "nmorph-image-preview__left"
|
|
9
9
|
}, I = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "nmorph-image-preview__right"
|
|
12
|
-
}, S = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
}, S = {
|
|
13
|
+
key: 2,
|
|
14
|
+
class: "nmorph-image-preview__actions"
|
|
15
|
+
}, b = { class: "nmorph-image-preview__action-element" };
|
|
16
|
+
function B(l, z, D, o, H, L) {
|
|
17
|
+
return n(), i(
|
|
18
|
+
h,
|
|
16
19
|
null,
|
|
17
20
|
[
|
|
18
|
-
o.props.showTrigger ? (
|
|
21
|
+
o.props.showTrigger ? (n(), i(
|
|
19
22
|
"div",
|
|
20
23
|
{
|
|
21
24
|
key: 0,
|
|
22
|
-
class:
|
|
25
|
+
class: v(o.modifiers),
|
|
26
|
+
style: m(o.triggerStyle)
|
|
23
27
|
},
|
|
24
28
|
[
|
|
25
|
-
|
|
29
|
+
a("div", {
|
|
26
30
|
class: "nmorph-image-preview__trigger",
|
|
27
31
|
onClick: o.clickHandler
|
|
28
32
|
}, [
|
|
@@ -35,69 +39,71 @@ function B(n, z, D, o, H, L) {
|
|
|
35
39
|
_: 2
|
|
36
40
|
/* DYNAMIC */
|
|
37
41
|
}, [
|
|
38
|
-
|
|
42
|
+
l.$slots.loading ? {
|
|
39
43
|
name: "loading",
|
|
40
44
|
fn: r(() => [
|
|
41
|
-
|
|
45
|
+
t(l.$slots, "loading")
|
|
42
46
|
]),
|
|
43
47
|
key: "0"
|
|
44
48
|
} : void 0,
|
|
45
|
-
|
|
49
|
+
l.$slots.error ? {
|
|
46
50
|
name: "error",
|
|
47
51
|
fn: r(() => [
|
|
48
|
-
|
|
52
|
+
t(l.$slots, "error")
|
|
49
53
|
]),
|
|
50
54
|
key: "1"
|
|
51
55
|
} : void 0
|
|
52
56
|
]), 1032, ["src", "alt"])
|
|
53
57
|
])
|
|
54
58
|
],
|
|
55
|
-
|
|
56
|
-
/* CLASS */
|
|
57
|
-
)) :
|
|
58
|
-
(
|
|
59
|
-
|
|
59
|
+
6
|
|
60
|
+
/* CLASS, STYLE */
|
|
61
|
+
)) : d("v-if", !0),
|
|
62
|
+
(n(), c(k, { to: "body" }, [
|
|
63
|
+
a(
|
|
60
64
|
"div",
|
|
61
65
|
{
|
|
62
|
-
class:
|
|
66
|
+
class: v(["nmorph-image-preview__portal", o.modifiers]),
|
|
67
|
+
style: m(o.portalStyle)
|
|
63
68
|
},
|
|
64
69
|
[
|
|
65
70
|
e(o.NmorphOverlay, {
|
|
66
71
|
show: o.open,
|
|
67
72
|
"z-index": o.props.zIndex,
|
|
73
|
+
"disabled-teleport": "",
|
|
68
74
|
"trap-focus": "",
|
|
69
75
|
onOnOutsideClick: o.closeHandler,
|
|
70
76
|
onOnEscapeKeydown: o.closeHandler
|
|
71
77
|
}, {
|
|
72
78
|
default: r(() => [
|
|
73
|
-
|
|
79
|
+
a("div", N, [
|
|
74
80
|
e(o.NmorphImage, {
|
|
75
81
|
src: o.triggerSource,
|
|
76
82
|
alt: o.props.alt,
|
|
77
|
-
fit: "
|
|
83
|
+
fit: "contain",
|
|
78
84
|
"frame-border": 0,
|
|
79
|
-
style:
|
|
85
|
+
style: m({ transform: `rotate(${o.rotateLevel}deg) scale(${o.scaleLevel})` })
|
|
80
86
|
}, _({
|
|
81
87
|
_: 2
|
|
82
88
|
/* DYNAMIC */
|
|
83
89
|
}, [
|
|
84
|
-
|
|
90
|
+
l.$slots.loading ? {
|
|
85
91
|
name: "loading",
|
|
86
92
|
fn: r(() => [
|
|
87
|
-
|
|
93
|
+
t(l.$slots, "loading")
|
|
88
94
|
]),
|
|
89
95
|
key: "0"
|
|
90
96
|
} : void 0,
|
|
91
|
-
|
|
97
|
+
l.$slots.error ? {
|
|
92
98
|
name: "error",
|
|
93
99
|
fn: r(() => [
|
|
94
|
-
|
|
100
|
+
t(l.$slots, "error")
|
|
95
101
|
]),
|
|
96
102
|
key: "1"
|
|
97
103
|
} : void 0
|
|
98
104
|
]), 1032, ["src", "alt", "style"])
|
|
99
105
|
]),
|
|
100
|
-
o.
|
|
106
|
+
o.showNavigation ? (n(), i("div", C, [
|
|
101
107
|
e(o.NmorphButton, { onClick: o.previousHandler }, {
|
|
102
108
|
default: r(() => [
|
|
103
109
|
e(o.NmorphIcon, null, {
|
|
@@ -111,8 +117,8 @@ function B(n, z, D, o, H, L) {
|
|
|
111
117
|
_: 1
|
|
112
118
|
/* STABLE */
|
|
113
119
|
})
|
|
114
|
-
])) :
|
|
115
|
-
o.
|
|
120
|
+
])) : d("v-if", !0),
|
|
121
|
+
o.showNavigation ? (n(), i("div", I, [
|
|
116
122
|
e(o.NmorphButton, { onClick: o.nextHandler }, {
|
|
117
123
|
default: r(() => [
|
|
118
124
|
e(o.NmorphIcon, null, {
|
|
@@ -126,17 +132,17 @@ function B(n, z, D, o, H, L) {
|
|
|
126
132
|
_: 1
|
|
127
133
|
/* STABLE */
|
|
128
134
|
})
|
|
129
|
-
])) :
|
|
130
|
-
i("div", S, [
|
|
131
|
-
(
|
|
132
|
-
|
|
135
|
+
])) : d("v-if", !0),
|
|
136
|
+
o.props.showActionBar ? (n(), i("div", S, [
|
|
137
|
+
(n(), i(
|
|
138
|
+
h,
|
|
133
139
|
null,
|
|
134
|
-
w(o.actions, (
|
|
140
|
+
w(o.actions, (s, f) => a("div", {
|
|
135
141
|
key: f,
|
|
136
142
|
class: "nmorph-image-preview__action-element"
|
|
137
143
|
}, [
|
|
138
144
|
e(o.NmorphButton, {
|
|
139
|
-
onClick:
|
|
145
|
+
onClick: s.handler
|
|
140
146
|
}, {
|
|
141
147
|
default: r(() => [
|
|
142
148
|
e(
|
|
@@ -144,7 +150,7 @@ function B(n, z, D, o, H, L) {
|
|
|
144
150
|
null,
|
|
145
151
|
{
|
|
146
152
|
default: r(() => [
|
|
147
|
-
(
|
|
153
|
+
(n(), c(g(s.icon)))
|
|
148
154
|
]),
|
|
149
155
|
_: 2
|
|
150
156
|
/* DYNAMIC */
|
|
@@ -160,7 +166,7 @@ function B(n, z, D, o, H, L) {
|
|
|
160
166
|
64
|
|
161
167
|
/* STABLE_FRAGMENT */
|
|
162
168
|
)),
|
|
163
|
-
|
|
169
|
+
a("div", b, [
|
|
164
170
|
e(o.NmorphButton, {
|
|
165
171
|
disabled: o.scaleLevel === 1,
|
|
166
172
|
onClick: o.enlargeShrinkActionData.handler
|
|
@@ -168,7 +174,7 @@ function B(n, z, D, o, H, L) {
|
|
|
168
174
|
default: r(() => [
|
|
169
175
|
e(o.NmorphIcon, null, {
|
|
170
176
|
default: r(() => [
|
|
171
|
-
(
|
|
177
|
+
(n(), c(g(o.enlargeShrinkActionData.icon)))
|
|
172
178
|
]),
|
|
173
179
|
_: 1
|
|
174
180
|
/* STABLE */
|
|
@@ -178,14 +184,14 @@ function B(n, z, D, o, H, L) {
|
|
|
178
184
|
/* STABLE */
|
|
179
185
|
}, 8, ["disabled", "onClick"])
|
|
180
186
|
])
|
|
181
|
-
])
|
|
187
|
+
])) : d("v-if", !0)
|
|
182
188
|
]),
|
|
183
189
|
_: 3
|
|
184
190
|
/* FORWARDED */
|
|
185
191
|
}, 8, ["show", "z-index"])
|
|
186
192
|
],
|
|
187
|
-
|
|
188
|
-
/* CLASS */
|
|
193
|
+
6
|
|
194
|
+
/* CLASS, STYLE */
|
|
189
195
|
)
|
|
190
196
|
]))
|
|
191
197
|
],
|
|
@@ -193,7 +199,7 @@ function B(n, z, D, o, H, L) {
|
|
|
193
199
|
/* STABLE_FRAGMENT */
|
|
194
200
|
);
|
|
195
201
|
}
|
|
196
|
-
const
|
|
202
|
+
const P = /* @__PURE__ */ y(p, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image-preview/NmorphImagePreview.vue"]]);
|
|
197
203
|
export {
|
|
198
|
-
|
|
204
|
+
P as default
|
|
199
205
|
};
|