@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,17 +1,18 @@
1
1
  import './NmorphSelect.css';
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({
2
+ import { defineComponent as ne, computed as a, ref as d, watch as f, nextTick as B, onMounted as ue, onUnmounted as oe, provide as S, toRef as ie } from "vue";
3
+ import { NmorphComponentHeight as se } from "../../../types/index.js";
4
+ import { useModifiers as de } from "../../../utils/create-modifiers.js";
5
+ import { toCssSize as L, getNmorphOptionHeight as ve, resolveDomElement as ce } from "../../../utils/common.js";
6
+ import { useI18n as fe } from "vue-i18n";
7
+ import { useFormItemInput as pe } from "../nmorph-form/use-form-item-input.js";
8
+ import { useVirtualList as me } from "../../../hooks/use-virtual-list.js";
9
+ import he from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
10
+ import ge from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
11
+ import ye from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
+ import He from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
13
+ import be from "../../../assets/icons/chevron-down.svg.js";
14
+ import qe from "../../../assets/icons/loader.svg.js";
15
+ const Ue = /* @__PURE__ */ ne({
15
16
  __name: "NmorphSelect",
16
17
  props: {
17
18
  noElementPlaceholder: { type: String, required: !1, default: "" },
@@ -38,40 +39,40 @@ const ke = /* @__PURE__ */ ue({
38
39
  tabindex: { type: Number, required: !1 }
39
40
  },
40
41
  emits: ["update:model-value"],
41
- setup(T, { expose: C, emit: P }) {
42
+ setup(R, { expose: C, emit: P }) {
42
43
  C();
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) => {
44
+ const { t: w } = fe(), t = R, D = a(
45
+ () => t.noElementPlaceholder ? t.noElementPlaceholder : w("noElementPlaceholder")
46
+ ), 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: T, autocomplete: W, tabindex: k } = pe(t), H = (e) => {
46
47
  if (!v.value) {
47
48
  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];
49
+ const n = l.value.includes(e), ae = l.value.length === 1 && n;
50
+ if (t.valueRequired && ae) return;
51
+ n ? l.value = l.value.filter((re) => re !== e) : l.value = [...l.value, e];
51
52
  }
52
53
  m("update:model-value", l.value);
53
54
  }
54
- }, p = d(!1), z = () => {
55
+ }, p = d(!1), $ = () => {
55
56
  p.value = !0;
56
- }, F = () => {
57
+ }, U = () => {
57
58
  p.value = !1;
58
- }, j = a(
59
- () => ve({
60
- nmorph: [de[t.height]],
59
+ }, z = a(
60
+ () => de({
61
+ nmorph: [se[t.height]],
61
62
  "nmorph-select": [
62
- `${t.disabled && "disabled"}`,
63
- `${t.modelValue ? "on" : "off"}`,
64
- `${t.loading && "loading"}`,
65
- `${r.value && !v.value && "open"}`,
66
- `${t.fill && "fill"}`,
67
- `${h.value && "options-auto-width"}`,
68
- `${g.value ? "selected-line-outset" : "selected-line-inset"}`,
69
- `${p.value && "focus"}`
63
+ t.disabled && "disabled",
64
+ t.modelValue ? "on" : "off",
65
+ t.loading && "loading",
66
+ r.value && !v.value && "open",
67
+ t.fill && "fill",
68
+ h.value && "options-auto-width",
69
+ g.value ? "selected-line-outset" : "selected-line-inset",
70
+ p.value && "focus"
70
71
  ]
71
72
  })
72
- ), b = (e) => typeof e == "number" ? `${e}px` : e, Y = a(() => ({
73
- ...t.width !== void 0 && { "--base-width": b(t.width) }
74
- })), G = () => {
73
+ ), F = a(() => ({
74
+ ...t.width !== void 0 && { "--base-width": L(t.width) }
75
+ })), j = () => {
75
76
  v.value || (r.value = !r.value);
76
77
  };
77
78
  f(
@@ -81,7 +82,7 @@ const ke = /* @__PURE__ */ ue({
81
82
  },
82
83
  { immediate: !0 }
83
84
  );
84
- const q = () => {
85
+ const b = () => {
85
86
  r.value = !1;
86
87
  };
87
88
  f(
@@ -90,24 +91,16 @@ const ke = /* @__PURE__ */ ue({
90
91
  e && (r.value = !1);
91
92
  }
92
93
  );
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
- basic: 30,
95
- thick: 38,
96
- thin: 22
97
- })[t.height || "basic"]), E = a(() => t.virtualItemHeight || A.value), V = a(() => t.virtualOverscan), _ = a(() => t.virtualDynamicHeight), s = pe(N, {
94
+ const i = a(() => t.options.length > 0 ? t.options : t.optionsMap), q = d(null), I = d([]), x = a(() => t.options), c = a(() => t.virtual && x.value.length > 0), M = a(() => t.virtualItemHeight || ve(t.height)), A = a(() => t.virtualOverscan), E = a(() => t.virtualDynamicHeight), s = me(x, {
98
95
  enabled: c,
99
- itemHeight: E,
100
- overscan: V,
101
- dynamic: _
102
- }), J = a(() => s.virtualItems.value), K = a(() => ({
103
- height: `${s.totalHeight.value}px`
104
- })), Q = a(() => ({
105
- transform: `translateY(${s.offsetTop.value}px)`
106
- })), X = a(() => b(t.virtualMaxHeight)), O = () => {
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));
96
+ itemHeight: M,
97
+ overscan: A,
98
+ dynamic: E
99
+ }), G = a(() => s.virtualItems.value), J = s.spacerStyle, K = s.contentStyle, Q = a(() => L(t.virtualMaxHeight)), N = () => {
100
+ i.value.length > 0 || !q.value || (I.value = Array.from(q.value.querySelectorAll(".nmorph-select-option")).map((e) => e.getAttribute("value")).filter((e) => !!e));
108
101
  }, o = a(
109
102
  () => i.value.length > 0 ? i.value.map((e) => e.value) : I.value
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, "-")}`;
103
+ ), X = a(() => c.value ? Array.isArray(l.value) ? l.value : l.value ? [l.value] : [] : o.value), u = d(0), O = a(() => o.value[u.value] || ""), Y = a(() => `${y.value}-listbox`), Z = (e) => `${y.value}-option-${e.replace(/\s+/g, "-")}`;
111
104
  f(u, (e) => {
112
105
  r.value && c.value && s.scrollToIndex(e);
113
106
  }), f(
@@ -118,32 +111,31 @@ const ke = /* @__PURE__ */ ue({
118
111
  { immediate: !0 }
119
112
  ), f(r, async (e) => {
120
113
  if (e) {
121
- if (await R(), O(), typeof l.value == "string") {
114
+ if (await B(), N(), typeof l.value == "string") {
122
115
  const n = o.value.indexOf(l.value);
123
116
  n !== -1 && (u.value = n);
124
117
  }
125
118
  s.refresh(), c.value && s.scrollToIndex(u.value);
126
119
  }
127
- }), oe(async () => {
128
- await R(), O(), document.addEventListener("click", q);
129
- }), ie(() => {
130
- document.removeEventListener("click", q);
120
+ }), ue(async () => {
121
+ await B(), N(), document.addEventListener("click", b);
122
+ }), oe(() => {
123
+ document.removeEventListener("click", b);
131
124
  });
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: () => {
125
+ const ee = 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), te = 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 }]);
126
+ S("select-selected-value", l), S("select-change-selected-value", H), S("select-height", ie(t, "height"));
127
+ const V = d(null), le = a(
128
+ () => h.value ? `${V.value?.clientWidth || 0}px` : void 0
129
+ ), _ = { t: w, props: t, computedNoElementPlaceholder: D, emit: m, initialValue: l, open: r, disabledInput: v, autoOptionsWidth: h, selectedLineOutset: g, id: y, name: T, autocomplete: W, tabindex: k, changeHandler: H, focus: p, focusHandler: $, blurHandler: U, modifiers: z, styles: F, clickHandler: j, closeHandler: b, optionsMap: i, optionsDOMRef: q, slotDomOptions: I, renderedOptions: x, virtualEnabled: c, virtualItemHeight: M, virtualOverscan: A, virtualDynamicHeight: E, virtualList: s, virtualOptions: G, virtualSpacerStyle: J, virtualContentStyle: K, virtualMaxHeight: Q, refreshDomOptions: N, domOptions: o, nativeOptions: X, currentIndex: u, currentFocusedEl: O, listboxId: Y, getOptionId: Z, selectedValueTitle: ee, tags: te, nmorphSelectDOMRef: V, optionsMinWidth: le, spaceHandler: () => {
137
130
  v.value || (r.value = !r.value);
138
131
  }, arrowDownHandler: () => {
139
132
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value + 1) % o.value.length);
140
133
  }, arrowUpHandler: () => {
141
134
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value - 1 + o.value.length) % o.value.length);
142
135
  }, enterHandler: () => {
143
- r.value && S.value && H(S.value);
136
+ r.value && O.value && H(O.value);
144
137
  }, setVirtualOptionRef: (e, n) => {
145
- const w = e instanceof Element ? e : e?.$el;
146
- s.measureElement(n, w);
138
+ s.measureElement(n, ce(e));
147
139
  }, escapeHandler: () => {
148
140
  r.value = !1;
149
141
  }, homeHandler: () => {
@@ -151,21 +143,21 @@ const ke = /* @__PURE__ */ ue({
151
143
  }, endHandler: () => {
152
144
  u.value = Math.max(o.value.length - 1, 0);
153
145
  }, get NmorphTagItem() {
154
- return ye;
146
+ return He;
155
147
  }, get NmorphIcon() {
156
- return ge;
148
+ return ye;
157
149
  }, get NmorphSelectOption() {
158
- return he;
150
+ return ge;
159
151
  }, get NmorphDropdown() {
160
- return me;
161
- }, get NmorphIconLoader() {
162
- return be;
152
+ return he;
153
+ }, get NmorphIconLoaderDots() {
154
+ return qe;
163
155
  }, get NmorphIconChevronDown() {
164
- return He;
156
+ return be;
165
157
  } };
166
- return Object.defineProperty(L, "__isScriptSetup", { enumerable: !1, value: !0 }), L;
158
+ return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
167
159
  }
168
160
  });
169
161
  export {
170
- ke as default
162
+ Ue as default
171
163
  };
@@ -31,10 +31,10 @@ const I = /* @__PURE__ */ g({
31
31
  () => S({
32
32
  nmorph: [y[s.value]],
33
33
  "nmorph-select-option": [
34
- `${e.disabled && "disabled"}`,
35
- `${e.label && "with-label"}`,
36
- `${u.value && "checked"}`,
37
- `${e.focused && "focused"}`
34
+ e.disabled && "disabled",
35
+ e.label && "with-label",
36
+ u.value && "checked",
37
+ e.focused && "focused"
38
38
  ]
39
39
  })
40
40
  ), m = t(() => ({
@@ -1,8 +1,9 @@
1
1
  import './NmorphSelectButton.css';
2
- import { defineComponent as c, ref as S, watch as g, computed as o, provide as n } from "vue";
2
+ import { defineComponent as c, ref as S, watch as g, computed as d, provide as o } from "vue";
3
3
  import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
+ import { toCssSize as u } from "../../../utils/common.js";
4
5
  import b from "./components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js";
5
- const _ = /* @__PURE__ */ c({
6
+ const z = /* @__PURE__ */ c({
6
7
  __name: "NmorphSelectButton",
7
8
  props: {
8
9
  modelValue: { type: String, required: !1, default: "" },
@@ -19,33 +20,33 @@ const _ = /* @__PURE__ */ c({
19
20
  tabindex: { type: Number, required: !1 }
20
21
  },
21
22
  emits: ["update:model-value"],
22
- setup(u, { expose: s, emit: m }) {
23
+ setup(n, { expose: s, emit: m }) {
23
24
  s();
24
- const e = u, l = m, i = S(e.modelValue);
25
+ const e = n, r = m, t = S(e.modelValue);
25
26
  g(
26
27
  () => e.modelValue,
27
- (t) => {
28
- i.value = t;
28
+ (i) => {
29
+ t.value = i;
29
30
  }
30
31
  );
31
- const f = o(
32
+ const f = d(
32
33
  () => y({
33
- "nmorph-select-button": [`${e.disabled && "disabled"}`, `${e.fill && "fill"}`, e.height]
34
+ "nmorph-select-button": [e.disabled && "disabled", e.fill && "fill", e.height]
34
35
  })
35
- ), r = (t) => typeof t == "number" ? `${t}px` : t, p = o(() => ({
36
- ...e.trackPadding !== void 0 && { "--track-padding": r(e.trackPadding) },
37
- ...e.itemSize !== void 0 && { "--item-size": r(e.itemSize) },
36
+ ), p = d(() => ({
37
+ ...e.trackPadding !== void 0 && { "--track-padding": u(e.trackPadding) },
38
+ ...e.itemSize !== void 0 && { "--item-size": u(e.itemSize) },
38
39
  ...e.itemFontSize !== void 0 && { "--item-font-size": e.itemFontSize }
39
- })), a = (t) => {
40
- e.disabled || (i.value = t, l("update:model-value", t));
40
+ })), l = (i) => {
41
+ e.disabled || (t.value = i, r("update:model-value", i));
41
42
  };
42
- n("select-button-selected-value", i), n("select-button-change-handler", a);
43
- const d = { props: e, emit: l, initialValue: i, modifiers: f, getCssSize: r, styles: p, changeHandler: a, get NmorphSelectButtonItem() {
43
+ o("select-button-selected-value", t), o("select-button-change-handler", l);
44
+ const a = { props: e, emit: r, initialValue: t, modifiers: f, styles: p, changeHandler: l, get NmorphSelectButtonItem() {
44
45
  return b;
45
46
  } };
46
- return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
47
+ return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
47
48
  }
48
49
  });
49
50
  export {
50
- _ as default
51
+ z as default
51
52
  };
@@ -22,7 +22,7 @@ const v = /* @__PURE__ */ c({
22
22
  s({ inputDOMRef: n });
23
23
  const l = d(() => r?.value === e.value), u = d(
24
24
  () => f({
25
- "nmorph-select-button-item": [`${l.value && "checked"}`, `${e.disabled && "disabled"}`]
25
+ "nmorph-select-button-item": [l.value && "checked", e.disabled && "disabled"]
26
26
  })
27
27
  ), a = { selectedValue: r, changeHandler: t, props: e, inputDOMRef: n, checked: l, modifiers: u, clickHandler: () => {
28
28
  e.disabled || t && t(e.value);
@@ -1,6 +1,7 @@
1
1
  import './NmorphSlider.css';
2
- import { defineComponent as k, computed as m, ref as o, watch as I, onMounted as A, onUnmounted as G } from "vue";
2
+ import { defineComponent as k, computed as m, ref as o, watch as E, onMounted as A, onUnmounted as G } from "vue";
3
3
  import { useModifiers as J } from "../../../utils/create-modifiers.js";
4
+ import { toCssSize as I } from "../../../utils/common.js";
4
5
  import { useFormItemInput as K } from "../nmorph-form/use-form-item-input.js";
5
6
  import Q from "../../feedback/nmorph-tooltip/NmorphTooltip.vue.js";
6
7
  const se = /* @__PURE__ */ k({
@@ -27,32 +28,32 @@ const se = /* @__PURE__ */ k({
27
28
  const e = H, { id: N, name: T, tabindex: S } = K(e), _ = m(
28
29
  () => J({
29
30
  nmorph: [],
30
- "nmorph-slider": [`${e.disabled && "disabled"}`]
31
+ "nmorph-slider": [e.disabled && "disabled"]
31
32
  })
32
- ), g = m(() => `${e.thumbWidth}px`), p = o(e.showTooltip), x = M, n = o(e.modelValue), c = o(null);
33
- I(n, () => {
34
- x("update:model-value", n.value);
35
- }), I(
33
+ ), w = m(() => `${e.thumbWidth}px`), p = o(e.showTooltip), g = M, n = o(e.modelValue), c = o(null);
34
+ E(n, () => {
35
+ g("update:model-value", n.value);
36
+ }), E(
36
37
  () => e.modelValue,
37
38
  (t) => {
38
39
  n.value = t;
39
40
  }
40
41
  );
41
- const y = o(null), C = m(() => {
42
- const t = s.value - s.value, r = e.max - e.min + t, u = (n.value - e.min) / r * 100, a = c.value?.clientWidth || 0, d = e.thumbWidth / a * 100, R = d / 2;
43
- let D = u - R;
44
- const W = `${Math.max(0, Math.min(100 - d, D))}%`, q = a / 100, X = e.thumbWidth / 2 / q, E = (y.value?.tooltipBody.clientWidth ?? 24) / 2 / q, j = E === 1 / 0 ? 1.714 : E, U = `${parseFloat(W) + X - j}%`;
42
+ const x = o(null), C = m(() => {
43
+ const t = l.value - l.value, r = e.max - e.min + t, u = (n.value - e.min) / r * 100, a = c.value?.clientWidth || 0, d = e.thumbWidth / a * 100, D = d / 2;
44
+ let X = u - D;
45
+ const P = `${Math.max(0, Math.min(100 - d, X))}%`, W = a / 100, $ = e.thumbWidth / 2 / W, q = (x.value?.tooltipBody.clientWidth ?? 24) / 2 / W, j = q === 1 / 0 ? 1.714 : q, U = `${parseFloat(P) + $ - j}%`;
45
46
  return {
46
- thumb: W,
47
+ thumb: P,
47
48
  tooltip: U
48
49
  };
49
- }), s = o(0), f = o(0), h = () => {
50
- s.value = window.innerWidth, f.value = window.innerHeight;
50
+ }), l = o(0), f = o(0), h = () => {
51
+ l.value = window.innerWidth, f.value = window.innerHeight;
51
52
  };
52
53
  A(() => {
53
- typeof window < "u" && (s.value = window.innerWidth, f.value = window.innerHeight, window.addEventListener("resize", h));
54
+ typeof window < "u" && (l.value = window.innerWidth, f.value = window.innerHeight, window.addEventListener("resize", h));
54
55
  }), G(() => {
55
- typeof window < "u" && (document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), window.removeEventListener("resize", h));
56
+ typeof window < "u" && (document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), window.removeEventListener("resize", h));
56
57
  });
57
58
  const v = (t) => {
58
59
  b.value = !1;
@@ -63,12 +64,12 @@ const se = /* @__PURE__ */ k({
63
64
  u = Math.max(0, Math.min(1, a / d)), n.value = e.min + u * (e.max - e.min);
64
65
  }
65
66
  n.value = Math.round(n.value / e.step) * e.step, n.value = Math.max(e.min, Math.min(e.max, n.value));
66
- }, l = (t) => {
67
+ }, s = (t) => {
67
68
  t.preventDefault(), v(t.clientX);
68
69
  }, i = () => {
69
- document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), b.value = !0;
70
+ document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), b.value = !0;
70
71
  }, z = (t) => {
71
- e.disabled || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), v(t.clientX), document.addEventListener("pointermove", l), document.addEventListener("pointerup", i), document.addEventListener("pointercancel", i));
72
+ e.disabled || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), v(t.clientX), document.addEventListener("pointermove", s), document.addEventListener("pointerup", i), document.addEventListener("pointercancel", i));
72
73
  }, F = o(null), O = () => {
73
74
  e.showTooltip && (p.value = !0);
74
75
  }, V = () => {
@@ -76,16 +77,16 @@ const se = /* @__PURE__ */ k({
76
77
  }, B = (t) => {
77
78
  const r = t.target;
78
79
  n.value = Number(r.value);
79
- }, b = o(!0), w = (t) => typeof t == "number" ? `${t}px` : t, $ = m(() => ({
80
- "--nmorph-slider-thumb-width": g.value,
81
- ...e.sliderHeight !== void 0 && { "--slider-height": w(e.sliderHeight) },
80
+ }, b = o(!0), R = m(() => ({
81
+ "--nmorph-slider-thumb-width": w.value,
82
+ ...e.sliderHeight !== void 0 && { "--slider-height": I(e.sliderHeight) },
82
83
  ...e.valueFixedContainerHeight !== void 0 && {
83
- "--value-fixed-container-height": w(e.valueFixedContainerHeight)
84
+ "--value-fixed-container-height": I(e.valueFixedContainerHeight)
84
85
  }
85
- })), P = { props: e, id: N, name: T, tabindex: S, modifiers: _, thumbWidthCss: g, tooltipVisible: p, emit: x, thumbValue: n, sliderContainer: c, tooltipRootRef: y, thumbXPercentPosition: C, windowWidth: s, windowHeight: f, resizeWindowHandler: h, updateThumbValue: v, pointerMove: l, pointerUp: i, pointerDownHandler: z, sliderFirst: F, handleMouseEnter: O, handleMouseLeave: V, nativeInputHandler: B, transitionEnabled: b, getCssSize: w, styles: $, get NmorphTooltip() {
86
+ })), y = { props: e, id: N, name: T, tabindex: S, modifiers: _, thumbWidthCss: w, tooltipVisible: p, emit: g, thumbValue: n, sliderContainer: c, tooltipRootRef: x, thumbXPercentPosition: C, windowWidth: l, windowHeight: f, resizeWindowHandler: h, updateThumbValue: v, pointerMove: s, pointerUp: i, pointerDownHandler: z, sliderFirst: F, handleMouseEnter: O, handleMouseLeave: V, nativeInputHandler: B, transitionEnabled: b, styles: R, get NmorphTooltip() {
86
87
  return Q;
87
88
  } };
88
- return Object.defineProperty(P, "__isScriptSetup", { enumerable: !1, value: !0 }), P;
89
+ return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
89
90
  }
90
91
  });
91
92
  export {
@@ -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,11 @@
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
+ import { toCssSize as a } from "../../../utils/common.js";
4
5
  import { useFormItemInput as _ } from "../nmorph-form/use-form-item-input.js";
5
6
  import w from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
7
  import H from "../../../assets/icons/loader.svg.js";
7
- const L = /* @__PURE__ */ q({
8
+ const M = /* @__PURE__ */ q({
8
9
  __name: "NmorphSwitch",
9
10
  props: {
10
11
  modelValue: { type: [Boolean, String, Number], required: !1, default: !1 },
@@ -23,27 +24,27 @@ const L = /* @__PURE__ */ q({
23
24
  },
24
25
  emits: ["update:model-value"],
25
26
  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;
28
- }, v = () => {
29
- i.value = !1;
27
+ const e = s, { id: p, name: c, tabindex: h } = _(e), u = m, r = i(!1), v = () => {
28
+ r.value = !0;
29
+ }, g = () => {
30
+ r.value = !1;
30
31
  }, b = n(
31
32
  () => V({
32
33
  "nmorph-switch": [
33
- `${e.disabled && "disabled"}`,
34
- `${r.value ? "on" : "off"}`,
35
- `${e.loading && "loading"}`,
36
- `${i.value && "focus"}`
34
+ e.disabled && "disabled",
35
+ t.value ? "on" : "off",
36
+ e.loading && "loading",
37
+ r.value && "focus"
37
38
  ]
38
39
  })
39
- ), r = o(e.modelValue === e.activeValue), y = () => {
40
+ ), t = i(e.modelValue === e.activeValue), y = () => {
40
41
  if (e.disabled) return;
41
- r.value = !r.value;
42
- const t = r.value ? e.activeValue : e.inactiveValue;
43
- u("update:model-value", t);
44
- }, l = o(null);
42
+ t.value = !t.value;
43
+ const o = t.value ? e.activeValue : e.inactiveValue;
44
+ u("update:model-value", o);
45
+ }, l = i(null);
45
46
  f({ inputDOMRef: l });
46
- const a = (t) => typeof t == "number" ? `${t}px` : t, S = n(() => ({
47
+ const S = n(() => ({
47
48
  ...e.width !== void 0 && { "--width": a(e.width) },
48
49
  ...e.height !== void 0 && { "--height": a(e.height) },
49
50
  ...e.offset !== void 0 && { "--offset": a(e.offset) },
@@ -51,18 +52,18 @@ const L = /* @__PURE__ */ q({
51
52
  }));
52
53
  N(
53
54
  () => e.modelValue,
54
- (t) => {
55
- r.value = t === e.activeValue;
55
+ (o) => {
56
+ t.value = o === e.activeValue;
56
57
  }
57
58
  );
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() {
59
+ const d = { props: e, id: p, name: c, tabindex: h, emit: u, focus: r, focusHandler: v, blurHandler: g, modifiers: b, initialValue: t, changeHandler: y, inputDOMRef: l, styles: S, get NmorphIcon() {
59
60
  return w;
60
- }, get NmorphIconLoader() {
61
+ }, get NmorphIconLoaderDots() {
61
62
  return H;
62
63
  } };
63
64
  return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
64
65
  }
65
66
  });
66
67
  export {
67
- L as default
68
+ M as default
68
69
  };
@@ -0,0 +1 @@
1
+ .nmorph-text-input{--prepend-icon-indent: 8px;--prepend-icon-size: 14px;display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start;min-width:0}.nmorph-text-input__input-side{position:relative;display:flex;justify-content:flex-end;align-items:center;width:100%}.nmorph-text-input__prepend-icon{position:absolute;left:0;z-index:1;display:flex;justify-content:center;align-items:center;width:var(--prepend-icon-size);min-width:var(--prepend-icon-size);height:var(--prepend-icon-size);min-height:var(--prepend-icon-size);margin-left:var(--prepend-icon-indent);pointer-events:none}.nmorph-text-input__prepend-icon svg,.nmorph-text-input__prepend-icon .nmorph-icon,.nmorph-text-input__prepend-icon .nmorph-icon__content{width:100%;min-width:100%;height:100%;min-height:100%}.nmorph-text-input__prepend-icon svg{fill:var(--nmorph-text-color);stroke-width:0}.nmorph-text-input__prepend-icon path{stroke:var(--nmorph-text-color)}.nmorph-text-input input{width:100%;height:var(--height);text-indent:var(--nmorph-text-input-indentation);border:none;border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-text-input--with-action input{padding-right:calc(var(--height) + var(--indentation-03))}.nmorph-text-input input:focus{background:var(--nmorph-accent-color);outline:none;box-shadow:var(--nmorph-shadow-outset)}.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon svg{fill:var(--nmorph-focus-text-color)}.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon path{stroke:var(--nmorph-focus-text-color)}.nmorph-text-input input:-webkit-autofill,.nmorph-text-input input:-webkit-autofill:hover,.nmorph-text-input input:-webkit-autofill:active{caret-color:var(--nmorph-text-color);box-shadow:var(--nmorph-shadow-inset),inset 0 0 0 1000px var(--nmorph-main-color);-webkit-text-fill-color:var(--nmorph-text-color)}.nmorph-text-input input:-webkit-autofill:focus{caret-color:var(--nmorph-focus-text-color);outline:none;box-shadow:var(--nmorph-shadow-outset),inset 0 0 0 1000px var(--nmorph-accent-color);-webkit-text-fill-color:var(--nmorph-focus-text-color)}.nmorph-text-input input:disabled{cursor:not-allowed;opacity:.6}.nmorph-text-input__password-btn{position:absolute;right:0;height:100%}.nmorph-text-input__password-btn .nmorph-button__content{padding:var(--indentation-03)}.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn{margin-top:var(--indentation-00)}.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn .nmorph-button{--height: var(--thin-component)}.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-icon{--color: var(--nmorph-white-color)}.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-button:not(:disabled,[loading=true]):hover .nmorph-icon{--color: var(--nmorph-white-color)}
@@ -1,5 +1,7 @@
1
+ import './NmorphTextInput.css';
1
2
  import s from "./NmorphTextInput.vue2.js";
2
3
  import { openBlock as n, createElementBlock as r, normalizeStyle as m, normalizeClass as c, createElementVNode as i, renderSlot as h, createCommentVNode as l, mergeProps as f, withKeys as y, createBlock as d, withModifiers as _, withCtx as a, createVNode as u, resolveDynamicComponent as b } from "vue";
4
+ /* empty css */
3
5
  import x from "../../../_virtual/_plugin-vue_export-helper.js";
4
6
  const v = { class: "nmorph-text-input__input-side" }, k = {
5
7
  key: 0,
@@ -64,7 +66,7 @@ function B(p, o, N, e, C, I) {
64
66
  /* CLASS, STYLE */
65
67
  );
66
68
  }
67
- const M = /* @__PURE__ */ x(s, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-text-input/NmorphTextInput.vue"]]);
69
+ const z = /* @__PURE__ */ x(s, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-text-input/NmorphTextInput.vue"]]);
68
70
  export {
69
- M as default
71
+ z as default
70
72
  };
@@ -1,13 +1,14 @@
1
+ import './NmorphTextInput.css';
1
2
  import { defineComponent as C, useSlots as E, computed as n, ref as l } from "vue";
2
3
  import { NmorphComponentHeight as O } from "../../../types/index.js";
3
- import { useModifiers as $ } from "../../../utils/create-modifiers.js";
4
- import { useFormItemInput as j } from "../nmorph-form/use-form-item-input.js";
5
- import F from "../../../assets/icons/eye-blocked.svg.js";
6
- import H from "../../../assets/icons/eye.svg.js";
7
- import M from "../../basic/nmorph-button/NmorphButton.vue.js";
8
- import A from "../../basic/nmorph-icon/NmorphIcon.vue.js";
9
- import D from "../../../assets/icons/error.svg.js";
10
- const U = /* @__PURE__ */ C({
4
+ import { useModifiers as j } from "../../../utils/create-modifiers.js";
5
+ import { useFormItemInput as F } from "../nmorph-form/use-form-item-input.js";
6
+ import H from "../../../assets/icons/eye-blocked.svg.js";
7
+ import M from "../../../assets/icons/eye.svg.js";
8
+ import A from "../../basic/nmorph-button/NmorphButton.vue.js";
9
+ import D from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
+ import R from "../../../assets/icons/error.svg.js";
11
+ const W = /* @__PURE__ */ C({
11
12
  __name: "NmorphTextInput",
12
13
  props: {
13
14
  placeholder: { type: String, required: !1, default: "" },
@@ -25,13 +26,10 @@ const U = /* @__PURE__ */ C({
25
26
  },
26
27
  emits: ["update:model-value", "focus", "blur", "on-enter", "keydown"],
27
28
  setup(f, { expose: m, emit: h }) {
28
- const s = E(), e = f, { id: y, name: b, autocomplete: v, tabindex: g } = j(e), q = n(
29
- () => $({
30
- nmorph: [O[e.height], `${a.value && "focused"}`],
31
- "nmorph-text-input": [
32
- `${e.typePassword && "password"}`,
33
- `${(e.typePassword || e.clearable) && "with-action"}`
34
- ]
29
+ const s = E(), e = f, { id: y, name: b, autocomplete: v, tabindex: g } = F(e), q = n(
30
+ () => j({
31
+ nmorph: [O[e.height], a.value && "focused"],
32
+ "nmorph-text-input": [e.typePassword && "password", (e.typePassword || e.clearable) && "with-action"]
35
33
  })
36
34
  ), w = (P) => {
37
35
  const k = P.target;
@@ -50,14 +48,14 @@ const U = /* @__PURE__ */ C({
50
48
  o.value?.select();
51
49
  };
52
50
  m({ inputDOMRef: o, focus: u, blur: p, select: i });
53
- const r = h, S = n(() => e.clearable ? D : t.value ? F : H), d = n(() => e.indentation || (s["prepend-icon"] ? "28px" : "8px")), B = n(() => ({ "--nmorph-text-input-indentation": d.value })), c = { slots: s, props: e, id: y, name: b, autocomplete: v, tabindex: g, modifiers: q, handleInput: w, showPassword: t, actionButtonClickHandler: x, type: I, focused: a, handleFocus: N, handleBlur: _, inputDOMRef: o, focus: u, blur: p, select: i, emit: r, actionIcon: S, indentation: d, styles: B, get NmorphIcon() {
54
- return A;
51
+ const r = h, S = n(() => e.clearable ? R : t.value ? H : M), d = n(() => e.indentation || (s["prepend-icon"] ? "28px" : "8px")), B = n(() => ({ "--nmorph-text-input-indentation": d.value })), c = { slots: s, props: e, id: y, name: b, autocomplete: v, tabindex: g, modifiers: q, handleInput: w, showPassword: t, actionButtonClickHandler: x, type: I, focused: a, handleFocus: N, handleBlur: _, inputDOMRef: o, focus: u, blur: p, select: i, emit: r, actionIcon: S, indentation: d, styles: B, get NmorphIcon() {
52
+ return D;
55
53
  }, get NmorphButton() {
56
- return M;
54
+ return A;
57
55
  } };
58
56
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
59
57
  }
60
58
  });
61
59
  export {
62
- U as default
60
+ W as default
63
61
  };
@@ -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}
@@ -0,0 +1,41 @@
1
+ import './NmorphTextarea.css';
2
+ import a from "./NmorphTextarea.vue2.js";
3
+ import { openBlock as n, createElementBlock as t, normalizeStyle as l, normalizeClass as d, createElementVNode as i, mergeProps as m, withKeys as s } from "vue";
4
+ /* empty css */
5
+ import p from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const c = ["id", "name", "autocomplete", "tabindex", "placeholder", "disabled", "value", "rows"];
7
+ function f(x, o, h, e, b, y) {
8
+ return n(), t(
9
+ "div",
10
+ {
11
+ class: d(e.modifiers),
12
+ style: l(e.styles)
13
+ },
14
+ [
15
+ i("textarea", m({
16
+ id: e.id,
17
+ ref: "textareaDOMRef",
18
+ name: e.name,
19
+ autocomplete: e.autocomplete,
20
+ tabindex: e.tabindex,
21
+ class: "nmorph-native-input",
22
+ placeholder: e.props.placeholder,
23
+ disabled: e.props.disabled,
24
+ value: e.props.modelValue,
25
+ rows: e.rows
26
+ }, e.props.textareaAttrs, {
27
+ onInput: e.handleInput,
28
+ onFocus: e.handleFocus,
29
+ onBlur: e.handleBlur,
30
+ onKeydown: o[0] || (o[0] = (r) => e.emit("keydown", r)),
31
+ onKeyup: o[1] || (o[1] = s((r) => e.emit("on-enter"), ["enter"]))
32
+ }), null, 16, c)
33
+ ],
34
+ 6
35
+ /* CLASS, STYLE */
36
+ );
37
+ }
38
+ const k = /* @__PURE__ */ p(a, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-textarea/NmorphTextarea.vue"]]);
39
+ export {
40
+ k as default
41
+ };