@nmorph/nmorph-ui-kit 2.2.43 → 2.2.45
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/burger.svg.js +5 -5
- package/dist/assets/icons/download.svg.js +5 -5
- package/dist/assets/icons/open.svg.js +2 -2
- package/dist/assets/icons/search.svg.js +1 -1
- package/dist/assets/icons/smile.svg.js +4 -4
- package/dist/components/basic/nmorph-button/NmorphButton.vue.js +16 -16
- package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +179 -74
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -0
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +207 -0
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue3.js +6 -0
- package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.css +1 -0
- package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.js +405 -0
- package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue3.js +6 -0
- package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -0
- package/dist/components/data/nmorph-file-card/NmorphFileCard.vue.js +124 -0
- package/dist/components/data/nmorph-file-card/NmorphFileCard.vue3.js +6 -0
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +8 -8
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -0
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +147 -0
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue3.js +6 -0
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +154 -125
- package/dist/components/form/nmorph-file-upload/types.js +9 -9
- package/dist/hooks/use-common-styles.js +92 -12
- package/dist/index.es.js +861 -849
- package/dist/index.umd.js +108 -28
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +1 -0
- package/dist/src/components/data/index.d.ts +8 -0
- package/dist/src/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.d.ts +38 -0
- package/dist/src/components/data/nmorph-audio-preview/types.d.ts +20 -0
- package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.d.ts +25 -0
- package/dist/src/components/data/nmorph-emoji-picker/types.d.ts +51 -0
- package/dist/src/components/data/nmorph-file-card/NmorphFileCard.vue.d.ts +30 -0
- package/dist/src/components/data/nmorph-file-card/types.d.ts +18 -0
- package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +41 -0
- package/dist/src/components/data/nmorph-video-preview/types.d.ts +27 -0
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
- package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
- package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
- package/dist/src/utils/file-types.d.ts +8 -1
- package/dist/style.css +1 -1
- package/dist/utils/file-types.js +28 -21
- package/package.json +23 -24
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import './NmorphFileCard.css';
|
|
2
|
+
import { defineComponent as M, useSlots as $, computed as t, openBlock as r, createElementBlock as a, normalizeClass as F, createElementVNode as _, createBlock as v, unref as n, withCtx as c, createVNode as l, resolveDynamicComponent as R, toDisplayString as d, createCommentVNode as s, renderSlot as V } from "vue";
|
|
3
|
+
import { useModifiers as z } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { getFileExtension as E, getPlainFileType as W, getTypeCandidates as K, isKnownFileType as m } from "../../../utils/file-types.js";
|
|
5
|
+
import { NmorphImageResolution as O, NmorphAudioResolution as j, NmorphVideoResolution as G, NmorphArchiveResolution as P, NmorphDocResolution as q } from "../../form/nmorph-file-upload/types.js";
|
|
6
|
+
import J from "../../../assets/icons/image.svg.js";
|
|
7
|
+
import Q from "../../../assets/icons/video.svg.js";
|
|
8
|
+
import U from "../../../assets/icons/archive.svg.js";
|
|
9
|
+
import g from "../../../assets/icons/doc.svg.js";
|
|
10
|
+
import p from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import X from "../../../assets/icons/audio.svg.js";
|
|
13
|
+
import Y from "../../../assets/icons/loading.svg.js";
|
|
14
|
+
import Z from "../../../assets/icons/open.svg.js";
|
|
15
|
+
import ee from "../../../assets/icons/download.svg.js";
|
|
16
|
+
const oe = { class: "nmorph-file-card__icon" }, re = { class: "nmorph-file-card__body" }, te = { class: "nmorph-file-card__name" }, ae = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "nmorph-file-card__error"
|
|
19
|
+
}, ne = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "nmorph-file-card__meta"
|
|
22
|
+
}, ie = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "nmorph-file-card__badge"
|
|
25
|
+
}, le = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "nmorph-file-card__actions"
|
|
28
|
+
}, se = ["href", "aria-label"], me = ["href", "download", "aria-label"], Te = /* @__PURE__ */ M({
|
|
29
|
+
__name: "NmorphFileCard",
|
|
30
|
+
props: {
|
|
31
|
+
name: {},
|
|
32
|
+
extension: { default: "" },
|
|
33
|
+
mimeType: { default: "" },
|
|
34
|
+
size: { default: void 0 },
|
|
35
|
+
previewSrc: { default: "" },
|
|
36
|
+
downloadHref: { default: "" },
|
|
37
|
+
compact: { type: Boolean, default: !1 },
|
|
38
|
+
loading: { type: Boolean, default: !1 },
|
|
39
|
+
error: { type: Boolean, default: !1 },
|
|
40
|
+
errorText: { default: "" },
|
|
41
|
+
showDefaultActions: { type: Boolean, default: !0 }
|
|
42
|
+
},
|
|
43
|
+
emits: ["open", "download", "error"],
|
|
44
|
+
setup(k, { emit: B }) {
|
|
45
|
+
const e = k, y = B, T = $(), f = t(() => (e.extension || E(e.name) || W(e.mimeType)).toLowerCase()), i = t(() => K(e.mimeType, e.name)), C = t(() => e.mimeType.toLowerCase().startsWith("image/") || i.value.some((o) => m(o, O)) ? J : e.mimeType.toLowerCase().startsWith("audio/") || i.value.some((o) => m(o, j)) ? X : e.mimeType.toLowerCase().startsWith("video/") || i.value.some((o) => m(o, G)) ? Q : i.value.some((o) => m(o, P)) ? U : i.value.some((o) => m(o, q)) ? g : g), x = (o) => {
|
|
46
|
+
if (o === void 0 || Number.isNaN(o) || o < 0) return "";
|
|
47
|
+
if (o === 0) return "0 B";
|
|
48
|
+
const u = ["B", "KB", "MB", "GB", "TB"], h = Math.min(Math.floor(Math.log(o) / Math.log(1024)), u.length - 1), N = o / 1024 ** h, L = N >= 10 || h === 0 ? 0 : 1;
|
|
49
|
+
return `${N.toFixed(L)} ${u[h]}`;
|
|
50
|
+
}, I = t(() => x(e.size)), b = t(() => f.value || e.mimeType), w = t(() => [b.value, I.value].filter(Boolean).join(" · ")), S = t(
|
|
51
|
+
() => !!T.actions || e.showDefaultActions && (e.previewSrc || e.downloadHref)
|
|
52
|
+
), D = t(
|
|
53
|
+
() => z({
|
|
54
|
+
"nmorph-file-card": [e.compact && "compact", e.loading && "loading", e.error && "error"]
|
|
55
|
+
})
|
|
56
|
+
), A = () => y("open"), H = () => y("download");
|
|
57
|
+
return (o, u) => (r(), a("div", {
|
|
58
|
+
class: F(D.value)
|
|
59
|
+
}, [
|
|
60
|
+
_("div", oe, [
|
|
61
|
+
e.loading ? (r(), v(n(p), {
|
|
62
|
+
key: 0,
|
|
63
|
+
size: "medium"
|
|
64
|
+
}, {
|
|
65
|
+
default: c(() => [
|
|
66
|
+
l(n(Y))
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})) : (r(), v(n(p), {
|
|
70
|
+
key: 1,
|
|
71
|
+
size: "medium"
|
|
72
|
+
}, {
|
|
73
|
+
default: c(() => [
|
|
74
|
+
(r(), v(R(C.value)))
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
}))
|
|
78
|
+
]),
|
|
79
|
+
_("div", re, [
|
|
80
|
+
_("span", te, d(e.name), 1),
|
|
81
|
+
e.error && e.errorText ? (r(), a("span", ae, d(e.errorText), 1)) : w.value ? (r(), a("span", ne, d(w.value), 1)) : s("", !0)
|
|
82
|
+
]),
|
|
83
|
+
f.value ? (r(), a("span", ie, d(f.value), 1)) : s("", !0),
|
|
84
|
+
S.value ? (r(), a("div", le, [
|
|
85
|
+
V(o.$slots, "actions", {}, () => [
|
|
86
|
+
e.previewSrc ? (r(), a("a", {
|
|
87
|
+
key: 0,
|
|
88
|
+
href: e.previewSrc,
|
|
89
|
+
target: "_blank",
|
|
90
|
+
rel: "noopener noreferrer",
|
|
91
|
+
class: "nmorph-file-card__action-link",
|
|
92
|
+
"aria-label": `Open ${e.name}`,
|
|
93
|
+
onClick: A
|
|
94
|
+
}, [
|
|
95
|
+
l(n(p), { size: "small" }, {
|
|
96
|
+
default: c(() => [
|
|
97
|
+
l(n(Z))
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
], 8, se)) : s("", !0),
|
|
102
|
+
e.downloadHref ? (r(), a("a", {
|
|
103
|
+
key: 1,
|
|
104
|
+
href: e.downloadHref,
|
|
105
|
+
download: e.name,
|
|
106
|
+
class: "nmorph-file-card__action-link",
|
|
107
|
+
"aria-label": `Download ${e.name}`,
|
|
108
|
+
onClick: H
|
|
109
|
+
}, [
|
|
110
|
+
l(n(p), { size: "small" }, {
|
|
111
|
+
default: c(() => [
|
|
112
|
+
l(n(ee))
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
})
|
|
116
|
+
], 8, me)) : s("", !0)
|
|
117
|
+
])
|
|
118
|
+
])) : s("", !0)
|
|
119
|
+
], 2));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export {
|
|
123
|
+
Te as default
|
|
124
|
+
};
|
|
@@ -6,10 +6,10 @@ import n from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
|
6
6
|
import z from "../nmorph-avatar/NmorphAvatar.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import M from "../../../assets/icons/mic.svg.js";
|
|
9
|
-
import V from "../../../assets/icons/
|
|
10
|
-
import C from "../../../assets/icons/
|
|
11
|
-
import I from "../../../assets/icons/
|
|
12
|
-
import w from "../../../assets/icons/
|
|
9
|
+
import V from "../../../assets/icons/share.svg.js";
|
|
10
|
+
import C from "../../../assets/icons/pin.svg.js";
|
|
11
|
+
import I from "../../../assets/icons/loader.svg.js";
|
|
12
|
+
import w from "../../../assets/icons/video.svg.js";
|
|
13
13
|
const T = ["src", "muted", "autoplay", "playsinline"], D = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "nmorph-media-tile__fallback"
|
|
@@ -105,7 +105,7 @@ const T = ["src", "muted", "autoplay", "playsinline"], D = {
|
|
|
105
105
|
size: "large"
|
|
106
106
|
}, {
|
|
107
107
|
default: s(() => [
|
|
108
|
-
r(t(
|
|
108
|
+
r(t(I))
|
|
109
109
|
]),
|
|
110
110
|
_: 1
|
|
111
111
|
})) : e.avatarSrc ? (a(), u(t(z), {
|
|
@@ -129,7 +129,7 @@ const T = ["src", "muted", "autoplay", "playsinline"], D = {
|
|
|
129
129
|
e.videoOff ? (a(), o("span", U, [
|
|
130
130
|
r(t(n), { size: "small" }, {
|
|
131
131
|
default: s(() => [
|
|
132
|
-
r(t(
|
|
132
|
+
r(t(w))
|
|
133
133
|
]),
|
|
134
134
|
_: 1
|
|
135
135
|
})
|
|
@@ -137,7 +137,7 @@ const T = ["src", "muted", "autoplay", "playsinline"], D = {
|
|
|
137
137
|
e.screenSharing ? (a(), o("span", q, [
|
|
138
138
|
r(t(n), { size: "small" }, {
|
|
139
139
|
default: s(() => [
|
|
140
|
-
r(t(
|
|
140
|
+
r(t(V))
|
|
141
141
|
]),
|
|
142
142
|
_: 1
|
|
143
143
|
})
|
|
@@ -145,7 +145,7 @@ const T = ["src", "muted", "autoplay", "playsinline"], D = {
|
|
|
145
145
|
e.pinned ? (a(), o("span", A, [
|
|
146
146
|
r(t(n), { size: "small" }, {
|
|
147
147
|
default: s(() => [
|
|
148
|
-
r(t(
|
|
148
|
+
r(t(C))
|
|
149
149
|
]),
|
|
150
150
|
_: 1
|
|
151
151
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nmorph-video-preview{position:relative;display:flex;width:var(--nmorph-video-preview-width, 280px);min-width:0;max-width:100%;height:var(--nmorph-video-preview-height, 158px);overflow:hidden;color:var(--nmorph-white-color);background:color-mix(in srgb,var(--nmorph-black-color) 72%,var(--nmorph-main-color));border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-video-preview .nmorph-video-preview__media,.nmorph-video-preview .nmorph-video-preview__state{width:100%;height:100%}.nmorph-video-preview .nmorph-video-preview__media{display:block;object-fit:cover}.nmorph-video-preview.nmorph-video-preview--contain .nmorph-video-preview__media{object-fit:contain}.nmorph-video-preview .nmorph-video-preview__state{display:flex;flex-direction:column;gap:var(--indentation-02);justify-content:center;align-items:center;padding:var(--indentation-03);text-align:center}.nmorph-video-preview .nmorph-video-preview__error{max-width:100%;overflow:hidden;color:var(--nmorph-error-text-color);font-size:var(--font-size-extra-small);white-space:nowrap;text-overflow:ellipsis}.nmorph-video-preview .nmorph-video-preview__meta{position:absolute;right:0;bottom:0;left:0;display:flex;gap:var(--indentation-02);justify-content:space-between;align-items:center;padding:18px var(--indentation-03) var(--indentation-02);background:linear-gradient(transparent,color-mix(in srgb,var(--nmorph-black-color) 66%,transparent));pointer-events:none}.nmorph-video-preview .nmorph-video-preview__name,.nmorph-video-preview .nmorph-video-preview__duration{min-width:0;overflow:hidden;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-overflow:ellipsis}.nmorph-video-preview .nmorph-video-preview__name{flex:1 1 auto}.nmorph-video-preview .nmorph-video-preview__duration{flex:0 0 auto;font-variant-numeric:tabular-nums}.nmorph-video-preview .nmorph-video-preview__actions{position:absolute;top:var(--indentation-02);right:var(--indentation-02);display:flex;gap:var(--indentation-01);padding:2px;background:color-mix(in srgb,var(--nmorph-main-color) 86%,transparent);border-radius:var(--default-border-radius)}.nmorph-video-preview .nmorph-video-preview__action-link{display:inline-flex;justify-content:center;align-items:center;width:22px;height:22px;color:var(--nmorph-text-color);text-decoration:none;border-radius:var(--default-border-radius)}.nmorph-video-preview .nmorph-video-preview__action-link:hover{color:var(--nmorph-accent-color);background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent)}.nmorph-video-preview .nmorph-video-preview__action-link .nmorph-icon{--color: currentColor}.nmorph-video-preview.nmorph-video-preview--compact{width:var(--nmorph-video-preview-width, 180px);height:var(--nmorph-video-preview-height, 102px)}.nmorph-video-preview.nmorph-video-preview--error{outline:1px solid var(--nmorph-error-color)}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import './NmorphVideoPreview.css';
|
|
2
|
+
import { defineComponent as C, useSlots as b, computed as p, openBlock as o, createElementBlock as t, normalizeStyle as D, normalizeClass as H, createBlock as v, unref as a, withCtx as m, createVNode as l, toDisplayString as f, createCommentVNode as s, renderSlot as V, createElementVNode as $ } from "vue";
|
|
3
|
+
import { useModifiers as x } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssSizeVariables as I } from "../../../utils/common.js";
|
|
5
|
+
import c from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import A from "../../../assets/icons/loading.svg.js";
|
|
8
|
+
import E from "../../../assets/icons/video.svg.js";
|
|
9
|
+
import M from "../../../assets/icons/open.svg.js";
|
|
10
|
+
import P from "../../../assets/icons/download.svg.js";
|
|
11
|
+
const T = ["src", "poster", "controls", "muted", "playsinline", "preload"], O = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "nmorph-video-preview__state"
|
|
14
|
+
}, L = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "nmorph-video-preview__error"
|
|
17
|
+
}, j = {
|
|
18
|
+
key: 2,
|
|
19
|
+
class: "nmorph-video-preview__meta"
|
|
20
|
+
}, q = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "nmorph-video-preview__name"
|
|
23
|
+
}, F = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "nmorph-video-preview__duration"
|
|
26
|
+
}, G = {
|
|
27
|
+
key: 3,
|
|
28
|
+
class: "nmorph-video-preview__actions"
|
|
29
|
+
}, J = ["href", "aria-label"], K = ["href", "download", "aria-label"], re = /* @__PURE__ */ C({
|
|
30
|
+
__name: "NmorphVideoPreview",
|
|
31
|
+
props: {
|
|
32
|
+
src: {},
|
|
33
|
+
poster: { default: "" },
|
|
34
|
+
name: { default: "" },
|
|
35
|
+
width: { default: void 0 },
|
|
36
|
+
height: { default: void 0 },
|
|
37
|
+
durationMs: { default: void 0 },
|
|
38
|
+
compact: { type: Boolean, default: !1 },
|
|
39
|
+
controls: { type: Boolean, default: !0 },
|
|
40
|
+
muted: { type: Boolean, default: !1 },
|
|
41
|
+
playsinline: { type: Boolean, default: !0 },
|
|
42
|
+
preload: { default: "metadata" },
|
|
43
|
+
fit: { default: "cover" },
|
|
44
|
+
downloadHref: { default: "" },
|
|
45
|
+
loading: { type: Boolean, default: !1 },
|
|
46
|
+
error: { type: Boolean, default: !1 },
|
|
47
|
+
errorText: { default: "" },
|
|
48
|
+
showDefaultActions: { type: Boolean, default: !0 }
|
|
49
|
+
},
|
|
50
|
+
emits: ["play", "pause", "open", "download", "error"],
|
|
51
|
+
setup(_, { emit: h }) {
|
|
52
|
+
const e = _, i = h, w = b(), y = (d) => {
|
|
53
|
+
if (!d || d < 0) return "";
|
|
54
|
+
const r = Math.round(d / 1e3), n = Math.floor(r / 60), z = r % 60;
|
|
55
|
+
return `${n}:${z.toString().padStart(2, "0")}`;
|
|
56
|
+
}, u = p(() => y(e.durationMs)), k = p(
|
|
57
|
+
() => !!w.actions || e.showDefaultActions && (e.src || e.downloadHref)
|
|
58
|
+
), g = p(
|
|
59
|
+
() => x({
|
|
60
|
+
"nmorph-video-preview": [e.compact && "compact", e.fit, e.loading && "loading", e.error && "error"]
|
|
61
|
+
})
|
|
62
|
+
), B = p(
|
|
63
|
+
() => I({
|
|
64
|
+
"--nmorph-video-preview-width": e.width,
|
|
65
|
+
"--nmorph-video-preview-height": e.height
|
|
66
|
+
})
|
|
67
|
+
), N = () => i("open"), S = () => i("download");
|
|
68
|
+
return (d, r) => (o(), t("div", {
|
|
69
|
+
class: H(g.value),
|
|
70
|
+
style: D(B.value)
|
|
71
|
+
}, [
|
|
72
|
+
!e.loading && !e.error ? (o(), t("video", {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: "nmorph-video-preview__media",
|
|
75
|
+
src: e.src,
|
|
76
|
+
poster: e.poster || void 0,
|
|
77
|
+
controls: e.controls,
|
|
78
|
+
muted: e.muted,
|
|
79
|
+
playsinline: e.playsinline,
|
|
80
|
+
preload: e.preload,
|
|
81
|
+
onPlay: r[0] || (r[0] = (n) => i("play", n)),
|
|
82
|
+
onPause: r[1] || (r[1] = (n) => i("pause", n)),
|
|
83
|
+
onError: r[2] || (r[2] = (n) => i("error", n))
|
|
84
|
+
}, null, 40, T)) : (o(), t("div", O, [
|
|
85
|
+
e.loading ? (o(), v(a(c), {
|
|
86
|
+
key: 0,
|
|
87
|
+
size: "large"
|
|
88
|
+
}, {
|
|
89
|
+
default: m(() => [
|
|
90
|
+
l(a(A))
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
})) : (o(), v(a(c), {
|
|
94
|
+
key: 1,
|
|
95
|
+
size: "large"
|
|
96
|
+
}, {
|
|
97
|
+
default: m(() => [
|
|
98
|
+
l(a(E))
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
})),
|
|
102
|
+
e.error && e.errorText ? (o(), t("span", L, f(e.errorText), 1)) : s("", !0)
|
|
103
|
+
])),
|
|
104
|
+
e.name || u.value ? (o(), t("div", j, [
|
|
105
|
+
e.name ? (o(), t("span", q, f(e.name), 1)) : s("", !0),
|
|
106
|
+
u.value ? (o(), t("span", F, f(u.value), 1)) : s("", !0)
|
|
107
|
+
])) : s("", !0),
|
|
108
|
+
k.value ? (o(), t("div", G, [
|
|
109
|
+
V(d.$slots, "actions", {}, () => [
|
|
110
|
+
$("a", {
|
|
111
|
+
href: e.src,
|
|
112
|
+
target: "_blank",
|
|
113
|
+
rel: "noopener noreferrer",
|
|
114
|
+
class: "nmorph-video-preview__action-link",
|
|
115
|
+
"aria-label": `Open ${e.name || "video"}`,
|
|
116
|
+
onClick: N
|
|
117
|
+
}, [
|
|
118
|
+
l(a(c), { size: "small" }, {
|
|
119
|
+
default: m(() => [
|
|
120
|
+
l(a(M))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
], 8, J),
|
|
125
|
+
e.downloadHref ? (o(), t("a", {
|
|
126
|
+
key: 0,
|
|
127
|
+
href: e.downloadHref,
|
|
128
|
+
download: e.name,
|
|
129
|
+
class: "nmorph-video-preview__action-link",
|
|
130
|
+
"aria-label": `Download ${e.name || "video"}`,
|
|
131
|
+
onClick: S
|
|
132
|
+
}, [
|
|
133
|
+
l(a(c), { size: "small" }, {
|
|
134
|
+
default: m(() => [
|
|
135
|
+
l(a(P))
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})
|
|
139
|
+
], 8, K)) : s("", !0)
|
|
140
|
+
])
|
|
141
|
+
])) : s("", !0)
|
|
142
|
+
], 6));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export {
|
|
146
|
+
re as default
|
|
147
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-file-upload{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__trigger{position:relative;width:100%;min-width:0}.nmorph-file-upload input{display:none}.nmorph-file-upload .nmorph-file-upload__list{width:100%;min-width:0;margin-top:var(--indentation-03)}.nmorph-file-upload .nmorph-file-upload__list>div{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__file{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin-bottom:var(--indentation-02);padding:var(--indentation-02) var(--indentation-03);overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-file-upload.nmorph-file-upload--compact .nmorph-file-upload__file{padding:var(--indentation-01) var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-grid .nmorph-file-upload__list>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-grid .nmorph-file-upload__file{margin-bottom:0}.nmorph-file-upload.nmorph-file-upload--layout-inline .nmorph-file-upload__list>div{display:flex;flex-wrap:wrap;gap:var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-inline .nmorph-file-upload__file{width:auto;margin-bottom:0}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-image-preview{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-info{display:flex;flex:1 1 0;gap:var(--indentation-02);align-items:center;min-width:0;max-width:100%;overflow:hidden}.nmorph-file-upload .nmorph-file-upload__file-info>.nmorph-icon{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-name{display:block;flex:1 1 0;width:var(--nmorph-file-upload-name-width, auto);min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-upload .nmorph-file-upload__remove-file{flex:0 0 auto}
|
|
1
|
+
.nmorph-file-upload{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__trigger{position:relative;width:100%;min-width:0}.nmorph-file-upload input{display:none}.nmorph-file-upload .nmorph-file-upload__list{width:100%;min-width:0;margin-top:var(--indentation-03)}.nmorph-file-upload .nmorph-file-upload__list>div{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__file{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin-bottom:var(--indentation-02);padding:var(--indentation-02) var(--indentation-03);overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-file-upload.nmorph-file-upload--compact .nmorph-file-upload__file{padding:var(--indentation-01) var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-grid .nmorph-file-upload__list>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-grid .nmorph-file-upload__file{margin-bottom:0}.nmorph-file-upload.nmorph-file-upload--layout-inline .nmorph-file-upload__list>div{display:flex;flex-wrap:wrap;gap:var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-inline .nmorph-file-upload__file{width:auto;margin-bottom:0}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-image-preview{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-video-preview,.nmorph-file-upload .nmorph-file-upload__file>.nmorph-audio-preview,.nmorph-file-upload .nmorph-file-upload__file>.nmorph-file-card{flex:1 1 0;min-width:0}.nmorph-file-upload .nmorph-file-upload__file-info{display:flex;flex:1 1 0;gap:var(--indentation-02);align-items:center;min-width:0;max-width:100%;overflow:hidden}.nmorph-file-upload .nmorph-file-upload__file-info>.nmorph-icon{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-name{display:block;flex:1 1 0;width:var(--nmorph-file-upload-name-width, auto);min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-upload .nmorph-file-upload__remove-file{flex:0 0 auto}
|