@nmorph/nmorph-ui-kit 2.2.34 → 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 (124) 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/pin.svg.js +21 -0
  35. package/dist/assets/icons/redo.svg.js +21 -0
  36. package/dist/assets/icons/save.svg.js +25 -0
  37. package/dist/assets/icons/server.svg.js +32 -0
  38. package/dist/assets/icons/shield-check.svg.js +25 -0
  39. package/dist/assets/icons/shield.svg.js +25 -0
  40. package/dist/assets/icons/sliders.svg.js +31 -0
  41. package/dist/assets/icons/stopwatch.svg.js +28 -0
  42. package/dist/assets/icons/suitcase-line.svg.js +22 -0
  43. package/dist/assets/icons/undo.svg.js +21 -0
  44. package/dist/assets/icons/video-camera.svg.js +21 -0
  45. package/dist/components/basic/nmorph-button/NmorphButton.vue.js +10 -10
  46. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +5 -5
  47. package/dist/components/basic/nmorph-icon/NmorphIcons.js +617 -527
  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 +28 -0
  51. package/dist/components/basic/nmorph-space/NmorphSpace.css +1 -0
  52. package/dist/components/basic/nmorph-space/NmorphSpace.vue.js +21 -0
  53. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +45 -0
  54. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +15 -15
  55. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +1 -1
  56. package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -1
  57. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +31 -31
  58. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +36 -38
  59. package/dist/components/data/nmorph-qr-code/NmorphQRCode.css +1 -0
  60. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue.js +59 -0
  61. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +50 -0
  62. package/dist/components/data/nmorph-qr-code/qr-code.js +568 -0
  63. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.css +1 -0
  64. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue.js +86 -0
  65. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +60 -0
  66. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.css +1 -0
  67. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +81 -0
  68. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +47 -0
  69. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  70. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +30 -27
  71. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +75 -63
  72. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js +13 -13
  73. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +28 -27
  74. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.js +16 -16
  75. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue2.js +20 -17
  76. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +34 -30
  77. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +94 -62
  78. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue.js +21 -21
  79. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +92 -84
  80. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +5 -5
  81. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +53 -53
  82. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +24 -21
  83. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +1 -1
  84. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +16 -16
  85. package/dist/components/form/nmorph-textarea/NmorphTextarea.css +1 -0
  86. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +41 -0
  87. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +67 -0
  88. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  89. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +40 -31
  90. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +45 -41
  91. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +20 -25
  92. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +41 -27
  93. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.js +11 -10
  94. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue2.js +10 -9
  95. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.css +1 -1
  96. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +13 -12
  97. package/dist/hooks/use-common-styles.js +2 -1
  98. package/dist/icons.js +621 -531
  99. package/dist/index.es.js +781 -677
  100. package/dist/index.umd.js +31 -30
  101. package/dist/package.json.js +1 -1
  102. package/dist/src/components/basic/index.d.ts +2 -0
  103. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +49 -3
  104. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +22 -0
  105. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +33 -0
  106. package/dist/src/components/data/index.d.ts +4 -0
  107. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +34 -0
  108. package/dist/src/components/data/nmorph-qr-code/qr-code.d.ts +12 -0
  109. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +46 -0
  110. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +4 -0
  111. package/dist/src/components/feedback/index.d.ts +1 -0
  112. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +40 -0
  113. package/dist/src/components/form/index.d.ts +1 -0
  114. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +1 -1
  115. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +2 -2
  116. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +2 -2
  117. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +1 -1
  118. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +0 -1
  119. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +48 -0
  120. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  121. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -1
  122. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +3 -1
  123. package/dist/style.css +1 -1
  124. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import './NmorphOTPInput.css';
2
- import { defineComponent as Y, ref as b, computed as i, watch as z, nextTick as D } from "vue";
3
- import { useModifiers as ee } from "../../../utils/create-modifiers.js";
4
- import { NmorphComponentHeight as te } from "../../../types/index.js";
5
- import { useFormItemInput as ae } from "../nmorph-form/use-form-item-input.js";
6
- import le from "../nmorph-text-input/NmorphTextInput.vue.js";
7
- const ce = /* @__PURE__ */ Y({
2
+ import { defineComponent as te, ref as b, computed as c, watch as D, nextTick as O } from "vue";
3
+ import { useModifiers as ae } from "../../../utils/create-modifiers.js";
4
+ import { NmorphComponentHeight as le } from "../../../types/index.js";
5
+ import { useFormItemInput as ue } from "../nmorph-form/use-form-item-input.js";
6
+ import oe from "../nmorph-text-input/NmorphTextInput.vue.js";
7
+ const de = /* @__PURE__ */ te({
8
8
  __name: "NmorphOTPInput",
9
9
  props: {
10
10
  modelValue: { type: String, required: !1, default: "" },
@@ -20,120 +20,128 @@ const ce = /* @__PURE__ */ Y({
20
20
  tabindex: { type: Number, required: !1 }
21
21
  },
22
22
  emits: ["update:model-value", "focus", "blur", "complete"],
23
- setup(F, { expose: O, emit: I }) {
24
- const a = F, d = I, { id: V, name: R, autocomplete: q, tabindex: p } = ae(a), s = b([]), n = b([]), c = b(!1), r = b([]), u = i(() => Math.max(1, a.length)), v = (e = "") => {
23
+ setup(I, { expose: R, emit: j }) {
24
+ const l = I, f = j, { id: V, name: w, autocomplete: q, tabindex: p } = ue(l), i = b([]), n = b([]), d = b(!1), o = b([]), u = c(() => Math.max(1, l.length)), v = (e = "") => {
25
25
  const t = `${e ?? ""}`;
26
- return a.mode === "numeric" ? Array.from(t.replace(/\D/g, "")) : a.mode === "alphanumeric" ? Array.from(t.replace(/[^a-zA-Z0-9]/g, "")) : Array.from(t);
27
- }, A = (e = a.modelValue) => {
26
+ return l.mode === "numeric" ? Array.from(t.replace(/\D/g, "")) : l.mode === "alphanumeric" ? Array.from(t.replace(/[^a-zA-Z0-9]/g, "")) : Array.from(t);
27
+ }, A = (e = l.modelValue) => {
28
28
  const t = v(e).slice(0, u.value);
29
- return Array.from({ length: u.value }, (l, m) => t[m] || "");
30
- }, h = (e, t = !1) => {
31
- if (r.value = Array.from({ length: u.value }, (m, y) => e[y] || ""), !t) return;
32
- const l = r.value.join("");
33
- d("update:model-value", l), r.value.includes("") || d("complete", l);
29
+ return Array.from({ length: u.value }, (a, s) => t[s] || "");
30
+ }, g = (e, t = !1) => {
31
+ if (o.value = Array.from({ length: u.value }, (s, y) => e[y] || ""), !t) return;
32
+ const a = o.value.join("");
33
+ f("update:model-value", a), o.value.includes("") || f("complete", a);
34
34
  };
35
- z(
36
- [() => a.modelValue, () => a.mode, u],
35
+ D(
36
+ [() => l.modelValue, () => l.mode, u],
37
37
  () => {
38
- const e = A(a.modelValue);
39
- (e.join("") !== r.value.join("") || e.length !== r.value.length) && h(e);
38
+ const e = A(l.modelValue);
39
+ (e.join("") !== o.value.join("") || e.length !== o.value.length) && g(e);
40
40
  },
41
41
  { immediate: !0 }
42
42
  );
43
- const j = i(
44
- () => ee({
45
- nmorph: [te[a.height], `${c.value && "focused"}`],
46
- "nmorph-otp-input": [`${a.disabled && "disabled"}`]
43
+ const N = c(
44
+ () => ae({
45
+ nmorph: [le[l.height], `${d.value && "focused"}`],
46
+ "nmorph-otp-input": [`${l.disabled && "disabled"}`]
47
47
  })
48
- ), N = i(
48
+ ), T = c(
49
49
  () => Array.from({ length: u.value }, (e, t) => t === 0 ? V.value : `${V.value}-${t + 1}`)
50
- ), T = i(() => a.mode === "numeric" ? "numeric" : "text"), $ = i(() => q.value || "one-time-code"), w = i(() => {
51
- if (a.mode === "numeric") return "[0-9]*";
52
- if (a.mode === "alphanumeric") return "[A-Za-z0-9]*";
53
- }), g = (e) => {
54
- n.value[e] = s.value[e]?.inputDOMRef ?? null;
55
- }, x = (e, t) => {
56
- s.value[t] = e, D(() => {
57
- g(t);
50
+ ), $ = c(() => l.mode === "numeric" ? "numeric" : "text"), E = c(() => q.value || "one-time-code"), B = c(() => {
51
+ if (l.mode === "numeric") return "[0-9]*";
52
+ if (l.mode === "alphanumeric") return "[A-Za-z0-9]*";
53
+ }), h = (e) => {
54
+ n.value[e] = i.value[e]?.inputDOMRef ?? null;
55
+ }, C = (e, t) => {
56
+ i.value[t] = e, O(() => {
57
+ h(t);
58
58
  });
59
59
  }, _ = (e) => {
60
- g(e), s.value[e]?.select?.(), n.value[e]?.select();
61
- }, o = (e = 0) => {
62
- D(() => {
60
+ h(e), i.value[e]?.select?.(), n.value[e]?.select();
61
+ }, r = (e = 0) => {
62
+ O(() => {
63
63
  const t = Math.min(Math.max(e, 0), u.value - 1);
64
- g(t), s.value[t]?.focus?.(), n.value[t]?.focus(), _(t);
64
+ h(t), i.value[t]?.focus?.(), n.value[t]?.focus(), _(t);
65
65
  });
66
- }, M = () => {
67
- s.value.forEach((e, t) => {
66
+ }, F = () => {
67
+ i.value.forEach((e, t) => {
68
68
  e?.blur?.(), n.value[t]?.blur();
69
69
  });
70
70
  };
71
- O({
71
+ R({
72
72
  inputDOMRefs: n,
73
- focus: o,
74
- blur: M
73
+ focus: r,
74
+ blur: F
75
75
  });
76
- const f = (e, t = "") => {
77
- const l = [...r.value];
78
- l[e] = t, h(l, !0);
76
+ const m = (e, t = "") => {
77
+ const a = [...o.value];
78
+ a[e] = t, g(a, !0);
79
79
  }, H = (e, t) => {
80
- const l = v(e).slice(0, u.value - t);
81
- if (!l.length) {
82
- f(t, "");
80
+ const a = v(e).slice(0, u.value - t);
81
+ if (!a.length) {
82
+ m(t, "");
83
83
  return;
84
84
  }
85
- const m = [...r.value];
86
- l.forEach((W, X) => {
87
- m[t + X] = W;
88
- }), h(m, !0);
89
- const y = t + l.length;
90
- y < u.value ? o(y) : o(u.value - 1);
91
- }, E = (e, t) => {
85
+ const s = [...o.value];
86
+ a.forEach((Y, ee) => {
87
+ s[t + ee] = Y;
88
+ }), g(s, !0);
89
+ const y = t + a.length;
90
+ y < u.value ? r(y) : r(u.value - 1);
91
+ }, S = (e, t) => {
92
92
  H(e, t);
93
- }, S = (e) => {
94
- if (r.value[e]) {
95
- f(e);
93
+ }, M = /* @__PURE__ */ new Map(), P = (e) => {
94
+ const t = M.get(e);
95
+ if (t) return t;
96
+ const a = c({
97
+ get: () => o.value[e] || "",
98
+ set: (s) => S(s, e)
99
+ });
100
+ return M.set(e, a), a;
101
+ }, k = (e) => {
102
+ if (o.value[e]) {
103
+ m(e);
96
104
  return;
97
105
  }
98
- e > 0 && (f(e - 1), o(e - 1));
99
- }, B = (e, t) => {
106
+ e > 0 && (m(e - 1), r(e - 1));
107
+ }, x = (e, t) => {
100
108
  if (e.key === "Backspace") {
101
- S(t);
109
+ k(t);
102
110
  return;
103
111
  }
104
- f(t);
105
- }, C = (e) => {
106
- o(e - 1);
107
- }, P = (e) => {
108
- o(e + 1);
109
- }, L = () => {
110
- o(0);
111
- }, Z = () => {
112
- o(u.value - 1);
113
- }, K = (e) => {
114
- e.key.length === 1 && !v(e.key).length && e.preventDefault();
115
- }, G = (e, t) => {
116
- const l = e.clipboardData?.getData("text") || "";
117
- H(l, t);
112
+ m(t);
113
+ }, L = (e) => {
114
+ r(e - 1);
115
+ }, Z = (e) => {
116
+ r(e + 1);
117
+ }, K = () => {
118
+ r(0);
119
+ }, G = () => {
120
+ r(u.value - 1);
118
121
  }, J = (e) => {
119
- c.value || (c.value = !0, d("focus")), _(e);
120
- }, Q = () => {
122
+ e.key.length === 1 && !v(e.key).length && e.preventDefault();
123
+ }, Q = (e, t) => {
124
+ const a = e.clipboardData?.getData("text") || "";
125
+ H(a, t);
126
+ }, U = (e) => {
127
+ d.value || (d.value = !0, f("focus")), _(e);
128
+ }, W = () => {
121
129
  setTimeout(() => {
122
130
  const e = document.activeElement;
123
- !n.value.some((l) => l === e) && c.value && (c.value = !1, d("blur"));
131
+ !n.value.some((a) => a === e) && d.value && (d.value = !1, f("blur"));
124
132
  });
125
- }, U = (e) => p.value > 0 ? p.value + e : p.value;
126
- z(
127
- () => a.autofocus,
133
+ }, X = (e) => p.value > 0 ? p.value + e : p.value;
134
+ D(
135
+ () => l.autofocus,
128
136
  (e) => {
129
- e && !a.disabled && o(0);
137
+ e && !l.disabled && r(0);
130
138
  },
131
139
  { immediate: !0 }
132
140
  );
133
- const k = { props: a, emit: d, id: V, name: R, autocomplete: q, tabindex: p, inputRefs: s, inputDOMRefs: n, focused: c, otpValue: r, normalizedLength: u, sanitizeValue: v, normalizeOtpValue: A, syncOtpValue: h, modifiers: j, fieldIds: N, inputMode: T, resolvedAutocomplete: $, inputPattern: w, syncInputDOMRef: g, setInputRef: x, selectField: _, focusField: o, blurFields: M, updateCharAt: f, insertValue: H, inputHandler: E, backspaceHandler: S, deleteKeyHandler: B, arrowLeftHandler: C, arrowRightHandler: P, homeHandler: L, endHandler: Z, keydownHandler: K, pasteHandler: G, focusHandler: J, blurHandler: Q, getFieldTabindex: U, NmorphTextInput: le };
134
- return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
141
+ const z = { props: l, emit: f, id: V, name: w, autocomplete: q, tabindex: p, inputRefs: i, inputDOMRefs: n, focused: d, otpValue: o, normalizedLength: u, sanitizeValue: v, normalizeOtpValue: A, syncOtpValue: g, modifiers: N, fieldIds: T, inputMode: $, resolvedAutocomplete: E, inputPattern: B, syncInputDOMRef: h, setInputRef: C, selectField: _, focusField: r, blurFields: F, updateCharAt: m, insertValue: H, inputHandler: S, fieldModels: M, getFieldModel: P, backspaceHandler: k, deleteKeyHandler: x, arrowLeftHandler: L, arrowRightHandler: Z, homeHandler: K, endHandler: G, keydownHandler: J, pasteHandler: Q, focusHandler: U, blurHandler: W, getFieldTabindex: X, NmorphTextInput: oe };
142
+ return Object.defineProperty(z, "__isScriptSetup", { enumerable: !1, value: !0 }), z;
135
143
  }
136
144
  });
137
145
  export {
138
- ce as default
146
+ de as default
139
147
  };
@@ -9,10 +9,10 @@ const N = { class: "nmorph-select__content" }, S = ["id", "name", "autocomplete"
9
9
  }, u = {
10
10
  key: 1,
11
11
  class: "nmorph-select__selected-value"
12
- }, C = {
12
+ }, D = {
13
13
  key: 2,
14
14
  class: "nmorph-select__selected-value"
15
- }, D = ["id"];
15
+ }, C = ["id"];
16
16
  function E(y, v, p, e, M, R) {
17
17
  return r(), l(
18
18
  "div",
@@ -76,7 +76,7 @@ function E(y, v, p, e, M, R) {
76
76
  _(e.computedNoElementPlaceholder),
77
77
  1
78
78
  /* TEXT */
79
- )) : (r(), l("div", C, [
79
+ )) : (r(), l("div", D, [
80
80
  (r(!0), l(
81
81
  d,
82
82
  null,
@@ -94,7 +94,7 @@ function E(y, v, p, e, M, R) {
94
94
  ])),
95
95
  f(e.NmorphIcon, { class: "nmorph-select__chevron" }, {
96
96
  default: s(() => [
97
- e.props.loading ? (r(), i(e.NmorphIconLoader, { key: 0 })) : (r(), i(e.NmorphIconChevronDown, { key: 1 }))
97
+ e.props.loading ? (r(), i(e.NmorphIconLoaderDots, { key: 0 })) : (r(), i(e.NmorphIconChevronDown, { key: 1 }))
98
98
  ]),
99
99
  _: 1
100
100
  /* STABLE */
@@ -206,7 +206,7 @@ function E(y, v, p, e, M, R) {
206
206
  64
207
207
  /* STABLE_FRAGMENT */
208
208
  ))
209
- ], 8, D)
209
+ ], 8, C)
210
210
  ]),
211
211
  _: 3
212
212
  /* FORWARDED */
@@ -1,17 +1,17 @@
1
1
  import './NmorphSelect.css';
2
- import { defineComponent as ue, computed as a, ref as d, watch as f, nextTick as L, onMounted as oe, onUnmounted as ie, provide as R } from "vue";
3
- import { NmorphComponentHeight as se } from "../../../types/index.js";
4
- import { useModifiers as de } from "../../../utils/create-modifiers.js";
5
- import { useI18n as ve } from "vue-i18n";
6
- import { useFormItemInput as ce } from "../nmorph-form/use-form-item-input.js";
7
- import { useVirtualList as fe } from "../../../hooks/use-virtual-list.js";
8
- import pe from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
9
- import me from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
10
- import he from "../../basic/nmorph-icon/NmorphIcon.vue.js";
11
- import ge from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
12
- import ye from "../../../assets/icons/chevron-down.svg.js";
13
- import He from "../../../assets/icons/loader.svg.js";
14
- const Pe = /* @__PURE__ */ ue({
2
+ import { defineComponent as ue, computed as a, ref as d, watch as f, nextTick as R, onMounted as oe, onUnmounted as ie, provide as M, toRef as se } from "vue";
3
+ import { NmorphComponentHeight as de } from "../../../types/index.js";
4
+ import { useModifiers as ve } from "../../../utils/create-modifiers.js";
5
+ import { useI18n as ce } from "vue-i18n";
6
+ import { useFormItemInput as fe } from "../nmorph-form/use-form-item-input.js";
7
+ import { useVirtualList as pe } from "../../../hooks/use-virtual-list.js";
8
+ import me from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
9
+ import he from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
10
+ import ge from "../../basic/nmorph-icon/NmorphIcon.vue.js";
11
+ import ye from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
12
+ import He from "../../../assets/icons/chevron-down.svg.js";
13
+ import be from "../../../assets/icons/loader.svg.js";
14
+ const ke = /* @__PURE__ */ ue({
15
15
  __name: "NmorphSelect",
16
16
  props: {
17
17
  noElementPlaceholder: { type: String, required: !1, default: "" },
@@ -40,37 +40,37 @@ const Pe = /* @__PURE__ */ ue({
40
40
  emits: ["update:model-value"],
41
41
  setup(T, { expose: C, emit: P }) {
42
42
  C();
43
- const { t: M } = ve(), l = T, $ = a(
44
- () => l.noElementPlaceholder ? l.noElementPlaceholder : M("noElementPlaceholder")
45
- ), m = P, t = d(l.modelValue), r = d(l.open), v = a(() => l.disabled || l.loading), h = a(() => l.optionsWidth === "auto"), g = d(!0), { id: y, name: k, autocomplete: W, tabindex: U } = ce(l), H = (e) => {
43
+ const { t: $ } = ce(), t = T, D = a(
44
+ () => t.noElementPlaceholder ? t.noElementPlaceholder : $("noElementPlaceholder")
45
+ ), m = P, l = d(t.modelValue), r = d(t.open), v = a(() => t.disabled || t.loading), h = a(() => t.optionsWidth === "auto"), g = d(!0), { id: y, name: k, autocomplete: W, tabindex: U } = fe(t), H = (e) => {
46
46
  if (!v.value) {
47
- if (r.value = !1, typeof t.value == "string" && (!l.valueRequired && t.value === e ? t.value = "" : t.value = e, m("update:model-value", t.value)), Array.isArray(t.value)) {
48
- const n = t.value.includes(e), w = t.value.length === 1 && n;
49
- if (l.valueRequired && w) return;
50
- n ? t.value = t.value.filter((ne) => ne !== e) : t.value = [...t.value, e];
47
+ if (r.value = !1, typeof l.value == "string" && (!t.valueRequired && l.value === e ? l.value = "" : l.value = e, m("update:model-value", l.value)), Array.isArray(l.value)) {
48
+ const n = l.value.includes(e), w = l.value.length === 1 && n;
49
+ if (t.valueRequired && w) return;
50
+ n ? l.value = l.value.filter((ne) => ne !== e) : l.value = [...l.value, e];
51
51
  }
52
- m("update:model-value", t.value);
52
+ m("update:model-value", l.value);
53
53
  }
54
54
  }, p = d(!1), z = () => {
55
55
  p.value = !0;
56
56
  }, F = () => {
57
57
  p.value = !1;
58
58
  }, j = a(
59
- () => de({
60
- nmorph: [se[l.height]],
59
+ () => ve({
60
+ nmorph: [de[t.height]],
61
61
  "nmorph-select": [
62
- `${l.disabled && "disabled"}`,
63
- `${l.modelValue ? "on" : "off"}`,
64
- `${l.loading && "loading"}`,
62
+ `${t.disabled && "disabled"}`,
63
+ `${t.modelValue ? "on" : "off"}`,
64
+ `${t.loading && "loading"}`,
65
65
  `${r.value && !v.value && "open"}`,
66
- `${l.fill && "fill"}`,
66
+ `${t.fill && "fill"}`,
67
67
  `${h.value && "options-auto-width"}`,
68
68
  `${g.value ? "selected-line-outset" : "selected-line-inset"}`,
69
69
  `${p.value && "focus"}`
70
70
  ]
71
71
  })
72
72
  ), b = (e) => typeof e == "number" ? `${e}px` : e, Y = a(() => ({
73
- ...l.width !== void 0 && { "--base-width": b(l.width) }
73
+ ...t.width !== void 0 && { "--base-width": b(t.width) }
74
74
  })), G = () => {
75
75
  v.value || (r.value = !r.value);
76
76
  };
@@ -85,29 +85,29 @@ const Pe = /* @__PURE__ */ ue({
85
85
  r.value = !1;
86
86
  };
87
87
  f(
88
- () => l.loading,
88
+ () => t.loading,
89
89
  (e) => {
90
90
  e && (r.value = !1);
91
91
  }
92
92
  );
93
- const i = a(() => l.options.length > 0 ? l.options : l.optionsMap), x = d(null), I = d([]), N = a(() => l.options), c = a(() => l.virtual && N.value.length > 0), D = a(() => ({
93
+ const i = a(() => t.options.length > 0 ? t.options : t.optionsMap), x = d(null), I = d([]), N = a(() => t.options), c = a(() => t.virtual && N.value.length > 0), A = a(() => ({
94
94
  basic: 30,
95
95
  thick: 38,
96
96
  thin: 22
97
- })[l.height || "basic"]), A = a(() => l.virtualItemHeight || D.value), E = a(() => l.virtualOverscan), V = a(() => l.virtualDynamicHeight), s = fe(N, {
97
+ })[t.height || "basic"]), E = a(() => t.virtualItemHeight || A.value), V = a(() => t.virtualOverscan), _ = a(() => t.virtualDynamicHeight), s = pe(N, {
98
98
  enabled: c,
99
- itemHeight: A,
100
- overscan: E,
101
- dynamic: V
99
+ itemHeight: E,
100
+ overscan: V,
101
+ dynamic: _
102
102
  }), J = a(() => s.virtualItems.value), K = a(() => ({
103
103
  height: `${s.totalHeight.value}px`
104
104
  })), Q = a(() => ({
105
105
  transform: `translateY(${s.offsetTop.value}px)`
106
- })), X = a(() => b(l.virtualMaxHeight)), O = () => {
106
+ })), X = a(() => b(t.virtualMaxHeight)), O = () => {
107
107
  i.value.length > 0 || !x.value || (I.value = Array.from(x.value.querySelectorAll(".nmorph-select-option")).map((e) => e.getAttribute("value")).filter((e) => !!e));
108
108
  }, o = a(
109
109
  () => i.value.length > 0 ? i.value.map((e) => e.value) : I.value
110
- ), Z = a(() => c.value ? Array.isArray(t.value) ? t.value : t.value ? [t.value] : [] : o.value), u = d(0), S = a(() => o.value[u.value] || ""), ee = a(() => `${y.value}-listbox`), te = (e) => `${y.value}-option-${e.replace(/\s+/g, "-")}`;
110
+ ), Z = a(() => c.value ? Array.isArray(l.value) ? l.value : l.value ? [l.value] : [] : o.value), u = d(0), S = a(() => o.value[u.value] || ""), ee = a(() => `${y.value}-listbox`), te = (e) => `${y.value}-option-${e.replace(/\s+/g, "-")}`;
111
111
  f(u, (e) => {
112
112
  r.value && c.value && s.scrollToIndex(e);
113
113
  }), f(
@@ -118,22 +118,22 @@ const Pe = /* @__PURE__ */ ue({
118
118
  { immediate: !0 }
119
119
  ), f(r, async (e) => {
120
120
  if (e) {
121
- if (await L(), O(), typeof t.value == "string") {
122
- const n = o.value.indexOf(t.value);
121
+ if (await R(), O(), typeof l.value == "string") {
122
+ const n = o.value.indexOf(l.value);
123
123
  n !== -1 && (u.value = n);
124
124
  }
125
125
  s.refresh(), c.value && s.scrollToIndex(u.value);
126
126
  }
127
127
  }), oe(async () => {
128
- await L(), O(), document.addEventListener("click", q);
128
+ await R(), O(), document.addEventListener("click", q);
129
129
  }), ie(() => {
130
130
  document.removeEventListener("click", q);
131
131
  });
132
- const le = a(() => typeof t.value == "string" ? t.value === "" ? $.value : i.value.find((e) => e.value === t.value)?.label : i.value.find((e) => e.value === t.value)?.label), ae = a(() => i.value.length > 0 ? i.value.filter((n) => t.value.includes(n.value)).map((n) => ({ text: n.label, value: n.value })) : Array.isArray(t.value) ? t.value.map((n) => ({ text: n, value: n })) : [{ text: t.value, value: t.value }]);
133
- R("select-selected-value", t), R("select-change-selected-value", H);
134
- const _ = d(null), re = a(
135
- () => h.value ? `${_.value?.clientWidth || 0}px` : void 0
136
- ), B = { t: M, props: l, computedNoElementPlaceholder: $, emit: m, initialValue: t, open: r, disabledInput: v, autoOptionsWidth: h, selectedLineOutset: g, id: y, name: k, autocomplete: W, tabindex: U, changeHandler: H, focus: p, focusHandler: z, blurHandler: F, modifiers: j, getCssSize: b, styles: Y, clickHandler: G, closeHandler: q, optionsMap: i, optionsDOMRef: x, slotDomOptions: I, renderedOptions: N, virtualEnabled: c, defaultOptionHeight: D, virtualItemHeight: A, virtualOverscan: E, virtualDynamicHeight: V, virtualList: s, virtualOptions: J, virtualSpacerStyle: K, virtualContentStyle: Q, virtualMaxHeight: X, refreshDomOptions: O, domOptions: o, nativeOptions: Z, currentIndex: u, currentFocusedEl: S, listboxId: ee, getOptionId: te, selectedValueTitle: le, tags: ae, nmorphSelectDOMRef: _, optionsMinWidth: re, spaceHandler: () => {
132
+ const le = a(() => typeof l.value == "string" ? l.value === "" ? D.value : i.value.find((e) => e.value === l.value)?.label : i.value.find((e) => e.value === l.value)?.label), ae = a(() => i.value.length > 0 ? i.value.filter((n) => l.value.includes(n.value)).map((n) => ({ text: n.label, value: n.value })) : Array.isArray(l.value) ? l.value.map((n) => ({ text: n, value: n })) : [{ text: l.value, value: l.value }]);
133
+ M("select-selected-value", l), M("select-change-selected-value", H), M("select-height", se(t, "height"));
134
+ const B = d(null), re = a(
135
+ () => h.value ? `${B.value?.clientWidth || 0}px` : void 0
136
+ ), L = { t: $, props: t, computedNoElementPlaceholder: D, emit: m, initialValue: l, open: r, disabledInput: v, autoOptionsWidth: h, selectedLineOutset: g, id: y, name: k, autocomplete: W, tabindex: U, changeHandler: H, focus: p, focusHandler: z, blurHandler: F, modifiers: j, getCssSize: b, styles: Y, clickHandler: G, closeHandler: q, optionsMap: i, optionsDOMRef: x, slotDomOptions: I, renderedOptions: N, virtualEnabled: c, defaultOptionHeight: A, virtualItemHeight: E, virtualOverscan: V, virtualDynamicHeight: _, virtualList: s, virtualOptions: J, virtualSpacerStyle: K, virtualContentStyle: Q, virtualMaxHeight: X, refreshDomOptions: O, domOptions: o, nativeOptions: Z, currentIndex: u, currentFocusedEl: S, listboxId: ee, getOptionId: te, selectedValueTitle: le, tags: ae, nmorphSelectDOMRef: B, optionsMinWidth: re, spaceHandler: () => {
137
137
  v.value || (r.value = !r.value);
138
138
  }, arrowDownHandler: () => {
139
139
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value + 1) % o.value.length);
@@ -151,21 +151,21 @@ const Pe = /* @__PURE__ */ ue({
151
151
  }, endHandler: () => {
152
152
  u.value = Math.max(o.value.length - 1, 0);
153
153
  }, get NmorphTagItem() {
154
- return ge;
154
+ return ye;
155
155
  }, get NmorphIcon() {
156
- return he;
156
+ return ge;
157
157
  }, get NmorphSelectOption() {
158
- return me;
158
+ return he;
159
159
  }, get NmorphDropdown() {
160
- return pe;
161
- }, get NmorphIconLoader() {
162
- return He;
160
+ return me;
161
+ }, get NmorphIconLoaderDots() {
162
+ return be;
163
163
  }, get NmorphIconChevronDown() {
164
- return ye;
164
+ return He;
165
165
  } };
166
- return Object.defineProperty(B, "__isScriptSetup", { enumerable: !1, value: !0 }), B;
166
+ return Object.defineProperty(L, "__isScriptSetup", { enumerable: !1, value: !0 }), L;
167
167
  }
168
168
  });
169
169
  export {
170
- Pe as default
170
+ ke as default
171
171
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphSelectOption.css';
2
- import { defineComponent as h, inject as i, computed as o } from "vue";
3
- import { NmorphComponentHeight as v } from "../../../../../types/index.js";
4
- import { useModifiers as g } from "../../../../../utils/create-modifiers.js";
5
- import y from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
6
- import S from "../../../../../assets/icons/success.svg.js";
7
- const C = /* @__PURE__ */ h({
2
+ import { defineComponent as g, inject as l, computed as t } from "vue";
3
+ import { NmorphComponentHeight as y } from "../../../../../types/index.js";
4
+ import { useModifiers as S } from "../../../../../utils/create-modifiers.js";
5
+ import b from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
6
+ import q from "../../../../../assets/icons/success.svg.js";
7
+ const I = /* @__PURE__ */ g({
8
8
  __name: "NmorphSelectOption",
9
9
  props: {
10
10
  value: { type: String, required: !0 },
@@ -15,36 +15,39 @@ const C = /* @__PURE__ */ h({
15
15
  id: { type: String, required: !1 },
16
16
  name: { type: String, required: !1 },
17
17
  autocomplete: { type: String, required: !1 },
18
- height: { type: null, required: !1, default: "basic" },
18
+ height: { type: null, required: !1 },
19
19
  disabled: { type: Boolean, required: !1, default: !1 },
20
20
  tabindex: { type: Number, required: !1 }
21
21
  },
22
22
  emits: ["change-value"],
23
- setup(n, { expose: s, emit: c }) {
24
- s();
25
- const r = i("select-selected-value"), t = i("select-change-selected-value"), e = n, l = c, d = () => {
26
- e.disabled || (l("change-value", e.value), t && t(e.value));
27
- }, a = o(() => typeof r?.value == "string" ? r.value === e.value : Array.isArray(r?.value) ? r.value.some((m) => m === e.value) : !1), p = o(
28
- () => g({
29
- nmorph: [v[e.height]],
23
+ setup(c, { expose: d, emit: p }) {
24
+ d();
25
+ const r = l("select-selected-value"), o = l("select-change-selected-value"), a = l(
26
+ "select-height",
27
+ void 0
28
+ ), e = c, i = p, f = () => {
29
+ e.disabled || (i("change-value", e.value), o && o(e.value));
30
+ }, u = t(() => typeof r?.value == "string" ? r.value === e.value : Array.isArray(r?.value) ? r.value.some((v) => v === e.value) : !1), s = t(() => e.height || a?.value || "basic"), h = t(
31
+ () => S({
32
+ nmorph: [y[s.value]],
30
33
  "nmorph-select-option": [
31
34
  `${e.disabled && "disabled"}`,
32
35
  `${e.label && "with-label"}`,
33
- `${a.value && "checked"}`,
36
+ `${u.value && "checked"}`,
34
37
  `${e.focused && "focused"}`
35
38
  ]
36
39
  })
37
- ), f = o(() => ({
40
+ ), m = t(() => ({
38
41
  ...e.hoverBackground !== void 0 && { "--hover-bg": e.hoverBackground },
39
42
  ...e.hoverColor !== void 0 && { "--hover-color": e.hoverColor }
40
- })), u = { selectSelectedValue: r, selectChangeSelectedValue: t, props: e, emit: l, clickHandler: d, checked: a, modifiers: p, styles: f, get NmorphIcon() {
41
- return y;
43
+ })), n = { selectSelectedValue: r, selectChangeSelectedValue: o, selectHeight: a, props: e, emit: i, clickHandler: f, checked: u, height: s, modifiers: h, styles: m, get NmorphIcon() {
44
+ return b;
42
45
  }, get NmorphIconSuccess() {
43
- return S;
46
+ return q;
44
47
  } };
45
- return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
48
+ return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
46
49
  }
47
50
  });
48
51
  export {
49
- C as default
52
+ I as default
50
53
  };
@@ -47,7 +47,7 @@ function p(e, _, k, o, y, v) {
47
47
  height: "14px"
48
48
  }, {
49
49
  default: s(() => [
50
- h(o.NmorphIconLoader)
50
+ h(o.NmorphIconLoaderDots)
51
51
  ]),
52
52
  _: 1
53
53
  /* STABLE */
@@ -1,10 +1,10 @@
1
1
  import './NmorphSwitch.css';
2
- import { defineComponent as q, ref as o, computed as n, watch as N } from "vue";
2
+ import { defineComponent as q, ref as i, computed as n, watch as N } from "vue";
3
3
  import { useModifiers as V } from "../../../utils/create-modifiers.js";
4
4
  import { useFormItemInput as _ } from "../nmorph-form/use-form-item-input.js";
5
5
  import w from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
6
  import H from "../../../assets/icons/loader.svg.js";
7
- const L = /* @__PURE__ */ q({
7
+ const C = /* @__PURE__ */ q({
8
8
  __name: "NmorphSwitch",
9
9
  props: {
10
10
  modelValue: { type: [Boolean, String, Number], required: !1, default: !1 },
@@ -23,31 +23,31 @@ const L = /* @__PURE__ */ q({
23
23
  },
24
24
  emits: ["update:model-value"],
25
25
  setup(s, { expose: f, emit: m }) {
26
- const e = s, { id: p, name: c, tabindex: h } = _(e), u = m, i = o(!1), g = () => {
27
- i.value = !0;
26
+ const e = s, { id: p, name: c, tabindex: h } = _(e), u = m, a = i(!1), g = () => {
27
+ a.value = !0;
28
28
  }, v = () => {
29
- i.value = !1;
29
+ a.value = !1;
30
30
  }, b = n(
31
31
  () => V({
32
32
  "nmorph-switch": [
33
33
  `${e.disabled && "disabled"}`,
34
34
  `${r.value ? "on" : "off"}`,
35
35
  `${e.loading && "loading"}`,
36
- `${i.value && "focus"}`
36
+ `${a.value && "focus"}`
37
37
  ]
38
38
  })
39
- ), r = o(e.modelValue === e.activeValue), y = () => {
39
+ ), r = i(e.modelValue === e.activeValue), y = () => {
40
40
  if (e.disabled) return;
41
41
  r.value = !r.value;
42
42
  const t = r.value ? e.activeValue : e.inactiveValue;
43
43
  u("update:model-value", t);
44
- }, l = o(null);
44
+ }, l = i(null);
45
45
  f({ inputDOMRef: l });
46
- const a = (t) => typeof t == "number" ? `${t}px` : t, S = n(() => ({
47
- ...e.width !== void 0 && { "--width": a(e.width) },
48
- ...e.height !== void 0 && { "--height": a(e.height) },
49
- ...e.offset !== void 0 && { "--offset": a(e.offset) },
50
- ...e.thumbHeight !== void 0 && { "--thumb-height": a(e.thumbHeight) }
46
+ const o = (t) => typeof t == "number" ? `${t}px` : t, S = n(() => ({
47
+ ...e.width !== void 0 && { "--width": o(e.width) },
48
+ ...e.height !== void 0 && { "--height": o(e.height) },
49
+ ...e.offset !== void 0 && { "--offset": o(e.offset) },
50
+ ...e.thumbHeight !== void 0 && { "--thumb-height": o(e.thumbHeight) }
51
51
  }));
52
52
  N(
53
53
  () => e.modelValue,
@@ -55,14 +55,14 @@ const L = /* @__PURE__ */ q({
55
55
  r.value = t === e.activeValue;
56
56
  }
57
57
  );
58
- const d = { props: e, id: p, name: c, tabindex: h, emit: u, focus: i, focusHandler: g, blurHandler: v, modifiers: b, initialValue: r, changeHandler: y, inputDOMRef: l, getCssSize: a, styles: S, get NmorphIcon() {
58
+ const d = { props: e, id: p, name: c, tabindex: h, emit: u, focus: a, focusHandler: g, blurHandler: v, modifiers: b, initialValue: r, changeHandler: y, inputDOMRef: l, getCssSize: o, styles: S, get NmorphIcon() {
59
59
  return w;
60
- }, get NmorphIconLoader() {
60
+ }, get NmorphIconLoaderDots() {
61
61
  return H;
62
62
  } };
63
63
  return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
64
64
  }
65
65
  });
66
66
  export {
67
- L as default
67
+ C as default
68
68
  };
@@ -0,0 +1 @@
1
+ .nmorph-textarea{height:auto}.nmorph-textarea textarea{display:block;box-sizing:border-box;width:100%;min-width:0;padding:var(--indentation-03) var(--indentation-03) var(--indentation-03) var(--nmorph-textarea-indentation);color:var(--nmorph-text-color);font:inherit;line-height:var(--line-height-regular);background:var(--nmorph-main-color);border:none;border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset);transition:background var(--transition-02) ease,box-shadow var(--transition-02) ease,color var(--transition-02) ease;resize:var(--nmorph-textarea-resize)}.nmorph-textarea textarea:focus{color:var(--nmorph-focus-text-color);background:var(--nmorph-accent-color);outline:none;box-shadow:var(--nmorph-shadow-outset)}.nmorph-textarea textarea:disabled{cursor:not-allowed;opacity:.6;resize:none}.nmorph-textarea.nmorph-textarea--auto-size textarea{overflow-y:hidden}