@nmorph/nmorph-ui-kit 2.2.16 → 2.2.18

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.
@@ -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{padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular)}.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 .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{box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;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,15 +1,14 @@
1
- import { inject as i, computed as e } from "vue";
2
- import { generateUUID as r } from "../../../utils/common.js";
3
- const d = "nmorph-form-item-input-data", p = (t) => {
4
- const o = i(d, void 0), a = r(), n = e(() => t.id || o?.id.value || a), m = e(() => t.name || o?.name.value || n.value), c = e(() => t.autocomplete || o?.autocomplete.value || void 0), u = e(() => t.tabindex ?? 0);
1
+ import { inject as d, useId as i, computed as e } from "vue";
2
+ const l = "nmorph-form-item-input-data", I = (t) => {
3
+ const o = d(l, void 0), a = `nmorph-${i()}`, n = e(() => t.id || o?.id.value || a), m = e(() => t.name || o?.name.value || n.value), u = e(() => t.autocomplete || o?.autocomplete.value || void 0), c = e(() => t.tabindex ?? 0);
5
4
  return {
6
5
  id: n,
7
6
  name: m,
8
- autocomplete: c,
9
- tabindex: u
7
+ autocomplete: u,
8
+ tabindex: c
10
9
  };
11
10
  };
12
11
  export {
13
- d as nmorphFormItemInputDataKey,
14
- p as useFormItemInput
12
+ l as nmorphFormItemInputDataKey,
13
+ I as useFormItemInput
15
14
  };
@@ -1,44 +1,45 @@
1
1
  import './NmorphSwitch.css';
2
2
  import l from "./NmorphSwitch.vue2.js";
3
- import { openBlock as r, createElementBlock as t, normalizeClass as a, createElementVNode as e, renderSlot as i, createBlock as c, withCtx as d, createVNode as s } from "vue";
3
+ import { openBlock as r, createElementBlock as t, normalizeClass as a, createElementVNode as n, renderSlot as i, createBlock as c, withCtx as d, createVNode as s } from "vue";
4
4
  /* empty css */
5
- import m from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const h = ["id", "name", "value", "disabled", "tabindex"], f = { class: "nmorph-switch-thumb" };
7
- function b(n, p, _, o, k, u) {
5
+ import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const m = ["id", "name", "value", "checked", "disabled", "tabindex"], f = { class: "nmorph-switch-thumb" };
7
+ function p(e, b, _, o, k, u) {
8
8
  return r(), t(
9
9
  "div",
10
10
  {
11
11
  class: a(o.modifiers)
12
12
  },
13
13
  [
14
- e("div", {
14
+ n("div", {
15
15
  class: "nmorph-switch__content",
16
16
  onClick: o.changeHandler
17
17
  }, [
18
- e("input", {
18
+ n("input", {
19
19
  id: o.id,
20
20
  ref: "inputDOMRef",
21
21
  name: o.name,
22
22
  type: "checkbox",
23
- value: o.initialValue,
23
+ value: o.props.activeValue,
24
+ checked: o.initialValue,
24
25
  disabled: o.props.disabled,
25
26
  tabindex: o.tabindex,
26
27
  class: "nmorph-native-input",
27
28
  onFocus: o.focusHandler,
28
29
  onBlur: o.blurHandler
29
- }, null, 40, h),
30
- e(
30
+ }, null, 40, m),
31
+ n(
31
32
  "div",
32
33
  {
33
34
  class: a(["nmorph-switch__bg-content", { "nmorph-switch__bg-content--enable": o.initialValue }])
34
35
  },
35
36
  [
36
- o.initialValue ? i(n.$slots, "bg-on", { key: 0 }) : i(n.$slots, "bg-off", { key: 1 })
37
+ o.initialValue ? i(e.$slots, "bg-on", { key: 0 }) : i(e.$slots, "bg-off", { key: 1 })
37
38
  ],
38
39
  2
39
40
  /* CLASS */
40
41
  ),
41
- e("div", f, [
42
+ n("div", f, [
42
43
  o.props.loading ? (r(), c(o.NmorphIcon, {
43
44
  key: 0,
44
45
  width: "14px",
@@ -49,7 +50,7 @@ function b(n, p, _, o, k, u) {
49
50
  ]),
50
51
  _: 1
51
52
  /* STABLE */
52
- })) : o.initialValue ? i(n.$slots, "thumb-on", { key: 1 }) : i(n.$slots, "thumb-off", { key: 2 })
53
+ })) : o.initialValue ? i(e.$slots, "thumb-on", { key: 1 }) : i(e.$slots, "thumb-off", { key: 2 })
53
54
  ])
54
55
  ])
55
56
  ],
@@ -57,7 +58,7 @@ function b(n, p, _, o, k, u) {
57
58
  /* CLASS */
58
59
  );
59
60
  }
60
- const x = /* @__PURE__ */ m(l, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-switch/NmorphSwitch.vue"]]);
61
+ const V = /* @__PURE__ */ h(l, [["render", p], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-switch/NmorphSwitch.vue"]]);
61
62
  export {
62
- x as default
63
+ V as default
63
64
  };
@@ -1 +1 @@
1
- .nmorph-context-menu{display:inline-block;max-width:100%}
1
+ .nmorph-context-menu{display:inline-block;max-width:100%}.nmorph-context-menu__dropdown{text-align:left}.nmorph-context-menu__options{display:grid;gap:4px;padding:4px}.nmorph-context-menu__item{display:flex;gap:var(--indentation-02);justify-content:flex-start;align-items:center;box-sizing:border-box;width:100%;min-width:120px;padding:var(--indentation-02) var(--indentation-04);color:var(--nmorph-context-menu-item-color, var(--nmorph-text-color));font:inherit;line-height:var(--line-height-regular);text-align:left;background:transparent;border:0;border-radius:var(--default-border-radius);cursor:pointer}.nmorph-context-menu__item-label{color:var(--nmorph-context-menu-item-color, var(--nmorph-text-color));text-align:left}.nmorph-context-menu__item:not(:disabled):not(.nmorph-context-menu__item--disabled):hover{background:color-mix(in srgb,var(--nmorph-context-menu-item-color, var(--nmorph-accent-color)) 12%,transparent)}.nmorph-context-menu__item:disabled,.nmorph-context-menu__item--disabled{cursor:default;opacity:.56;pointer-events:none}.nmorph-context-menu__dropdown .nmorph-button--transparent .nmorph-button__content{justify-content:flex-start;text-align:left}.nmorph-context-menu__dropdown .nmorph-button--transparent .nmorph-button__content span{text-align:left}.nmorph-context-menu__dropdown .nmorph-button--transparent .nmorph-button__content:not(:disabled,[loading=true]):hover{background:color-mix(in srgb,var(--nmorph-button-hover-color, var(--nmorph-accent-color)) 12%,transparent)}
@@ -1,20 +1,25 @@
1
1
  import './NmorphContextMenu.css';
2
- import t from "./NmorphContextMenu.vue2.js";
3
- import { openBlock as n, createElementBlock as l, renderSlot as r, createBlock as i, withCtx as a, createCommentVNode as c } from "vue";
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";
4
4
  /* empty css */
5
- import p from "../../../_virtual/_plugin-vue_export-helper.js";
6
- function d(o, m, f, e, s, h) {
7
- return n(), l(
5
+ import w from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const C = {
7
+ key: 0,
8
+ class: "nmorph-context-menu__options"
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) {
11
+ return o(), l(
8
12
  "div",
9
13
  {
10
14
  ref: "triggerDOMRef",
11
15
  class: "nmorph-context-menu",
16
+ onClick: e.clickHandler,
12
17
  onContextmenu: e.contextMenuHandler,
13
18
  onKeydown: e.keydownHandler
14
19
  },
15
20
  [
16
- r(o.$slots, "default"),
17
- e.relativeElement ? (n(), i(e.NmorphDropdown, {
21
+ i(a.$slots, "default"),
22
+ e.relativeElement ? (o(), d(e.NmorphDropdown, {
18
23
  key: 0,
19
24
  open: e.isOpen,
20
25
  "relative-element": e.relativeElement,
@@ -30,21 +35,76 @@ function d(o, m, f, e, s, h) {
30
35
  "trap-focus": e.props.trapFocus,
31
36
  role: e.props.role,
32
37
  "aria-label": e.props.ariaLabel,
38
+ "content-class": "nmorph-context-menu__dropdown",
33
39
  onOnOutsideClick: e.outsideClickHandler,
34
40
  onOnEscapeKeydown: e.escapeHandler
35
41
  }, {
36
- default: a(() => [
37
- r(o.$slots, "menu", { close: e.close })
42
+ default: p(() => [
43
+ e.hasOptions ? (o(), l("div", C, [
44
+ (o(!0), l(
45
+ c,
46
+ null,
47
+ f(e.normalizedOptions, (n, t) => (o(), l(
48
+ c,
49
+ {
50
+ key: n.key
51
+ },
52
+ [
53
+ n.component ? (o(), l("div", {
54
+ key: 1,
55
+ class: y(["nmorph-context-menu__item", { "nmorph-context-menu__item--disabled": n.disabled }]),
56
+ role: "menuitem",
57
+ tabindex: n.disabled ? -1 : 0,
58
+ "aria-disabled": n.disabled,
59
+ style: m(e.getOptionStyle(n)),
60
+ onClick: (r) => e.optionClickHandler(n, t),
61
+ onKeydown: (r) => e.optionKeydownHandler(r, n, t)
62
+ }, [
63
+ (o(), d(
64
+ x(n.component),
65
+ k({ ref_for: !0 }, n.componentProps),
66
+ null,
67
+ 16
68
+ /* FULL_PROPS */
69
+ ))
70
+ ], 46, g)) : (o(), l("button", {
71
+ key: 0,
72
+ type: "button",
73
+ class: "nmorph-context-menu__item",
74
+ role: "menuitem",
75
+ disabled: n.disabled,
76
+ style: m(e.getOptionStyle(n)),
77
+ onClick: (r) => e.optionClickHandler(n, t)
78
+ }, [
79
+ h(
80
+ "span",
81
+ O,
82
+ _(n.label),
83
+ 1
84
+ /* TEXT */
85
+ )
86
+ ], 12, v))
87
+ ],
88
+ 64
89
+ /* STABLE_FRAGMENT */
90
+ ))),
91
+ 128
92
+ /* KEYED_FRAGMENT */
93
+ ))
94
+ ])) : i(a.$slots, "menu", {
95
+ key: 1,
96
+ close: e.close
97
+ })
38
98
  ]),
39
99
  _: 3
40
100
  /* FORWARDED */
41
- }, 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"])) : c("v-if", !0)
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)
42
102
  ],
43
103
  544
44
104
  /* NEED_HYDRATION, NEED_PATCH */
45
105
  );
46
106
  }
47
- const v = /* @__PURE__ */ p(t, [["render", d], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue"]]);
107
+ const B = /* @__PURE__ */ w(s, [["render", H], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue"]]);
48
108
  export {
49
- v as default
109
+ B as default
50
110
  };
@@ -1,12 +1,14 @@
1
1
  import './NmorphContextMenu.css';
2
- import { defineComponent as O, ref as i, computed as S, watch as k } from "vue";
3
- import w from "../nmorph-dropdown/NmorphDropdown.vue.js";
4
- const C = /* @__PURE__ */ O({
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";
3
+ import P from "../nmorph-dropdown/NmorphDropdown.vue.js";
4
+ const $ = /* @__PURE__ */ L({
5
5
  __name: "NmorphContextMenu",
6
6
  props: {
7
- modelValue: { type: Boolean, required: !1 },
7
+ modelValue: { type: [Boolean, null], required: !1, default: null },
8
+ options: { type: Array, required: !1, default: () => [] },
9
+ trigger: { type: String, required: !1, default: "contextmenu" },
8
10
  placement: { type: null, required: !1, default: "bottom-start" },
9
- width: { type: [Number, String], required: !1, default: 160 },
11
+ width: { type: [Number, String], required: !1, default: "max-content" },
10
12
  minWidth: { type: [Number, String], required: !1, default: void 0 },
11
13
  maxWidth: { type: [Number, String], required: !1, default: void 0 },
12
14
  xOffset: { type: Number, required: !1, default: 0 },
@@ -16,19 +18,39 @@ const C = /* @__PURE__ */ O({
16
18
  closeOnEscape: { type: Boolean, required: !1, default: !0 },
17
19
  trapFocus: { type: Boolean, required: !1, default: !1 },
18
20
  disabled: { type: Boolean, required: !1, default: !1 },
21
+ closeOnScroll: { type: Boolean, required: !1, default: !0 },
19
22
  role: { type: String, required: !1, default: "menu" },
20
23
  ariaLabel: { type: String, required: !1, default: "" }
21
24
  },
22
- emits: ["update:model-value", "open", "close", "on-outside-click", "on-escape-keydown"],
23
- setup(y, { expose: b, emit: g }) {
24
- const l = y, o = g, s = i(null), f = i(null), n = i(!!l.modelValue), p = S(() => typeof l.modelValue == "boolean" ? l.modelValue : n.value);
25
- k(
25
+ 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(
28
+ () => l.options.map((e, t) => typeof e == "string" || typeof e == "number" ? {
29
+ key: `${e}-${t}`,
30
+ label: e,
31
+ value: e,
32
+ disabled: !1,
33
+ closeOnClick: !0,
34
+ raw: e
35
+ } : {
36
+ key: `${String(e.value ?? e.label ?? t)}-${t}`,
37
+ label: e.label,
38
+ value: e.value ?? e.label ?? t,
39
+ component: e.component ? M(D(e.component)) : void 0,
40
+ componentProps: e.componentProps,
41
+ disabled: !!e.disabled,
42
+ color: e.color,
43
+ closeOnClick: e.closeOnClick ?? !0,
44
+ raw: e
45
+ })
46
+ );
47
+ h(
26
48
  () => l.modelValue,
27
49
  (e) => {
28
- typeof e == "boolean" && (n.value = e);
50
+ typeof e == "boolean" && (a.value = e);
29
51
  }
30
52
  );
31
- const c = (e, t) => ({
53
+ const g = (e, t) => ({
32
54
  clientWidth: 0,
33
55
  getBoundingClientRect: () => ({
34
56
  x: e,
@@ -42,28 +64,50 @@ const C = /* @__PURE__ */ O({
42
64
  toJSON: () => ({})
43
65
  })
44
66
  }), u = (e) => {
45
- const t = p.value;
46
- n.value = e, o("update:model-value", e), t && !e && o("close");
47
- }, r = () => {
67
+ const t = f.value;
68
+ a.value = e, r("update:model-value", e), t && !e && r("close");
69
+ }, n = () => {
48
70
  u(!1);
49
- }, d = (e, t, a) => {
50
- f.value = c(e, t), u(!0), o("open", a);
51
- }, q = (e) => {
52
- l.disabled || (e.preventDefault(), d(e.clientX, e.clientY, e));
53
- }, h = (e) => {
71
+ }, b = (e, t, m) => {
72
+ o.value = "point", c.value = g(e, t), u(!0), r("open", m);
73
+ }, p = (e, t) => {
74
+ o.value = "element", c.value = e, u(!0), r("open", t);
75
+ }, C = (e) => {
76
+ l.disabled || l.trigger !== "contextmenu" && l.trigger !== "both" || (e.preventDefault(), b(e.clientX, e.clientY, e));
77
+ }, E = (e) => {
78
+ if (l.disabled || l.trigger !== "click" && l.trigger !== "both" || e.button !== 0) return;
79
+ const t = e.currentTarget instanceof HTMLElement ? e.currentTarget : d.value;
80
+ t && p(t, e);
81
+ }, H = (e) => {
54
82
  if (l.disabled || e.key !== "ContextMenu" && !(e.shiftKey && e.key === "F10")) return;
55
- const a = (e.target instanceof HTMLElement ? e.target : s.value)?.getBoundingClientRect();
56
- a && (e.preventDefault(), d(a.left, a.bottom, e));
83
+ const t = e.target instanceof HTMLElement ? e.target : d.value;
84
+ t && (e.preventDefault(), p(t, e));
57
85
  }, _ = () => {
58
- o("on-outside-click"), r();
86
+ r("on-outside-click"), n();
59
87
  }, N = () => {
60
- o("on-escape-keydown"), r();
88
+ r("on-escape-keydown"), n();
89
+ }, w = (e, t) => {
90
+ e.disabled || (r("select", e.raw, t), e.closeOnClick && n());
91
+ }, x = (e, t, m) => {
92
+ e.key !== "Enter" && e.key !== " " || (e.preventDefault(), w(t, m));
93
+ }, T = (e) => ({
94
+ "--nmorph-context-menu-item-color": e.color
95
+ }), s = () => {
96
+ l.closeOnScroll && o.value === "point" && n();
61
97
  };
62
- b({ close: r });
63
- const m = { props: l, emit: o, triggerDOMRef: s, relativeElement: f, openState: n, isOpen: p, createPointElement: c, setOpen: u, close: r, openAt: d, contextMenuHandler: q, keydownHandler: h, outsideClickHandler: _, escapeHandler: N, NmorphDropdown: w };
64
- return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
98
+ h(
99
+ f,
100
+ (e) => {
101
+ typeof window > "u" || (e ? window.addEventListener("scroll", s, { passive: !0, capture: !0 }) : window.removeEventListener("scroll", s, !0));
102
+ },
103
+ { immediate: !0 }
104
+ ), V(() => {
105
+ 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;
65
109
  }
66
110
  });
67
111
  export {
68
- C as default
112
+ $ as default
69
113
  };
@@ -1,6 +1,6 @@
1
1
  import './NmorphDropdown.css';
2
2
  import n from "./NmorphDropdown.vue2.js";
3
- import { openBlock as r, createBlock as a, withCtx as l, createElementBlock as p, normalizeStyle as s, normalizeClass as i, renderSlot as c, createCommentVNode as d } from "vue";
3
+ import { openBlock as r, createBlock as a, withCtx as l, createElementBlock as p, normalizeStyle as s, normalizeClass as c, renderSlot as i, createCommentVNode as d } from "vue";
4
4
  /* empty css */
5
5
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const m = ["role", "aria-label"];
@@ -18,19 +18,19 @@ function f(e, _, h, o, w, k) {
18
18
  o.props.open ? (r(), p("div", {
19
19
  key: 0,
20
20
  ref: "dropdownDOMRef",
21
- class: i(o.modifiers),
21
+ class: c([o.modifiers, o.props.contentClass]),
22
22
  style: s(o.dropdownStyle),
23
23
  role: o.props.role || void 0,
24
24
  "aria-label": o.props.ariaLabel || void 0
25
25
  }, [
26
- c(e.$slots, "default")
26
+ i(e.$slots, "default")
27
27
  ], 14, m)) : d("v-if", !0)
28
28
  ]),
29
29
  _: 3
30
30
  /* FORWARDED */
31
31
  }, 8, ["show", "z-index", "close-on-escape", "trap-focus"]);
32
32
  }
33
- const b = /* @__PURE__ */ t(n, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue"]]);
33
+ const O = /* @__PURE__ */ t(n, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue"]]);
34
34
  export {
35
- b as default
35
+ O as default
36
36
  };
@@ -1,6 +1,6 @@
1
1
  import './NmorphDropdown.css';
2
- import { defineComponent as w, ref as b, toRef as r, computed as i, watch as v } from "vue";
3
- import { useModifiers as q } from "../../../utils/create-modifiers.js";
2
+ import { defineComponent as w, ref as b, toRef as r, computed as i, watch as q } from "vue";
3
+ import { useModifiers as v } from "../../../utils/create-modifiers.js";
4
4
  import { usePlacement as x } from "../../../hooks/use-placement.js";
5
5
  import O from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
6
  const k = /* @__PURE__ */ w({
@@ -19,7 +19,8 @@ const k = /* @__PURE__ */ w({
19
19
  closeOnEscape: { type: Boolean, required: !1, default: !0 },
20
20
  trapFocus: { type: Boolean, required: !1, default: !1 },
21
21
  role: { type: String, required: !1, default: "listbox" },
22
- ariaLabel: { type: String, required: !1, default: "" }
22
+ ariaLabel: { type: String, required: !1, default: "" },
23
+ contentClass: { type: String, required: !1, default: "" }
23
24
  },
24
25
  emits: ["on-outside-click", "on-escape-keydown"],
25
26
  setup(f, { expose: m, emit: c }) {
@@ -32,7 +33,7 @@ const k = /* @__PURE__ */ w({
32
33
  xOffset: r(e, "xOffset"),
33
34
  enabled: r(e, "open")
34
35
  }), y = i(
35
- () => q({
36
+ () => v({
36
37
  "nmorph-dropdown": [`${!e.open && "closed"}`]
37
38
  })
38
39
  ), o = (t) => typeof t == "number" ? `${t}px` : t, p = i(
@@ -45,7 +46,7 @@ const k = /* @__PURE__ */ w({
45
46
  top: l.value.y,
46
47
  visibility: e.open && a.value ? "visible" : "hidden"
47
48
  }));
48
- v(
49
+ q(
49
50
  () => e.open,
50
51
  (t) => {
51
52
  t && s();