@nmorph/nmorph-ui-kit 3.0.2 → 3.0.3

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 (23) hide show
  1. package/dist/assets/icons/external-link.svg.js +2 -2
  2. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +5 -4
  3. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +143 -124
  4. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
  5. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +10 -10
  6. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue2.js +24 -24
  7. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  8. package/dist/components/data/nmorph-image/NmorphImage.vue.js +22 -20
  9. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +24 -18
  10. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.css +1 -1
  11. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.js +31 -26
  12. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue2.js +158 -137
  13. package/dist/components/data/nmorph-progress/NmorphProgress.css +1 -1
  14. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +6 -6
  15. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue2.js +8 -8
  16. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +12 -11
  17. package/dist/index.umd.js +45 -45
  18. package/dist/package.json.js +1 -1
  19. package/dist/src/components/data/nmorph-image/types.d.ts +1 -0
  20. package/dist/src/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.d.ts +2 -0
  21. package/dist/src/components/data/nmorph-media-gallery/types.d.ts +10 -0
  22. package/dist/style.css +1 -1
  23. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
1
  import './NmorphMediaGallery.css';
2
- import { defineComponent as He, ref as c, computed as n, watch as N, onBeforeUnmount as Se } from "vue";
3
- import { useModifiers as X } from "../../../utils/create-modifiers.js";
4
- import { createCssSizeVariables as Ae } from "../../../utils/common.js";
5
- import Te from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
6
- import Pe from "../nmorph-image/NmorphImage.vue.js";
7
- import Me from "../../../assets/icons/full-screen.svg.js";
8
- import Ve from "../../../assets/icons/eye.svg.js";
9
- import Le from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
- import Re from "../../basic/nmorph-button/NmorphButton.vue.js";
11
- import De from "../../../assets/icons/zoom-out.svg.js";
12
- import _e from "../../../assets/icons/zoom-in.svg.js";
13
- import Ee from "../../../assets/icons/shrink.svg.js";
14
- import ze from "../../../assets/icons/rotate-right.svg.js";
15
- import Ce from "../../../assets/icons/rotate-left.svg.js";
16
- import Ke from "../../../assets/icons/play.svg.js";
17
- import $e from "../../../assets/icons/enlarge.svg.js";
18
- import Oe from "../../../assets/icons/download.svg.js";
19
- const Y = 45, dt = /* @__PURE__ */ He({
2
+ import { defineComponent as Ae, ref as c, computed as a, watch as F, onBeforeUnmount as Re } from "vue";
3
+ import { useModifiers as Y } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as Pe } from "../../../utils/common.js";
5
+ import Ve from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
6
+ import Me from "../nmorph-image/NmorphImage.vue.js";
7
+ import Le from "../../../assets/icons/full-screen.svg.js";
8
+ import De from "../../../assets/icons/eye.svg.js";
9
+ import _e from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
+ import Ce from "../../basic/nmorph-button/NmorphButton.vue.js";
11
+ import Ee from "../../../assets/icons/zoom-out.svg.js";
12
+ import ze from "../../../assets/icons/zoom-in.svg.js";
13
+ import Ke from "../../../assets/icons/shrink.svg.js";
14
+ import $e from "../../../assets/icons/rotate-right.svg.js";
15
+ import Oe from "../../../assets/icons/rotate-left.svg.js";
16
+ import Ze from "../../../assets/icons/play.svg.js";
17
+ import Ue from "../../../assets/icons/enlarge.svg.js";
18
+ import Xe from "../../../assets/icons/download.svg.js";
19
+ const G = 45, ft = /* @__PURE__ */ Ae({
20
20
  __name: "NmorphMediaGallery",
21
21
  props: {
22
22
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -35,6 +35,10 @@ const Y = 45, dt = /* @__PURE__ */ He({
35
35
  showTriggerFullscreenAction: { type: Boolean, required: !1, default: !0 },
36
36
  showTriggerDownloadAction: { type: Boolean, required: !1, default: !0 },
37
37
  showTriggerPlayButton: { type: Boolean, required: !1, default: !0 },
38
+ triggerImageFit: { type: String, required: !1, default: "cover" },
39
+ triggerVideoFit: { type: String, required: !1, default: "cover" },
40
+ triggerItemClass: { type: Function, required: !1 },
41
+ triggerItemStyle: { type: Function, required: !1 },
38
42
  showNavigationButtons: { type: Boolean, required: !1, default: !0 },
39
43
  showActionBar: { type: Boolean, required: !1, default: !0 },
40
44
  showFileName: { type: Boolean, required: !1, default: !0 },
@@ -45,105 +49,115 @@ const Y = 45, dt = /* @__PURE__ */ He({
45
49
  videoFit: { type: String, required: !1, default: "contain" }
46
50
  },
47
51
  emits: ["update:model-value", "update:active-index", "close", "change", "download", "fullscreen"],
48
- setup(G, { expose: W, emit: j }) {
49
- W();
50
- const o = G, a = j, v = c(o.modelValue), m = c(0), h = c(null), F = c({}), y = c(null), l = c(!1), f = c(1), i = c(0), p = c(null), u = n(() => o.items || []), x = n(() => u.value.length > 1), V = n(() => o.showNavigationButtons && x.value), g = (e) => {
51
- const t = u.value.length - 1;
52
+ setup(W, { expose: j, emit: J }) {
53
+ j();
54
+ const r = W, l = J, v = c(r.modelValue), m = c(0), h = c(null), q = c({}), y = c(null), i = c(!1), f = c(1), u = c(0), g = c(null), I = c(!1), s = a(() => r.items || []), x = a(() => s.value.length > 1), M = a(() => r.showNavigationButtons && x.value), p = (e) => {
55
+ const t = s.value.length - 1;
52
56
  return t < 0 || !Number.isFinite(e) || e < 0 ? 0 : e > t ? t : e;
53
- }, d = n(() => g(m.value)), r = n(() => u.value[d.value]), B = n(() => r.value?.kind === "image"), I = n(() => r.value?.kind === "video"), L = n(
54
- () => r.value?.kind === "video" ? r.value.controls !== !1 : !1
55
- ), J = n(() => r.value?.kind === "video" ? r.value.muted === !0 : !1), Q = n(
56
- () => r.value?.kind === "video" ? r.value.playsinline !== !1 : !0
57
- ), ee = n(
58
- () => r.value?.kind === "video" && r.value.preload || "metadata"
59
- ), te = n(
60
- () => r.value?.kind === "video" && r.value.name || "video"
61
- ), R = n(() => r.value?.name || ""), oe = n(() => o.showFileName ? R.value : ""), D = n(() => r.value?.downloadHref || ""), _ = n(() => o.showFileActions && I.value && !L.value), re = n(
62
- () => o.showFileActions && (_.value || !!D.value)
63
- ), ne = n(
64
- () => X({
57
+ }, d = a(() => p(m.value)), o = a(() => s.value[d.value]), B = a(() => o.value?.kind === "image"), w = a(() => o.value?.kind === "video"), L = a(
58
+ () => o.value?.kind === "video" ? o.value.controls !== !1 : !1
59
+ ), Q = a(() => o.value?.kind === "video" ? o.value.muted === !0 : !1), ee = a(
60
+ () => o.value?.kind === "video" ? o.value.playsinline !== !1 : !0
61
+ ), te = a(
62
+ () => o.value?.kind === "video" && o.value.preload || "metadata"
63
+ ), re = a(
64
+ () => o.value?.kind === "video" && o.value.name || "video"
65
+ ), D = a(() => o.value?.name || ""), oe = a(() => r.showFileName ? D.value : ""), _ = a(() => o.value?.downloadHref || ""), C = a(() => r.showFileActions && w.value && !L.value), ae = a(
66
+ () => r.showFileActions && (C.value || !!_.value)
67
+ ), ne = a(
68
+ () => Y({
65
69
  "nmorph-media-gallery": [
66
70
  v.value && "opened",
67
71
  B.value && "image",
68
- I.value && "video",
69
- l.value && I.value && "video-playing",
70
- o.imageFit === "cover" && B.value && "image-cover",
71
- o.videoFit === "cover" && I.value && "video-cover"
72
+ w.value && "video",
73
+ i.value && w.value && "video-playing",
74
+ r.imageFit === "cover" && B.value && "image-cover",
75
+ r.videoFit === "cover" && w.value && "video-cover"
72
76
  ]
73
77
  })
74
- ), ae = n(() => `rotate(${i.value}deg) scale(${f.value})`), le = n(
75
- () => Ae({
76
- "--nmorph-private-media-gallery-trigger-height": o.height
78
+ ), le = a(() => `rotate(${u.value}deg) scale(${f.value})`), ie = a(() => ({
79
+ ...Pe({
80
+ "--nmorph-private-media-gallery-trigger-height": r.height
81
+ }),
82
+ "--nmorph-private-media-gallery-trigger-video-fit": r.triggerVideoFit
83
+ })), ue = a(
84
+ () => Y({
85
+ "nmorph-media-gallery__trigger": [r.height !== void 0 && "fixed-height"]
77
86
  })
78
- ), ie = n(
79
- () => X({
80
- "nmorph-media-gallery__trigger": [o.height !== void 0 && "fixed-height"]
81
- })
82
- ), q = (e) => {
87
+ ), S = (e) => {
83
88
  if (e === void 0 || Number.isNaN(e) || e < 0) return "";
84
89
  if (e === 0) return "0 B";
85
- const t = ["B", "KB", "MB", "GB", "TB"], s = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), M = e / 1024 ** s, ke = M >= 10 || s === 0 || Number.isInteger(M) ? 0 : 1;
86
- return `${M.toFixed(ke)} ${t[s]}`;
87
- }, ue = n(() => o.showFileSize ? q(r.value?.size) : ""), se = (e) => e.name || "", de = (e, t) => e.name || `${e.kind === "video" ? "Video" : "Image"} ${t + 1}`, ce = (e) => q(e.size), E = (e) => e.downloadHref || "", z = (e) => o.showTriggerPreviewAction && e.kind === "video", C = (e) => o.showTriggerFullscreenAction && e.kind === "video", K = (e) => o.showTriggerDownloadAction && !!E(e), ve = (e) => o.showTriggerActions && (z(e) || C(e) || K(e)), fe = (e, t) => {
88
- F.value[e] = t instanceof HTMLVideoElement ? t : null;
90
+ const t = ["B", "KB", "MB", "GB", "TB"], n = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), V = e / 1024 ** n, He = V >= 10 || n === 0 || Number.isInteger(V) ? 0 : 1;
91
+ return `${V.toFixed(He)} ${t[n]}`;
92
+ }, se = a(() => r.showFileSize ? S(o.value?.size) : ""), de = (e) => e.name || "", ce = (e, t) => e.name || `${e.kind === "video" ? "Video" : "Image"} ${t + 1}`, ve = (e) => S(e.size), E = (e) => e.downloadHref || "", z = (e) => r.showTriggerPreviewAction && e.kind === "video", K = (e) => r.showTriggerFullscreenAction && e.kind === "video", $ = (e) => r.showTriggerDownloadAction && !!E(e), fe = (e) => r.showTriggerActions && (z(e) || K(e) || $(e)), me = (e, t) => {
93
+ q.value[e] = t instanceof HTMLVideoElement ? t : null;
94
+ }, ge = (e, t) => [
95
+ e.itemClass,
96
+ r.triggerItemClass?.(e, t)
97
+ ], pe = (e, t) => {
98
+ const n = {
99
+ ...e.itemStyle || {},
100
+ ...r.triggerItemStyle?.(e, t) || {}
101
+ };
102
+ return typeof e.aspectRatio == "number" && Number.isFinite(e.aspectRatio) && e.aspectRatio > 0 && (n.aspectRatio = String(e.aspectRatio)), n;
89
103
  };
90
- N(
91
- () => o.modelValue,
104
+ F(
105
+ () => r.modelValue,
92
106
  (e) => {
93
107
  v.value = e;
94
108
  }
95
- ), N(
96
- () => o.activeIndex,
109
+ ), F(
110
+ () => r.activeIndex,
97
111
  (e) => {
98
- typeof e == "number" && (m.value = g(e));
112
+ typeof e == "number" && (m.value = p(e));
99
113
  },
100
114
  { immediate: !0 }
101
- ), N(
102
- () => [o.initialIndex, u.value.length],
115
+ ), F(
116
+ () => [r.initialIndex, s.value.length],
103
117
  () => {
104
- typeof o.activeIndex != "number" && (m.value = g(o.initialIndex));
118
+ typeof r.activeIndex != "number" && (m.value = p(r.initialIndex));
105
119
  },
106
120
  { immediate: !0 }
107
- ), N(
108
- () => [r.value?.kind, r.value?.src, d.value],
121
+ ), F(
122
+ () => [o.value?.kind, o.value?.src, d.value],
109
123
  () => {
110
- l.value = !1, y.value = null;
124
+ i.value = !1, y.value = null;
111
125
  }
112
126
  );
113
- const w = () => {
114
- !h.value || h.value === y.value || (h.value.pause(), l.value = !1, y.value = h.value);
127
+ const N = () => {
128
+ !h.value || h.value === y.value || (h.value.pause(), i.value = !1, y.value = h.value);
115
129
  }, b = () => {
116
- f.value = 1, i.value = 0;
117
- }, k = (e) => {
118
- if (!u.value.length) return;
119
- const t = g(e);
130
+ f.value = 1, u.value = 0;
131
+ }, T = (e) => {
132
+ if (!s.value.length) return;
133
+ const t = p(e);
120
134
  if (t === d.value) return;
121
- w(), l.value = !1, m.value = t, b(), a("update:active-index", t);
122
- const s = u.value[t];
123
- s && a("change", s, t);
135
+ N(), i.value = !1, m.value = t, b(), l("update:active-index", t);
136
+ const n = s.value[t];
137
+ n && l("change", n, t);
138
+ }, k = () => {
139
+ const e = s.value.length;
140
+ e && T(d.value === 0 ? e - 1 : d.value - 1);
124
141
  }, H = () => {
125
- const e = u.value.length;
126
- e && k(d.value === 0 ? e - 1 : d.value - 1);
127
- }, S = () => {
128
- const e = u.value.length;
129
- e && k(d.value === e - 1 ? 0 : d.value + 1);
130
- }, me = (e) => {
131
- if (!u.value.length) return;
132
- const t = g(e);
133
- w(), l.value = !1, m.value = t, b(), v.value = !0, a("update:model-value", !0), a("update:active-index", t);
134
- const s = u.value[t];
135
- s && a("change", s, t);
136
- }, $ = () => {
137
- v.value && (w(), v.value = !1, a("update:model-value", !1), a("close"));
138
- }, pe = () => {
139
- i.value = i.value + 90, i.value >= 360 && (i.value = 0);
140
- }, ge = () => {
141
- i.value = i.value - 90, i.value <= -360 && (i.value = 0);
142
- }, he = () => {
143
- f.value = parseFloat(Math.min(f.value + 0.2, 4).toFixed(3));
142
+ const e = s.value.length;
143
+ e && T(d.value === e - 1 ? 0 : d.value + 1);
144
+ }, he = (e) => {
145
+ if (!s.value.length) return;
146
+ const t = p(e);
147
+ N(), i.value = !1, m.value = t, b(), I.value = !0, v.value = !0, l("update:model-value", !0), l("update:active-index", t);
148
+ const n = s.value[t];
149
+ n && l("change", n, t);
150
+ }, O = () => {
151
+ v.value && (N(), v.value = !1, l("update:model-value", !1), l("close"));
144
152
  }, ye = () => {
145
- f.value = parseFloat(Math.max(f.value - 0.2, 0.2).toFixed(3));
153
+ u.value = u.value + 90, u.value >= 360 && (u.value = 0);
146
154
  }, Ie = () => {
155
+ u.value = u.value - 90, u.value <= -360 && (u.value = 0);
156
+ }, we = () => {
157
+ f.value = parseFloat(Math.min(f.value + 0.2, 4).toFixed(3));
158
+ }, Ne = () => {
159
+ f.value = parseFloat(Math.max(f.value - 0.2, 0.2).toFixed(3));
160
+ }, Fe = () => {
147
161
  f.value = 1;
148
162
  }, A = async (e) => {
149
163
  if (e)
@@ -156,83 +170,90 @@ const Y = 45, dt = /* @__PURE__ */ He({
156
170
  e.webkitEnterFullscreen?.();
157
171
  } catch {
158
172
  }
159
- }, we = async () => {
160
- !r.value || r.value.kind !== "video" || (a("fullscreen", r.value, d.value), await A(h.value));
161
- }, Ne = async (e, t) => {
162
- e.kind === "video" && (a("fullscreen", e, t), await A(F.value[t]));
163
- }, O = (e, t) => {
164
- a("download", e, t);
165
- }, Fe = () => {
166
- r.value && O(r.value, d.value);
167
- }, xe = () => {
168
- l.value = !0, y.value = null;
173
+ }, qe = async () => {
174
+ !o.value || o.value.kind !== "video" || (l("fullscreen", o.value, d.value), await A(h.value));
175
+ }, xe = async (e, t) => {
176
+ e.kind === "video" && (l("fullscreen", e, t), await A(q.value[t]));
177
+ }, Z = (e, t) => {
178
+ l("download", e, t);
169
179
  }, Be = () => {
170
- l.value = !1;
171
- }, qe = () => {
172
- l.value = !1;
180
+ o.value && Z(o.value, d.value);
181
+ }, Se = () => {
182
+ i.value = !0, y.value = null;
173
183
  }, be = () => {
174
- l.value = !1;
175
- }, T = (e) => {
184
+ i.value = !1;
185
+ }, Te = () => {
186
+ i.value = !1;
187
+ }, ke = () => {
188
+ i.value = !1;
189
+ }, R = (e) => {
176
190
  if (v.value && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
177
191
  if (e.key === "Escape") {
178
- e.preventDefault(), $();
192
+ e.preventDefault(), O();
179
193
  return;
180
194
  }
181
- x.value && (e.key === "ArrowLeft" && (e.preventDefault(), H()), e.key === "ArrowRight" && (e.preventDefault(), S()));
195
+ x.value && (e.key === "ArrowLeft" && (e.preventDefault(), k()), e.key === "ArrowRight" && (e.preventDefault(), H()));
182
196
  }
183
- }, Z = () => {
184
- typeof document > "u" || document.addEventListener("keydown", T);
197
+ }, U = () => {
198
+ typeof document > "u" || document.addEventListener("keydown", R);
185
199
  }, P = () => {
186
- typeof document > "u" || document.removeEventListener("keydown", T);
200
+ typeof document > "u" || document.removeEventListener("keydown", R);
187
201
  };
188
- N(
202
+ F(
189
203
  v,
190
204
  (e) => {
191
- e ? (Z(), y.value = null, m.value = g(
192
- typeof o.activeIndex == "number" ? o.activeIndex : o.initialIndex
193
- )) : (w(), l.value = !1, P());
205
+ if (e) {
206
+ if (U(), y.value = null, I.value) {
207
+ I.value = !1;
208
+ return;
209
+ }
210
+ m.value = p(
211
+ typeof r.activeIndex == "number" ? r.activeIndex : r.initialIndex
212
+ );
213
+ } else
214
+ I.value = !1, N(), i.value = !1, P();
194
215
  },
195
216
  { immediate: !0 }
196
- ), Se(P);
197
- const U = { SWIPE_THRESHOLD: Y, props: o, emit: a, open: v, currentIndex: m, currentVideoRef: h, triggerVideoRefs: F, pausedVideoRef: y, videoPlaying: l, scaleLevel: f, rotateLevel: i, pointerStart: p, sourceList: u, multipleItems: x, showNavigation: V, getClampedIndex: g, resolvedCurrentIndex: d, currentItem: r, isImage: B, isVideo: I, videoControls: L, videoMuted: J, videoPlaysinline: Q, videoPreload: ee, currentVideoName: te, currentItemName: R, currentName: oe, currentDownloadHref: D, showVideoFullscreenAction: _, showFileActions: re, modifiers: ne, imageTransform: ae, triggerStyle: le, triggerModifiers: ie, formatSize: q, currentSize: ue, getItemName: se, getItemLabel: de, getItemSize: ce, getItemDownloadHref: E, showTriggerPreviewActionForItem: z, showTriggerFullscreenActionForItem: C, showTriggerDownloadActionForItem: K, showTriggerActionsForItem: ve, setTriggerVideoRef: fe, pauseCurrentVideo: w, resetImageTransform: b, setCurrentIndex: k, previousHandler: H, nextHandler: S, openPreviewAt: me, closeHandler: $, rotateRight: pe, rotateLeft: ge, zoomIn: he, zoomOut: ye, toggleNormalSize: Ie, requestVideoFullscreen: A, fullscreenHandler: we, triggerFullscreenHandler: Ne, downloadItemHandler: O, downloadHandler: Fe, videoPlayHandler: xe, videoPauseHandler: Be, videoEndedHandler: qe, videoErrorHandler: be, keyboardNavigationHandler: T, addKeyboardNavigationListener: Z, removeKeyboardNavigationListener: P, pointerDownHandler: (e) => {
198
- p.value = { x: e.clientX, y: e.clientY };
217
+ ), Re(P);
218
+ const X = { SWIPE_THRESHOLD: G, props: r, emit: l, open: v, currentIndex: m, currentVideoRef: h, triggerVideoRefs: q, pausedVideoRef: y, videoPlaying: i, scaleLevel: f, rotateLevel: u, pointerStart: g, openingFromTrigger: I, sourceList: s, multipleItems: x, showNavigation: M, getClampedIndex: p, resolvedCurrentIndex: d, currentItem: o, isImage: B, isVideo: w, videoControls: L, videoMuted: Q, videoPlaysinline: ee, videoPreload: te, currentVideoName: re, currentItemName: D, currentName: oe, currentDownloadHref: _, showVideoFullscreenAction: C, showFileActions: ae, modifiers: ne, imageTransform: le, triggerStyle: ie, triggerModifiers: ue, formatSize: S, currentSize: se, getItemName: de, getItemLabel: ce, getItemSize: ve, getItemDownloadHref: E, showTriggerPreviewActionForItem: z, showTriggerFullscreenActionForItem: K, showTriggerDownloadActionForItem: $, showTriggerActionsForItem: fe, setTriggerVideoRef: me, getTriggerItemClass: ge, getTriggerItemStyle: pe, pauseCurrentVideo: N, resetImageTransform: b, setCurrentIndex: T, previousHandler: k, nextHandler: H, openPreviewAt: he, closeHandler: O, rotateRight: ye, rotateLeft: Ie, zoomIn: we, zoomOut: Ne, toggleNormalSize: Fe, requestVideoFullscreen: A, fullscreenHandler: qe, triggerFullscreenHandler: xe, downloadItemHandler: Z, downloadHandler: Be, videoPlayHandler: Se, videoPauseHandler: be, videoEndedHandler: Te, videoErrorHandler: ke, keyboardNavigationHandler: R, addKeyboardNavigationListener: U, removeKeyboardNavigationListener: P, pointerDownHandler: (e) => {
219
+ g.value = { x: e.clientX, y: e.clientY };
199
220
  }, pointerUpHandler: (e) => {
200
- if (!p.value || !V.value) {
201
- p.value = null;
221
+ if (!g.value || !M.value) {
222
+ g.value = null;
202
223
  return;
203
224
  }
204
- const t = e.clientX - p.value.x, s = e.clientY - p.value.y;
205
- p.value = null, !(Math.abs(t) < Y || Math.abs(t) < Math.abs(s) * 1.2) && (t > 0 ? H() : S());
225
+ const t = e.clientX - g.value.x, n = e.clientY - g.value.y;
226
+ g.value = null, !(Math.abs(t) < G || Math.abs(t) < Math.abs(n) * 1.2) && (t > 0 ? k() : H());
206
227
  }, get NmorphButton() {
207
- return Re;
228
+ return Ce;
208
229
  }, get NmorphIcon() {
209
- return Le;
230
+ return _e;
210
231
  }, get NmorphIconDownload() {
211
- return Oe;
232
+ return Xe;
212
233
  }, get NmorphIconEnlarge() {
213
- return $e;
234
+ return Ue;
214
235
  }, get NmorphIconEye() {
215
- return Ve;
236
+ return De;
216
237
  }, get NmorphIconFullScreen() {
217
- return Me;
238
+ return Le;
218
239
  }, get NmorphIconPlay() {
219
- return Ke;
240
+ return Ze;
220
241
  }, get NmorphIconRotateLeft() {
221
- return Ce;
242
+ return Oe;
222
243
  }, get NmorphIconRotateRight() {
223
- return ze;
244
+ return $e;
224
245
  }, get NmorphIconShrink() {
225
- return Ee;
246
+ return Ke;
226
247
  }, get NmorphIconZoomIn() {
227
- return _e;
248
+ return ze;
228
249
  }, get NmorphIconZoomOut() {
229
- return De;
250
+ return Ee;
230
251
  }, get NmorphImage() {
231
- return Pe;
232
- }, NmorphPreviewPortal: Te };
233
- return Object.defineProperty(U, "__isScriptSetup", { enumerable: !1, value: !0 }), U;
252
+ return Me;
253
+ }, NmorphPreviewPortal: Ve };
254
+ return Object.defineProperty(X, "__isScriptSetup", { enumerable: !1, value: !0 }), X;
234
255
  }
235
256
  });
236
257
  export {
237
- dt as default
258
+ ft as default
238
259
  };
@@ -1 +1 @@
1
- .nmorph-progress{--nmorph-private-progress-height: 8px;--nmorph-private-progress-width-transition: .4s ease-in-out width;--nmorph-private-progress-indeterminate-animation: slide 2s linear infinite;display:inline}.nmorph-progress .nmorph-progress__linear{display:flex;align-items:center;height:100%;height:var(--nmorph-private-progress-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__outer{width:100%;height:100%;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--border-radius-40);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner{position:relative;height:100%;border-radius:var(--border-radius-40);transition:var(--nmorph-private-progress-width-transition)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__percentage,.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{margin-left:var(--indentation-03);font-weight:var(--nmorph-typography-caption-font-weight);font-size:var(--nmorph-typography-caption-font-size);line-height:var(--nmorph-typography-caption-line-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{position:absolute;top:50%;right:var(--indentation-02);color:var(--nmorph-light-shade-color);transform:translateY(-50%)}.nmorph-progress .nmorph-progress__circle{position:relative;width:var(--nmorph-private-progress-circle-size);height:var(--nmorph-private-progress-circle-size);background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__circle:after{position:absolute;top:50%;left:50%;width:92%;height:92%;background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:0 0 var(--base-shadow-blur) var(--nmorph-dark-shade-color);transform:translate(-50%,-50%);content:""}.nmorph-progress .nmorph-progress__circle-inner-part{position:absolute;top:50%;left:50%;z-index:1;transform:translate(-50%,-50%)}.nmorph-progress .nmorph-progress__circle-ring{transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset .5s;fill:none;stroke:var(--nmorph-private-progress-color);stroke-width:4px}.nmorph-progress .nmorph-progress__inner{width:var(--nmorph-private-progress-percentage);background:var(--nmorph-private-progress-color);animation:var(--nmorph-private-progress-animation)}
1
+ .nmorph-progress{--nmorph-private-progress-height: 8px;--nmorph-private-progress-width-transition: .4s ease-in-out width;--nmorph-private-progress-indeterminate-animation: nmorph-progress-indeterminate 1.4s ease-in-out infinite;display:inline}.nmorph-progress .nmorph-progress__linear{display:flex;align-items:center;height:100%;height:var(--nmorph-private-progress-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__outer{width:100%;height:100%;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--border-radius-40);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner{position:relative;height:100%;border-radius:var(--border-radius-40);transition:var(--nmorph-private-progress-width-transition)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__percentage,.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{margin-left:var(--indentation-03);font-weight:var(--nmorph-typography-caption-font-weight);font-size:var(--nmorph-typography-caption-font-size);line-height:var(--nmorph-typography-caption-line-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{position:absolute;top:50%;right:var(--indentation-02);color:var(--nmorph-light-shade-color);transform:translateY(-50%)}.nmorph-progress .nmorph-progress__circle{position:relative;width:var(--nmorph-private-progress-circle-size);height:var(--nmorph-private-progress-circle-size);background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__circle:after{position:absolute;top:50%;left:50%;width:92%;height:92%;background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:0 0 var(--base-shadow-blur) var(--nmorph-dark-shade-color);transform:translate(-50%,-50%);content:""}.nmorph-progress .nmorph-progress__circle-inner-part{position:absolute;top:50%;left:50%;z-index:1;transform:translate(-50%,-50%)}.nmorph-progress .nmorph-progress__circle-ring{transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset .5s;fill:none;stroke:var(--nmorph-private-progress-color);stroke-width:4px}.nmorph-progress .nmorph-progress__inner{width:var(--nmorph-private-progress-percentage);background:var(--nmorph-private-progress-color);animation:var(--nmorph-private-progress-animation)}.nmorph-progress.nmorph-progress--indeterminate .nmorph-progress__inner{width:40%;min-width:32px;transform:translate(-100%);transition:none;will-change:transform}@keyframes nmorph-progress-indeterminate{0%{transform:translate(-100%)}to{transform:translate(250%)}}
@@ -18,18 +18,18 @@ const C = /* @__PURE__ */ y({
18
18
  },
19
19
  setup(c, { expose: d }) {
20
20
  d();
21
- const e = c, f = r(
21
+ const e = c, m = r(
22
22
  () => q({
23
- "nmorph-progress": []
23
+ "nmorph-progress": [e.indeterminate && "indeterminate"]
24
24
  })
25
- ), i = r(() => Array.isArray(e.color) ? e.color.find((h) => h.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), n = r(() => e.indeterminate ? "var(--nmorph-private-progress-indeterminate-animation)" : "none"), a = u(null), t = u(1), m = r(() => `${t.value} ${t.value}`), v = r(() => t.value - e.percentage / 100 * t.value);
25
+ ), a = r(() => Array.isArray(e.color) ? e.color.find((h) => h.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), n = r(() => e.indeterminate ? "var(--nmorph-private-progress-indeterminate-animation)" : "none"), i = u(null), t = u(1), f = r(() => `${t.value} ${t.value}`), v = r(() => t.value - e.percentage / 100 * t.value);
26
26
  S(() => {
27
- a.value && (t.value = 2 * Math.PI * a.value.r.baseVal.value);
27
+ i.value && (t.value = 2 * Math.PI * i.value.r.baseVal.value);
28
28
  });
29
29
  const o = r(() => `${e.circleSize}px`), s = r(() => `${e.percentage}%`), l = r(() => e.height ?? (e.valueInside ? "18px" : void 0)), g = r(() => ({
30
30
  ...b({
31
31
  "--nmorph-private-progress-percentage": s.value,
32
- "--nmorph-private-progress-color": i.value,
32
+ "--nmorph-private-progress-color": a.value,
33
33
  "--nmorph-private-progress-animation": n.value,
34
34
  "--nmorph-private-progress-circle-size": o.value,
35
35
  "--nmorph-private-progress-width-transition": e.widthTransition,
@@ -38,7 +38,7 @@ const C = /* @__PURE__ */ y({
38
38
  ..._({
39
39
  "--nmorph-private-progress-height": l.value
40
40
  })
41
- })), p = { props: e, modifiers: f, color: i, animation: n, circle: a, circumference: t, strokeDasharray: m, strokeDashoffset: v, circleContainerSize: o, displayPercentage: s, linearHeight: l, styles: g };
41
+ })), p = { props: e, modifiers: m, color: a, animation: n, circle: i, circumference: t, strokeDasharray: f, strokeDashoffset: v, circleContainerSize: o, displayPercentage: s, linearHeight: l, styles: g };
42
42
  return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
43
43
  }
44
44
  });
@@ -4,10 +4,10 @@ import { useModifiers as Q } from "../../../utils/create-modifiers.js";
4
4
  import { createCssSizeVariables as X } from "../../../utils/common.js";
5
5
  import Y from "../../../assets/icons/video.svg.js";
6
6
  import Z from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
7
- import ee from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
- import re from "../../../assets/icons/play.svg.js";
9
- import te from "../../../assets/icons/pause.svg.js";
10
- import oe from "../../../assets/icons/open.svg.js";
7
+ import ee from "../../../assets/icons/open.svg.js";
8
+ import re from "../../basic/nmorph-icon/NmorphIcon.vue.js";
9
+ import te from "../../../assets/icons/play.svg.js";
10
+ import oe from "../../../assets/icons/pause.svg.js";
11
11
  import ae from "../../../assets/icons/loading.svg.js";
12
12
  import ne from "../../../assets/icons/full-screen.svg.js";
13
13
  import le from "../../../assets/icons/eye.svg.js";
@@ -133,7 +133,7 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
133
133
  };
134
134
  O({ videoRef: l });
135
135
  const B = { CONTRAST_ICON_COLOR: ie, VIDEO_BUFFER_EPSILON_SECONDS: v, props: e, emit: n, attrs: u, slots: h, videoRef: l, previewOpen: f, playing: o, videoLoaded: s, formatDuration: y, duration: A, mediaReady: d, showPlaybackControl: H, resolvedPreload: F, showFullscreenAction: w, hasPreviewActions: g, hasDefaultActions: N, hasActions: q, modifiers: S, styles: b, rootAttrs: E, rootClass: C, rootStyle: D, openHandler: M, downloadHandler: V, previewHandler: k, closePreviewHandler: x, fullscreenHandler: L, togglePlayback: R, isVideoFullyBuffered: I, updateVideoLoaded: j, playHandler: T, pauseHandler: W, endedHandler: $, errorHandler: z, get NmorphIcon() {
136
- return ee;
136
+ return re;
137
137
  }, get NmorphIconDownload() {
138
138
  return se;
139
139
  }, get NmorphIconEye() {
@@ -143,13 +143,13 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
143
143
  }, get NmorphIconLoader() {
144
144
  return ae;
145
145
  }, get NmorphIconOpen() {
146
- return oe;
146
+ return ee;
147
147
  }, get NmorphOverlay() {
148
148
  return Z;
149
149
  }, get NmorphIconPause() {
150
- return te;
150
+ return oe;
151
151
  }, get NmorphIconPlay() {
152
- return re;
152
+ return te;
153
153
  }, get NmorphIconVideo() {
154
154
  return Y;
155
155
  } };
@@ -1,19 +1,19 @@
1
1
  import './NmorphBacktop.css';
2
2
  import i from "./NmorphBacktop.vue2.js";
3
- import { openBlock as e, createElementBlock as c, createBlock as a, Teleport as s, createElementVNode as t, normalizeStyle as d, normalizeClass as p, withModifiers as m, renderSlot as f, createVNode as r, withCtx as l } from "vue";
3
+ import { openBlock as e, createElementBlock as s, createBlock as a, Teleport as c, createElementVNode as l, normalizeStyle as d, normalizeClass as p, withModifiers as m, renderSlot as f, createVNode as r, withCtx as t } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const _ = { ref: "placeholderDOMEl" };
7
- function k(n, v, b, o, N, B) {
8
- return e(), c(
7
+ function b(n, k, v, o, N, g) {
8
+ return e(), s(
9
9
  "div",
10
10
  _,
11
11
  [
12
- (e(), a(s, {
12
+ (e(), a(c, {
13
13
  to: o.props.teleportTo,
14
14
  disabled: !o.isMounted || o.props.teleportDisabled
15
15
  }, [
16
- t(
16
+ l(
17
17
  "div",
18
18
  {
19
19
  ref: "selfDOMEl",
@@ -21,19 +21,20 @@ function k(n, v, b, o, N, B) {
21
21
  style: d(o.styles)
22
22
  },
23
23
  [
24
- t("div", {
24
+ l("div", {
25
25
  onClick: m(o.scrollToTopHandler, ["stop"])
26
26
  }, [
27
27
  f(n.$slots, "default", {}, () => [
28
28
  r(o.NmorphButton, {
29
- design: o.props.design
29
+ design: o.props.design,
30
+ borderless: o.props.design === "plain"
30
31
  }, {
31
- default: l(() => [
32
+ default: t(() => [
32
33
  r(o.NmorphIcon, {
33
34
  class: "nmorph-backtop__up-icon",
34
35
  color: o.props.design === "nmorph" ? void 0 : "var(--nmorph-contrast-text-color)"
35
36
  }, {
36
- default: l(() => [
37
+ default: t(() => [
37
38
  r(o.NmorphIconChevronDown)
38
39
  ]),
39
40
  _: 1
@@ -42,7 +43,7 @@ function k(n, v, b, o, N, B) {
42
43
  ]),
43
44
  _: 1
44
45
  /* STABLE */
45
- }, 8, ["design"])
46
+ }, 8, ["design", "borderless"])
46
47
  ])
47
48
  ])
48
49
  ],
@@ -55,7 +56,7 @@ function k(n, v, b, o, N, B) {
55
56
  /* NEED_PATCH */
56
57
  );
57
58
  }
58
- const D = /* @__PURE__ */ h(i, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
59
+ const D = /* @__PURE__ */ h(i, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
59
60
  export {
60
61
  D as default
61
62
  };