@nmorph/nmorph-ui-kit 3.0.16 → 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 (86) 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 +21 -18
  6. package/dist/components/basic/nmorph-text/NmorphText.vue2.js +22 -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 +6 -3
  38. package/dist/src/components/basic/nmorph-text/types.d.ts +3 -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/utils/attrs.d.ts +5 -0
  84. package/dist/src/utils/index.d.ts +1 -0
  85. package/dist/utils/attrs.js +15 -0
  86. package/package.json +1 -1
@@ -1,11 +1,13 @@
1
1
  import './NmorphPreviewPortal.css';
2
- import { defineComponent as l, computed as r } from "vue";
3
- import { createCssSizeVariables as u } from "../../../utils/common.js";
4
- import d from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
5
- import m from "../../../assets/icons/chevron-down.svg.js";
6
- import f from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
- import h from "../../basic/nmorph-button/NmorphButton.vue.js";
8
- const w = /* @__PURE__ */ l({
2
+ import { defineComponent as u, computed as n } from "vue";
3
+ import { createCssSizeVariables as m } from "../../../utils/common.js";
4
+ import { useMergedAttrs as d } from "../../../utils/attrs.js";
5
+ import f from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
+ import h from "../../../assets/icons/chevron-down.svg.js";
7
+ import c from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
+ import g from "../../basic/nmorph-button/NmorphButton.vue.js";
9
+ const _ = /* @__PURE__ */ u({
10
+ inheritAttrs: !1,
9
11
  __name: "NmorphPreviewPortal",
10
12
  props: {
11
13
  show: { type: Boolean, required: !0 },
@@ -23,31 +25,31 @@ const w = /* @__PURE__ */ l({
23
25
  showActionBar: { type: Boolean, required: !1, default: !1 }
24
26
  },
25
27
  emits: ["close", "previous", "next"],
26
- setup(o, { expose: n, emit: a }) {
27
- n();
28
- const e = o, i = a, p = r(() => [
28
+ setup(a, { expose: i, emit: s }) {
29
+ i();
30
+ const e = a, p = s, t = n(() => [
29
31
  "nmorph-preview-portal",
30
32
  e.rootClass,
31
33
  e.stateClass,
32
34
  e.show && "nmorph-preview-portal--opened"
33
- ]), s = r(
34
- () => u({
35
+ ]), r = n(
36
+ () => m({
35
37
  "--nmorph-private-preview-portal-btn-margin": e.navigationButtonMargin,
36
38
  "--nmorph-private-preview-portal-content-width": e.contentWidth,
37
39
  "--nmorph-private-preview-portal-content-height": e.contentHeight
38
40
  })
39
- ), t = { props: e, emit: i, rootClasses: p, portalStyle: s, get NmorphButton() {
40
- return h;
41
+ ), l = d(t, r), o = { props: e, emit: p, rootClasses: t, portalStyle: r, rootAttrs: l, get NmorphButton() {
42
+ return g;
41
43
  }, get NmorphIcon() {
42
- return f;
44
+ return c;
43
45
  }, get NmorphIconChevronDown() {
44
- return m;
46
+ return h;
45
47
  }, get NmorphOverlay() {
46
- return d;
48
+ return f;
47
49
  } };
48
- return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
50
+ return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
49
51
  }
50
52
  });
51
53
  export {
52
- w as default
54
+ _ as default
53
55
  };
@@ -1,40 +1,37 @@
1
1
  import './NmorphVideoPreview.css';
2
2
  import s from "./NmorphVideoPreview.vue2.js";
3
- import { openBlock as r, createElementBlock as e, Fragment as t, createElementVNode as d, mergeProps as _, createCommentVNode as a, createVNode as n, withCtx as i, createBlock as l, toDisplayString as c, renderSlot as m, Teleport as v } from "vue";
3
+ import { openBlock as e, createElementBlock as r, Fragment as t, createElementVNode as d, normalizeProps as _, guardReactiveProps as m, createCommentVNode as a, createVNode as n, withCtx as i, createBlock as l, toDisplayString as c, renderSlot as v, Teleport as h } from "vue";
4
4
  /* empty css */
5
- import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const y = ["src", "poster", "controls", "muted", "playsinline", "preload"], w = ["aria-label"], f = {
5
+ import w from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const y = ["src", "poster", "controls", "muted", "playsinline", "preload"], f = ["aria-label"], k = {
7
7
  key: 2,
8
8
  class: "nmorph-video-preview__state"
9
- }, k = {
9
+ }, N = {
10
10
  key: 2,
11
11
  class: "nmorph-video-preview__error"
12
- }, N = {
12
+ }, b = {
13
13
  key: 3,
14
14
  class: "nmorph-video-preview__meta"
15
- }, b = {
15
+ }, C = {
16
16
  key: 0,
17
17
  class: "nmorph-video-preview__name"
18
- }, C = {
18
+ }, O = {
19
19
  key: 1,
20
20
  class: "nmorph-video-preview__duration"
21
- }, O = {
21
+ }, I = {
22
22
  key: 4,
23
23
  class: "nmorph-video-preview__actions"
24
- }, I = ["aria-label"], P = ["aria-label"], g = ["href", "aria-label"], H = ["href", "download", "aria-label"], L = { class: "nmorph-video-preview__portal" }, V = { class: "nmorph-video-preview__portal-content" }, T = ["src", "poster", "muted", "playsinline", "preload"];
25
- function A(p, R, S, o, z, E) {
26
- return r(), e(
24
+ }, P = ["aria-label"], g = ["aria-label"], H = ["href", "aria-label"], L = ["href", "download", "aria-label"], V = { class: "nmorph-video-preview__portal" }, R = { class: "nmorph-video-preview__portal-content" }, T = ["src", "poster", "muted", "playsinline", "preload"];
25
+ function z(p, A, E, o, S, x) {
26
+ return e(), r(
27
27
  t,
28
28
  null,
29
29
  [
30
30
  d(
31
31
  "div",
32
- _(o.rootAttrs, {
33
- class: o.rootClass,
34
- style: o.rootStyle
35
- }),
32
+ _(m(o.rootAttrs)),
36
33
  [
37
- !o.props.loading && !o.props.error ? (r(), e("video", {
34
+ !o.props.loading && !o.props.error ? (e(), r("video", {
38
35
  key: 0,
39
36
  ref: "videoRef",
40
37
  class: "nmorph-video-preview__media",
@@ -54,7 +51,7 @@ function A(p, R, S, o, z, E) {
54
51
  onEnded: o.endedHandler,
55
52
  onError: o.errorHandler
56
53
  }, null, 40, y)) : a("v-if", !0),
57
- o.showPlaybackControl ? (r(), e("button", {
54
+ o.showPlaybackControl ? (e(), r("button", {
58
55
  key: 1,
59
56
  class: "nmorph-video-preview__play",
60
57
  type: "button",
@@ -66,13 +63,13 @@ function A(p, R, S, o, z, E) {
66
63
  color: o.CONTRAST_ICON_COLOR
67
64
  }, {
68
65
  default: i(() => [
69
- o.playing ? (r(), l(o.NmorphIconPause, { key: 0 })) : (r(), l(o.NmorphIconPlay, { key: 1 }))
66
+ o.playing ? (e(), l(o.NmorphIconPause, { key: 0 })) : (e(), l(o.NmorphIconPlay, { key: 1 }))
70
67
  ]),
71
68
  _: 1
72
69
  /* STABLE */
73
70
  })
74
- ], 8, w)) : (r(), e("div", f, [
75
- o.props.loading ? (r(), l(o.NmorphIcon, {
71
+ ], 8, f)) : (e(), r("div", k, [
72
+ o.props.loading ? (e(), l(o.NmorphIcon, {
76
73
  key: 0,
77
74
  size: "large"
78
75
  }, {
@@ -81,7 +78,7 @@ function A(p, R, S, o, z, E) {
81
78
  ]),
82
79
  _: 1
83
80
  /* STABLE */
84
- })) : (r(), l(o.NmorphIcon, {
81
+ })) : (e(), l(o.NmorphIcon, {
85
82
  key: 1,
86
83
  size: "large"
87
84
  }, {
@@ -91,33 +88,33 @@ function A(p, R, S, o, z, E) {
91
88
  _: 1
92
89
  /* STABLE */
93
90
  })),
94
- o.props.error && o.props.errorText ? (r(), e(
91
+ o.props.error && o.props.errorText ? (e(), r(
95
92
  "span",
96
- k,
93
+ N,
97
94
  c(o.props.errorText),
98
95
  1
99
96
  /* TEXT */
100
97
  )) : a("v-if", !0)
101
98
  ])),
102
- o.props.showMeta && (o.props.name || o.duration) ? (r(), e("div", N, [
103
- o.props.name ? (r(), e(
99
+ o.props.showMeta && (o.props.name || o.duration) ? (e(), r("div", b, [
100
+ o.props.name ? (e(), r(
104
101
  "span",
105
- b,
102
+ C,
106
103
  c(o.props.name),
107
104
  1
108
105
  /* TEXT */
109
106
  )) : a("v-if", !0),
110
- o.duration ? (r(), e(
107
+ o.duration ? (e(), r(
111
108
  "span",
112
- C,
109
+ O,
113
110
  c(o.duration),
114
111
  1
115
112
  /* TEXT */
116
113
  )) : a("v-if", !0)
117
114
  ])) : a("v-if", !0),
118
- o.hasActions ? (r(), e("div", O, [
119
- m(p.$slots, "actions", {}, () => [
120
- o.props.showPreviewAction && o.mediaReady ? (r(), e("button", {
115
+ o.hasActions ? (e(), r("div", I, [
116
+ v(p.$slots, "actions", {}, () => [
117
+ o.props.showPreviewAction && o.mediaReady ? (e(), r("button", {
121
118
  key: 0,
122
119
  type: "button",
123
120
  class: "nmorph-video-preview__action-button nmorph-video-preview__action-button--preview",
@@ -134,8 +131,8 @@ function A(p, R, S, o, z, E) {
134
131
  _: 1
135
132
  /* STABLE */
136
133
  })
137
- ], 8, I)) : a("v-if", !0),
138
- o.showFullscreenAction ? (r(), e("button", {
134
+ ], 8, P)) : a("v-if", !0),
135
+ o.showFullscreenAction ? (e(), r("button", {
139
136
  key: 1,
140
137
  type: "button",
141
138
  class: "nmorph-video-preview__action-button nmorph-video-preview__action-button--fullscreen",
@@ -152,8 +149,8 @@ function A(p, R, S, o, z, E) {
152
149
  _: 1
153
150
  /* STABLE */
154
151
  })
155
- ], 8, P)) : a("v-if", !0),
156
- o.props.showDefaultActions && o.props.src ? (r(), e("a", {
152
+ ], 8, g)) : a("v-if", !0),
153
+ o.props.showDefaultActions && o.props.src ? (e(), r("a", {
157
154
  key: 2,
158
155
  href: o.props.src,
159
156
  target: "_blank",
@@ -169,8 +166,8 @@ function A(p, R, S, o, z, E) {
169
166
  _: 1
170
167
  /* STABLE */
171
168
  })
172
- ], 8, g)) : a("v-if", !0),
173
- o.props.downloadHref ? (r(), e("a", {
169
+ ], 8, H)) : a("v-if", !0),
170
+ o.props.downloadHref ? (e(), r("a", {
174
171
  key: 3,
175
172
  href: o.props.downloadHref,
176
173
  download: o.props.name,
@@ -185,18 +182,18 @@ function A(p, R, S, o, z, E) {
185
182
  _: 1
186
183
  /* STABLE */
187
184
  })
188
- ], 8, H)) : a("v-if", !0)
185
+ ], 8, L)) : a("v-if", !0)
189
186
  ])
190
187
  ])) : a("v-if", !0)
191
188
  ],
192
189
  16
193
190
  /* FULL_PROPS */
194
191
  ),
195
- o.previewOpen ? (r(), l(v, {
192
+ o.previewOpen ? (e(), l(h, {
196
193
  key: 0,
197
194
  to: "body"
198
195
  }, [
199
- d("div", L, [
196
+ d("div", V, [
200
197
  n(o.NmorphOverlay, {
201
198
  show: o.previewOpen,
202
199
  "disabled-teleport": "",
@@ -204,7 +201,7 @@ function A(p, R, S, o, z, E) {
204
201
  onOnEscapeKeydown: o.closePreviewHandler
205
202
  }, {
206
203
  default: i(() => [
207
- d("div", V, [
204
+ d("div", R, [
208
205
  d("video", {
209
206
  class: "nmorph-video-preview__portal-media",
210
207
  src: o.props.src,
@@ -227,7 +224,7 @@ function A(p, R, S, o, z, E) {
227
224
  /* STABLE_FRAGMENT */
228
225
  );
229
226
  }
230
- const K = /* @__PURE__ */ h(s, [["render", A], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue"]]);
227
+ const M = /* @__PURE__ */ w(s, [["render", z], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue"]]);
231
228
  export {
232
- K as default
229
+ M as default
233
230
  };
@@ -1,18 +1,19 @@
1
1
  import './NmorphVideoPreview.css';
2
- import { defineComponent as U, useAttrs as G, useSlots as J, ref as f, computed as t, watch as K } from "vue";
3
- import { useModifiers as Q } from "../../../utils/create-modifiers.js";
4
- import { createCssSizeVariables as X } from "../../../utils/common.js";
5
- import Y from "../../../assets/icons/video.svg.js";
6
- import Z from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
7
- import ee from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
- import re from "../../../assets/icons/play.svg.js";
9
- import te from "../../../assets/icons/pause.svg.js";
10
- import oe from "../../../assets/icons/loading.svg.js";
11
- import ae from "../../../assets/icons/full-screen.svg.js";
12
- import ne from "../../../assets/icons/external-link.svg.js";
13
- import le from "../../../assets/icons/eye.svg.js";
14
- import se from "../../../assets/icons/download.svg.js";
15
- const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U({
2
+ import { defineComponent as $, useSlots as j, ref as c, computed as t, watch as z } from "vue";
3
+ import { useModifiers as U } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as G } from "../../../utils/common.js";
5
+ import { useMergedAttrs as J } from "../../../utils/attrs.js";
6
+ import K from "../../../assets/icons/video.svg.js";
7
+ import Q from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
8
+ import X from "../../basic/nmorph-icon/NmorphIcon.vue.js";
9
+ import Y from "../../../assets/icons/play.svg.js";
10
+ import Z from "../../../assets/icons/pause.svg.js";
11
+ import ee from "../../../assets/icons/loading.svg.js";
12
+ import re from "../../../assets/icons/full-screen.svg.js";
13
+ import te from "../../../assets/icons/external-link.svg.js";
14
+ import oe from "../../../assets/icons/eye.svg.js";
15
+ import ae from "../../../assets/icons/download.svg.js";
16
+ const ne = "var(--nmorph-contrast-text-color)", m = 0.25, Ne = /* @__PURE__ */ $({
16
17
  inheritAttrs: !1,
17
18
  __name: "NmorphVideoPreview",
18
19
  props: {
@@ -44,15 +45,15 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
44
45
  previewMode: { type: String, required: !1, default: "internal" }
45
46
  },
46
47
  emits: ["play", "pause", "open", "preview", "fullscreen", "download", "error"],
47
- setup(P, { expose: _, emit: A }) {
48
- const e = P, n = A, u = G(), h = J(), l = f(null), p = f(!1), o = f(!1), s = f(!1), y = (r) => {
48
+ setup(B, { expose: P, emit: _ }) {
49
+ const e = B, n = _, v = j(), l = c(null), p = c(!1), o = c(!1), s = c(!1), h = (r) => {
49
50
  if (!r || r < 0) return "";
50
- const a = Math.round(r / 1e3), i = Math.floor(a / 60), m = a % 60;
51
- return `${i}:${m.toString().padStart(2, "0")}`;
52
- }, H = t(() => y(e.durationMs)), d = t(() => !!e.src && !e.loading && !e.error), O = t(() => e.showPlaybackButton && d.value && s.value), E = t(
51
+ const a = Math.round(r / 1e3), i = Math.floor(a / 60), f = a % 60;
52
+ return `${i}:${f.toString().padStart(2, "0")}`;
53
+ }, A = t(() => h(e.durationMs)), u = t(() => !!e.src && !e.loading && !e.error), H = t(() => e.showPlaybackButton && u.value && s.value), F = t(
53
54
  () => e.showPlaybackButton && e.preload === "metadata" ? "auto" : e.preload
54
- ), w = t(() => e.showFullscreenAction && d.value && !e.controls), g = t(() => d.value && (e.showPreviewAction || w.value)), N = t(() => e.showDefaultActions && (e.src || e.downloadHref)), q = t(() => !!h.actions || g.value || N.value), S = t(
55
- () => Q({
55
+ ), y = t(() => e.showFullscreenAction && u.value && !e.controls), w = t(() => u.value && (e.showPreviewAction || y.value)), g = t(() => e.showDefaultActions && (e.src || e.downloadHref)), N = t(() => !!v.actions || w.value || g.value), q = t(
56
+ () => U({
56
57
  "nmorph-video-preview": [
57
58
  e.surface,
58
59
  e.embedded && "embedded",
@@ -62,28 +63,28 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
62
63
  e.loading && "loading",
63
64
  e.error && "error",
64
65
  o.value && "playing",
65
- !q.value && "no-actions"
66
+ !N.value && "no-actions"
66
67
  ]
67
68
  })
68
- ), b = t(
69
- () => X({
69
+ ), S = t(
70
+ () => G({
70
71
  "--nmorph-private-video-preview-width": e.width,
71
72
  "--nmorph-private-video-preview-height": e.height,
72
73
  "--nmorph-private-video-preview-portal-width": e.previewWidth,
73
74
  "--nmorph-private-video-preview-portal-height": e.previewHeight
74
75
  })
75
- ), F = t(() => Object.fromEntries(Object.entries(u).filter(([r]) => r !== "class" && r !== "style"))), k = t(() => [S.value, u.class]), x = t(() => [b.value, u.style]);
76
- K(
76
+ ), E = J(q, S);
77
+ z(
77
78
  () => [e.src, e.loading, e.error],
78
79
  () => {
79
80
  o.value = !1, s.value = !1;
80
81
  }
81
82
  );
82
- const C = () => n("open"), D = () => n("download"), L = () => {
83
+ const O = () => n("open"), k = () => n("download"), M = () => {
83
84
  e.previewMode === "internal" && (p.value = !0), n("preview");
84
- }, M = () => {
85
+ }, x = () => {
85
86
  p.value = !1;
86
- }, V = async () => {
87
+ }, D = async () => {
87
88
  const r = l.value;
88
89
  if (r) {
89
90
  n("fullscreen");
@@ -97,7 +98,7 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
97
98
  } catch {
98
99
  }
99
100
  }
100
- }, R = async () => {
101
+ }, L = async () => {
101
102
  if (!(!l.value || e.loading || e.error || !s.value)) {
102
103
  if (o.value) {
103
104
  l.value.pause();
@@ -109,53 +110,53 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
109
110
  o.value = !1;
110
111
  }
111
112
  }
112
- }, I = (r) => {
113
+ }, b = (r) => {
113
114
  const a = r.duration;
114
115
  if (!Number.isFinite(a) || a <= 0) return !1;
115
- const i = r.buffered, m = Math.max(0, a - v);
116
- for (let c = 0; c < i.length; c += 1)
116
+ const i = r.buffered, f = Math.max(0, a - m);
117
+ for (let d = 0; d < i.length; d += 1)
117
118
  try {
118
- if (i.start(c) <= v && i.end(c) >= m) return !0;
119
+ if (i.start(d) <= m && i.end(d) >= f) return !0;
119
120
  } catch {
120
121
  return !1;
121
122
  }
122
123
  return !1;
123
- }, j = () => {
124
- s.value = l.value ? I(l.value) : !1;
125
- }, T = (r) => {
124
+ }, C = () => {
125
+ s.value = l.value ? b(l.value) : !1;
126
+ }, V = (r) => {
126
127
  o.value = !0, n("play", r);
127
- }, W = (r) => {
128
+ }, R = (r) => {
128
129
  o.value = !1, n("pause", r);
129
- }, $ = () => {
130
+ }, T = () => {
130
131
  o.value = !1;
131
- }, z = (r) => {
132
+ }, W = (r) => {
132
133
  o.value = !1, s.value = !1, n("error", r);
133
134
  };
134
- _({ videoRef: l });
135
- const B = { CONTRAST_ICON_COLOR: ie, VIDEO_BUFFER_EPSILON_SECONDS: v, props: e, emit: n, attrs: u, slots: h, videoRef: l, previewOpen: p, playing: o, videoLoaded: s, formatDuration: y, duration: H, mediaReady: d, showPlaybackControl: O, resolvedPreload: E, showFullscreenAction: w, hasPreviewActions: g, hasDefaultActions: N, hasActions: q, modifiers: S, styles: b, rootAttrs: F, rootClass: k, rootStyle: x, openHandler: C, downloadHandler: D, previewHandler: L, closePreviewHandler: M, fullscreenHandler: V, togglePlayback: R, isVideoFullyBuffered: I, updateVideoLoaded: j, playHandler: T, pauseHandler: W, endedHandler: $, errorHandler: z, get NmorphIcon() {
136
- return ee;
135
+ P({ videoRef: l });
136
+ const I = { CONTRAST_ICON_COLOR: ne, VIDEO_BUFFER_EPSILON_SECONDS: m, props: e, emit: n, slots: v, videoRef: l, previewOpen: p, playing: o, videoLoaded: s, formatDuration: h, duration: A, mediaReady: u, showPlaybackControl: H, resolvedPreload: F, showFullscreenAction: y, hasPreviewActions: w, hasDefaultActions: g, hasActions: N, modifiers: q, styles: S, rootAttrs: E, openHandler: O, downloadHandler: k, previewHandler: M, closePreviewHandler: x, fullscreenHandler: D, togglePlayback: L, isVideoFullyBuffered: b, updateVideoLoaded: C, playHandler: V, pauseHandler: R, endedHandler: T, errorHandler: W, get NmorphIcon() {
137
+ return X;
137
138
  }, get NmorphIconDownload() {
138
- return se;
139
+ return ae;
139
140
  }, get NmorphIconEye() {
140
- return le;
141
+ return oe;
141
142
  }, get NmorphIconExternalLink() {
142
- return ne;
143
+ return te;
143
144
  }, get NmorphIconFullScreen() {
144
- return ae;
145
+ return re;
145
146
  }, get NmorphIconLoader() {
146
- return oe;
147
+ return ee;
147
148
  }, get NmorphOverlay() {
148
- return Z;
149
+ return Q;
149
150
  }, get NmorphIconPause() {
150
- return te;
151
+ return Z;
151
152
  }, get NmorphIconPlay() {
152
- return re;
153
- }, get NmorphIconVideo() {
154
153
  return Y;
154
+ }, get NmorphIconVideo() {
155
+ return K;
155
156
  } };
156
- return Object.defineProperty(B, "__isScriptSetup", { enumerable: !1, value: !0 }), B;
157
+ return Object.defineProperty(I, "__isScriptSetup", { enumerable: !1, value: !0 }), I;
157
158
  }
158
159
  });
159
160
  export {
160
- Se as default
161
+ Ne as default
161
162
  };
@@ -1,45 +1,48 @@
1
1
  import './NmorphCallout.css';
2
- import n from "./NmorphCallout.vue2.js";
3
- import { openBlock as t, createBlock as s, resolveDynamicComponent as a, mergeProps as c, withCtx as m, createElementBlock as r, renderSlot as l, createTextVNode as p, toDisplayString as i, createCommentVNode as _ } from "vue";
2
+ import l from "./NmorphCallout.vue2.js";
3
+ import { openBlock as e, createBlock as a, resolveDynamicComponent as s, normalizeProps as c, guardReactiveProps as i, withCtx as m, createElementBlock as r, renderSlot as n, createTextVNode as p, toDisplayString as _, createCommentVNode as d } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const d = {
6
+ const f = {
7
7
  key: 0,
8
8
  class: "nmorph-callout__title"
9
- }, f = {
9
+ }, u = {
10
10
  key: 1,
11
11
  class: "nmorph-callout__content"
12
- }, u = ["innerHTML"];
13
- function y(e, k, v, o, C, N) {
14
- return t(), s(a(o.props.as), c({
15
- class: ["nmorph-callout", `nmorph-callout--${o.props.type}`],
16
- style: o.styles
17
- }, o.rootAttrs), {
18
- default: m(() => [
19
- o.hasHeader ? (t(), r("div", d, [
20
- l(e.$slots, "header", {}, () => [
21
- l(e.$slots, "title", {}, () => [
22
- p(
23
- i(o.props.title),
24
- 1
25
- /* TEXT */
26
- )
12
+ }, k = ["innerHTML"];
13
+ function v(t, y, C, o, N, B) {
14
+ return e(), a(
15
+ s(o.props.as),
16
+ c(i(o.rootAttrs)),
17
+ {
18
+ default: m(() => [
19
+ o.hasHeader ? (e(), r("div", f, [
20
+ n(t.$slots, "header", {}, () => [
21
+ n(t.$slots, "title", {}, () => [
22
+ p(
23
+ _(o.props.title),
24
+ 1
25
+ /* TEXT */
26
+ )
27
+ ])
27
28
  ])
28
- ])
29
- ])) : _("v-if", !0),
30
- o.hasDefaultContent ? (t(), r("div", f, [
31
- l(e.$slots, "default")
32
- ])) : (t(), r("div", {
33
- key: 2,
34
- class: "nmorph-callout__content",
35
- innerHTML: o.props.content
36
- }, null, 8, u))
37
- ]),
38
- _: 3
39
- /* FORWARDED */
40
- }, 16, ["class", "style"]);
29
+ ])) : d("v-if", !0),
30
+ o.hasDefaultContent ? (e(), r("div", u, [
31
+ n(t.$slots, "default")
32
+ ])) : (e(), r("div", {
33
+ key: 2,
34
+ class: "nmorph-callout__content",
35
+ innerHTML: o.props.content
36
+ }, null, 8, k))
37
+ ]),
38
+ _: 3
39
+ /* FORWARDED */
40
+ },
41
+ 16
42
+ /* FULL_PROPS */
43
+ );
41
44
  }
42
- const b = /* @__PURE__ */ h(n, [["render", y], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-callout/NmorphCallout.vue"]]);
45
+ const g = /* @__PURE__ */ h(l, [["render", v], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/feedback/nmorph-callout/NmorphCallout.vue"]]);
43
46
  export {
44
- b as default
47
+ g as default
45
48
  };
@@ -1,7 +1,9 @@
1
1
  import './NmorphCallout.css';
2
- import { defineComponent as f, useSlots as c, computed as t } from "vue";
3
- import { createCssVariables as g, createCssSizeVariables as y } from "../../../utils/common.js";
4
- const S = /* @__PURE__ */ f({
2
+ import { defineComponent as g, useSlots as m, computed as t } from "vue";
3
+ import { createCssVariables as y, createCssSizeVariables as v } from "../../../utils/common.js";
4
+ import { useMergedAttrs as S } from "../../../utils/attrs.js";
5
+ const _ = /* @__PURE__ */ g({
6
+ inheritAttrs: !1,
5
7
  __name: "NmorphCallout",
6
8
  props: {
7
9
  type: { type: String, required: !1, default: "info" },
@@ -23,15 +25,15 @@ const S = /* @__PURE__ */ f({
23
25
  titleFontSize: { type: [Number, String], required: !1, default: "var(--nmorph-typography-title-small-font-size)" },
24
26
  contentFontSize: { type: [Number, String], required: !1, default: "var(--nmorph-typography-body-small-font-size)" }
25
27
  },
26
- setup(o, { expose: n }) {
27
- n();
28
+ setup(u, { expose: s }) {
29
+ s();
28
30
  const a = {
29
31
  self: "_self",
30
32
  blank: "_blank",
31
33
  parent: "_parent",
32
34
  top: "_top"
33
- }, e = o, r = c(), d = t(() => ({
34
- ...y({
35
+ }, e = u, r = m(), l = t(() => ({
36
+ ...v({
35
37
  "--nmorph-private-callout-padding": e.padding,
36
38
  "--nmorph-private-callout-border-radius": e.borderRadius,
37
39
  "--nmorph-private-callout-accent-width": e.accentWidth,
@@ -39,23 +41,29 @@ const S = /* @__PURE__ */ f({
39
41
  "--nmorph-private-callout-title-font-size": e.titleFontSize,
40
42
  "--nmorph-private-callout-content-font-size": e.contentFontSize
41
43
  }),
42
- ...g({
44
+ ...y({
43
45
  "--nmorph-private-callout-color": e.color
44
46
  })
45
- })), i = t(() => {
47
+ })), o = t(() => {
46
48
  if (e.target)
47
49
  return e.target in a ? a[e.target] : e.target;
48
- }), u = t(() => e.as !== "a" ? {} : {
50
+ }), i = t(() => e.as !== "a" ? {} : {
49
51
  href: e.href,
50
- target: i.value,
52
+ target: o.value,
51
53
  rel: e.rel,
52
54
  referrerpolicy: e.referrerpolicy ?? e.referrerPolicy,
53
55
  download: e.download === !0 ? "" : e.download === !1 ? void 0 : e.download,
54
56
  "aria-label": e.ariaLabel
55
- }), p = t(() => !!(r.header || r.title || e.title)), s = t(() => !!r.default), l = { targetMap: a, props: e, slots: r, styles: d, resolvedTarget: i, rootAttrs: u, hasHeader: p, hasDefaultContent: s };
56
- return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
57
+ }), n = S(
58
+ t(() => ["nmorph-callout", `nmorph-callout--${e.type}`]),
59
+ l
60
+ ), p = t(() => ({
61
+ ...n.value,
62
+ ...i.value
63
+ })), f = t(() => !!(r.header || r.title || e.title)), c = t(() => !!r.default), d = { targetMap: a, props: e, slots: r, styles: l, resolvedTarget: o, linkAttrs: i, mergedAttrs: n, rootAttrs: p, hasHeader: f, hasDefaultContent: c };
64
+ return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
57
65
  }
58
66
  });
59
67
  export {
60
- S as default
68
+ _ as default
61
69
  };