@nmorph/nmorph-ui-kit 2.2.35 → 2.2.36

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 (108) 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 +5 -5
  46. package/dist/components/basic/nmorph-icon/NmorphIcons.js +617 -529
  47. package/dist/components/basic/nmorph-layout/NmorphLayout.css +1 -0
  48. package/dist/components/basic/nmorph-layout/NmorphLayout.vue.js +50 -0
  49. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +28 -0
  50. package/dist/components/basic/nmorph-space/NmorphSpace.css +1 -0
  51. package/dist/components/basic/nmorph-space/NmorphSpace.vue.js +21 -0
  52. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +45 -0
  53. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +15 -15
  54. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +1 -1
  55. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +31 -31
  56. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +36 -38
  57. package/dist/components/data/nmorph-qr-code/NmorphQRCode.css +1 -0
  58. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue.js +59 -0
  59. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +50 -0
  60. package/dist/components/data/nmorph-qr-code/qr-code.js +568 -0
  61. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.css +1 -0
  62. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue.js +86 -0
  63. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +60 -0
  64. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.css +1 -0
  65. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +81 -0
  66. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +47 -0
  67. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +30 -30
  68. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +57 -54
  69. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js +13 -13
  70. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +28 -27
  71. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.js +16 -16
  72. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue2.js +20 -17
  73. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue.js +21 -21
  74. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +92 -84
  75. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +5 -5
  76. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +1 -1
  77. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +1 -1
  78. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +16 -16
  79. package/dist/components/form/nmorph-textarea/NmorphTextarea.css +1 -0
  80. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +41 -0
  81. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +67 -0
  82. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  83. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +38 -28
  84. package/dist/icons.js +621 -533
  85. package/dist/index.es.js +780 -678
  86. package/dist/index.umd.js +27 -27
  87. package/dist/package.json.js +1 -1
  88. package/dist/src/components/basic/index.d.ts +2 -0
  89. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +48 -3
  90. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +22 -0
  91. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +33 -0
  92. package/dist/src/components/data/index.d.ts +4 -0
  93. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +34 -0
  94. package/dist/src/components/data/nmorph-qr-code/qr-code.d.ts +12 -0
  95. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +46 -0
  96. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +4 -0
  97. package/dist/src/components/feedback/index.d.ts +1 -0
  98. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +40 -0
  99. package/dist/src/components/form/index.d.ts +1 -0
  100. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +1 -1
  101. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +2 -2
  102. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +1 -1
  103. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +48 -0
  104. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  105. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +1 -1
  106. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +1 -1
  107. package/dist/style.css +1 -1
  108. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ .nmorph-layout{display:flex;flex-direction:column;gap:var(--nmorph-layout-gap);box-sizing:border-box;width:100%;min-width:0}.nmorph-layout--full-height{min-height:100%}.nmorph-layout .nmorph-layout__header,.nmorph-layout .nmorph-layout__footer{flex:0 0 auto;min-width:0}.nmorph-layout .nmorph-layout__body{display:flex;flex:1 1 auto;gap:var(--nmorph-layout-gap);min-width:0;min-height:0}.nmorph-layout .nmorph-layout__aside{flex:0 0 var(--nmorph-layout-aside-width);width:var(--nmorph-layout-aside-width);min-width:0}.nmorph-layout .nmorph-layout__main{flex:1 1 auto;min-width:0;min-height:0}
@@ -0,0 +1,50 @@
1
+ import './NmorphLayout.css';
2
+ import l from "./NmorphLayout.vue2.js";
3
+ import { openBlock as s, createBlock as n, resolveDynamicComponent as d, normalizeStyle as m, normalizeClass as _, withCtx as c, createElementBlock as r, renderSlot as t, createCommentVNode as a, createElementVNode as i } from "vue";
4
+ /* empty css */
5
+ import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const f = {
7
+ key: 0,
8
+ class: "nmorph-layout__header"
9
+ }, p = { class: "nmorph-layout__body" }, y = {
10
+ key: 0,
11
+ class: "nmorph-layout__aside"
12
+ }, u = { class: "nmorph-layout__main" }, k = {
13
+ key: 1,
14
+ class: "nmorph-layout__aside"
15
+ }, v = {
16
+ key: 1,
17
+ class: "nmorph-layout__footer"
18
+ };
19
+ function b(e, C, N, o, B, g) {
20
+ return s(), n(d(o.props.tag), {
21
+ class: _(o.modifiers),
22
+ style: m(o.styles)
23
+ }, {
24
+ default: c(() => [
25
+ o.slots.header ? (s(), r("header", f, [
26
+ t(e.$slots, "header")
27
+ ])) : a("v-if", !0),
28
+ i("div", p, [
29
+ o.slots.aside && o.props.asidePosition === "left" ? (s(), r("aside", y, [
30
+ t(e.$slots, "aside")
31
+ ])) : a("v-if", !0),
32
+ i("main", u, [
33
+ t(e.$slots, "default")
34
+ ]),
35
+ o.slots.aside && o.props.asidePosition === "right" ? (s(), r("aside", k, [
36
+ t(e.$slots, "aside")
37
+ ])) : a("v-if", !0)
38
+ ]),
39
+ o.slots.footer ? (s(), r("footer", v, [
40
+ t(e.$slots, "footer")
41
+ ])) : a("v-if", !0)
42
+ ]),
43
+ _: 3
44
+ /* FORWARDED */
45
+ }, 8, ["class", "style"]);
46
+ }
47
+ const S = /* @__PURE__ */ h(l, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/basic/nmorph-layout/NmorphLayout.vue"]]);
48
+ export {
49
+ S as default
50
+ };
@@ -0,0 +1,28 @@
1
+ import './NmorphLayout.css';
2
+ import { defineComponent as l, useSlots as d, computed as r } from "vue";
3
+ import { useModifiers as f } from "../../../utils/create-modifiers.js";
4
+ const g = /* @__PURE__ */ l({
5
+ __name: "NmorphLayout",
6
+ props: {
7
+ tag: { type: String, required: !1, default: "section" },
8
+ gap: { type: [Number, String], required: !1, default: 0 },
9
+ asideWidth: { type: [Number, String], required: !1, default: "240px" },
10
+ asidePosition: { type: String, required: !1, default: "left" },
11
+ fullHeight: { type: Boolean, required: !1, default: !1 }
12
+ },
13
+ setup(i, { expose: a }) {
14
+ a();
15
+ const e = i, p = d(), u = r(
16
+ () => f({
17
+ "nmorph-layout": [`aside-${e.asidePosition}`, `${e.fullHeight && "full-height"}`]
18
+ })
19
+ ), t = (s) => typeof s == "number" ? `${s}px` : s, n = r(() => ({
20
+ "--nmorph-layout-gap": t(e.gap),
21
+ "--nmorph-layout-aside-width": t(e.asideWidth)
22
+ })), o = { props: e, slots: p, modifiers: u, getCssSize: t, styles: n };
23
+ return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
24
+ }
25
+ });
26
+ export {
27
+ g as default
28
+ };
@@ -0,0 +1 @@
1
+ .nmorph-space{display:flex;flex-direction:row;gap:var(--nmorph-space-gap);justify-content:var(--nmorph-space-justify);align-items:var(--nmorph-space-align);min-width:0}.nmorph-space--column{flex-direction:column}.nmorph-space--wrap{flex-wrap:wrap}.nmorph-space--inline{display:inline-flex}.nmorph-space--fill{width:100%}
@@ -0,0 +1,21 @@
1
+ import './NmorphSpace.css';
2
+ import r from "./NmorphSpace.vue2.js";
3
+ import { openBlock as s, createBlock as t, resolveDynamicComponent as a, normalizeStyle as l, normalizeClass as c, withCtx as n, renderSlot as p } from "vue";
4
+ /* empty css */
5
+ import m from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ function i(e, f, _, o, d, h) {
7
+ return s(), t(a(o.props.tag), {
8
+ class: c(o.modifiers),
9
+ style: l(o.styles)
10
+ }, {
11
+ default: n(() => [
12
+ p(e.$slots, "default")
13
+ ]),
14
+ _: 3
15
+ /* FORWARDED */
16
+ }, 8, ["class", "style"]);
17
+ }
18
+ const k = /* @__PURE__ */ m(r, [["render", i], ["__file", "/builds/ketjo/nmorph/library/src/components/basic/nmorph-space/NmorphSpace.vue"]]);
19
+ export {
20
+ k as default
21
+ };
@@ -0,0 +1,45 @@
1
+ import './NmorphSpace.css';
2
+ import { defineComponent as d, computed as r } from "vue";
3
+ import { useModifiers as m } from "../../../utils/create-modifiers.js";
4
+ const g = /* @__PURE__ */ d({
5
+ __name: "NmorphSpace",
6
+ props: {
7
+ tag: { type: String, required: !1, default: "div" },
8
+ direction: { type: String, required: !1, default: "row" },
9
+ size: { type: [String, Number], required: !1, default: "medium" },
10
+ align: { type: String, required: !1, default: "start" },
11
+ justify: { type: String, required: !1, default: "start" },
12
+ wrap: { type: Boolean, required: !1, default: !1 },
13
+ inline: { type: Boolean, required: !1, default: !1 },
14
+ fill: { type: Boolean, required: !1, default: !1 }
15
+ },
16
+ setup(f, { expose: p }) {
17
+ p();
18
+ const e = f, i = {
19
+ small: "4px",
20
+ medium: "8px",
21
+ large: "16px"
22
+ }, o = r(
23
+ () => m({
24
+ "nmorph-space": [
25
+ e.direction,
26
+ `${e.wrap && "wrap"}`,
27
+ `${e.inline && "inline"}`,
28
+ `${e.fill && "fill"}`
29
+ ]
30
+ })
31
+ ), s = (t) => typeof t == "number" ? `${t}px` : i[t] || t, a = r(
32
+ () => e.align === "start" || e.align === "end" ? `flex-${e.align}` : e.align
33
+ ), n = r(
34
+ () => e.justify === "start" || e.justify === "end" ? `flex-${e.justify}` : e.justify
35
+ ), u = r(() => ({
36
+ "--nmorph-space-gap": s(e.size),
37
+ "--nmorph-space-align": a.value,
38
+ "--nmorph-space-justify": n.value
39
+ })), l = { props: e, sizeMap: i, modifiers: o, getCssSize: s, alignItems: a, justifyContent: n, styles: u };
40
+ return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
41
+ }
42
+ });
43
+ export {
44
+ g as default
45
+ };
@@ -1,6 +1,6 @@
1
1
  import './NmorphAvatar.css';
2
2
  import p from "./NmorphAvatar.vue2.js";
3
- import { openBlock as e, createElementBlock as l, normalizeStyle as n, normalizeClass as h, createVNode as i, withCtx as a, renderSlot as c, toDisplayString as s, createBlock as o, resolveDynamicComponent as d, createCommentVNode as v } from "vue";
3
+ import { openBlock as e, createElementBlock as l, normalizeStyle as n, normalizeClass as h, createVNode as o, withCtx as a, renderSlot as c, toDisplayString as s, createBlock as i, resolveDynamicComponent as d, createCommentVNode as v } from "vue";
4
4
  /* empty css */
5
5
  import S from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  function w(m, t, _, r, y, I) {
@@ -12,7 +12,7 @@ function w(m, t, _, r, y, I) {
12
12
  onClick: r.openPreview
13
13
  },
14
14
  [
15
- i(r.NmorphImage, {
15
+ o(r.NmorphImage, {
16
16
  fit: r.props.fit,
17
17
  src: r.imageSrc,
18
18
  "src-set": r.props.srcSet,
@@ -22,9 +22,9 @@ function w(m, t, _, r, y, I) {
22
22
  onError: r.onImageError
23
23
  }, {
24
24
  loading: a(() => [
25
- i(r.NmorphIcon, { size: "small" }, {
25
+ o(r.NmorphIcon, { size: "small" }, {
26
26
  default: a(() => [
27
- i(r.NmorphIconLoader)
27
+ o(r.NmorphIconLoaderDots)
28
28
  ]),
29
29
  _: 1
30
30
  /* STABLE */
@@ -42,12 +42,12 @@ function w(m, t, _, r, y, I) {
42
42
  s(r.initials),
43
43
  5
44
44
  /* TEXT, STYLE */
45
- )) : (e(), o(r.NmorphIcon, {
45
+ )) : (e(), i(r.NmorphIcon, {
46
46
  key: 1,
47
47
  width: r.stubIconSize
48
48
  }, {
49
49
  default: a(() => [
50
- (e(), o(d(r.fallback)))
50
+ (e(), i(d(r.fallback)))
51
51
  ]),
52
52
  _: 1
53
53
  /* STABLE */
@@ -68,33 +68,33 @@ function w(m, t, _, r, y, I) {
68
68
  s(r.initials),
69
69
  5
70
70
  /* TEXT, STYLE */
71
- )) : (e(), o(r.NmorphIcon, {
71
+ )) : (e(), i(r.NmorphIcon, {
72
72
  key: 1,
73
73
  width: r.stubIconSize
74
74
  }, {
75
75
  default: a(() => [
76
- (e(), o(d(r.fallback)))
76
+ (e(), i(d(r.fallback)))
77
77
  ]),
78
78
  _: 1
79
79
  /* STABLE */
80
80
  }, 8, ["width"]))
81
81
  ]),
82
- r.previewAvailable ? (e(), o(r.NmorphImagePreview, {
82
+ r.previewAvailable ? (e(), i(r.NmorphImagePreview, {
83
83
  key: 1,
84
+ modelValue: r.previewOpen,
85
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => r.previewOpen = f),
84
86
  "show-trigger": !1,
85
- "model-value": r.previewOpen,
86
87
  src: r.imagePreviewSrc,
87
88
  alt: r.props.alt,
88
89
  "initial-index": r.props.previewInitialIndex,
89
90
  "scale-step": r.props.previewScaleStep,
90
91
  "min-scale-level": r.props.previewMinScaleLevel,
91
- "max-scale-level": r.props.previewMaxScaleLevel,
92
- "onUpdate:modelValue": t[0] || (t[0] = (f) => r.previewOpen = f)
92
+ "max-scale-level": r.props.previewMaxScaleLevel
93
93
  }, {
94
94
  loading: a(() => [
95
- i(r.NmorphIcon, { size: "small" }, {
95
+ o(r.NmorphIcon, { size: "small" }, {
96
96
  default: a(() => [
97
- i(r.NmorphIconLoader)
97
+ o(r.NmorphIconLoaderDots)
98
98
  ]),
99
99
  _: 1
100
100
  /* STABLE */
@@ -102,7 +102,7 @@ function w(m, t, _, r, y, I) {
102
102
  ]),
103
103
  _: 1
104
104
  /* STABLE */
105
- }, 8, ["model-value", "src", "alt", "initial-index", "scale-step", "min-scale-level", "max-scale-level"])) : v("v-if", !0)
105
+ }, 8, ["modelValue", "src", "alt", "initial-index", "scale-step", "min-scale-level", "max-scale-level"])) : v("v-if", !0)
106
106
  ],
107
107
  6
108
108
  /* CLASS, STYLE */
@@ -63,7 +63,7 @@ const J = /* @__PURE__ */ $({
63
63
  return C;
64
64
  }, get NmorphIcon() {
65
65
  return k;
66
- }, get NmorphIconLoader() {
66
+ }, get NmorphIconLoaderDots() {
67
67
  return M;
68
68
  }, NmorphImagePreview: L };
69
69
  return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
@@ -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
  };
@@ -0,0 +1 @@
1
+ .nmorph-qr-code{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:var(--nmorph-qr-code-size);height:var(--nmorph-qr-code-size);padding:var(--indentation-02);color:var(--nmorph-text-color);background:var(--nmorph-qr-code-background);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-outset)}.nmorph-qr-code .nmorph-qr-code__svg{display:block;width:100%;height:100%}.nmorph-qr-code .nmorph-qr-code__error{box-sizing:border-box;max-width:100%;padding:var(--indentation-02);overflow:hidden;color:var(--nmorph-error-text-color);font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);text-align:center;text-overflow:ellipsis}
@@ -0,0 +1,59 @@
1
+ import './NmorphQRCode.css';
2
+ import l from "./NmorphQRCode.vue2.js";
3
+ import { openBlock as o, createElementBlock as r, normalizeStyle as n, normalizeClass as c, toDisplayString as t, createCommentVNode as d, createElementVNode as i, renderSlot as a, createTextVNode as m } from "vue";
4
+ /* empty css */
5
+ import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const p = ["viewBox"], h = { key: 0 }, f = ["fill"], g = ["d", "fill"], v = {
7
+ key: 1,
8
+ class: "nmorph-qr-code__error"
9
+ };
10
+ function w(s, x, y, e, k, B) {
11
+ return o(), r(
12
+ "div",
13
+ {
14
+ class: c(e.modifiers),
15
+ style: n(e.styles)
16
+ },
17
+ [
18
+ e.qrCode ? (o(), r("svg", {
19
+ key: 0,
20
+ class: "nmorph-qr-code__svg",
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ viewBox: `0 0 ${e.viewBoxSize} ${e.viewBoxSize}`,
23
+ role: "img",
24
+ "shape-rendering": "crispEdges"
25
+ }, [
26
+ e.props.title ? (o(), r(
27
+ "title",
28
+ h,
29
+ t(e.props.title),
30
+ 1
31
+ /* TEXT */
32
+ )) : d("v-if", !0),
33
+ i("rect", {
34
+ width: "100%",
35
+ height: "100%",
36
+ fill: e.props.background
37
+ }, null, 8, f),
38
+ i("path", {
39
+ d: e.path,
40
+ fill: e.props.color
41
+ }, null, 8, g)
42
+ ], 8, p)) : (o(), r("div", v, [
43
+ a(s.$slots, "error", { message: e.errorMessage }, () => [
44
+ m(
45
+ t(e.errorMessage),
46
+ 1
47
+ /* TEXT */
48
+ )
49
+ ])
50
+ ]))
51
+ ],
52
+ 6
53
+ /* CLASS, STYLE */
54
+ );
55
+ }
56
+ const z = /* @__PURE__ */ _(l, [["render", w], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-qr-code/NmorphQRCode.vue"]]);
57
+ export {
58
+ z as default
59
+ };
@@ -0,0 +1,50 @@
1
+ import './NmorphQRCode.css';
2
+ import { defineComponent as q, computed as o } from "vue";
3
+ import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
+ import { createNmorphQRCode as s } from "./qr-code.js";
5
+ const x = /* @__PURE__ */ q({
6
+ __name: "NmorphQRCode",
7
+ props: {
8
+ value: { type: [String, Number], required: !1, default: "" },
9
+ size: { type: [Number, String], required: !1, default: 160 },
10
+ margin: { type: Number, required: !1, default: 4 },
11
+ color: { type: String, required: !1, default: "var(--nmorph-text-color)" },
12
+ background: { type: String, required: !1, default: "var(--nmorph-main-color)" },
13
+ level: { type: String, required: !1, default: "medium" },
14
+ minVersion: { type: Number, required: !1, default: 1 },
15
+ maxVersion: { type: Number, required: !1, default: 40 },
16
+ title: { type: String, required: !1, default: "" }
17
+ },
18
+ setup(u, { expose: l }) {
19
+ l();
20
+ const e = u, n = o(() => {
21
+ try {
22
+ return s(String(e.value), {
23
+ errorCorrectionLevel: e.level,
24
+ minVersion: e.minVersion,
25
+ maxVersion: e.maxVersion
26
+ }), "";
27
+ } catch (r) {
28
+ return r instanceof Error ? r.message : "Unable to create QR code.";
29
+ }
30
+ }), t = o(() => n.value ? null : s(String(e.value), {
31
+ errorCorrectionLevel: e.level,
32
+ minVersion: e.minVersion,
33
+ maxVersion: e.maxVersion
34
+ })), m = o(() => t.value ? t.value.size + e.margin * 2 : 1), d = o(() => t.value ? t.value.modules.flatMap(
35
+ (r, f) => r.map((g, v) => g ? `M${v + e.margin} ${f + e.margin}h1v1h-1z` : "").filter(Boolean)
36
+ ).join("") : ""), i = (r) => typeof r == "number" ? `${r}px` : r, p = o(() => ({
37
+ "--nmorph-qr-code-size": i(e.size),
38
+ "--nmorph-qr-code-color": e.color,
39
+ "--nmorph-qr-code-background": e.background
40
+ })), c = o(
41
+ () => y({
42
+ "nmorph-qr-code": [`${n.value && "error"}`]
43
+ })
44
+ ), a = { props: e, errorMessage: n, qrCode: t, viewBoxSize: m, path: d, getCssSize: i, styles: p, modifiers: c };
45
+ return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
46
+ }
47
+ });
48
+ export {
49
+ x as default
50
+ };