@nmorph/nmorph-ui-kit 2.2.52 → 2.2.54
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/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +131 -109
- package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -1
- package/dist/components/data/nmorph-file-card/NmorphFileCard.vue.js +236 -169
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.css +1 -1
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.js +459 -228
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +111 -99
- package/dist/index.umd.js +30 -30
- package/dist/package.json.js +1 -1
- package/dist/src/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.d.ts +1 -0
- package/dist/src/components/data/nmorph-audio-preview/types.d.ts +1 -0
- package/dist/src/components/data/nmorph-file-card/NmorphFileCard.vue.d.ts +15 -3
- package/dist/src/components/data/nmorph-file-card/types.d.ts +7 -0
- package/dist/src/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.d.ts +14 -0
- package/dist/src/components/data/nmorph-media-gallery/types.d.ts +20 -6
- package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +3 -2
- package/dist/src/components/data/nmorph-video-preview/types.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-audio-preview{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:var(--nmorph-audio-preview-width, 360px);min-width:0;max-width:100%;min-height:64px;padding:var(--indentation-03);color:var(--nmorph-text-color);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-audio-preview audio{display:none}.nmorph-audio-preview .nmorph-audio-preview__icon{position:relative;display:flex;flex:0 0 auto;justify-content:center;align-items:center;width:36px;height:36px;padding:0;color:var(--nmorph-text-color);background:color-mix(in srgb,var(--nmorph-text-color) 10%,transparent);border:0;border-radius:var(--default-border-radius);cursor:
|
|
1
|
+
.nmorph-audio-preview{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:var(--nmorph-audio-preview-width, 360px);min-width:0;max-width:100%;min-height:64px;padding:var(--indentation-03);color:var(--nmorph-text-color);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-audio-preview audio{display:none}.nmorph-audio-preview .nmorph-audio-preview__icon{position:relative;display:flex;flex:0 0 auto;justify-content:center;align-items:center;width:36px;height:36px;padding:0;color:var(--nmorph-text-color);background:color-mix(in srgb,var(--nmorph-text-color) 10%,transparent);border:0;border-radius:var(--default-border-radius);cursor:default;--color: currentColor}.nmorph-audio-preview button.nmorph-audio-preview__icon{cursor:pointer}.nmorph-audio-preview button.nmorph-audio-preview__icon:disabled{cursor:default}.nmorph-audio-preview .nmorph-audio-preview__play-button{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;width:20px;height:20px;padding:0;color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 36%,transparent);border:0;border-radius:var(--border-radius-circular);cursor:pointer}.nmorph-audio-preview .nmorph-audio-preview__play-button:hover{background:color-mix(in srgb,var(--nmorph-black-color) 48%,transparent)}.nmorph-audio-preview .nmorph-audio-preview__play-button .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-audio-preview .nmorph-audio-preview__play-indicator{position:absolute;right:-4px;bottom:-4px;display:inline-flex;justify-content:center;align-items:center;width:18px;height:18px;color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 36%,transparent);border-radius:var(--border-radius-circular);box-shadow:var(--nmorph-shadow-outset)}.nmorph-audio-preview .nmorph-audio-preview__play-indicator .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-audio-preview .nmorph-audio-preview__body{display:flex;flex:1 1 0;flex-direction:column;gap:var(--indentation-02);box-sizing:border-box;min-width:0}.nmorph-audio-preview .nmorph-audio-preview__header{display:flex;gap:var(--indentation-02);justify-content:space-between;align-items:center;min-width:0}.nmorph-audio-preview .nmorph-audio-preview__control{display:flex;gap:var(--indentation-02);align-items:center;width:100%;min-width:0}.nmorph-audio-preview .nmorph-audio-preview__name,.nmorph-audio-preview .nmorph-audio-preview__time,.nmorph-audio-preview .nmorph-audio-preview__error{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-audio-preview .nmorph-audio-preview__name{flex:1 1 auto;font-weight:600}.nmorph-audio-preview .nmorph-audio-preview__time{flex:0 0 auto;color:var(--nmorph-semi-contrast-text-color);font-variant-numeric:tabular-nums}.nmorph-audio-preview .nmorph-audio-preview__error{flex:0 1 auto;color:var(--nmorph-error-text-color)}.nmorph-audio-preview .nmorph-audio-preview__range{flex:1 1 0;width:100%;min-width:0;height:6px;padding:0;background:linear-gradient(to right,var(--nmorph-accent-color) var(--nmorph-audio-preview-progress, 0%),color-mix(in srgb,var(--nmorph-text-color) 16%,transparent) 0);border-radius:var(--border-radius-100);outline:0;cursor:pointer;appearance:none}.nmorph-audio-preview .nmorph-audio-preview__range:disabled{cursor:default;opacity:.6}.nmorph-audio-preview .nmorph-audio-preview__range::-webkit-slider-thumb{width:14px;height:14px;background:var(--nmorph-accent-color);border:2px solid var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:var(--nmorph-shadow-outset);appearance:none}.nmorph-audio-preview .nmorph-audio-preview__range::-moz-range-thumb{width:14px;height:14px;background:var(--nmorph-accent-color);border:2px solid var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:var(--nmorph-shadow-outset)}.nmorph-audio-preview .nmorph-audio-preview__actions{display:flex;flex:0 0 auto;gap:var(--indentation-01);align-items:center}.nmorph-audio-preview .nmorph-audio-preview__action-link{display:inline-flex;justify-content:center;align-items:center;width:22px;height:22px;color:inherit;text-decoration:none;border-radius:var(--default-border-radius)}.nmorph-audio-preview .nmorph-audio-preview__action-link:hover{color:var(--nmorph-accent-color);background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent)}.nmorph-audio-preview .nmorph-audio-preview__action-link .nmorph-icon{--color: currentColor}.nmorph-audio-preview.nmorph-audio-preview--compact{min-height:52px;padding:var(--indentation-02)}.nmorph-audio-preview.nmorph-audio-preview--compact .nmorph-audio-preview__icon{width:30px;height:30px}.nmorph-audio-preview.nmorph-audio-preview--no-actions .nmorph-audio-preview__body{padding-inline-end:var(--indentation-02)}.nmorph-audio-preview.nmorph-audio-preview--embedded{width:var(--nmorph-audio-preview-width, 100%);min-height:auto;padding:0;background:transparent;border-radius:0;box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--embedded .nmorph-audio-preview__body{gap:0;padding-inline-end:0}.nmorph-audio-preview.nmorph-audio-preview--embedded .nmorph-audio-preview__range{height:5px}.nmorph-audio-preview.nmorph-audio-preview--embedded .nmorph-audio-preview__range::-webkit-slider-thumb{width:11px;height:11px;box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--embedded .nmorph-audio-preview__range::-moz-range-thumb{width:11px;height:11px;box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--embedded .nmorph-audio-preview__play-indicator{box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--no-header .nmorph-audio-preview__time{flex:0 0 auto}.nmorph-audio-preview.nmorph-audio-preview--soft{background:color-mix(in srgb,var(--nmorph-accent-color) 6%,transparent);box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--soft .nmorph-audio-preview__play-indicator{box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--plain{background:transparent;box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--plain .nmorph-audio-preview__play-indicator{box-shadow:none}.nmorph-audio-preview.nmorph-audio-preview--error{outline:1px solid var(--nmorph-error-color)}
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import './NmorphAudioPreview.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { createCssSizeVariables as
|
|
5
|
-
import
|
|
2
|
+
import { defineComponent as W, useSlots as X, ref as b, watch as Y, computed as i, openBlock as o, createElementBlock as n, normalizeStyle as C, normalizeClass as Z, createElementVNode as m, createBlock as d, unref as a, withCtx as u, createVNode as s, createCommentVNode as v, toDisplayString as _, withDirectives as ee, vModelText as oe, renderSlot as ae } from "vue";
|
|
3
|
+
import { useModifiers as re } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssSizeVariables as te } from "../../../utils/common.js";
|
|
5
|
+
import c from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
7
|
+
import S from "../../../assets/icons/audio.svg.js";
|
|
8
|
+
import $ from "../../../assets/icons/pause.svg.js";
|
|
9
|
+
import z from "../../../assets/icons/play.svg.js";
|
|
10
|
+
import le from "../../../assets/icons/open.svg.js";
|
|
11
|
+
import ne from "../../../assets/icons/download.svg.js";
|
|
12
|
+
import I from "../../../assets/icons/loading.svg.js";
|
|
13
13
|
const se = ["src", "preload"], ie = ["disabled", "aria-label"], de = {
|
|
14
14
|
key: 2,
|
|
15
15
|
class: "nmorph-audio-preview__play-indicator"
|
|
16
|
-
}, ue =
|
|
16
|
+
}, ue = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "nmorph-audio-preview__icon"
|
|
19
|
+
}, ce = ["aria-label"], pe = { class: "nmorph-audio-preview__body" }, me = {
|
|
17
20
|
key: 0,
|
|
18
21
|
class: "nmorph-audio-preview__header"
|
|
19
|
-
},
|
|
22
|
+
}, ve = { class: "nmorph-audio-preview__name" }, _e = {
|
|
20
23
|
key: 0,
|
|
21
24
|
class: "nmorph-audio-preview__error"
|
|
22
|
-
},
|
|
25
|
+
}, fe = {
|
|
23
26
|
key: 1,
|
|
24
27
|
class: "nmorph-audio-preview__time"
|
|
25
|
-
},
|
|
28
|
+
}, he = { class: "nmorph-audio-preview__control" }, ye = ["disabled", "aria-label"], we = {
|
|
26
29
|
key: 0,
|
|
27
30
|
class: "nmorph-audio-preview__time"
|
|
28
|
-
},
|
|
29
|
-
key:
|
|
31
|
+
}, be = {
|
|
32
|
+
key: 3,
|
|
30
33
|
class: "nmorph-audio-preview__actions"
|
|
31
|
-
},
|
|
34
|
+
}, ke = ["href", "aria-label"], ge = ["href", "download", "aria-label"], x = "var(--nmorph-contrast-text-color)", Ae = /* @__PURE__ */ W({
|
|
32
35
|
__name: "NmorphAudioPreview",
|
|
33
36
|
props: {
|
|
34
37
|
src: {},
|
|
@@ -45,26 +48,27 @@ const se = ["src", "preload"], ie = ["disabled", "aria-label"], de = {
|
|
|
45
48
|
loading: { type: Boolean, default: !1 },
|
|
46
49
|
error: { type: Boolean, default: !1 },
|
|
47
50
|
errorText: { default: "" },
|
|
51
|
+
showPlaybackButton: { type: Boolean, default: !0 },
|
|
48
52
|
showDefaultActions: { type: Boolean, default: !0 }
|
|
49
53
|
},
|
|
50
54
|
emits: ["play", "pause", "open", "download", "error"],
|
|
51
|
-
setup(
|
|
52
|
-
const e =
|
|
53
|
-
|
|
55
|
+
setup(A, { expose: M, emit: D }) {
|
|
56
|
+
const e = A, f = D, O = X(), t = b(null), l = b(!1), y = b(0), w = b(e.durationMs ? e.durationMs / 1e3 : 0);
|
|
57
|
+
Y(
|
|
54
58
|
() => e.durationMs,
|
|
55
|
-
(
|
|
56
|
-
w.value =
|
|
59
|
+
(r) => {
|
|
60
|
+
w.value = r ? r / 1e3 : w.value;
|
|
57
61
|
}
|
|
58
62
|
);
|
|
59
|
-
const
|
|
60
|
-
get: () =>
|
|
61
|
-
set: (
|
|
62
|
-
!t.value ||
|
|
63
|
+
const p = i(() => w.value || 0), k = i({
|
|
64
|
+
get: () => p.value > 0 ? y.value / p.value * 100 : 0,
|
|
65
|
+
set: (r) => {
|
|
66
|
+
!t.value || p.value <= 0 || (t.value.currentTime = r / 100 * p.value, y.value = t.value.currentTime);
|
|
63
67
|
}
|
|
64
|
-
}),
|
|
65
|
-
() => !!
|
|
66
|
-
),
|
|
67
|
-
() =>
|
|
68
|
+
}), L = i(() => ({ "--nmorph-audio-preview-progress": `${k.value}%` })), B = i(
|
|
69
|
+
() => !!O.actions || e.showDefaultActions && (e.src || e.downloadHref)
|
|
70
|
+
), V = i(
|
|
71
|
+
() => re({
|
|
68
72
|
"nmorph-audio-preview": [
|
|
69
73
|
e.surface,
|
|
70
74
|
e.embedded && "embedded",
|
|
@@ -74,19 +78,19 @@ const se = ["src", "preload"], ie = ["disabled", "aria-label"], de = {
|
|
|
74
78
|
e.loading && "loading",
|
|
75
79
|
e.error && "error",
|
|
76
80
|
l.value && "playing",
|
|
77
|
-
!
|
|
81
|
+
!B.value && "no-actions"
|
|
78
82
|
]
|
|
79
83
|
})
|
|
80
|
-
),
|
|
81
|
-
() =>
|
|
84
|
+
), E = i(
|
|
85
|
+
() => te({
|
|
82
86
|
"--nmorph-audio-preview-width": e.width
|
|
83
87
|
})
|
|
84
|
-
),
|
|
85
|
-
if (!Number.isFinite(
|
|
86
|
-
const h = Math.floor(
|
|
87
|
-
return `${g}:${
|
|
88
|
-
},
|
|
89
|
-
if (!(!t.value || e.loading || e.error)) {
|
|
88
|
+
), H = (r) => {
|
|
89
|
+
if (!Number.isFinite(r) || r < 0) return "0:00";
|
|
90
|
+
const h = Math.floor(r), g = Math.floor(h / 60), Q = h % 60;
|
|
91
|
+
return `${g}:${Q.toString().padStart(2, "0")}`;
|
|
92
|
+
}, N = i(() => H(y.value)), P = i(() => H(p.value)), T = async () => {
|
|
93
|
+
if (!(!t.value || !e.showPlaybackButton || e.loading || e.error)) {
|
|
90
94
|
if (l.value) {
|
|
91
95
|
t.value.pause();
|
|
92
96
|
return;
|
|
@@ -97,152 +101,170 @@ const se = ["src", "preload"], ie = ["disabled", "aria-label"], de = {
|
|
|
97
101
|
l.value = !1;
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
|
-
},
|
|
104
|
+
}, R = () => {
|
|
101
105
|
!t.value || Number.isNaN(t.value.duration) || (w.value = t.value.duration);
|
|
102
|
-
},
|
|
106
|
+
}, U = () => {
|
|
103
107
|
y.value = t.value?.currentTime || 0;
|
|
104
|
-
},
|
|
105
|
-
l.value = !0, f("play",
|
|
106
|
-
},
|
|
107
|
-
l.value = !1, f("pause",
|
|
108
|
-
},
|
|
108
|
+
}, F = (r) => {
|
|
109
|
+
l.value = !0, f("play", r);
|
|
110
|
+
}, j = (r) => {
|
|
111
|
+
l.value = !1, f("pause", r);
|
|
112
|
+
}, q = () => {
|
|
109
113
|
l.value = !1;
|
|
110
|
-
},
|
|
111
|
-
l.value = !1, f("error",
|
|
112
|
-
},
|
|
113
|
-
return
|
|
114
|
-
class:
|
|
115
|
-
style:
|
|
114
|
+
}, G = (r) => {
|
|
115
|
+
l.value = !1, f("error", r);
|
|
116
|
+
}, J = () => f("open"), K = () => f("download");
|
|
117
|
+
return M({ audioRef: t }), (r, h) => (o(), n("div", {
|
|
118
|
+
class: Z(V.value),
|
|
119
|
+
style: C(E.value)
|
|
116
120
|
}, [
|
|
117
|
-
|
|
121
|
+
m("audio", {
|
|
118
122
|
ref_key: "audioRef",
|
|
119
123
|
ref: t,
|
|
120
124
|
src: e.src,
|
|
121
125
|
preload: e.preload,
|
|
122
|
-
onLoadedmetadata:
|
|
123
|
-
onTimeupdate:
|
|
124
|
-
onPlay:
|
|
125
|
-
onPause:
|
|
126
|
-
onEnded:
|
|
127
|
-
onError:
|
|
126
|
+
onLoadedmetadata: R,
|
|
127
|
+
onTimeupdate: U,
|
|
128
|
+
onPlay: F,
|
|
129
|
+
onPause: j,
|
|
130
|
+
onEnded: q,
|
|
131
|
+
onError: G
|
|
128
132
|
}, null, 40, se),
|
|
129
|
-
e.showIcon ? (
|
|
133
|
+
e.showIcon && e.showPlaybackButton ? (o(), n("button", {
|
|
130
134
|
key: 0,
|
|
131
135
|
class: "nmorph-audio-preview__icon",
|
|
132
136
|
type: "button",
|
|
133
137
|
disabled: e.loading || e.error,
|
|
134
138
|
"aria-label": l.value ? `Pause ${e.name || "audio"}` : `Play ${e.name || "audio"}`,
|
|
135
|
-
onClick:
|
|
139
|
+
onClick: T
|
|
136
140
|
}, [
|
|
137
|
-
e.loading ? (
|
|
141
|
+
e.loading ? (o(), d(a(c), {
|
|
138
142
|
key: 0,
|
|
139
143
|
size: "medium"
|
|
140
144
|
}, {
|
|
141
|
-
default:
|
|
142
|
-
|
|
145
|
+
default: u(() => [
|
|
146
|
+
s(a(I))
|
|
143
147
|
]),
|
|
144
148
|
_: 1
|
|
145
|
-
})) : (
|
|
149
|
+
})) : (o(), d(a(c), {
|
|
146
150
|
key: 1,
|
|
147
151
|
size: "medium"
|
|
148
152
|
}, {
|
|
149
|
-
default:
|
|
150
|
-
|
|
153
|
+
default: u(() => [
|
|
154
|
+
s(a(S))
|
|
151
155
|
]),
|
|
152
156
|
_: 1
|
|
153
157
|
})),
|
|
154
|
-
!e.loading && !e.error ? (
|
|
155
|
-
|
|
158
|
+
!e.loading && !e.error ? (o(), n("span", de, [
|
|
159
|
+
s(a(c), {
|
|
156
160
|
size: "small",
|
|
157
|
-
color:
|
|
161
|
+
color: x
|
|
158
162
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
l.value ? (
|
|
163
|
+
default: u(() => [
|
|
164
|
+
l.value ? (o(), d(a($), { key: 0 })) : (o(), d(a(z), { key: 1 }))
|
|
161
165
|
]),
|
|
162
166
|
_: 1
|
|
163
167
|
})
|
|
164
|
-
])) :
|
|
165
|
-
], 8, ie)) :
|
|
166
|
-
|
|
168
|
+
])) : v("", !0)
|
|
169
|
+
], 8, ie)) : e.showIcon ? (o(), n("div", ue, [
|
|
170
|
+
e.loading ? (o(), d(a(c), {
|
|
171
|
+
key: 0,
|
|
172
|
+
size: "medium"
|
|
173
|
+
}, {
|
|
174
|
+
default: u(() => [
|
|
175
|
+
s(a(I))
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
})) : (o(), d(a(c), {
|
|
179
|
+
key: 1,
|
|
180
|
+
size: "medium"
|
|
181
|
+
}, {
|
|
182
|
+
default: u(() => [
|
|
183
|
+
s(a(S))
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}))
|
|
187
|
+
])) : e.showPlaybackButton && !e.loading && !e.error ? (o(), n("button", {
|
|
188
|
+
key: 2,
|
|
167
189
|
class: "nmorph-audio-preview__play-button",
|
|
168
190
|
type: "button",
|
|
169
191
|
"aria-label": l.value ? `Pause ${e.name || "audio"}` : `Play ${e.name || "audio"}`,
|
|
170
|
-
onClick:
|
|
192
|
+
onClick: T
|
|
171
193
|
}, [
|
|
172
|
-
|
|
194
|
+
s(a(c), {
|
|
173
195
|
size: "small",
|
|
174
|
-
color:
|
|
196
|
+
color: x
|
|
175
197
|
}, {
|
|
176
|
-
default:
|
|
177
|
-
l.value ? (
|
|
198
|
+
default: u(() => [
|
|
199
|
+
l.value ? (o(), d(a($), { key: 0 })) : (o(), d(a(z), { key: 1 }))
|
|
178
200
|
]),
|
|
179
201
|
_: 1
|
|
180
202
|
})
|
|
181
|
-
], 8,
|
|
182
|
-
|
|
183
|
-
e.showHeader ? (
|
|
184
|
-
|
|
185
|
-
e.error && e.errorText ? (
|
|
186
|
-
])) :
|
|
187
|
-
|
|
188
|
-
|
|
203
|
+
], 8, ce)) : v("", !0),
|
|
204
|
+
m("div", pe, [
|
|
205
|
+
e.showHeader ? (o(), n("div", me, [
|
|
206
|
+
m("span", ve, _(e.name || "Audio"), 1),
|
|
207
|
+
e.error && e.errorText ? (o(), n("span", _e, _(e.errorText), 1)) : (o(), n("span", fe, _(N.value) + " / " + _(P.value), 1))
|
|
208
|
+
])) : v("", !0),
|
|
209
|
+
m("div", he, [
|
|
210
|
+
ee(m("input", {
|
|
189
211
|
"onUpdate:modelValue": h[0] || (h[0] = (g) => k.value = g),
|
|
190
212
|
class: "nmorph-audio-preview__range",
|
|
191
213
|
type: "range",
|
|
192
214
|
min: "0",
|
|
193
215
|
max: "100",
|
|
194
216
|
step: "0.1",
|
|
195
|
-
style:
|
|
196
|
-
disabled: e.loading || e.error ||
|
|
217
|
+
style: C(L.value),
|
|
218
|
+
disabled: e.loading || e.error || p.value <= 0,
|
|
197
219
|
"aria-label": `Audio progress ${e.name || ""}`
|
|
198
|
-
}, null, 12,
|
|
220
|
+
}, null, 12, ye), [
|
|
199
221
|
[
|
|
200
|
-
|
|
222
|
+
oe,
|
|
201
223
|
k.value,
|
|
202
224
|
void 0,
|
|
203
225
|
{ number: !0 }
|
|
204
226
|
]
|
|
205
227
|
]),
|
|
206
|
-
e.showHeader ?
|
|
228
|
+
e.showHeader ? v("", !0) : (o(), n("span", we, _(N.value) + " / " + _(P.value), 1))
|
|
207
229
|
])
|
|
208
230
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
231
|
+
B.value ? (o(), n("div", be, [
|
|
232
|
+
ae(r.$slots, "actions", {}, () => [
|
|
233
|
+
m("a", {
|
|
212
234
|
href: e.src,
|
|
213
235
|
target: "_blank",
|
|
214
236
|
rel: "noopener noreferrer",
|
|
215
237
|
class: "nmorph-audio-preview__action-link",
|
|
216
238
|
"aria-label": `Open ${e.name || "audio"}`,
|
|
217
|
-
onClick:
|
|
239
|
+
onClick: J
|
|
218
240
|
}, [
|
|
219
|
-
|
|
220
|
-
default:
|
|
221
|
-
|
|
241
|
+
s(a(c), { size: "small" }, {
|
|
242
|
+
default: u(() => [
|
|
243
|
+
s(a(le))
|
|
222
244
|
]),
|
|
223
245
|
_: 1
|
|
224
246
|
})
|
|
225
|
-
], 8,
|
|
226
|
-
e.downloadHref ? (
|
|
247
|
+
], 8, ke),
|
|
248
|
+
e.downloadHref ? (o(), n("a", {
|
|
227
249
|
key: 0,
|
|
228
250
|
href: e.downloadHref,
|
|
229
251
|
download: e.name,
|
|
230
252
|
class: "nmorph-audio-preview__action-link",
|
|
231
253
|
"aria-label": `Download ${e.name || "audio"}`,
|
|
232
|
-
onClick:
|
|
254
|
+
onClick: K
|
|
233
255
|
}, [
|
|
234
|
-
|
|
235
|
-
default:
|
|
236
|
-
|
|
256
|
+
s(a(c), { size: "small" }, {
|
|
257
|
+
default: u(() => [
|
|
258
|
+
s(a(ne))
|
|
237
259
|
]),
|
|
238
260
|
_: 1
|
|
239
261
|
})
|
|
240
|
-
], 8,
|
|
262
|
+
], 8, ge)) : v("", !0)
|
|
241
263
|
])
|
|
242
|
-
])) :
|
|
264
|
+
])) : v("", !0)
|
|
243
265
|
], 6));
|
|
244
266
|
}
|
|
245
267
|
});
|
|
246
268
|
export {
|
|
247
|
-
|
|
269
|
+
Ae as default
|
|
248
270
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-file-card{display:flex;gap:var(--indentation-03);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:64px;padding:var(--indentation-03);color:var(--nmorph-text-color);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-file-card .nmorph-file-card__icon{position:relative;display:flex;flex:0 0 auto;justify-content:center;align-items:center;width:36px;height:36px;color:var(--nmorph-text-color);background:color-mix(in srgb,var(--nmorph-text-color) 10%,transparent);border-radius:var(--default-border-radius);--color: currentColor}.nmorph-file-card .nmorph-file-card__icon-action{position:absolute;right:-4px;bottom:-4px;display:inline-flex;justify-content:center;align-items:center;width:18px;height:18px;color:var(--nmorph-contrast-text-color);text-decoration:none;background:color-mix(in srgb,var(--nmorph-black-color) 36%,transparent);border-radius:var(--border-radius-circular);box-shadow:var(--nmorph-shadow-outset)}.nmorph-file-card .nmorph-file-card__icon-action:hover{background:color-mix(in srgb,var(--nmorph-black-color) 48%,transparent)}.nmorph-file-card .nmorph-file-card__icon-action .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-file-card .nmorph-file-card__body{display:flex;flex:1 1 0;flex-direction:column;gap:var(--indentation-01);min-width:0}.nmorph-file-card .nmorph-file-card__info{display:flex;flex-direction:column;gap:2px;min-width:0}.nmorph-file-card .nmorph-file-card__name,.nmorph-file-card .nmorph-file-card__meta,.nmorph-file-card .nmorph-file-card__error{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-card .nmorph-file-card__name{font-weight:600;font-size:var(--font-size-small);line-height:var(--line-height-regular)}.nmorph-file-card .nmorph-file-card__meta,.nmorph-file-card .nmorph-file-card__error{font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-file-card .nmorph-file-card__meta{color:var(--nmorph-semi-contrast-text-color)}.nmorph-file-card .nmorph-file-card__error{color:var(--nmorph-error-text-color)}.nmorph-file-card .nmorph-file-card__audio-preview,.nmorph-file-card .nmorph-file-card__video-preview,.nmorph-file-card .nmorph-file-card__image-preview{width:100%;min-width:0}.nmorph-file-card .nmorph-file-card__image-preview{display:block;height:120px;padding:0;overflow:hidden;color:inherit;font:inherit;background:transparent;border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-file-card .nmorph-file-card__image-preview .nmorph-file-card__image{display:block;width:100%;max-width:100%;height:100%;object-fit:cover}.nmorph-file-card .nmorph-file-card__badge{flex:0 0 auto;max-width:72px;padding:2px 6px;overflow:hidden;color:var(--nmorph-accent-color);font-weight:700;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-transform:uppercase;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent);border-radius:var(--default-border-radius)}.nmorph-file-card .nmorph-file-card__visual-size{position:absolute;right:var(--indentation-02);bottom:var(--indentation-02);z-index:2;display:inline-flex;align-items:center;min-width:0;max-width:calc(100% - var(--indentation-04));min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius);pointer-events:none}.nmorph-file-card .nmorph-file-card__actions{display:flex;flex:0 0 auto;gap:var(--indentation-01);align-items:center}.nmorph-file-card .nmorph-file-card__action-link,.nmorph-file-card .nmorph-file-card__action-loader{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:22px;height:22px;padding:0;color:inherit;line-height:1;text-decoration:none;border-radius:var(--default-border-radius)}.nmorph-file-card .nmorph-file-card__action-link:hover{color:var(--nmorph-accent-color);background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent)}.nmorph-file-card .nmorph-file-card__action-link .nmorph-icon{--color: currentColor}.nmorph-file-card .nmorph-file-card__action-loader{color:var(--nmorph-semi-contrast-text-color)}.nmorph-file-card .nmorph-file-card__action-loader .nmorph-icon{--color: currentColor}.nmorph-file-card.nmorph-file-card--compact{min-height:52px;padding:var(--indentation-02)}.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__icon{width:30px;height:30px}.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__audio-preview,.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__video-preview{margin-top:0}.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__image-preview{height:96px;margin-top:0}.nmorph-file-card.nmorph-file-card--media-audio.nmorph-file-card--no-actions .nmorph-file-card__body{padding-inline-end:var(--indentation-02)}.nmorph-file-card.nmorph-file-card--media-visual{position:relative;display:block;gap:0;min-height:0;padding:0;overflow:hidden}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__body{position:relative;display:block;width:100%;min-width:0}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__info{position:absolute;top:var(--indentation-02);left:var(--indentation-02);z-index:2;max-width:calc(100% - 48px);pointer-events:none}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__name{display:block;min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);line-height:22px;white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius)}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__image-preview,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__video-preview,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-video-preview,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-video-preview__media,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__image{display:block;width:100%;max-width:none;height:100
|
|
1
|
+
.nmorph-file-card{display:flex;gap:var(--indentation-03);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:var(--nmorph-file-card-height, auto);min-height:var(--nmorph-file-card-height, 64px);padding:var(--indentation-03);color:var(--nmorph-text-color);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-file-card .nmorph-file-card__icon{position:relative;display:flex;flex:0 0 auto;justify-content:center;align-items:center;width:36px;height:36px;color:var(--nmorph-text-color);background:color-mix(in srgb,var(--nmorph-text-color) 10%,transparent);border-radius:var(--default-border-radius);--color: currentColor}.nmorph-file-card .nmorph-file-card__icon-action{position:absolute;right:-4px;bottom:-4px;display:inline-flex;justify-content:center;align-items:center;width:18px;height:18px;color:var(--nmorph-contrast-text-color);text-decoration:none;background:color-mix(in srgb,var(--nmorph-black-color) 36%,transparent);border-radius:var(--border-radius-circular);box-shadow:var(--nmorph-shadow-outset)}.nmorph-file-card .nmorph-file-card__icon-action:hover{background:color-mix(in srgb,var(--nmorph-black-color) 48%,transparent)}.nmorph-file-card .nmorph-file-card__icon-action .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-file-card .nmorph-file-card__body{display:flex;flex:1 1 0;flex-direction:column;gap:var(--indentation-01);min-width:0}.nmorph-file-card .nmorph-file-card__info{display:flex;flex-direction:column;gap:2px;min-width:0}.nmorph-file-card .nmorph-file-card__name,.nmorph-file-card .nmorph-file-card__meta,.nmorph-file-card .nmorph-file-card__error{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-card .nmorph-file-card__name{font-weight:600;font-size:var(--font-size-small);line-height:var(--line-height-regular)}.nmorph-file-card .nmorph-file-card__meta,.nmorph-file-card .nmorph-file-card__error{font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-file-card .nmorph-file-card__meta{color:var(--nmorph-semi-contrast-text-color)}.nmorph-file-card .nmorph-file-card__error{color:var(--nmorph-error-text-color)}.nmorph-file-card .nmorph-file-card__audio-preview,.nmorph-file-card .nmorph-file-card__video-preview,.nmorph-file-card .nmorph-file-card__image-preview{width:100%;min-width:0}.nmorph-file-card .nmorph-file-card__image-preview{display:block;height:var(--nmorph-file-card-media-height, 120px);padding:0;overflow:hidden;color:inherit;font:inherit;background:transparent;border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-file-card .nmorph-file-card__image-preview .nmorph-file-card__image{display:block;width:100%;max-width:100%;height:100%;object-fit:cover}.nmorph-file-card .nmorph-file-card__badge{flex:0 0 auto;max-width:72px;padding:2px 6px;overflow:hidden;color:var(--nmorph-accent-color);font-weight:700;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-transform:uppercase;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent);border-radius:var(--default-border-radius)}.nmorph-file-card .nmorph-file-card__visual-size{position:absolute;right:var(--indentation-02);bottom:var(--indentation-02);z-index:2;display:inline-flex;align-items:center;min-width:0;max-width:calc(100% - var(--indentation-04));min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius);pointer-events:none}.nmorph-file-card .nmorph-file-card__actions{display:flex;flex:0 0 auto;gap:var(--indentation-01);align-items:center}.nmorph-file-card .nmorph-file-card__action-link,.nmorph-file-card .nmorph-file-card__action-loader{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:22px;height:22px;padding:0;color:inherit;line-height:1;text-decoration:none;border-radius:var(--default-border-radius)}.nmorph-file-card .nmorph-file-card__action-link:hover{color:var(--nmorph-accent-color);background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent)}.nmorph-file-card .nmorph-file-card__action-link .nmorph-icon{--color: currentColor}.nmorph-file-card .nmorph-file-card__action-loader{color:var(--nmorph-semi-contrast-text-color)}.nmorph-file-card .nmorph-file-card__action-loader .nmorph-icon{--color: currentColor}.nmorph-file-card.nmorph-file-card--compact{min-height:var(--nmorph-file-card-height, 52px);padding:var(--indentation-02)}.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__icon{width:30px;height:30px}.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__audio-preview,.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__video-preview{margin-top:0}.nmorph-file-card.nmorph-file-card--compact .nmorph-file-card__image-preview{height:var(--nmorph-file-card-media-height, 96px);margin-top:0}.nmorph-file-card.nmorph-file-card--media-audio.nmorph-file-card--no-actions .nmorph-file-card__body{padding-inline-end:var(--indentation-02)}.nmorph-file-card.nmorph-file-card--media-visual{position:relative;display:block;gap:0;min-height:0;padding:0;overflow:hidden}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__body{position:relative;display:block;width:100%;min-width:0;height:100%}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__info{position:absolute;top:var(--indentation-02);left:var(--indentation-02);z-index:2;max-width:calc(100% - 48px);pointer-events:none}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__name{display:block;min-height:22px;padding:0 6px;overflow:hidden;color:var(--nmorph-contrast-text-color);line-height:22px;white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border-radius:var(--default-border-radius)}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__image-preview,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__video-preview,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-video-preview,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-video-preview__media,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__image{display:block;width:100%;max-width:none;height:var(--nmorph-file-card-media-height, 100%);border-radius:inherit;object-fit:cover}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__actions{position:absolute;top:var(--indentation-02);right:var(--indentation-02);z-index:3}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__action-link,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__action-loader{color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__action-link .nmorph-icon,.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__action-loader .nmorph-icon{flex:0 0 auto;--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-file-card.nmorph-file-card--media-visual .nmorph-file-card__action-link:hover{color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-file-card.nmorph-file-card--media-video .nmorph-file-card__info{max-width:calc(100% - 112px)}.nmorph-file-card.nmorph-file-card--media-video .nmorph-video-preview__actions{right:calc(var(--indentation-02) + 26px)}.nmorph-file-card.nmorph-file-card--media-image .nmorph-file-card__image-preview{border-radius:inherit}.nmorph-file-card.nmorph-file-card--error{outline:1px solid var(--nmorph-error-color)}.nmorph-file-card.nmorph-file-card--soft{background:color-mix(in srgb,var(--nmorph-accent-color) 6%,transparent);box-shadow:none}.nmorph-file-card.nmorph-file-card--soft .nmorph-file-card__icon-action{box-shadow:none}.nmorph-file-card.nmorph-file-card--plain{background:transparent;box-shadow:none}.nmorph-file-card.nmorph-file-card--plain .nmorph-file-card__icon-action{box-shadow:none}.nmorph-file-card.nmorph-file-card--icon-plain .nmorph-file-card__icon{background:transparent}
|