@nmorph/nmorph-ui-kit 3.0.6 → 3.0.8

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/hand.svg.js +2 -2
  2. package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -1
  3. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +34 -36
  4. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +80 -78
  5. package/dist/components/data/nmorph-carousel/NmorphCarousel.css +1 -1
  6. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +26 -24
  7. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +80 -30
  8. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.js +21 -14
  9. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +20 -16
  10. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +60 -60
  11. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +118 -94
  12. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.css +1 -1
  13. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +55 -41
  14. package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
  15. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +5 -5
  16. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +80 -56
  17. package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
  18. package/dist/components/data/nmorph-table/NmorphTable.vue.js +6 -6
  19. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +41 -38
  20. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +8 -8
  21. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +64 -24
  22. package/dist/components/navigation/nmorph-stepper/NmorphStepper.css +1 -1
  23. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +101 -96
  24. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +84 -60
  25. package/dist/hooks/use-z-index.js +10 -10
  26. package/dist/index.umd.js +23 -23
  27. package/dist/package.json.js +1 -1
  28. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +3 -1
  29. package/dist/src/components/data/nmorph-carousel/types.d.ts +1 -0
  30. package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +3 -1
  31. package/dist/src/components/data/nmorph-media-tile/types.d.ts +4 -0
  32. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
  33. package/dist/src/components/data/nmorph-pagination/types.d.ts +3 -0
  34. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +2 -20
  35. package/dist/src/components/data/nmorph-table/types.d.ts +11 -3
  36. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +3 -1
  37. package/dist/src/components/providers/nmorph-notification-provider/types.d.ts +2 -0
  38. package/dist/style.css +1 -1
  39. package/package.json +1 -1
@@ -1,25 +1,32 @@
1
- import t from "./NmorphCarouselItem.vue2.js";
2
- import { openBlock as e, createElementBlock as a, normalizeClass as m, createBlock as s, Teleport as n, renderSlot as c, createCommentVNode as l } from "vue";
3
- import i from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- function p(r, d, f, o, u, _) {
5
- return o.isMounted ? (e(), a(
1
+ import m from "./NmorphCarouselItem.vue2.js";
2
+ import { openBlock as r, createElementBlock as t, normalizeClass as s, Fragment as l, renderList as a, createBlock as c, Teleport as i, renderSlot as p, createCommentVNode as d } from "vue";
3
+ import u from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ function f(n, _, h, e, k, C) {
5
+ return e.isMounted ? (r(), t(
6
6
  "div",
7
7
  {
8
8
  key: 0,
9
- class: m(o.modifiers)
9
+ class: s(e.modifiers)
10
10
  },
11
11
  [
12
- (e(), s(n, {
13
- to: `#nmorph-carousel-item-${o.carouselData?.carouselId}-${o.props.name}`
14
- }, [
15
- c(r.$slots, "default")
16
- ], 8, ["to"]))
12
+ (r(!0), t(
13
+ l,
14
+ null,
15
+ a(e.teleportTargets, (o) => (r(), c(i, {
16
+ key: o,
17
+ to: o
18
+ }, [
19
+ p(n.$slots, "default")
20
+ ], 8, ["to"]))),
21
+ 128
22
+ /* KEYED_FRAGMENT */
23
+ ))
17
24
  ],
18
25
  2
19
26
  /* CLASS */
20
- )) : l("v-if", !0);
27
+ )) : d("v-if", !0);
21
28
  }
22
- const v = /* @__PURE__ */ i(t, [["render", p], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue"]]);
29
+ const N = /* @__PURE__ */ u(m, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue"]]);
23
30
  export {
24
- v as default
31
+ N as default
25
32
  };
@@ -1,28 +1,32 @@
1
- import { defineComponent as i, computed as p, inject as m, ref as c, onMounted as d, onBeforeUnmount as f } from "vue";
2
- import { useModifiers as l } from "../../../../../utils/create-modifiers.js";
3
- const x = /* @__PURE__ */ i({
1
+ import { defineComponent as l, computed as u, inject as c, ref as d, onMounted as _, onBeforeUnmount as h } from "vue";
2
+ import { useModifiers as v } from "../../../../../utils/create-modifiers.js";
3
+ const C = /* @__PURE__ */ l({
4
4
  __name: "NmorphCarouselItem",
5
5
  props: {
6
6
  name: { type: String, required: !0 }
7
7
  },
8
- setup(a, { expose: u }) {
9
- u();
10
- const t = a, s = p(
11
- () => l({
8
+ setup(i, { expose: m }) {
9
+ m();
10
+ const r = i, p = u(
11
+ () => v({
12
12
  "nmorph-carousel-item": []
13
13
  })
14
- ), e = m("carousel-data"), r = c(!1);
15
- d(() => {
16
- r.value = !0, e && e.data.value.push(t.name);
17
- }), f(() => {
14
+ ), e = c("carousel-data"), o = d(!1), n = (t, a) => `#nmorph-carousel-item-${e?.carouselId}-${t}${a ? `-${a}` : ""}`, f = u(() => {
15
+ if (!e) return [];
16
+ const t = [n(r.name)], a = e.data.value;
17
+ return !e.hasLoopClones.value || !a.length || (r.name === a[0] && t.push(n(r.name, "after")), r.name === a[a.length - 1] && t.push(n(r.name, "before"))), t;
18
+ });
19
+ _(() => {
20
+ o.value = !0, e && e.data.value.push(r.name);
21
+ }), h(() => {
18
22
  if (!e) return;
19
- const n = e.data.value.indexOf(t.name);
20
- n !== -1 && e.data.value.splice(n, 1);
23
+ const t = e.data.value.indexOf(r.name);
24
+ t !== -1 && e.data.value.splice(t, 1);
21
25
  });
22
- const o = { props: t, modifiers: s, carouselData: e, isMounted: r };
23
- return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
26
+ const s = { props: r, modifiers: p, carouselData: e, isMounted: o, getCarouselItemId: n, teleportTargets: f };
27
+ return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
24
28
  }
25
29
  });
26
30
  export {
27
- x as default
31
+ C as default
28
32
  };
@@ -1,96 +1,96 @@
1
1
  import './NmorphImagePreview.css';
2
2
  import _ from "./NmorphImagePreview.vue2.js";
3
- import { openBlock as n, createElementBlock as a, Fragment as g, normalizeStyle as v, normalizeClass as w, createElementVNode as d, renderList as p, withModifiers as k, createVNode as l, createSlots as m, withCtx as o, renderSlot as t, toDisplayString as y, createCommentVNode as c, createBlock as s, resolveDynamicComponent as f } from "vue";
3
+ import { openBlock as n, createElementBlock as a, Fragment as g, normalizeStyle as p, normalizeClass as w, createElementVNode as m, renderList as v, withModifiers as k, createVNode as l, createSlots as d, withCtx as o, renderSlot as t, toDisplayString as y, createCommentVNode as c, createBlock as s, resolveDynamicComponent as f } from "vue";
4
4
  /* empty css */
5
5
  import b from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const N = ["aria-label", "onClick"], C = {
7
7
  key: 0,
8
8
  class: "nmorph-image-preview__trigger-more"
9
9
  }, S = { class: "nmorph-image-preview__action-element" };
10
- function I(r, B, T, e, L, P) {
10
+ function I(e, T, B, r, P, z) {
11
11
  return n(), a(
12
12
  g,
13
13
  null,
14
14
  [
15
- e.props.showTrigger ? (n(), a(
15
+ r.props.showTrigger ? (n(), a(
16
16
  "div",
17
17
  {
18
18
  key: 0,
19
- class: w(e.modifiers),
20
- style: v(e.triggerStyle)
19
+ class: w(r.modifiers),
20
+ style: p(r.triggerStyle)
21
21
  },
22
22
  [
23
- d("div", {
23
+ m("div", {
24
24
  class: "nmorph-image-preview__trigger",
25
- onClick: e.clickHandler
25
+ onClick: r.clickHandler
26
26
  }, [
27
- e.showGalleryTrigger ? (n(!0), a(
27
+ r.showGalleryTrigger ? (n(!0), a(
28
28
  g,
29
29
  { key: 0 },
30
- p(e.triggerSources, (i) => (n(), a("button", {
30
+ v(r.triggerSources, (i) => (n(), a("button", {
31
31
  key: `${i.src}-${i.index}`,
32
32
  type: "button",
33
33
  class: "nmorph-image-preview__trigger-item",
34
- "aria-label": e.getTriggerLabel(i.index),
35
- onClick: k((h) => e.openPreviewAt(i.index), ["stop"])
34
+ "aria-label": r.getTriggerLabel(i.index),
35
+ onClick: k((h) => r.openPreviewAt(i.index), ["stop"])
36
36
  }, [
37
- l(e.NmorphImage, {
37
+ l(r.NmorphImage, {
38
38
  src: i.src,
39
- alt: e.getTriggerLabel(i.index),
40
- fit: e.props.fit,
39
+ alt: r.getTriggerLabel(i.index),
40
+ fit: r.props.fit,
41
41
  design: "plain",
42
42
  "frame-border": 0
43
- }, m({
43
+ }, d({
44
44
  _: 2
45
45
  /* DYNAMIC */
46
46
  }, [
47
- r.$slots.loading ? {
47
+ e.$slots.loading ? {
48
48
  name: "loading",
49
49
  fn: o(() => [
50
- t(r.$slots, "loading")
50
+ t(e.$slots, "loading")
51
51
  ]),
52
52
  key: "0"
53
53
  } : void 0,
54
- r.$slots.error ? {
54
+ e.$slots.error ? {
55
55
  name: "error",
56
56
  fn: o(() => [
57
- t(r.$slots, "error")
57
+ t(e.$slots, "error")
58
58
  ]),
59
59
  key: "1"
60
60
  } : void 0
61
61
  ]), 1032, ["src", "alt", "fit"]),
62
- i.index === e.lastVisibleTriggerIndex && e.hiddenTriggerCount > 0 ? (n(), a(
62
+ i.index === r.lastVisibleTriggerIndex && r.hiddenTriggerCount > 0 ? (n(), a(
63
63
  "span",
64
64
  C,
65
- " +" + y(e.hiddenTriggerCount),
65
+ " +" + y(r.hiddenTriggerCount),
66
66
  1
67
67
  /* TEXT */
68
68
  )) : c("v-if", !0)
69
69
  ], 8, N))),
70
70
  128
71
71
  /* KEYED_FRAGMENT */
72
- )) : (n(), s(e.NmorphImage, {
72
+ )) : (n(), s(r.NmorphImage, {
73
73
  key: 1,
74
- src: e.triggerSource,
75
- alt: e.props.alt,
76
- fit: e.props.fit,
74
+ src: r.triggerSource,
75
+ alt: r.props.alt,
76
+ fit: r.props.fit,
77
77
  design: "plain",
78
78
  "frame-border": 0
79
- }, m({
79
+ }, d({
80
80
  _: 2
81
81
  /* DYNAMIC */
82
82
  }, [
83
- r.$slots.loading ? {
83
+ e.$slots.loading ? {
84
84
  name: "loading",
85
85
  fn: o(() => [
86
- t(r.$slots, "loading")
86
+ t(e.$slots, "loading")
87
87
  ]),
88
88
  key: "0"
89
89
  } : void 0,
90
- r.$slots.error ? {
90
+ e.$slots.error ? {
91
91
  name: "error",
92
92
  fn: o(() => [
93
- t(r.$slots, "error")
93
+ t(e.$slots, "error")
94
94
  ]),
95
95
  key: "1"
96
96
  } : void 0
@@ -100,34 +100,34 @@ function I(r, B, T, e, L, P) {
100
100
  6
101
101
  /* CLASS, STYLE */
102
102
  )) : c("v-if", !0),
103
- e.open ? (n(), s(e.NmorphPreviewPortal, {
103
+ r.open ? (n(), s(r.NmorphPreviewPortal, {
104
104
  key: 1,
105
- show: e.open,
106
- "z-index": e.props.zIndex,
105
+ show: r.open,
106
+ "z-index": r.props.zIndex,
107
107
  "root-class": "nmorph-image-preview__portal",
108
- "state-class": e.modifiers,
108
+ "state-class": r.modifiers,
109
109
  "content-class": "nmorph-image-preview__content",
110
110
  "left-class": "nmorph-image-preview__left",
111
111
  "right-class": "nmorph-image-preview__right",
112
112
  "actions-class": "nmorph-image-preview__actions",
113
- "navigation-button-margin": e.props.navigationButtonMargin,
114
- "content-width": e.props.previewWidth,
115
- "content-height": e.props.previewHeight,
116
- "show-navigation": e.showNavigation,
117
- "show-action-bar": e.props.showActionBar,
118
- onClose: e.closeHandler,
119
- onPrevious: e.previousHandler,
120
- onNext: e.nextHandler
113
+ "navigation-button-margin": r.props.navigationButtonMargin,
114
+ "content-width": r.props.previewWidth,
115
+ "content-height": r.props.previewHeight,
116
+ "show-navigation": r.showNavigation,
117
+ "show-action-bar": r.props.showActionBar,
118
+ onClose: r.closeHandler,
119
+ onPrevious: r.previousHandler,
120
+ onNext: r.nextHandler
121
121
  }, {
122
122
  actions: o(() => [
123
123
  (n(), a(
124
124
  g,
125
125
  null,
126
- p(e.actions, (i, h) => d("div", {
126
+ v(r.actions, (i, h) => m("div", {
127
127
  key: h,
128
128
  class: "nmorph-image-preview__action-element"
129
129
  }, [
130
- l(e.NmorphButton, {
130
+ l(r.NmorphButton, {
131
131
  class: "nmorph-preview-portal__control-button",
132
132
  design: "plain",
133
133
  borderless: "",
@@ -135,7 +135,7 @@ function I(r, B, T, e, L, P) {
135
135
  }, {
136
136
  default: o(() => [
137
137
  l(
138
- e.NmorphIcon,
138
+ r.NmorphIcon,
139
139
  null,
140
140
  {
141
141
  default: o(() => [
@@ -155,18 +155,18 @@ function I(r, B, T, e, L, P) {
155
155
  64
156
156
  /* STABLE_FRAGMENT */
157
157
  )),
158
- d("div", S, [
159
- l(e.NmorphButton, {
158
+ m("div", S, [
159
+ l(r.NmorphButton, {
160
160
  class: "nmorph-preview-portal__control-button",
161
161
  design: "plain",
162
162
  borderless: "",
163
- disabled: e.scaleLevel === 1,
164
- onClick: e.enlargeShrinkActionData.handler
163
+ disabled: r.scaleLevel === 1,
164
+ onClick: r.enlargeShrinkActionData.handler
165
165
  }, {
166
166
  default: o(() => [
167
- l(e.NmorphIcon, null, {
167
+ l(r.NmorphIcon, null, {
168
168
  default: o(() => [
169
- (n(), s(f(e.enlargeShrinkActionData.icon)))
169
+ (n(), s(f(r.enlargeShrinkActionData.icon)))
170
170
  ]),
171
171
  _: 1
172
172
  /* STABLE */
@@ -178,28 +178,28 @@ function I(r, B, T, e, L, P) {
178
178
  ])
179
179
  ]),
180
180
  default: o(() => [
181
- l(e.NmorphImage, {
182
- src: e.triggerSource,
183
- alt: e.props.alt,
181
+ l(r.NmorphImage, {
182
+ src: r.triggerSource,
183
+ alt: r.props.alt,
184
184
  fit: "contain",
185
185
  design: "plain",
186
186
  "frame-border": 0,
187
- style: v({ transform: `rotate(${e.rotateLevel}deg) scale(${e.scaleLevel})` })
188
- }, m({
187
+ style: p({ transform: r.imageTransform })
188
+ }, d({
189
189
  _: 2
190
190
  /* DYNAMIC */
191
191
  }, [
192
- r.$slots.loading ? {
192
+ e.$slots.loading ? {
193
193
  name: "loading",
194
194
  fn: o(() => [
195
- t(r.$slots, "loading")
195
+ t(e.$slots, "loading")
196
196
  ]),
197
197
  key: "0"
198
198
  } : void 0,
199
- r.$slots.error ? {
199
+ e.$slots.error ? {
200
200
  name: "error",
201
201
  fn: o(() => [
202
- t(r.$slots, "error")
202
+ t(e.$slots, "error")
203
203
  ]),
204
204
  key: "1"
205
205
  } : void 0
@@ -1,18 +1,18 @@
1
1
  import './NmorphImagePreview.css';
2
- import { defineComponent as $, ref as g, watch as h, computed as t, onBeforeUnmount as Z } from "vue";
3
- import { useModifiers as j } from "../../../utils/create-modifiers.js";
4
- import { createCssSizeVariables as U } from "../../../utils/common.js";
5
- import W from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
6
- import J from "../../../assets/icons/shrink.svg.js";
7
- import Q from "../../../assets/icons/rotate-right.svg.js";
8
- import X from "../../../assets/icons/rotate-left.svg.js";
9
- import Y from "../../../assets/icons/zoom-in.svg.js";
10
- import ee from "../../../assets/icons/zoom-out.svg.js";
11
- import re from "../../../assets/icons/enlarge.svg.js";
12
- import te from "../../basic/nmorph-icon/NmorphIcon.vue.js";
13
- import ae from "../../basic/nmorph-button/NmorphButton.vue.js";
14
- import ie from "../nmorph-image/NmorphImage.vue.js";
15
- const Ne = /* @__PURE__ */ $({
2
+ import { defineComponent as ee, ref as w, watch as I, computed as a, onBeforeUnmount as te } from "vue";
3
+ import { useModifiers as re } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as ae } from "../../../utils/common.js";
5
+ import oe from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
6
+ import le from "../../../assets/icons/shrink.svg.js";
7
+ import ne from "../../../assets/icons/rotate-right.svg.js";
8
+ import ie from "../../../assets/icons/rotate-left.svg.js";
9
+ import ue from "../../../assets/icons/zoom-in.svg.js";
10
+ import se from "../../../assets/icons/zoom-out.svg.js";
11
+ import me from "../../../assets/icons/enlarge.svg.js";
12
+ import de from "../../basic/nmorph-icon/NmorphIcon.vue.js";
13
+ import ce from "../../basic/nmorph-button/NmorphButton.vue.js";
14
+ import ge from "../nmorph-image/NmorphImage.vue.js";
15
+ const _e = /* @__PURE__ */ ee({
16
16
  __name: "NmorphImagePreview",
17
17
  props: {
18
18
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -38,117 +38,141 @@ const Ne = /* @__PURE__ */ $({
38
38
  triggerGap: { type: [Number, String], required: !1, default: 8 }
39
39
  },
40
40
  emits: ["update:model-value"],
41
- setup(V, { expose: C, emit: H }) {
42
- C();
43
- const r = V, l = g(r.modelValue);
44
- h(
45
- () => r.modelValue,
41
+ setup(O, { expose: D, emit: E }) {
42
+ D();
43
+ const t = O, l = w(t.modelValue);
44
+ I(
45
+ () => t.modelValue,
46
46
  (e) => l.value = e
47
47
  );
48
- const a = t(() => Array.isArray(r.src) ? r.src : [r.src]), s = (e) => {
49
- const o = a.value.length - 1;
50
- return o < 0 || e < 0 ? 0 : e > o ? o : e;
51
- }, u = g(s(r.initialIndex)), d = t(() => s(u.value)), K = t(() => a.value[d.value] || ""), v = t(() => r.triggerView === "gallery" && a.value.length > 1), y = t(() => !r.triggerLimit || r.triggerLimit < 1 ? a.value.length : Math.min(Math.floor(r.triggerLimit), a.value.length)), m = t(
52
- () => a.value.slice(0, y.value).map((e, o) => ({
53
- index: o,
48
+ const o = a(() => Array.isArray(t.src) ? t.src : [t.src]), s = (e) => {
49
+ const r = o.value.length - 1;
50
+ return r < 0 || e < 0 ? 0 : e > r ? r : e;
51
+ }, i = w(s(t.initialIndex)), u = a(() => s(i.value)), b = a(() => o.value[u.value] || ""), p = a(() => t.triggerView === "gallery" && o.value.length > 1), q = a(() => !t.triggerLimit || t.triggerLimit < 1 ? o.value.length : Math.min(Math.floor(t.triggerLimit), o.value.length)), d = a(
52
+ () => o.value.slice(0, q.value).map((e, r) => ({
53
+ index: r,
54
54
  src: e
55
55
  }))
56
- ), M = t(() => a.value.length - m.value.length), P = t(() => m.value[m.value.length - 1]?.index ?? -1), R = t(
57
- () => j({
58
- "nmorph-image-preview": [l.value && "opened", v.value && "gallery-trigger"]
56
+ ), G = a(() => o.value.length - d.value.length), j = a(() => d.value[d.value.length - 1]?.index ?? -1), F = a(
57
+ () => re({
58
+ "nmorph-image-preview": [l.value && "opened", p.value && "gallery-trigger"]
59
59
  })
60
- ), i = g(1);
61
- h(
62
- () => [r.initialIndex, a.value.length],
60
+ ), c = w(/* @__PURE__ */ new Map()), x = (e, r) => e || `__empty-image-${r}`, f = a(() => x(b.value, u.value)), g = a(
61
+ () => c.value.get(f.value) || {
62
+ rotateLevel: 0,
63
+ scaleLevel: 1
64
+ }
65
+ ), v = a(() => g.value.rotateLevel), m = a(() => g.value.scaleLevel), Z = a(() => `rotate(${v.value}deg) scale(${m.value})`), T = (e) => {
66
+ const r = new Map(c.value);
67
+ r.set(f.value, e), c.value = r;
68
+ }, n = (e) => {
69
+ T({
70
+ ...g.value,
71
+ ...e
72
+ });
73
+ }, h = (e) => {
74
+ const r = e % 360;
75
+ return Object.is(r, -0) ? 0 : r;
76
+ }, y = (e) => parseFloat(Math.min(Math.max(e, t.minScaleLevel), t.maxScaleLevel).toFixed(3));
77
+ I(
78
+ () => [t.initialIndex, o.value.length],
63
79
  () => {
64
- u.value = s(r.initialIndex);
80
+ i.value = s(t.initialIndex);
65
81
  }
66
82
  );
67
- const N = (e) => {
68
- u.value = s(e), l.value = !0, f("update:model-value", l.value);
83
+ const _ = (e) => {
84
+ i.value = s(e), l.value = !0, S("update:model-value", l.value);
85
+ }, U = () => {
86
+ p.value || _(u.value);
87
+ }, W = () => {
88
+ l.value = !1, S("update:model-value", l.value);
89
+ }, B = () => {
90
+ n({
91
+ rotateLevel: h(v.value + 90)
92
+ });
93
+ }, k = () => {
94
+ n({
95
+ rotateLevel: h(v.value - 90)
96
+ });
97
+ }, M = () => {
98
+ n({
99
+ scaleLevel: y(m.value + t.scaleStep)
100
+ });
101
+ }, A = () => {
102
+ n({
103
+ scaleLevel: y(m.value - t.scaleStep)
104
+ });
105
+ }, C = a(() => m.value < 1), K = () => {
106
+ n({ scaleLevel: 1 });
107
+ }, V = () => {
108
+ n({ scaleLevel: 1 });
69
109
  }, z = () => {
70
- v.value || N(d.value);
71
- }, F = () => {
72
- l.value = !1, f("update:model-value", l.value);
73
- }, S = () => {
74
- n.value = n.value + 90, n.value >= 360 && (n.value = 0);
75
- }, w = () => {
76
- n.value = n.value - 90, n.value <= -360 && (n.value = 0);
77
- }, I = () => {
78
- i.value < r.maxScaleLevel && (i.value += r.scaleStep), i.value = parseFloat(i.value.toFixed(3));
79
- }, b = () => {
80
- i.value > r.minScaleLevel && (i.value -= r.scaleStep), i.value = parseFloat(i.value.toFixed(3));
81
- }, L = t(() => i.value < 1), q = () => {
82
- i.value = 1;
83
- }, x = () => {
84
- i.value = 1;
85
- }, n = g(0), B = () => {
86
- const e = a.value.length;
110
+ const e = o.value.length;
87
111
  if (!e) return;
88
- const o = d.value - 1;
89
- u.value = o < 0 ? e - 1 : o;
90
- }, _ = () => {
91
- const e = a.value.length;
112
+ const r = u.value - 1;
113
+ i.value = r < 0 ? e - 1 : r;
114
+ }, H = () => {
115
+ const e = o.value.length;
92
116
  if (!e) return;
93
- const o = d.value + 1;
94
- u.value = o > e - 1 ? 0 : o;
95
- }, p = (e) => {
96
- !l.value || a.value.length < 2 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || (e.key === "ArrowLeft" && (e.preventDefault(), B()), e.key === "ArrowRight" && (e.preventDefault(), _()));
97
- }, k = () => {
98
- typeof document > "u" || document.addEventListener("keydown", p);
99
- }, c = () => {
100
- typeof document > "u" || document.removeEventListener("keydown", p);
117
+ const r = u.value + 1;
118
+ i.value = r > e - 1 ? 0 : r;
119
+ }, N = (e) => {
120
+ !l.value || o.value.length < 2 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || (e.key === "ArrowLeft" && (e.preventDefault(), z()), e.key === "ArrowRight" && (e.preventDefault(), H()));
121
+ }, R = () => {
122
+ typeof document > "u" || document.addEventListener("keydown", N);
123
+ }, L = () => {
124
+ typeof document > "u" || document.removeEventListener("keydown", N);
101
125
  };
102
- h(
126
+ I(
103
127
  l,
104
128
  (e) => {
105
- e ? k() : c();
129
+ e ? R() : L();
106
130
  },
107
131
  { immediate: !0 }
108
- ), Z(c);
109
- const D = t(() => {
132
+ ), te(L);
133
+ const J = a(() => {
110
134
  let e = {
111
- icon: J,
112
- handler: x
135
+ icon: le,
136
+ handler: V
113
137
  };
114
- return L.value && (e = {
115
- icon: re,
116
- handler: q
138
+ return C.value && (e = {
139
+ icon: me,
140
+ handler: K
117
141
  }), e;
118
- }), E = [
142
+ }), Q = [
119
143
  {
120
- icon: Q,
121
- handler: S
144
+ icon: ne,
145
+ handler: B
122
146
  },
123
147
  {
124
- icon: X,
125
- handler: w
148
+ icon: ie,
149
+ handler: k
126
150
  },
127
151
  {
128
- icon: Y,
129
- handler: I
152
+ icon: ue,
153
+ handler: M
130
154
  },
131
155
  {
132
- icon: ee,
133
- handler: b
156
+ icon: se,
157
+ handler: A
134
158
  }
135
- ], f = H, T = t(() => a.value.length > 1), G = t(() => r.showNavigationButtons && T.value), O = t(
136
- () => U({
137
- "--nmorph-private-image-preview-trigger-width": r.width,
138
- "--nmorph-private-image-preview-trigger-height": r.height,
139
- "--nmorph-private-image-preview-radius": r.radius,
140
- "--nmorph-private-image-preview-trigger-gap": r.triggerGap
159
+ ], S = E, $ = a(() => o.value.length > 1), X = a(() => t.showNavigationButtons && $.value), Y = a(
160
+ () => ae({
161
+ "--nmorph-private-image-preview-trigger-width": t.width,
162
+ "--nmorph-private-image-preview-trigger-height": t.height,
163
+ "--nmorph-private-image-preview-radius": t.radius,
164
+ "--nmorph-private-image-preview-trigger-gap": t.triggerGap
141
165
  })
142
- ), A = { props: r, open: l, sourceList: a, getClampedIndex: s, currentIndex: u, resolvedCurrentIndex: d, triggerSource: K, showGalleryTrigger: v, triggerSourceLimit: y, triggerSources: m, hiddenTriggerCount: M, lastVisibleTriggerIndex: P, modifiers: R, scaleLevel: i, openPreviewAt: N, clickHandler: z, closeHandler: F, rotateRight: S, rotateLeft: w, zoomIn: I, zoomOut: b, isLevelChangedToMin: L, enlargeToNormal: q, shrinkToNormal: x, rotateLevel: n, previousHandler: B, nextHandler: _, keyboardNavigationHandler: p, addKeyboardNavigationListener: k, removeKeyboardNavigationListener: c, enlargeShrinkActionData: D, actions: E, emit: f, multipleSources: T, showNavigation: G, triggerStyle: O, getTriggerLabel: (e) => r.alt ? `${r.alt} ${e + 1}` : `Image ${e + 1}`, get NmorphImage() {
143
- return ie;
166
+ ), P = { props: t, open: l, sourceList: o, getClampedIndex: s, currentIndex: i, resolvedCurrentIndex: u, triggerSource: b, showGalleryTrigger: p, triggerSourceLimit: q, triggerSources: d, hiddenTriggerCount: G, lastVisibleTriggerIndex: j, modifiers: F, imageTransformStates: c, getImageTransformKey: x, currentTransformKey: f, currentTransformState: g, rotateLevel: v, scaleLevel: m, imageTransform: Z, setCurrentTransformState: T, updateCurrentTransformState: n, normalizeRotateLevel: h, clampScaleLevel: y, openPreviewAt: _, clickHandler: U, closeHandler: W, rotateRight: B, rotateLeft: k, zoomIn: M, zoomOut: A, isLevelChangedToMin: C, enlargeToNormal: K, shrinkToNormal: V, previousHandler: z, nextHandler: H, keyboardNavigationHandler: N, addKeyboardNavigationListener: R, removeKeyboardNavigationListener: L, enlargeShrinkActionData: J, actions: Q, emit: S, multipleSources: $, showNavigation: X, triggerStyle: Y, getTriggerLabel: (e) => t.alt ? `${t.alt} ${e + 1}` : `Image ${e + 1}`, get NmorphImage() {
167
+ return ge;
144
168
  }, get NmorphButton() {
145
- return ae;
169
+ return ce;
146
170
  }, get NmorphIcon() {
147
- return te;
148
- }, NmorphPreviewPortal: W };
149
- return Object.defineProperty(A, "__isScriptSetup", { enumerable: !1, value: !0 }), A;
171
+ return de;
172
+ }, NmorphPreviewPortal: oe };
173
+ return Object.defineProperty(P, "__isScriptSetup", { enumerable: !1, value: !0 }), P;
150
174
  }
151
175
  });
152
176
  export {
153
- Ne as default
177
+ _e as default
154
178
  };
@@ -1 +1 @@
1
- .nmorph-media-tile{position:relative;display:flex;justify-content:center;align-items:center;aspect-ratio:16/9;min-width:0;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-media-tile .nmorph-media-tile__video{width:100%;height:100%;object-fit:cover}.nmorph-media-tile.nmorph-media-tile--contain .nmorph-media-tile__video{object-fit:contain}.nmorph-media-tile.nmorph-media-tile--mirrored .nmorph-media-tile__video{transform:scaleX(-1)}.nmorph-media-tile .nmorph-media-tile__fallback{display:flex;flex-direction:column;gap:var(--indentation-02);justify-content:center;align-items:center;width:100%;height:100%;padding:var(--indentation-04);color:var(--nmorph-text-color);text-align:center}.nmorph-media-tile .nmorph-media-tile__initials{display:flex;justify-content:center;align-items:center;width:72px;height:72px;color:var(--nmorph-focus-text-color);font-weight:var(--font-weight-bold);font-size:var(--nmorph-typography-title-large-font-size);background:var(--nmorph-accent-color);border-radius:var(--border-radius-circular)}.nmorph-media-tile .nmorph-media-tile__name,.nmorph-media-tile .nmorph-media-tile__error-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-media-tile .nmorph-media-tile__error-text{color:var(--nmorph-error-text-color);font-size:var(--nmorph-typography-body-small-font-size);line-height:var(--nmorph-typography-body-small-line-height)}.nmorph-media-tile .nmorph-media-tile__status{position:absolute;right:var(--indentation-03);bottom:var(--indentation-03);display:flex;gap:var(--indentation-02)}.nmorph-media-tile .nmorph-media-tile__status-item{color:var(--nmorph-text-color)}.nmorph-media-tile .nmorph-media-tile__status-item .nmorph-button__content{width:28px;min-width:28px;height:24px;min-height:24px;padding:0;color:currentColor;background:color-mix(in srgb,var(--nmorph-main-color) 86%,transparent);border-color:color-mix(in srgb,currentColor 35%,transparent);border-radius:var(--default-border-radius)}.nmorph-media-tile.nmorph-media-tile--selected{outline:2px solid var(--nmorph-accent-color)}.nmorph-media-tile.nmorph-media-tile--speaking{outline:3px solid var(--nmorph-success-color)}.nmorph-media-tile.nmorph-media-tile--error{outline:2px solid var(--nmorph-error-color)}.nmorph-media-tile.nmorph-media-tile--screen-sharing{box-shadow:0 0 0 2px var(--nmorph-success-color)}
1
+ .nmorph-media-tile{position:relative;display:flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:0;overflow:hidden;background:var(--nmorph-main-color);border:none;border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-media-tile.nmorph-media-tile--video{aspect-ratio:16/9}.nmorph-media-tile.nmorph-media-tile--fill{width:100%;height:100%;aspect-ratio:auto}.nmorph-media-tile .nmorph-media-tile__video{width:100%;height:100%;object-fit:cover}.nmorph-media-tile.nmorph-media-tile--contain .nmorph-media-tile__video{object-fit:contain}.nmorph-media-tile.nmorph-media-tile--mirrored .nmorph-media-tile__video{transform:scaleX(-1)}.nmorph-media-tile .nmorph-media-tile__fallback{display:flex;flex-direction:column;gap:var(--indentation-02);justify-content:center;align-items:center;width:100%;height:100%;padding:var(--indentation-04);color:var(--nmorph-text-color);text-align:center}.nmorph-media-tile .nmorph-media-tile__initials{display:flex;justify-content:center;align-items:center;width:72px;height:72px;color:var(--nmorph-focus-text-color);font-weight:var(--font-weight-bold);font-size:var(--nmorph-typography-title-large-font-size);background:var(--nmorph-accent-color);border-radius:var(--border-radius-circular)}.nmorph-media-tile .nmorph-media-tile__name,.nmorph-media-tile .nmorph-media-tile__error-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-media-tile .nmorph-media-tile__error-text{color:var(--nmorph-error-text-color);font-size:var(--nmorph-typography-body-small-font-size);line-height:var(--nmorph-typography-body-small-line-height)}.nmorph-media-tile .nmorph-media-tile__status{position:absolute;right:var(--indentation-03);bottom:var(--indentation-03);display:flex;gap:var(--indentation-02)}.nmorph-media-tile .nmorph-media-tile__status-item{color:var(--nmorph-text-color)}.nmorph-media-tile .nmorph-media-tile__status-item .nmorph-button__content{width:28px;min-width:28px;height:24px;min-height:24px;padding:0;color:currentColor;background:color-mix(in srgb,var(--nmorph-main-color) 86%,transparent);border-color:color-mix(in srgb,currentColor 35%,transparent);border-radius:var(--default-border-radius)}.nmorph-media-tile.nmorph-media-tile--selected{outline:2px solid var(--nmorph-accent-color)}.nmorph-media-tile.nmorph-media-tile--speaking{outline:3px solid var(--nmorph-success-color)}.nmorph-media-tile.nmorph-media-tile--error{outline:2px solid var(--nmorph-error-color)}.nmorph-media-tile.nmorph-media-tile--plain{border:var(--nmorph-plain-border);box-shadow:none}.nmorph-media-tile.nmorph-media-tile--screen-sharing{box-shadow:0 0 0 2px var(--nmorph-success-color)}