@nmorph/nmorph-ui-kit 2.2.35 → 2.2.37

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 (176) hide show
  1. package/dist/assets/icons/baseball.svg.js +28 -0
  2. package/dist/assets/icons/basketball.svg.js +21 -0
  3. package/dist/assets/icons/bowl.svg.js +21 -0
  4. package/dist/assets/icons/box.svg.js +35 -0
  5. package/dist/assets/icons/briefcase.svg.js +21 -0
  6. package/dist/assets/icons/brush-filled.svg.js +21 -0
  7. package/dist/assets/icons/brush.svg.js +21 -0
  8. package/dist/assets/icons/camera-filled.svg.js +21 -0
  9. package/dist/assets/icons/chevron-double-left.svg.js +28 -0
  10. package/dist/assets/icons/chevron-double-right.svg.js +28 -0
  11. package/dist/assets/icons/chevron-double-up.svg.js +28 -0
  12. package/dist/assets/icons/chevron-left.svg.js +21 -0
  13. package/dist/assets/icons/chevron-right.svg.js +21 -0
  14. package/dist/assets/icons/chevron-up.svg.js +21 -0
  15. package/dist/assets/icons/chicken.svg.js +21 -0
  16. package/dist/assets/icons/clipboard-check.svg.js +25 -0
  17. package/dist/assets/icons/clipboard.svg.js +25 -0
  18. package/dist/assets/icons/close-bold.svg.js +21 -0
  19. package/dist/assets/icons/cold-drink.svg.js +21 -0
  20. package/dist/assets/icons/comment.svg.js +21 -0
  21. package/dist/assets/icons/database.svg.js +25 -0
  22. package/dist/assets/icons/drag-handle.svg.js +21 -0
  23. package/dist/assets/icons/external-link.svg.js +28 -0
  24. package/dist/assets/icons/filter-off.svg.js +28 -0
  25. package/dist/assets/icons/fingerprint.svg.js +44 -0
  26. package/dist/assets/icons/folder-remove.svg.js +21 -0
  27. package/dist/assets/icons/goblet.svg.js +21 -0
  28. package/dist/assets/icons/ice-tea.svg.js +21 -0
  29. package/dist/assets/icons/inbox.svg.js +25 -0
  30. package/dist/assets/icons/mail.svg.js +25 -0
  31. package/dist/assets/icons/odometer.svg.js +35 -0
  32. package/dist/assets/icons/open.svg.js +28 -0
  33. package/dist/assets/icons/pagination.svg.js +8 -0
  34. package/dist/assets/icons/redo.svg.js +21 -0
  35. package/dist/assets/icons/save.svg.js +25 -0
  36. package/dist/assets/icons/server.svg.js +32 -0
  37. package/dist/assets/icons/shield-check.svg.js +25 -0
  38. package/dist/assets/icons/shield.svg.js +25 -0
  39. package/dist/assets/icons/sliders.svg.js +31 -0
  40. package/dist/assets/icons/stopwatch.svg.js +28 -0
  41. package/dist/assets/icons/suitcase-line.svg.js +22 -0
  42. package/dist/assets/icons/undo.svg.js +21 -0
  43. package/dist/assets/icons/video-camera.svg.js +21 -0
  44. package/dist/components/basic/nmorph-button/NmorphButton.vue.js +10 -10
  45. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +13 -13
  46. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
  47. package/dist/components/basic/nmorph-icon/NmorphIcons.js +617 -529
  48. package/dist/components/basic/nmorph-layout/NmorphLayout.css +1 -0
  49. package/dist/components/basic/nmorph-layout/NmorphLayout.vue.js +50 -0
  50. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +29 -0
  51. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
  52. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
  53. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
  54. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
  55. package/dist/components/basic/nmorph-space/NmorphSpace.css +1 -0
  56. package/dist/components/basic/nmorph-space/NmorphSpace.vue.js +21 -0
  57. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +41 -0
  58. package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
  59. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +15 -15
  60. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +6 -6
  61. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
  62. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
  63. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +15 -14
  64. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
  65. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
  66. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
  67. package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
  68. package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
  69. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
  70. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
  71. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +31 -31
  72. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +36 -38
  73. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
  74. package/dist/components/data/nmorph-qr-code/NmorphQRCode.css +1 -0
  75. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue.js +59 -0
  76. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +51 -0
  77. package/dist/components/data/nmorph-qr-code/qr-code.js +568 -0
  78. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
  79. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
  80. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.css +1 -0
  81. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue.js +86 -0
  82. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +61 -0
  83. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
  84. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
  85. package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
  86. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
  87. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
  88. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.css +1 -0
  89. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +81 -0
  90. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +48 -0
  91. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
  92. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +30 -30
  93. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +59 -64
  94. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +5 -5
  95. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +5 -5
  96. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +20 -19
  97. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js +13 -13
  98. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +28 -27
  99. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.js +16 -16
  100. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue2.js +20 -17
  101. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +7 -7
  102. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +2 -2
  103. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
  104. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +3 -6
  105. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue.js +21 -21
  106. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +92 -84
  107. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  108. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +5 -5
  109. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +66 -74
  110. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
  111. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +18 -17
  112. package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
  113. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +25 -24
  114. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +1 -1
  115. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +22 -21
  116. package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
  117. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +4 -2
  118. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +17 -19
  119. package/dist/components/form/nmorph-textarea/NmorphTextarea.css +1 -0
  120. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +41 -0
  121. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +67 -0
  122. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  123. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +43 -42
  124. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +38 -28
  125. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
  126. package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
  127. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
  128. package/dist/hooks/use-common-styles.js +18 -278
  129. package/dist/hooks/use-virtual-list.js +38 -32
  130. package/dist/icons.js +621 -533
  131. package/dist/index.es.js +780 -678
  132. package/dist/index.umd.js +25 -285
  133. package/dist/package.json.js +1 -1
  134. package/dist/src/components/basic/index.d.ts +2 -0
  135. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +1 -1
  136. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +48 -3
  137. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +22 -0
  138. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +33 -0
  139. package/dist/src/components/data/index.d.ts +4 -0
  140. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
  141. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
  142. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +34 -0
  143. package/dist/src/components/data/nmorph-qr-code/qr-code.d.ts +12 -0
  144. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
  145. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +46 -0
  146. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +4 -0
  147. package/dist/src/components/feedback/index.d.ts +1 -0
  148. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
  149. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +40 -0
  150. package/dist/src/components/form/index.d.ts +1 -0
  151. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
  152. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +2 -2
  153. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
  154. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +1 -1
  155. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +2 -2
  156. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
  157. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
  158. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  159. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
  160. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +2 -2
  161. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
  162. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
  163. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  164. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +48 -0
  165. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
  166. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  167. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +1 -1
  168. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +1 -1
  169. package/dist/src/hooks/use-virtual-list.d.ts +6 -0
  170. package/dist/src/types/index.d.ts +2 -1
  171. package/dist/src/utils/common.d.ts +5 -0
  172. package/dist/src/utils/create-modifiers.d.ts +4 -2
  173. package/dist/style.css +1 -1
  174. package/dist/utils/common.js +9 -2
  175. package/dist/utils/create-modifiers.js +6 -6
  176. package/package.json +1 -1
@@ -1,8 +1,9 @@
1
1
  import './NmorphCard.css';
2
- import { defineComponent as f, useSlots as l, computed as o } from "vue";
3
- import { NmorphShadowType as u } from "../../../types/index.js";
4
- import { useModifiers as m } from "../../../utils/create-modifiers.js";
5
- const b = /* @__PURE__ */ f({
2
+ import { defineComponent as n, useSlots as p, computed as d } from "vue";
3
+ import { NmorphShadowType as l } from "../../../types/index.js";
4
+ import { useModifiers as u } from "../../../utils/create-modifiers.js";
5
+ import { toCssSize as f } from "../../../utils/common.js";
6
+ const S = /* @__PURE__ */ n({
6
7
  __name: "NmorphCard",
7
8
  props: {
8
9
  shadowType: { type: null, required: !1, default: "outset" },
@@ -12,22 +13,22 @@ const b = /* @__PURE__ */ f({
12
13
  fill: { type: Boolean, required: !1, default: !0 },
13
14
  tag: { type: String, required: !1, default: "div" }
14
15
  },
15
- setup(i, { expose: s }) {
16
- s();
17
- const e = i, a = l(), n = o(
18
- () => m({
19
- nmorph: [u[e.shadowType]],
16
+ setup(o, { expose: t }) {
17
+ t();
18
+ const e = o, i = p(), a = d(
19
+ () => u({
20
+ nmorph: [l[e.shadowType]],
20
21
  "nmorph-card": [e.shadowType, e.fill ? "fill" : "fit-content"]
21
22
  })
22
- ), d = (r) => typeof r == "number" ? `${r}px` : r, p = o(() => ({
23
+ ), s = d(() => ({
23
24
  ...e.shadowType === "combined" && {
24
25
  "--nmorph-card-combined-border-width": `${e.combinedShadowBorderWidth}px`
25
26
  },
26
- ...e.cardPadding !== void 0 && { "--card-padding": d(e.cardPadding) }
27
- })), t = { props: e, slots: a, modifiers: n, getCssSize: d, styles: p };
28
- return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
27
+ ...e.cardPadding !== void 0 && { "--card-padding": f(e.cardPadding) }
28
+ })), r = { props: e, slots: i, modifiers: a, styles: s };
29
+ return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
29
30
  }
30
31
  });
31
32
  export {
32
- b as default
33
+ S as default
33
34
  };
@@ -1,8 +1,8 @@
1
1
  import './NmorphCollapseItem.css';
2
2
  import { defineComponent as H, ref as u, computed as d, inject as b, onMounted as z, onBeforeUnmount as M, watch as h, nextTick as w } from "vue";
3
3
  import { useModifiers as g } from "../../../../../utils/create-modifiers.js";
4
- import { NmorphComponentHeight as $ } from "../../../../../types/index.js";
5
- const D = /* @__PURE__ */ H({
4
+ import { NmorphComponentHeight as x } from "../../../../../types/index.js";
5
+ const N = /* @__PURE__ */ H({
6
6
  __name: "NmorphCollapseItem",
7
7
  props: {
8
8
  height: { type: null, required: !1, default: "basic" },
@@ -17,15 +17,11 @@ const D = /* @__PURE__ */ H({
17
17
  O();
18
18
  const e = y, p = _, n = u(!1), k = d(
19
19
  () => g({
20
- "nmorph-collapse-item": [
21
- `${e.disabled && "disabled"}`,
22
- `${e.block && "block"}`,
23
- `${n.value && "is-open"}`
24
- ]
20
+ "nmorph-collapse-item": [e.disabled && "disabled", e.block && "block", n.value && "is-open"]
25
21
  })
26
22
  ), S = d(
27
23
  () => g({
28
- nmorph: [$[e.height]]
24
+ nmorph: [x[e.height]]
29
25
  })
30
26
  ), c = (t) => typeof t == "number" ? `${t}ms` : t, C = d(() => ({
31
27
  ...e.transitionSpeed !== void 0 && { "--transition-speed": c(e.transitionSpeed) }
@@ -56,5 +52,5 @@ const D = /* @__PURE__ */ H({
56
52
  }
57
53
  });
58
54
  export {
59
- D as default
55
+ N as default
60
56
  };
@@ -14,7 +14,7 @@ const y = ["role", "aria-label"], f = {
14
14
  key: 2,
15
15
  class: "nmorph-empty__action"
16
16
  };
17
- function k(e, z, b, o, g, C) {
17
+ function k(e, z, b, o, C, E) {
18
18
  return t(), i("div", {
19
19
  class: d(o.modifiers),
20
20
  style: m(o.styles),
@@ -24,8 +24,8 @@ function k(e, z, b, o, g, C) {
24
24
  o.hasIcon ? (t(), i("div", f, [
25
25
  r(e.$slots, "icon", {}, () => [
26
26
  n(o.NmorphIcon, {
27
- width: o.getCssSize(o.props.iconSize),
28
- height: o.getCssSize(o.props.iconSize)
27
+ width: o.toCssSize(o.props.iconSize),
28
+ height: o.toCssSize(o.props.iconSize)
29
29
  }, {
30
30
  default: p(() => [
31
31
  n(o.NmorphIconFolderOpened)
@@ -1,10 +1,11 @@
1
1
  import './NmorphEmpty.css';
2
- import { defineComponent as f, useSlots as c, computed as t } from "vue";
3
- import { NmorphShadowType as h } from "../../../types/index.js";
4
- import { useModifiers as y } from "../../../utils/create-modifiers.js";
2
+ import { defineComponent as u, useSlots as f, computed as t } from "vue";
3
+ import { NmorphShadowType as c } from "../../../types/index.js";
4
+ import { useModifiers as h } from "../../../utils/create-modifiers.js";
5
+ import { toCssSize as r } from "../../../utils/common.js";
5
6
  import g from "../../../assets/icons/folder-opened.svg.js";
6
- import S from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
- const z = /* @__PURE__ */ f({
7
+ import y from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
+ const z = /* @__PURE__ */ u({
8
9
  __name: "NmorphEmpty",
9
10
  props: {
10
11
  title: { type: String, required: !1, default: "No data" },
@@ -19,23 +20,25 @@ const z = /* @__PURE__ */ f({
19
20
  ariaLabel: { type: String, required: !1, default: void 0 },
20
21
  ariaOrientation: { type: String, required: !1, default: void 0 }
21
22
  },
22
- setup(p, { expose: s }) {
23
- s();
24
- const e = p, o = c(), r = (i) => typeof i == "number" ? `${i}px` : i, a = t(() => !e.hideIcon || !!o.icon), d = t(() => !!(e.description || o.description)), l = t(() => e.ariaLabel || e.title), m = t(
25
- () => y({
26
- nmorph: [e.design === "nmorph" ? h[e.shadowType] : ""],
23
+ setup(n, { expose: p }) {
24
+ p();
25
+ const e = n, o = f(), s = t(() => !e.hideIcon || !!o.icon), a = t(() => !!(e.description || o.description)), d = t(() => e.ariaLabel || e.title), l = t(
26
+ () => h({
27
+ nmorph: [e.design === "nmorph" ? c[e.shadowType] : ""],
27
28
  "nmorph-empty": [e.design]
28
29
  })
29
- ), u = t(() => ({
30
+ ), m = t(() => ({
30
31
  "--nmorph-empty-icon-size": r(e.iconSize),
31
32
  "--nmorph-empty-min-height": r(e.minHeight),
32
33
  "--nmorph-empty-padding": r(e.padding)
33
- })), n = { props: e, slots: o, getCssSize: r, hasIcon: a, hasDescription: d, label: l, modifiers: m, styles: u, get NmorphIcon() {
34
- return S;
34
+ })), i = { props: e, slots: o, hasIcon: s, hasDescription: a, label: d, modifiers: l, styles: m, get NmorphIcon() {
35
+ return y;
35
36
  }, get NmorphIconFolderOpened() {
36
37
  return g;
38
+ }, get toCssSize() {
39
+ return r;
37
40
  } };
38
- return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
41
+ return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
39
42
  }
40
43
  });
41
44
  export {
@@ -0,0 +1 @@
1
+ .nmorph-image{--width: auto;--height: 100%;display:flex;justify-content:center;align-items:center;width:var(--width);height:var(--height)}.nmorph-image.nmorph--shadow-combined{border:var(--nmorph-image-frame-border) solid var(--nmorph-main-color)}.nmorph-image img{width:100%;height:100%;object-fit:var(--nmorph-image-fit)}.nmorph-image__loading,.nmorph-image__load-failed{padding:1rem}.nmorph-image--hide img{width:0;height:0;opacity:0}
@@ -1,5 +1,7 @@
1
+ import './NmorphImage.css';
1
2
  import l from "./NmorphImage.vue2.js";
2
- import { openBlock as e, createElementBlock as r, normalizeStyle as d, normalizeClass as m, createElementVNode as c, renderSlot as i, createTextVNode as s, toDisplayString as t, createCommentVNode as n } from "vue";
3
+ import { openBlock as r, createElementBlock as e, normalizeStyle as m, normalizeClass as d, createElementVNode as c, renderSlot as i, createTextVNode as t, toDisplayString as s, createCommentVNode as n } from "vue";
4
+ /* empty css */
3
5
  import _ from "../../../_virtual/_plugin-vue_export-helper.js";
4
6
  const p = ["src", "alt", "srcset"], g = {
5
7
  key: 0,
@@ -9,12 +11,12 @@ const p = ["src", "alt", "srcset"], g = {
9
11
  class: "nmorph-image__loading"
10
12
  };
11
13
  function h(a, y, k, o, v, L) {
12
- return o.props.src ? (e(), r(
14
+ return o.props.src ? (r(), e(
13
15
  "div",
14
16
  {
15
17
  key: 0,
16
- class: m(o.modifiers),
17
- style: d(o.styles)
18
+ class: d(o.modifiers),
19
+ style: m(o.styles)
18
20
  },
19
21
  [
20
22
  c("img", {
@@ -24,18 +26,18 @@ function h(a, y, k, o, v, L) {
24
26
  onLoad: o.onImageLoad,
25
27
  onError: o.onImageError
26
28
  }, null, 40, p),
27
- o.loadingFailed ? (e(), r("div", g, [
29
+ o.loadingFailed ? (r(), e("div", g, [
28
30
  i(a.$slots, "error", {}, () => [
29
- s(
30
- t(o.computedLoadFailedText),
31
+ t(
32
+ s(o.computedLoadFailedText),
31
33
  1
32
34
  /* TEXT */
33
35
  )
34
36
  ])
35
- ])) : o.imageLoadFinished ? n("v-if", !0) : (e(), r("div", f, [
37
+ ])) : o.imageLoadFinished ? n("v-if", !0) : (r(), e("div", f, [
36
38
  i(a.$slots, "loading", {}, () => [
37
- s(
38
- t(o.computedLoadingText),
39
+ t(
40
+ s(o.computedLoadingText),
39
41
  1
40
42
  /* TEXT */
41
43
  )
@@ -46,7 +48,7 @@ function h(a, y, k, o, v, L) {
46
48
  /* CLASS, STYLE */
47
49
  )) : n("v-if", !0);
48
50
  }
49
- const I = /* @__PURE__ */ _(l, [["render", h], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image/NmorphImage.vue"]]);
51
+ const S = /* @__PURE__ */ _(l, [["render", h], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image/NmorphImage.vue"]]);
50
52
  export {
51
- I as default
53
+ S as default
52
54
  };
@@ -1,3 +1,4 @@
1
+ import './NmorphImage.css';
1
2
  import { defineComponent as _, computed as t, ref as s } from "vue";
2
3
  import { useModifiers as y } from "../../../utils/create-modifiers.js";
3
4
  import { useI18n as h } from "vue-i18n";
@@ -21,8 +22,8 @@ const b = /* @__PURE__ */ _({
21
22
  r.value = !0, a.value = !0, d("error", i);
22
23
  }, l = t(() => r.value && a.value), v = t(
23
24
  () => y({
24
- nmorph: [`${e.frameBorder > 0 && "shadow-combined"}`],
25
- "nmorph-image": [`${(l.value || !r.value) && "hide"}`]
25
+ nmorph: [e.frameBorder > 0 && "shadow-combined"],
26
+ "nmorph-image": [(l.value || !r.value) && "hide"]
26
27
  })
27
28
  ), T = t(() => ({
28
29
  "--nmorph-image-fit": e.fit || "cover",
@@ -1,18 +1,19 @@
1
1
  import './NmorphImagePreview.css';
2
- import { defineComponent as z, ref as s, watch as F, computed as n } from "vue";
2
+ import { defineComponent as z, ref as u, watch as F, computed as n } from "vue";
3
3
  import { useModifiers as H } from "../../../utils/create-modifiers.js";
4
+ import { toCssSize as m } from "../../../utils/common.js";
4
5
  import R from "../../../assets/icons/shrink.svg.js";
5
6
  import T from "../../../assets/icons/rotate-right.svg.js";
6
7
  import D from "../../../assets/icons/rotate-left.svg.js";
7
8
  import V from "../../../assets/icons/zoom-in.svg.js";
8
9
  import P from "../../../assets/icons/zoom-out.svg.js";
9
10
  import Z from "../../../assets/icons/enlarge.svg.js";
10
- import $ from "../../../assets/icons/chevron-down.svg.js";
11
- import j from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
12
- import E from "../../basic/nmorph-icon/NmorphIcon.vue.js";
13
- import G from "../../basic/nmorph-button/NmorphButton.vue.js";
14
- import J from "../nmorph-image/NmorphImage.vue.js";
15
- const ie = /* @__PURE__ */ z({
11
+ import j from "../../../assets/icons/chevron-down.svg.js";
12
+ import E from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
13
+ import G from "../../basic/nmorph-icon/NmorphIcon.vue.js";
14
+ import J from "../../basic/nmorph-button/NmorphButton.vue.js";
15
+ import K from "../nmorph-image/NmorphImage.vue.js";
16
+ const ue = /* @__PURE__ */ z({
16
17
  __name: "NmorphImagePreview",
17
18
  props: {
18
19
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -33,23 +34,23 @@ const ie = /* @__PURE__ */ z({
33
34
  emits: ["update:model-value"],
34
35
  setup(S, { expose: I, emit: w }) {
35
36
  I();
36
- const e = S, l = s(e.modelValue);
37
+ const e = S, l = u(e.modelValue);
37
38
  F(
38
39
  () => e.modelValue,
39
- (r) => l.value = r
40
+ (a) => l.value = a
40
41
  );
41
42
  const q = n(
42
43
  () => H({
43
- "nmorph-image-preview": [`${l.value && "opened"}`]
44
+ "nmorph-image-preview": [l.value && "opened"]
44
45
  })
45
- ), a = s(e.initialIndex), b = n(() => typeof e.src == "string" ? e.src : e.src[a.value]), t = s(1), x = () => {
46
- l.value = !0, m("update:model-value", l.value);
47
- }, B = () => {
48
- l.value = !1, m("update:model-value", l.value);
46
+ ), o = u(e.initialIndex), B = n(() => typeof e.src == "string" ? e.src : e.src[o.value]), t = u(1), b = () => {
47
+ l.value = !0, s("update:model-value", l.value);
48
+ }, x = () => {
49
+ l.value = !1, s("update:model-value", l.value);
49
50
  }, c = () => {
50
- o.value = o.value + 90, o.value >= 360 && (o.value = 0);
51
+ r.value = r.value + 90, r.value >= 360 && (r.value = 0);
51
52
  }, p = () => {
52
- o.value = o.value - 90, o.value <= -360 && (o.value = 0);
53
+ r.value = r.value - 90, r.value <= -360 && (r.value = 0);
53
54
  }, d = () => {
54
55
  t.value < e.maxScaleLevel && (t.value += e.scaleStep), t.value = parseFloat(t.value.toFixed(3));
55
56
  }, v = () => {
@@ -58,21 +59,21 @@ const ie = /* @__PURE__ */ z({
58
59
  t.value = 1;
59
60
  }, g = () => {
60
61
  t.value = 1;
61
- }, o = s(0), _ = () => {
62
- const r = e.src.length - 1, i = a.value - 1;
63
- i < 0 ? a.value = r : a.value = i;
62
+ }, r = u(0), _ = () => {
63
+ const a = e.src.length - 1, i = o.value - 1;
64
+ i < 0 ? o.value = a : o.value = i;
64
65
  }, L = () => {
65
- const r = e.src.length - 1, i = a.value + 1;
66
- i > r ? a.value = 0 : a.value = i;
66
+ const a = e.src.length - 1, i = o.value + 1;
67
+ i > a ? o.value = 0 : o.value = i;
67
68
  }, A = n(() => {
68
- let r = {
69
+ let a = {
69
70
  icon: R,
70
71
  handler: g
71
72
  };
72
- return f.value && (r = {
73
+ return f.value && (a = {
73
74
  icon: Z,
74
75
  handler: h
75
- }), r;
76
+ }), a;
76
77
  }), C = [
77
78
  {
78
79
  icon: T,
@@ -90,27 +91,27 @@ const ie = /* @__PURE__ */ z({
90
91
  icon: P,
91
92
  handler: v
92
93
  }
93
- ], m = w, N = n(() => Array.isArray(e.src) && e.src.length > 0), M = n(() => e.showNavigationButtons && N.value), u = (r) => typeof r == "number" ? `${r}px` : r, O = n(() => ({
94
- ...e.width !== void 0 && { "--width": u(e.width) },
95
- ...e.height !== void 0 && { "--height": u(e.height) }
94
+ ], s = w, N = n(() => Array.isArray(e.src) && e.src.length > 0), M = n(() => e.showNavigationButtons && N.value), O = n(() => ({
95
+ ...e.width !== void 0 && { "--width": m(e.width) },
96
+ ...e.height !== void 0 && { "--height": m(e.height) }
96
97
  })), k = n(() => ({
97
98
  ...e.navigationButtonMargin !== void 0 && {
98
- "--nmorph-image-preview-btn-margin": u(e.navigationButtonMargin)
99
+ "--nmorph-image-preview-btn-margin": m(e.navigationButtonMargin)
99
100
  }
100
- })), y = { props: e, open: l, modifiers: q, currentIndex: a, triggerSource: b, scaleLevel: t, clickHandler: x, closeHandler: B, rotateRight: c, rotateLeft: p, zoomIn: d, zoomOut: v, isLevelChangedToMin: f, enlargeToNormal: h, shrinkToNormal: g, rotateLevel: o, previousHandler: _, nextHandler: L, enlargeShrinkActionData: A, actions: C, emit: m, multipleSources: N, showNavigation: M, getCssSize: u, triggerStyle: O, portalStyle: k, get NmorphImage() {
101
- return J;
101
+ })), y = { props: e, open: l, modifiers: q, currentIndex: o, triggerSource: B, scaleLevel: t, clickHandler: b, closeHandler: x, rotateRight: c, rotateLeft: p, zoomIn: d, zoomOut: v, isLevelChangedToMin: f, enlargeToNormal: h, shrinkToNormal: g, rotateLevel: r, previousHandler: _, nextHandler: L, enlargeShrinkActionData: A, actions: C, emit: s, multipleSources: N, showNavigation: M, triggerStyle: O, portalStyle: k, get NmorphImage() {
102
+ return K;
102
103
  }, get NmorphButton() {
103
- return G;
104
+ return J;
104
105
  }, get NmorphIcon() {
105
- return E;
106
+ return G;
106
107
  }, get NmorphOverlay() {
107
- return j;
108
+ return E;
108
109
  }, get NmorphIconChevronDown() {
109
- return $;
110
+ return j;
110
111
  } };
111
112
  return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
112
113
  }
113
114
  });
114
115
  export {
115
- ie as default
116
+ ue as default
116
117
  };
@@ -1,27 +1,27 @@
1
1
  import './NmorphPagination.css';
2
- import h from "./NmorphPagination.vue2.js";
3
- import { openBlock as a, createElementBlock as r, normalizeStyle as d, normalizeClass as l, createVNode as e, withCtx as i, Fragment as p, renderList as m, createBlock as t, mergeProps as c, createCommentVNode as _ } from "vue";
2
+ import d from "./NmorphPagination.vue2.js";
3
+ import { openBlock as e, createElementBlock as r, normalizeStyle as p, normalizeClass as t, createVNode as i, withCtx as a, Fragment as m, renderList as c, createBlock as h, mergeProps as s, createCommentVNode as _ } from "vue";
4
4
  /* empty css */
5
- import s from "../../../_virtual/_plugin-vue_export-helper.js";
6
- function g(b, v, f, o, k, N) {
7
- return o.show ? (a(), r(
5
+ import g from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ function b(f, l, v, o, k, N) {
7
+ return o.show ? (e(), r(
8
8
  "div",
9
9
  {
10
10
  key: 0,
11
- class: l(o.modifiers),
12
- style: d(o.paginationStyle)
11
+ class: t(o.modifiers),
12
+ style: p(o.paginationStyle)
13
13
  },
14
14
  [
15
- e(o.NmorphButton, {
15
+ i(o.NmorphButton, {
16
16
  class: "nmorph-pagination__btn nmorph-pagination__prev-btn",
17
17
  height: o.props.height,
18
18
  disabled: o.blockPrevButton || o.props.disabled,
19
19
  onClick: o.prevClick
20
20
  }, {
21
- default: i(() => [
22
- e(o.NmorphIcon, { class: "nmorph-pagination__prev-icon" }, {
23
- default: i(() => [
24
- e(o.NmorphIconChevronDown)
21
+ default: a(() => [
22
+ i(o.NmorphIcon, { class: "nmorph-pagination__prev-icon" }, {
23
+ default: a(() => [
24
+ i(o.NmorphIconChevronDown)
25
25
  ]),
26
26
  _: 1
27
27
  /* STABLE */
@@ -30,29 +30,29 @@ function g(b, v, f, o, k, N) {
30
30
  _: 1
31
31
  /* STABLE */
32
32
  }, 8, ["height", "disabled"]),
33
- e(o.NmorphRadioGroup, {
34
- "model-value": o.selectedPage,
33
+ i(o.NmorphRadioGroup, {
34
+ modelValue: o.selectedPage,
35
+ "onUpdate:modelValue": l[0] || (l[0] = (n) => o.selectedPage = n),
35
36
  class: "nmorph-pagination__page-group",
36
37
  height: o.props.height,
37
- disabled: o.props.disabled,
38
- "onUpdate:modelValue": o.updateSelectedValue
38
+ disabled: o.props.disabled
39
39
  }, {
40
- default: i(() => [
41
- (a(!0), r(
42
- p,
40
+ default: a(() => [
41
+ (e(!0), r(
42
+ m,
43
43
  null,
44
- m(o.visiblePages, (n) => (a(), r("div", {
44
+ c(o.visiblePages, (n) => (e(), r("div", {
45
45
  key: n.value,
46
46
  class: "nmorph-pagination__page-btn-wrapper"
47
47
  }, [
48
- n.value === "prev" || n.value === "next" ? (a(), t(o.NmorphButton, {
48
+ n.value === "prev" || n.value === "next" ? (e(), h(o.NmorphButton, {
49
49
  key: 0,
50
- class: l(`nmorph-pagination__page-btn nmorph-pagination__${n.value}`),
50
+ class: t(`nmorph-pagination__page-btn nmorph-pagination__${n.value}`),
51
51
  text: n.label,
52
52
  height: o.props.height,
53
53
  disabled: o.props.disabled,
54
54
  onClick: (x) => o.bigStepUpdate(n.value)
55
- }, null, 8, ["class", "text", "height", "disabled", "onClick"])) : (a(), t(o.NmorphRadio, c({
55
+ }, null, 8, ["class", "text", "height", "disabled", "onClick"])) : (e(), h(o.NmorphRadio, s({
56
56
  key: 1,
57
57
  ref_for: !0
58
58
  }, n, {
@@ -67,17 +67,17 @@ function g(b, v, f, o, k, N) {
67
67
  ]),
68
68
  _: 1
69
69
  /* STABLE */
70
- }, 8, ["model-value", "height", "disabled"]),
71
- e(o.NmorphButton, {
70
+ }, 8, ["modelValue", "height", "disabled"]),
71
+ i(o.NmorphButton, {
72
72
  class: "nmorph-pagination__btn nmorph-pagination__next-btn",
73
73
  height: o.props.height,
74
74
  disabled: o.blockNextButton || o.props.disabled,
75
75
  onClick: o.nextClick
76
76
  }, {
77
- default: i(() => [
78
- e(o.NmorphIcon, { class: "nmorph-pagination__next-icon" }, {
79
- default: i(() => [
80
- e(o.NmorphIconChevronDown)
77
+ default: a(() => [
78
+ i(o.NmorphIcon, { class: "nmorph-pagination__next-icon" }, {
79
+ default: a(() => [
80
+ i(o.NmorphIconChevronDown)
81
81
  ]),
82
82
  _: 1
83
83
  /* STABLE */
@@ -91,7 +91,7 @@ function g(b, v, f, o, k, N) {
91
91
  /* CLASS, STYLE */
92
92
  )) : _("v-if", !0);
93
93
  }
94
- const u = /* @__PURE__ */ s(h, [["render", g], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-pagination/NmorphPagination.vue"]]);
94
+ const w = /* @__PURE__ */ g(d, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-pagination/NmorphPagination.vue"]]);
95
95
  export {
96
- u as default
96
+ w as default
97
97
  };
@@ -1,12 +1,12 @@
1
1
  import './NmorphPagination.css';
2
- import { defineComponent as q, computed as o, ref as x, watch as k } from "vue";
3
- import { useModifiers as w } from "../../../utils/create-modifiers.js";
4
- import B from "../../form/nmorph-radio/NmorphRadio.vue.js";
5
- import O from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
- import Q from "../../basic/nmorph-button/NmorphButton.vue.js";
7
- import R from "../../form/nmorph-radio-group/NmorphRadioGroup.vue.js";
8
- import V from "../../../assets/icons/chevron-down.svg.js";
9
- const j = /* @__PURE__ */ q({
2
+ import { defineComponent as _, computed as o, ref as q, watch as x } from "vue";
3
+ import { useModifiers as k } from "../../../utils/create-modifiers.js";
4
+ import w from "../../form/nmorph-radio/NmorphRadio.vue.js";
5
+ import B from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
+ import O from "../../basic/nmorph-button/NmorphButton.vue.js";
7
+ import Q from "../../form/nmorph-radio-group/NmorphRadioGroup.vue.js";
8
+ import R from "../../../assets/icons/chevron-down.svg.js";
9
+ const U = /* @__PURE__ */ _({
10
10
  __name: "NmorphPagination",
11
11
  props: {
12
12
  totalElementsQuantity: { type: Number, required: !0 },
@@ -21,59 +21,57 @@ const j = /* @__PURE__ */ q({
21
21
  emits: ["update:model-value"],
22
22
  setup(c, { expose: d, emit: f }) {
23
23
  d();
24
- const r = c, i = f, v = o(
25
- () => w({
26
- "nmorph-pagination": [`${r.disabled && "disabled"}`]
24
+ const t = c, i = f, g = o(
25
+ () => k({
26
+ "nmorph-pagination": [t.disabled && "disabled"]
27
27
  })
28
28
  ), s = {
29
29
  thick: "var(--thick-component)",
30
30
  basic: "var(--default-thickness-component)",
31
31
  thin: "var(--thin-component)"
32
- }, g = o(() => ({
33
- "--nmorph-pagination-height": s[r.height]
32
+ }, v = o(() => ({
33
+ "--nmorph-pagination-height": s[t.height]
34
34
  })), h = () => {
35
35
  a.value = String(Number(a.value) - 1);
36
36
  }, b = () => {
37
37
  a.value = String(Number(a.value) + 1);
38
- }, a = x(String(r.modelValue)), t = o(() => {
39
- const e = r.totalElementsQuantity / r.elementsQuantityOnPage + 1, n = e % 1 === 0 ? -1 : 0;
40
- return Array.from({ length: e + n }, (u, p) => ({ value: String(p + 1), label: String(p + 1) }));
41
- }), N = o(() => r.hideOnSinglePage || r.totalElementsQuantity / r.elementsQuantityOnPage > 1);
42
- k(a, (e) => {
43
- i("update:model-value", Number(e));
38
+ }, a = q(String(t.modelValue)), e = o(() => {
39
+ const r = t.totalElementsQuantity / t.elementsQuantityOnPage + 1, n = r % 1 === 0 ? -1 : 0;
40
+ return Array.from({ length: r + n }, (u, p) => ({ value: String(p + 1), label: String(p + 1) }));
41
+ }), N = o(() => t.hideOnSinglePage || t.totalElementsQuantity / t.elementsQuantityOnPage > 1);
42
+ x(a, (r) => {
43
+ i("update:model-value", Number(r));
44
44
  });
45
- const y = (e) => {
46
- a.value = e;
47
- }, S = o(() => Number(a.value) === 1), P = o(() => t.value.length === Number(a.value)), _ = o(() => {
48
- const e = t.value.length, n = Number(a.value), l = r.maxVisiblePages;
49
- if (e <= l)
50
- return t.value;
45
+ const y = o(() => Number(a.value) === 1), S = o(() => e.value.length === Number(a.value)), P = o(() => {
46
+ const r = e.value.length, n = Number(a.value), l = t.maxVisiblePages;
47
+ if (r <= l)
48
+ return e.value;
51
49
  const u = Math.floor(l / 2);
52
- return n <= u ? [...t.value.slice(0, l - 2), { value: "next", label: "..." }, t.value[e - 1]] : n >= e - u ? [t.value[0], { value: "prev", label: "..." }, ...t.value.slice(e - (l - 2))] : [
53
- t.value[0],
50
+ return n <= u ? [...e.value.slice(0, l - 2), { value: "next", label: "..." }, e.value[r - 1]] : n >= r - u ? [e.value[0], { value: "prev", label: "..." }, ...e.value.slice(r - (l - 2))] : [
51
+ e.value[0],
54
52
  { value: "prev", label: "..." },
55
- ...t.value.slice(n - u, n + u - 1),
53
+ ...e.value.slice(n - u, n + u - 1),
56
54
  { value: "next", label: "..." },
57
- t.value[e - 1]
55
+ e.value[r - 1]
58
56
  ];
59
- }), m = { props: r, emit: i, modifiers: v, heightMap: s, paginationStyle: g, prevClick: h, nextClick: b, selectedPage: a, pages: t, show: N, updateSelectedValue: y, blockPrevButton: S, blockNextButton: P, visiblePages: _, bigStepUpdate: (e) => {
57
+ }), m = { props: t, emit: i, modifiers: g, heightMap: s, paginationStyle: v, prevClick: h, nextClick: b, selectedPage: a, pages: e, show: N, blockPrevButton: y, blockNextButton: S, visiblePages: P, bigStepUpdate: (r) => {
60
58
  const n = Number(a.value);
61
- let l = e === "prev" ? n - r.fastForwardStep : n + r.fastForwardStep;
62
- l <= 0 && (l = 1), l >= t.value.length && (l = t.value.length), a.value = String(l);
59
+ let l = r === "prev" ? n - t.fastForwardStep : n + t.fastForwardStep;
60
+ l <= 0 && (l = 1), l >= e.value.length && (l = e.value.length), a.value = String(l);
63
61
  }, get NmorphRadioGroup() {
64
- return R;
65
- }, get NmorphButton() {
66
62
  return Q;
67
- }, get NmorphIcon() {
63
+ }, get NmorphButton() {
68
64
  return O;
69
- }, get NmorphRadio() {
65
+ }, get NmorphIcon() {
70
66
  return B;
67
+ }, get NmorphRadio() {
68
+ return w;
71
69
  }, get NmorphIconChevronDown() {
72
- return V;
70
+ return R;
73
71
  } };
74
72
  return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
75
73
  }
76
74
  });
77
75
  export {
78
- j as default
76
+ U as default
79
77
  };