@nmorph/nmorph-ui-kit 2.2.49 → 2.2.51
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/full-screen.svg.js +6 -6
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +84 -78
- package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -1
- package/dist/components/data/nmorph-file-card/NmorphFileCard.vue.js +108 -81
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js +57 -54
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -1
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +230 -133
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +92 -67
- package/dist/index.umd.js +24 -24
- package/dist/package.json.js +1 -1
- package/dist/src/components/data/nmorph-file-card/types.d.ts +1 -1
- package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +3 -3
- package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +11 -3
- package/dist/src/components/data/nmorph-video-preview/types.d.ts +6 -0
- package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +2 -2
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +9 -9
- 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,34 +1,36 @@
|
|
|
1
1
|
import './NmorphFileCard.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { getFileExtension as
|
|
5
|
-
import { NmorphImageResolution as
|
|
6
|
-
import
|
|
2
|
+
import { defineComponent as V, useSlots as W, computed as a, openBlock as r, createElementBlock as n, normalizeClass as K, createElementVNode as f, createVNode as t, unref as i, withCtx as c, createBlock as b, resolveDynamicComponent as j, createCommentVNode as l, toDisplayString as h, renderSlot as G } from "vue";
|
|
3
|
+
import { useModifiers as U } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { getFileExtension as q, getPlainFileType as J, getTypeCandidates as Q, isKnownFileType as m } from "../../../utils/file-types.js";
|
|
5
|
+
import { NmorphImageResolution as X, NmorphAudioResolution as Y, NmorphVideoResolution as Z, NmorphArchiveResolution as ee, NmorphDocResolution as oe } from "../../form/nmorph-file-upload/types.js";
|
|
6
|
+
import ae from "../nmorph-audio-preview/NmorphAudioPreview.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
8
|
+
import re from "../nmorph-video-preview/NmorphVideoPreview.vue.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import ne from "../../../assets/icons/image.svg.js";
|
|
11
|
+
import te from "../../../assets/icons/archive.svg.js";
|
|
12
|
+
import A from "../../../assets/icons/doc.svg.js";
|
|
13
|
+
import d from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
13
14
|
/* empty css */
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
15
|
+
import ie from "../../../assets/icons/audio.svg.js";
|
|
16
|
+
import le from "../../../assets/icons/video.svg.js";
|
|
17
|
+
import se from "../../../assets/icons/eye.svg.js";
|
|
18
|
+
import ce from "../../../assets/icons/loading.svg.js";
|
|
19
|
+
import me from "../../../assets/icons/open.svg.js";
|
|
20
|
+
import de from "../../../assets/icons/download.svg.js";
|
|
21
|
+
const pe = { class: "nmorph-file-card__icon" }, ue = ["href", "aria-label"], fe = { class: "nmorph-file-card__body" }, he = { class: "nmorph-file-card__info" }, ve = { class: "nmorph-file-card__name" }, _e = {
|
|
20
22
|
key: 0,
|
|
21
23
|
class: "nmorph-file-card__error"
|
|
22
|
-
},
|
|
24
|
+
}, we = {
|
|
23
25
|
key: 1,
|
|
24
26
|
class: "nmorph-file-card__meta"
|
|
25
|
-
},
|
|
27
|
+
}, ye = {
|
|
26
28
|
key: 0,
|
|
27
29
|
class: "nmorph-file-card__badge"
|
|
28
|
-
},
|
|
30
|
+
}, ge = {
|
|
29
31
|
key: 1,
|
|
30
32
|
class: "nmorph-file-card__actions"
|
|
31
|
-
},
|
|
33
|
+
}, Ne = ["aria-label"], Be = ["href", "aria-label"], be = ["href", "download", "aria-label"], ke = "var(--nmorph-contrast-text-color)", Ke = /* @__PURE__ */ V({
|
|
32
34
|
__name: "NmorphFileCard",
|
|
33
35
|
props: {
|
|
34
36
|
name: {},
|
|
@@ -48,69 +50,68 @@ const ie = { class: "nmorph-file-card__icon" }, le = ["href", "aria-label"], se
|
|
|
48
50
|
showDefaultActions: { type: Boolean, default: !0 }
|
|
49
51
|
},
|
|
50
52
|
emits: ["open", "download", "error"],
|
|
51
|
-
setup(
|
|
52
|
-
const e =
|
|
53
|
+
setup(P, { emit: H }) {
|
|
54
|
+
const e = P, v = H, $ = W(), p = a(() => (e.extension || q(e.name) || J(e.mimeType)).toLowerCase()), s = a(() => Q(e.mimeType, e.name)), D = a(() => e.mimeType.toLowerCase().startsWith("image/") || s.value.some((o) => m(o, X)) ? ne : e.mimeType.toLowerCase().startsWith("audio/") || s.value.some((o) => m(o, Y)) ? ie : e.mimeType.toLowerCase().startsWith("video/") || s.value.some((o) => m(o, Z)) ? le : s.value.some((o) => m(o, ee)) ? te : s.value.some((o) => m(o, oe)) ? A : A), E = (o) => {
|
|
53
55
|
if (o === void 0 || Number.isNaN(o) || o < 0) return "";
|
|
54
56
|
if (o === 0) return "0 B";
|
|
55
|
-
const
|
|
56
|
-
return `${
|
|
57
|
-
},
|
|
58
|
-
() =>
|
|
59
|
-
),
|
|
60
|
-
() =>
|
|
57
|
+
const g = ["B", "KB", "MB", "GB", "TB"], N = Math.min(Math.floor(Math.log(o) / Math.log(1024)), g.length - 1), B = o / 1024 ** N, F = B >= 10 || N === 0 || Number.isInteger(B) ? 0 : 1;
|
|
58
|
+
return `${B.toFixed(F)} ${g[N]}`;
|
|
59
|
+
}, L = a(() => E(e.size)), O = a(() => p.value || e.mimeType), k = a(() => [O.value, L.value].filter(Boolean).join(" · ")), _ = a(() => e.mediaPreview === "audio" && !!e.previewSrc && !e.loading && !e.error), w = a(() => e.mediaPreview === "video" && !!e.previewSrc && !e.loading && !e.error), u = a(() => _.value || w.value), R = a(() => e.compact ? "96px" : "120px"), C = a(() => e.mimeType.toLowerCase() === "application/pdf" || p.value === "pdf"), S = a(() => C.value ? e.previewSrc || e.downloadHref : ""), y = a(
|
|
60
|
+
() => e.showDefaultActions && !!S.value && !u.value && C.value
|
|
61
|
+
), T = a(
|
|
62
|
+
() => !!$.actions || e.showDefaultActions && (e.loading || e.previewSrc && !u.value && !y.value || e.downloadHref)
|
|
63
|
+
), M = a(
|
|
64
|
+
() => U({
|
|
61
65
|
"nmorph-file-card": [
|
|
62
66
|
e.surface,
|
|
63
67
|
e.compact && "compact",
|
|
64
68
|
e.loading && "loading",
|
|
65
69
|
e.error && "error",
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
u.value && "media",
|
|
71
|
+
_.value && "media-audio",
|
|
72
|
+
w.value && "media-video",
|
|
73
|
+
!e.iconSurface && "icon-plain",
|
|
74
|
+
!T.value && "no-actions"
|
|
68
75
|
]
|
|
69
76
|
})
|
|
70
|
-
),
|
|
71
|
-
return (o,
|
|
72
|
-
class:
|
|
77
|
+
), x = () => v("open"), z = () => v("download"), I = () => v("error");
|
|
78
|
+
return (o, g) => (r(), n("div", {
|
|
79
|
+
class: K(M.value)
|
|
73
80
|
}, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}, {
|
|
79
|
-
default: m(() => [
|
|
80
|
-
i(n(ae))
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
})) : (r(), f(n(p), {
|
|
84
|
-
key: 1,
|
|
85
|
-
size: "medium"
|
|
86
|
-
}, {
|
|
87
|
-
default: m(() => [
|
|
88
|
-
(r(), f(R(x.value)))
|
|
81
|
+
f("div", pe, [
|
|
82
|
+
t(i(d), { size: "medium" }, {
|
|
83
|
+
default: c(() => [
|
|
84
|
+
(r(), b(j(D.value)))
|
|
89
85
|
]),
|
|
90
86
|
_: 1
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
key:
|
|
94
|
-
href:
|
|
87
|
+
}),
|
|
88
|
+
y.value && !e.loading && !e.error ? (r(), n("a", {
|
|
89
|
+
key: 0,
|
|
90
|
+
href: S.value,
|
|
95
91
|
target: "_blank",
|
|
96
92
|
rel: "noopener noreferrer",
|
|
97
93
|
class: "nmorph-file-card__icon-action",
|
|
98
94
|
"aria-label": `Preview ${e.name}`,
|
|
99
|
-
onClick:
|
|
95
|
+
onClick: x
|
|
100
96
|
}, [
|
|
101
|
-
i(
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
t(i(d), {
|
|
98
|
+
size: "small",
|
|
99
|
+
color: ke
|
|
100
|
+
}, {
|
|
101
|
+
default: c(() => [
|
|
102
|
+
t(i(se))
|
|
104
103
|
]),
|
|
105
104
|
_: 1
|
|
106
105
|
})
|
|
107
|
-
], 8,
|
|
106
|
+
], 8, ue)) : l("", !0)
|
|
108
107
|
]),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
f("div", fe, [
|
|
109
|
+
f("div", he, [
|
|
110
|
+
f("span", ve, h(e.name), 1),
|
|
111
|
+
e.error && e.errorText ? (r(), n("span", _e, h(e.errorText), 1)) : k.value ? (r(), n("span", we, h(k.value), 1)) : l("", !0)
|
|
112
|
+
]),
|
|
113
|
+
_.value ? (r(), b(ae, {
|
|
114
|
+
key: 0,
|
|
114
115
|
class: "nmorph-file-card__audio-preview",
|
|
115
116
|
src: e.previewSrc,
|
|
116
117
|
name: e.name,
|
|
@@ -120,48 +121,74 @@ const ie = { class: "nmorph-file-card__icon" }, le = ["href", "aria-label"], se
|
|
|
120
121
|
"show-icon": !1,
|
|
121
122
|
"show-header": !1,
|
|
122
123
|
"show-default-actions": !1,
|
|
123
|
-
onError:
|
|
124
|
-
}, null, 8, ["src", "name"])) : l("", !0)
|
|
124
|
+
onError: I
|
|
125
|
+
}, null, 8, ["src", "name"])) : l("", !0),
|
|
126
|
+
w.value ? (r(), b(re, {
|
|
127
|
+
key: 1,
|
|
128
|
+
class: "nmorph-file-card__video-preview",
|
|
129
|
+
src: e.previewSrc,
|
|
130
|
+
name: e.name,
|
|
131
|
+
height: R.value,
|
|
132
|
+
surface: "plain",
|
|
133
|
+
embedded: "",
|
|
134
|
+
compact: "",
|
|
135
|
+
controls: !1,
|
|
136
|
+
"show-meta": !1,
|
|
137
|
+
"show-default-actions": !1,
|
|
138
|
+
onError: I
|
|
139
|
+
}, null, 8, ["src", "name", "height"])) : l("", !0)
|
|
125
140
|
]),
|
|
126
|
-
e.showExtensionBadge &&
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
e.
|
|
141
|
+
e.showExtensionBadge && p.value ? (r(), n("span", ye, h(p.value), 1)) : l("", !0),
|
|
142
|
+
T.value ? (r(), n("div", ge, [
|
|
143
|
+
G(o.$slots, "actions", {}, () => [
|
|
144
|
+
e.loading ? (r(), n("span", {
|
|
130
145
|
key: 0,
|
|
146
|
+
class: "nmorph-file-card__action-loader",
|
|
147
|
+
role: "status",
|
|
148
|
+
"aria-label": `Uploading ${e.name}`
|
|
149
|
+
}, [
|
|
150
|
+
t(i(d), { size: "small" }, {
|
|
151
|
+
default: c(() => [
|
|
152
|
+
t(i(ce))
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
})
|
|
156
|
+
], 8, Ne)) : e.previewSrc && !u.value && !y.value ? (r(), n("a", {
|
|
157
|
+
key: 1,
|
|
131
158
|
href: e.previewSrc,
|
|
132
159
|
target: "_blank",
|
|
133
160
|
rel: "noopener noreferrer",
|
|
134
161
|
class: "nmorph-file-card__action-link",
|
|
135
162
|
"aria-label": `Open ${e.name}`,
|
|
136
|
-
onClick:
|
|
163
|
+
onClick: x
|
|
137
164
|
}, [
|
|
138
|
-
i(
|
|
139
|
-
default:
|
|
140
|
-
i(
|
|
165
|
+
t(i(d), { size: "small" }, {
|
|
166
|
+
default: c(() => [
|
|
167
|
+
t(i(me))
|
|
141
168
|
]),
|
|
142
169
|
_: 1
|
|
143
170
|
})
|
|
144
|
-
], 8,
|
|
145
|
-
e.downloadHref ? (r(),
|
|
146
|
-
key:
|
|
171
|
+
], 8, Be)) : l("", !0),
|
|
172
|
+
!e.loading && e.downloadHref ? (r(), n("a", {
|
|
173
|
+
key: 2,
|
|
147
174
|
href: e.downloadHref,
|
|
148
175
|
download: e.name,
|
|
149
176
|
class: "nmorph-file-card__action-link",
|
|
150
177
|
"aria-label": `Download ${e.name}`,
|
|
151
|
-
onClick:
|
|
178
|
+
onClick: z
|
|
152
179
|
}, [
|
|
153
|
-
i(
|
|
154
|
-
default:
|
|
155
|
-
i(
|
|
180
|
+
t(i(d), { size: "small" }, {
|
|
181
|
+
default: c(() => [
|
|
182
|
+
t(i(de))
|
|
156
183
|
]),
|
|
157
184
|
_: 1
|
|
158
185
|
})
|
|
159
|
-
], 8,
|
|
186
|
+
], 8, be)) : l("", !0)
|
|
160
187
|
])
|
|
161
188
|
])) : l("", !0)
|
|
162
189
|
], 2));
|
|
163
190
|
}
|
|
164
191
|
});
|
|
165
192
|
export {
|
|
166
|
-
|
|
193
|
+
Ke as default
|
|
167
194
|
};
|
package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './NmorphTagItem.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { createCssVariables as
|
|
5
|
-
import { NmorphComponentHeight as
|
|
6
|
-
import
|
|
2
|
+
import { defineComponent as I, ref as b, computed as m, onMounted as S, onBeforeUnmount as $, watch as z, openBlock as h, createElementBlock as _, normalizeStyle as H, normalizeClass as F, createElementVNode as U, renderSlot as G, toDisplayString as P, createBlock as K, unref as k, withModifiers as j, withCtx as Z, createVNode as q, createCommentVNode as J, nextTick as Q } from "vue";
|
|
3
|
+
import { useModifiers as W } from "../../../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssVariables as X } from "../../../../../utils/common.js";
|
|
5
|
+
import { NmorphComponentHeight as Y } from "../../../../../types/common.types.js";
|
|
6
|
+
import ee from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import te from "../../../../../assets/icons/error.svg.js";
|
|
9
|
+
const oe = { class: "nmorph-tag-item__content" }, re = { key: 1 }, ne = "var(--nmorph-gray-color)", y = "var(--nmorph-black-color)", le = "var(--nmorph-white-color)", de = /* @__PURE__ */ I({
|
|
10
10
|
__name: "NmorphTagItem",
|
|
11
11
|
props: {
|
|
12
12
|
value: {},
|
|
@@ -14,25 +14,27 @@ const te = { class: "nmorph-tag-item__content" }, oe = { key: 1 }, re = "var(--n
|
|
|
14
14
|
removable: { type: Boolean, default: !0 },
|
|
15
15
|
height: { default: "basic" },
|
|
16
16
|
design: { default: "nmorph" },
|
|
17
|
-
color: { default:
|
|
17
|
+
color: { default: ne }
|
|
18
18
|
},
|
|
19
19
|
emits: ["click", "close"],
|
|
20
|
-
setup(
|
|
21
|
-
const N = { r: 201, g: 210, b: 222 },
|
|
22
|
-
let
|
|
23
|
-
const R =
|
|
24
|
-
() =>
|
|
25
|
-
nmorph: [
|
|
26
|
-
"nmorph-tag-item": [
|
|
20
|
+
setup(g, { emit: O }) {
|
|
21
|
+
const N = { r: 201, g: 210, b: 222 }, l = g, i = b(null), u = b(y);
|
|
22
|
+
let p = null;
|
|
23
|
+
const R = m(
|
|
24
|
+
() => W({
|
|
25
|
+
nmorph: [Y[l.height]],
|
|
26
|
+
"nmorph-tag-item": [l.design]
|
|
27
27
|
})
|
|
28
|
-
),
|
|
29
|
-
"--
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, D = () => {
|
|
34
|
-
C("
|
|
35
|
-
}, L = (
|
|
28
|
+
), d = m(() => l.design === "common"), w = m(
|
|
29
|
+
() => d.value ? u.value : "var(--nmorph-contrast-text-color)"
|
|
30
|
+
), V = m(() => d.value ? X({
|
|
31
|
+
"--tag-item-background-color": l.color,
|
|
32
|
+
"--tag-item-content-color": u.value
|
|
33
|
+
}) : {}), C = O, D = () => {
|
|
34
|
+
C("close", l.value);
|
|
35
|
+
}, L = () => {
|
|
36
|
+
C("click", l.value);
|
|
37
|
+
}, T = (o) => {
|
|
36
38
|
const t = o.trim().replace("#", "");
|
|
37
39
|
if (![3, 4, 6, 8].includes(t.length)) return null;
|
|
38
40
|
const e = t.length <= 4 ? t.split("").map((r) => `${r}${r}`).join("") : t;
|
|
@@ -41,69 +43,70 @@ const te = { class: "nmorph-tag-item__content" }, oe = { key: 1 }, re = "var(--n
|
|
|
41
43
|
g: parseInt(e.slice(2, 4), 16),
|
|
42
44
|
b: parseInt(e.slice(4, 6), 16)
|
|
43
45
|
};
|
|
44
|
-
},
|
|
46
|
+
}, M = (o) => {
|
|
45
47
|
const t = o.match(/^rgba?\((.+)\)$/);
|
|
46
48
|
if (!t) return null;
|
|
47
|
-
const e = t[1].split("/")[0], r = e.includes(",") ? e.split(",") : e.trim().split(/\s+/), [n, a, c] = r.map((
|
|
48
|
-
return [n, a, c].some((
|
|
49
|
-
},
|
|
49
|
+
const e = t[1].split("/")[0], r = e.includes(",") ? e.split(",") : e.trim().split(/\s+/), [n, a, c] = r.map((s) => Number.parseFloat(s));
|
|
50
|
+
return [n, a, c].some((s) => Number.isNaN(s)) ? null : { r: n, g: a, b: c };
|
|
51
|
+
}, x = (o, t) => {
|
|
50
52
|
const e = o.trim().match(/^var\(\s*(--[A-Za-z0-9-_]+)(?:\s*,\s*(.+))?\)$/);
|
|
51
53
|
if (!e) return o;
|
|
52
|
-
const [, r, n] = e, a = t.ownerDocument, c = getComputedStyle(t).getPropertyValue(r).trim(),
|
|
53
|
-
return c ||
|
|
54
|
+
const [, r, n] = e, a = t.ownerDocument, c = getComputedStyle(t).getPropertyValue(r).trim(), s = getComputedStyle(a.documentElement).getPropertyValue(r).trim();
|
|
55
|
+
return c || s || n || o;
|
|
54
56
|
}, A = (o, t) => {
|
|
55
57
|
let e = o;
|
|
56
58
|
for (let r = 0; r < 4; r += 1) {
|
|
57
|
-
const n =
|
|
59
|
+
const n = x(e, t);
|
|
58
60
|
if (n === e) break;
|
|
59
61
|
e = n;
|
|
60
62
|
}
|
|
61
|
-
return
|
|
63
|
+
return T(e) || M(e) || N;
|
|
62
64
|
}, B = ({ r: o, g: t, b: e }) => {
|
|
63
65
|
const [r, n, a] = [o, t, e].map((c) => {
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
+
const s = c / 255;
|
|
67
|
+
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
66
68
|
});
|
|
67
69
|
return 0.2126 * r + 0.7152 * n + 0.0722 * a;
|
|
68
|
-
},
|
|
70
|
+
}, v = (o, t) => {
|
|
69
71
|
const [e, r] = [o, t].sort((n, a) => a - n);
|
|
70
72
|
return (e + 0.05) / (r + 0.05);
|
|
71
73
|
}, E = (o) => {
|
|
72
|
-
const t = B(o), e =
|
|
73
|
-
return e > r ?
|
|
74
|
-
},
|
|
75
|
-
await
|
|
74
|
+
const t = B(o), e = v(t, 1), r = v(t, 0);
|
|
75
|
+
return e > r ? le : y;
|
|
76
|
+
}, f = async () => {
|
|
77
|
+
await Q(), !(!d.value || !i.value) && (u.value = E(A(l.color, i.value)));
|
|
76
78
|
};
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
+
return S(() => {
|
|
80
|
+
f(), !(typeof MutationObserver > "u" || !i.value) && (p = new MutationObserver(() => f()), p.observe(i.value.ownerDocument.documentElement, {
|
|
79
81
|
attributes: !0,
|
|
80
82
|
attributeFilter: ["nmorph-data-theme", "class", "style"]
|
|
81
83
|
}));
|
|
82
|
-
}),
|
|
83
|
-
|
|
84
|
-
}),
|
|
84
|
+
}), $(() => {
|
|
85
|
+
p?.disconnect();
|
|
86
|
+
}), z(() => [l.color, l.design], f, { flush: "post" }), (o, t) => (h(), _("div", {
|
|
85
87
|
ref_key: "tagRef",
|
|
86
88
|
ref: i,
|
|
87
|
-
class:
|
|
88
|
-
style:
|
|
89
|
-
onClick:
|
|
89
|
+
class: F(R.value),
|
|
90
|
+
style: H(V.value),
|
|
91
|
+
onClick: L
|
|
90
92
|
}, [
|
|
91
|
-
|
|
92
|
-
o.$slots.default ?
|
|
93
|
-
|
|
93
|
+
U("div", oe, [
|
|
94
|
+
o.$slots.default ? G(o.$slots, "default", { key: 0 }) : (h(), _("span", re, P(g.text), 1)),
|
|
95
|
+
l.removable ? (h(), K(k(ee), {
|
|
94
96
|
key: 2,
|
|
95
97
|
class: "nmorph-tag-item__close-icon",
|
|
96
|
-
|
|
98
|
+
color: w.value,
|
|
99
|
+
onClick: j(D, ["stop"])
|
|
97
100
|
}, {
|
|
98
|
-
default:
|
|
99
|
-
|
|
101
|
+
default: Z(() => [
|
|
102
|
+
q(k(te))
|
|
100
103
|
]),
|
|
101
104
|
_: 1
|
|
102
|
-
})) :
|
|
105
|
+
}, 8, ["color"])) : J("", !0)
|
|
103
106
|
])
|
|
104
107
|
], 6));
|
|
105
108
|
}
|
|
106
109
|
});
|
|
107
110
|
export {
|
|
108
|
-
|
|
111
|
+
de as default
|
|
109
112
|
};
|
|
@@ -1 +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--soft .nmorph-video-preview__state,.nmorph-video-preview.nmorph-video-preview--plain .nmorph-video-preview__state{color:var(--nmorph-text-color)}.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__play{position:absolute;top:50%;left:50%;z-index:1;display:inline-flex;justify-content:center;align-items:center;width:42px;height:42px;padding:0;color:var(--nmorph-text-color);background:color-mix(in srgb,var(--nmorph-
|
|
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--soft .nmorph-video-preview__state,.nmorph-video-preview.nmorph-video-preview--plain .nmorph-video-preview__state{color:var(--nmorph-text-color)}.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__play{position:absolute;top:50%;left:50%;z-index:1;display:inline-flex;justify-content:center;align-items:center;width:42px;height:42px;padding:0;color:var(--nmorph-contrast-text-color);background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0;border-radius:var(--border-radius-circular);box-shadow:var(--nmorph-shadow-outset);transform:translate(-50%,-50%);cursor:pointer}.nmorph-video-preview .nmorph-video-preview__play .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.nmorph-video-preview .nmorph-video-preview__play:hover{background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-video-preview.nmorph-video-preview--playing .nmorph-video-preview__play{opacity:.72}.nmorph-video-preview.nmorph-video-preview--embedded{width:var(--nmorph-video-preview-width, 100%);height:var(--nmorph-video-preview-height, 120px);box-shadow:none}.nmorph-video-preview.nmorph-video-preview--embedded .nmorph-video-preview__play,.nmorph-video-preview.nmorph-video-preview--soft .nmorph-video-preview__play,.nmorph-video-preview.nmorph-video-preview--plain .nmorph-video-preview__play{box-shadow: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:0;background:transparent}.nmorph-video-preview .nmorph-video-preview__action-button,.nmorph-video-preview .nmorph-video-preview__action-link{display:inline-flex;justify-content:center;align-items:center;width:22px;height:22px;padding:0;color:var(--nmorph-contrast-text-color);font:inherit;text-decoration:none;background:color-mix(in srgb,var(--nmorph-black-color) 58%,transparent);border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-video-preview .nmorph-video-preview__action-button:hover,.nmorph-video-preview .nmorph-video-preview__action-link:hover{background:color-mix(in srgb,var(--nmorph-black-color) 72%,transparent)}.nmorph-video-preview .nmorph-video-preview__action-button .nmorph-icon,.nmorph-video-preview .nmorph-video-preview__action-link .nmorph-icon{--nmorph-icon-color: var(--nmorph-contrast-text-color);--color: var(--nmorph-contrast-text-color)}.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--soft{background:color-mix(in srgb,var(--nmorph-accent-color) 6%,transparent);box-shadow:none}.nmorph-video-preview.nmorph-video-preview--plain{background:transparent;box-shadow:none}.nmorph-video-preview.nmorph-video-preview--error{outline:1px solid var(--nmorph-error-color)}.nmorph-video-preview__portal{display:contents}.nmorph-video-preview__portal .nmorph-video-preview__portal-content{--nmorph-video-preview-portal-width: min( calc(100vw - 96px) , 1080px);--nmorph-video-preview-portal-height: min( calc(100vh - 180px) , 720px);position:absolute;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:var(--nmorph-video-preview-portal-width);height:var(--nmorph-video-preview-portal-height);transform:translate(-50%,-50%)}.nmorph-video-preview__portal .nmorph-video-preview__portal-media{display:block;width:100%;max-width:100%;height:100%;max-height:100%;object-fit:contain;background:var(--nmorph-black-color);border-radius:var(--default-border-radius)}
|