@nmorph/nmorph-ui-kit 2.2.18 → 2.2.20

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 (104) hide show
  1. package/dist/assets/icons/circle-close.svg.js +4 -4
  2. package/dist/assets/icons/clock.svg.js +2 -2
  3. package/dist/assets/icons/folder-opened.svg.js +8 -8
  4. package/dist/components/basic/nmorph-button/NmorphButton.css +1 -1
  5. package/dist/components/basic/nmorph-link/NmorphLink.vue.js +16 -15
  6. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +17 -14
  7. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  8. package/dist/components/data/nmorph-badge/NmorphBadge.vue.js +23 -23
  9. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +27 -23
  10. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +14 -13
  11. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +68 -65
  12. package/dist/components/data/nmorph-calendar/utils.js +4 -3
  13. package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
  14. package/dist/components/data/nmorph-card/NmorphCard.vue.js +27 -26
  15. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +21 -13
  16. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +39 -42
  17. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +25 -36
  18. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +15 -11
  19. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.css +1 -1
  20. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.js +14 -13
  21. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +42 -27
  22. package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -0
  23. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +64 -0
  24. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +43 -0
  25. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.css +1 -1
  26. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +64 -61
  27. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +70 -60
  28. package/dist/components/data/nmorph-progress/NmorphProgress.vue.js +24 -29
  29. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +25 -14
  30. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue.js +20 -19
  31. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +15 -12
  32. package/dist/components/data/nmorph-table/NmorphTable.vue.js +35 -31
  33. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +64 -50
  34. package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.css +1 -1
  35. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue.js +8 -8
  36. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +26 -22
  37. package/dist/components/feedback/nmorph-callout/NmorphCallout.css +1 -1
  38. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +16 -15
  39. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +11 -8
  40. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
  41. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +13 -13
  42. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +33 -19
  43. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +1 -1
  44. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.css +1 -1
  45. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue.js +16 -15
  46. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +39 -32
  47. package/dist/components/form/nmorph-number-input/NmorphNumberInput.css +1 -1
  48. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue.js +7 -7
  49. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +40 -39
  50. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +53 -50
  51. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.js +16 -15
  52. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -16
  53. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue.js +16 -15
  54. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +26 -19
  55. package/dist/components/form/nmorph-slider/NmorphSlider.vue.js +4 -4
  56. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +48 -38
  57. package/dist/components/form/nmorph-switch/NmorphSwitch.css +1 -1
  58. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +18 -17
  59. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +38 -27
  60. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -0
  61. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +183 -0
  62. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +111 -0
  63. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.css +1 -1
  64. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +9 -8
  65. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +14 -14
  66. package/dist/hooks/use-common-styles.js +75 -9
  67. package/dist/hooks/use-virtual-list.js +3 -1
  68. package/dist/index.es.js +654 -650
  69. package/dist/index.umd.js +101 -35
  70. package/dist/locales/en.js +1 -0
  71. package/dist/locales/ru.js +1 -0
  72. package/dist/locales/zh.js +1 -0
  73. package/dist/package.json.js +1 -1
  74. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -0
  75. package/dist/src/components/data/index.d.ts +1 -0
  76. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +2 -0
  77. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +2 -0
  78. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +7 -5
  79. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +1 -3
  80. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +2 -0
  81. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +36 -0
  82. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +6 -0
  83. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +6 -0
  84. package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -0
  85. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +6 -0
  86. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -0
  87. package/dist/src/components/feedback/nmorph-alert/types.d.ts +1 -0
  88. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +2 -0
  89. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +8 -0
  90. package/dist/src/components/form/index.d.ts +2 -0
  91. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +4 -0
  92. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +2 -0
  93. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +2 -0
  94. package/dist/src/components/form/nmorph-select/types.d.ts +2 -0
  95. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +6 -0
  96. package/dist/src/components/form/nmorph-slider/types.d.ts +4 -0
  97. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +8 -0
  98. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +44 -0
  99. package/dist/src/components/form/nmorph-time-picker/types.d.ts +6 -0
  100. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -3
  101. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -2
  102. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -0
  103. package/dist/style.css +1 -1
  104. package/package.json +6 -5
@@ -1,29 +1,30 @@
1
1
  import './NmorphCollapseItem.css';
2
2
  import i from "./NmorphCollapseItem.vue2.js";
3
- import { openBlock as s, createElementBlock as n, withModifiers as a, normalizeClass as l, createElementVNode as o, renderSlot as r, createTextVNode as p, toDisplayString as c, normalizeStyle as m } from "vue";
3
+ import { openBlock as n, createElementBlock as a, normalizeStyle as l, normalizeClass as r, createElementVNode as o, withModifiers as c, renderSlot as s, createTextVNode as m, toDisplayString as p } from "vue";
4
4
  /* empty css */
5
5
  import d from "../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const _ = {
7
7
  ref: "collapseItemDOMElContent",
8
8
  class: "nmorph-collapse-item__inner-wrapper"
9
9
  };
10
- function f(t, h, k, e, v, C) {
11
- return s(), n(
10
+ function f(t, h, y, e, k, v) {
11
+ return n(), a(
12
12
  "div",
13
13
  {
14
- class: l(e.modifiers),
15
- onClick: a(e.clickHandler, ["stop"])
14
+ class: r(e.modifiers),
15
+ style: l(e.styles)
16
16
  },
17
17
  [
18
18
  o(
19
19
  "div",
20
20
  {
21
- class: l(["nmorph-collapse-item__title", e.titleModifiers])
21
+ class: r(["nmorph-collapse-item__title", e.titleModifiers]),
22
+ onClick: c(e.clickHandler, ["stop"])
22
23
  },
23
24
  [
24
- r(t.$slots, "title", {}, () => [
25
- p(
26
- c(e.props.title),
25
+ s(t.$slots, "title", {}, () => [
26
+ m(
27
+ p(e.props.title),
27
28
  1
28
29
  /* TEXT */
29
30
  )
@@ -36,14 +37,14 @@ function f(t, h, k, e, v, C) {
36
37
  "div",
37
38
  {
38
39
  class: "nmorph-collapse-item__content",
39
- style: m({ height: `${e.contentHeight}px` })
40
+ style: l({ height: `${e.contentHeight}px` })
40
41
  },
41
42
  [
42
43
  o(
43
44
  "div",
44
45
  _,
45
46
  [
46
- r(t.$slots, "default")
47
+ s(t.$slots, "default")
47
48
  ],
48
49
  512
49
50
  /* NEED_PATCH */
@@ -53,8 +54,8 @@ function f(t, h, k, e, v, C) {
53
54
  /* STYLE */
54
55
  )
55
56
  ],
56
- 2
57
- /* CLASS */
57
+ 6
58
+ /* CLASS, STYLE */
58
59
  );
59
60
  }
60
61
  const E = /* @__PURE__ */ d(i, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue"]]);
@@ -1,45 +1,60 @@
1
1
  import './NmorphCollapseItem.css';
2
- import { defineComponent as g, ref as o, computed as p, inject as c, onMounted as k, watch as d } from "vue";
3
- import { useModifiers as m } from "../../../../../utils/create-modifiers.js";
4
- import { NmorphComponentHeight as q } from "../../../../../types/index.js";
5
- const H = /* @__PURE__ */ g({
2
+ import { defineComponent as H, ref as u, computed as d, inject as b, onMounted as z, onBeforeUnmount as M, watch as h, nextTick as w } from "vue";
3
+ import { useModifiers as g } from "../../../../../utils/create-modifiers.js";
4
+ import { NmorphComponentHeight as $ } from "../../../../../types/index.js";
5
+ const D = /* @__PURE__ */ H({
6
6
  __name: "NmorphCollapseItem",
7
7
  props: {
8
8
  height: { type: null, required: !1, default: "basic" },
9
- block: { type: Boolean, required: !1, default: !0 },
9
+ block: { type: Boolean, required: !1, default: !1 },
10
+ transitionSpeed: { type: [Number, String], required: !1, default: void 0 },
10
11
  name: { type: String, required: !0 },
11
12
  title: { type: String, required: !1, default: "" },
12
13
  disabled: { type: Boolean, required: !1, default: !1 }
13
14
  },
14
15
  emits: ["click-item"],
15
- setup(f, { expose: v, emit: h }) {
16
- v();
17
- const t = f, n = h, e = o(!1), y = p(
18
- () => m({
19
- "nmorph-collapse-item": [`${t.disabled && "disabled"}`, `${e.value && "is-open"}`]
16
+ setup(y, { expose: O, emit: _ }) {
17
+ O();
18
+ const e = y, p = _, n = u(!1), k = d(
19
+ () => g({
20
+ "nmorph-collapse-item": [
21
+ `${e.disabled && "disabled"}`,
22
+ `${e.block && "block"}`,
23
+ `${n.value && "is-open"}`
24
+ ]
20
25
  })
21
- ), _ = p(
22
- () => m({
23
- nmorph: [q[t.height]]
26
+ ), S = d(
27
+ () => g({
28
+ nmorph: [$[e.height]]
24
29
  })
25
- ), l = c("collapse-data"), a = c("update-model"), i = o(null), s = o(0), b = () => {
26
- t.block || (e.value = !e.value, a && (a(t.name, e.value), n("click-item", { id: t.name, isOpen: e.value })));
30
+ ), c = (t) => typeof t == "number" ? `${t}ms` : t, C = d(() => ({
31
+ ...e.transitionSpeed !== void 0 && { "--transition-speed": c(e.transitionSpeed) }
32
+ })), o = b("collapse-data"), m = b("update-model"), r = u(null), f = u(0);
33
+ let s = null;
34
+ const l = (t) => Array.isArray(t) ? t.includes(e.name) : t === e.name, a = () => {
35
+ f.value = n.value && r.value ? r.value.scrollHeight : 0;
36
+ }, i = () => w(a), q = () => {
37
+ e.disabled || e.block || (n.value = !n.value, m?.(e.name, n.value), p("click-item", { id: e.name, isOpen: n.value }));
27
38
  };
28
- k(() => {
29
- Array.isArray(l?.value) ? e.value = l.value.includes(t.name) : e.value = l?.value === t.name;
30
- }), d(
31
- () => l?.value,
32
- (r) => {
33
- Array.isArray(r) ? e.value = r.includes(t.name) : e.value = r === t.name;
39
+ z(() => {
40
+ n.value = l(o?.value), i(), "ResizeObserver" in window && r.value && (s = new ResizeObserver(a), s.observe(r.value));
41
+ }), M(() => {
42
+ s?.disconnect();
43
+ }), h(
44
+ () => o?.value,
45
+ (t) => {
46
+ n.value = l(t), i();
34
47
  },
35
48
  { deep: !0 }
36
- ), d(e, () => {
37
- s.value = e.value && i.value ? i.value?.clientHeight : 0;
38
- });
39
- const u = { props: t, emit: n, isOpen: e, modifiers: y, titleModifiers: _, collapseData: l, updateModel: a, collapseItemDOMElContent: i, contentHeight: s, clickHandler: b };
40
- return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
49
+ ), h(n, i);
50
+ const v = { props: e, emit: p, isOpen: n, modifiers: k, titleModifiers: S, getCssDuration: c, styles: C, collapseData: o, updateModel: m, collapseItemDOMElContent: r, contentHeight: f, get resizeObserver() {
51
+ return s;
52
+ }, set resizeObserver(t) {
53
+ s = t;
54
+ }, isValueOpen: l, updateContentHeight: a, updateContentHeightAfterRender: i, clickHandler: q };
55
+ return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
41
56
  }
42
57
  });
43
58
  export {
44
- H as default
59
+ D as default
45
60
  };
@@ -0,0 +1 @@
1
+ .nmorph-empty{display:flex;flex-direction:column;gap:8px;justify-content:center;align-items:center;width:100%;min-height:var(--nmorph-empty-min-height);padding:var(--nmorph-empty-padding);color:var(--nmorph-text-color);text-align:center;border-radius:var(--default-border-radius)}.nmorph-empty .nmorph-empty__icon{display:flex;justify-content:center;align-items:center;width:var(--nmorph-empty-icon-size);height:var(--nmorph-empty-icon-size);color:var(--nmorph-semi-contrast-text-color)}.nmorph-empty .nmorph-empty__icon .nmorph-icon{--color: var(--nmorph-semi-contrast-text-color)}.nmorph-empty .nmorph-empty__title{font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-regular)}.nmorph-empty .nmorph-empty__description{max-width:420px;color:var(--nmorph-semi-contrast-text-color);font-weight:400;font-size:var(--font-size-small);line-height:var(--line-height-loose)}.nmorph-empty .nmorph-empty__action{display:flex;justify-content:center;margin-top:4px}.nmorph-empty.nmorph-empty--nmorph{background:var(--nmorph-main-color)}.nmorph-empty.nmorph-empty--nmorph.nmorph--shadow-inset{box-shadow:var(--nmorph-shadow-inset)}.nmorph-empty.nmorph-empty--nmorph.nmorph--shadow-outset{box-shadow:var(--nmorph-shadow-outset)}.nmorph-empty.nmorph-empty--common{border:1px solid var(--nmorph-gray-color)}
@@ -0,0 +1,64 @@
1
+ import './NmorphEmpty.css';
2
+ import c from "./NmorphEmpty.vue2.js";
3
+ import { openBlock as t, createElementBlock as i, normalizeStyle as m, normalizeClass as d, renderSlot as r, createVNode as n, withCtx as p, createCommentVNode as s, createElementVNode as h, createTextVNode as l, toDisplayString as a } from "vue";
4
+ /* empty css */
5
+ import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const y = ["role", "aria-label"], f = {
7
+ key: 0,
8
+ class: "nmorph-empty__icon",
9
+ "aria-hidden": "true"
10
+ }, v = { class: "nmorph-empty__title" }, N = {
11
+ key: 1,
12
+ class: "nmorph-empty__description"
13
+ }, S = {
14
+ key: 2,
15
+ class: "nmorph-empty__action"
16
+ };
17
+ function k(e, z, b, o, g, C) {
18
+ return t(), i("div", {
19
+ class: d(o.modifiers),
20
+ style: m(o.styles),
21
+ role: o.props.role,
22
+ "aria-label": o.label
23
+ }, [
24
+ o.hasIcon ? (t(), i("div", f, [
25
+ r(e.$slots, "icon", {}, () => [
26
+ n(o.NmorphIcon, {
27
+ width: o.getCssSize(o.props.iconSize),
28
+ height: o.getCssSize(o.props.iconSize)
29
+ }, {
30
+ default: p(() => [
31
+ n(o.NmorphIconFolderOpened)
32
+ ]),
33
+ _: 1
34
+ /* STABLE */
35
+ }, 8, ["width", "height"])
36
+ ])
37
+ ])) : s("v-if", !0),
38
+ h("div", v, [
39
+ r(e.$slots, "title", {}, () => [
40
+ l(
41
+ a(o.props.title),
42
+ 1
43
+ /* TEXT */
44
+ )
45
+ ])
46
+ ]),
47
+ o.hasDescription ? (t(), i("div", N, [
48
+ r(e.$slots, "description", {}, () => [
49
+ l(
50
+ a(o.props.description),
51
+ 1
52
+ /* TEXT */
53
+ )
54
+ ])
55
+ ])) : s("v-if", !0),
56
+ o.slots.action ? (t(), i("div", S, [
57
+ r(e.$slots, "action")
58
+ ])) : s("v-if", !0)
59
+ ], 14, y);
60
+ }
61
+ const B = /* @__PURE__ */ _(c, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-empty/NmorphEmpty.vue"]]);
62
+ export {
63
+ B as default
64
+ };
@@ -0,0 +1,43 @@
1
+ import './NmorphEmpty.css';
2
+ import { defineComponent as f, useSlots as c, computed as t } from "vue";
3
+ import { NmorphShadowType as h } from "../../../types/index.js";
4
+ import { useModifiers as y } from "../../../utils/create-modifiers.js";
5
+ import g from "../../../assets/icons/folder-opened.svg.js";
6
+ import S from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
+ const z = /* @__PURE__ */ f({
8
+ __name: "NmorphEmpty",
9
+ props: {
10
+ title: { type: String, required: !1, default: "No data" },
11
+ description: { type: String, required: !1, default: "" },
12
+ iconSize: { type: [Number, String], required: !1, default: 56 },
13
+ minHeight: { type: [Number, String], required: !1, default: 160 },
14
+ padding: { type: [Number, String], required: !1, default: "var(--indentation-05)" },
15
+ design: { type: String, required: !1, default: "nmorph" },
16
+ shadowType: { type: null, required: !1, default: "inset" },
17
+ hideIcon: { type: Boolean, required: !1, default: !1 },
18
+ role: { type: String, required: !1, default: "status" },
19
+ ariaLabel: { type: String, required: !1, default: void 0 },
20
+ ariaOrientation: { type: String, required: !1, default: void 0 }
21
+ },
22
+ setup(p, { expose: s }) {
23
+ s();
24
+ const e = p, o = c(), r = (i) => typeof i == "number" ? `${i}px` : i, a = t(() => !e.hideIcon || !!o.icon), d = t(() => !!(e.description || o.description)), l = t(() => e.ariaLabel || e.title), m = t(
25
+ () => y({
26
+ nmorph: [e.design === "nmorph" ? h[e.shadowType] : ""],
27
+ "nmorph-empty": [e.design]
28
+ })
29
+ ), u = t(() => ({
30
+ "--nmorph-empty-icon-size": r(e.iconSize),
31
+ "--nmorph-empty-min-height": r(e.minHeight),
32
+ "--nmorph-empty-padding": r(e.padding)
33
+ })), n = { props: e, slots: o, getCssSize: r, hasIcon: a, hasDescription: d, label: l, modifiers: m, styles: u, get NmorphIcon() {
34
+ return S;
35
+ }, get NmorphIconFolderOpened() {
36
+ return g;
37
+ } };
38
+ return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
39
+ }
40
+ });
41
+ export {
42
+ z as default
43
+ };
@@ -1 +1 @@
1
- .nmorph-image-preview{--width: 50px;--height: 50px;width:var(--width);height:var(--height);overflow:hidden}.nmorph-image-preview .nmorph-image-preview__trigger{position:relative;width:100%;height:100%;cursor:pointer}.nmorph-image-preview .nmorph-image-preview__trigger:hover{filter:brightness(.8)}.nmorph-image-preview .nmorph-image-preview__trigger .nmorph-image{width:100%;height:100%}.nmorph-image-preview__portal{display:contents}.nmorph-image-preview__portal .nmorph-image-preview__content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:var(--transition-04) opacity ease-in-out}.nmorph-image-preview__portal .nmorph-image-preview__actions{position:absolute;bottom:-50px;left:50%;z-index:2;display:flex;height:0;transform:translate(-50%);transition:ease-in-out bottom var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__action-element{margin-right:var(--indentation-03)}.nmorph-image-preview__portal .nmorph-button__content{box-shadow:none}.nmorph-image-preview__portal .nmorph-image-preview__left,.nmorph-image-preview__portal .nmorph-image-preview__right{z-index:2}.nmorph-image-preview__portal .nmorph-image-preview__left{position:absolute;top:50%;left:-100%;transform:rotate(90deg) translate(-50%);transition:ease-in-out left var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__right{position:absolute;top:50%;right:-100%;transform:rotate(270deg) translate(50%);transition:ease-in-out right var(--transition-03)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__actions{bottom:50px}.nmorph-image-preview__portal.nmorph-image-preview--opened{--nmorph-image-preview-btn-margin: 20px}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__left{left:var(--nmorph-image-preview-btn-margin)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__right{right:var(--nmorph-image-preview-btn-margin)}
1
+ .nmorph-image-preview{--width: 50px;--height: 50px;width:var(--width);height:var(--height);overflow:hidden}.nmorph-image-preview .nmorph-image-preview__trigger{position:relative;width:100%;height:100%;cursor:pointer}.nmorph-image-preview .nmorph-image-preview__trigger:hover{filter:brightness(.8)}.nmorph-image-preview .nmorph-image-preview__trigger .nmorph-image{width:100%;height:100%}.nmorph-image-preview__portal{display:contents}.nmorph-image-preview__portal .nmorph-image-preview__content{position:absolute;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:min(100vw - 96px,960px);height:min(100vh - 180px,720px);transform:translate(-50%,-50%);transition:var(--transition-04) opacity ease-in-out}.nmorph-image-preview__portal .nmorph-image-preview__content .nmorph-image{width:100%;height:100%}.nmorph-image-preview__portal .nmorph-image-preview__content .nmorph-image img{width:100%;height:100%;object-fit:contain}.nmorph-image-preview__portal .nmorph-image-preview__actions{position:absolute;bottom:-50px;left:50%;z-index:2;display:flex;height:0;transform:translate(-50%);transition:ease-in-out bottom var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__action-element{margin-right:var(--indentation-03)}.nmorph-image-preview__portal .nmorph-button__content{box-shadow:none}.nmorph-image-preview__portal .nmorph-image-preview__left,.nmorph-image-preview__portal .nmorph-image-preview__right{z-index:2}.nmorph-image-preview__portal .nmorph-image-preview__left{position:absolute;top:50%;left:-100%;transform:rotate(90deg) translate(-50%);transition:ease-in-out left var(--transition-03)}.nmorph-image-preview__portal .nmorph-image-preview__right{position:absolute;top:50%;right:-100%;transform:rotate(270deg) translate(50%);transition:ease-in-out right var(--transition-03)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__actions{bottom:50px}.nmorph-image-preview__portal.nmorph-image-preview--opened{--nmorph-image-preview-btn-margin: 20px}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__left{left:var(--nmorph-image-preview-btn-margin)}.nmorph-image-preview__portal.nmorph-image-preview--opened .nmorph-image-preview__right{right:var(--nmorph-image-preview-btn-margin)}
@@ -1,108 +1,111 @@
1
1
  import './NmorphImagePreview.css';
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 e, createSlots as _, withCtx as r, renderSlot as m, createCommentVNode as t, createBlock as c, Teleport as p, normalizeStyle as k, renderList as w, resolveDynamicComponent as v } from "vue";
2
+ import p from "./NmorphImagePreview.vue2.js";
3
+ import { openBlock as l, createElementBlock as a, Fragment as h, normalizeStyle as m, normalizeClass as _, createElementVNode as i, createVNode as o, createSlots as v, withCtx as r, renderSlot as t, createCommentVNode as d, createBlock as c, Teleport as k, renderList as y, resolveDynamicComponent as f } from "vue";
4
4
  /* empty css */
5
- import N from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const y = { class: "nmorph-image-preview__content" }, C = {
5
+ import w from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const N = { class: "nmorph-image-preview__content" }, C = {
7
7
  key: 0,
8
8
  class: "nmorph-image-preview__left"
9
9
  }, I = {
10
10
  key: 1,
11
11
  class: "nmorph-image-preview__right"
12
12
  }, S = { class: "nmorph-image-preview__actions" }, b = { class: "nmorph-image-preview__action-element" };
13
- function B(n, z, D, o, H, L) {
13
+ function B(n, z, D, e, H, L) {
14
14
  return l(), a(
15
- s,
15
+ h,
16
16
  null,
17
17
  [
18
- o.props.showTrigger ? (l(), a(
18
+ e.props.showTrigger ? (l(), a(
19
19
  "div",
20
20
  {
21
21
  key: 0,
22
- class: h(o.modifiers)
22
+ class: _(e.modifiers),
23
+ style: m(e.triggerStyle)
23
24
  },
24
25
  [
25
26
  i("div", {
26
27
  class: "nmorph-image-preview__trigger",
27
- onClick: o.clickHandler
28
+ onClick: e.clickHandler
28
29
  }, [
29
- e(o.NmorphImage, {
30
- src: o.triggerSource,
31
- alt: o.props.alt,
30
+ o(e.NmorphImage, {
31
+ src: e.triggerSource,
32
+ alt: e.props.alt,
32
33
  fit: "cover",
33
34
  "frame-border": 0
34
- }, _({
35
+ }, v({
35
36
  _: 2
36
37
  /* DYNAMIC */
37
38
  }, [
38
39
  n.$slots.loading ? {
39
40
  name: "loading",
40
41
  fn: r(() => [
41
- m(n.$slots, "loading")
42
+ t(n.$slots, "loading")
42
43
  ]),
43
44
  key: "0"
44
45
  } : void 0,
45
46
  n.$slots.error ? {
46
47
  name: "error",
47
48
  fn: r(() => [
48
- m(n.$slots, "error")
49
+ t(n.$slots, "error")
49
50
  ]),
50
51
  key: "1"
51
52
  } : void 0
52
53
  ]), 1032, ["src", "alt"])
53
54
  ])
54
55
  ],
55
- 2
56
- /* CLASS */
57
- )) : t("v-if", !0),
58
- (l(), c(p, { to: "body" }, [
56
+ 6
57
+ /* CLASS, STYLE */
58
+ )) : d("v-if", !0),
59
+ (l(), c(k, { to: "body" }, [
59
60
  i(
60
61
  "div",
61
62
  {
62
- class: h(["nmorph-image-preview__portal", o.modifiers])
63
+ class: _(["nmorph-image-preview__portal", e.modifiers]),
64
+ style: m(e.portalStyle)
63
65
  },
64
66
  [
65
- e(o.NmorphOverlay, {
66
- show: o.open,
67
- "z-index": o.props.zIndex,
67
+ o(e.NmorphOverlay, {
68
+ show: e.open,
69
+ "z-index": e.props.zIndex,
70
+ "disabled-teleport": "",
68
71
  "trap-focus": "",
69
- onOnOutsideClick: o.closeHandler,
70
- onOnEscapeKeydown: o.closeHandler
72
+ onOnOutsideClick: e.closeHandler,
73
+ onOnEscapeKeydown: e.closeHandler
71
74
  }, {
72
75
  default: r(() => [
73
- i("div", y, [
74
- e(o.NmorphImage, {
75
- src: o.triggerSource,
76
- alt: o.props.alt,
77
- fit: "cover",
76
+ i("div", N, [
77
+ o(e.NmorphImage, {
78
+ src: e.triggerSource,
79
+ alt: e.props.alt,
80
+ fit: "contain",
78
81
  "frame-border": 0,
79
- style: k({ transform: `rotate(${o.rotateLevel}deg) scale(${o.scaleLevel})` })
80
- }, _({
82
+ style: m({ transform: `rotate(${e.rotateLevel}deg) scale(${e.scaleLevel})` })
83
+ }, v({
81
84
  _: 2
82
85
  /* DYNAMIC */
83
86
  }, [
84
87
  n.$slots.loading ? {
85
88
  name: "loading",
86
89
  fn: r(() => [
87
- m(n.$slots, "loading")
90
+ t(n.$slots, "loading")
88
91
  ]),
89
92
  key: "0"
90
93
  } : void 0,
91
94
  n.$slots.error ? {
92
95
  name: "error",
93
96
  fn: r(() => [
94
- m(n.$slots, "error")
97
+ t(n.$slots, "error")
95
98
  ]),
96
99
  key: "1"
97
100
  } : void 0
98
101
  ]), 1032, ["src", "alt", "style"])
99
102
  ]),
100
- o.multipleSources ? (l(), a("div", C, [
101
- e(o.NmorphButton, { onClick: o.previousHandler }, {
103
+ e.multipleSources ? (l(), a("div", C, [
104
+ o(e.NmorphButton, { onClick: e.previousHandler }, {
102
105
  default: r(() => [
103
- e(o.NmorphIcon, null, {
106
+ o(e.NmorphIcon, null, {
104
107
  default: r(() => [
105
- e(o.NmorphIconChevronDown)
108
+ o(e.NmorphIconChevronDown)
106
109
  ]),
107
110
  _: 1
108
111
  /* STABLE */
@@ -111,13 +114,13 @@ function B(n, z, D, o, H, L) {
111
114
  _: 1
112
115
  /* STABLE */
113
116
  })
114
- ])) : t("v-if", !0),
115
- o.multipleSources ? (l(), a("div", I, [
116
- e(o.NmorphButton, { onClick: o.nextHandler }, {
117
+ ])) : d("v-if", !0),
118
+ e.multipleSources ? (l(), a("div", I, [
119
+ o(e.NmorphButton, { onClick: e.nextHandler }, {
117
120
  default: r(() => [
118
- e(o.NmorphIcon, null, {
121
+ o(e.NmorphIcon, null, {
119
122
  default: r(() => [
120
- e(o.NmorphIconChevronDown)
123
+ o(e.NmorphIconChevronDown)
121
124
  ]),
122
125
  _: 1
123
126
  /* STABLE */
@@ -126,25 +129,25 @@ function B(n, z, D, o, H, L) {
126
129
  _: 1
127
130
  /* STABLE */
128
131
  })
129
- ])) : t("v-if", !0),
132
+ ])) : d("v-if", !0),
130
133
  i("div", S, [
131
134
  (l(), a(
132
- s,
135
+ h,
133
136
  null,
134
- w(o.actions, (d, f) => i("div", {
135
- key: f,
137
+ y(e.actions, (s, g) => i("div", {
138
+ key: g,
136
139
  class: "nmorph-image-preview__action-element"
137
140
  }, [
138
- e(o.NmorphButton, {
139
- onClick: d.handler
141
+ o(e.NmorphButton, {
142
+ onClick: s.handler
140
143
  }, {
141
144
  default: r(() => [
142
- e(
143
- o.NmorphIcon,
145
+ o(
146
+ e.NmorphIcon,
144
147
  null,
145
148
  {
146
149
  default: r(() => [
147
- (l(), c(v(d.icon)))
150
+ (l(), c(f(s.icon)))
148
151
  ]),
149
152
  _: 2
150
153
  /* DYNAMIC */
@@ -161,14 +164,14 @@ function B(n, z, D, o, H, L) {
161
164
  /* STABLE_FRAGMENT */
162
165
  )),
163
166
  i("div", b, [
164
- e(o.NmorphButton, {
165
- disabled: o.scaleLevel === 1,
166
- onClick: o.enlargeShrinkActionData.handler
167
+ o(e.NmorphButton, {
168
+ disabled: e.scaleLevel === 1,
169
+ onClick: e.enlargeShrinkActionData.handler
167
170
  }, {
168
171
  default: r(() => [
169
- e(o.NmorphIcon, null, {
172
+ o(e.NmorphIcon, null, {
170
173
  default: r(() => [
171
- (l(), c(v(o.enlargeShrinkActionData.icon)))
174
+ (l(), c(f(e.enlargeShrinkActionData.icon)))
172
175
  ]),
173
176
  _: 1
174
177
  /* STABLE */
@@ -184,8 +187,8 @@ function B(n, z, D, o, H, L) {
184
187
  /* FORWARDED */
185
188
  }, 8, ["show", "z-index"])
186
189
  ],
187
- 2
188
- /* CLASS */
190
+ 6
191
+ /* CLASS, STYLE */
189
192
  )
190
193
  ]))
191
194
  ],
@@ -193,7 +196,7 @@ function B(n, z, D, o, H, L) {
193
196
  /* STABLE_FRAGMENT */
194
197
  );
195
198
  }
196
- const A = /* @__PURE__ */ N(g, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image-preview/NmorphImagePreview.vue"]]);
199
+ const P = /* @__PURE__ */ w(p, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image-preview/NmorphImagePreview.vue"]]);
197
200
  export {
198
- A as default
201
+ P as default
199
202
  };