@nmorph/nmorph-ui-kit 3.0.7 → 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 (22) hide show
  1. package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -1
  2. package/dist/components/data/nmorph-carousel/NmorphCarousel.css +1 -1
  3. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +26 -24
  4. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +80 -30
  5. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.js +21 -14
  6. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +20 -16
  7. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.css +1 -1
  8. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +17 -13
  9. package/dist/components/navigation/nmorph-stepper/NmorphStepper.css +1 -1
  10. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +101 -96
  11. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +84 -60
  12. package/dist/hooks/use-z-index.js +10 -10
  13. package/dist/index.umd.js +10 -10
  14. package/dist/package.json.js +1 -1
  15. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +3 -1
  16. package/dist/src/components/data/nmorph-carousel/types.d.ts +1 -0
  17. package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +3 -1
  18. package/dist/src/components/data/nmorph-media-tile/types.d.ts +4 -0
  19. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +3 -1
  20. package/dist/src/components/providers/nmorph-notification-provider/types.d.ts +2 -0
  21. package/dist/style.css +1 -1
  22. package/package.json +1 -1
@@ -1 +1 @@
1
- .nmorph-icon,.nmorph-icon .nmorph-icon__content{display:flex;justify-content:center;align-items:center;width:var(--nmorph-private-icon-width);min-width:var(--nmorph-private-icon-width);height:var(--nmorph-private-icon-height);min-height:var(--nmorph-private-icon-height)}.nmorph-icon svg{width:100%;height:100%;fill:var(--nmorph-private-icon-color)}.nmorph-icon path[stroke],.nmorph-icon path[stroke-width],.nmorph-icon path[fill=none],.nmorph-icon rect[stroke],.nmorph-icon rect[stroke-width],.nmorph-icon rect[fill=none],.nmorph-icon line[stroke],.nmorph-icon line[stroke-width],.nmorph-icon polyline[stroke],.nmorph-icon polyline[stroke-width],.nmorph-icon polygon[stroke],.nmorph-icon polygon[stroke-width]{stroke:var(--nmorph-private-icon-color)}.nmorph-icon.nmorph-icon--small{--nmorph-private-icon-width: 14px;--nmorph-private-icon-height: 14px}.nmorph-icon.nmorph-icon--medium{--nmorph-private-icon-width: 20px;--nmorph-private-icon-height: 20px}.nmorph-icon.nmorph-icon--large{--nmorph-private-icon-width: 32px;--nmorph-private-icon-height: 32px}.nmorph-icon{--nmorph-private-icon-color: var(--nmorph-text-color)}
1
+ .nmorph-icon{display:flex;justify-content:center;align-items:center;width:var(--nmorph-private-icon-width);min-width:var(--nmorph-private-icon-width);height:var(--nmorph-private-icon-height);min-height:var(--nmorph-private-icon-height);color:var(--nmorph-private-icon-color)}.nmorph-icon .nmorph-icon__content{display:flex;justify-content:center;align-items:center;width:var(--nmorph-private-icon-width);min-width:var(--nmorph-private-icon-width);height:var(--nmorph-private-icon-height);min-height:var(--nmorph-private-icon-height)}.nmorph-icon svg{width:100%;height:100%;fill:var(--nmorph-private-icon-color)}.nmorph-icon svg,.nmorph-icon svg *{color:var(--nmorph-private-icon-color)}.nmorph-icon path[stroke],.nmorph-icon path[stroke-width],.nmorph-icon path[fill=none],.nmorph-icon rect[stroke],.nmorph-icon rect[stroke-width],.nmorph-icon rect[fill=none],.nmorph-icon line[stroke],.nmorph-icon line[stroke-width],.nmorph-icon polyline[stroke],.nmorph-icon polyline[stroke-width],.nmorph-icon polygon[stroke],.nmorph-icon polygon[stroke-width]{stroke:var(--nmorph-private-icon-color)}.nmorph-icon.nmorph-icon--small{--nmorph-private-icon-width: 14px;--nmorph-private-icon-height: 14px}.nmorph-icon.nmorph-icon--medium{--nmorph-private-icon-width: 20px;--nmorph-private-icon-height: 20px}.nmorph-icon.nmorph-icon--large{--nmorph-private-icon-width: 32px;--nmorph-private-icon-height: 32px}.nmorph-icon{--nmorph-private-icon-color: var(--nmorph-text-color)}
@@ -1 +1 @@
1
- .nmorph-carousel{--nmorph-private-carousel-height: 500px;--nmorph-private-carousel-frame-border: 10px;--nmorph-private-carousel-action-size: 36px;--nmorph-private-carousel-action-offset: var(--indentation-02);position:relative;box-sizing:border-box;height:var(--nmorph-private-carousel-height);overflow:hidden;border-radius:var(--default-border-radius)}.nmorph-carousel .nmorph-carousel__wrapper{display:flex;height:100%}.nmorph-carousel .transition-enabled{transition:transform .4s ease}.nmorph-carousel .nmorph-carousel__element-indicator-wrapper{padding:4px;cursor:pointer}.nmorph-carousel .nmorph-carousel__elements-indicator{position:absolute;bottom:16px;display:flex;justify-content:center;width:100%}.nmorph-carousel .nmorph-carousel__element-indicator{width:30px;height:2px;margin-right:var(--indentation-02);background:var(--nmorph-gray-color)}.nmorph-carousel .nmorph-carousel__element-indicator--active{background:var(--nmorph-white-color)}.nmorph-carousel .nmorph-carousel__action-btn{position:absolute;top:50%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:var(--nmorph-private-carousel-action-size);height:var(--nmorph-private-carousel-action-size);padding:0;background:var(--nmorph-info-color);border-radius:var(--default-border-radius);transform:translateY(-50%);cursor:pointer}.nmorph-carousel .nmorph-carousel__action-btn:hover{background:var(--nmorph-info-color)}.nmorph-carousel .nmorph-carousel__action-btn .nmorph-icon{--nmorph-private-icon-color: var(--nmorph-white-color)}.nmorph-carousel .nmorph-carousel__prev{right:var(--nmorph-private-carousel-action-offset)}.nmorph-carousel .nmorph-carousel__next{left:var(--nmorph-private-carousel-action-offset)}.nmorph-carousel .nmorph-carousel__item{flex-shrink:0;width:100%;height:100%}.nmorph-carousel--nmorph{background:var(--nmorph-main-color);border:var(--nmorph-private-carousel-frame-border) solid var(--nmorph-main-color)}.nmorph-carousel--plain{background:var(--nmorph-main-color);border:var(--nmorph-plain-border);box-shadow:none}.nmorph-carousel--plain .nmorph-carousel__action-btn{color:var(--nmorph-text-color);background:var(--nmorph-main-color);border:var(--nmorph-plain-border);box-shadow:none}.nmorph-carousel--plain .nmorph-carousel__action-btn .nmorph-icon{--nmorph-private-icon-color: currentColor}.nmorph-carousel--plain .nmorph-carousel__action-btn:hover{color:var(--nmorph-accent-color);background:var(--nmorph-main-color);border-color:var(--nmorph-accent-color)}
1
+ .nmorph-carousel{--nmorph-private-carousel-height: 500px;--nmorph-private-carousel-frame-border: 10px;--nmorph-private-carousel-action-size: 36px;--nmorph-private-carousel-action-offset: var(--indentation-02);position:relative;box-sizing:border-box;height:var(--nmorph-private-carousel-height);overflow:hidden;border-radius:var(--default-border-radius)}.nmorph-carousel .nmorph-carousel__wrapper{display:flex;height:100%}.nmorph-carousel .transition-enabled{transition:transform .4s ease}.nmorph-carousel .nmorph-carousel__element-indicator-wrapper{padding:4px;cursor:pointer}.nmorph-carousel .nmorph-carousel__elements-indicator{position:absolute;bottom:16px;display:flex;justify-content:center;width:100%}.nmorph-carousel .nmorph-carousel__element-indicator{width:30px;height:2px;margin-right:var(--indentation-02);background:var(--nmorph-gray-color)}.nmorph-carousel .nmorph-carousel__element-indicator--active{background:var(--nmorph-white-color)}.nmorph-carousel .nmorph-carousel__action-btn{position:absolute;top:50%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:var(--nmorph-private-carousel-action-size);height:var(--nmorph-private-carousel-action-size);padding:0;background:var(--nmorph-info-color);border-radius:var(--default-border-radius);transform:translateY(-50%);cursor:pointer}.nmorph-carousel .nmorph-carousel__action-btn:hover{background:var(--nmorph-info-color)}.nmorph-carousel .nmorph-carousel__action-btn .nmorph-icon{--nmorph-private-icon-color: var(--nmorph-white-color)}.nmorph-carousel .nmorph-carousel__prev{left:var(--nmorph-private-carousel-action-offset)}.nmorph-carousel .nmorph-carousel__next{right:var(--nmorph-private-carousel-action-offset)}.nmorph-carousel .nmorph-carousel__item{flex-shrink:0;width:100%;height:100%}.nmorph-carousel--nmorph{background:var(--nmorph-main-color);border:var(--nmorph-private-carousel-frame-border) solid var(--nmorph-main-color)}.nmorph-carousel--plain{background:var(--nmorph-main-color);border:var(--nmorph-plain-border);box-shadow:none}.nmorph-carousel--plain .nmorph-carousel__action-btn{color:var(--nmorph-text-color);background:var(--nmorph-main-color);border:var(--nmorph-plain-border);box-shadow:none}.nmorph-carousel--plain .nmorph-carousel__action-btn .nmorph-icon{--nmorph-private-icon-color: currentColor}.nmorph-carousel--plain .nmorph-carousel__action-btn:hover{color:var(--nmorph-accent-color);background:var(--nmorph-main-color);border-color:var(--nmorph-accent-color)}
@@ -1,51 +1,53 @@
1
1
  import './NmorphCarousel.css';
2
- import d from "./NmorphCarousel.vue2.js";
3
- import { openBlock as e, createElementBlock as o, normalizeClass as c, createElementVNode as n, normalizeStyle as h, Fragment as i, renderList as s, createVNode as l, withCtx as m, renderSlot as p } from "vue";
2
+ import _ from "./NmorphCarousel.vue2.js";
3
+ import { openBlock as e, createElementBlock as o, normalizeClass as i, createElementVNode as n, normalizeStyle as h, Fragment as c, renderList as s, createVNode as l, withCtx as m, renderSlot as p } from "vue";
4
4
  /* empty css */
5
5
  import u from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const v = ["id"], f = { class: "nmorph-carousel__elements-indicator" }, C = ["onClick"];
7
- function k(_, N, I, r, b, y) {
6
+ const f = ["id"], v = { class: "nmorph-carousel__elements-indicator" }, C = ["onClick"];
7
+ function k(d, N, b, r, y, I) {
8
8
  return e(), o(
9
9
  "div",
10
10
  {
11
- class: c(r.modifiers)
11
+ class: i(r.modifiers)
12
12
  },
13
13
  [
14
14
  n(
15
15
  "div",
16
16
  {
17
- class: "nmorph-carousel__wrapper transition-enabled",
18
- style: h({ transform: r.translateX })
17
+ ref: "wrapperRef",
18
+ class: i(["nmorph-carousel__wrapper", { "transition-enabled": r.transitionEnabled }]),
19
+ style: h({ transform: r.translateX }),
20
+ onTransitionend: r.wrapperTransitionEndHandler
19
21
  },
20
22
  [
21
23
  (e(!0), o(
22
- i,
24
+ c,
23
25
  null,
24
- s(r.carouselData, (a) => (e(), o("div", {
25
- id: `nmorph-carousel-item-${r.carouselId}-${a}`,
26
- key: a,
26
+ s(r.renderedCarouselItems, (a) => (e(), o("div", {
27
+ id: a.id,
28
+ key: a.key,
27
29
  class: "nmorph-carousel__item"
28
- }, null, 8, v))),
30
+ }, null, 8, f))),
29
31
  128
30
32
  /* KEYED_FRAGMENT */
31
33
  ))
32
34
  ],
33
- 4
34
- /* STYLE */
35
+ 38
36
+ /* CLASS, STYLE, NEED_HYDRATION */
35
37
  ),
36
- n("div", f, [
38
+ n("div", v, [
37
39
  (e(!0), o(
38
- i,
40
+ c,
39
41
  null,
40
42
  s(r.carouselData, (a, t) => (e(), o("div", {
41
43
  key: t,
42
44
  class: "nmorph-carousel__element-indicator-wrapper",
43
- onClick: (S) => r.elementIndicator(t)
45
+ onClick: (w) => r.elementIndicator(t)
44
46
  }, [
45
47
  n(
46
48
  "div",
47
49
  {
48
- class: c(["nmorph-carousel__element-indicator", { "nmorph-carousel__element-indicator--active": r.isCurrentElementActive(t) }])
50
+ class: i(["nmorph-carousel__element-indicator", { "nmorph-carousel__element-indicator--active": r.isCurrentElementActive(t) }])
49
51
  },
50
52
  null,
51
53
  2
@@ -58,11 +60,11 @@ function k(_, N, I, r, b, y) {
58
60
  ]),
59
61
  n("div", {
60
62
  class: "nmorph-carousel__action-btn nmorph-carousel__prev",
61
- onClick: r.nextSlide
63
+ onClick: r.prevSlide
62
64
  }, [
63
65
  l(r.NmorphIcon, null, {
64
66
  default: m(() => [
65
- l(r.NmorphIconChevronRight)
67
+ l(r.NmorphIconChevronLeft)
66
68
  ]),
67
69
  _: 1
68
70
  /* STABLE */
@@ -70,23 +72,23 @@ function k(_, N, I, r, b, y) {
70
72
  ]),
71
73
  n("div", {
72
74
  class: "nmorph-carousel__action-btn nmorph-carousel__next",
73
- onClick: r.prevSlide
75
+ onClick: r.nextSlide
74
76
  }, [
75
77
  l(r.NmorphIcon, null, {
76
78
  default: m(() => [
77
- l(r.NmorphIconChevronLeft)
79
+ l(r.NmorphIconChevronRight)
78
80
  ]),
79
81
  _: 1
80
82
  /* STABLE */
81
83
  })
82
84
  ]),
83
- p(_.$slots, "default")
85
+ p(d.$slots, "default")
84
86
  ],
85
87
  2
86
88
  /* CLASS */
87
89
  );
88
90
  }
89
- const z = /* @__PURE__ */ u(d, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-carousel/NmorphCarousel.vue"]]);
91
+ const z = /* @__PURE__ */ u(_, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-carousel/NmorphCarousel.vue"]]);
90
92
  export {
91
93
  z as default
92
94
  };
@@ -1,47 +1,97 @@
1
1
  import './NmorphCarousel.css';
2
- import { defineComponent as x, ref as p, computed as u, provide as M, watch as d } from "vue";
3
- import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
- import { generateUUID as b } from "../../../utils/common.js";
5
- import q from "../../../assets/icons/chevron-right.svg.js";
6
- import w from "../../../assets/icons/chevron-left.svg.js";
7
- import D from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
- const A = /* @__PURE__ */ x({
2
+ import { defineComponent as j, ref as i, computed as m, provide as F, watch as y, nextTick as U } from "vue";
3
+ import { useModifiers as X } from "../../../utils/create-modifiers.js";
4
+ import { generateUUID as z } from "../../../utils/common.js";
5
+ import B from "../../../assets/icons/chevron-right.svg.js";
6
+ import H from "../../../assets/icons/chevron-left.svg.js";
7
+ import J from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
+ const V = /* @__PURE__ */ j({
9
9
  __name: "NmorphCarousel",
10
10
  props: {
11
11
  design: { type: null, required: !1, default: "nmorph" },
12
12
  loop: { type: Boolean, required: !1, default: !0 }
13
13
  },
14
14
  emits: ["change"],
15
- setup(h, { expose: f, emit: v }) {
16
- f();
17
- const e = p(0), o = h, l = v, g = u(
18
- () => y({
19
- nmorph: [o.design === "nmorph" ? "shadow-outset" : ""],
20
- "nmorph-carousel": [o.design]
15
+ setup(N, { expose: $, emit: b }) {
16
+ $();
17
+ const r = i(0), a = i(0), c = i(!0), o = i(null), C = i(null), l = N, S = b, w = m(
18
+ () => X({
19
+ nmorph: [l.design === "nmorph" ? "shadow-outset" : ""],
20
+ "nmorph-carousel": [l.design]
21
21
  })
22
- ), a = p([]), s = b();
23
- M("carousel-data", { data: a, carouselId: s });
24
- const r = u(() => a.value.length), i = (t) => r.value ? o.loop ? (t + r.value) % r.value : Math.min(Math.max(t, 0), r.value - 1) : 0, n = (t) => {
25
- const c = i(t);
26
- c !== e.value && (e.value = c);
27
- }, I = () => n(e.value - 1), _ = () => n(e.value + 1), C = u(() => `translateX(-${e.value * 100}%)`), S = (t) => t === e.value, N = (t) => {
28
- n(t);
22
+ ), u = i([]), f = z(), n = m(() => u.value.length), v = m(() => l.loop && n.value > 1);
23
+ F("carousel-data", { data: u, carouselId: f, hasLoopClones: v });
24
+ const p = (e, t) => `nmorph-carousel-item-${f}-${e}${t ? `-${t}` : ""}`, h = (e) => n.value ? l.loop ? (e + n.value) % n.value : Math.min(Math.max(e, 0), n.value - 1) : 0, d = (e) => v.value ? e + 1 : e, T = async () => {
25
+ await U(), C.value?.offsetWidth;
26
+ const e = typeof requestAnimationFrame == "function" ? requestAnimationFrame : (t) => setTimeout(() => t(Date.now()), 0);
27
+ e(() => {
28
+ e(() => {
29
+ c.value = !0;
30
+ });
31
+ });
32
+ }, I = (e) => {
33
+ c.value = !1, a.value = e, T();
34
+ }, g = (e) => {
35
+ const t = h(e);
36
+ t !== r.value && (r.value = t, o.value = null, c.value = !0, a.value = d(t));
37
+ }, x = (e) => {
38
+ if (!n.value) return;
39
+ if (!l.loop || !v.value) {
40
+ g(r.value + e);
41
+ return;
42
+ }
43
+ const t = r.value, s = h(t + e);
44
+ if (s !== t) {
45
+ if (r.value = s, c.value = !0, e > 0 && t === n.value - 1) {
46
+ a.value = n.value + 1, o.value = 1;
47
+ return;
48
+ }
49
+ if (e < 0 && t === 0) {
50
+ a.value = 0, o.value = n.value;
51
+ return;
52
+ }
53
+ o.value = null, a.value = d(s);
54
+ }
55
+ }, R = () => x(-1), q = () => x(1), A = m(() => `translateX(-${a.value * 100}%)`), M = m(() => {
56
+ const e = u.value.map((k) => ({
57
+ id: p(k),
58
+ key: k
59
+ }));
60
+ if (!v.value || !e.length) return e;
61
+ const t = u.value[0], s = u.value[u.value.length - 1];
62
+ return [
63
+ {
64
+ id: p(s, "before"),
65
+ key: `${s}-loop-before`
66
+ },
67
+ ...e,
68
+ {
69
+ id: p(t, "after"),
70
+ key: `${t}-loop-after`
71
+ }
72
+ ];
73
+ }), D = (e) => e === r.value, E = (e) => {
74
+ g(e);
75
+ }, L = (e) => {
76
+ if (e.target !== e.currentTarget || o.value === null) return;
77
+ const t = o.value;
78
+ o.value = null, I(t);
29
79
  };
30
- d(r, (t) => {
31
- e.value > t - 1 && (e.value = Math.max(t - 1, 0));
32
- }), d(e, () => {
33
- l("change", e.value);
80
+ y([n, () => l.loop], ([e]) => {
81
+ r.value > e - 1 && (r.value = Math.max(e - 1, 0)), o.value = null, I(d(r.value));
82
+ }), y(r, () => {
83
+ S("change", r.value);
34
84
  });
35
- const m = { currentSlide: e, props: o, emit: l, modifiers: g, carouselData: a, carouselId: s, slideCount: r, normalizeSlideIndex: i, goToSlide: n, prevSlide: I, nextSlide: _, translateX: C, isCurrentElementActive: S, elementIndicator: N, get NmorphIcon() {
36
- return D;
85
+ const _ = { currentSlide: r, trackIndex: a, transitionEnabled: c, loopResetTrackIndex: o, wrapperRef: C, props: l, emit: S, modifiers: w, carouselData: u, carouselId: f, slideCount: n, hasLoopClones: v, getCarouselItemId: p, normalizeSlideIndex: h, getRealTrackIndex: d, enableTransitionAfterJump: T, jumpToTrackIndex: I, goToSlide: g, moveSlide: x, prevSlide: R, nextSlide: q, translateX: A, renderedCarouselItems: M, isCurrentElementActive: D, elementIndicator: E, wrapperTransitionEndHandler: L, get NmorphIcon() {
86
+ return J;
37
87
  }, get NmorphIconChevronLeft() {
38
- return w;
88
+ return H;
39
89
  }, get NmorphIconChevronRight() {
40
- return q;
90
+ return B;
41
91
  } };
42
- return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
92
+ return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
43
93
  }
44
94
  });
45
95
  export {
46
- A as default
96
+ V as default
47
97
  };
@@ -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 +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)}
@@ -11,6 +11,8 @@ import D from "../../../assets/icons/loader.svg.js";
11
11
  const W = /* @__PURE__ */ _({
12
12
  __name: "NmorphMediaTile",
13
13
  props: {
14
+ design: { type: null, required: !1, default: "nmorph" },
15
+ aspect: { type: String, required: !1, default: "video" },
14
16
  src: { type: String, required: !1, default: "" },
15
17
  srcObject: { type: null, required: !1, default: null },
16
18
  sinkId: { type: String, required: !1, default: void 0 },
@@ -33,7 +35,7 @@ const W = /* @__PURE__ */ _({
33
35
  errorText: { type: String, required: !1, default: "" }
34
36
  },
35
37
  setup(j, { expose: N }) {
36
- const e = j, o = m(null), n = m(null), u = m({
38
+ const e = j, o = m(null), i = m(null), u = m({
37
39
  audio: 0,
38
40
  video: 0
39
41
  }), y = t(() => !!(e.src || e.srcObject)), h = (r) => !r || typeof r.getAudioTracks != "function" ? [] : r.getAudioTracks(), g = (r) => !r || typeof r.getVideoTracks != "function" ? [] : r.getVideoTracks(), d = (r) => {
@@ -41,13 +43,15 @@ const W = /* @__PURE__ */ _({
41
43
  audio: h(r).length,
42
44
  video: g(r).length
43
45
  };
44
- }, k = t(() => typeof e.srcObject?.getVideoTracks == "function"), O = t(() => u.value.video > 0), S = t(
45
- () => !!(e.src || e.srcObject && (!k.value || O.value))
46
- ), c = t(() => y.value && S.value && !e.videoOff && !e.error), i = t(() => !!(e.srcObject && !e.muted && !e.error)), b = t(() => e.muted || i.value), T = t(() => c.value && e.src ? e.src : void 0), q = t(
46
+ }, k = t(() => typeof e.srcObject?.getVideoTracks == "function"), S = t(() => u.value.video > 0), O = t(
47
+ () => !!(e.src || e.srcObject && (!k.value || S.value))
48
+ ), s = t(() => y.value && O.value && !e.videoOff && !e.error), n = t(() => !!(e.srcObject && !e.muted && !e.error)), b = t(() => e.muted || n.value), T = t(() => s.value && e.src ? e.src : void 0), q = t(
47
49
  () => e.name.split(/\s+/).filter(Boolean).slice(0, 2).map((r) => r[0]?.toUpperCase()).join("")
48
50
  ), M = t(() => q.value || e.name || "?"), V = t(
49
51
  () => E({
50
52
  "nmorph-media-tile": [
53
+ e.design,
54
+ e.aspect,
51
55
  e.fit,
52
56
  e.mirrored && "mirrored",
53
57
  e.selected && "selected",
@@ -58,7 +62,7 @@ const W = /* @__PURE__ */ _({
58
62
  e.loading && "loading"
59
63
  ]
60
64
  })
61
- ), s = (r) => {
65
+ ), c = (r) => {
62
66
  if (!r || e.sinkId === void 0) return;
63
67
  const a = r;
64
68
  typeof a.setSinkId == "function" && a.setSinkId(e.sinkId).catch(() => {
@@ -94,25 +98,25 @@ const W = /* @__PURE__ */ _({
94
98
  e.autoplay,
95
99
  e.videoOff,
96
100
  e.error,
97
- c.value,
98
- i.value,
101
+ s.value,
102
+ n.value,
99
103
  b.value,
100
104
  o.value,
101
- n.value
105
+ i.value
102
106
  ],
103
107
  () => {
104
108
  if (o.value) {
105
109
  const r = e.srcObject;
106
- o.value.srcObject !== r && (o.value.srcObject = r), s(o.value), e.autoplay && r && !e.videoOff && !e.error && p(o.value);
110
+ o.value.srcObject !== r && (o.value.srcObject = r), c(o.value), e.autoplay && r && !e.videoOff && !e.error && p(o.value);
107
111
  }
108
- if (n.value) {
109
- const r = i.value ? e.srcObject : null;
110
- n.value.srcObject !== r && (n.value.srcObject = r), s(n.value), e.autoplay && i.value && p(n.value);
112
+ if (i.value) {
113
+ const r = n.value ? e.srcObject : null;
114
+ i.value.srcObject !== r && (i.value.srcObject = r), c(i.value), e.autoplay && n.value && p(i.value);
111
115
  }
112
116
  },
113
117
  { immediate: !0, flush: "post" }
114
118
  ), N({ videoRef: o });
115
- const B = { props: e, videoRef: o, audioRef: n, srcObjectTrackCount: u, hasMediaSource: y, getAudioTracks: h, getVideoTracks: g, updateSrcObjectTrackCount: d, canInspectVideoTracks: k, hasVideoTracks: O, hasVideoSource: S, videoVisible: c, needsSeparateAudioOutput: i, videoMuted: b, videoSrc: T, initials: q, fallbackLabel: M, modifiers: V, setMediaElementSinkId: s, logMediaPlaybackError: f, playMediaElement: p, get NmorphAvatar() {
119
+ const B = { props: e, videoRef: o, audioRef: i, srcObjectTrackCount: u, hasMediaSource: y, getAudioTracks: h, getVideoTracks: g, updateSrcObjectTrackCount: d, canInspectVideoTracks: k, hasVideoTracks: S, hasVideoSource: O, videoVisible: s, needsSeparateAudioOutput: n, videoMuted: b, videoSrc: T, initials: q, fallbackLabel: M, modifiers: V, setMediaElementSinkId: c, logMediaPlaybackError: f, playMediaElement: p, get NmorphAvatar() {
116
120
  return R;
117
121
  }, get NmorphButton() {
118
122
  return w;
@@ -1 +1 @@
1
- .nmorph-stepper{width:100%;border-radius:var(--default-border-radius)}.nmorph-stepper.nmorph-stepper--interactive{cursor:grab}.nmorph-stepper.nmorph-stepper--disabled{cursor:not-allowed;opacity:.6}.nmorph-stepper:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-stepper__viewport{width:100%;overflow:hidden;border-radius:inherit;touch-action:pan-y}.nmorph-stepper__track{display:flex;width:100%;min-width:0;transition:transform .24s ease;will-change:transform}.nmorph-stepper__track>*{flex:0 0 100%;width:100%;min-width:100%;max-width:100%}.nmorph-stepper__indicator{width:100%}
1
+ .nmorph-stepper{width:100%;border-radius:var(--default-border-radius)}.nmorph-stepper.nmorph-stepper--interactive{cursor:grab}.nmorph-stepper.nmorph-stepper--disabled{cursor:not-allowed;opacity:.6}.nmorph-stepper:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-stepper__viewport{width:100%;overflow:hidden;border-radius:inherit;touch-action:pan-y}.nmorph-stepper__track{display:flex;width:100%;min-width:0;transition:transform .24s ease;will-change:transform}.nmorph-stepper__track>*{flex:0 0 100%;width:100%;min-width:100%;max-width:100%}.nmorph-stepper__indicator{width:100%}.nmorph-stepper__indicator .nmorph-button.nmorph-button--plain.nmorph-button--icon-only .nmorph-button__content,.nmorph-stepper__indicator .nmorph-button.nmorph-button--plain.nmorph-button--icon-only .nmorph-button__content:not(:disabled,[loading=true]):hover{border:none}