@nmorph/nmorph-ui-kit 2.2.19 → 2.2.21

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 (112) 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/assets/icons/forward-filled.svg.js +21 -0
  5. package/dist/assets/icons/forward.svg.js +24 -0
  6. package/dist/assets/icons/reply-filled.svg.js +21 -0
  7. package/dist/assets/icons/reply.svg.js +24 -0
  8. package/dist/assets/icons/send-filled.svg.js +21 -0
  9. package/dist/assets/icons/send.svg.js +21 -0
  10. package/dist/components/basic/nmorph-button/NmorphButton.css +1 -1
  11. package/dist/components/basic/nmorph-link/NmorphLink.vue.js +16 -15
  12. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +17 -14
  13. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  14. package/dist/components/data/nmorph-badge/NmorphBadge.vue.js +23 -23
  15. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +27 -23
  16. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +14 -13
  17. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +68 -65
  18. package/dist/components/data/nmorph-calendar/utils.js +4 -3
  19. package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
  20. package/dist/components/data/nmorph-card/NmorphCard.vue.js +27 -26
  21. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +21 -13
  22. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +39 -42
  23. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +25 -36
  24. package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +15 -11
  25. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.css +1 -1
  26. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.js +14 -13
  27. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +42 -27
  28. package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -0
  29. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +64 -0
  30. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +43 -0
  31. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.css +1 -1
  32. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +51 -45
  33. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +74 -62
  34. package/dist/components/data/nmorph-progress/NmorphProgress.vue.js +24 -29
  35. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +25 -14
  36. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue.js +20 -19
  37. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +15 -12
  38. package/dist/components/data/nmorph-table/NmorphTable.vue.js +35 -31
  39. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +64 -50
  40. package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.css +1 -1
  41. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue.js +8 -8
  42. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +26 -22
  43. package/dist/components/feedback/nmorph-callout/NmorphCallout.css +1 -1
  44. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +16 -15
  45. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +11 -8
  46. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
  47. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +13 -13
  48. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +33 -19
  49. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +1 -1
  50. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.css +1 -1
  51. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue.js +16 -15
  52. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +39 -32
  53. package/dist/components/form/nmorph-number-input/NmorphNumberInput.css +1 -1
  54. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue.js +7 -7
  55. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +40 -39
  56. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +53 -50
  57. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.js +16 -15
  58. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -16
  59. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue.js +16 -15
  60. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +26 -19
  61. package/dist/components/form/nmorph-slider/NmorphSlider.vue.js +4 -4
  62. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +48 -38
  63. package/dist/components/form/nmorph-switch/NmorphSwitch.css +1 -1
  64. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +18 -17
  65. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +38 -27
  66. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -0
  67. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +183 -0
  68. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +111 -0
  69. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.css +1 -1
  70. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +9 -8
  71. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +14 -14
  72. package/dist/hooks/use-common-styles.js +75 -9
  73. package/dist/hooks/use-virtual-list.js +3 -1
  74. package/dist/icons.js +377 -365
  75. package/dist/index.es.js +666 -650
  76. package/dist/index.umd.js +99 -33
  77. package/dist/locales/en.js +1 -0
  78. package/dist/locales/ru.js +1 -0
  79. package/dist/locales/zh.js +1 -0
  80. package/dist/package.json.js +1 -1
  81. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +6 -0
  82. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -0
  83. package/dist/src/components/data/index.d.ts +1 -0
  84. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +2 -0
  85. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +2 -0
  86. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +7 -5
  87. package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +1 -3
  88. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +2 -0
  89. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +36 -0
  90. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +10 -0
  91. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +6 -0
  92. package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -0
  93. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +6 -0
  94. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -0
  95. package/dist/src/components/feedback/nmorph-alert/types.d.ts +1 -0
  96. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +2 -0
  97. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +8 -0
  98. package/dist/src/components/form/index.d.ts +2 -0
  99. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +4 -0
  100. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +2 -0
  101. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +2 -0
  102. package/dist/src/components/form/nmorph-select/types.d.ts +2 -0
  103. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +6 -0
  104. package/dist/src/components/form/nmorph-slider/types.d.ts +4 -0
  105. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +8 -0
  106. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +44 -0
  107. package/dist/src/components/form/nmorph-time-picker/types.d.ts +6 -0
  108. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -3
  109. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -2
  110. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -0
  111. package/dist/style.css +1 -1
  112. package/package.json +6 -5
@@ -1,133 +1,136 @@
1
1
  import './NmorphCalendar.css';
2
- import { defineComponent as R, ref as S, onMounted as O, reactive as k, watch as v, computed as p } from "vue";
3
- import { useModifiers as H } from "../../../utils/create-modifiers.js";
4
- import j from "./inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue.js";
5
- import { useCalendarTexts as W } from "./hooks/use-calendar-texts.js";
6
- import { hasAnyRangeDateInPrevMonth as Z, hasAnyRangeDateInNextMonth as z, isTodayInMonthRange as F, resetTimeToZero as i, getMonthDaysByWeek as G } from "./utils.js";
7
- import J from "../nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue.js";
8
- import K from "../nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue.js";
9
- import L from "../nmorph-table/NmorphTable.vue.js";
10
- const ne = /* @__PURE__ */ R({
2
+ import { defineComponent as O, ref as N, onMounted as k, reactive as j, watch as h, computed as i } from "vue";
3
+ import { useModifiers as z } from "../../../utils/create-modifiers.js";
4
+ import W from "./inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue.js";
5
+ import { useCalendarTexts as Z } from "./hooks/use-calendar-texts.js";
6
+ import { hasAnyRangeDateInPrevMonth as $, hasAnyRangeDateInNextMonth as F, isTodayInMonthRange as G, resetTimeToZero as d, getMonthDaysByWeek as J } from "./utils.js";
7
+ import K from "../nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue.js";
8
+ import L from "../nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue.js";
9
+ import Q from "../nmorph-table/NmorphTable.vue.js";
10
+ const le = /* @__PURE__ */ O({
11
11
  __name: "NmorphCalendar",
12
12
  props: {
13
13
  markToday: { type: Boolean, required: !1, default: !0 },
14
14
  initialDate: { type: Date, required: !1, default: () => /* @__PURE__ */ new Date() },
15
15
  range: { type: null, required: !1, default: void 0 },
16
16
  type: { type: null, required: !1, default: "date" },
17
- modelValue: { type: [Date, Array, null], required: !1, default: () => /* @__PURE__ */ new Date() }
17
+ modelValue: { type: [Date, Array, null], required: !1, default: () => /* @__PURE__ */ new Date() },
18
+ cellHeight: { type: [Number, String], required: !1, default: void 0 }
18
19
  },
19
20
  emits: ["update:model-value", "update-initial-date"],
20
- setup(N, { expose: _, emit: b }) {
21
+ setup(b, { expose: _, emit: C }) {
21
22
  _();
22
- const r = N, s = b, { days: h } = W(), y = () => {
23
+ const a = b, s = C, { days: v } = Z(), y = () => {
23
24
  o.value = M.value;
24
25
  }, B = () => {
25
26
  o.value = /* @__PURE__ */ new Date();
26
- }, D = () => {
27
+ }, g = () => {
27
28
  o.value = A.value;
28
29
  }, u = () => {
29
30
  throw new Error("model value and type prop not matched");
30
31
  }, c = (e) => {
31
32
  if (e === null) return null;
32
- if (r.type === "date") {
33
+ if (a.type === "date") {
33
34
  if (e instanceof Date)
34
- return i(e);
35
+ return d(e);
35
36
  u();
36
37
  }
37
- const l = Array.isArray(e) && e.every((a) => a instanceof Date);
38
- if (r.type === "dates") {
38
+ const l = Array.isArray(e) && e.every((r) => r instanceof Date);
39
+ if (a.type === "dates") {
39
40
  if (l)
40
- return e.map((a) => i(a));
41
+ return e.map((r) => d(r));
41
42
  u();
42
43
  }
43
- if (r.type === "daterange") {
44
+ if (a.type === "daterange") {
44
45
  if (l)
45
- return e.map((a) => i(a)).slice(0, 2);
46
+ return e.map((r) => d(r)).slice(0, 2);
46
47
  u();
47
48
  }
48
- }, C = (e) => {
49
+ }, q = (e) => {
49
50
  if (t.value === null) return;
50
- const { monthType: l, hidden: a } = e;
51
- if (a) return;
52
- l === "next" && D(), l === "previous" && y();
51
+ const { monthType: l, hidden: r } = e;
52
+ if (r) return;
53
+ l === "next" && g(), l === "previous" && y();
53
54
  const { date: n } = e;
54
- if (r.type === "date" && (t.value = n, s("update:model-value", t.value)), r.type === "dates") {
55
+ if (a.type === "date" && (t.value = n, s("update:model-value", t.value)), a.type === "dates") {
55
56
  if (!Array.isArray(t.value)) return u();
56
- const m = n.toDateString(), x = t.value.map((P) => P.toDateString()).indexOf(m);
57
- x !== -1 ? t.value.splice(x, 1) : t.value.push(n), s("update:model-value", t.value);
57
+ const m = n.toDateString(), w = t.value.map((R) => R.toDateString()).indexOf(m);
58
+ w !== -1 ? t.value.splice(w, 1) : t.value.push(n), s("update:model-value", t.value);
58
59
  }
59
- if (r.type === "daterange") {
60
+ if (a.type === "daterange") {
60
61
  if (!Array.isArray(t.value)) return u();
61
62
  t.value.length === 0 ? t.value.push(n) : t.value.length === 1 ? n < t.value[0] ? t.value = [n, t.value[0]] : t.value.push(n) : t.value = [n], s("update:model-value", t.value.slice(0, 2));
62
63
  }
63
- }, g = (e, l) => {
64
- const [a, n] = l;
65
- return l.length === 1 ? e.toDateString() === a.toDateString() : a && n ? e >= i(a) && e <= i(n) : !1;
64
+ }, D = (e, l) => {
65
+ const [r, n] = l;
66
+ return l.length === 1 ? e.toDateString() === r.toDateString() : r && n ? e >= d(r) && e <= d(n) : !1;
66
67
  }, V = (e) => {
67
68
  if (t.value === null) return !1;
68
- if (r.type === "date")
69
+ if (a.type === "date")
69
70
  return Array.isArray(t.value) ? u() : t.value.toDateString() === e.toDateString();
70
- if (r.type === "dates")
71
- return Array.isArray(t.value) ? !!t.value.find((a) => a.toDateString() === e.toDateString()) : u();
72
- if (r.type === "daterange")
73
- return Array.isArray(t.value) ? g(e, t.value) : u();
74
- }, o = S(r.initialDate), t = S(c(r.modelValue));
75
- O(() => {
71
+ if (a.type === "dates")
72
+ return Array.isArray(t.value) ? !!t.value.find((r) => r.toDateString() === e.toDateString()) : u();
73
+ if (a.type === "daterange")
74
+ return Array.isArray(t.value) ? D(e, t.value) : u();
75
+ }, o = N(a.initialDate), t = N(c(a.modelValue));
76
+ k(() => {
76
77
  s("update:model-value", t.value);
77
78
  });
78
- let d = k([]);
79
+ let p = j([]);
79
80
  const f = () => {
80
- d = [], G(o, r.range).forEach((l) => {
81
- const a = {};
81
+ p = [], J(o, a.range).forEach((l) => {
82
+ const r = {};
82
83
  l.forEach((n, m) => {
83
- const w = h[m];
84
- a[w] = n;
85
- }), d.push(a);
84
+ const T = v[m];
85
+ r[T] = n;
86
+ }), p.push(r);
86
87
  });
87
88
  };
88
- v(
89
- () => r.initialDate,
89
+ h(
90
+ () => a.initialDate,
90
91
  (e) => {
91
92
  o.value = e;
92
93
  },
93
94
  {
94
95
  deep: !0
95
96
  }
96
- ), v(o, () => {
97
+ ), h(o, () => {
97
98
  f(), s("update-initial-date", o.value);
98
- }), v(
99
- () => r.modelValue,
99
+ }), h(
100
+ () => a.modelValue,
100
101
  (e) => {
101
102
  t.value = c(e);
102
103
  }
103
104
  );
104
- const M = p(() => new Date(o.value.setMonth(o.value.getMonth() - 1))), A = p(() => new Date(o.value.setMonth(o.value.getMonth() + 1))), q = p(() => {
105
- const { range: e } = r, l = e ? Z(o.value, e[0]) : !0, a = e ? z(o.value, e[1]) : !0, n = F(e);
105
+ const M = i(() => new Date(o.value.setMonth(o.value.getMonth() - 1))), A = i(() => new Date(o.value.setMonth(o.value.getMonth() + 1))), E = i(() => {
106
+ const { range: e } = a, l = e ? $(o.value, e[0]) : !0, r = e ? F(o.value, e[1]) : !0, n = G(e);
106
107
  return {
107
108
  showPreviousMonthButton: l,
108
- showNextMonthButton: a,
109
+ showNextMonthButton: r,
109
110
  showTodayButton: n
110
111
  };
111
- }), E = p(
112
- () => H({
112
+ }), H = i(
113
+ () => z({
113
114
  "nmorph-calendar": []
114
115
  })
115
- ), I = (e) => e;
116
+ ), x = (e) => typeof e == "number" ? `${e}px` : e, I = i(() => ({
117
+ ...a.cellHeight !== void 0 && { "--table-data-cell-height": x(a.cellHeight) }
118
+ })), P = (e) => e;
116
119
  f();
117
- const T = { props: r, emit: s, days: h, setPreviousMonth: y, setTodayMonth: B, setNextMonth: D, wrongType: u, convertValue: c, clickDate: C, isDateInRange: g, isValueSelected: V, initialDate: o, selectedValue: t, get calendar() {
118
- return d;
120
+ const S = { props: a, emit: s, days: v, setPreviousMonth: y, setTodayMonth: B, setNextMonth: g, wrongType: u, convertValue: c, clickDate: q, isDateInRange: D, isValueSelected: V, initialDate: o, selectedValue: t, get calendar() {
121
+ return p;
119
122
  }, set calendar(e) {
120
- d = e;
121
- }, updateCalendar: f, prevMonth: M, nextMonth: A, showHeaderButtons: q, modifiers: E, dateData: I, get NmorphTable() {
122
- return L;
123
+ p = e;
124
+ }, updateCalendar: f, prevMonth: M, nextMonth: A, showHeaderButtons: E, modifiers: H, getCssSize: x, styles: I, dateData: P, get NmorphTable() {
125
+ return Q;
123
126
  }, get NmorphTableColumn() {
124
- return K;
127
+ return L;
125
128
  }, get NmorphTableCell() {
126
- return J;
127
- }, NmorphCalendarHeader: j };
128
- return Object.defineProperty(T, "__isScriptSetup", { enumerable: !1, value: !0 }), T;
129
+ return K;
130
+ }, NmorphCalendarHeader: W };
131
+ return Object.defineProperty(S, "__isScriptSetup", { enumerable: !1, value: !0 }), S;
129
132
  }
130
133
  });
131
134
  export {
132
- ne as default
135
+ le as default
133
136
  };
@@ -20,9 +20,10 @@ const H = (t) => {
20
20
  return e.replace(/YYYY|YY|MM|M|DD|D/g, (n) => a[n]);
21
21
  }, P = (t, e = {}) => {
22
22
  if (!t) return;
23
- const a = (n) => e.formatter ? e.formatter(n) : e.format ? C(n, e.format) : new Intl.DateTimeFormat(e.locale || "en-CA", e.options || W).format(
24
- n
25
- );
23
+ const a = (n) => e.formatter ? e.formatter(n) : e.format ? C(n, e.format) : new Intl.DateTimeFormat(
24
+ e.locale || "en-CA",
25
+ e.options || W
26
+ ).format(n);
26
27
  return Array.isArray(t) ? t.map((n) => n ? a(n) : null) : a(t);
27
28
  }, Z = (t) => P(t), b = (t, e) => t.getMonth() > e.getMonth(), j = (t, e) => t.getMonth() < e.getMonth(), q = (t) => {
28
29
  const e = /* @__PURE__ */ new Date();
@@ -1 +1 @@
1
- .nmorph-card{--card-padding: var(--indentation-04);display:flex;flex-direction:column;width:100%;padding:var(--card-padding);border-radius:var(--default-border-radius)}.nmorph-card .nmorph-card__content{height:100%}.nmorph-card .nmorph-card__header{font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-card .nmorph-card__footer{height:fit-content;margin-top:4px;font-weight:400;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-card.nmorph--shadow-combined{background:var(--nmorph-main-color);border:var(--nmorph-card-combined-border-width) solid var(--nmorph-main-color);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color),inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-.5 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}
1
+ .nmorph-card{--card-padding: var(--indentation-04);display:flex;flex-direction:column;width:fit-content;max-width:100%;padding:var(--card-padding);border-radius:var(--default-border-radius)}.nmorph-card.nmorph-card--fill{width:100%}.nmorph-card .nmorph-card__content{height:100%}.nmorph-card .nmorph-card__header{font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-card .nmorph-card__footer{height:fit-content;margin-top:4px;font-weight:400;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-card.nmorph--shadow-combined{background:var(--nmorph-main-color);border:var(--nmorph-card-combined-border-width) solid var(--nmorph-main-color);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color),inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-.5 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}
@@ -1,35 +1,36 @@
1
1
  import './NmorphCard.css';
2
- import a from "./NmorphCard.vue2.js";
3
- import { openBlock as t, createElementBlock as s, normalizeStyle as n, normalizeClass as c, createElementVNode as d, renderSlot as e, createCommentVNode as i } from "vue";
2
+ import l from "./NmorphCard.vue2.js";
3
+ import { openBlock as r, createBlock as n, resolveDynamicComponent as c, normalizeStyle as d, normalizeClass as m, withCtx as i, createElementBlock as s, renderSlot as t, createCommentVNode as a, createElementVNode as _ } from "vue";
4
4
  /* empty css */
5
- import m from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const l = { class: "nmorph-card__header" }, p = { class: "nmorph-card__content" }, _ = {
5
+ import f from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const p = {
7
7
  key: 0,
8
+ class: "nmorph-card__header"
9
+ }, h = { class: "nmorph-card__content" }, y = {
10
+ key: 1,
8
11
  class: "nmorph-card__footer"
9
12
  };
10
- function h(o, f, v, r, b, u) {
11
- return t(), s(
12
- "div",
13
- {
14
- class: c(r.modifiers),
15
- style: n({ "--nmorph-card-combined-border-width": `${r.props.combinedShadowBorderWidth}px` })
16
- },
17
- [
18
- d("div", l, [
19
- e(o.$slots, "header")
13
+ function v(e, k, C, o, u, N) {
14
+ return r(), n(c(o.props.tag), {
15
+ class: m(o.modifiers),
16
+ style: d(o.styles)
17
+ }, {
18
+ default: i(() => [
19
+ o.slots.header ? (r(), s("div", p, [
20
+ t(e.$slots, "header")
21
+ ])) : a("v-if", !0),
22
+ _("div", h, [
23
+ t(e.$slots, "default")
20
24
  ]),
21
- d("div", p, [
22
- e(o.$slots, "default")
23
- ]),
24
- r.slots.footer ? (t(), s("div", _, [
25
- e(o.$slots, "footer")
26
- ])) : i("v-if", !0)
27
- ],
28
- 6
29
- /* CLASS, STYLE */
30
- );
25
+ o.slots.footer ? (r(), s("div", y, [
26
+ t(e.$slots, "footer")
27
+ ])) : a("v-if", !0)
28
+ ]),
29
+ _: 3
30
+ /* FORWARDED */
31
+ }, 8, ["class", "style"]);
31
32
  }
32
- const N = /* @__PURE__ */ m(a, [["render", h], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-card/NmorphCard.vue"]]);
33
+ const S = /* @__PURE__ */ f(l, [["render", v], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-card/NmorphCard.vue"]]);
33
34
  export {
34
- N as default
35
+ S as default
35
36
  };
@@ -1,24 +1,32 @@
1
1
  import './NmorphCard.css';
2
- import { defineComponent as d, useSlots as a, computed as m } from "vue";
3
- import { NmorphShadowType as n } from "../../../types/index.js";
4
- import { useModifiers as u } from "../../../utils/create-modifiers.js";
5
- const c = /* @__PURE__ */ d({
2
+ import { defineComponent as f, useSlots as u, computed as t } from "vue";
3
+ import { NmorphShadowType as l } from "../../../types/index.js";
4
+ import { useModifiers as m } from "../../../utils/create-modifiers.js";
5
+ const b = /* @__PURE__ */ f({
6
6
  __name: "NmorphCard",
7
7
  props: {
8
8
  shadowType: { type: null, required: !1, default: "outset" },
9
- combinedShadowBorderWidth: { type: Number, required: !1, default: 0 }
9
+ combinedShadowBorderWidth: { type: Number, required: !1, default: 0 },
10
+ cardPadding: { type: [Number, String], required: !1, default: void 0 },
11
+ fill: { type: Boolean, required: !1, default: !0 },
12
+ tag: { type: String, required: !1, default: "div" }
10
13
  },
11
- setup(r, { expose: t }) {
12
- t();
13
- const e = r, s = a(), p = m(
14
- () => u({
15
- nmorph: [n[e.shadowType]],
16
- "nmorph-card": [e.shadowType]
14
+ setup(i, { expose: s }) {
15
+ s();
16
+ const e = i, a = u(), n = t(
17
+ () => m({
18
+ nmorph: [l[e.shadowType]],
19
+ "nmorph-card": [e.shadowType, e.fill ? "fill" : "fit-content"]
17
20
  })
18
- ), o = { props: e, slots: s, modifiers: p };
21
+ ), d = (r) => typeof r == "number" ? `${r}px` : r, p = t(() => ({
22
+ ...e.shadowType === "combined" && {
23
+ "--nmorph-card-combined-border-width": `${e.combinedShadowBorderWidth}px`
24
+ },
25
+ ...e.cardPadding !== void 0 && { "--card-padding": d(e.cardPadding) }
26
+ })), o = { props: e, slots: a, modifiers: n, getCssSize: d, styles: p };
19
27
  return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
20
28
  }
21
29
  });
22
30
  export {
23
- c as default
31
+ b as default
24
32
  };
@@ -1,93 +1,90 @@
1
- import h from "./NmorphCarousel.vue2.js";
2
- import { openBlock as o, createElementBlock as n, normalizeClass as c, createElementVNode as l, normalizeStyle as u, Fragment as s, renderList as m, createVNode as a, withCtx as _, renderSlot as p } from "vue";
3
- import f from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const v = ["id"], C = { class: "nmorph-carousel__elements-indicator" }, k = ["onClick"];
5
- function I(d, N, b, r, w, y) {
6
- return o(), n(
1
+ import d from "./NmorphCarousel.vue2.js";
2
+ import { openBlock as o, createElementBlock as e, normalizeClass as t, createElementVNode as n, normalizeStyle as h, Fragment as i, renderList as s, createVNode as l, withCtx as m, renderSlot as u } from "vue";
3
+ import p from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const v = ["id"], f = { class: "nmorph-carousel__elements-indicator" }, C = ["onClick"];
5
+ function k(_, N, I, r, b, w) {
6
+ return o(), e(
7
7
  "div",
8
8
  {
9
- class: c(r.modifiers)
9
+ class: t(r.modifiers)
10
10
  },
11
11
  [
12
- l(
12
+ n(
13
13
  "div",
14
14
  {
15
- ref: "carouselWrapper",
16
- class: c(["nmorph-carousel__wrapper", { "transition-enabled": r.transitionEnabled }]),
17
- style: u({ transform: r.translateX })
15
+ class: "nmorph-carousel__wrapper transition-enabled",
16
+ style: h({ transform: r.translateX })
18
17
  },
19
18
  [
20
- (o(!0), n(
21
- s,
19
+ (o(!0), e(
20
+ i,
22
21
  null,
23
- m(r.carouselData, (t, e) => (o(), n("div", {
24
- id: `nmorph-carousel-item-${r.carouselId}-${t}`,
25
- key: t,
26
- ref_for: !0,
27
- ref: (i) => r.setItemRef(i, e),
22
+ s(r.carouselData, (a) => (o(), e("div", {
23
+ id: `nmorph-carousel-item-${r.carouselId}-${a}`,
24
+ key: a,
28
25
  class: "nmorph-carousel__item"
29
26
  }, null, 8, v))),
30
27
  128
31
28
  /* KEYED_FRAGMENT */
32
29
  ))
33
30
  ],
34
- 6
35
- /* CLASS, STYLE */
31
+ 4
32
+ /* STYLE */
36
33
  ),
37
- l("div", C, [
38
- (o(!0), n(
39
- s,
34
+ n("div", f, [
35
+ (o(!0), e(
36
+ i,
40
37
  null,
41
- m(r.carouselData, (t, e) => (o(), n("div", {
42
- key: e,
38
+ s(r.carouselData, (a, c) => (o(), e("div", {
39
+ key: c,
43
40
  class: "nmorph-carousel__element-indicator-wrapper",
44
- onClick: (i) => r.elementIndicator(e)
41
+ onClick: (y) => r.elementIndicator(c)
45
42
  }, [
46
- l(
43
+ n(
47
44
  "div",
48
45
  {
49
- class: c(["nmorph-carousel__element-indicator", { "nmorph-carousel__element-indicator--active": r.isCurrentElementActive(e) }])
46
+ class: t(["nmorph-carousel__element-indicator", { "nmorph-carousel__element-indicator--active": r.isCurrentElementActive(c) }])
50
47
  },
51
48
  null,
52
49
  2
53
50
  /* CLASS */
54
51
  )
55
- ], 8, k))),
52
+ ], 8, C))),
56
53
  128
57
54
  /* KEYED_FRAGMENT */
58
55
  ))
59
56
  ]),
60
- l("div", {
57
+ n("div", {
61
58
  class: "nmorph-carousel__action-btn nmorph-carousel__prev",
62
- onClick: r.prevSlide
59
+ onClick: r.nextSlide
63
60
  }, [
64
- a(r.NmorphIcon, null, {
65
- default: _(() => [
66
- a(r.NmorphIconChevronDown)
61
+ l(r.NmorphIcon, null, {
62
+ default: m(() => [
63
+ l(r.NmorphIconChevronDown)
67
64
  ]),
68
65
  _: 1
69
66
  /* STABLE */
70
67
  })
71
68
  ]),
72
- l("div", {
69
+ n("div", {
73
70
  class: "nmorph-carousel__action-btn nmorph-carousel__next",
74
- onClick: r.nextSlide
71
+ onClick: r.prevSlide
75
72
  }, [
76
- a(r.NmorphIcon, null, {
77
- default: _(() => [
78
- a(r.NmorphIconChevronDown)
73
+ l(r.NmorphIcon, null, {
74
+ default: m(() => [
75
+ l(r.NmorphIconChevronDown)
79
76
  ]),
80
77
  _: 1
81
78
  /* STABLE */
82
79
  })
83
80
  ]),
84
- p(d.$slots, "default")
81
+ u(_.$slots, "default")
85
82
  ],
86
83
  2
87
84
  /* CLASS */
88
85
  );
89
86
  }
90
- const x = /* @__PURE__ */ f(h, [["render", I], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-carousel/NmorphCarousel.vue"]]);
87
+ const E = /* @__PURE__ */ p(d, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-carousel/NmorphCarousel.vue"]]);
91
88
  export {
92
- x as default
89
+ E as default
93
90
  };
@@ -1,52 +1,41 @@
1
- import { defineComponent as y, ref as a, computed as v, provide as j, reactive as k, onMounted as x, nextTick as E, watch as O } from "vue";
2
- import { useModifiers as D } from "../../../utils/create-modifiers.js";
1
+ import { defineComponent as N, ref as p, computed as a, provide as D, watch as d } from "vue";
2
+ import { useModifiers as M } from "../../../utils/create-modifiers.js";
3
3
  import { generateUUID as w } from "../../../utils/common.js";
4
- import A from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
- import M from "../../../assets/icons/chevron-down.svg.js";
6
- const L = /* @__PURE__ */ y({
4
+ import b from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
+ import y from "../../../assets/icons/chevron-down.svg.js";
6
+ const A = /* @__PURE__ */ N({
7
7
  __name: "NmorphCarousel",
8
8
  props: {
9
9
  loop: { type: Boolean, required: !1, default: !0 }
10
10
  },
11
11
  emits: ["change"],
12
- setup(f, { expose: h, emit: I }) {
13
- h();
14
- const e = a(0), _ = () => {
15
- e.value = e.value + 1;
16
- }, g = () => {
17
- e.value = e.value - 1;
18
- }, s = f, u = I, S = v(
19
- () => D({
12
+ setup(v, { expose: f, emit: h }) {
13
+ f();
14
+ const e = p(0), u = v, l = h, _ = a(
15
+ () => M({
20
16
  "nmorph-carousel": []
21
17
  })
22
- ), c = a([]), i = w();
23
- j("carousel-data", { data: c, carouselId: i });
24
- const o = a(null), n = k({}), d = () => {
25
- const t = n[Object.keys(n).length - 1]?.cloneNode(!0), l = n[0]?.cloneNode(!0);
26
- o.value?.prepend(t), o.value?.append(l), e.value += 1;
27
- }, p = () => {
28
- e.value === 0 && (e.value = Object.keys(n).length, r.value = !1), e.value > Object.keys(n).length && (e.value = 1, r.value = !1);
18
+ ), n = p([]), s = w();
19
+ D("carousel-data", { data: n, carouselId: s });
20
+ const r = a(() => n.value.length), c = (t) => r.value ? u.loop ? (t + r.value) % r.value : Math.min(Math.max(t, 0), r.value - 1) : 0, o = (t) => {
21
+ const m = c(t);
22
+ m !== e.value && (e.value = m);
23
+ }, I = () => o(e.value - 1), S = () => o(e.value + 1), g = a(() => `translateX(-${e.value * 100}%)`), x = (t) => t === e.value, C = (t) => {
24
+ o(t);
29
25
  };
30
- x(() => {
31
- s.loop && e.value === 0 && (E(() => d()), o.value?.addEventListener("transitionend", p));
32
- }), O(e, (t) => {
33
- u("change", e.value), (t === 1 || t === Object.keys(n).length) && setTimeout(() => {
34
- r.value = !0;
35
- });
26
+ d(r, (t) => {
27
+ e.value > t - 1 && (e.value = Math.max(t - 1, 0));
28
+ }), d(e, () => {
29
+ l("change", e.value);
36
30
  });
37
- const b = (t, l) => {
38
- const N = t;
39
- n[l] = N;
40
- }, C = v(() => `translateX(-${e.value * 100}%)`), r = a(!0), m = { currentSlide: e, prevSlide: _, nextSlide: g, props: s, emit: u, modifiers: S, carouselData: c, carouselId: i, carouselWrapper: o, slidesRefs: n, addInitialCloneSlides: d, transitionEndHandler: p, setItemRef: b, translateX: C, transitionEnabled: r, isCurrentElementActive: (t) => t === e.value - 1, elementIndicator: (t) => {
41
- e.value = t + 1;
42
- }, get NmorphIcon() {
43
- return A;
31
+ const i = { currentSlide: e, props: u, emit: l, modifiers: _, carouselData: n, carouselId: s, slideCount: r, normalizeSlideIndex: c, goToSlide: o, prevSlide: I, nextSlide: S, translateX: g, isCurrentElementActive: x, elementIndicator: C, get NmorphIcon() {
32
+ return b;
44
33
  }, get NmorphIconChevronDown() {
45
- return M;
34
+ return y;
46
35
  } };
47
- return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
36
+ return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
48
37
  }
49
38
  });
50
39
  export {
51
- L as default
40
+ A as default
52
41
  };
@@ -1,24 +1,28 @@
1
- import { defineComponent as a, computed as p, inject as i, ref as m, onMounted as c } from "vue";
2
- import { useModifiers as d } from "../../../../../utils/create-modifiers.js";
3
- const _ = /* @__PURE__ */ a({
1
+ import { defineComponent as i, computed as p, inject as m, ref as c, onMounted as d, onBeforeUnmount as f } from "vue";
2
+ import { useModifiers as l } from "../../../../../utils/create-modifiers.js";
3
+ const x = /* @__PURE__ */ i({
4
4
  __name: "NmorphCarouselItem",
5
5
  props: {
6
6
  name: { type: String, required: !0 }
7
7
  },
8
- setup(n, { expose: s }) {
9
- s();
10
- const t = n, u = p(
11
- () => d({
8
+ setup(a, { expose: u }) {
9
+ u();
10
+ const t = a, s = p(
11
+ () => l({
12
12
  "nmorph-carousel-item": []
13
13
  })
14
- ), e = i("carousel-data"), r = m(!1);
15
- c(() => {
14
+ ), e = m("carousel-data"), r = c(!1);
15
+ d(() => {
16
16
  r.value = !0, e && e.data.value.push(t.name);
17
+ }), f(() => {
18
+ if (!e) return;
19
+ const n = e.data.value.indexOf(t.name);
20
+ n !== -1 && e.data.value.splice(n, 1);
17
21
  });
18
- const o = { props: t, modifiers: u, carouselData: e, isMounted: r };
22
+ const o = { props: t, modifiers: s, carouselData: e, isMounted: r };
19
23
  return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
20
24
  }
21
25
  });
22
26
  export {
23
- _ as default
27
+ x as default
24
28
  };
@@ -1 +1 @@
1
- .nmorph-collapse-item{--transition-speed: .2s;margin-bottom:var(--indentation-03)}.nmorph-collapse-item .nmorph-collapse-item__title{display:flex;align-items:center;padding:var(--indentation-02);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-collapse-item .nmorph-collapse-item__content{box-sizing:content-box;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color);transition:height var(--transition-speed) ease-in-out}.nmorph-collapse-item .nmorph-collapse-item__inner-wrapper{padding:var(--indentation-03)}.nmorph-collapse-item.nmorph-collapse-item--disabled{cursor:not-allowed;opacity:.6}
1
+ .nmorph-collapse-item{--transition-speed: .2s;margin-bottom:var(--indentation-03)}.nmorph-collapse-item .nmorph-collapse-item__title{display:flex;align-items:center;padding:var(--indentation-02);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color);cursor:pointer}.nmorph-collapse-item .nmorph-collapse-item__content{box-sizing:content-box;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color);transition:height var(--transition-speed) ease-in-out}.nmorph-collapse-item .nmorph-collapse-item__inner-wrapper{padding:var(--indentation-03)}.nmorph-collapse-item.nmorph-collapse-item--disabled{cursor:not-allowed;opacity:.6}.nmorph-collapse-item.nmorph-collapse-item--disabled .nmorph-collapse-item__title{cursor:not-allowed}.nmorph-collapse-item.nmorph-collapse-item--block .nmorph-collapse-item__title{cursor:default}