@nmorph/nmorph-ui-kit 2.2.36 → 2.2.38

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 (114) hide show
  1. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +8 -8
  2. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
  3. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +14 -13
  4. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
  5. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
  6. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
  7. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
  8. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +15 -19
  9. package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
  10. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +5 -5
  11. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
  12. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
  13. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +19 -15
  14. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
  15. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
  16. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
  17. package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
  18. package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
  19. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
  20. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
  21. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +1 -1
  22. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
  23. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +20 -19
  24. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
  25. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
  26. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +34 -33
  27. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
  28. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
  29. package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
  30. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
  31. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
  32. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +22 -21
  33. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
  34. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +65 -71
  35. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
  36. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +30 -28
  37. package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +25 -20
  38. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +43 -42
  39. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +53 -40
  40. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +20 -16
  41. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +113 -86
  42. package/dist/components/form/nmorph-form/NmorphForm.vue2.js +9 -9
  43. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +33 -24
  44. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
  45. package/dist/components/form/nmorph-form/use-form-item-input.js +29 -8
  46. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +42 -39
  47. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +66 -62
  48. package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
  49. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  50. package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +24 -22
  51. package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
  52. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +83 -81
  53. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
  54. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +28 -25
  55. package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
  56. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +51 -49
  57. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +35 -33
  58. package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
  59. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +5 -3
  60. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +37 -35
  61. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +1 -1
  62. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +30 -26
  63. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +1 -1
  64. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +68 -66
  65. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +1 -1
  66. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
  67. package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
  68. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
  69. package/dist/hooks/use-common-styles.js +18 -278
  70. package/dist/hooks/use-field-validation.js +71 -42
  71. package/dist/hooks/use-form-validation.js +62 -24
  72. package/dist/hooks/use-virtual-list.js +38 -32
  73. package/dist/index.umd.js +26 -286
  74. package/dist/package.json.js +1 -1
  75. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +2 -2
  76. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +1 -1
  77. package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +1 -1
  78. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
  79. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
  80. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +1 -1
  81. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
  82. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +1 -1
  83. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +1 -1
  84. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
  85. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +1 -1
  86. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
  87. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
  88. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +3 -3
  89. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
  90. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +3 -3
  91. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +6 -3
  92. package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
  93. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
  94. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
  95. package/dist/src/components/form/nmorph-form/types.d.ts +15 -5
  96. package/dist/src/components/form/nmorph-form/use-form-item-input.d.ts +10 -0
  97. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  98. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
  99. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +3 -3
  100. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
  101. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
  102. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  103. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
  104. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
  105. package/dist/src/hooks/use-field-validation.d.ts +15 -0
  106. package/dist/src/hooks/use-form-validation.d.ts +5 -0
  107. package/dist/src/hooks/use-virtual-list.d.ts +6 -0
  108. package/dist/src/types/index.d.ts +2 -1
  109. package/dist/src/utils/common.d.ts +5 -0
  110. package/dist/src/utils/create-modifiers.d.ts +4 -2
  111. package/dist/style.css +1 -1
  112. package/dist/utils/common.js +9 -3
  113. package/dist/utils/create-modifiers.js +6 -6
  114. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import './NmorphOTPInput.css';
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({
2
+ import { defineComponent as le, ref as M, computed as c, watch as O, nextTick as R } from "vue";
3
+ import { useModifiers as ue } from "../../../utils/create-modifiers.js";
4
+ import { NmorphComponentHeight as oe } from "../../../types/index.js";
5
+ import { useFormItemInput as re, useFormItemModel as ne } from "../nmorph-form/use-form-item-input.js";
6
+ import se from "../nmorph-text-input/NmorphTextInput.vue.js";
7
+ const pe = /* @__PURE__ */ le({
8
8
  __name: "NmorphOTPInput",
9
9
  props: {
10
10
  modelValue: { type: String, required: !1, default: "" },
@@ -20,128 +20,132 @@ const de = /* @__PURE__ */ te({
20
20
  tabindex: { type: Number, required: !1 }
21
21
  },
22
22
  emits: ["update:model-value", "focus", "blur", "complete"],
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 = "") => {
23
+ setup(j, { expose: w, emit: N }) {
24
+ const l = j, f = N, { id: V, name: T, autocomplete: A, tabindex: p } = re(l), { modelValue: v, updateModelValue: F } = ne(
25
+ l,
26
+ (e) => f("update:model-value", e),
27
+ ""
28
+ ), i = M([]), n = M([]), d = M(!1), o = M([]), u = c(() => Math.max(1, l.length)), g = (e = "") => {
25
29
  const t = `${e ?? ""}`;
26
30
  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
- const t = v(e).slice(0, u.value);
31
+ }, S = (e = v.value) => {
32
+ const t = g(e).slice(0, u.value);
29
33
  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;
34
+ }, h = (e, t = !1) => {
35
+ if (o.value = Array.from({ length: u.value }, (s, b) => e[b] || ""), !t) return;
32
36
  const a = o.value.join("");
33
- f("update:model-value", a), o.value.includes("") || f("complete", a);
37
+ F(a), o.value.includes("") || f("complete", a);
34
38
  };
35
- D(
36
- [() => l.modelValue, () => l.mode, u],
39
+ O(
40
+ [v, () => l.mode, u],
37
41
  () => {
38
- const e = A(l.modelValue);
39
- (e.join("") !== o.value.join("") || e.length !== o.value.length) && g(e);
42
+ const e = S(v.value);
43
+ (e.join("") !== o.value.join("") || e.length !== o.value.length) && h(e);
40
44
  },
41
45
  { immediate: !0 }
42
46
  );
43
- const N = c(
44
- () => ae({
45
- nmorph: [le[l.height], `${d.value && "focused"}`],
46
- "nmorph-otp-input": [`${l.disabled && "disabled"}`]
47
+ const E = c(
48
+ () => ue({
49
+ nmorph: [oe[l.height], d.value && "focused"],
50
+ "nmorph-otp-input": [l.disabled && "disabled"]
47
51
  })
48
- ), T = c(
52
+ ), B = c(
49
53
  () => Array.from({ length: u.value }, (e, t) => t === 0 ? V.value : `${V.value}-${t + 1}`)
50
- ), $ = c(() => l.mode === "numeric" ? "numeric" : "text"), E = c(() => q.value || "one-time-code"), B = c(() => {
54
+ ), C = c(() => l.mode === "numeric" ? "numeric" : "text"), P = c(() => A.value || "one-time-code"), $ = c(() => {
51
55
  if (l.mode === "numeric") return "[0-9]*";
52
56
  if (l.mode === "alphanumeric") return "[A-Za-z0-9]*";
53
- }), h = (e) => {
57
+ }), y = (e) => {
54
58
  n.value[e] = i.value[e]?.inputDOMRef ?? null;
55
- }, C = (e, t) => {
56
- i.value[t] = e, O(() => {
57
- h(t);
59
+ }, x = (e, t) => {
60
+ i.value[t] = e, R(() => {
61
+ y(t);
58
62
  });
59
63
  }, _ = (e) => {
60
- h(e), i.value[e]?.select?.(), n.value[e]?.select();
64
+ y(e), i.value[e]?.select?.(), n.value[e]?.select();
61
65
  }, r = (e = 0) => {
62
- O(() => {
66
+ R(() => {
63
67
  const t = Math.min(Math.max(e, 0), u.value - 1);
64
- h(t), i.value[t]?.focus?.(), n.value[t]?.focus(), _(t);
68
+ y(t), i.value[t]?.focus?.(), n.value[t]?.focus(), _(t);
65
69
  });
66
- }, F = () => {
70
+ }, k = () => {
67
71
  i.value.forEach((e, t) => {
68
72
  e?.blur?.(), n.value[t]?.blur();
69
73
  });
70
74
  };
71
- R({
75
+ w({
72
76
  inputDOMRefs: n,
73
77
  focus: r,
74
- blur: F
78
+ blur: k
75
79
  });
76
80
  const m = (e, t = "") => {
77
81
  const a = [...o.value];
78
- a[e] = t, g(a, !0);
82
+ a[e] = t, h(a, !0);
79
83
  }, H = (e, t) => {
80
- const a = v(e).slice(0, u.value - t);
84
+ const a = g(e).slice(0, u.value - t);
81
85
  if (!a.length) {
82
86
  m(t, "");
83
87
  return;
84
88
  }
85
89
  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) => {
90
+ a.forEach((te, ae) => {
91
+ s[t + ae] = te;
92
+ }), h(s, !0);
93
+ const b = t + a.length;
94
+ b < u.value ? r(b) : r(u.value - 1);
95
+ }, z = (e, t) => {
92
96
  H(e, t);
93
- }, M = /* @__PURE__ */ new Map(), P = (e) => {
94
- const t = M.get(e);
97
+ }, q = /* @__PURE__ */ new Map(), L = (e) => {
98
+ const t = q.get(e);
95
99
  if (t) return t;
96
100
  const a = c({
97
101
  get: () => o.value[e] || "",
98
- set: (s) => S(s, e)
102
+ set: (s) => z(s, e)
99
103
  });
100
- return M.set(e, a), a;
101
- }, k = (e) => {
104
+ return q.set(e, a), a;
105
+ }, D = (e) => {
102
106
  if (o.value[e]) {
103
107
  m(e);
104
108
  return;
105
109
  }
106
110
  e > 0 && (m(e - 1), r(e - 1));
107
- }, x = (e, t) => {
111
+ }, Z = (e, t) => {
108
112
  if (e.key === "Backspace") {
109
- k(t);
113
+ D(t);
110
114
  return;
111
115
  }
112
116
  m(t);
113
- }, L = (e) => {
117
+ }, K = (e) => {
114
118
  r(e - 1);
115
- }, Z = (e) => {
119
+ }, G = (e) => {
116
120
  r(e + 1);
117
- }, K = () => {
121
+ }, J = () => {
118
122
  r(0);
119
- }, G = () => {
123
+ }, Q = () => {
120
124
  r(u.value - 1);
121
- }, J = (e) => {
122
- e.key.length === 1 && !v(e.key).length && e.preventDefault();
123
- }, Q = (e, t) => {
125
+ }, U = (e) => {
126
+ e.key.length === 1 && !g(e.key).length && e.preventDefault();
127
+ }, W = (e, t) => {
124
128
  const a = e.clipboardData?.getData("text") || "";
125
129
  H(a, t);
126
- }, U = (e) => {
130
+ }, X = (e) => {
127
131
  d.value || (d.value = !0, f("focus")), _(e);
128
- }, W = () => {
132
+ }, Y = () => {
129
133
  setTimeout(() => {
130
134
  const e = document.activeElement;
131
135
  !n.value.some((a) => a === e) && d.value && (d.value = !1, f("blur"));
132
136
  });
133
- }, X = (e) => p.value > 0 ? p.value + e : p.value;
134
- D(
137
+ }, ee = (e) => p.value > 0 ? p.value + e : p.value;
138
+ O(
135
139
  () => l.autofocus,
136
140
  (e) => {
137
141
  e && !l.disabled && r(0);
138
142
  },
139
143
  { immediate: !0 }
140
144
  );
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;
145
+ const I = { props: l, emit: f, id: V, name: T, autocomplete: A, tabindex: p, modelValue: v, updateModelValue: F, inputRefs: i, inputDOMRefs: n, focused: d, otpValue: o, normalizedLength: u, sanitizeValue: g, normalizeOtpValue: S, syncOtpValue: h, modifiers: E, fieldIds: B, inputMode: C, resolvedAutocomplete: P, inputPattern: $, syncInputDOMRef: y, setInputRef: x, selectField: _, focusField: r, blurFields: k, updateCharAt: m, insertValue: H, inputHandler: z, fieldModels: q, getFieldModel: L, backspaceHandler: D, deleteKeyHandler: Z, arrowLeftHandler: K, arrowRightHandler: G, homeHandler: J, endHandler: Q, keydownHandler: U, pasteHandler: W, focusHandler: X, blurHandler: Y, getFieldTabindex: ee, NmorphTextInput: se };
146
+ return Object.defineProperty(I, "__isScriptSetup", { enumerable: !1, value: !0 }), I;
143
147
  }
144
148
  });
145
149
  export {
146
- de as default
150
+ pe as default
147
151
  };
@@ -1 +1 @@
1
- .nmorph-radio{--size: var(--height);display:inline-flex;align-items:center;cursor:pointer}.nmorph-radio .nmorph-radio__content{position:relative;display:flex;justify-content:center;align-items:center}.nmorph-radio span{margin-top:2px}.nmorph-radio .nmorph-radio__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-radio input{position:absolute;top:0;left:0;width:100%;height:100%}.nmorph-radio input:focus-visible{background:var(--nmorph-main-color);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio .nmorph-radio__fake{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio .nmorph-radio__fake span,.nmorph-radio .nmorph-radio__label{font-weight:400;font-size:var(--font-size-small);line-height:var(--line-height-regular)}.nmorph-radio .nmorph-radio__fake-checked{position:absolute;top:50%;left:50%;width:50%;height:50%;background:var(--nmorph-accent-color);border-radius:var(--border-radius-circular);transform:translate(-50%,-50%)}.nmorph-radio .nmorph-radio__label{margin-left:var(--indentation-02)}.nmorph-radio.nmorph-radio--button .nmorph-radio__fake{position:relative;display:flex;justify-content:center;align-items:center;height:var(--size);padding:var(--indentation-03);white-space:nowrap;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio.nmorph--extra-thin-component .nmorph-radio__fake span,.nmorph-radio.nmorph--extra-thin-component .nmorph-radio__label{font-size:var(--font-size-tiny);line-height:var(--line-height-line)}.nmorph-radio.nmorph--extra-thin-component.nmorph-radio--button .nmorph-radio__fake{padding:var(--indentation-02)}.nmorph-radio.nmorph-radio--checked .nmorph-radio__fake{background:var(--nmorph-main-color);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio.nmorph-radio--disabled{cursor:not-allowed;opacity:.6}
1
+ .nmorph-radio{--size: var(--height);--nmorph-selection-control-font-size: var(--font-size-small);--nmorph-selection-control-line-height: var(--line-height-regular);--nmorph-selection-control-inline-padding: var(--indentation-03);display:inline-flex;align-items:center;cursor:pointer}.nmorph-radio.nmorph{height:auto;min-height:var(--size)}.nmorph-radio .nmorph-radio__content{position:relative;display:flex;justify-content:center;align-items:center;min-height:var(--size)}.nmorph-radio span{margin-top:2px}.nmorph-radio .nmorph-radio__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-radio input{position:absolute;top:0;left:0;width:100%;height:100%}.nmorph-radio input:focus-visible{background:var(--nmorph-main-color);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio .nmorph-radio__fake{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio .nmorph-radio__fake span,.nmorph-radio .nmorph-radio__label{font-weight:400;font-size:var(--nmorph-selection-control-font-size);line-height:var(--nmorph-selection-control-line-height)}.nmorph-radio .nmorph-radio__fake-checked{position:absolute;top:50%;left:50%;width:50%;height:50%;background:var(--nmorph-accent-color);border-radius:var(--border-radius-circular);transform:translate(-50%,-50%)}.nmorph-radio .nmorph-radio__label{margin-left:var(--indentation-02)}.nmorph-radio.nmorph-radio--button .nmorph-radio__fake{position:relative;display:flex;justify-content:center;align-items:center;height:var(--size);padding:var(--nmorph-selection-control-inline-padding);white-space:nowrap;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio.nmorph--extra-thin-component{--nmorph-selection-control-font-size: var(--font-size-tiny);--nmorph-selection-control-line-height: var(--line-height-line);--nmorph-selection-control-inline-padding: var(--indentation-02)}.nmorph-radio.nmorph--thin-component{--nmorph-selection-control-font-size: var(--font-size-extra-small)}.nmorph-radio.nmorph--basic-component{--nmorph-selection-control-font-size: var(--font-size-small)}.nmorph-radio.nmorph--thick-component{--nmorph-selection-control-font-size: var(--font-size-base)}.nmorph-radio.nmorph-radio--checked .nmorph-radio__fake{background:var(--nmorph-main-color);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-radio.nmorph-radio--disabled{cursor:not-allowed;opacity:.6}
@@ -25,7 +25,7 @@ const q = /* @__PURE__ */ h({
25
25
  }, d = l(() => o?.value === e.value || e.checked), i = l(() => e.height || a?.value || "thin"), f = l(
26
26
  () => g({
27
27
  nmorph: [v[i.value]],
28
- "nmorph-radio": [`${e.disabled && "disabled"}`, `${d.value && "checked"}`, e.styleType]
28
+ "nmorph-radio": [e.disabled && "disabled", d.value && "checked", e.styleType]
29
29
  })
30
30
  ), u = m(null);
31
31
  p({ inputDOMRef: u });
@@ -1,11 +1,12 @@
1
1
  import './NmorphRadioGroup.css';
2
- import { defineComponent as m, ref as c, watch as h, computed as d, provide as o } from "vue";
3
- import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
- import g from "../nmorph-radio/NmorphRadio.vue.js";
5
- const b = /* @__PURE__ */ m({
2
+ import { defineComponent as h, ref as y, watch as g, computed as n, provide as a } from "vue";
3
+ import { useModifiers as q } from "../../../utils/create-modifiers.js";
4
+ import { useFormItemModel as v } from "../nmorph-form/use-form-item-input.js";
5
+ import _ from "../nmorph-radio/NmorphRadio.vue.js";
6
+ const x = /* @__PURE__ */ h({
6
7
  __name: "NmorphRadioGroup",
7
8
  props: {
8
- modelValue: { type: String, required: !0, default: "" },
9
+ modelValue: { type: String, required: !1, default: "" },
9
10
  options: { type: Array, required: !1, default: () => [] },
10
11
  styleType: { type: null, required: !1, default: "button" },
11
12
  direction: { type: null, required: !1, default: "row" },
@@ -17,25 +18,26 @@ const b = /* @__PURE__ */ m({
17
18
  tabindex: { type: Number, required: !1 }
18
19
  },
19
20
  emits: ["update:model-value"],
20
- setup(n, { expose: p, emit: s }) {
21
- p();
22
- const e = n, t = c(e.modelValue);
23
- h(
24
- () => e.modelValue,
25
- (r) => {
26
- t.value = r;
27
- }
28
- );
29
- const a = s, i = (r) => {
30
- t.value = r, a("update:model-value", t.value);
31
- }, f = d(() => y({ "nmorph-radio-group": [e.styleType, e.direction] })), u = d(() => e.height);
32
- o("radio-group-selected-value", t), o("change-radio-button-value-handler", i), o("radio-group-height", u);
33
- const l = { props: e, initialValue: t, emit: a, changeHandler: i, modifiers: f, height: u, get NmorphRadio() {
34
- return g;
21
+ setup(s, { expose: m, emit: f }) {
22
+ m();
23
+ const e = s, i = f, { modelValue: o, updateModelValue: l } = v(
24
+ e,
25
+ (r) => i("update:model-value", r),
26
+ ""
27
+ ), t = y(o.value);
28
+ g(o, (r) => {
29
+ t.value = r;
30
+ });
31
+ const u = (r) => {
32
+ t.value = r, l(t.value);
33
+ }, c = n(() => q({ "nmorph-radio-group": [e.styleType, e.direction] })), d = n(() => e.height);
34
+ a("radio-group-selected-value", t), a("change-radio-button-value-handler", u), a("radio-group-height", d);
35
+ const p = { props: e, emit: i, modelValue: o, updateModelValue: l, initialValue: t, changeHandler: u, modifiers: c, height: d, get NmorphRadio() {
36
+ return _;
35
37
  } };
36
- return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
38
+ return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
37
39
  }
38
40
  });
39
41
  export {
40
- b as default
42
+ x as default
41
43
  };
@@ -1 +1 @@
1
- .nmorph-select{--base-width: 200px;width:var(--base-width);height:var(--height);cursor:pointer}.nmorph-select .nmorph-select__content{position:relative;height:100%;background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-outset)}.nmorph-select .nmorph-select__selected-values-line{display:flex;justify-content:space-between;align-items:center;height:100%;padding:var(--indentation-00) var(--default-indentation-input);border-radius:var(--default-border-radius)}.nmorph-select .nmorph-select__selected-value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-select select,.nmorph-select option{position:absolute;width:0;height:0;padding:0;border:none;opacity:0}.nmorph-select.nmorph-select--loading .nmorph-select__options{display:flex;justify-content:center;padding:16px}.nmorph-select.nmorph-select--disabled{cursor:not-allowed;opacity:.6}.nmorph-select.nmorph-select--fill{width:100%}.nmorph-select.nmorph-select--options-auto-width .nmorph-select__options{width:max-content;max-width:calc(100vw - var(--indentation-02) * 2)}.nmorph-select .nmorph-select__virtual-list{overflow-y:auto}.nmorph-select .nmorph-select__virtual-spacer{position:relative}.nmorph-select .nmorph-select__virtual-content{position:absolute;top:0;right:0;left:0}.nmorph-select.nmorph-select--open .nmorph-select__chevron{transform:rotate(180deg)}.nmorph-select.nmorph-select--open .nmorph-select__content{background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-inset)}.nmorph-select.nmorph-select--selected-line-outset .nmorph-select__content{background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-outset)}.nmorph-select.nmorph-select--focus{outline:2px solid var(--nmorph-accent-color)}.nmorph-select.nmorph-select--focus .nmorph-select__content{box-shadow:none}
1
+ .nmorph-select{--base-width: 200px;width:var(--base-width);height:var(--height);border-radius:var(--default-border-radius);cursor:pointer}.nmorph-select .nmorph-select__content{position:relative;height:100%;background:var(--nmorph-main-color);border-radius:inherit;box-shadow:var(--nmorph-shadow-outset)}.nmorph-select .nmorph-select__selected-values-line{display:flex;justify-content:space-between;align-items:center;height:100%;padding:var(--indentation-00) var(--default-indentation-input);border-radius:inherit}.nmorph-select .nmorph-select__selected-value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-select select,.nmorph-select option{position:absolute;width:0;height:0;padding:0;border:none;opacity:0}.nmorph-select.nmorph-select--loading .nmorph-select__options{display:flex;justify-content:center;padding:16px}.nmorph-select.nmorph-select--disabled{cursor:not-allowed;opacity:.6}.nmorph-select.nmorph-select--fill{width:100%}.nmorph-select.nmorph-select--options-auto-width .nmorph-select__options{width:max-content;max-width:calc(100vw - var(--indentation-02) * 2)}.nmorph-select .nmorph-select__virtual-list{overflow-y:auto}.nmorph-select .nmorph-select__virtual-spacer{position:relative}.nmorph-select .nmorph-select__virtual-content{position:absolute;top:0;right:0;left:0}.nmorph-select.nmorph-select--open .nmorph-select__chevron{transform:rotate(180deg)}.nmorph-select.nmorph-select--open .nmorph-select__content{background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-inset)}.nmorph-select.nmorph-select--selected-line-outset .nmorph-select__content{background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-outset)}.nmorph-select.nmorph-select--focus{outline:2px solid var(--nmorph-accent-color)}.nmorph-select.nmorph-select--focus .nmorph-select__content{box-shadow:none}
@@ -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 oe, computed as a, ref as d, watch as c, nextTick as R, onMounted as ie, onUnmounted as se, provide as w, toRef as de } from "vue";
3
+ import { NmorphComponentHeight as ve } from "../../../types/index.js";
4
+ import { useModifiers as ce } from "../../../utils/create-modifiers.js";
5
+ import { toCssSize as C, getNmorphOptionHeight as fe, resolveDomElement as pe } from "../../../utils/common.js";
6
+ import { useI18n as me } from "vue-i18n";
7
+ import { useFormItemModel as he, useFormItemInput as ge } from "../nmorph-form/use-form-item-input.js";
8
+ import { useVirtualList as ye } from "../../../hooks/use-virtual-list.js";
9
+ import He from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
10
+ import be from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
11
+ import qe from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
+ import Ie from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
13
+ import xe from "../../../assets/icons/chevron-down.svg.js";
14
+ import Ne from "../../../assets/icons/loader.svg.js";
15
+ const je = /* @__PURE__ */ oe({
15
16
  __name: "NmorphSelect",
16
17
  props: {
17
18
  noElementPlaceholder: { type: String, required: !1, default: "" },
@@ -38,112 +39,113 @@ 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
- 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) => {
42
+ setup(P, { expose: T, emit: W }) {
43
+ T();
44
+ const { t: M } = me(), l = P, D = a(
45
+ () => l.noElementPlaceholder ? l.noElementPlaceholder : M("noElementPlaceholder")
46
+ ), A = W, { modelValue: p, updateModelValue: h } = he(
47
+ l,
48
+ (e) => A("update:model-value", e),
49
+ ""
50
+ ), t = d(p.value), r = d(l.open), v = a(() => l.disabled || l.loading), g = a(() => l.optionsWidth === "auto"), y = d(!0), { id: H, name: k, autocomplete: $, tabindex: F } = ge(l), b = (e) => {
46
51
  if (!v.value) {
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];
52
+ if (r.value = !1, typeof t.value == "string" && (!l.valueRequired && t.value === e ? t.value = "" : t.value = e, h(t.value)), Array.isArray(t.value)) {
53
+ const n = t.value.includes(e), ne = t.value.length === 1 && n;
54
+ if (l.valueRequired && ne) return;
55
+ n ? t.value = t.value.filter((ue) => ue !== e) : t.value = [...t.value, e];
51
56
  }
52
- m("update:model-value", l.value);
57
+ h(t.value);
53
58
  }
54
- }, p = d(!1), z = () => {
55
- p.value = !0;
56
- }, F = () => {
57
- p.value = !1;
59
+ }, m = d(!1), U = () => {
60
+ m.value = !0;
61
+ }, z = () => {
62
+ m.value = !1;
58
63
  }, j = a(
59
- () => ve({
60
- nmorph: [de[t.height]],
64
+ () => ce({
65
+ nmorph: [ve[l.height]],
61
66
  "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"}`
67
+ l.disabled && "disabled",
68
+ p.value ? "on" : "off",
69
+ l.loading && "loading",
70
+ r.value && !v.value && "open",
71
+ l.fill && "fill",
72
+ g.value && "options-auto-width",
73
+ y.value ? "selected-line-outset" : "selected-line-inset",
74
+ m.value && "focus"
70
75
  ]
71
76
  })
72
- ), b = (e) => typeof e == "number" ? `${e}px` : e, Y = a(() => ({
73
- ...t.width !== void 0 && { "--base-width": b(t.width) }
74
- })), G = () => {
77
+ ), G = a(() => ({
78
+ ...l.width !== void 0 && { "--base-width": C(l.width) }
79
+ })), J = () => {
75
80
  v.value || (r.value = !r.value);
76
81
  };
77
- f(
82
+ c(
78
83
  r,
79
84
  (e) => {
80
- e && (g.value = !1);
85
+ e && (y.value = !1);
81
86
  },
82
87
  { immediate: !0 }
83
88
  );
84
89
  const q = () => {
85
90
  r.value = !1;
86
91
  };
87
- f(
88
- () => t.loading,
92
+ c(
93
+ () => l.loading,
89
94
  (e) => {
90
95
  e && (r.value = !1);
91
96
  }
97
+ ), c(
98
+ p,
99
+ (e) => {
100
+ t.value = e;
101
+ },
102
+ { deep: !0 }
92
103
  );
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, {
98
- enabled: c,
104
+ const i = a(() => l.options.length > 0 ? l.options : l.optionsMap), I = d(null), x = d([]), N = a(() => l.options), f = a(() => l.virtual && N.value.length > 0), E = a(() => l.virtualItemHeight || fe(l.height)), V = a(() => l.virtualOverscan), _ = a(() => l.virtualDynamicHeight), s = ye(N, {
105
+ enabled: f,
99
106
  itemHeight: E,
100
107
  overscan: V,
101
108
  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));
109
+ }), K = a(() => s.virtualItems.value), Q = s.spacerStyle, X = s.contentStyle, Y = a(() => C(l.virtualMaxHeight)), O = () => {
110
+ i.value.length > 0 || !I.value || (x.value = Array.from(I.value.querySelectorAll(".nmorph-select-option")).map((e) => e.getAttribute("value")).filter((e) => !!e));
108
111
  }, o = a(
109
- () => 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, "-")}`;
111
- f(u, (e) => {
112
- r.value && c.value && s.scrollToIndex(e);
113
- }), f(
112
+ () => i.value.length > 0 ? i.value.map((e) => e.value) : x.value
113
+ ), Z = a(() => f.value ? Array.isArray(t.value) ? t.value : t.value ? [t.value] : [] : o.value), u = d(0), S = a(() => o.value[u.value] || ""), ee = a(() => `${H.value}-listbox`), te = (e) => `${H.value}-option-${e.replace(/\s+/g, "-")}`;
114
+ c(u, (e) => {
115
+ r.value && f.value && s.scrollToIndex(e);
116
+ }), c(
114
117
  o,
115
118
  (e) => {
116
119
  u.value >= e.length && (u.value = Math.max(e.length - 1, 0));
117
120
  },
118
121
  { immediate: !0 }
119
- ), f(r, async (e) => {
122
+ ), c(r, async (e) => {
120
123
  if (e) {
121
- if (await R(), O(), typeof l.value == "string") {
122
- const n = o.value.indexOf(l.value);
124
+ if (await R(), O(), typeof t.value == "string") {
125
+ const n = o.value.indexOf(t.value);
123
126
  n !== -1 && (u.value = n);
124
127
  }
125
- s.refresh(), c.value && s.scrollToIndex(u.value);
128
+ s.refresh(), f.value && s.scrollToIndex(u.value);
126
129
  }
127
- }), oe(async () => {
130
+ }), ie(async () => {
128
131
  await R(), O(), document.addEventListener("click", q);
129
- }), ie(() => {
132
+ }), se(() => {
130
133
  document.removeEventListener("click", q);
131
134
  });
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"));
135
+ const le = a(() => typeof t.value == "string" ? t.value === "" ? D.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 }]);
136
+ w("select-selected-value", t), w("select-change-selected-value", b), w("select-height", de(l, "height"));
134
137
  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: () => {
138
+ () => g.value ? `${B.value?.clientWidth || 0}px` : void 0
139
+ ), L = { t: M, props: l, computedNoElementPlaceholder: D, emit: A, modelValue: p, updateModelValue: h, initialValue: t, open: r, disabledInput: v, autoOptionsWidth: g, selectedLineOutset: y, id: H, name: k, autocomplete: $, tabindex: F, changeHandler: b, focus: m, focusHandler: U, blurHandler: z, modifiers: j, styles: G, clickHandler: J, closeHandler: q, optionsMap: i, optionsDOMRef: I, slotDomOptions: x, renderedOptions: N, virtualEnabled: f, virtualItemHeight: E, virtualOverscan: V, virtualDynamicHeight: _, virtualList: s, virtualOptions: K, virtualSpacerStyle: Q, virtualContentStyle: X, virtualMaxHeight: Y, refreshDomOptions: O, domOptions: o, nativeOptions: Z, currentIndex: u, currentFocusedEl: S, listboxId: ee, getOptionId: te, selectedValueTitle: le, tags: ae, nmorphSelectDOMRef: B, optionsMinWidth: re, spaceHandler: () => {
137
140
  v.value || (r.value = !r.value);
138
141
  }, arrowDownHandler: () => {
139
142
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value + 1) % o.value.length);
140
143
  }, arrowUpHandler: () => {
141
144
  v.value || o.value.length !== 0 && (r.value || (r.value = !0), u.value = (u.value - 1 + o.value.length) % o.value.length);
142
145
  }, enterHandler: () => {
143
- r.value && S.value && H(S.value);
146
+ r.value && S.value && b(S.value);
144
147
  }, setVirtualOptionRef: (e, n) => {
145
- const w = e instanceof Element ? e : e?.$el;
146
- s.measureElement(n, w);
148
+ s.measureElement(n, pe(e));
147
149
  }, escapeHandler: () => {
148
150
  r.value = !1;
149
151
  }, homeHandler: () => {
@@ -151,21 +153,21 @@ const ke = /* @__PURE__ */ ue({
151
153
  }, endHandler: () => {
152
154
  u.value = Math.max(o.value.length - 1, 0);
153
155
  }, get NmorphTagItem() {
154
- return ye;
156
+ return Ie;
155
157
  }, get NmorphIcon() {
156
- return ge;
158
+ return qe;
157
159
  }, get NmorphSelectOption() {
158
- return he;
160
+ return be;
159
161
  }, get NmorphDropdown() {
160
- return me;
162
+ return He;
161
163
  }, get NmorphIconLoaderDots() {
162
- return be;
164
+ return Ne;
163
165
  }, get NmorphIconChevronDown() {
164
- return He;
166
+ return xe;
165
167
  } };
166
168
  return Object.defineProperty(L, "__isScriptSetup", { enumerable: !1, value: !0 }), L;
167
169
  }
168
170
  });
169
171
  export {
170
- ke as default
172
+ je as default
171
173
  };
@@ -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(() => ({