@nmorph/nmorph-ui-kit 2.2.50 → 2.2.52

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