@nmorph/nmorph-ui-kit 2.2.22 → 2.2.24

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 (24) hide show
  1. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +2 -2
  2. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  3. package/dist/components/data/nmorph-badge/NmorphBadge.vue.js +65 -20
  4. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +42 -23
  5. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.css +1 -1
  6. package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
  7. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +12 -12
  8. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +36 -32
  9. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  10. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +25 -22
  11. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +70 -62
  12. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +19 -17
  13. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +8 -7
  14. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +13 -12
  15. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +20 -20
  16. package/dist/index.umd.js +14 -14
  17. package/dist/package.json.js +1 -1
  18. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +6 -0
  19. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +2 -0
  20. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -0
  21. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +1 -1
  22. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -2
  23. package/dist/style.css +1 -1
  24. package/package.json +1 -1
@@ -16,8 +16,8 @@ const k = /* @__PURE__ */ C({
16
16
  updateOnlyOnScrollEnd: { type: Boolean, required: !1, default: !1 },
17
17
  yBarWidthInPx: { type: Number, required: !1, default: 6 },
18
18
  xBarWidthInPx: { type: Number, required: !1, default: 6 },
19
- xGapInPx: { type: Number, required: !1, default: 4 },
20
- yGapInPx: { type: Number, required: !1, default: 4 }
19
+ xGapInPx: { type: Number, required: !1, default: 0 },
20
+ yGapInPx: { type: Number, required: !1, default: 0 }
21
21
  },
22
22
  emits: ["on-scroll", "update:model-value", "on-scroll-end"],
23
23
  setup(b, { expose: H, emit: q }) {
@@ -1 +1 @@
1
- .nmorph-badge{position:relative;display:inline-block;height:fit-content;--dot-size: 4px}.nmorph-badge .nmorph-badge__container{position:absolute;display:inline-flex;justify-content:center;align-items:center;background:var(--nmorph-badge-color);border-radius:var(--default-border-radius);opacity:1}.nmorph-badge.nmorph-badge--tag{position:static;display:inline-flex}.nmorph-badge .nmorph-badge__container--tag{position:static}.nmorph-badge .nmorph-badge__content{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:calc(1em * var(--line-height-regular) + 4px);padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular);text-align:center}.nmorph-badge.nmorph-badge--tiny .nmorph-badge__content{font-size:var(--font-size-tiny)}.nmorph-badge.nmorph-badge--extra-small .nmorph-badge__content{font-size:var(--font-size-extra-small)}.nmorph-badge .nmorph-badge__container--hidden{opacity:0}.nmorph-badge .nmorph-badge__dot{width:var(--dot-size);height:var(--dot-size);border-radius:var(--border-radius-circular)}
1
+ .nmorph-badge{position:relative;display:inline-block;height:fit-content;--dot-size: 4px;--nmorph-badge-ribbon-height: 24px;--nmorph-badge-ribbon-corner-size: 62px;--nmorph-badge-ribbon-width: 116px;--nmorph-badge-ribbon-offset-x: 0px;--nmorph-badge-ribbon-offset-y: 0px}.nmorph-badge .nmorph-badge__container{position:absolute;display:inline-flex;justify-content:center;align-items:center;background:var(--nmorph-badge-color);border-radius:var(--default-border-radius);opacity:1}.nmorph-badge.nmorph-badge--tag{position:static;display:inline-flex}.nmorph-badge .nmorph-badge__container--tag{position:static}.nmorph-badge .nmorph-badge__content{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:calc(1em * var(--line-height-regular) + 4px);padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular);text-align:center}.nmorph-badge.nmorph-badge--tiny .nmorph-badge__content{font-size:var(--font-size-tiny)}.nmorph-badge.nmorph-badge--extra-small .nmorph-badge__content{font-size:var(--font-size-extra-small)}.nmorph-badge .nmorph-badge__container--hidden{opacity:0}.nmorph-badge .nmorph-badge__ribbon-frame{position:absolute;inset:0;overflow:hidden;border-radius:var(--default-border-radius);pointer-events:none}.nmorph-badge .nmorph-badge__ribbon-corner{position:absolute;width:var(--nmorph-badge-ribbon-corner-size);height:var(--nmorph-badge-ribbon-corner-size)}.nmorph-badge .nmorph-badge__container--ribbon{top:50%;left:50%;width:var(--nmorph-badge-ribbon-width);height:var(--nmorph-badge-ribbon-height);border-radius:0;box-shadow:var(--nmorph-shadow-outset)}.nmorph-badge .nmorph-badge__container--ribbon .nmorph-badge__content{width:100%;min-width:0;padding:0 var(--indentation-03);overflow:hidden;font-weight:600;font-size:var(--font-size-extra-small);white-space:nowrap;text-overflow:ellipsis;transform:translateY(-1px)}.nmorph-badge .nmorph-badge__ribbon-corner--top-left{top:var(--nmorph-badge-ribbon-offset-y);left:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--top-left .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(-45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--top-right{top:var(--nmorph-badge-ribbon-offset-y);right:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--top-right .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-left{bottom:var(--nmorph-badge-ribbon-offset-y);left:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-left .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-right{right:var(--nmorph-badge-ribbon-offset-x);bottom:var(--nmorph-badge-ribbon-offset-y)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-right .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(-45deg)}.nmorph-badge .nmorph-badge__dot{width:var(--dot-size);height:var(--dot-size);border-radius:var(--border-radius-circular)}.nmorph-badge.nmorph-badge--tiny{--nmorph-badge-ribbon-height: 18px;--nmorph-badge-ribbon-corner-size: 50px;--nmorph-badge-ribbon-width: 92px}.nmorph-badge.nmorph-badge--extra-small{--nmorph-badge-ribbon-height: 20px;--nmorph-badge-ribbon-corner-size: 56px;--nmorph-badge-ribbon-width: 104px}
@@ -1,41 +1,86 @@
1
1
  import './NmorphBadge.css';
2
- import m from "./NmorphBadge.vue2.js";
3
- import { openBlock as o, createElementBlock as a, normalizeStyle as i, normalizeClass as d, renderSlot as s, createCommentVNode as l, Fragment as c, createTextVNode as t, toDisplayString as n } from "vue";
2
+ import y from "./NmorphBadge.vue2.js";
3
+ import { openBlock as o, createElementBlock as a, normalizeStyle as l, normalizeClass as i, renderSlot as s, createCommentVNode as d, createElementVNode as n, createTextVNode as t, toDisplayString as c, Fragment as m } from "vue";
4
4
  /* empty css */
5
- import p from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const y = {
5
+ import f from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const _ = { class: "nmorph-badge__content" }, b = {
7
7
  key: 0,
8
8
  class: "nmorph-badge__dot"
9
- }, f = {
9
+ }, g = {
10
10
  key: 1,
11
11
  class: "nmorph-badge__content"
12
12
  };
13
- function _(r, g, h, e, k, v) {
13
+ function h(r, p, v, e, k, V) {
14
14
  return !e.props.disabled && (!e.props.isTag || e.shouldShowBadge) ? (o(), a(
15
15
  "div",
16
16
  {
17
17
  key: 0,
18
- class: d(e.modifiers),
19
- style: i(e.styles)
18
+ class: i(e.modifiers),
19
+ style: l(e.styles)
20
20
  },
21
21
  [
22
- e.props.isTag ? l("v-if", !0) : s(r.$slots, "default", { key: 0 }),
23
- e.shouldShowBadge ? (o(), a(
22
+ e.props.isTag ? d("v-if", !0) : s(r.$slots, "default", { key: 0 }),
23
+ e.shouldShowBadge && e.isRibbon ? (o(), a(
24
24
  "div",
25
25
  {
26
26
  key: 1,
27
+ class: "nmorph-badge__ribbon-frame",
28
+ style: l(e.ribbonFrameStyle)
29
+ },
30
+ [
31
+ n(
32
+ "div",
33
+ {
34
+ class: i(e.ribbonCornerModifiers)
35
+ },
36
+ [
37
+ n(
38
+ "div",
39
+ {
40
+ ref: "badge",
41
+ class: i(e.containerModifiers),
42
+ style: l(e.containerStyle)
43
+ },
44
+ [
45
+ n("div", _, [
46
+ s(r.$slots, "value", {
47
+ value: e.props.value,
48
+ displayValue: e.displayValue
49
+ }, () => [
50
+ t(
51
+ c(e.displayValue),
52
+ 1
53
+ /* TEXT */
54
+ )
55
+ ])
56
+ ])
57
+ ],
58
+ 6
59
+ /* CLASS, STYLE */
60
+ )
61
+ ],
62
+ 2
63
+ /* CLASS */
64
+ )
65
+ ],
66
+ 4
67
+ /* STYLE */
68
+ )) : e.shouldShowBadge ? (o(), a(
69
+ "div",
70
+ {
71
+ key: 2,
27
72
  ref: "badge",
28
- class: d(e.containerModifiers),
29
- style: i(e.containerStyle)
73
+ class: i(e.containerModifiers),
74
+ style: l(e.containerStyle)
30
75
  },
31
76
  [
32
- e.props.isDot ? (o(), a("div", y)) : (o(), a("div", f, [
77
+ e.isDotType ? (o(), a("div", b)) : (o(), a("div", g, [
33
78
  e.props.isTag ? (o(), a(
34
- c,
79
+ m,
35
80
  { key: 0 },
36
81
  [
37
82
  t(
38
- n(e.displayValue),
83
+ c(e.displayValue),
39
84
  1
40
85
  /* TEXT */
41
86
  )
@@ -48,7 +93,7 @@ function _(r, g, h, e, k, v) {
48
93
  displayValue: e.displayValue
49
94
  }, () => [
50
95
  t(
51
- n(e.displayValue),
96
+ c(e.displayValue),
52
97
  1
53
98
  /* TEXT */
54
99
  )
@@ -57,13 +102,13 @@ function _(r, g, h, e, k, v) {
57
102
  ],
58
103
  6
59
104
  /* CLASS, STYLE */
60
- )) : l("v-if", !0)
105
+ )) : d("v-if", !0)
61
106
  ],
62
107
  6
63
108
  /* CLASS, STYLE */
64
- )) : e.props.isTag ? l("v-if", !0) : s(r.$slots, "default", { key: 1 });
109
+ )) : e.props.isTag ? d("v-if", !0) : s(r.$slots, "default", { key: 1 });
65
110
  }
66
- const T = /* @__PURE__ */ p(m, [["render", _], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-badge/NmorphBadge.vue"]]);
111
+ const w = /* @__PURE__ */ f(y, [["render", h], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-badge/NmorphBadge.vue"]]);
67
112
  export {
68
- T as default
113
+ w as default
69
114
  };
@@ -1,11 +1,13 @@
1
1
  import './NmorphBadge.css';
2
- import { defineComponent as z, computed as t, ref as n, onMounted as S, watch as q, nextTick as _ } from "vue";
2
+ import { defineComponent as T, computed as r, ref as l, onMounted as N, watch as C, nextTick as B } from "vue";
3
3
  import { useModifiers as f } from "../../../utils/create-modifiers.js";
4
- const B = /* @__PURE__ */ z({
4
+ const H = /* @__PURE__ */ T({
5
5
  __name: "NmorphBadge",
6
6
  props: {
7
7
  value: { type: [Number, String], required: !1, default: void 0 },
8
8
  max: { type: Number, required: !1, default: 99 },
9
+ type: { type: String, required: !1, default: "default" },
10
+ ribbonCorner: { type: String, required: !1, default: "top-right" },
9
11
  isDot: { type: Boolean, required: !1, default: !1 },
10
12
  isTag: { type: Boolean, required: !1, default: !1 },
11
13
  hidden: { type: Boolean, required: !1, default: !1 },
@@ -17,39 +19,56 @@ const B = /* @__PURE__ */ z({
17
19
  disabled: { type: Boolean, required: !1, default: !1 },
18
20
  dotSize: { type: [Number, String], required: !1, default: void 0 }
19
21
  },
20
- setup(p, { expose: c }) {
21
- c();
22
- const e = p, m = t(
22
+ setup(v, { expose: m }) {
23
+ m();
24
+ const e = v, o = r(() => e.isDot ? "dot" : e.type), b = r(() => o.value === "dot"), t = r(() => o.value === "ribbon" && !e.isTag), g = r(
23
25
  () => f({
24
- "nmorph-badge": [`${e.hidden && "hidden"}`, `${e.isTag && "tag"}`, e.size]
26
+ "nmorph-badge": [
27
+ `${e.hidden && "hidden"}`,
28
+ `${e.isTag && "tag"}`,
29
+ `${t.value && "ribbon"}`,
30
+ `${t.value && `ribbon-${e.ribbonCorner}`}`,
31
+ e.size
32
+ ]
25
33
  })
26
- ), g = t(
34
+ ), y = r(
27
35
  () => f({
28
- "nmorph-badge__container": [`${e.hidden && "hidden"}`, `${e.isTag && "tag"}`]
36
+ "nmorph-badge__container": [
37
+ `${e.hidden && "hidden"}`,
38
+ `${e.isTag && "tag"}`,
39
+ `${t.value && "ribbon"}`,
40
+ `${t.value && `ribbon-${e.ribbonCorner}`}`
41
+ ]
29
42
  })
30
- ), v = t(() => typeof Number(e.value) == "number" && Number(e.value) > e.max ? `${e.max}+` : e.value), y = t(() => e.isDot || e.value !== void 0), o = t(() => {
31
- const a = `${(i?.value / 2 + e.offsetX) * -1}px`, h = `${(s?.value / 2 + e.offsetY) * -1}px`;
43
+ ), x = r(
44
+ () => f({
45
+ "nmorph-badge__ribbon-corner": [`${e.ribbonCorner}`]
46
+ })
47
+ ), h = r(() => typeof Number(e.value) == "number" && Number(e.value) > e.max ? `${e.max}+` : e.value), z = r(() => b.value || e.value !== void 0), i = r(() => {
48
+ const a = `${(s?.value / 2 + e.offsetX) * -1}px`, _ = `${(d?.value / 2 + e.offsetY) * -1}px`;
32
49
  return {
33
50
  x: a,
34
- y: h
51
+ y: _
35
52
  };
36
- }), b = t(() => e.isTag ? {
53
+ }), S = r(() => e.isTag || t.value ? {
37
54
  zIndex: e.zIndex
38
55
  } : {
39
- right: o.value.x,
40
- top: o.value.y,
56
+ right: i.value.x,
57
+ top: i.value.y,
41
58
  zIndex: e.zIndex
42
- }), u = (a) => typeof a == "number" ? `${a}px` : a, x = t(() => ({
59
+ }), p = (a) => typeof a == "number" ? `${a}px` : a, n = l(null), s = l(0), d = l(0), $ = r(() => ({
43
60
  "--nmorph-badge-color": e.color,
44
- ...e.dotSize !== void 0 && { "--dot-size": u(e.dotSize) }
45
- })), r = n(null), i = n(0), s = n(0), d = async () => {
46
- await _(), !(!r.value || e.isTag) && (i.value = r.value.clientWidth, s.value = r.value.clientHeight);
47
- };
48
- S(d), q(() => [e.value, e.max, e.isDot, e.isTag, e.size], d);
49
- const l = { props: e, modifiers: m, containerModifiers: g, displayValue: v, shouldShowBadge: y, appliedOffset: o, containerStyle: b, getCssSize: u, styles: x, badge: r, badgeWidth: i, badgeHeight: s, updateBadgeSize: d };
50
- return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
61
+ ...e.dotSize !== void 0 && { "--dot-size": p(e.dotSize) }
62
+ })), u = async () => {
63
+ await B(), !(!n.value || e.isTag || t.value) && (s.value = n.value.clientWidth, d.value = n.value.clientHeight);
64
+ }, q = r(() => ({
65
+ zIndex: e.zIndex
66
+ }));
67
+ N(u), C(() => [e.value, e.max, o.value, e.ribbonCorner, e.isTag, e.size], u);
68
+ const c = { props: e, resolvedType: o, isDotType: b, isRibbon: t, modifiers: g, containerModifiers: y, ribbonCornerModifiers: x, displayValue: h, shouldShowBadge: z, appliedOffset: i, containerStyle: S, getCssSize: p, badge: n, badgeWidth: s, badgeHeight: d, styles: $, updateBadgeSize: u, ribbonFrameStyle: q };
69
+ return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
51
70
  }
52
71
  });
53
72
  export {
54
- B as default
73
+ H as default
55
74
  };
@@ -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%;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
+ .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{--nmorph-image-preview-content-width: min( calc(100vw - 96px) , 960px);--nmorph-image-preview-content-height: min( calc(100vh - 180px) , 720px);position:absolute;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:var(--nmorph-image-preview-content-width);height:var(--nmorph-image-preview-content-height);transform:translate(-50%,-50%);transition:var(--transition-04) opacity ease-in-out;pointer-events:none}.nmorph-image-preview__portal .nmorph-image-preview__content .nmorph-image{width:100%;height:100%;pointer-events:none}.nmorph-image-preview__portal .nmorph-image-preview__content .nmorph-image img{display:block;width:auto;max-width:100%;height:auto;max-height:100%;object-fit:contain;pointer-events:auto}.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 +1 @@
1
- .nmorph-dialog{position:absolute;top:50%;left:50%;width:var(--width);padding:var(--indentation-04);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);transform:translate(-50%,-50%)}.nmorph-dialog .nmorph-dialog__header{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-dialog .nmorph-dialog__close-icon{cursor:pointer}.nmorph-dialog{--width: var(--nmorph-dialog-width)}
1
+ .nmorph-dialog{position:absolute;top:50%;left:50%;display:flex;flex-direction:column;box-sizing:border-box;width:var(--width);max-width:var(--nmorph-dialog-max-width, calc(100vw - 32px) );max-height:var(--nmorph-dialog-max-height, var(--nmorph-dialog-default-max-height));padding:var(--indentation-04);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);transform:translate(-50%,-50%);--width: var(--nmorph-dialog-width);--nmorph-dialog-default-max-height: calc(100vh - 32px) }@supports (height: 100dvh){.nmorph-dialog{--nmorph-dialog-default-max-height: calc(100dvh - 32px) }}.nmorph-dialog .nmorph-dialog__header{display:flex;flex:0 0 auto;justify-content:space-between;align-items:center;font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-dialog .nmorph-dialog__close-icon{flex:0 0 auto;cursor:pointer}.nmorph-dialog .nmorph-dialog__content{min-height:0;overflow-y:auto}
@@ -1,11 +1,11 @@
1
1
  import './NmorphDialog.css';
2
2
  import s from "./NmorphDialog.vue2.js";
3
- import { openBlock as l, createBlock as c, withCtx as i, createElementVNode as e, normalizeStyle as d, normalizeClass as t, renderSlot as a, toDisplayString as m, createElementBlock as p, createVNode as n, createCommentVNode as _ } from "vue";
3
+ import { openBlock as r, createBlock as c, withCtx as a, createElementVNode as e, normalizeStyle as d, normalizeClass as t, renderSlot as i, toDisplayString as m, createElementBlock as _, createVNode as n, createCommentVNode as p } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const f = ["aria-label"], g = { class: "nmorph-dialog__header" }, v = { class: "nmorph-dialog__title" }, k = { class: "nmorph-dialog__content" };
7
- function y(r, N, w, o, C, O) {
8
- return l(), c(o.NmorphOverlay, {
7
+ function y(l, N, C, o, O, b) {
8
+ return r(), c(o.NmorphOverlay, {
9
9
  show: o.isVisible,
10
10
  "z-index": o.props.zIndex,
11
11
  "close-on-escape": o.props.closeOnEscape,
@@ -13,16 +13,16 @@ function y(r, N, w, o, C, O) {
13
13
  onOnOutsideClick: o.clickOnOverlay,
14
14
  onOnEscapeKeydown: o.closeHandler
15
15
  }, {
16
- default: i(() => [
16
+ default: a(() => [
17
17
  e("div", {
18
18
  class: t(o.modifiers),
19
- style: d({ "--nmorph-dialog-width": o.props.width }),
19
+ style: d(o.dialogStyle),
20
20
  role: "dialog",
21
21
  "aria-modal": "true",
22
22
  "aria-label": o.props.title || void 0
23
23
  }, [
24
24
  e("div", g, [
25
- a(r.$slots, "header", {}, () => [
25
+ i(l.$slots, "header", {}, () => [
26
26
  e(
27
27
  "div",
28
28
  v,
@@ -30,23 +30,23 @@ function y(r, N, w, o, C, O) {
30
30
  1
31
31
  /* TEXT */
32
32
  ),
33
- o.props.showClose ? (l(), p("div", {
33
+ o.props.showClose ? (r(), _("div", {
34
34
  key: 0,
35
35
  class: "nmorph-dialog__close-icon",
36
36
  onClick: o.closeHandler
37
37
  }, [
38
38
  n(o.NmorphIcon, null, {
39
- default: i(() => [
39
+ default: a(() => [
40
40
  n(o.NmorphIconCross)
41
41
  ]),
42
42
  _: 1
43
43
  /* STABLE */
44
44
  })
45
- ])) : _("v-if", !0)
45
+ ])) : p("v-if", !0)
46
46
  ])
47
47
  ]),
48
48
  e("div", k, [
49
- a(r.$slots, "default")
49
+ i(l.$slots, "default")
50
50
  ])
51
51
  ], 14, f)
52
52
  ]),
@@ -54,7 +54,7 @@ function y(r, N, w, o, C, O) {
54
54
  /* FORWARDED */
55
55
  }, 8, ["show", "z-index", "close-on-escape"]);
56
56
  }
57
- const V = /* @__PURE__ */ h(s, [["render", y], ["__file", "/builds/ketjo/nmorph/library/src/components/feedback/nmorph-dialog/NmorphDialog.vue"]]);
57
+ const S = /* @__PURE__ */ h(s, [["render", y], ["__file", "/builds/ketjo/nmorph/library/src/components/feedback/nmorph-dialog/NmorphDialog.vue"]]);
58
58
  export {
59
- V as default
59
+ S as default
60
60
  };
@@ -1,15 +1,16 @@
1
1
  import './NmorphDialog.css';
2
- import { defineComponent as f, computed as c, ref as d, watch as y } from "vue";
3
- import { useModifiers as O } from "../../../utils/create-modifiers.js";
2
+ import { defineComponent as c, computed as s, ref as y, watch as h } from "vue";
3
+ import { useModifiers as g } from "../../../utils/create-modifiers.js";
4
4
  import v from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
- import T from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
- import h from "../../../assets/icons/cross.svg.js";
7
- const C = /* @__PURE__ */ f({
5
+ import O from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
+ import T from "../../../assets/icons/cross.svg.js";
7
+ const C = /* @__PURE__ */ c({
8
8
  __name: "NmorphDialog",
9
9
  props: {
10
10
  modelValue: { type: Boolean, required: !1, default: !1 },
11
11
  title: { type: String, required: !1, default: "" },
12
12
  width: { type: String, required: !1, default: "330px" },
13
+ maxHeight: { type: String, required: !1, default: void 0 },
13
14
  openDelay: { type: Number, required: !1, default: 0 },
14
15
  closeDelay: { type: Number, required: !1, default: 0 },
15
16
  closeOnClickModal: { type: Boolean, required: !1, default: !0 },
@@ -19,49 +20,52 @@ const C = /* @__PURE__ */ f({
19
20
  closeOnEscape: { type: Boolean, required: !1, default: !0 }
20
21
  },
21
22
  emits: ["on-close", "update:model-value"],
22
- setup(i, { expose: n, emit: m }) {
23
- n();
24
- const e = i, r = m, p = c(
25
- () => O({
23
+ setup(n, { expose: m, emit: d }) {
24
+ m();
25
+ const e = n, r = d, p = s(
26
+ () => g({
26
27
  "nmorph-dialog": []
27
28
  })
28
- ), u = d(e.modelValue);
29
- let t = null, l = null;
30
- y(
29
+ ), f = s(() => ({
30
+ "--nmorph-dialog-width": e.width,
31
+ ...e.maxHeight && { "--nmorph-dialog-max-height": e.maxHeight }
32
+ })), a = y(e.modelValue);
33
+ let o = null, l = null;
34
+ h(
31
35
  () => e.modelValue,
32
- (o) => {
33
- o ? (l && clearTimeout(l), t = setTimeout(() => {
34
- u.value = !0;
35
- }, e.openDelay)) : (t && clearTimeout(t), l = setTimeout(() => {
36
- u.value = !1;
36
+ (t) => {
37
+ t ? (l && clearTimeout(l), o = setTimeout(() => {
38
+ a.value = !0;
39
+ }, e.openDelay)) : (o && clearTimeout(o), l = setTimeout(() => {
40
+ a.value = !1;
37
41
  }, e.closeDelay));
38
42
  },
39
43
  { immediate: !0 }
40
44
  );
41
- const a = () => {
42
- r("on-close"), t && clearTimeout(t);
43
- const o = () => {
45
+ const i = () => {
46
+ r("on-close"), o && clearTimeout(o);
47
+ const t = () => {
44
48
  r("update:model-value", !1);
45
49
  };
46
- e.closeDelay <= 0 ? o() : l = setTimeout(o, e.closeDelay);
47
- }, s = { props: e, emit: r, modifiers: p, isVisible: u, get openTimeout() {
48
- return t;
49
- }, set openTimeout(o) {
50
- t = o;
50
+ e.closeDelay <= 0 ? t() : l = setTimeout(t, e.closeDelay);
51
+ }, u = { props: e, emit: r, modifiers: p, dialogStyle: f, isVisible: a, get openTimeout() {
52
+ return o;
53
+ }, set openTimeout(t) {
54
+ o = t;
51
55
  }, get closeTimeout() {
52
56
  return l;
53
- }, set closeTimeout(o) {
54
- l = o;
55
- }, closeHandler: a, clickOnOverlay: () => {
56
- e.closeOnOverlay && a();
57
+ }, set closeTimeout(t) {
58
+ l = t;
59
+ }, closeHandler: i, clickOnOverlay: () => {
60
+ e.closeOnOverlay && i();
57
61
  }, get NmorphOverlay() {
58
- return T;
62
+ return O;
59
63
  }, get NmorphIcon() {
60
64
  return v;
61
65
  }, get NmorphIconCross() {
62
- return h;
66
+ return T;
63
67
  } };
64
- return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
68
+ return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
65
69
  }
66
70
  });
67
71
  export {
@@ -1 +1 @@
1
- .nmorph-autocomplete .nmorph-autocomplete__list-item{padding:var(--indentation-02) var(--indentation-04);cursor:pointer}.nmorph-autocomplete .nmorph-autocomplete__list-item:last-child{border-bottom-right-radius:var(--indentation-02);border-bottom-left-radius:var(--indentation-02)}.nmorph-autocomplete .nmorph-autocomplete__loading{display:flex;justify-content:center;align-items:center;height:100px}.nmorph-autocomplete .nmorph-autocomplete__list-item:hover,.nmorph-autocomplete .nmorph-autocomplete__list-item--focused{color:var(--nmorph-white-color);background:var(--nmorph-accent-color)}.nmorph-autocomplete .nmorph-autocomplete__list--virtual{overflow-y:auto}.nmorph-autocomplete .nmorph-autocomplete__list--virtual .nmorph-autocomplete__list-item{height:var(--autocomplete-virtual-item-height);overflow:hidden}.nmorph-autocomplete .nmorph-autocomplete__list--dynamic .nmorph-autocomplete__list-item{height:auto}.nmorph-autocomplete .nmorph-autocomplete__virtual-spacer{position:relative}.nmorph-autocomplete .nmorph-autocomplete__virtual-content{position:absolute;top:0;right:0;left:0}
1
+ .nmorph-autocomplete .nmorph-autocomplete__input-content{position:relative}.nmorph-autocomplete.nmorph-autocomplete--open .nmorph-autocomplete__input-content{z-index:var(--nmorph-autocomplete-input-z-index)}.nmorph-autocomplete__list{padding:var(--indentation-01) 0}.nmorph-autocomplete__list-item{box-sizing:border-box;padding:var(--indentation-00) var(--default-indentation-input);cursor:pointer}.nmorph-autocomplete__loading{display:flex;justify-content:center;align-items:center;height:100px}.nmorph-autocomplete__list-item:hover,.nmorph-autocomplete__list-item--focused{color:var(--nmorph-white-color);background:var(--nmorph-accent-color)}.nmorph-autocomplete__list--virtual{overflow-y:auto}.nmorph-autocomplete__list--virtual .nmorph-autocomplete__list-item{height:var(--autocomplete-virtual-item-height);overflow:hidden}.nmorph-autocomplete__list--dynamic .nmorph-autocomplete__list-item{height:auto}.nmorph-autocomplete__virtual-spacer{position:relative}.nmorph-autocomplete__virtual-content{position:absolute;top:0;right:0;left:0}
@@ -1,6 +1,6 @@
1
1
  import './NmorphAutocomplete.css';
2
2
  import v from "./NmorphAutocomplete.vue2.js";
3
- import { openBlock as l, createElementBlock as t, normalizeClass as i, createElementVNode as n, createVNode as d, createBlock as y, withCtx as p, renderSlot as c, normalizeStyle as m, Fragment as _, renderList as h, createTextVNode as f, toDisplayString as u, createCommentVNode as x } from "vue";
3
+ import { openBlock as l, createElementBlock as t, normalizeStyle as n, normalizeClass as a, createElementVNode as i, createVNode as c, createBlock as y, withCtx as p, renderSlot as m, Fragment as _, renderList as h, createTextVNode as f, toDisplayString as u, createCommentVNode as x } from "vue";
4
4
  /* empty css */
5
5
  import k from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const b = { class: "nmorph-autocomplete__input-content" }, g = {
@@ -10,19 +10,20 @@ const b = { class: "nmorph-autocomplete__input-content" }, g = {
10
10
  key: 0,
11
11
  class: "nmorph-autocomplete__loading"
12
12
  }, N = ["id"], C = ["id", "aria-selected", "onClick"], I = ["id"], O = ["id", "aria-selected", "onClick"];
13
- function V(a, s, S, e, z, A) {
13
+ function V(d, s, w, e, S, A) {
14
14
  return l(), t(
15
15
  "div",
16
16
  {
17
- class: i(e.modifiers)
17
+ class: a(e.modifiers),
18
+ style: n(e.styles)
18
19
  },
19
20
  [
20
- n("div", b, [
21
- n(
21
+ i("div", b, [
22
+ i(
22
23
  "div",
23
24
  g,
24
25
  [
25
- d(e.NmorphTextInput, {
26
+ c(e.NmorphTextInput, {
26
27
  id: e.props.id,
27
28
  name: e.props.name,
28
29
  autocomplete: e.props.autocomplete,
@@ -46,17 +47,19 @@ function V(a, s, S, e, z, A) {
46
47
  open: e.open,
47
48
  "relative-element": e.nmorphAutocompleteDOMRef,
48
49
  "y-offset": 1,
49
- "z-index": e.props.zIndex,
50
+ "z-index": e.dropdownZIndex,
51
+ "restore-focus": !1,
52
+ "content-class": "nmorph-autocomplete__dropdown",
50
53
  "aria-label": e.props.name || e.props.id || "autocomplete",
51
54
  onOnOutsideClick: e.closeHandler,
52
55
  onOnEscapeKeydown: e.closeHandler
53
56
  }, {
54
57
  default: p(() => [
55
58
  e.loader ? (l(), t("div", H, [
56
- c(a.$slots, "loader", {}, () => [
57
- d(e.NmorphIcon, { size: "large" }, {
59
+ m(d.$slots, "loader", {}, () => [
60
+ c(e.NmorphIcon, { size: "large" }, {
58
61
  default: p(() => [
59
- d(e.NmorphIconLoader)
62
+ c(e.NmorphIconLoader)
60
63
  ]),
61
64
  _: 1
62
65
  /* STABLE */
@@ -66,23 +69,23 @@ function V(a, s, S, e, z, A) {
66
69
  key: 1,
67
70
  id: e.listboxId,
68
71
  ref: e.virtualList.containerRef,
69
- class: i(["nmorph-autocomplete__list nmorph-autocomplete__list--virtual", { "nmorph-autocomplete__list--dynamic": e.virtualDynamicHeight }]),
70
- style: m({ "--autocomplete-virtual-item-height": `${e.virtualItemHeight}px`, maxHeight: e.virtualMaxHeight }),
72
+ class: a(["nmorph-autocomplete__list nmorph-autocomplete__list--virtual", { "nmorph-autocomplete__list--dynamic": e.virtualDynamicHeight }]),
73
+ style: n({ "--autocomplete-virtual-item-height": `${e.virtualItemHeight}px`, maxHeight: e.virtualMaxHeight }),
71
74
  role: "listbox",
72
75
  onScroll: s[0] || (s[0] = (...o) => e.virtualList.scrollHandler && e.virtualList.scrollHandler(...o))
73
76
  }, [
74
- n(
77
+ i(
75
78
  "div",
76
79
  {
77
80
  class: "nmorph-autocomplete__virtual-spacer",
78
- style: m(e.virtualSpacerStyle)
81
+ style: n(e.virtualSpacerStyle)
79
82
  },
80
83
  [
81
- n(
84
+ i(
82
85
  "div",
83
86
  {
84
87
  class: "nmorph-autocomplete__virtual-content",
85
- style: m(e.virtualContentStyle)
88
+ style: n(e.virtualContentStyle)
86
89
  },
87
90
  [
88
91
  (l(!0), t(
@@ -93,12 +96,12 @@ function V(a, s, S, e, z, A) {
93
96
  ref_for: !0,
94
97
  ref: (r) => e.setVirtualItemRef(r, o.index),
95
98
  key: o.index,
96
- class: i(["nmorph-autocomplete__list-item", { "nmorph-autocomplete__list-item--focused": o.index === e.currentIndex }]),
99
+ class: a(["nmorph-autocomplete__list-item", { "nmorph-autocomplete__list-item--focused": o.index === e.currentIndex }]),
97
100
  role: "option",
98
101
  "aria-selected": o.index === e.currentIndex,
99
102
  onClick: () => e.clickHandler(o.item)
100
103
  }, [
101
- c(a.$slots, "default", {
104
+ m(d.$slots, "default", {
102
105
  scope: o.item
103
106
  }, () => [
104
107
  f(
@@ -131,12 +134,12 @@ function V(a, s, S, e, z, A) {
131
134
  h(e.filteredList, (o, r) => (l(), t("div", {
132
135
  id: e.getOptionId(r),
133
136
  key: r,
134
- class: i(["nmorph-autocomplete__list-item", { "nmorph-autocomplete__list-item--focused": r === e.currentIndex }]),
137
+ class: a(["nmorph-autocomplete__list-item", { "nmorph-autocomplete__list-item--focused": r === e.currentIndex }]),
135
138
  role: "option",
136
139
  "aria-selected": r === e.currentIndex,
137
140
  onClick: () => e.clickHandler(o)
138
141
  }, [
139
- c(a.$slots, "default", { scope: o }, () => [
142
+ m(d.$slots, "default", { scope: o }, () => [
140
143
  f(
141
144
  u(o.value),
142
145
  1
@@ -153,8 +156,8 @@ function V(a, s, S, e, z, A) {
153
156
  /* FORWARDED */
154
157
  }, 8, ["open", "relative-element", "z-index", "aria-label"])) : x("v-if", !0)
155
158
  ],
156
- 2
157
- /* CLASS */
159
+ 6
160
+ /* CLASS, STYLE */
158
161
  );
159
162
  }
160
163
  const M = /* @__PURE__ */ k(v, [["render", V], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue"]]);