@nmorph/nmorph-ui-kit 3.0.4 → 3.0.6

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 (59) hide show
  1. package/dist/assets/icons/chevron-right.svg.js +2 -2
  2. package/dist/assets/icons/hand.svg.js +10 -28
  3. package/dist/assets/icons/mic.svg.js +6 -6
  4. package/dist/assets/icons/mute.svg.js +6 -6
  5. package/dist/assets/icons/pin.svg.js +5 -5
  6. package/dist/assets/icons/video-camera-off.svg.js +6 -6
  7. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +9 -9
  8. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -1
  9. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +25 -20
  10. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
  11. package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
  12. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +23 -18
  13. package/dist/components/data/nmorph-carousel/NmorphCarousel.css +1 -1
  14. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +10 -10
  15. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +23 -20
  16. package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -1
  17. package/dist/components/data/nmorph-file-card/NmorphFileCard.vue2.js +7 -7
  18. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +1 -1
  19. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.css +1 -1
  20. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +82 -87
  21. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +80 -35
  22. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +87 -91
  23. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +71 -44
  24. package/dist/components/data/nmorph-table/NmorphTable.vue.js +114 -162
  25. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -1
  26. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +4 -4
  27. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue2.js +25 -25
  28. package/dist/components/feedback/nmorph-guide/NmorphGuide.vue2.js +66 -61
  29. package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue.js +25 -23
  30. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
  31. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +88 -48
  32. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +75 -59
  33. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
  34. package/dist/components/form/nmorph-select-button/NmorphSelectButton.css +1 -1
  35. package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.css +1 -1
  36. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  37. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +128 -95
  38. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +73 -71
  39. package/dist/components/navigation/nmorph-stepper/NmorphStepper.css +1 -1
  40. package/dist/components/navigation/nmorph-stepper/NmorphStepper.vue.js +49 -26
  41. package/dist/index.umd.js +20 -20
  42. package/dist/package.json.js +1 -1
  43. package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +0 -3
  44. package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +1 -0
  45. package/dist/src/components/basic/nmorph-scroll/types.d.ts +1 -0
  46. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +1 -0
  47. package/dist/src/components/data/nmorph-card/types.d.ts +1 -0
  48. package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +2 -1
  49. package/dist/src/components/data/nmorph-media-tile/types.d.ts +1 -1
  50. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -0
  51. package/dist/src/components/data/nmorph-pagination/types.d.ts +1 -0
  52. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +0 -1
  53. package/dist/src/components/feedback/nmorph-guide/NmorphGuide.vue.d.ts +2 -0
  54. package/dist/src/components/feedback/nmorph-guide/types.d.ts +4 -0
  55. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +2 -0
  56. package/dist/src/components/feedback/nmorph-tooltip/types.d.ts +2 -0
  57. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +10 -2
  58. package/dist/style.css +1 -1
  59. package/package.json +1 -1
@@ -1,97 +1,93 @@
1
1
  import './NmorphPagination.css';
2
- import d from "./NmorphPagination.vue2.js";
3
- import { openBlock as e, createElementBlock as l, normalizeStyle as c, normalizeClass as t, createVNode as a, withCtx as i, Fragment as p, renderList as m, createBlock as s, createCommentVNode as h } from "vue";
2
+ import c from "./NmorphPagination.vue2.js";
3
+ import { openBlock as a, createElementBlock as l, normalizeStyle as d, normalizeClass as t, createVNode as i, withCtx as e, Fragment as h, renderList as m, createBlock as s, createCommentVNode as p } from "vue";
4
4
  /* empty css */
5
5
  import _ from "../../../_virtual/_plugin-vue_export-helper.js";
6
- function b(k, r, v, n, g, f) {
7
- return n.show ? (e(), l(
8
- "div",
9
- {
10
- key: 0,
11
- class: t(n.modifiers),
12
- style: c(n.paginationStyle)
13
- },
14
- [
15
- a(n.NmorphButton, {
16
- class: "nmorph-pagination__btn nmorph-pagination__prev-btn",
17
- thickness: n.props.thickness,
18
- disabled: n.blockPrevButton || n.props.disabled,
19
- onClick: n.prevClick
20
- }, {
21
- default: i(() => [
22
- a(n.NmorphIcon, { class: "nmorph-pagination__prev-icon" }, {
23
- default: i(() => [
24
- a(n.NmorphIconChevronDown)
25
- ]),
26
- _: 1
27
- /* STABLE */
28
- })
29
- ]),
30
- _: 1
31
- /* STABLE */
32
- }, 8, ["thickness", "disabled"]),
33
- a(n.NmorphRadioGroup, {
34
- modelValue: n.selectedPage,
35
- "onUpdate:modelValue": r[0] || (r[0] = (o) => n.selectedPage = o),
36
- class: "nmorph-pagination__page-group",
37
- thickness: n.props.thickness,
38
- disabled: n.props.disabled
39
- }, {
40
- default: i(() => [
41
- (e(!0), l(
42
- p,
43
- null,
44
- m(n.visiblePages, (o) => (e(), l("div", {
45
- key: o.value,
46
- class: "nmorph-pagination__page-btn-wrapper"
47
- }, [
48
- o.value === "prev" || o.value === "next" ? (e(), s(n.NmorphButton, {
49
- key: 0,
50
- class: t(`nmorph-pagination__page-btn nmorph-pagination__${o.value}`),
51
- text: o.label,
52
- thickness: n.props.thickness,
53
- disabled: n.props.disabled,
54
- onClick: (N) => n.bigStepUpdate(o.value)
55
- }, null, 8, ["class", "text", "thickness", "disabled", "onClick"])) : (e(), s(n.NmorphRadio, {
56
- key: 1,
57
- value: o.value,
58
- label: o.label,
59
- class: "nmorph-pagination__page-btn",
60
- thickness: n.props.thickness,
61
- disabled: n.props.disabled
62
- }, null, 8, ["value", "label", "thickness", "disabled"]))
63
- ]))),
64
- 128
65
- /* KEYED_FRAGMENT */
66
- ))
67
- ]),
68
- _: 1
69
- /* STABLE */
70
- }, 8, ["modelValue", "thickness", "disabled"]),
71
- a(n.NmorphButton, {
72
- class: "nmorph-pagination__btn nmorph-pagination__next-btn",
73
- thickness: n.props.thickness,
74
- disabled: n.blockNextButton || n.props.disabled,
75
- onClick: n.nextClick
76
- }, {
77
- default: i(() => [
78
- a(n.NmorphIcon, { class: "nmorph-pagination__next-icon" }, {
79
- default: i(() => [
80
- a(n.NmorphIconChevronDown)
81
- ]),
82
- _: 1
83
- /* STABLE */
84
- })
85
- ]),
86
- _: 1
87
- /* STABLE */
88
- }, 8, ["thickness", "disabled"])
89
- ],
90
- 6
91
- /* CLASS, STYLE */
92
- )) : h("v-if", !0);
6
+ const b = ["aria-busy"];
7
+ function k(v, r, g, n, f, N) {
8
+ return n.show ? (a(), l("div", {
9
+ key: 0,
10
+ class: t(n.modifiers),
11
+ style: d(n.paginationStyle),
12
+ "aria-busy": n.props.loading || void 0
13
+ }, [
14
+ i(n.NmorphButton, {
15
+ class: "nmorph-pagination__btn nmorph-pagination__prev-btn",
16
+ thickness: n.props.thickness,
17
+ disabled: n.blockPrevButton || n.interactionDisabled,
18
+ onClick: n.prevClick
19
+ }, {
20
+ default: e(() => [
21
+ i(n.NmorphIcon, { class: "nmorph-pagination__prev-icon" }, {
22
+ default: e(() => [
23
+ i(n.NmorphIconChevronDown)
24
+ ]),
25
+ _: 1
26
+ /* STABLE */
27
+ })
28
+ ]),
29
+ _: 1
30
+ /* STABLE */
31
+ }, 8, ["thickness", "disabled"]),
32
+ i(n.NmorphRadioGroup, {
33
+ modelValue: n.selectedPage,
34
+ "onUpdate:modelValue": r[0] || (r[0] = (o) => n.selectedPage = o),
35
+ class: "nmorph-pagination__page-group",
36
+ thickness: n.props.thickness,
37
+ disabled: n.interactionDisabled
38
+ }, {
39
+ default: e(() => [
40
+ (a(!0), l(
41
+ h,
42
+ null,
43
+ m(n.visiblePages, (o) => (a(), l("div", {
44
+ key: o.value,
45
+ class: "nmorph-pagination__page-btn-wrapper"
46
+ }, [
47
+ o.value === "prev" || o.value === "next" ? (a(), s(n.NmorphButton, {
48
+ key: 0,
49
+ class: t(`nmorph-pagination__page-btn nmorph-pagination__${o.value}`),
50
+ text: o.label,
51
+ thickness: n.props.thickness,
52
+ disabled: n.interactionDisabled,
53
+ onClick: (x) => n.bigStepUpdate(o.value)
54
+ }, null, 8, ["class", "text", "thickness", "disabled", "onClick"])) : (a(), s(n.NmorphRadio, {
55
+ key: 1,
56
+ value: o.value,
57
+ label: o.label,
58
+ class: "nmorph-pagination__page-btn",
59
+ thickness: n.props.thickness,
60
+ disabled: n.interactionDisabled
61
+ }, null, 8, ["value", "label", "thickness", "disabled"]))
62
+ ]))),
63
+ 128
64
+ /* KEYED_FRAGMENT */
65
+ ))
66
+ ]),
67
+ _: 1
68
+ /* STABLE */
69
+ }, 8, ["modelValue", "thickness", "disabled"]),
70
+ i(n.NmorphButton, {
71
+ class: "nmorph-pagination__btn nmorph-pagination__next-btn",
72
+ thickness: n.props.thickness,
73
+ disabled: n.blockNextButton || n.interactionDisabled,
74
+ onClick: n.nextClick
75
+ }, {
76
+ default: e(() => [
77
+ i(n.NmorphIcon, { class: "nmorph-pagination__next-icon" }, {
78
+ default: e(() => [
79
+ i(n.NmorphIconChevronDown)
80
+ ]),
81
+ _: 1
82
+ /* STABLE */
83
+ })
84
+ ]),
85
+ _: 1
86
+ /* STABLE */
87
+ }, 8, ["thickness", "disabled"])
88
+ ], 14, b)) : p("v-if", !0);
93
89
  }
94
- const P = /* @__PURE__ */ _(d, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-pagination/NmorphPagination.vue"]]);
90
+ const u = /* @__PURE__ */ _(c, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-pagination/NmorphPagination.vue"]]);
95
91
  export {
96
- P as default
92
+ u as default
97
93
  };
@@ -1,77 +1,104 @@
1
1
  import './NmorphPagination.css';
2
- import { defineComponent as _, computed as l, ref as k, watch as q } from "vue";
3
- import { useModifiers as x } 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";
2
+ import { defineComponent as O, computed as n, ref as g, watch as c } from "vue";
3
+ import { useModifiers as Q } from "../../../utils/create-modifiers.js";
4
+ import V from "../../form/nmorph-radio/NmorphRadio.vue.js";
5
+ import F from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
+ import M from "../../basic/nmorph-button/NmorphButton.vue.js";
7
+ import I from "../../form/nmorph-radio-group/NmorphRadioGroup.vue.js";
8
8
  import R from "../../../assets/icons/chevron-down.svg.js";
9
- const U = /* @__PURE__ */ _({
9
+ const z = /* @__PURE__ */ O({
10
10
  __name: "NmorphPagination",
11
11
  props: {
12
12
  totalElementsQuantity: { type: Number, required: !0 },
13
13
  modelValue: { type: Number, required: !1, default: 1 },
14
14
  elementsQuantityOnPage: { type: Number, required: !1, default: 2 },
15
15
  disabled: { type: Boolean, required: !1, default: !1 },
16
+ loading: { type: Boolean, required: !1, default: !1 },
16
17
  hideOnSinglePage: { type: Boolean, required: !1, default: !0 },
17
18
  maxVisiblePages: { type: Number, required: !1, default: 9 },
18
19
  fastForwardStep: { type: Number, required: !1, default: 5 },
19
20
  thickness: { type: null, required: !1, default: "basic" }
20
21
  },
21
22
  emits: ["update:model-value"],
22
- setup(c, { expose: d, emit: f }) {
23
- d();
24
- const t = c, i = f, v = l(
25
- () => x({
26
- "nmorph-pagination": [t.disabled && "disabled"]
23
+ setup(b, { expose: h, emit: N }) {
24
+ h();
25
+ const t = b, p = N, S = n(
26
+ () => Q({
27
+ "nmorph-pagination": [t.disabled && "disabled", t.loading && "loading"]
27
28
  })
28
- ), s = {
29
+ ), d = {
29
30
  thick: "var(--thick-component)",
30
31
  basic: "var(--basic-component)",
31
32
  thin: "var(--thin-component)"
32
- }, g = l(() => ({
33
- "--nmorph-private-pagination-height": s[t.thickness]
34
- })), h = () => {
35
- a.value = String(Number(a.value) - 1);
36
- }, b = () => {
37
- a.value = String(Number(a.value) + 1);
38
- }, a = k(String(t.modelValue)), e = l(() => {
39
- const r = t.totalElementsQuantity / t.elementsQuantityOnPage + 1, o = r % 1 === 0 ? -1 : 0;
40
- return Array.from({ length: r + o }, (u, p) => ({ value: String(p + 1), label: String(p + 1) }));
41
- }), N = l(() => t.hideOnSinglePage || t.totalElementsQuantity / t.elementsQuantityOnPage > 1);
42
- q(a, (r) => {
43
- i("update:model-value", Number(r));
33
+ }, y = n(() => ({
34
+ "--nmorph-private-pagination-height": d[t.thickness]
35
+ })), P = n(() => t.disabled || t.loading), k = () => {
36
+ r.value = String(Number(r.value) - 1);
37
+ }, _ = () => {
38
+ r.value = String(Number(r.value) + 1);
39
+ }, r = g(String(t.modelValue)), u = n(() => {
40
+ const e = Number(t.totalElementsQuantity), a = Number(t.elementsQuantityOnPage);
41
+ return !Number.isFinite(e) || !Number.isFinite(a) || e <= 0 || a <= 0 ? 0 : Math.ceil(e / a);
42
+ }), i = n(
43
+ () => Array.from({ length: u.value }, (e, a) => ({ value: String(a + 1), label: String(a + 1) }))
44
+ ), s = g([]), v = n(() => {
45
+ const e = String(Math.max(1, Number(r.value) || 1));
46
+ return [{ value: e, label: e }];
47
+ }), l = n(() => t.loading && s.value.length ? s.value : i.value.length ? i.value : v.value), q = n(() => t.loading || !t.hideOnSinglePage || u.value > 1);
48
+ c(r, (e) => {
49
+ p("update:model-value", Number(e));
50
+ }), c(
51
+ [i, () => t.loading],
52
+ ([e, a]) => {
53
+ (e.length || !a) && (s.value = e);
54
+ },
55
+ { immediate: !0 }
56
+ ), c(
57
+ () => t.modelValue,
58
+ (e) => {
59
+ r.value = String(e);
60
+ }
61
+ ), c([u, () => t.loading], ([e, a]) => {
62
+ a || e <= 0 || Number(r.value) > e && (r.value = String(e));
44
63
  });
45
- const y = l(() => Number(a.value) === 1), S = l(() => e.value.length === Number(a.value)), P = l(() => {
46
- const r = e.value.length, o = Number(a.value), n = t.maxVisiblePages;
47
- if (r <= n)
48
- return e.value;
49
- const u = Math.floor(n / 2);
50
- return o <= u ? [...e.value.slice(0, n - 2), { value: "next", label: "..." }, e.value[r - 1]] : o >= r - u ? [e.value[0], { value: "prev", label: "..." }, ...e.value.slice(r - (n - 2))] : [
51
- e.value[0],
64
+ const x = n(() => Number(r.value) === 1), B = n(() => Number(r.value) >= l.value.length), w = n(() => {
65
+ const e = l.value.length, a = Number(r.value), o = t.maxVisiblePages;
66
+ if (e <= o)
67
+ return l.value;
68
+ const m = Math.floor(o / 2);
69
+ return a <= m ? [
70
+ ...l.value.slice(0, o - 2),
71
+ { value: "next", label: "..." },
72
+ l.value[e - 1]
73
+ ] : a >= e - m ? [
74
+ l.value[0],
75
+ { value: "prev", label: "..." },
76
+ ...l.value.slice(e - (o - 2))
77
+ ] : [
78
+ l.value[0],
52
79
  { value: "prev", label: "..." },
53
- ...e.value.slice(o - u, o + u - 1),
80
+ ...l.value.slice(a - m, a + m - 1),
54
81
  { value: "next", label: "..." },
55
- e.value[r - 1]
82
+ l.value[e - 1]
56
83
  ];
57
- }), m = { props: t, emit: i, modifiers: v, thicknessHeightMap: s, paginationStyle: g, prevClick: h, nextClick: b, selectedPage: a, pages: e, show: N, blockPrevButton: y, blockNextButton: S, visiblePages: P, bigStepUpdate: (r) => {
58
- const o = Number(a.value);
59
- let n = r === "prev" ? o - t.fastForwardStep : o + t.fastForwardStep;
60
- n <= 0 && (n = 1), n >= e.value.length && (n = e.value.length), a.value = String(n);
84
+ }), f = { props: t, emit: p, modifiers: S, thicknessHeightMap: d, paginationStyle: y, interactionDisabled: P, prevClick: k, nextClick: _, selectedPage: r, totalPages: u, pages: i, retainedPages: s, fallbackPages: v, effectivePages: l, show: q, blockPrevButton: x, blockNextButton: B, visiblePages: w, bigStepUpdate: (e) => {
85
+ const a = Number(r.value);
86
+ let o = e === "prev" ? a - t.fastForwardStep : a + t.fastForwardStep;
87
+ o <= 0 && (o = 1), o >= l.value.length && (o = l.value.length), r.value = String(o);
61
88
  }, get NmorphRadioGroup() {
62
- return Q;
89
+ return I;
63
90
  }, get NmorphButton() {
64
- return O;
91
+ return M;
65
92
  }, get NmorphIcon() {
66
- return B;
93
+ return F;
67
94
  }, get NmorphRadio() {
68
- return w;
95
+ return V;
69
96
  }, get NmorphIconChevronDown() {
70
97
  return R;
71
98
  } };
72
- return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
99
+ return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
73
100
  }
74
101
  });
75
102
  export {
76
- U as default
103
+ z as default
77
104
  };