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