@nmorph/nmorph-ui-kit 2.2.33 → 2.2.35

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 (36) hide show
  1. package/dist/assets/icons/pin.svg.js +21 -0
  2. package/dist/components/basic/nmorph-icon/NmorphIcons.js +551 -0
  3. package/dist/components/basic/nmorph-link/NmorphLink.vue.js +33 -21
  4. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +21 -16
  5. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +22 -28
  6. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  7. package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -1
  8. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  9. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +20 -17
  10. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +63 -54
  11. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +34 -30
  12. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +94 -62
  13. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +52 -52
  14. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +24 -21
  15. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  16. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +40 -31
  17. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +45 -41
  18. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +20 -25
  19. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +25 -21
  20. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.js +11 -10
  21. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue2.js +10 -9
  22. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.css +1 -1
  23. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +13 -12
  24. package/dist/hooks/use-common-styles.js +2 -1
  25. package/dist/icons.js +209 -207
  26. package/dist/index.es.js +331 -329
  27. package/dist/index.umd.js +31 -30
  28. package/dist/package.json.js +1 -1
  29. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +1 -0
  30. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -0
  31. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +2 -2
  32. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +0 -1
  33. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +2 -0
  34. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -0
  35. package/dist/style.css +1 -1
  36. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import './NmorphTimePicker.css';
2
2
  import b from "./NmorphTimePicker.vue2.js";
3
- import { openBlock as i, createElementBlock as n, normalizeStyle as v, normalizeClass as r, createElementVNode as l, withKeys as m, withModifiers as t, createVNode as c, withCtx as p, toDisplayString as d, createCommentVNode as _, createBlock as u, Fragment as s, renderList as h } from "vue";
3
+ import { openBlock as i, createElementBlock as n, normalizeStyle as v, normalizeClass as l, createElementVNode as r, withKeys as m, withModifiers as t, createVNode as d, withCtx as p, toDisplayString as c, createCommentVNode as _, createBlock as f, Fragment as s, renderList as h } from "vue";
4
4
  /* empty css */
5
- import f from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const y = ["aria-expanded", "aria-controls", "tabindex", "onKeydown"], w = ["id", "name", "autocomplete", "step", "value", "disabled"], x = { class: "nmorph-time-picker__selected-value" }, C = ["id"], O = {
5
+ import u from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const y = ["aria-expanded", "aria-controls", "tabindex", "onKeydown"], w = ["id", "name", "autocomplete", "step", "value", "disabled"], x = { class: "nmorph-time-picker__selected-value" }, C = ["id"], g = {
7
7
  class: "nmorph-time-picker__column",
8
8
  role: "listbox",
9
9
  "aria-label": "Hours"
10
- }, N = ["disabled", "onClick"], g = {
10
+ }, O = ["disabled", "onClick"], H = {
11
11
  class: "nmorph-time-picker__column",
12
12
  role: "listbox",
13
13
  "aria-label": "Minutes"
14
- }, H = ["disabled", "onClick"], V = {
14
+ }, N = ["disabled", "onClick"], M = {
15
15
  class: "nmorph-time-picker__column",
16
16
  role: "listbox",
17
17
  "aria-label": "Seconds"
18
- }, I = ["disabled", "onClick"];
19
- function S(z, a, B, e, D, M) {
18
+ }, V = ["disabled", "onClick"];
19
+ function I(S, a, z, e, B, D) {
20
20
  return i(), n(
21
21
  "div",
22
22
  {
23
- class: r(e.modifiers),
23
+ class: l(e.modifiers),
24
24
  style: v(e.styles)
25
25
  },
26
26
  [
27
- l("div", {
27
+ r("div", {
28
28
  ref: "inputDOMRef",
29
29
  class: "nmorph-time-picker__input",
30
30
  role: "combobox",
@@ -40,7 +40,7 @@ function S(z, a, B, e, D, M) {
40
40
  m(t(e.closeHandler, ["prevent"]), ["escape"])
41
41
  ]
42
42
  }, [
43
- l("input", {
43
+ r("input", {
44
44
  id: e.id,
45
45
  class: "nmorph-time-picker__native",
46
46
  name: e.name,
@@ -51,17 +51,17 @@ function S(z, a, B, e, D, M) {
51
51
  disabled: e.props.disabled,
52
52
  onInput: e.nativeInputHandler
53
53
  }, null, 40, w),
54
- c(e.NmorphIcon, { class: "nmorph-time-picker__clock-icon" }, {
54
+ d(e.NmorphIcon, { class: "nmorph-time-picker__clock-icon" }, {
55
55
  default: p(() => [
56
- c(e.NmorphIconClock)
56
+ d(e.NmorphIconClock)
57
57
  ]),
58
58
  _: 1
59
59
  /* STABLE */
60
60
  }),
61
- l(
61
+ r(
62
62
  "div",
63
63
  x,
64
- d(e.displayValue),
64
+ c(e.displayValue),
65
65
  1
66
66
  /* TEXT */
67
67
  ),
@@ -72,19 +72,19 @@ function S(z, a, B, e, D, M) {
72
72
  "aria-label": "Clear time",
73
73
  onClick: t(e.clearHandler, ["stop"])
74
74
  }, [
75
- c(e.NmorphIcon, {
75
+ d(e.NmorphIcon, {
76
76
  width: "14px",
77
77
  height: "14px"
78
78
  }, {
79
79
  default: p(() => [
80
- c(e.NmorphIconCircleClose)
80
+ d(e.NmorphIconCircleClose)
81
81
  ]),
82
82
  _: 1
83
83
  /* STABLE */
84
84
  })
85
85
  ])) : _("v-if", !0)
86
86
  ], 40, y),
87
- e.inputDOMRef && !e.props.disabled ? (i(), u(e.NmorphDropdown, {
87
+ e.inputDOMRef && !e.props.disabled ? (i(), f(e.NmorphDropdown, {
88
88
  key: 0,
89
89
  open: e.open,
90
90
  "relative-element": e.inputDOMRef,
@@ -96,43 +96,49 @@ function S(z, a, B, e, D, M) {
96
96
  onOnEscapeKeydown: e.closeHandler
97
97
  }, {
98
98
  default: p(() => [
99
- l("div", {
99
+ r("div", {
100
100
  id: `${e.id}-dropdown`,
101
- class: r(["nmorph-time-picker__panel", { "nmorph-time-picker__panel--with-seconds": e.props.showSeconds }])
101
+ class: l(["nmorph-time-picker__panel", { "nmorph-time-picker__panel--with-seconds": e.props.showSeconds }])
102
102
  }, [
103
- l("div", O, [
103
+ r("div", g, [
104
104
  (i(!0), n(
105
105
  s,
106
106
  null,
107
107
  h(e.hourOptions, (o) => (i(), n("button", {
108
108
  key: o.value,
109
109
  type: "button",
110
- class: r(["nmorph-time-picker__option", { "nmorph-time-picker__option--active": o.value === e.pickerValue.hour }]),
110
+ class: l(["nmorph-time-picker__option", [
111
+ e.optionHeightModifiers,
112
+ { "nmorph-time-picker__option--active": o.value === e.pickerValue.hour }
113
+ ]]),
111
114
  disabled: o.disabled,
112
115
  onClick: (k) => e.selectUnit("hour", o.value)
113
- }, d(o.label), 11, N))),
116
+ }, c(o.label), 11, O))),
114
117
  128
115
118
  /* KEYED_FRAGMENT */
116
119
  ))
117
120
  ]),
118
- a[1] || (a[1] = l(
121
+ a[1] || (a[1] = r(
119
122
  "div",
120
123
  { class: "nmorph-time-picker__separator" },
121
124
  ":",
122
125
  -1
123
126
  /* CACHED */
124
127
  )),
125
- l("div", g, [
128
+ r("div", H, [
126
129
  (i(!0), n(
127
130
  s,
128
131
  null,
129
132
  h(e.minuteOptions, (o) => (i(), n("button", {
130
133
  key: o.value,
131
134
  type: "button",
132
- class: r(["nmorph-time-picker__option", { "nmorph-time-picker__option--active": o.value === e.pickerValue.minute }]),
135
+ class: l(["nmorph-time-picker__option", [
136
+ e.optionHeightModifiers,
137
+ { "nmorph-time-picker__option--active": o.value === e.pickerValue.minute }
138
+ ]]),
133
139
  disabled: o.disabled,
134
140
  onClick: (k) => e.selectUnit("minute", o.value)
135
- }, d(o.label), 11, H))),
141
+ }, c(o.label), 11, N))),
136
142
  128
137
143
  /* KEYED_FRAGMENT */
138
144
  ))
@@ -141,24 +147,27 @@ function S(z, a, B, e, D, M) {
141
147
  s,
142
148
  { key: 0 },
143
149
  [
144
- a[0] || (a[0] = l(
150
+ a[0] || (a[0] = r(
145
151
  "div",
146
152
  { class: "nmorph-time-picker__separator" },
147
153
  ":",
148
154
  -1
149
155
  /* CACHED */
150
156
  )),
151
- l("div", V, [
157
+ r("div", M, [
152
158
  (i(!0), n(
153
159
  s,
154
160
  null,
155
161
  h(e.secondOptions, (o) => (i(), n("button", {
156
162
  key: o.value,
157
163
  type: "button",
158
- class: r(["nmorph-time-picker__option", { "nmorph-time-picker__option--active": o.value === e.pickerValue.second }]),
164
+ class: l(["nmorph-time-picker__option", [
165
+ e.optionHeightModifiers,
166
+ { "nmorph-time-picker__option--active": o.value === e.pickerValue.second }
167
+ ]]),
159
168
  disabled: o.disabled,
160
169
  onClick: (k) => e.selectUnit("second", o.value)
161
- }, d(o.label), 11, I))),
170
+ }, c(o.label), 11, V))),
162
171
  128
163
172
  /* KEYED_FRAGMENT */
164
173
  ))
@@ -177,7 +186,7 @@ function S(z, a, B, e, D, M) {
177
186
  /* CLASS, STYLE */
178
187
  );
179
188
  }
180
- const F = /* @__PURE__ */ f(b, [["render", S], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-time-picker/NmorphTimePicker.vue"]]);
189
+ const F = /* @__PURE__ */ u(b, [["render", I], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-time-picker/NmorphTimePicker.vue"]]);
181
190
  export {
182
191
  F as default
183
192
  };
@@ -1,14 +1,14 @@
1
1
  import './NmorphTimePicker.css';
2
- import { defineComponent as X, ref as v, computed as l, watch as Y } from "vue";
3
- import { NmorphComponentHeight as Z } from "../../../types/index.js";
4
- import { useI18n as ee } from "vue-i18n";
5
- import { useModifiers as te } from "../../../utils/create-modifiers.js";
6
- import { useFormItemInput as oe } from "../nmorph-form/use-form-item-input.js";
7
- import re from "../../../assets/icons/clock.svg.js";
8
- import ne from "../../../assets/icons/circle-close.svg.js";
9
- import le from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
- import ue from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
11
- const be = /* @__PURE__ */ X({
2
+ import { defineComponent as ee, ref as g, computed as n, watch as te } from "vue";
3
+ import { NmorphComponentHeight as _ } from "../../../types/index.js";
4
+ import { useI18n as oe } from "vue-i18n";
5
+ import { useModifiers as $ } from "../../../utils/create-modifiers.js";
6
+ import { useFormItemInput as re } from "../nmorph-form/use-form-item-input.js";
7
+ import ne from "../../../assets/icons/clock.svg.js";
8
+ import le from "../../../assets/icons/circle-close.svg.js";
9
+ import ue from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
+ import se from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
11
+ const Se = /* @__PURE__ */ ee({
12
12
  __name: "NmorphTimePicker",
13
13
  props: {
14
14
  modelValue: { type: [String, null], required: !1, default: null },
@@ -30,18 +30,18 @@ const be = /* @__PURE__ */ X({
30
30
  tabindex: { type: Number, required: !1 }
31
31
  },
32
32
  emits: ["update:model-value", "focus", "blur"],
33
- setup(_, { expose: $, emit: O }) {
34
- const t = _, s = O, { t: T } = ee(), { id: k, name: H, autocomplete: B, tabindex: P } = oe(t), a = v(!1), c = v(!1), w = v(null), m = (e) => String(e).padStart(2, "0"), p = (e) => Math.max(1, Math.floor(Number.isFinite(e) ? e : 1)), i = (e) => {
33
+ setup(O, { expose: H, emit: k }) {
34
+ const t = O, s = k, { t: T } = oe(), { id: B, name: M, autocomplete: P, tabindex: z } = re(t), a = g(!1), c = g(!1), w = g(null), m = (e) => String(e).padStart(2, "0"), p = (e) => Math.max(1, Math.floor(Number.isFinite(e) ? e : 1)), i = (e) => {
35
35
  if (!e) return null;
36
36
  const o = e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);
37
37
  if (!o) return null;
38
38
  const r = Number(o[1]), S = Number(o[2]), d = Number(o[3] || 0);
39
39
  return r > 23 || S > 59 || d > 59 ? null : { hour: r, minute: S, second: d };
40
- }, g = (e) => {
40
+ }, v = (e) => {
41
41
  const o = `${m(e.hour)}:${m(e.minute)}`;
42
42
  return t.showSeconds ? `${o}:${m(e.second)}` : o;
43
- }, f = (e) => e.hour * 3600 + e.minute * 60 + e.second, y = l(() => i(t.minTime)), N = l(() => i(t.maxTime)), x = l(() => i(t.modelValue)), u = v(x.value || { hour: 0, minute: 0, second: 0 }), V = l(() => t.placeholder || T("pickATime"));
44
- Y(
43
+ }, f = (e) => e.hour * 3600 + e.minute * 60 + e.second, y = n(() => i(t.minTime)), N = n(() => i(t.maxTime)), x = n(() => i(t.modelValue)), u = g(x.value || { hour: 0, minute: 0, second: 0 }), V = n(() => t.placeholder || T("pickATime"));
44
+ te(
45
45
  () => t.modelValue,
46
46
  (e) => {
47
47
  const o = i(e);
@@ -53,36 +53,36 @@ const be = /* @__PURE__ */ X({
53
53
  return !!(y.value && o < f(y.value) || N.value && o > f(N.value));
54
54
  }, b = (e, o, r) => {
55
55
  const S = p(r), d = /* @__PURE__ */ new Set();
56
- for (let n = 0; n <= o; n += S) d.add(n);
57
- return d.add(u.value[e]), Array.from(d).filter((n) => n >= 0 && n <= o).sort((n, q) => n - q).map((n) => {
58
- const q = { ...u.value, [e]: n };
56
+ for (let l = 0; l <= o; l += S) d.add(l);
57
+ return d.add(u.value[e]), Array.from(d).filter((l) => l >= 0 && l <= o).sort((l, q) => l - q).map((l) => {
58
+ const q = { ...u.value, [e]: l };
59
59
  return {
60
- label: m(n),
61
- value: n,
60
+ label: m(l),
61
+ value: l,
62
62
  disabled: h(q)
63
63
  };
64
64
  });
65
- }, z = l(() => b("hour", 23, t.hourStep)), M = l(() => b("minute", 59, t.minuteStep)), D = l(() => b("second", 59, t.secondStep)), A = (e, o) => {
65
+ }, D = n(() => b("hour", 23, t.hourStep)), A = n(() => b("minute", 59, t.minuteStep)), F = n(() => b("second", 59, t.secondStep)), R = (e, o) => {
66
66
  const r = { ...u.value, [e]: o };
67
- h(r) || (u.value = r, s("update:model-value", g(r)));
68
- }, F = () => {
67
+ h(r) || (u.value = r, s("update:model-value", v(r)));
68
+ }, U = () => {
69
69
  s("update:model-value", null), a.value = !1;
70
- }, R = () => {
70
+ }, j = () => {
71
71
  a.value = !1;
72
- }, U = () => {
72
+ }, E = () => {
73
73
  t.disabled || (a.value = !a.value);
74
- }, j = () => {
74
+ }, G = () => {
75
75
  c.value = !0, s("focus");
76
- }, E = () => {
76
+ }, J = () => {
77
77
  c.value = !1, s("blur");
78
- }, G = (e) => {
78
+ }, K = (e) => {
79
79
  const o = e.target, r = i(o.value);
80
- !r || h(r) || (u.value = r, s("update:model-value", g(r)));
81
- }, J = l(() => t.modelValue || V.value), K = l(
80
+ !r || h(r) || (u.value = r, s("update:model-value", v(r)));
81
+ }, L = n(() => t.modelValue || V.value), Q = n(
82
82
  () => t.showSeconds ? p(t.secondStep) : p(t.minuteStep) * 60
83
- ), L = l(() => t.clearable && !!t.modelValue && !t.disabled), Q = l(
84
- () => te({
85
- nmorph: [Z[t.height]],
83
+ ), W = n(() => t.clearable && !!t.modelValue && !t.disabled), X = n(
84
+ () => $({
85
+ nmorph: [_[t.height]],
86
86
  "nmorph-time-picker": [
87
87
  `${t.disabled && "disabled"}`,
88
88
  `${a.value && "open"}`,
@@ -90,22 +90,26 @@ const be = /* @__PURE__ */ X({
90
90
  `${!t.modelValue && "placeholder"}`
91
91
  ]
92
92
  })
93
- ), I = (e) => typeof e == "number" ? `${e}px` : e, W = l(() => ({
93
+ ), Y = n(
94
+ () => $({
95
+ nmorph: [_[t.height]]
96
+ })
97
+ ), I = (e) => typeof e == "number" ? `${e}px` : e, Z = n(() => ({
94
98
  ...t.width !== void 0 && { "--width": I(t.width) }
95
99
  }));
96
- $({ inputDOMRef: w });
97
- const C = { props: t, emit: s, t: T, id: k, name: H, autocomplete: B, tabindex: P, open: a, focused: c, inputDOMRef: w, pad: m, normalizeStep: p, parseTime: i, formatTime: g, timeToSeconds: f, minTimeParts: y, maxTimeParts: N, modelTimeParts: x, pickerValue: u, placeholderText: V, isOutsideRange: h, getUnitOptions: b, hourOptions: z, minuteOptions: M, secondOptions: D, selectUnit: A, clearHandler: F, closeHandler: R, toggleOpen: U, focusHandler: j, blurHandler: E, nativeInputHandler: G, displayValue: J, inputStep: K, showClearButton: L, modifiers: Q, getCssSize: I, styles: W, get NmorphDropdown() {
98
- return ue;
100
+ H({ inputDOMRef: w });
101
+ const C = { props: t, emit: s, t: T, id: B, name: M, autocomplete: P, tabindex: z, open: a, focused: c, inputDOMRef: w, pad: m, normalizeStep: p, parseTime: i, formatTime: v, timeToSeconds: f, minTimeParts: y, maxTimeParts: N, modelTimeParts: x, pickerValue: u, placeholderText: V, isOutsideRange: h, getUnitOptions: b, hourOptions: D, minuteOptions: A, secondOptions: F, selectUnit: R, clearHandler: U, closeHandler: j, toggleOpen: E, focusHandler: G, blurHandler: J, nativeInputHandler: K, displayValue: L, inputStep: Q, showClearButton: W, modifiers: X, optionHeightModifiers: Y, getCssSize: I, styles: Z, get NmorphDropdown() {
102
+ return se;
99
103
  }, get NmorphIcon() {
100
- return le;
104
+ return ue;
101
105
  }, get NmorphIconCircleClose() {
102
- return ne;
106
+ return le;
103
107
  }, get NmorphIconClock() {
104
- return re;
108
+ return ne;
105
109
  } };
106
110
  return Object.defineProperty(C, "__isScriptSetup", { enumerable: !1, value: !0 }), C;
107
111
  }
108
112
  });
109
113
  export {
110
- be as default
114
+ Se as default
111
115
  };
@@ -1,21 +1,15 @@
1
1
  import './NmorphBacktop.css';
2
- import l from "./NmorphBacktop.vue2.js";
3
- import { openBlock as e, createElementBlock as a, normalizeStyle as c, createBlock as i, Teleport as d, createElementVNode as t, normalizeClass as m, withModifiers as s, renderSlot as h, createVNode as r, withCtx as p } from "vue";
2
+ import a from "./NmorphBacktop.vue2.js";
3
+ import { openBlock as e, createElementBlock as p, createBlock as c, Teleport as i, createElementVNode as t, normalizeStyle as s, normalizeClass as d, withModifiers as m, renderSlot as f, createVNode as r, withCtx as l } from "vue";
4
4
  /* empty css */
5
- import f from "../../../_virtual/_plugin-vue_export-helper.js";
6
- function _(n, b, k, o, v, x) {
7
- return e(), a(
5
+ import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const _ = { ref: "placeholderDOMEl" };
7
+ function k(n, v, y, o, b, N) {
8
+ return e(), p(
8
9
  "div",
9
- {
10
- ref: "placeholderDOMEl",
11
- style: c({
12
- "--nmorph-backtop-right": `${o.props.right}px`,
13
- "--nmorph-backtop-bottom": `${o.props.bottom}px`,
14
- "--nmorph-backtop-z-index": o.props.zIndex
15
- })
16
- },
10
+ _,
17
11
  [
18
- (e(), i(d, {
12
+ (e(), c(i, {
19
13
  to: o.props.teleportTo,
20
14
  disabled: !o.isMounted || o.props.teleportDisabled
21
15
  }, [
@@ -23,22 +17,23 @@ function _(n, b, k, o, v, x) {
23
17
  "div",
24
18
  {
25
19
  ref: "selfDOMEl",
26
- class: m(o.modifiers)
20
+ class: d(o.modifiers),
21
+ style: s(o.styles)
27
22
  },
28
23
  [
29
24
  t("div", {
30
- onClick: s(o.scrollToTopHandler, ["stop"])
25
+ onClick: m(o.scrollToTopHandler, ["stop"])
31
26
  }, [
32
- h(n.$slots, "default", {}, () => [
27
+ f(n.$slots, "default", {}, () => [
33
28
  r(o.NmorphButton, {
34
29
  "style-type": o.props.design === "nmorph" ? "default" : "transparent"
35
30
  }, {
36
- default: p(() => [
31
+ default: l(() => [
37
32
  r(o.NmorphIcon, {
38
33
  class: "nmorph-backtop__up-icon",
39
34
  color: o.props.design === "nmorph" ? void 0 : "var(--nmorph-contrast-text-color)"
40
35
  }, {
41
- default: p(() => [
36
+ default: l(() => [
42
37
  r(o.NmorphIconChevronDown)
43
38
  ]),
44
39
  _: 1
@@ -51,16 +46,16 @@ function _(n, b, k, o, v, x) {
51
46
  ])
52
47
  ])
53
48
  ],
54
- 2
55
- /* CLASS */
49
+ 6
50
+ /* CLASS, STYLE */
56
51
  )
57
52
  ], 8, ["to", "disabled"]))
58
53
  ],
59
- 4
60
- /* STYLE */
54
+ 512
55
+ /* NEED_PATCH */
61
56
  );
62
57
  }
63
- const z = /* @__PURE__ */ f(l, [["render", _], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
58
+ const E = /* @__PURE__ */ h(a, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
64
59
  export {
65
- z as default
60
+ E as default
66
61
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphBacktop.css';
2
- import { defineComponent as b, computed as g, ref as t, onMounted as y, onUnmounted as N } from "vue";
3
- import { useModifiers as _ } from "../../../utils/create-modifiers.js";
2
+ import { defineComponent as y, computed as m, ref as o, onMounted as N, onUnmounted as _ } from "vue";
3
+ import { useModifiers as k } from "../../../utils/create-modifiers.js";
4
4
  import q from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
- import E from "../../basic/nmorph-button/NmorphButton.vue.js";
6
- import T from "../../../assets/icons/chevron-down.svg.js";
7
- const k = /* @__PURE__ */ b({
5
+ import x from "../../basic/nmorph-button/NmorphButton.vue.js";
6
+ import E from "../../../assets/icons/chevron-down.svg.js";
7
+ const M = /* @__PURE__ */ y({
8
8
  __name: "NmorphBacktop",
9
9
  props: {
10
10
  right: { type: Number, required: !1, default: 40 },
@@ -16,38 +16,42 @@ const k = /* @__PURE__ */ b({
16
16
  teleportDisabled: { type: Boolean, required: !1, default: !1 }
17
17
  },
18
18
  emits: ["click"],
19
- setup(m, { expose: c, emit: f }) {
20
- c();
21
- const r = m, n = f, d = g(
22
- () => _({
23
- "nmorph-backtop": [`${o.value && "show"}`, r.design]
19
+ setup(c, { expose: d, emit: f }) {
20
+ d();
21
+ const t = c, n = f, h = m(
22
+ () => k({
23
+ "nmorph-backtop": [`${r.value && "show"}`, t.design]
24
24
  })
25
- ), e = t(null), u = t(null), i = t(null), o = t(!1), s = t(!1), l = (p) => {
25
+ ), v = m(() => ({
26
+ "--nmorph-backtop-right": `${t.right}px`,
27
+ "--nmorph-backtop-bottom": `${t.bottom}px`,
28
+ "--nmorph-backtop-z-index": t.zIndex
29
+ })), e = o(null), i = o(null), s = o(null), r = o(!1), u = o(!1), l = (p) => {
26
30
  if (!p) return;
27
- const h = p.target;
28
- o.value = h.scrollTop > r.visibilityHeight;
29
- }, v = () => {
31
+ const g = p.target;
32
+ r.value = g.scrollTop > t.visibilityHeight;
33
+ }, b = () => {
30
34
  n("click"), e.value && e.value.scrollTo({
31
35
  top: 0,
32
36
  left: 0,
33
37
  behavior: "smooth"
34
38
  });
35
39
  };
36
- y(() => {
37
- e.value = u.value?.parentElement ?? i.value?.parentElement?.parentElement ?? null, e.value?.addEventListener("scroll", l), o.value = (e.value?.scrollTop ?? 0) > r.visibilityHeight, s.value = !0;
38
- }), N(() => {
40
+ N(() => {
41
+ e.value = i.value?.parentElement ?? s.value?.parentElement?.parentElement ?? null, e.value?.addEventListener("scroll", l), r.value = (e.value?.scrollTop ?? 0) > t.visibilityHeight, u.value = !0;
42
+ }), _(() => {
39
43
  e.value && e.value?.removeEventListener("scroll", l);
40
44
  });
41
- const a = { props: r, emit: n, modifiers: d, container: e, placeholderDOMEl: u, selfDOMEl: i, showButton: o, isMounted: s, scrollHandler: l, scrollToTopHandler: v, get NmorphButton() {
42
- return E;
45
+ const a = { props: t, emit: n, modifiers: h, styles: v, container: e, placeholderDOMEl: i, selfDOMEl: s, showButton: r, isMounted: u, scrollHandler: l, scrollToTopHandler: b, get NmorphButton() {
46
+ return x;
43
47
  }, get NmorphIcon() {
44
48
  return q;
45
49
  }, get NmorphIconChevronDown() {
46
- return T;
50
+ return E;
47
51
  } };
48
52
  return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
49
53
  }
50
54
  });
51
55
  export {
52
- k as default
56
+ M as default
53
57
  };
@@ -1,13 +1,13 @@
1
1
  import './NmorphContextMenu.css';
2
2
  import s from "./NmorphContextMenu.vue2.js";
3
- import { openBlock as o, createElementBlock as l, renderSlot as i, createBlock as d, withCtx as p, Fragment as c, renderList as f, normalizeStyle as m, createElementVNode as h, toDisplayString as _, normalizeClass as y, resolveDynamicComponent as x, mergeProps as k, createCommentVNode as b } from "vue";
3
+ import { openBlock as o, createElementBlock as l, renderSlot as i, createBlock as d, withCtx as p, Fragment as c, renderList as h, normalizeStyle as m, createElementVNode as f, toDisplayString as _, normalizeClass as y, resolveDynamicComponent as x, mergeProps as k, createCommentVNode as w } from "vue";
4
4
  /* empty css */
5
- import w from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ import b from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const C = {
7
7
  key: 0,
8
8
  class: "nmorph-context-menu__options"
9
9
  }, v = ["disabled", "onClick"], O = { class: "nmorph-context-menu__item-label" }, g = ["tabindex", "aria-disabled", "onClick", "onKeydown"];
10
- function H(a, u, z, e, E, K) {
10
+ function H(a, u, z, e, E, S) {
11
11
  return o(), l(
12
12
  "div",
13
13
  {
@@ -35,6 +35,7 @@ function H(a, u, z, e, E, K) {
35
35
  "trap-focus": e.props.trapFocus,
36
36
  role: e.props.role,
37
37
  "aria-label": e.props.ariaLabel,
38
+ "hide-shadow": e.props.hideShadow,
38
39
  "content-class": "nmorph-context-menu__dropdown",
39
40
  onOnOutsideClick: e.outsideClickHandler,
40
41
  onOnEscapeKeydown: e.escapeHandler
@@ -44,7 +45,7 @@ function H(a, u, z, e, E, K) {
44
45
  (o(!0), l(
45
46
  c,
46
47
  null,
47
- f(e.normalizedOptions, (n, t) => (o(), l(
48
+ h(e.normalizedOptions, (n, r) => (o(), l(
48
49
  c,
49
50
  {
50
51
  key: n.key
@@ -57,8 +58,8 @@ function H(a, u, z, e, E, K) {
57
58
  tabindex: n.disabled ? -1 : 0,
58
59
  "aria-disabled": n.disabled,
59
60
  style: m(e.getOptionStyle(n)),
60
- onClick: (r) => e.optionClickHandler(n, t),
61
- onKeydown: (r) => e.optionKeydownHandler(r, n, t)
61
+ onClick: (t) => e.optionClickHandler(n, r),
62
+ onKeydown: (t) => e.optionKeydownHandler(t, n, r)
62
63
  }, [
63
64
  (o(), d(
64
65
  x(n.component),
@@ -74,9 +75,9 @@ function H(a, u, z, e, E, K) {
74
75
  role: "menuitem",
75
76
  disabled: n.disabled,
76
77
  style: m(e.getOptionStyle(n)),
77
- onClick: (r) => e.optionClickHandler(n, t)
78
+ onClick: (t) => e.optionClickHandler(n, r)
78
79
  }, [
79
- h(
80
+ f(
80
81
  "span",
81
82
  O,
82
83
  _(n.label),
@@ -98,13 +99,13 @@ function H(a, u, z, e, E, K) {
98
99
  ]),
99
100
  _: 3
100
101
  /* FORWARDED */
101
- }, 8, ["open", "relative-element", "placement", "width", "min-width", "max-width", "x-offset", "y-offset", "fill-width", "z-index", "close-on-escape", "trap-focus", "role", "aria-label"])) : b("v-if", !0)
102
+ }, 8, ["open", "relative-element", "placement", "width", "min-width", "max-width", "x-offset", "y-offset", "fill-width", "z-index", "close-on-escape", "trap-focus", "role", "aria-label", "hide-shadow"])) : w("v-if", !0)
102
103
  ],
103
104
  544
104
105
  /* NEED_HYDRATION, NEED_PATCH */
105
106
  );
106
107
  }
107
- const B = /* @__PURE__ */ w(s, [["render", H], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue"]]);
108
+ const B = /* @__PURE__ */ b(s, [["render", H], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue"]]);
108
109
  export {
109
110
  B as default
110
111
  };
@@ -1,5 +1,5 @@
1
1
  import './NmorphContextMenu.css';
2
- import { defineComponent as L, ref as i, computed as y, markRaw as M, toRaw as D, watch as h, onBeforeUnmount as V } from "vue";
2
+ import { defineComponent as L, ref as i, computed as y, markRaw as M, toRaw as D, watch as k, onBeforeUnmount as V } from "vue";
3
3
  import P from "../nmorph-dropdown/NmorphDropdown.vue.js";
4
4
  const $ = /* @__PURE__ */ L({
5
5
  __name: "NmorphContextMenu",
@@ -20,11 +20,12 @@ const $ = /* @__PURE__ */ L({
20
20
  disabled: { type: Boolean, required: !1, default: !1 },
21
21
  closeOnScroll: { type: Boolean, required: !1, default: !0 },
22
22
  role: { type: String, required: !1, default: "menu" },
23
- ariaLabel: { type: String, required: !1, default: "" }
23
+ ariaLabel: { type: String, required: !1, default: "" },
24
+ hideShadow: { type: Boolean, required: !1, default: !1 }
24
25
  },
25
26
  emits: ["update:model-value", "open", "close", "select", "on-outside-click", "on-escape-keydown"],
26
- setup(O, { expose: q, emit: v }) {
27
- const l = O, r = v, d = i(null), c = i(null), o = i("point"), a = i(!!l.modelValue), f = y(() => typeof l.modelValue == "boolean" ? l.modelValue : a.value), S = y(() => l.options.length > 0), B = y(
27
+ setup(q, { expose: O, emit: v }) {
28
+ const l = q, r = v, d = i(null), c = i(null), o = i("point"), a = i(!!l.modelValue), f = y(() => typeof l.modelValue == "boolean" ? l.modelValue : a.value), S = y(() => l.options.length > 0), B = y(
28
29
  () => l.options.map((e, t) => typeof e == "string" || typeof e == "number" ? {
29
30
  key: `${e}-${t}`,
30
31
  label: e,
@@ -44,7 +45,7 @@ const $ = /* @__PURE__ */ L({
44
45
  raw: e
45
46
  })
46
47
  );
47
- h(
48
+ k(
48
49
  () => l.modelValue,
49
50
  (e) => {
50
51
  typeof e == "boolean" && (a.value = e);
@@ -95,7 +96,7 @@ const $ = /* @__PURE__ */ L({
95
96
  }), s = () => {
96
97
  l.closeOnScroll && o.value === "point" && n();
97
98
  };
98
- h(
99
+ k(
99
100
  f,
100
101
  (e) => {
101
102
  typeof window > "u" || (e ? window.addEventListener("scroll", s, { passive: !0, capture: !0 }) : window.removeEventListener("scroll", s, !0));
@@ -103,9 +104,9 @@ const $ = /* @__PURE__ */ L({
103
104
  { immediate: !0 }
104
105
  ), V(() => {
105
106
  typeof window < "u" && window.removeEventListener("scroll", s, !0);
106
- }), q({ close: n });
107
- const k = { props: l, emit: r, triggerDOMRef: d, relativeElement: c, anchorType: o, openState: a, isOpen: f, hasOptions: S, normalizedOptions: B, createPointElement: g, setOpen: u, close: n, openAt: b, openAtElement: p, contextMenuHandler: C, clickHandler: E, keydownHandler: H, outsideClickHandler: _, escapeHandler: N, optionClickHandler: w, optionKeydownHandler: x, getOptionStyle: T, scrollHandler: s, NmorphDropdown: P };
108
- return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
107
+ }), O({ close: n });
108
+ const h = { props: l, emit: r, triggerDOMRef: d, relativeElement: c, anchorType: o, openState: a, isOpen: f, hasOptions: S, normalizedOptions: B, createPointElement: g, setOpen: u, close: n, openAt: b, openAtElement: p, contextMenuHandler: C, clickHandler: E, keydownHandler: H, outsideClickHandler: _, escapeHandler: N, optionClickHandler: w, optionKeydownHandler: x, getOptionStyle: T, scrollHandler: s, NmorphDropdown: P };
109
+ return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
109
110
  }
110
111
  });
111
112
  export {
@@ -1 +1 @@
1
- .nmorph-dropdown{position:fixed;width:var(--nmorph-dropdown-width);min-width:var(--nmorph-dropdown-min-width);max-width:var(--nmorph-dropdown-max-width);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-outset)}.nmorph-dropdown--closed{z-index:-1000;opacity:0}
1
+ .nmorph-dropdown{position:fixed;width:var(--nmorph-dropdown-width);min-width:var(--nmorph-dropdown-min-width);max-width:var(--nmorph-dropdown-max-width);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-outset)}.nmorph-dropdown--closed{z-index:-1000;opacity:0}.nmorph-dropdown--hide-shadow{box-shadow:none}