@nmorph/nmorph-ui-kit 2.2.49 → 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-file-card/NmorphFileCard.css +1 -1
- package/dist/components/data/nmorph-file-card/NmorphFileCard.vue.js +88 -65
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -1
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +40 -35
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +92 -67
- package/dist/index.umd.js +14 -14
- 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 +2 -2
- package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +4 -2
- package/dist/src/components/data/nmorph-video-preview/types.d.ts +2 -0
- 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{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--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--plain{background:transparent;box-shadow:none}.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 +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-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: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{width:100%;min-width:0
|
|
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}
|
|
@@ -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 O, useSlots as W, computed as r, openBlock as a, createElementBlock as t, normalizeClass as K, createElementVNode as v, createBlock as c, unref as n, withCtx as m, createVNode as l, resolveDynamicComponent as j, createCommentVNode as i, toDisplayString as h, renderSlot as G } from "vue";
|
|
3
|
+
import { useModifiers as q } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { getFileExtension as J, getPlainFileType as Q, getTypeCandidates as U, isKnownFileType as d } 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 re from "../nmorph-audio-preview/NmorphAudioPreview.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
import ae 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";
|
|
12
13
|
import p 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/eye.svg.js";
|
|
16
|
+
import le from "../../../assets/icons/audio.svg.js";
|
|
17
|
+
import se from "../../../assets/icons/video.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" }, ve = { class: "nmorph-file-card__info" }, he = { 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
|
+
}, Be = ["href", "aria-label"], Ne = ["href", "download", "aria-label"], Oe = /* @__PURE__ */ O({
|
|
32
34
|
__name: "NmorphFileCard",
|
|
33
35
|
props: {
|
|
34
36
|
name: {},
|
|
@@ -48,69 +50,76 @@ 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, _ = H, D = W(), u = r(() => (e.extension || J(e.name) || Q(e.mimeType)).toLowerCase()), s = r(() => U(e.mimeType, e.name)), $ = r(() => e.mimeType.toLowerCase().startsWith("image/") || s.value.some((o) => d(o, X)) ? ne : e.mimeType.toLowerCase().startsWith("audio/") || s.value.some((o) => d(o, Y)) ? le : e.mimeType.toLowerCase().startsWith("video/") || s.value.some((o) => d(o, Z)) ? se : s.value.some((o) => d(o, ee)) ? te : s.value.some((o) => d(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 `${k.toFixed(
|
|
57
|
-
},
|
|
58
|
-
() =>
|
|
59
|
-
),
|
|
60
|
-
() =>
|
|
57
|
+
const B = ["B", "KB", "MB", "GB", "TB"], N = Math.min(Math.floor(Math.log(o) / Math.log(1024)), B.length - 1), k = o / 1024 ** N, V = k >= 10 || N === 0 || Number.isInteger(k) ? 0 : 1;
|
|
58
|
+
return `${k.toFixed(V)} ${B[N]}`;
|
|
59
|
+
}, L = r(() => E(e.size)), M = r(() => u.value || e.mimeType), b = r(() => [M.value, L.value].filter(Boolean).join(" · ")), w = r(() => e.mediaPreview === "audio" && !!e.previewSrc && !e.loading && !e.error), y = r(() => e.mediaPreview === "video" && !!e.previewSrc && !e.loading && !e.error), f = r(() => w.value || y.value), z = r(() => e.compact ? "96px" : "120px"), S = r(() => e.mimeType.toLowerCase() === "application/pdf" || u.value === "pdf"), x = r(() => S.value ? e.previewSrc || e.downloadHref : ""), g = r(
|
|
60
|
+
() => e.showDefaultActions && !!x.value && !f.value && S.value
|
|
61
|
+
), C = r(
|
|
62
|
+
() => !!D.actions || e.showDefaultActions && (e.previewSrc && !f.value && !g.value || e.downloadHref)
|
|
63
|
+
), F = r(
|
|
64
|
+
() => q({
|
|
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
|
+
f.value && "media",
|
|
71
|
+
w.value && "media-audio",
|
|
72
|
+
y.value && "media-video",
|
|
73
|
+
!e.iconSurface && "icon-plain",
|
|
74
|
+
!C.value && "no-actions"
|
|
68
75
|
]
|
|
69
76
|
})
|
|
70
|
-
),
|
|
71
|
-
return (o,
|
|
72
|
-
class:
|
|
77
|
+
), T = () => _("open"), R = () => _("download"), I = () => _("error");
|
|
78
|
+
return (o, B) => (a(), t("div", {
|
|
79
|
+
class: K(F.value)
|
|
73
80
|
}, [
|
|
74
|
-
|
|
75
|
-
e.loading ? (
|
|
81
|
+
v("div", pe, [
|
|
82
|
+
e.loading ? (a(), c(n(p), {
|
|
76
83
|
key: 0,
|
|
77
84
|
size: "medium"
|
|
78
85
|
}, {
|
|
79
86
|
default: m(() => [
|
|
80
|
-
|
|
87
|
+
l(n(ce))
|
|
81
88
|
]),
|
|
82
89
|
_: 1
|
|
83
|
-
})) : (
|
|
90
|
+
})) : (a(), c(n(p), {
|
|
84
91
|
key: 1,
|
|
85
92
|
size: "medium"
|
|
86
93
|
}, {
|
|
87
94
|
default: m(() => [
|
|
88
|
-
(
|
|
95
|
+
(a(), c(j($.value)))
|
|
89
96
|
]),
|
|
90
97
|
_: 1
|
|
91
98
|
})),
|
|
92
|
-
|
|
99
|
+
g.value && !e.loading && !e.error ? (a(), t("a", {
|
|
93
100
|
key: 2,
|
|
94
|
-
href:
|
|
101
|
+
href: x.value,
|
|
95
102
|
target: "_blank",
|
|
96
103
|
rel: "noopener noreferrer",
|
|
97
104
|
class: "nmorph-file-card__icon-action",
|
|
98
105
|
"aria-label": `Preview ${e.name}`,
|
|
99
|
-
onClick:
|
|
106
|
+
onClick: T
|
|
100
107
|
}, [
|
|
101
|
-
|
|
108
|
+
l(n(p), { size: "small" }, {
|
|
102
109
|
default: m(() => [
|
|
103
|
-
|
|
110
|
+
l(n(ie))
|
|
104
111
|
]),
|
|
105
112
|
_: 1
|
|
106
113
|
})
|
|
107
|
-
], 8,
|
|
114
|
+
], 8, ue)) : i("", !0)
|
|
108
115
|
]),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
v("div", fe, [
|
|
117
|
+
v("div", ve, [
|
|
118
|
+
v("span", he, h(e.name), 1),
|
|
119
|
+
e.error && e.errorText ? (a(), t("span", _e, h(e.errorText), 1)) : b.value ? (a(), t("span", we, h(b.value), 1)) : i("", !0)
|
|
120
|
+
]),
|
|
121
|
+
w.value ? (a(), c(re, {
|
|
122
|
+
key: 0,
|
|
114
123
|
class: "nmorph-file-card__audio-preview",
|
|
115
124
|
src: e.previewSrc,
|
|
116
125
|
name: e.name,
|
|
@@ -120,48 +129,62 @@ const ie = { class: "nmorph-file-card__icon" }, le = ["href", "aria-label"], se
|
|
|
120
129
|
"show-icon": !1,
|
|
121
130
|
"show-header": !1,
|
|
122
131
|
"show-default-actions": !1,
|
|
123
|
-
onError:
|
|
124
|
-
}, null, 8, ["src", "name"])) :
|
|
132
|
+
onError: I
|
|
133
|
+
}, null, 8, ["src", "name"])) : i("", !0),
|
|
134
|
+
y.value ? (a(), c(ae, {
|
|
135
|
+
key: 1,
|
|
136
|
+
class: "nmorph-file-card__video-preview",
|
|
137
|
+
src: e.previewSrc,
|
|
138
|
+
name: e.name,
|
|
139
|
+
height: z.value,
|
|
140
|
+
surface: "plain",
|
|
141
|
+
embedded: "",
|
|
142
|
+
compact: "",
|
|
143
|
+
controls: !1,
|
|
144
|
+
"show-meta": !1,
|
|
145
|
+
"show-default-actions": !1,
|
|
146
|
+
onError: I
|
|
147
|
+
}, null, 8, ["src", "name", "height"])) : i("", !0)
|
|
125
148
|
]),
|
|
126
|
-
e.showExtensionBadge && u.value ? (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
e.previewSrc && !
|
|
149
|
+
e.showExtensionBadge && u.value ? (a(), t("span", ye, h(u.value), 1)) : i("", !0),
|
|
150
|
+
C.value ? (a(), t("div", ge, [
|
|
151
|
+
G(o.$slots, "actions", {}, () => [
|
|
152
|
+
e.previewSrc && !f.value && !g.value ? (a(), t("a", {
|
|
130
153
|
key: 0,
|
|
131
154
|
href: e.previewSrc,
|
|
132
155
|
target: "_blank",
|
|
133
156
|
rel: "noopener noreferrer",
|
|
134
157
|
class: "nmorph-file-card__action-link",
|
|
135
158
|
"aria-label": `Open ${e.name}`,
|
|
136
|
-
onClick:
|
|
159
|
+
onClick: T
|
|
137
160
|
}, [
|
|
138
|
-
|
|
161
|
+
l(n(p), { size: "small" }, {
|
|
139
162
|
default: m(() => [
|
|
140
|
-
|
|
163
|
+
l(n(me))
|
|
141
164
|
]),
|
|
142
165
|
_: 1
|
|
143
166
|
})
|
|
144
|
-
], 8,
|
|
145
|
-
e.downloadHref ? (
|
|
167
|
+
], 8, Be)) : i("", !0),
|
|
168
|
+
e.downloadHref ? (a(), t("a", {
|
|
146
169
|
key: 1,
|
|
147
170
|
href: e.downloadHref,
|
|
148
171
|
download: e.name,
|
|
149
172
|
class: "nmorph-file-card__action-link",
|
|
150
173
|
"aria-label": `Download ${e.name}`,
|
|
151
|
-
onClick:
|
|
174
|
+
onClick: R
|
|
152
175
|
}, [
|
|
153
|
-
|
|
176
|
+
l(n(p), { size: "small" }, {
|
|
154
177
|
default: m(() => [
|
|
155
|
-
|
|
178
|
+
l(n(de))
|
|
156
179
|
]),
|
|
157
180
|
_: 1
|
|
158
181
|
})
|
|
159
|
-
], 8,
|
|
182
|
+
], 8, Ne)) : i("", !0)
|
|
160
183
|
])
|
|
161
|
-
])) :
|
|
184
|
+
])) : i("", !0)
|
|
162
185
|
], 2));
|
|
163
186
|
}
|
|
164
187
|
});
|
|
165
188
|
export {
|
|
166
|
-
|
|
189
|
+
Oe as default
|
|
167
190
|
};
|
|
@@ -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-main-color) 86%,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{--color: currentColor}.nmorph-video-preview .nmorph-video-preview__play:hover{color:var(--nmorph-accent-color)}.nmorph-video-preview.nmorph-video-preview--playing .nmorph-video-preview__play{opacity:.72}.nmorph-video-preview .nmorph-video-preview__name,.nmorph-video-preview .nmorph-video-preview__duration{min-width:0;overflow:hidden;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-overflow:ellipsis}.nmorph-video-preview .nmorph-video-preview__name{flex:1 1 auto}.nmorph-video-preview .nmorph-video-preview__duration{flex:0 0 auto;font-variant-numeric:tabular-nums}.nmorph-video-preview .nmorph-video-preview__actions{position:absolute;top:var(--indentation-02);right:var(--indentation-02);display:flex;gap:var(--indentation-01);padding:2px;background:color-mix(in srgb,var(--nmorph-main-color) 86%,transparent);border-radius:var(--default-border-radius)}.nmorph-video-preview .nmorph-video-preview__action-link{display:inline-flex;justify-content:center;align-items:center;width:22px;height:22px;color:var(--nmorph-text-color);text-decoration:none;border-radius:var(--default-border-radius)}.nmorph-video-preview .nmorph-video-preview__action-link:hover{color:var(--nmorph-accent-color);background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent)}.nmorph-video-preview .nmorph-video-preview__action-link .nmorph-icon{--color: currentColor}.nmorph-video-preview.nmorph-video-preview--compact{width:var(--nmorph-video-preview-width, 180px);height:var(--nmorph-video-preview-height, 102px)}.nmorph-video-preview.nmorph-video-preview--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)}
|
|
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-main-color) 86%,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{--color: currentColor}.nmorph-video-preview .nmorph-video-preview__play:hover{color:var(--nmorph-accent-color)}.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:2px;background:color-mix(in srgb,var(--nmorph-main-color) 86%,transparent);border-radius:var(--default-border-radius)}.nmorph-video-preview .nmorph-video-preview__action-link{display:inline-flex;justify-content:center;align-items:center;width:22px;height:22px;color:var(--nmorph-text-color);text-decoration:none;border-radius:var(--default-border-radius)}.nmorph-video-preview .nmorph-video-preview__action-link:hover{color:var(--nmorph-accent-color);background:color-mix(in srgb,var(--nmorph-accent-color) 10%,transparent)}.nmorph-video-preview .nmorph-video-preview__action-link .nmorph-icon{--color: currentColor}.nmorph-video-preview.nmorph-video-preview--compact{width:var(--nmorph-video-preview-width, 180px);height:var(--nmorph-video-preview-height, 102px)}.nmorph-video-preview.nmorph-video-preview--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)}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './NmorphVideoPreview.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as V, useSlots as E, ref as y, computed as u, openBlock as o, createElementBlock as t, normalizeStyle as A, normalizeClass as T, createCommentVNode as n, createVNode as s, unref as r, withCtx as p, createBlock as m, toDisplayString as h, renderSlot as O, createElementVNode as R } from "vue";
|
|
3
3
|
import { useModifiers as L } from "../../../utils/create-modifiers.js";
|
|
4
4
|
import { createCssSizeVariables as j } from "../../../utils/common.js";
|
|
5
|
-
import
|
|
5
|
+
import c from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import q from "../../../assets/icons/
|
|
8
|
-
import F from "../../../assets/icons/
|
|
9
|
-
import G from "../../../assets/icons/
|
|
10
|
-
import J from "../../../assets/icons/
|
|
7
|
+
import q from "../../../assets/icons/video.svg.js";
|
|
8
|
+
import F from "../../../assets/icons/pause.svg.js";
|
|
9
|
+
import G from "../../../assets/icons/play.svg.js";
|
|
10
|
+
import J from "../../../assets/icons/loading.svg.js";
|
|
11
11
|
import K from "../../../assets/icons/open.svg.js";
|
|
12
12
|
import Q from "../../../assets/icons/download.svg.js";
|
|
13
13
|
const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W = ["aria-label"], X = {
|
|
@@ -28,7 +28,7 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
28
28
|
}, ae = {
|
|
29
29
|
key: 4,
|
|
30
30
|
class: "nmorph-video-preview__actions"
|
|
31
|
-
}, re = ["href", "aria-label"], te = ["href", "download", "aria-label"],
|
|
31
|
+
}, re = ["href", "aria-label"], te = ["href", "download", "aria-label"], he = /* @__PURE__ */ V({
|
|
32
32
|
__name: "NmorphVideoPreview",
|
|
33
33
|
props: {
|
|
34
34
|
src: {},
|
|
@@ -38,6 +38,8 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
38
38
|
height: { default: void 0 },
|
|
39
39
|
durationMs: { default: void 0 },
|
|
40
40
|
surface: { default: "card" },
|
|
41
|
+
embedded: { type: Boolean, default: !1 },
|
|
42
|
+
showMeta: { type: Boolean, default: !0 },
|
|
41
43
|
compact: { type: Boolean, default: !1 },
|
|
42
44
|
controls: { type: Boolean, default: !0 },
|
|
43
45
|
muted: { type: Boolean, default: !1 },
|
|
@@ -51,22 +53,25 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
51
53
|
showDefaultActions: { type: Boolean, default: !0 }
|
|
52
54
|
},
|
|
53
55
|
emits: ["play", "pause", "open", "download", "error"],
|
|
54
|
-
setup(
|
|
55
|
-
const e =
|
|
56
|
+
setup(w, { expose: k, emit: g }) {
|
|
57
|
+
const e = w, i = g, b = E(), d = y(null), l = y(!1), B = (a) => {
|
|
56
58
|
if (!a || a < 0) return "";
|
|
57
|
-
const v = Math.round(a / 1e3), I = Math.floor(v / 60),
|
|
58
|
-
return `${I}:${
|
|
59
|
-
}, f = u(() =>
|
|
60
|
-
() => !!
|
|
59
|
+
const v = Math.round(a / 1e3), I = Math.floor(v / 60), M = v % 60;
|
|
60
|
+
return `${I}:${M.toString().padStart(2, "0")}`;
|
|
61
|
+
}, f = u(() => B(e.durationMs)), _ = u(
|
|
62
|
+
() => !!b.actions || e.showDefaultActions && (e.src || e.downloadHref)
|
|
61
63
|
), H = u(
|
|
62
64
|
() => L({
|
|
63
65
|
"nmorph-video-preview": [
|
|
64
66
|
e.surface,
|
|
67
|
+
e.embedded && "embedded",
|
|
68
|
+
!e.showMeta && "no-meta",
|
|
65
69
|
e.compact && "compact",
|
|
66
70
|
e.fit,
|
|
67
71
|
e.loading && "loading",
|
|
68
72
|
e.error && "error",
|
|
69
|
-
l.value && "playing"
|
|
73
|
+
l.value && "playing",
|
|
74
|
+
!_.value && "no-actions"
|
|
70
75
|
]
|
|
71
76
|
})
|
|
72
77
|
), N = u(
|
|
@@ -95,9 +100,9 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
95
100
|
}, D = (a) => {
|
|
96
101
|
l.value = !1, i("error", a);
|
|
97
102
|
};
|
|
98
|
-
return
|
|
103
|
+
return k({ videoRef: d }), (a, v) => (o(), t("div", {
|
|
99
104
|
class: T(H.value),
|
|
100
|
-
style:
|
|
105
|
+
style: A(N.value)
|
|
101
106
|
}, [
|
|
102
107
|
!e.loading && !e.error ? (o(), t("video", {
|
|
103
108
|
key: 0,
|
|
@@ -122,37 +127,37 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
122
127
|
"aria-label": l.value ? `Pause ${e.name || "video"}` : `Play ${e.name || "video"}`,
|
|
123
128
|
onClick: P
|
|
124
129
|
}, [
|
|
125
|
-
s(r(
|
|
126
|
-
default:
|
|
127
|
-
l.value ? (o(), m(r(
|
|
130
|
+
s(r(c), { size: "medium" }, {
|
|
131
|
+
default: p(() => [
|
|
132
|
+
l.value ? (o(), m(r(F), { key: 0 })) : (o(), m(r(G), { key: 1 }))
|
|
128
133
|
]),
|
|
129
134
|
_: 1
|
|
130
135
|
})
|
|
131
136
|
], 8, W)) : (o(), t("div", X, [
|
|
132
|
-
e.loading ? (o(), m(r(
|
|
137
|
+
e.loading ? (o(), m(r(c), {
|
|
133
138
|
key: 0,
|
|
134
139
|
size: "large"
|
|
135
140
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
s(r(
|
|
141
|
+
default: p(() => [
|
|
142
|
+
s(r(J))
|
|
138
143
|
]),
|
|
139
144
|
_: 1
|
|
140
|
-
})) : (o(), m(r(
|
|
145
|
+
})) : (o(), m(r(c), {
|
|
141
146
|
key: 1,
|
|
142
147
|
size: "large"
|
|
143
148
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
s(r(
|
|
149
|
+
default: p(() => [
|
|
150
|
+
s(r(q))
|
|
146
151
|
]),
|
|
147
152
|
_: 1
|
|
148
153
|
})),
|
|
149
|
-
e.error && e.errorText ? (o(), t("span", Y,
|
|
154
|
+
e.error && e.errorText ? (o(), t("span", Y, h(e.errorText), 1)) : n("", !0)
|
|
150
155
|
])),
|
|
151
|
-
e.name || f.value ? (o(), t("div", Z, [
|
|
152
|
-
e.name ? (o(), t("span", ee,
|
|
153
|
-
f.value ? (o(), t("span", oe,
|
|
156
|
+
e.showMeta && (e.name || f.value) ? (o(), t("div", Z, [
|
|
157
|
+
e.name ? (o(), t("span", ee, h(e.name), 1)) : n("", !0),
|
|
158
|
+
f.value ? (o(), t("span", oe, h(f.value), 1)) : n("", !0)
|
|
154
159
|
])) : n("", !0),
|
|
155
|
-
|
|
160
|
+
_.value ? (o(), t("div", ae, [
|
|
156
161
|
O(a.$slots, "actions", {}, () => [
|
|
157
162
|
R("a", {
|
|
158
163
|
href: e.src,
|
|
@@ -162,8 +167,8 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
162
167
|
"aria-label": `Open ${e.name || "video"}`,
|
|
163
168
|
onClick: z
|
|
164
169
|
}, [
|
|
165
|
-
s(r(
|
|
166
|
-
default:
|
|
170
|
+
s(r(c), { size: "small" }, {
|
|
171
|
+
default: p(() => [
|
|
167
172
|
s(r(K))
|
|
168
173
|
]),
|
|
169
174
|
_: 1
|
|
@@ -177,8 +182,8 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
177
182
|
"aria-label": `Download ${e.name || "video"}`,
|
|
178
183
|
onClick: C
|
|
179
184
|
}, [
|
|
180
|
-
s(r(
|
|
181
|
-
default:
|
|
185
|
+
s(r(c), { size: "small" }, {
|
|
186
|
+
default: p(() => [
|
|
182
187
|
s(r(Q))
|
|
183
188
|
]),
|
|
184
189
|
_: 1
|
|
@@ -190,5 +195,5 @@ const U = ["src", "poster", "controls", "muted", "playsinline", "preload"], W =
|
|
|
190
195
|
}
|
|
191
196
|
});
|
|
192
197
|
export {
|
|
193
|
-
|
|
198
|
+
he as default
|
|
194
199
|
};
|