@nmorph/nmorph-ui-kit 2.2.10 → 2.2.13

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 (75) hide show
  1. package/README.md +11 -7
  2. package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -1
  3. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +11 -11
  4. package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -0
  5. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +74 -46
  6. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +26 -21
  7. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +4 -4
  8. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +77 -38
  9. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +31 -30
  10. package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
  11. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +36 -30
  12. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +48 -41
  13. package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
  14. package/dist/components/data/nmorph-table/NmorphTable.vue.js +228 -103
  15. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +49 -30
  16. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  17. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +91 -35
  18. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +48 -35
  19. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
  20. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue.js +15 -13
  21. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +8 -8
  22. package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +22 -14
  23. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +11 -10
  24. package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
  25. package/dist/components/form/nmorph-radio/NmorphRadio.vue.js +22 -20
  26. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +7 -7
  27. package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +14 -14
  28. package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
  29. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +115 -58
  30. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +104 -75
  31. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +12 -10
  32. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +7 -7
  33. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +29 -42
  34. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +39 -20
  35. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue.js +29 -24
  36. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +17 -15
  37. package/dist/hooks/use-common-styles.js +23 -20
  38. package/dist/hooks/use-placement.js +76 -44
  39. package/dist/hooks/use-virtual-list.js +46 -0
  40. package/dist/index.es.js +698 -694
  41. package/dist/index.umd.js +46 -38
  42. package/dist/nuxt.mjs +21 -8
  43. package/dist/outside-hooks/use-nmorph-browser.js +9 -9
  44. package/dist/outside-hooks/use-nmorph-theme.js +133 -87
  45. package/dist/package.json.js +1 -1
  46. package/dist/plugin.js +34 -29
  47. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
  48. package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -3
  49. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +14 -2
  50. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
  51. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +9 -0
  52. package/dist/src/components/data/nmorph-table/types.d.ts +2 -2
  53. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +1 -1
  54. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +11 -0
  55. package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -0
  56. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +4 -3
  57. package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +1 -0
  58. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +4 -3
  59. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +8 -0
  60. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +1 -0
  61. package/dist/src/components/form/nmorph-select/types.d.ts +1 -0
  62. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +3 -1
  63. package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +4 -0
  64. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +1 -1
  65. package/dist/src/hooks/index.d.ts +1 -0
  66. package/dist/src/hooks/use-common-styles.d.ts +1 -0
  67. package/dist/src/hooks/use-placement.d.ts +8 -4
  68. package/dist/src/hooks/use-virtual-list.d.ts +21 -0
  69. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -2
  70. package/dist/src/outside-hooks/use-nmorph-theme.d.ts +1 -0
  71. package/dist/src/plugin.d.ts +2 -0
  72. package/dist/src/types/index.d.ts +12 -3
  73. package/dist/style.css +1 -1
  74. package/dist/types/index.js +14 -8
  75. package/package.json +1 -1
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # Neumorphic UI Library for Vue 3
1
+ # Neumorphic UI Library for Vue 3 and Nuxt
2
2
 
3
3
  ## Overview
4
4
 
5
- This is a UI component library for Vue 3, designed using the neumorphism/skeuomorphism style. It offers a set of simple
6
- components for creating unique user interfaces with a modern, 3D-like appearance.
5
+ This is a UI component library for Vue 3 and Nuxt, designed using the neumorphism/skeuomorphism style. It offers a set
6
+ of simple components for creating unique user interfaces with a modern, 3D-like appearance.
7
7
 
8
8
  ### What is Neumorphism/Skeuomorphism?
9
9
 
@@ -19,8 +19,7 @@ its stability, fixing bugs, and ensuring high-quality components.
19
19
  If you encounter any issues, please don't hesitate to report them. Your feedback is highly appreciated and will help
20
20
  enhance the library.
21
21
 
22
- **Documentation:** For detailed instructions and examples, visit the
23
- [official documentation site](https://nmorph.dev).
22
+ **Documentation:** For detailed instructions and examples, visit the [official documentation site](https://nmorph.dev).
24
23
 
25
24
  ---
26
25
 
@@ -29,14 +28,17 @@ enhance the library.
29
28
  - **Neumorphic Design:** 3D-like components with soft shadows and smooth gradients.
30
29
  - **Customizable Themes:** Easily modify the base color, text color, and accent color to match your application's
31
30
  design.
32
- - **Lightweight and Intuitive:** Simple integration with Vue 3 using modern tools like Vite and Composition API.
31
+ - **Vue and Nuxt Support:** Use the library in Vue 3 apps or through the Nuxt module.
32
+ - **Nuxt SSR Support:** The Nuxt module installs a universal plugin so component markup can render during SSR while
33
+ browser-only theme and measurement effects run on the client.
34
+ - **Lightweight and Intuitive:** Simple integration with modern tools like Vite, Nuxt, and Composition API.
33
35
 
34
36
  ---
35
37
 
36
38
  ## Requirements
37
39
 
38
40
  - **Node.js:** Version 18.13.0 or higher is required to use this library.
39
- - **Vue 3:** Ensure your project is set up with Vue 3 and Vite for best compatibility.
41
+ - **Vue 3 or Nuxt:** Ensure your project is set up with Vue 3 or Nuxt 3 for best compatibility.
40
42
 
41
43
  ---
42
44
 
@@ -45,6 +47,8 @@ enhance the library.
45
47
  - Neumorphism
46
48
  - Skeuomorphism
47
49
  - Vue 3
50
+ - Nuxt
51
+ - Nuxt Module
48
52
  - UI Components
49
53
  - Neumorphic Design
50
54
  - Customizable Themes
@@ -1 +1 @@
1
- .nmorph-icon{width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height);display:flex;align-items:center;--color: var(--nmorph-icon-color)}.nmorph-icon .nmorph-icon__content{display:flex;align-items:center;justify-content:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height)}.nmorph-icon svg{width:100%;height:100%;fill:var(--color);stroke-width:0}.nmorph-icon path{stroke:var(--color)}.nmorph-icon.nmorph-icon--small{--width: 14px;--height: 14px}.nmorph-icon.nmorph-icon--medium{--width: 20px;--height: 20px}.nmorph-icon.nmorph-icon--large{--width: 32px;--height: 32px}
1
+ .nmorph-icon{width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height);display:flex;align-items:center;--color: var(--nmorph-icon-color, var(--nmorph-text-color))}.nmorph-icon .nmorph-icon__content{display:flex;align-items:center;justify-content:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height)}.nmorph-icon svg{width:100%;height:100%;fill:var(--color);stroke-width:0}.nmorph-icon path{stroke:var(--color)}.nmorph-icon.nmorph-icon--small{--width: 14px;--height: 14px}.nmorph-icon.nmorph-icon--medium{--width: 20px;--height: 20px}.nmorph-icon.nmorph-icon--large{--width: 32px;--height: 32px}
@@ -1,31 +1,31 @@
1
1
  import './NmorphIcon.css';
2
- import { defineComponent as d, computed as o } from "vue";
3
- import { useModifiers as u } from "../../../utils/create-modifiers.js";
4
- const c = /* @__PURE__ */ d({
2
+ import { defineComponent as h, computed as i } from "vue";
3
+ import { useModifiers as l } from "../../../utils/create-modifiers.js";
4
+ const p = /* @__PURE__ */ h({
5
5
  __name: "NmorphIcon",
6
6
  props: {
7
7
  size: { type: null, required: !1, default: "small" },
8
8
  width: { type: String, required: !1, default: void 0 },
9
9
  height: { type: String, required: !1, default: void 0 },
10
- color: { type: String, required: !1, default: "var(--nmorph-text-color)" }
10
+ color: { type: String, required: !1, default: void 0 }
11
11
  },
12
12
  setup(r, { expose: s }) {
13
13
  s();
14
- const e = r, n = o(
15
- () => u({
14
+ const e = r, d = i(
15
+ () => l({
16
16
  "nmorph-icon": [
17
17
  `${!e.width && !e.height && e.size}`,
18
18
  `${e.width && "custom-width"}`,
19
19
  `${e.height && "custom-height"}`
20
20
  ]
21
21
  })
22
- ), h = o(() => {
22
+ ), n = i(() => {
23
23
  const t = {};
24
- return e.width && (t["--width"] = e.width), e.height && (t["--height"] = e.height), t["--nmorph-icon-color"] = e.color, t;
25
- }), i = { props: e, modifiers: n, customStyles: h };
26
- return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
24
+ return e.width && (t["--width"] = e.width), e.height && (t["--height"] = e.height), e.color && (t["--nmorph-icon-color"] = e.color, t["--color"] = e.color), t;
25
+ }), o = { props: e, modifiers: d, customStyles: n };
26
+ return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
27
27
  }
28
28
  });
29
29
  export {
30
- c as default
30
+ p as default
31
31
  };
@@ -0,0 +1 @@
1
+ .nmorph-avatar--preview:hover>.nmorph-image{filter:brightness(.8)}
@@ -1,43 +1,56 @@
1
- import f from "./NmorphAvatar.vue2.js";
2
- import { resolveComponent as w, openBlock as r, createElementBlock as i, normalizeStyle as o, normalizeClass as S, createVNode as _, withCtx as l, renderSlot as m, toDisplayString as c, createBlock as a, resolveDynamicComponent as s, createCommentVNode as v } from "vue";
3
- import h from "../../../_virtual/_plugin-vue_export-helper.js";
4
- function y(n, t, k, e, I, g) {
5
- const p = w("NmorphImagePreview");
6
- return r(), i(
1
+ import './NmorphAvatar.css';
2
+ import p from "./NmorphAvatar.vue2.js";
3
+ import { openBlock as e, createElementBlock as l, normalizeStyle as n, normalizeClass as h, createVNode as a, withCtx as o, renderSlot as t, toDisplayString as s, createBlock as i, resolveDynamicComponent as d, createCommentVNode as v } from "vue";
4
+ /* empty css */
5
+ import S from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ function w(c, m, _, r, y, I) {
7
+ return e(), l(
7
8
  "div",
8
9
  {
9
- class: S(e.modifiers),
10
- style: o(e.styles),
11
- onClick: e.openPreview
10
+ class: h(r.modifiers),
11
+ style: n(r.styles),
12
+ onClick: r.openPreview
12
13
  },
13
14
  [
14
- _(e.NmorphImage, {
15
- fit: e.props.fit,
16
- src: e.imageSrc,
17
- "src-set": e.props.srcSet,
18
- alt: e.props.alt,
15
+ a(r.NmorphImage, {
16
+ fit: r.props.fit,
17
+ src: r.imageSrc,
18
+ "src-set": r.props.srcSet,
19
+ alt: r.props.alt,
19
20
  "frame-border": 0,
20
- onLoad: e.onImageLoad,
21
- onError: e.onImageError
21
+ onLoad: r.onImageLoad,
22
+ onError: r.onImageError
22
23
  }, {
23
- error: l(() => [
24
- m(n.$slots, "error", {}, () => [
25
- e.initials ? (r(), i(
24
+ loading: o(() => [
25
+ a(r.NmorphIcon, {
26
+ size: "small",
27
+ color: "var(--nmorph-accent-color)"
28
+ }, {
29
+ default: o(() => [
30
+ a(r.NmorphIconLoader)
31
+ ]),
32
+ _: 1
33
+ /* STABLE */
34
+ })
35
+ ]),
36
+ error: o(() => [
37
+ t(c.$slots, "error", {}, () => [
38
+ r.initials ? (e(), l(
26
39
  "span",
27
40
  {
28
41
  key: 0,
29
42
  class: "nmorph-avatar__initials",
30
- style: o({ fontSize: e.initialsFontSize })
43
+ style: n({ fontSize: r.initialsFontSize })
31
44
  },
32
- c(e.initials),
45
+ s(r.initials),
33
46
  5
34
47
  /* TEXT, STYLE */
35
- )) : (r(), a(e.NmorphIcon, {
48
+ )) : (e(), i(r.NmorphIcon, {
36
49
  key: 1,
37
- width: e.stubIconSize
50
+ width: r.stubIconSize
38
51
  }, {
39
- default: l(() => [
40
- (r(), a(s(e.fallback)))
52
+ default: o(() => [
53
+ (e(), i(d(r.fallback)))
41
54
  ]),
42
55
  _: 1
43
56
  /* STABLE */
@@ -47,46 +60,61 @@ function y(n, t, k, e, I, g) {
47
60
  _: 3
48
61
  /* FORWARDED */
49
62
  }, 8, ["fit", "src", "src-set", "alt"]),
50
- e.imageSrc ? v("v-if", !0) : m(n.$slots, "error", { key: 0 }, () => [
51
- e.initials ? (r(), i(
63
+ r.imageSrc ? v("v-if", !0) : t(c.$slots, "error", { key: 0 }, () => [
64
+ r.initials ? (e(), l(
52
65
  "span",
53
66
  {
54
67
  key: 0,
55
68
  class: "nmorph-avatar__initials",
56
- style: o({ fontSize: e.initialsFontSize })
69
+ style: n({ fontSize: r.initialsFontSize })
57
70
  },
58
- c(e.initials),
71
+ s(r.initials),
59
72
  5
60
73
  /* TEXT, STYLE */
61
- )) : (r(), a(e.NmorphIcon, {
74
+ )) : (e(), i(r.NmorphIcon, {
62
75
  key: 1,
63
- width: e.stubIconSize
76
+ width: r.stubIconSize
64
77
  }, {
65
- default: l(() => [
66
- (r(), a(s(e.fallback)))
78
+ default: o(() => [
79
+ (e(), i(d(r.fallback)))
67
80
  ]),
68
81
  _: 1
69
82
  /* STABLE */
70
83
  }, 8, ["width"]))
71
84
  ]),
72
- e.previewAvailable ? (r(), a(p, {
85
+ r.previewAvailable ? (e(), i(r.NmorphImagePreview, {
73
86
  key: 1,
74
- class: "nmorph-avatar__preview",
75
- "model-value": e.previewOpen,
76
- src: e.imagePreviewSrc,
77
- alt: e.props.alt,
78
- "initial-index": e.props.previewInitialIndex,
79
- "scale-step": e.props.previewScaleStep,
80
- "min-scale-level": e.props.previewMinScaleLevel,
81
- "max-scale-level": e.props.previewMaxScaleLevel,
82
- "onUpdate:modelValue": t[0] || (t[0] = (d) => e.previewOpen = d)
83
- }, null, 8, ["model-value", "src", "alt", "initial-index", "scale-step", "min-scale-level", "max-scale-level"])) : v("v-if", !0)
87
+ "show-trigger": !1,
88
+ "model-value": r.previewOpen,
89
+ src: r.imagePreviewSrc,
90
+ alt: r.props.alt,
91
+ "initial-index": r.props.previewInitialIndex,
92
+ "scale-step": r.props.previewScaleStep,
93
+ "min-scale-level": r.props.previewMinScaleLevel,
94
+ "max-scale-level": r.props.previewMaxScaleLevel,
95
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => r.previewOpen = f)
96
+ }, {
97
+ loading: o(() => [
98
+ a(r.NmorphIcon, {
99
+ size: "small",
100
+ color: "var(--nmorph-accent-color)"
101
+ }, {
102
+ default: o(() => [
103
+ a(r.NmorphIconLoader)
104
+ ]),
105
+ _: 1
106
+ /* STABLE */
107
+ })
108
+ ]),
109
+ _: 1
110
+ /* STABLE */
111
+ }, 8, ["model-value", "src", "alt", "initial-index", "scale-step", "min-scale-level", "max-scale-level"])) : v("v-if", !0)
84
112
  ],
85
113
  6
86
114
  /* CLASS, STYLE */
87
115
  );
88
116
  }
89
- const z = /* @__PURE__ */ h(f, [["render", y], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-avatar/NmorphAvatar.vue"]]);
117
+ const b = /* @__PURE__ */ S(p, [["render", w], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-avatar/NmorphAvatar.vue"]]);
90
118
  export {
91
- z as default
119
+ b as default
92
120
  };
@@ -1,9 +1,12 @@
1
- import { defineComponent as z, ref as P, computed as a } from "vue";
1
+ import './NmorphAvatar.css';
2
+ import { defineComponent as $, ref as z, computed as a } from "vue";
2
3
  import { useModifiers as B } from "../../../utils/create-modifiers.js";
4
+ import L from "../nmorph-image-preview/NmorphImagePreview.vue.js";
3
5
  import v from "../../../assets/icons/avatar.svg.js";
4
- import M from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
- import k from "../nmorph-image/NmorphImage.vue.js";
6
- const U = /* @__PURE__ */ z({
6
+ import M from "../../../assets/icons/loader.svg.js";
7
+ import k from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
+ import C from "../nmorph-image/NmorphImage.vue.js";
9
+ const J = /* @__PURE__ */ $({
7
10
  __name: "NmorphAvatar",
8
11
  props: {
9
12
  src: { type: [String, Array], required: !1 },
@@ -24,46 +27,48 @@ const U = /* @__PURE__ */ z({
24
27
  alt: { type: String, required: !1 }
25
28
  },
26
29
  emits: ["error", "load"],
27
- setup(g, { expose: y, emit: h }) {
28
- y();
29
- const r = g, s = h, S = (e) => {
30
- s("error", e);
30
+ setup(g, { expose: h, emit: y }) {
31
+ h();
32
+ const r = g, o = y, S = (e) => {
33
+ o("error", e);
31
34
  }, w = (e) => {
32
- s("load", e);
33
- }, l = P(!1), u = (e, t = 0) => Array.isArray(e) ? e[t] : e, p = a(() => `${r.imagePadding}px`), i = a(() => `${r.size}px`), b = a(() => u(r.src)), n = a(() => r.previewSrc || r.src), c = a(() => {
35
+ o("load", e);
36
+ }, l = z(!1), p = (e, t = 0) => Array.isArray(e) ? e[t] : e, u = a(() => `${r.imagePadding}px`), i = a(() => `${r.size}px`), b = a(() => p(r.src)), n = a(() => r.previewSrc || r.src), m = a(() => {
34
37
  const e = n.value;
35
38
  return Array.isArray(e) ? e.length > 0 : !!e;
36
39
  }), q = a(() => {
37
40
  const e = n.value;
38
41
  return Array.isArray(e) ? e : e || "";
39
- }), o = a(() => r.preview && c.value), x = a(
42
+ }), s = a(() => r.preview && m.value), N = a(
40
43
  () => B({
41
44
  nmorph: [`${r.frameBorder > 0 && "shadow-combined"}`],
42
- "nmorph-avatar": [r.shape, `${o.value && "preview"}`]
45
+ "nmorph-avatar": [r.shape, `${s.value && "preview"}`]
43
46
  })
44
- ), N = a(() => `${r.size / 100 * 60}px`), A = a(() => `${Math.max(12, r.size * 0.38)}px`), m = a(() => r.shape === "circle" ? "50%" : "4px"), d = a(() => r.shape === "circle" ? "50%" : "2px"), I = a(() => ({
47
+ ), I = a(() => `${r.size / 100 * 60}px`), x = a(() => `${Math.max(12, r.size * 0.38)}px`), c = a(() => r.shape === "circle" ? "50%" : "4px"), d = a(() => r.shape === "circle" ? "50%" : "2px"), A = a(() => ({
45
48
  width: i.value,
46
49
  height: i.value,
47
50
  "--nmorph-avatar-size": i.value,
48
- "--nmorph-avatar-image-padding": p.value,
49
- "--nmorph-avatar-radius": m.value,
51
+ "--nmorph-avatar-image-padding": u.value,
52
+ "--nmorph-avatar-radius": c.value,
50
53
  "--nmorph-avatar-image-radius": d.value,
51
54
  "--nmorph-avatar-frame-border": `${r.frameBorder}px`
52
- })), _ = a(() => r.fallback || v), $ = a(() => {
55
+ })), _ = a(() => r.fallback || v), P = a(() => {
53
56
  const e = r.name.trim();
54
57
  if (!e) return "";
55
58
  const t = e.split(/\s+/);
56
59
  return (t.length > 1 ? `${t[0][0]}${t[t.length - 1][0]}` : t[0].slice(0, 2)).toUpperCase();
57
- }), f = { props: r, emit: s, onImageError: S, onImageLoad: w, previewOpen: l, getSourceByIndex: u, imagePadding: p, size: i, imageSrc: b, previewSource: n, hasPreviewSource: c, imagePreviewSrc: q, previewAvailable: o, modifiers: x, stubIconSize: N, initialsFontSize: A, radius: m, imageRadius: d, styles: I, fallback: _, initials: $, openPreview: () => {
58
- o.value && (l.value = !0);
60
+ }), f = { props: r, emit: o, onImageError: S, onImageLoad: w, previewOpen: l, getSourceByIndex: p, imagePadding: u, size: i, imageSrc: b, previewSource: n, hasPreviewSource: m, imagePreviewSrc: q, previewAvailable: s, modifiers: N, stubIconSize: I, initialsFontSize: x, radius: c, imageRadius: d, styles: A, fallback: _, initials: P, openPreview: () => {
61
+ s.value && (l.value = !0);
59
62
  }, get NmorphImage() {
60
- return k;
63
+ return C;
61
64
  }, get NmorphIcon() {
65
+ return k;
66
+ }, get NmorphIconLoader() {
62
67
  return M;
63
- } };
68
+ }, NmorphImagePreview: L };
64
69
  return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
65
70
  }
66
71
  });
67
72
  export {
68
- U as default
73
+ J as default
69
74
  };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as y, ref as a, computed as v, provide as j, reactive as k, onMounted as x, nextTick as E, watch as O } from "vue";
2
2
  import { useModifiers as D } from "../../../utils/create-modifiers.js";
3
3
  import { generateUUID as w } from "../../../utils/common.js";
4
- import A from "../../../assets/icons/chevron-down.svg.js";
5
- import M from "../../basic/nmorph-icon/NmorphIcon.vue.js";
4
+ import A from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
+ import M from "../../../assets/icons/chevron-down.svg.js";
6
6
  const L = /* @__PURE__ */ y({
7
7
  __name: "NmorphCarousel",
8
8
  props: {
@@ -40,9 +40,9 @@ const L = /* @__PURE__ */ y({
40
40
  }, C = v(() => `translateX(-${e.value * 100}%)`), r = a(!0), m = { currentSlide: e, prevSlide: _, nextSlide: g, props: s, emit: u, modifiers: S, carouselData: c, carouselId: i, carouselWrapper: o, slidesRefs: n, addInitialCloneSlides: d, transitionEndHandler: p, setItemRef: b, translateX: C, transitionEnabled: r, isCurrentElementActive: (t) => t === e.value - 1, elementIndicator: (t) => {
41
41
  e.value = t + 1;
42
42
  }, get NmorphIcon() {
43
- return M;
44
- }, get NmorphIconChevronDown() {
45
43
  return A;
44
+ }, get NmorphIconChevronDown() {
45
+ return M;
46
46
  } };
47
47
  return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
48
48
  }
@@ -1,45 +1,65 @@
1
1
  import './NmorphImagePreview.css';
2
- import s from "./NmorphImagePreview.vue2.js";
3
- import { openBlock as n, createElementBlock as i, Fragment as t, createElementVNode as l, normalizeClass as m, createVNode as o, createBlock as a, Teleport as v, withCtx as r, normalizeStyle as f, createCommentVNode as d, renderList as p, resolveDynamicComponent as _ } from "vue";
2
+ import g from "./NmorphImagePreview.vue2.js";
3
+ import { openBlock as l, createElementBlock as a, Fragment as s, normalizeClass as h, createElementVNode as i, createVNode as o, createSlots as _, withCtx as r, renderSlot as m, createCommentVNode as t, createBlock as c, Teleport as p, normalizeStyle as k, renderList as N, resolveDynamicComponent as v } from "vue";
4
4
  /* empty css */
5
- import g from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const k = { class: "nmorph-image-preview__content" }, N = {
5
+ import w from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const y = { class: "nmorph-image-preview__content" }, C = {
7
7
  key: 0,
8
8
  class: "nmorph-image-preview__left"
9
- }, w = {
9
+ }, I = {
10
10
  key: 1,
11
11
  class: "nmorph-image-preview__right"
12
- }, C = { class: "nmorph-image-preview__actions" }, I = { class: "nmorph-image-preview__action-element" };
13
- function y(x, B, S, e, b, u) {
14
- return n(), i(
15
- t,
12
+ }, S = { class: "nmorph-image-preview__actions" }, b = { class: "nmorph-image-preview__action-element" };
13
+ function B(n, z, D, e, H, L) {
14
+ return l(), a(
15
+ s,
16
16
  null,
17
17
  [
18
- l(
18
+ e.props.showTrigger ? (l(), a(
19
19
  "div",
20
20
  {
21
- class: m(e.modifiers)
21
+ key: 0,
22
+ class: h(e.modifiers)
22
23
  },
23
24
  [
24
- l("div", {
25
+ i("div", {
25
26
  class: "nmorph-image-preview__trigger",
26
27
  onClick: e.clickHandler
27
28
  }, [
28
29
  o(e.NmorphImage, {
29
30
  src: e.triggerSource,
30
31
  alt: e.props.alt,
31
- fit: "cover"
32
- }, null, 8, ["src", "alt"])
32
+ fit: "cover",
33
+ "frame-border": 0
34
+ }, _({
35
+ _: 2
36
+ /* DYNAMIC */
37
+ }, [
38
+ n.$slots.loading ? {
39
+ name: "loading",
40
+ fn: r(() => [
41
+ m(n.$slots, "loading")
42
+ ]),
43
+ key: "0"
44
+ } : void 0,
45
+ n.$slots.error ? {
46
+ name: "error",
47
+ fn: r(() => [
48
+ m(n.$slots, "error")
49
+ ]),
50
+ key: "1"
51
+ } : void 0
52
+ ]), 1032, ["src", "alt"])
33
53
  ])
34
54
  ],
35
55
  2
36
56
  /* CLASS */
37
- ),
38
- (n(), a(v, { to: "body" }, [
39
- l(
57
+ )) : t("v-if", !0),
58
+ (l(), c(p, { to: "body" }, [
59
+ i(
40
60
  "div",
41
61
  {
42
- class: m(["nmorph-image-preview__portal", e.modifiers])
62
+ class: h(["nmorph-image-preview__portal", e.modifiers])
43
63
  },
44
64
  [
45
65
  o(e.NmorphOverlay, {
@@ -48,15 +68,34 @@ function y(x, B, S, e, b, u) {
48
68
  onOnOutsideClick: e.closeHandler
49
69
  }, {
50
70
  default: r(() => [
51
- l("div", k, [
71
+ i("div", y, [
52
72
  o(e.NmorphImage, {
53
73
  src: e.triggerSource,
54
74
  alt: e.props.alt,
55
75
  fit: "cover",
56
- style: f({ transform: `rotate(${e.rotateLevel}deg) scale(${e.scaleLevel})` })
57
- }, null, 8, ["src", "alt", "style"])
76
+ "frame-border": 0,
77
+ style: k({ transform: `rotate(${e.rotateLevel}deg) scale(${e.scaleLevel})` })
78
+ }, _({
79
+ _: 2
80
+ /* DYNAMIC */
81
+ }, [
82
+ n.$slots.loading ? {
83
+ name: "loading",
84
+ fn: r(() => [
85
+ m(n.$slots, "loading")
86
+ ]),
87
+ key: "0"
88
+ } : void 0,
89
+ n.$slots.error ? {
90
+ name: "error",
91
+ fn: r(() => [
92
+ m(n.$slots, "error")
93
+ ]),
94
+ key: "1"
95
+ } : void 0
96
+ ]), 1032, ["src", "alt", "style"])
58
97
  ]),
59
- e.multipleSources ? (n(), i("div", N, [
98
+ e.multipleSources ? (l(), a("div", C, [
60
99
  o(e.NmorphButton, { onClick: e.previousHandler }, {
61
100
  default: r(() => [
62
101
  o(e.NmorphIcon, null, {
@@ -70,8 +109,8 @@ function y(x, B, S, e, b, u) {
70
109
  _: 1
71
110
  /* STABLE */
72
111
  })
73
- ])) : d("v-if", !0),
74
- e.multipleSources ? (n(), i("div", w, [
112
+ ])) : t("v-if", !0),
113
+ e.multipleSources ? (l(), a("div", I, [
75
114
  o(e.NmorphButton, { onClick: e.nextHandler }, {
76
115
  default: r(() => [
77
116
  o(e.NmorphIcon, null, {
@@ -85,17 +124,17 @@ function y(x, B, S, e, b, u) {
85
124
  _: 1
86
125
  /* STABLE */
87
126
  })
88
- ])) : d("v-if", !0),
89
- l("div", C, [
90
- (n(), i(
91
- t,
127
+ ])) : t("v-if", !0),
128
+ i("div", S, [
129
+ (l(), a(
130
+ s,
92
131
  null,
93
- p(e.actions, (c, h) => l("div", {
94
- key: h,
132
+ N(e.actions, (d, f) => i("div", {
133
+ key: f,
95
134
  class: "nmorph-image-preview__action-element"
96
135
  }, [
97
136
  o(e.NmorphButton, {
98
- onClick: c.handler
137
+ onClick: d.handler
99
138
  }, {
100
139
  default: r(() => [
101
140
  o(
@@ -103,7 +142,7 @@ function y(x, B, S, e, b, u) {
103
142
  null,
104
143
  {
105
144
  default: r(() => [
106
- (n(), a(_(c.icon)))
145
+ (l(), c(v(d.icon)))
107
146
  ]),
108
147
  _: 2
109
148
  /* DYNAMIC */
@@ -119,7 +158,7 @@ function y(x, B, S, e, b, u) {
119
158
  64
120
159
  /* STABLE_FRAGMENT */
121
160
  )),
122
- l("div", I, [
161
+ i("div", b, [
123
162
  o(e.NmorphButton, {
124
163
  disabled: e.scaleLevel === 1,
125
164
  onClick: e.enlargeShrinkActionData.handler
@@ -127,7 +166,7 @@ function y(x, B, S, e, b, u) {
127
166
  default: r(() => [
128
167
  o(e.NmorphIcon, null, {
129
168
  default: r(() => [
130
- (n(), a(_(e.enlargeShrinkActionData.icon)))
169
+ (l(), c(v(e.enlargeShrinkActionData.icon)))
131
170
  ]),
132
171
  _: 1
133
172
  /* STABLE */
@@ -139,8 +178,8 @@ function y(x, B, S, e, b, u) {
139
178
  ])
140
179
  ])
141
180
  ]),
142
- _: 1
143
- /* STABLE */
181
+ _: 3
182
+ /* FORWARDED */
144
183
  }, 8, ["show", "z-index"])
145
184
  ],
146
185
  2
@@ -152,7 +191,7 @@ function y(x, B, S, e, b, u) {
152
191
  /* STABLE_FRAGMENT */
153
192
  );
154
193
  }
155
- const O = /* @__PURE__ */ g(s, [["render", y], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image-preview/NmorphImagePreview.vue"]]);
194
+ const E = /* @__PURE__ */ w(g, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image-preview/NmorphImagePreview.vue"]]);
156
195
  export {
157
- O as default
196
+ E as default
158
197
  };