@nmorph/nmorph-ui-kit 3.0.15 → 3.0.17

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 (88) hide show
  1. package/dist/components/basic/nmorph-layout/NmorphLayout.vue.js +32 -29
  2. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +13 -11
  3. package/dist/components/basic/nmorph-space/NmorphSpace.vue.js +18 -15
  4. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +19 -17
  5. package/dist/components/basic/nmorph-text/NmorphText.vue.js +24 -15
  6. package/dist/components/basic/nmorph-text/NmorphText.vue2.js +24 -14
  7. package/dist/components/data/nmorph-card/NmorphCard.vue.js +36 -33
  8. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +22 -20
  9. package/dist/components/data/nmorph-preview-portal/NmorphPreviewPortal.vue.js +23 -26
  10. package/dist/components/data/nmorph-preview-portal/NmorphPreviewPortal.vue2.js +21 -19
  11. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +40 -43
  12. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue2.js +55 -54
  13. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +37 -34
  14. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +22 -14
  15. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +21 -23
  16. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +32 -30
  17. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +16 -18
  18. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +32 -30
  19. package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue.js +37 -39
  20. package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue2.js +26 -21
  21. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +13 -14
  22. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +34 -29
  23. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue.js +24 -29
  24. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +38 -36
  25. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +29 -32
  26. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +47 -45
  27. package/dist/hooks/use-common-styles.js +16 -4
  28. package/dist/index.umd.js +39 -27
  29. package/dist/outside-hooks/use-nmorph-theme.js +1 -1
  30. package/dist/package.json.js +1 -1
  31. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +6 -6
  32. package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +1 -1
  33. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +7 -1
  34. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +3 -3
  35. package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +3 -3
  36. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +3 -3
  37. package/dist/src/components/basic/nmorph-text/NmorphText.vue.d.ts +7 -3
  38. package/dist/src/components/basic/nmorph-text/types.d.ts +4 -0
  39. package/dist/src/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.d.ts +4 -4
  40. package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +1 -1
  41. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +4 -4
  42. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +1 -1
  43. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +6 -2
  44. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
  45. package/dist/src/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.d.ts +2 -2
  46. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +1 -1
  47. package/dist/src/components/data/nmorph-file-card/NmorphFileCard.vue.d.ts +4 -4
  48. package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +1 -1
  49. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
  50. package/dist/src/components/data/nmorph-preview-portal/NmorphPreviewPortal.vue.d.ts +2 -2
  51. package/dist/src/components/data/nmorph-tag-list/NmorphTagList.vue.d.ts +1 -1
  52. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
  53. package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +4 -4
  54. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -1
  55. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +7 -3
  56. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -1
  57. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +6 -2
  58. package/dist/src/components/feedback/nmorph-guide/NmorphGuide.vue.d.ts +2 -2
  59. package/dist/src/components/feedback/nmorph-guide/NmorphGuideStep.vue.d.ts +2 -2
  60. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +2 -2
  61. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
  62. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
  63. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +1 -1
  64. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +3 -3
  65. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  66. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
  67. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +3 -3
  68. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
  69. package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue.d.ts +1 -1
  70. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +9 -9
  71. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +1 -1
  72. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  73. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
  74. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
  75. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  76. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -3
  77. package/dist/src/components/navigation/nmorph-stepper/NmorphStepper.vue.d.ts +1 -1
  78. package/dist/src/components/navigation/nmorph-tabs/NmorphTabs.vue.d.ts +1 -1
  79. package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue.d.ts +1 -1
  80. package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +1 -1
  81. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +1 -1
  82. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -2
  83. package/dist/src/types/common.types.d.ts +1 -0
  84. package/dist/src/utils/attrs.d.ts +5 -0
  85. package/dist/src/utils/index.d.ts +1 -0
  86. package/dist/types/common.types.js +1 -0
  87. package/dist/utils/attrs.js +15 -0
  88. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  import './NmorphDialog.css';
2
2
  import c from "./NmorphDialog.vue2.js";
3
- import { openBlock as e, createBlock as d, withCtx as a, createElementVNode as l, normalizeStyle as m, normalizeClass as p, createElementBlock as i, renderSlot as n, toDisplayString as _, createVNode as s, createCommentVNode as t } from "vue";
3
+ import { openBlock as e, createBlock as d, withCtx as a, createElementVNode as r, mergeProps as p, createElementBlock as i, renderSlot as n, toDisplayString as m, createVNode as t, createCommentVNode as s } from "vue";
4
4
  /* empty css */
5
- import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const f = ["aria-label"], g = {
5
+ import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const h = ["aria-label"], f = {
7
7
  key: 0,
8
8
  class: "nmorph-dialog__header"
9
- }, y = { class: "nmorph-dialog__title" }, k = ["aria-label"], v = { class: "nmorph-dialog__content" };
10
- function C(r, b, N, o, w, x) {
9
+ }, g = { class: "nmorph-dialog__title" }, k = ["aria-label"], v = { class: "nmorph-dialog__content" };
10
+ function b(l, C, y, o, N, w) {
11
11
  return e(), d(o.NmorphOverlay, {
12
12
  show: o.isVisible,
13
13
  "z-index": o.props.zIndex,
@@ -17,19 +17,17 @@ function C(r, b, N, o, w, x) {
17
17
  onOnEscapeKeydown: o.closeHandler
18
18
  }, {
19
19
  default: a(() => [
20
- l("div", {
21
- class: p(o.modifiers),
22
- style: m(o.dialogStyle),
20
+ r("div", p(o.rootAttrs, {
23
21
  role: "dialog",
24
22
  "aria-modal": "true",
25
23
  "aria-label": o.props.title || void 0
26
- }, [
27
- o.hasHeader ? (e(), i("div", g, [
28
- n(r.$slots, "header", {}, () => [
29
- l(
24
+ }), [
25
+ o.hasHeader ? (e(), i("div", f, [
26
+ n(l.$slots, "header", {}, () => [
27
+ r(
30
28
  "div",
31
- y,
32
- _(o.props.title),
29
+ g,
30
+ m(o.props.title),
33
31
  1
34
32
  /* TEXT */
35
33
  ),
@@ -40,26 +38,26 @@ function C(r, b, N, o, w, x) {
40
38
  "aria-label": o.props.title ? `Close ${o.props.title}` : "Close dialog",
41
39
  onClick: o.closeHandler
42
40
  }, [
43
- s(o.NmorphIcon, null, {
41
+ t(o.NmorphIcon, null, {
44
42
  default: a(() => [
45
- s(o.NmorphIconCross)
43
+ t(o.NmorphIconCross)
46
44
  ]),
47
45
  _: 1
48
46
  /* STABLE */
49
47
  })
50
- ], 8, k)) : t("v-if", !0)
48
+ ], 8, k)) : s("v-if", !0)
51
49
  ])
52
- ])) : t("v-if", !0),
53
- l("div", v, [
54
- n(r.$slots, "default")
50
+ ])) : s("v-if", !0),
51
+ r("div", v, [
52
+ n(l.$slots, "default")
55
53
  ])
56
- ], 14, f)
54
+ ], 16, h)
57
55
  ]),
58
56
  _: 3
59
57
  /* FORWARDED */
60
58
  }, 8, ["show", "z-index", "close-on-escape"]);
61
59
  }
62
- const S = /* @__PURE__ */ h(c, [["render", C], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-dialog/NmorphDialog.vue"]]);
60
+ const V = /* @__PURE__ */ _(c, [["render", b], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-dialog/NmorphDialog.vue"]]);
63
61
  export {
64
- S as default
62
+ V as default
65
63
  };
@@ -1,10 +1,12 @@
1
1
  import './NmorphDialog.css';
2
- import { defineComponent as y, useSlots as g, computed as i, ref as v, watch as x } from "vue";
3
- import { useModifiers as T } from "../../../utils/create-modifiers.js";
4
- import q from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
- import N from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
- import _ from "../../../assets/icons/cross.svg.js";
7
- const b = /* @__PURE__ */ y({
2
+ import { defineComponent as g, useSlots as v, computed as i, ref as x, watch as T } from "vue";
3
+ import { useModifiers as q } from "../../../utils/create-modifiers.js";
4
+ import { useMergedAttrs as N } from "../../../utils/attrs.js";
5
+ import _ from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
+ import C from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
7
+ import O from "../../../assets/icons/cross.svg.js";
8
+ const V = /* @__PURE__ */ g({
9
+ inheritAttrs: !1,
8
10
  __name: "NmorphDialog",
9
11
  props: {
10
12
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -20,55 +22,55 @@ const b = /* @__PURE__ */ y({
20
22
  closeOnEscape: { type: Boolean, required: !1, default: !0 }
21
23
  },
22
24
  emits: ["on-close", "update:model-value"],
23
- setup(n, { expose: d, emit: p }) {
24
- d();
25
- const e = n, r = p, s = g(), f = i(
26
- () => T({
25
+ setup(p, { expose: f, emit: c }) {
26
+ f();
27
+ const e = p, l = c, s = v(), u = i(
28
+ () => q({
27
29
  "nmorph-dialog": []
28
30
  })
29
- ), c = i(() => ({
31
+ ), m = i(() => ({
30
32
  "--nmorph-private-dialog-width": e.width,
31
33
  ...e.maxWidth && { "--nmorph-private-dialog-max-width": e.maxWidth },
32
34
  ...e.maxHeight && { "--nmorph-private-dialog-max-height": e.maxHeight }
33
- })), h = i(() => !!(s.header || e.title || e.showClose)), a = v(e.modelValue);
34
- let o = null, l = null;
35
- x(
35
+ })), h = N(u, m), y = i(() => !!(s.header || e.title || e.showClose)), a = x(e.modelValue);
36
+ let o = null, r = null;
37
+ T(
36
38
  () => e.modelValue,
37
39
  (t) => {
38
- t ? (l && clearTimeout(l), o = setTimeout(() => {
40
+ t ? (r && clearTimeout(r), o = setTimeout(() => {
39
41
  a.value = !0;
40
- }, e.openDelay)) : (o && clearTimeout(o), l = setTimeout(() => {
42
+ }, e.openDelay)) : (o && clearTimeout(o), r = setTimeout(() => {
41
43
  a.value = !1;
42
44
  }, e.closeDelay));
43
45
  },
44
46
  { immediate: !0 }
45
47
  );
46
- const u = () => {
47
- r("on-close"), o && clearTimeout(o);
48
+ const n = () => {
49
+ l("on-close"), o && clearTimeout(o);
48
50
  const t = () => {
49
- r("update:model-value", !1);
51
+ l("update:model-value", !1);
50
52
  };
51
- e.closeDelay <= 0 ? t() : l = setTimeout(t, e.closeDelay);
52
- }, m = { props: e, emit: r, slots: s, modifiers: f, dialogStyle: c, hasHeader: h, isVisible: a, get openTimeout() {
53
+ e.closeDelay <= 0 ? t() : r = setTimeout(t, e.closeDelay);
54
+ }, d = { props: e, emit: l, slots: s, modifiers: u, dialogStyle: m, rootAttrs: h, hasHeader: y, isVisible: a, get openTimeout() {
53
55
  return o;
54
56
  }, set openTimeout(t) {
55
57
  o = t;
56
58
  }, get closeTimeout() {
57
- return l;
59
+ return r;
58
60
  }, set closeTimeout(t) {
59
- l = t;
60
- }, closeHandler: u, overlayClickHandler: () => {
61
- e.closeOnOverlay && u();
61
+ r = t;
62
+ }, closeHandler: n, overlayClickHandler: () => {
63
+ e.closeOnOverlay && n();
62
64
  }, get NmorphOverlay() {
63
- return N;
65
+ return C;
64
66
  }, get NmorphIcon() {
65
- return q;
66
- }, get NmorphIconCross() {
67
67
  return _;
68
+ }, get NmorphIconCross() {
69
+ return O;
68
70
  } };
69
- return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
71
+ return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
70
72
  }
71
73
  });
72
74
  export {
73
- b as default
75
+ V as default
74
76
  };
@@ -1,17 +1,17 @@
1
1
  import './NmorphDrawer.css';
2
- import c from "./NmorphDrawer.vue2.js";
3
- import { openBlock as e, createBlock as p, withCtx as n, createElementVNode as l, normalizeStyle as m, normalizeClass as i, createElementBlock as a, renderSlot as t, toDisplayString as _, createVNode as d, createCommentVNode as s } from "vue";
2
+ import d from "./NmorphDrawer.vue2.js";
3
+ import { openBlock as e, createBlock as c, withCtx as n, createElementVNode as l, mergeProps as p, createElementBlock as a, renderSlot as t, toDisplayString as m, createVNode as i, createCommentVNode as s, normalizeClass as _ } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const f = ["aria-label"], w = {
7
7
  key: 0,
8
8
  class: "nmorph-drawer__header"
9
- }, b = { class: "nmorph-drawer__title" }, y = ["aria-label"], k = {
9
+ }, b = { class: "nmorph-drawer__title" }, k = ["aria-label"], v = {
10
10
  key: 1,
11
11
  class: "nmorph-drawer__footer"
12
12
  };
13
- function v(r, C, N, o, z, O) {
14
- return e(), p(o.NmorphOverlay, {
13
+ function C(r, y, N, o, O, x) {
14
+ return e(), c(o.NmorphOverlay, {
15
15
  show: o.isVisible,
16
16
  "z-index": o.props.zIndex,
17
17
  "teleport-to": o.props.teleportTo,
@@ -22,19 +22,17 @@ function v(r, C, N, o, z, O) {
22
22
  onOnEscapeKeydown: o.closeHandler
23
23
  }, {
24
24
  default: n(() => [
25
- l("aside", {
26
- class: i(o.modifiers),
27
- style: m(o.drawerStyle),
25
+ l("aside", p(o.rootAttrs, {
28
26
  role: "dialog",
29
27
  "aria-modal": "true",
30
28
  "aria-label": o.props.title || void 0
31
- }, [
29
+ }), [
32
30
  o.hasHeader ? (e(), a("div", w, [
33
31
  t(r.$slots, "header", {}, () => [
34
32
  l(
35
33
  "div",
36
34
  b,
37
- _(o.props.title),
35
+ m(o.props.title),
38
36
  1
39
37
  /* TEXT */
40
38
  ),
@@ -45,20 +43,20 @@ function v(r, C, N, o, z, O) {
45
43
  "aria-label": o.props.title ? `Close ${o.props.title}` : "Close drawer",
46
44
  onClick: o.closeHandler
47
45
  }, [
48
- d(o.NmorphIcon, null, {
46
+ i(o.NmorphIcon, null, {
49
47
  default: n(() => [
50
- d(o.NmorphIconCross)
48
+ i(o.NmorphIconCross)
51
49
  ]),
52
50
  _: 1
53
51
  /* STABLE */
54
52
  })
55
- ], 8, y)) : s("v-if", !0)
53
+ ], 8, k)) : s("v-if", !0)
56
54
  ])
57
55
  ])) : s("v-if", !0),
58
56
  l(
59
57
  "div",
60
58
  {
61
- class: i(["nmorph-drawer__content", o.props.contentClass])
59
+ class: _(["nmorph-drawer__content", o.props.contentClass])
62
60
  },
63
61
  [
64
62
  t(r.$slots, "default")
@@ -66,16 +64,16 @@ function v(r, C, N, o, z, O) {
66
64
  2
67
65
  /* CLASS */
68
66
  ),
69
- o.slots.footer ? (e(), a("div", k, [
67
+ o.slots.footer ? (e(), a("div", v, [
70
68
  t(r.$slots, "footer")
71
69
  ])) : s("v-if", !0)
72
- ], 14, f)
70
+ ], 16, f)
73
71
  ]),
74
72
  _: 3
75
73
  /* FORWARDED */
76
74
  }, 8, ["show", "z-index", "teleport-to", "disabled-teleport", "close-on-escape"]);
77
75
  }
78
- const V = /* @__PURE__ */ h(c, [["render", v], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-drawer/NmorphDrawer.vue"]]);
76
+ const g = /* @__PURE__ */ h(d, [["render", C], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-drawer/NmorphDrawer.vue"]]);
79
77
  export {
80
- V as default
78
+ g as default
81
79
  };
@@ -1,11 +1,13 @@
1
1
  import './NmorphDrawer.css';
2
- import { defineComponent as C, useSlots as N, ref as y, computed as i, watch as S, onBeforeUnmount as b, nextTick as B } from "vue";
3
- import { useModifiers as A } from "../../../utils/create-modifiers.js";
4
- import { createCssSizeVariables as F } from "../../../utils/common.js";
5
- import V from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
- import x from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
- import z from "../../../assets/icons/cross.svg.js";
8
- const v = 220, M = /* @__PURE__ */ C({
2
+ import { defineComponent as C, useSlots as N, ref as h, computed as i, watch as S, onBeforeUnmount as b, nextTick as B } from "vue";
3
+ import { useModifiers as F } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as V } from "../../../utils/common.js";
5
+ import { useMergedAttrs as x } from "../../../utils/attrs.js";
6
+ import z from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
7
+ import I from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
+ import D from "../../../assets/icons/cross.svg.js";
9
+ const w = 220, G = /* @__PURE__ */ C({
10
+ inheritAttrs: !1,
9
11
  __name: "NmorphDrawer",
10
12
  props: {
11
13
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -21,27 +23,27 @@ const v = 220, M = /* @__PURE__ */ C({
21
23
  contentClass: { type: String, required: !1, default: "" }
22
24
  },
23
25
  emits: ["on-close", "update:model-value"],
24
- setup(h, { expose: w, emit: q }) {
25
- w();
26
- const e = h, u = q, m = N(), n = y(e.modelValue), o = y(e.modelValue);
26
+ setup(q, { expose: g, emit: O }) {
27
+ g();
28
+ const e = q, u = O, m = N(), n = h(e.modelValue), o = h(e.modelValue);
27
29
  let r = null, t = null;
28
- const g = i(
29
- () => A({
30
+ const d = i(
31
+ () => F({
30
32
  "nmorph-drawer": [e.placement, o.value && "open"]
31
33
  })
32
- ), O = i(
33
- () => F({
34
+ ), p = i(
35
+ () => V({
34
36
  "--nmorph-private-drawer-size": e.size
35
37
  })
36
- ), d = () => {
38
+ ), T = x(d, p), f = () => {
37
39
  u("on-close"), u("update:model-value", !1);
38
- }, T = () => {
39
- e.closeOnOverlay && d();
40
- }, _ = i(() => !!(m.header || e.title || e.showClose)), a = () => {
40
+ }, _ = () => {
41
+ e.closeOnOverlay && f();
42
+ }, A = i(() => !!(m.header || e.title || e.showClose)), a = () => {
41
43
  r === null || typeof window > "u" || (cancelAnimationFrame(r), r = null);
42
44
  }, s = () => {
43
45
  t !== null && (clearTimeout(t), t = null);
44
- }, p = async () => {
46
+ }, c = async () => {
45
47
  if (s(), n.value = !0, typeof window > "u") {
46
48
  o.value = !0;
47
49
  return;
@@ -49,25 +51,25 @@ const v = 220, M = /* @__PURE__ */ C({
49
51
  await B(), a(), r = requestAnimationFrame(() => {
50
52
  o.value = !0, r = null;
51
53
  });
52
- }, f = () => {
54
+ }, y = () => {
53
55
  a(), o.value = !1, n.value && (s(), t = setTimeout(() => {
54
56
  n.value = !1, t = null;
55
- }, v));
57
+ }, w));
56
58
  };
57
59
  S(
58
60
  () => e.modelValue,
59
61
  (l) => {
60
62
  if (l) {
61
- p();
63
+ c();
62
64
  return;
63
65
  }
64
- f();
66
+ y();
65
67
  },
66
68
  { immediate: !0 }
67
69
  ), b(() => {
68
70
  a(), s();
69
71
  });
70
- const c = { props: e, emit: u, slots: m, drawerTransitionDuration: v, isVisible: n, isOpen: o, get openAnimationFrame() {
72
+ const v = { props: e, emit: u, slots: m, drawerTransitionDuration: w, isVisible: n, isOpen: o, get openAnimationFrame() {
71
73
  return r;
72
74
  }, set openAnimationFrame(l) {
73
75
  r = l;
@@ -75,16 +77,16 @@ const v = 220, M = /* @__PURE__ */ C({
75
77
  return t;
76
78
  }, set closeTimeout(l) {
77
79
  t = l;
78
- }, modifiers: g, drawerStyle: O, closeHandler: d, overlayClickHandler: T, hasHeader: _, clearOpenAnimationFrame: a, clearCloseTimeout: s, openDrawer: p, closeDrawer: f, get NmorphIcon() {
79
- return x;
80
+ }, modifiers: d, drawerStyle: p, rootAttrs: T, closeHandler: f, overlayClickHandler: _, hasHeader: A, clearOpenAnimationFrame: a, clearCloseTimeout: s, openDrawer: c, closeDrawer: y, get NmorphIcon() {
81
+ return I;
80
82
  }, get NmorphIconCross() {
81
- return z;
83
+ return D;
82
84
  }, get NmorphOverlay() {
83
- return V;
85
+ return z;
84
86
  } };
85
- return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
87
+ return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
86
88
  }
87
89
  });
88
90
  export {
89
- M as default
91
+ G as default
90
92
  };
@@ -1,27 +1,25 @@
1
1
  import './NmorphGuideStep.css';
2
- import p from "./NmorphGuideStep.vue2.js";
3
- import { openBlock as t, createBlock as s, normalizeStyle as m, normalizeClass as h, withCtx as a, renderSlot as c, normalizeProps as _, mergeProps as u, createElementBlock as i, createCommentVNode as o, createElementVNode as d, toDisplayString as l, createVNode as g } from "vue";
2
+ import m from "./NmorphGuideStep.vue2.js";
3
+ import { openBlock as o, createBlock as a, mergeProps as s, withCtx as c, renderSlot as g, normalizeProps as h, createElementBlock as i, createCommentVNode as t, createElementVNode as d, toDisplayString as l, createVNode as p } from "vue";
4
4
  /* empty css */
5
- import v from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const x = {
5
+ import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const u = {
7
7
  key: 1,
8
8
  class: "nmorph-guide-step__card",
9
9
  role: "dialog",
10
10
  "aria-live": "polite"
11
- }, S = ["src", "alt"], f = { class: "nmorph-guide-step__body" }, k = {
11
+ }, v = ["src", "alt"], x = { class: "nmorph-guide-step__body" }, S = {
12
12
  key: 0,
13
13
  class: "nmorph-guide-step__progress"
14
- }, b = {
14
+ }, f = {
15
15
  key: 1,
16
16
  class: "nmorph-guide-step__title"
17
- }, y = {
17
+ }, k = {
18
18
  key: 2,
19
19
  class: "nmorph-guide-step__text"
20
- }, w = { class: "nmorph-guide-step__actions" };
21
- function C(n, r, N, e, P, T) {
22
- return t(), s(e.NmorphTooltip, {
23
- class: h(["nmorph-guide-step", e.isActive && "nmorph-guide-step--active"]),
24
- style: m(e.styles),
20
+ }, b = { class: "nmorph-guide-step__actions" };
21
+ function w(n, r, y, e, C, N) {
22
+ return o(), a(e.NmorphTooltip, s(e.rootAttrs, {
25
23
  "force-show": e.isActive,
26
24
  position: e.tooltipPosition,
27
25
  "z-index": e.guide?.zIndex.value,
@@ -33,46 +31,46 @@ function C(n, r, N, e, P, T) {
33
31
  "hide-triangle": e.guide?.bordered.value,
34
32
  trigger: "manual",
35
33
  disabled: !e.guide || e.props.disabled
36
- }, {
37
- content: a(() => [
38
- e.hasCustomContent && e.stepSlotProps ? c(n.$slots, "content", _(u({ key: 0 }, e.stepSlotProps))) : e.currentStep && e.stepSlotProps ? (t(), i("div", x, [
39
- e.currentStep.imageSrc ? (t(), i("img", {
34
+ }), {
35
+ content: c(() => [
36
+ e.hasCustomContent && e.stepSlotProps ? g(n.$slots, "content", h(s({ key: 0 }, e.stepSlotProps))) : e.currentStep && e.stepSlotProps ? (o(), i("div", u, [
37
+ e.currentStep.imageSrc ? (o(), i("img", {
40
38
  key: 0,
41
39
  class: "nmorph-guide-step__image",
42
40
  src: e.currentStep.imageSrc,
43
41
  alt: e.currentStep.imageAlt || e.currentStep.title || ""
44
- }, null, 8, S)) : o("v-if", !0),
45
- d("div", f, [
46
- e.guide?.showProgress.value ? (t(), i(
42
+ }, null, 8, v)) : t("v-if", !0),
43
+ d("div", x, [
44
+ e.guide?.showProgress.value ? (o(), i(
47
45
  "div",
48
- k,
46
+ S,
49
47
  l(e.stepSlotProps.index + 1) + " / " + l(e.stepSlotProps.total),
50
48
  1
51
49
  /* TEXT */
52
- )) : o("v-if", !0),
53
- e.currentStep.title ? (t(), i(
50
+ )) : t("v-if", !0),
51
+ e.currentStep.title ? (o(), i(
54
52
  "h3",
55
- b,
53
+ f,
56
54
  l(e.currentStep.title),
57
55
  1
58
56
  /* TEXT */
59
- )) : o("v-if", !0),
60
- e.currentStep.text ? (t(), i(
57
+ )) : t("v-if", !0),
58
+ e.currentStep.text ? (o(), i(
61
59
  "p",
62
- y,
60
+ k,
63
61
  l(e.currentStep.text),
64
62
  1
65
63
  /* TEXT */
66
- )) : o("v-if", !0)
64
+ )) : t("v-if", !0)
67
65
  ]),
68
- d("div", w, [
69
- e.guide?.showClose.value ? (t(), s(e.NmorphButton, {
66
+ d("div", b, [
67
+ e.guide?.showClose.value ? (o(), a(e.NmorphButton, {
70
68
  key: 0,
71
69
  class: "nmorph-guide-step__close",
72
70
  text: e.guide.closeText.value,
73
71
  design: "plain",
74
72
  onClick: e.guide.close
75
- }, null, 8, ["text", "onClick"])) : o("v-if", !0),
73
+ }, null, 8, ["text", "onClick"])) : t("v-if", !0),
76
74
  r[1] || (r[1] = d(
77
75
  "span",
78
76
  { class: "nmorph-guide-step__spacer" },
@@ -80,30 +78,30 @@ function C(n, r, N, e, P, T) {
80
78
  -1
81
79
  /* CACHED */
82
80
  )),
83
- g(e.NmorphButton, {
81
+ p(e.NmorphButton, {
84
82
  class: "nmorph-guide-step__back",
85
83
  text: e.guide?.backText.value,
86
84
  design: "plain",
87
85
  disabled: e.isFirstStep && !e.guide?.loop.value,
88
86
  onClick: e.guide?.back
89
87
  }, null, 8, ["text", "disabled", "onClick"]),
90
- g(e.NmorphButton, {
88
+ p(e.NmorphButton, {
91
89
  class: "nmorph-guide-step__next",
92
90
  text: e.isLastStep && !e.guide?.loop.value ? e.guide?.finishText.value : e.guide?.nextText.value,
93
91
  design: "plain",
94
- onClick: r[0] || (r[0] = (z) => e.isLastStep && !e.guide?.loop.value ? e.guide?.finish() : e.guide?.next())
92
+ onClick: r[0] || (r[0] = (P) => e.isLastStep && !e.guide?.loop.value ? e.guide?.finish() : e.guide?.next())
95
93
  }, null, 8, ["text"])
96
94
  ])
97
- ])) : o("v-if", !0)
95
+ ])) : t("v-if", !0)
98
96
  ]),
99
- default: a(() => [
100
- c(n.$slots, "default")
97
+ default: c(() => [
98
+ g(n.$slots, "default")
101
99
  ]),
102
100
  _: 3
103
101
  /* FORWARDED */
104
- }, 8, ["class", "style", "force-show", "position", "z-index", "teleport-to", "disabled-teleport", "width", "max-width", "content-class", "hide-triangle", "disabled"]);
102
+ }, 16, ["force-show", "position", "z-index", "teleport-to", "disabled-teleport", "width", "max-width", "content-class", "hide-triangle", "disabled"]);
105
103
  }
106
- const G = /* @__PURE__ */ v(p, [["render", C], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-guide/NmorphGuideStep.vue"]]);
104
+ const V = /* @__PURE__ */ _(m, [["render", w], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-guide/NmorphGuideStep.vue"]]);
107
105
  export {
108
- G as default
106
+ V as default
109
107
  };
@@ -1,10 +1,12 @@
1
1
  import './NmorphGuideStep.css';
2
- import { defineComponent as b, inject as h, useSlots as y, computed as o, watch as x, onBeforeUnmount as _ } from "vue";
3
- import { createCssSizeVariables as q, createCssVariables as C } from "../../../utils/common.js";
4
- import B from "../../basic/nmorph-button/NmorphButton.vue.js";
5
- import N from "../nmorph-tooltip/NmorphTooltip.vue.js";
6
- import { nmorphGuideInjectionKey as A } from "./types.js";
7
- const F = /* @__PURE__ */ b({
2
+ import { defineComponent as b, inject as y, useSlots as x, computed as r, watch as _, onBeforeUnmount as q } from "vue";
3
+ import { createCssSizeVariables as A, createCssVariables as C } from "../../../utils/common.js";
4
+ import { useMergedAttrs as B } from "../../../utils/attrs.js";
5
+ import N from "../../basic/nmorph-button/NmorphButton.vue.js";
6
+ import O from "../nmorph-tooltip/NmorphTooltip.vue.js";
7
+ import { nmorphGuideInjectionKey as j } from "./types.js";
8
+ const V = /* @__PURE__ */ b({
9
+ inheritAttrs: !1,
8
10
  __name: "NmorphGuideStep",
9
11
  props: {
10
12
  name: { type: [String, Number], required: !0 },
@@ -16,27 +18,30 @@ const F = /* @__PURE__ */ b({
16
18
  order: { type: Number, required: !1, default: void 0 },
17
19
  disabled: { type: Boolean, required: !1, default: !1 }
18
20
  },
19
- setup(p, { expose: m }) {
20
- m();
21
- const t = p, e = h(A, null), n = y(), r = o(() => e?.activeStep.value ?? null), i = o(() => e?.activeIndex.value ?? -1), a = o(() => e?.steps.value.length ?? 0), s = o(() => i.value <= 0), l = o(() => i.value >= a.value - 1), c = o(() => !!(e?.active.value && r.value?.name === t.name)), d = o(() => r.value?.position ?? t.position), f = o(() => !!n.content), v = o(() => ({
21
+ setup(d, { expose: c }) {
22
+ c();
23
+ const t = d, e = y(j, null), a = x(), o = r(() => e?.activeStep.value ?? null), i = r(() => e?.activeIndex.value ?? -1), s = r(() => e?.steps.value.length ?? 0), n = r(() => i.value <= 0), l = r(() => i.value >= s.value - 1), u = r(() => !!(e?.active.value && o.value?.name === t.name)), f = r(() => o.value?.position ?? t.position), v = r(() => !!a.content), p = r(() => ({
22
24
  ...C({
23
25
  "--nmorph-private-guide-target-outline-color": e?.targetOutlineColor.value
24
26
  }),
25
- ...q({
27
+ ...A({
26
28
  "--nmorph-private-guide-target-outline-offset": e?.targetOutlineOffset.value
27
29
  })
28
- })), g = o(() => !e || !r.value ? null : {
29
- step: r.value,
30
+ })), g = B(
31
+ r(() => ["nmorph-guide-step", u.value && "nmorph-guide-step--active"]),
32
+ p
33
+ ), S = r(() => !e || !o.value ? null : {
34
+ step: o.value,
30
35
  index: i.value,
31
- total: a.value,
32
- isFirst: s.value,
36
+ total: s.value,
37
+ isFirst: n.value,
33
38
  isLast: l.value,
34
39
  back: e.back,
35
40
  next: e.next,
36
41
  close: e.close,
37
42
  finish: e.finish
38
43
  });
39
- x(
44
+ _(
40
45
  () => ({
41
46
  name: t.name,
42
47
  title: t.title,
@@ -47,17 +52,17 @@ const F = /* @__PURE__ */ b({
47
52
  order: t.order,
48
53
  disabled: t.disabled
49
54
  }),
50
- (S) => {
51
- e?.registerStep(S);
55
+ (h) => {
56
+ e?.registerStep(h);
52
57
  },
53
58
  { immediate: !0 }
54
- ), _(() => {
59
+ ), q(() => {
55
60
  e?.unregisterStep(t.name);
56
61
  });
57
- const u = { props: t, guide: e, slots: n, currentStep: r, currentIndex: i, totalSteps: a, isFirstStep: s, isLastStep: l, isActive: c, tooltipPosition: d, hasCustomContent: f, styles: v, stepSlotProps: g, NmorphButton: B, NmorphTooltip: N };
58
- return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
62
+ const m = { props: t, guide: e, slots: a, currentStep: o, currentIndex: i, totalSteps: s, isFirstStep: n, isLastStep: l, isActive: u, tooltipPosition: f, hasCustomContent: v, styles: p, rootAttrs: g, stepSlotProps: S, NmorphButton: N, NmorphTooltip: O };
63
+ return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
59
64
  }
60
65
  });
61
66
  export {
62
- F as default
67
+ V as default
63
68
  };