@nmorph/nmorph-ui-kit 2.2.19 → 2.2.20

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 (104) hide show
  1. package/dist/assets/icons/circle-close.svg.js +4 -4
  2. package/dist/assets/icons/clock.svg.js +2 -2
  3. package/dist/assets/icons/folder-opened.svg.js +8 -8
  4. package/dist/components/basic/nmorph-button/NmorphButton.css +1 -1
  5. package/dist/components/basic/nmorph-link/NmorphLink.vue.js +16 -15
  6. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +17 -14
  7. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  8. package/dist/components/data/nmorph-badge/NmorphBadge.vue.js +23 -23
  9. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +27 -23
  10. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +14 -13
  11. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +68 -65
  12. package/dist/components/data/nmorph-calendar/utils.js +4 -3
  13. package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
  14. package/dist/components/data/nmorph-card/NmorphCard.vue.js +27 -26
  15. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +21 -13
  16. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +39 -42
  17. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +25 -36
  18. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +15 -11
  19. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.css +1 -1
  20. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.js +14 -13
  21. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +42 -27
  22. package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -0
  23. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +64 -0
  24. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +43 -0
  25. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.css +1 -1
  26. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +64 -61
  27. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +70 -60
  28. package/dist/components/data/nmorph-progress/NmorphProgress.vue.js +24 -29
  29. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +25 -14
  30. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue.js +20 -19
  31. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +15 -12
  32. package/dist/components/data/nmorph-table/NmorphTable.vue.js +35 -31
  33. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +64 -50
  34. package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.css +1 -1
  35. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue.js +8 -8
  36. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +26 -22
  37. package/dist/components/feedback/nmorph-callout/NmorphCallout.css +1 -1
  38. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +16 -15
  39. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +11 -8
  40. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
  41. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +13 -13
  42. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +33 -19
  43. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +1 -1
  44. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.css +1 -1
  45. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue.js +16 -15
  46. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +39 -32
  47. package/dist/components/form/nmorph-number-input/NmorphNumberInput.css +1 -1
  48. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue.js +7 -7
  49. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +40 -39
  50. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +53 -50
  51. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.js +16 -15
  52. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -16
  53. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue.js +16 -15
  54. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +26 -19
  55. package/dist/components/form/nmorph-slider/NmorphSlider.vue.js +4 -4
  56. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +48 -38
  57. package/dist/components/form/nmorph-switch/NmorphSwitch.css +1 -1
  58. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +18 -17
  59. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +38 -27
  60. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -0
  61. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +183 -0
  62. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +111 -0
  63. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.css +1 -1
  64. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +9 -8
  65. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +14 -14
  66. package/dist/hooks/use-common-styles.js +75 -9
  67. package/dist/hooks/use-virtual-list.js +3 -1
  68. package/dist/index.es.js +654 -650
  69. package/dist/index.umd.js +101 -35
  70. package/dist/locales/en.js +1 -0
  71. package/dist/locales/ru.js +1 -0
  72. package/dist/locales/zh.js +1 -0
  73. package/dist/package.json.js +1 -1
  74. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -0
  75. package/dist/src/components/data/index.d.ts +1 -0
  76. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +2 -0
  77. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +2 -0
  78. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +7 -5
  79. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +1 -3
  80. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +2 -0
  81. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +36 -0
  82. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +6 -0
  83. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +6 -0
  84. package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -0
  85. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +6 -0
  86. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -0
  87. package/dist/src/components/feedback/nmorph-alert/types.d.ts +1 -0
  88. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +2 -0
  89. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +8 -0
  90. package/dist/src/components/form/index.d.ts +2 -0
  91. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +4 -0
  92. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +2 -0
  93. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +2 -0
  94. package/dist/src/components/form/nmorph-select/types.d.ts +2 -0
  95. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +6 -0
  96. package/dist/src/components/form/nmorph-slider/types.d.ts +4 -0
  97. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +8 -0
  98. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +44 -0
  99. package/dist/src/components/form/nmorph-time-picker/types.d.ts +6 -0
  100. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -3
  101. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -2
  102. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -0
  103. package/dist/style.css +1 -1
  104. package/package.json +6 -5
@@ -1,18 +1,18 @@
1
1
  import './NmorphImagePreview.css';
2
- import { defineComponent as A, ref as i, watch as B, computed as u } from "vue";
3
- import { useModifiers as C } from "../../../utils/create-modifiers.js";
4
- import F from "../../../assets/icons/shrink.svg.js";
5
- import H from "../../../assets/icons/rotate-right.svg.js";
6
- import R from "../../../assets/icons/rotate-left.svg.js";
7
- import T from "../../../assets/icons/zoom-in.svg.js";
8
- import z from "../../../assets/icons/zoom-out.svg.js";
9
- import D from "../../../assets/icons/enlarge.svg.js";
10
- import V from "../../../assets/icons/chevron-down.svg.js";
11
- import M from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
12
- import P from "../../basic/nmorph-icon/NmorphIcon.vue.js";
13
- import Z from "../../basic/nmorph-button/NmorphButton.vue.js";
14
- import j from "../nmorph-image/NmorphImage.vue.js";
15
- const te = /* @__PURE__ */ A({
2
+ import { defineComponent as z, ref as m, watch as A, computed as l } from "vue";
3
+ import { useModifiers as F } from "../../../utils/create-modifiers.js";
4
+ import H from "../../../assets/icons/shrink.svg.js";
5
+ import R from "../../../assets/icons/rotate-right.svg.js";
6
+ import T from "../../../assets/icons/rotate-left.svg.js";
7
+ import D from "../../../assets/icons/zoom-in.svg.js";
8
+ import V from "../../../assets/icons/zoom-out.svg.js";
9
+ import P from "../../../assets/icons/enlarge.svg.js";
10
+ import Z from "../../../assets/icons/chevron-down.svg.js";
11
+ import $ from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
12
+ import j from "../../basic/nmorph-icon/NmorphIcon.vue.js";
13
+ import E from "../../basic/nmorph-button/NmorphButton.vue.js";
14
+ import G from "../nmorph-image/NmorphImage.vue.js";
15
+ const le = /* @__PURE__ */ z({
16
16
  __name: "NmorphImagePreview",
17
17
  props: {
18
18
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -23,56 +23,55 @@ const te = /* @__PURE__ */ A({
23
23
  minScaleLevel: { type: Number, required: !1, default: 0.2 },
24
24
  maxScaleLevel: { type: Number, required: !1, default: 4 },
25
25
  zIndex: { type: Number, required: !1, default: void 0 },
26
- showTrigger: { type: Boolean, required: !1, default: !0 }
26
+ showTrigger: { type: Boolean, required: !1, default: !0 },
27
+ width: { type: [Number, String], required: !1, default: void 0 },
28
+ height: { type: [Number, String], required: !1, default: void 0 },
29
+ navigationButtonMargin: { type: [Number, String], required: !1, default: void 0 }
27
30
  },
28
31
  emits: ["update:model-value"],
29
- setup(N, { expose: I, emit: y }) {
30
- I();
31
- const e = N, l = i(e.modelValue);
32
- B(
32
+ setup(y, { expose: S, emit: I }) {
33
+ S();
34
+ const e = y, n = m(e.modelValue);
35
+ A(
33
36
  () => e.modelValue,
34
- (a) => l.value = a
37
+ (t) => n.value = t
35
38
  );
36
- const S = u(
37
- () => C({
38
- "nmorph-image-preview": [`${l.value && "opened"}`]
39
+ const b = l(
40
+ () => F({
41
+ "nmorph-image-preview": [`${n.value && "opened"}`]
39
42
  })
40
- ), t = i(e.initialIndex), x = u(() => typeof e.src == "string" ? e.src : e.src[t.value]), r = i(1), _ = () => {
41
- l.value = !0, m("update:model-value", l.value);
42
- }, q = () => {
43
- l.value = !1, m("update:model-value", l.value);
44
- }, s = () => {
45
- o.value = o.value + 90, o.value >= 360 && (o.value = 0);
43
+ ), a = m(e.initialIndex), q = l(() => typeof e.src == "string" ? e.src : e.src[a.value]), r = m(1), x = () => {
44
+ n.value = !0, s("update:model-value", n.value);
45
+ }, w = () => {
46
+ n.value = !1, s("update:model-value", n.value);
46
47
  }, c = () => {
47
- o.value = o.value - 90, o.value <= -360 && (o.value = 0);
48
+ o.value = o.value + 90, o.value >= 360 && (o.value = 0);
48
49
  }, p = () => {
50
+ o.value = o.value - 90, o.value <= -360 && (o.value = 0);
51
+ }, d = () => {
49
52
  r.value < e.maxScaleLevel && (r.value += e.scaleStep), r.value = parseFloat(r.value.toFixed(3));
50
53
  }, v = () => {
51
54
  r.value > e.minScaleLevel && (r.value -= e.scaleStep), r.value = parseFloat(r.value.toFixed(3));
52
- }, d = u(() => r.value < 1), f = () => {
55
+ }, f = l(() => r.value < 1), h = () => {
53
56
  r.value = 1;
54
- }, h = () => {
57
+ }, g = () => {
55
58
  r.value = 1;
56
- }, o = i(0), L = () => {
57
- const a = e.src.length - 1, n = t.value - 1;
58
- n < 0 ? t.value = a : t.value = n;
59
- }, b = () => {
60
- const a = e.src.length - 1, n = t.value + 1;
61
- n > a ? t.value = 0 : t.value = n;
62
- }, w = u(() => {
63
- let a = {
64
- icon: F,
65
- handler: h
66
- };
67
- return d.value && (a = {
68
- icon: D,
69
- handler: f
70
- }), a;
71
- }), O = [
72
- {
59
+ }, o = m(0), _ = () => {
60
+ const t = e.src.length - 1, i = a.value - 1;
61
+ i < 0 ? a.value = t : a.value = i;
62
+ }, L = () => {
63
+ const t = e.src.length - 1, i = a.value + 1;
64
+ i > t ? a.value = 0 : a.value = i;
65
+ }, B = l(() => {
66
+ let t = {
73
67
  icon: H,
74
- handler: s
75
- },
68
+ handler: g
69
+ };
70
+ return f.value && (t = {
71
+ icon: P,
72
+ handler: h
73
+ }), t;
74
+ }), C = [
76
75
  {
77
76
  icon: R,
78
77
  handler: c
@@ -82,23 +81,34 @@ const te = /* @__PURE__ */ A({
82
81
  handler: p
83
82
  },
84
83
  {
85
- icon: z,
84
+ icon: D,
85
+ handler: d
86
+ },
87
+ {
88
+ icon: V,
86
89
  handler: v
87
90
  }
88
- ], m = y, k = u(() => Array.isArray(e.src) && e.src.length > 0), g = { props: e, open: l, modifiers: S, currentIndex: t, triggerSource: x, scaleLevel: r, clickHandler: _, closeHandler: q, rotateRight: s, rotateLeft: c, zoomIn: p, zoomOut: v, isLevelChangedToMin: d, enlargeToNormal: f, shrinkToNormal: h, rotateLevel: o, previousHandler: L, nextHandler: b, enlargeShrinkActionData: w, actions: O, emit: m, multipleSources: k, get NmorphImage() {
89
- return j;
91
+ ], s = I, M = l(() => Array.isArray(e.src) && e.src.length > 0), u = (t) => typeof t == "number" ? `${t}px` : t, O = l(() => ({
92
+ ...e.width !== void 0 && { "--width": u(e.width) },
93
+ ...e.height !== void 0 && { "--height": u(e.height) }
94
+ })), k = l(() => ({
95
+ ...e.navigationButtonMargin !== void 0 && {
96
+ "--nmorph-image-preview-btn-margin": u(e.navigationButtonMargin)
97
+ }
98
+ })), N = { props: e, open: n, modifiers: b, currentIndex: a, triggerSource: q, scaleLevel: r, clickHandler: x, closeHandler: w, rotateRight: c, rotateLeft: p, zoomIn: d, zoomOut: v, isLevelChangedToMin: f, enlargeToNormal: h, shrinkToNormal: g, rotateLevel: o, previousHandler: _, nextHandler: L, enlargeShrinkActionData: B, actions: C, emit: s, multipleSources: M, getCssSize: u, triggerStyle: O, portalStyle: k, get NmorphImage() {
99
+ return G;
90
100
  }, get NmorphButton() {
91
- return Z;
101
+ return E;
92
102
  }, get NmorphIcon() {
93
- return P;
103
+ return j;
94
104
  }, get NmorphOverlay() {
95
- return M;
105
+ return $;
96
106
  }, get NmorphIconChevronDown() {
97
- return V;
107
+ return Z;
98
108
  } };
99
- return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
109
+ return Object.defineProperty(N, "__isScriptSetup", { enumerable: !1, value: !0 }), N;
100
110
  }
101
111
  });
102
112
  export {
103
- te as default
113
+ le as default
104
114
  };
@@ -1,6 +1,6 @@
1
1
  import './NmorphProgress.css';
2
- import p from "./NmorphProgress.vue2.js";
3
- import { openBlock as e, createElementBlock as o, normalizeStyle as d, normalizeClass as _, createElementVNode as s, renderSlot as n, createTextVNode as t, toDisplayString as a, createCommentVNode as i } from "vue";
2
+ import _ from "./NmorphProgress.vue2.js";
3
+ import { openBlock as e, createElementBlock as s, normalizeStyle as d, normalizeClass as p, createElementVNode as o, renderSlot as c, createTextVNode as n, toDisplayString as a, createCommentVNode as i } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const m = {
@@ -15,26 +15,21 @@ const m = {
15
15
  }, k = {
16
16
  key: 1,
17
17
  class: "nmorph-progress__circle"
18
- }, S = { class: "nmorph-progress__circle-inner-part" }, z = ["width", "height"], P = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"];
19
- function x(c, N, l, r, C, D) {
20
- return e(), o(
18
+ }, S = { class: "nmorph-progress__circle-inner-part" }, z = ["width", "height"], x = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"];
19
+ function N(t, P, l, r, D, V) {
20
+ return e(), s(
21
21
  "div",
22
22
  {
23
- class: _(r.modifiers),
24
- style: d({
25
- "--nmorph-progress-percentage": r.displayPercentage,
26
- "--nmorph-progress-color": r.color,
27
- "--nmorph-progress-animation": r.animation,
28
- "--nmorph-progress-circle-size": r.circleContainerSize
29
- })
23
+ class: p(r.modifiers),
24
+ style: d(r.styles)
30
25
  },
31
26
  [
32
- r.props.type === "linear" ? (e(), o("div", m, [
33
- s("div", g, [
34
- s("div", f, [
35
- l.valueInside ? (e(), o("div", y, [
36
- n(c.$slots, "inner-text", {}, () => [
37
- t(
27
+ r.props.type === "linear" ? (e(), s("div", m, [
28
+ o("div", g, [
29
+ o("div", f, [
30
+ l.valueInside ? (e(), s("div", y, [
31
+ c(t.$slots, "inner-text", {}, () => [
32
+ n(
38
33
  a(r.displayPercentage),
39
34
  1
40
35
  /* TEXT */
@@ -43,9 +38,9 @@ function x(c, N, l, r, C, D) {
43
38
  ])) : i("v-if", !0)
44
39
  ])
45
40
  ]),
46
- l.valueRightSide ? (e(), o("div", v, [
47
- n(c.$slots, "right-side", {}, () => [
48
- t(
41
+ l.valueRightSide ? (e(), s("div", v, [
42
+ c(t.$slots, "right-side", {}, () => [
43
+ n(
49
44
  a(r.displayPercentage),
50
45
  1
51
46
  /* TEXT */
@@ -53,21 +48,21 @@ function x(c, N, l, r, C, D) {
53
48
  ])
54
49
  ])) : i("v-if", !0)
55
50
  ])) : i("v-if", !0),
56
- r.props.type === "circle" ? (e(), o("div", k, [
57
- s("div", S, [
58
- n(c.$slots, "circle-inner-part", {}, () => [
59
- t(
51
+ r.props.type === "circle" ? (e(), s("div", k, [
52
+ o("div", S, [
53
+ c(t.$slots, "circle-inner-part", {}, () => [
54
+ n(
60
55
  a(r.displayPercentage),
61
56
  1
62
57
  /* TEXT */
63
58
  )
64
59
  ])
65
60
  ]),
66
- (e(), o("svg", {
61
+ (e(), s("svg", {
67
62
  width: r.props.circleSize,
68
63
  height: r.props.circleSize
69
64
  }, [
70
- s("circle", {
65
+ o("circle", {
71
66
  ref: "circle",
72
67
  class: "nmorph-progress__circle-ring",
73
68
  cx: r.props.circleSize / 2,
@@ -75,7 +70,7 @@ function x(c, N, l, r, C, D) {
75
70
  r: r.props.circleSize / 2 - 2,
76
71
  "stroke-dasharray": r.strokeDasharray,
77
72
  "stroke-dashoffset": r.strokeDashoffset
78
- }, null, 8, P)
73
+ }, null, 8, x)
79
74
  ], 8, z))
80
75
  ])) : i("v-if", !0)
81
76
  ],
@@ -83,7 +78,7 @@ function x(c, N, l, r, C, D) {
83
78
  /* CLASS, STYLE */
84
79
  );
85
80
  }
86
- const E = /* @__PURE__ */ h(p, [["render", x], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-progress/NmorphProgress.vue"]]);
81
+ const E = /* @__PURE__ */ h(_, [["render", N], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-progress/NmorphProgress.vue"]]);
87
82
  export {
88
83
  E as default
89
84
  };
@@ -1,7 +1,7 @@
1
1
  import './NmorphProgress.css';
2
- import { defineComponent as v, computed as r, ref as a, onMounted as g } from "vue";
3
- import { useModifiers as _ } from "../../../utils/create-modifiers.js";
4
- const q = /* @__PURE__ */ v({
2
+ import { defineComponent as y, computed as r, ref as p, onMounted as S } from "vue";
3
+ import { useModifiers as q } from "../../../utils/create-modifiers.js";
4
+ const A = /* @__PURE__ */ y({
5
5
  __name: "NmorphProgress",
6
6
  props: {
7
7
  type: { type: String, required: !1, default: "linear" },
@@ -10,22 +10,33 @@ const q = /* @__PURE__ */ v({
10
10
  valueInside: { type: Boolean, required: !1, default: !1 },
11
11
  valueRightSide: { type: Boolean, required: !1, default: !0 },
12
12
  indeterminate: { type: Boolean, required: !1, default: !1 },
13
- circleSize: { type: Number, required: !1, default: 120 }
13
+ circleSize: { type: Number, required: !1, default: 120 },
14
+ height: { type: [Number, String], required: !1, default: void 0 },
15
+ widthTransition: { type: String, required: !1, default: void 0 },
16
+ indeterminateAnimation: { type: String, required: !1, default: void 0 }
14
17
  },
15
- setup(i, { expose: l }) {
16
- l();
17
- const e = i, c = r(
18
- () => _({
18
+ setup(d, { expose: f }) {
19
+ f();
20
+ const e = d, m = r(
21
+ () => q({
19
22
  "nmorph-progress": []
20
23
  })
21
- ), u = r(() => Array.isArray(e.color) ? e.color.find((y) => y.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), s = r(() => e.indeterminate ? "var(--animation)" : "none"), o = a(null), t = a(1), p = r(() => `${t.value} ${t.value}`), f = r(() => t.value - e.percentage / 100 * t.value);
22
- g(() => {
23
- o.value && (t.value = 2 * Math.PI * o.value.r.baseVal.value);
24
+ ), o = r(() => Array.isArray(e.color) ? e.color.find((n) => n.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), a = r(() => e.indeterminate ? "var(--animation)" : "none"), i = p(null), t = p(1), g = r(() => `${t.value} ${t.value}`), h = r(() => t.value - e.percentage / 100 * t.value);
25
+ S(() => {
26
+ i.value && (t.value = 2 * Math.PI * i.value.r.baseVal.value);
24
27
  });
25
- const d = r(() => `${e.circleSize}px`), m = r(() => `${e.percentage}%`), n = { props: e, modifiers: c, color: u, animation: s, circle: o, circumference: t, strokeDasharray: p, strokeDashoffset: f, circleContainerSize: d, displayPercentage: m };
26
- return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
28
+ const s = r(() => `${e.circleSize}px`), l = r(() => `${e.percentage}%`), u = (n) => typeof n == "number" ? `${n}px` : n, v = r(() => ({
29
+ "--nmorph-progress-percentage": l.value,
30
+ "--nmorph-progress-color": o.value,
31
+ "--nmorph-progress-animation": a.value,
32
+ "--nmorph-progress-circle-size": s.value,
33
+ ...e.height !== void 0 && { "--height": u(e.height) },
34
+ ...e.widthTransition !== void 0 && { "--width-transition": e.widthTransition },
35
+ ...e.indeterminateAnimation !== void 0 && { "--animation": e.indeterminateAnimation }
36
+ })), c = { props: e, modifiers: m, color: o, animation: a, circle: i, circumference: t, strokeDasharray: g, strokeDashoffset: h, circleContainerSize: s, displayPercentage: l, getCssSize: u, styles: v };
37
+ return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
27
38
  }
28
39
  });
29
40
  export {
30
- q as default
41
+ A as default
31
42
  };
@@ -1,24 +1,25 @@
1
1
  import './NmorphSkeleton.css';
2
2
  import m from "./NmorphSkeleton.vue2.js";
3
- import { openBlock as e, createElementBlock as r, normalizeClass as p, Fragment as c, renderList as d, createBlock as _, createCommentVNode as h, withDirectives as s, createElementVNode as n, renderSlot as l, vShow as i } from "vue";
3
+ import { openBlock as o, createElementBlock as r, normalizeStyle as p, normalizeClass as c, Fragment as d, renderList as _, createBlock as h, createCommentVNode as f, withDirectives as s, createElementVNode as n, renderSlot as l, vShow as i } from "vue";
4
4
  /* empty css */
5
- import f from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const k = {
5
+ import k from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const v = {
7
7
  key: 0,
8
8
  class: "nmorph-skeleton__rows"
9
- }, v = { class: "nmorph-skeleton__template" }, w = { class: "nmorph-skeleton__default" };
10
- function g(t, N, S, o, u, y) {
11
- return e(), r(
9
+ }, w = { class: "nmorph-skeleton__template" }, y = { class: "nmorph-skeleton__default" };
10
+ function S(t, g, N, e, u, B) {
11
+ return o(), r(
12
12
  "div",
13
13
  {
14
- class: p(o.modifiers)
14
+ class: c(e.modifiers),
15
+ style: p(e.styles)
15
16
  },
16
17
  [
17
- o.props.rows && o.props.loading ? (e(), r("div", k, [
18
- (e(!0), r(
19
- c,
18
+ e.props.rows && e.props.loading ? (o(), r("div", v, [
19
+ (o(!0), r(
20
+ d,
20
21
  null,
21
- d(o.props.rows, (a) => (e(), _(o.NmorphSkeletonItem, {
22
+ _(e.props.rows, (a) => (o(), h(e.NmorphSkeletonItem, {
22
23
  key: a,
23
24
  width: "100%",
24
25
  height: "14px",
@@ -27,35 +28,35 @@ function g(t, N, S, o, u, y) {
27
28
  128
28
29
  /* KEYED_FRAGMENT */
29
30
  ))
30
- ])) : h("v-if", !0),
31
+ ])) : f("v-if", !0),
31
32
  s(n(
32
33
  "div",
33
- v,
34
+ w,
34
35
  [
35
36
  l(t.$slots, "template")
36
37
  ],
37
38
  512
38
39
  /* NEED_PATCH */
39
40
  ), [
40
- [i, !o.props.rows && o.props.loading]
41
+ [i, !e.props.rows && e.props.loading]
41
42
  ]),
42
43
  s(n(
43
44
  "div",
44
- w,
45
+ y,
45
46
  [
46
47
  l(t.$slots, "default")
47
48
  ],
48
49
  512
49
50
  /* NEED_PATCH */
50
51
  ), [
51
- [i, !o.props.loading]
52
+ [i, !e.props.loading]
52
53
  ])
53
54
  ],
54
- 2
55
- /* CLASS */
55
+ 6
56
+ /* CLASS, STYLE */
56
57
  );
57
58
  }
58
- const E = /* @__PURE__ */ f(m, [["render", g], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-skeleton/NmorphSkeleton.vue"]]);
59
+ const E = /* @__PURE__ */ k(m, [["render", S], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-skeleton/NmorphSkeleton.vue"]]);
59
60
  export {
60
61
  E as default
61
62
  };
@@ -1,26 +1,29 @@
1
1
  import './NmorphSkeleton.css';
2
- import { defineComponent as a, computed as p } from "vue";
3
- import { useModifiers as m } from "../../../utils/create-modifiers.js";
4
- import i from "./components/NmorphSkeletonItem.vue.js";
5
- const d = /* @__PURE__ */ a({
2
+ import { defineComponent as d, computed as o } from "vue";
3
+ import { useModifiers as l } from "../../../utils/create-modifiers.js";
4
+ import s from "./components/NmorphSkeletonItem.vue.js";
5
+ const f = /* @__PURE__ */ d({
6
6
  __name: "NmorphSkeleton",
7
7
  props: {
8
8
  animated: { type: Boolean, required: !1, default: !0 },
9
9
  loading: { type: Boolean, required: !1, default: !0 },
10
- rows: { type: Number, required: !1, default: 0 }
10
+ rows: { type: Number, required: !1, default: 0 },
11
+ loadingGradient: { type: String, required: !1, default: void 0 }
11
12
  },
12
- setup(o, { expose: r }) {
13
- r();
14
- const e = o, n = p(
15
- () => m({
13
+ setup(r, { expose: n }) {
14
+ n();
15
+ const e = r, a = o(
16
+ () => l({
16
17
  "nmorph-skeleton": [`${e.animated && e.loading && "loading"}`]
17
18
  })
18
- ), t = { props: e, modifiers: n, get NmorphSkeletonItem() {
19
- return i;
19
+ ), i = o(() => ({
20
+ ...e.loadingGradient !== void 0 && { "--loading-gradient": e.loadingGradient }
21
+ })), t = { props: e, modifiers: a, styles: i, get NmorphSkeletonItem() {
22
+ return s;
20
23
  } };
21
24
  return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
22
25
  }
23
26
  });
24
27
  export {
25
- d as default
28
+ f as default
26
29
  };