@nmorph/nmorph-ui-kit 2.2.36 → 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.
- package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +8 -8
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
- package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +14 -13
- package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
- package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +15 -19
- package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +5 -5
- package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +15 -14
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
- package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
- package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
- package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +1 -1
- package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
- package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +20 -19
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
- package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +34 -33
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +22 -21
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +54 -62
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +5 -5
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +5 -5
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +20 -19
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +7 -7
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +2 -2
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +3 -6
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +6 -6
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +65 -73
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +18 -17
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +25 -24
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +23 -22
- package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +4 -2
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +17 -19
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +9 -9
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +43 -42
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +1 -1
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
- package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
- package/dist/hooks/use-common-styles.js +18 -278
- package/dist/hooks/use-virtual-list.js +38 -32
- package/dist/index.umd.js +21 -281
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
- package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
- package/dist/src/hooks/use-virtual-list.d.ts +6 -0
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/utils/common.d.ts +5 -0
- package/dist/src/utils/create-modifiers.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/utils/common.js +9 -2
- package/dist/utils/create-modifiers.js +6 -6
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import './NmorphDatePicker.css';
|
|
2
2
|
import { defineComponent as O, computed as a, ref as u } from "vue";
|
|
3
3
|
import { useModifiers as k } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { toCssSize as s } from "../../../utils/common.js";
|
|
4
5
|
import { NmorphComponentHeight as B } from "../../../types/index.js";
|
|
5
6
|
import P from "./inner-components/nmorph-clear-button/NmorphClearButton.vue.js";
|
|
6
7
|
import V from "./inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js";
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { useFormItemInput as
|
|
8
|
+
import { useI18n as j } from "vue-i18n";
|
|
9
|
+
import { useFormItemInput as z } from "../nmorph-form/use-form-item-input.js";
|
|
9
10
|
import { formatDate as f } from "../../data/nmorph-calendar/utils.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import L from "../../../assets/icons/calendar.svg.js";
|
|
12
|
+
import M from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
13
|
+
import R from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
|
|
14
|
+
const ee = /* @__PURE__ */ O({
|
|
14
15
|
__name: "NmorphDatePicker",
|
|
15
16
|
props: {
|
|
16
17
|
placeholder: { type: String, required: !1, default: "" },
|
|
@@ -35,23 +36,23 @@ const Z = /* @__PURE__ */ O({
|
|
|
35
36
|
tabindex: { type: Number, required: !1 }
|
|
36
37
|
},
|
|
37
38
|
emits: ["update:model-value"],
|
|
38
|
-
setup(m, { expose: c, emit:
|
|
39
|
+
setup(m, { expose: c, emit: v }) {
|
|
39
40
|
c();
|
|
40
|
-
const { t:
|
|
41
|
+
const { t: i } = j(), e = m, { id: y, name: h, autocomplete: g } = z(e), n = a(() => e.placeholder ? e.placeholder : i("pickADate")), t = u(e.modelValue), d = v, l = u(!1), q = () => {
|
|
41
42
|
l.value = !0;
|
|
42
43
|
}, S = () => {
|
|
43
44
|
l.value = !1;
|
|
44
45
|
}, N = a(
|
|
45
46
|
() => k({
|
|
46
47
|
nmorph: [B[e.height]],
|
|
47
|
-
"nmorph-date-picker": [
|
|
48
|
+
"nmorph-date-picker": [e.disabled && "disabled", e.type, l.value && "focus"]
|
|
48
49
|
})
|
|
49
|
-
),
|
|
50
|
-
...e.width !== void 0 && { "--width":
|
|
50
|
+
), D = a(() => ({
|
|
51
|
+
...e.width !== void 0 && { "--width": s(e.width) },
|
|
51
52
|
...e.calendarCellHeight !== void 0 && {
|
|
52
|
-
"--date-picker-calendar-cell-height":
|
|
53
|
+
"--date-picker-calendar-cell-height": s(e.calendarCellHeight)
|
|
53
54
|
}
|
|
54
|
-
})), o = u(!1),
|
|
55
|
+
})), o = u(!1), b = u(null), C = () => {
|
|
55
56
|
o.value = !1;
|
|
56
57
|
}, _ = () => {
|
|
57
58
|
o.value = !o.value;
|
|
@@ -74,16 +75,16 @@ const Z = /* @__PURE__ */ O({
|
|
|
74
75
|
t.value = r, d("update:model-value", t.value);
|
|
75
76
|
}, I = (r) => {
|
|
76
77
|
t.value = r, d("update:model-value", t.value);
|
|
77
|
-
}, w = a(() => Array.isArray(t.value) ? t.value.length > 0 : !!t.value),
|
|
78
|
-
return
|
|
78
|
+
}, w = a(() => Array.isArray(t.value) ? t.value.length > 0 : !!t.value), p = { t: i, props: e, id: y, name: h, autocomplete: g, placeholderText: n, selectedDate: t, emit: d, focus: l, focusHandler: q, blurHandler: S, modifiers: N, styles: D, open: o, nmorphInputDOMRef: b, closeHandler: C, toggleOpen: _, displayValue: A, clearHandler: H, updateSelectedDateHandler: I, showClearButton: w, get NmorphDropdown() {
|
|
79
|
+
return R;
|
|
79
80
|
}, get NmorphIcon() {
|
|
80
|
-
return
|
|
81
|
+
return M;
|
|
81
82
|
}, get NmorphIconCalendar() {
|
|
82
|
-
return
|
|
83
|
+
return L;
|
|
83
84
|
}, NmorphClearButton: P, NmorphDatePickerContent: V };
|
|
84
|
-
return Object.defineProperty(
|
|
85
|
+
return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
export {
|
|
88
|
-
|
|
89
|
+
ee as default
|
|
89
90
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './NmorphFileUpload.css';
|
|
2
2
|
import { defineComponent as M, computed as y, ref as F, watch as E, onBeforeUnmount as W } from "vue";
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { resolution as T, NmorphImageResolution as A, NmorphAudioResolution as
|
|
3
|
+
import { useModifiers as D } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { useI18n as K } from "vue-i18n";
|
|
5
|
+
import { resolution as T, NmorphImageResolution as A, NmorphAudioResolution as $, NmorphVideoResolution as z, NmorphArchiveResolution as G } from "./types.js";
|
|
6
6
|
import H from "../../../assets/icons/doc.svg.js";
|
|
7
7
|
import J from "../../data/nmorph-image-preview/NmorphImagePreview.vue.js";
|
|
8
8
|
import Q from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
@@ -24,7 +24,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["update:model-value", "on-unsupported-file-type-error"],
|
|
26
26
|
setup(R, { expose: U, emit: _ }) {
|
|
27
|
-
const { t: w } =
|
|
27
|
+
const { t: w } = K(), n = R, d = _, B = y(() => n.buttonText ? n.buttonText : w("selectFile")), g = Object.entries(T), v = {
|
|
28
28
|
"svg-xml": "svg",
|
|
29
29
|
"audio-ogg": "ogg",
|
|
30
30
|
"wideo-ogg": "ogg"
|
|
@@ -60,7 +60,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
60
60
|
}), V = (e) => {
|
|
61
61
|
const o = u(e);
|
|
62
62
|
let t = H;
|
|
63
|
-
return (e.type.toLowerCase().startsWith("image/") || o.some((r) => i(r, A))) && (t = te), (e.type.toLowerCase().startsWith("audio/") || o.some((r) => i(r,
|
|
63
|
+
return (e.type.toLowerCase().startsWith("image/") || o.some((r) => i(r, A))) && (t = te), (e.type.toLowerCase().startsWith("audio/") || o.some((r) => i(r, $))) && (t = Y), (e.type.toLowerCase().startsWith("video/") || o.some((r) => i(r, z))) && (t = Z), o.some((r) => i(r, G)) && (t = ee), t;
|
|
64
64
|
}, p = F(null), a = F([...n.modelValue]), l = /* @__PURE__ */ new Set(), m = () => {
|
|
65
65
|
const e = p.value;
|
|
66
66
|
e && (e.value = "");
|
|
@@ -106,8 +106,8 @@ const ye = /* @__PURE__ */ M({
|
|
|
106
106
|
Array.from(l).forEach((e) => c(e));
|
|
107
107
|
}), U({ inputDOMRef: p });
|
|
108
108
|
const q = y(
|
|
109
|
-
() =>
|
|
110
|
-
"nmorph-file-upload": [
|
|
109
|
+
() => D({
|
|
110
|
+
"nmorph-file-upload": [n.disabled && "disabled"]
|
|
111
111
|
})
|
|
112
112
|
), x = { t: w, props: n, emit: d, computedButtonText: B, knownResolutionEntries: g, extensionByResolution: v, getPlainType: C, getFileExtension: f, getKnownResolutionByMime: I, getFileTypeCandidates: u, isKnownFileType: i, isImageFile: P, isFileAllowed: L, inputAccept: S, typeFileIconMap: V, inputDOMRef: p, files: a, createdPreviewUrls: l, resetInputValue: m, revokePreviewUrl: c, revokeRemovedPreviewUrls: N, filesChanged: h, openFileSelector: O, handleFileUpload: j, removeFile: k, modifiers: q, get NmorphButton() {
|
|
113
113
|
return X;
|
|
@@ -28,8 +28,8 @@ const B = /* @__PURE__ */ p({
|
|
|
28
28
|
const m = o(
|
|
29
29
|
() => h({
|
|
30
30
|
"nmorph-form-item": [
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
e.label && "labeled",
|
|
32
|
+
i.value && (t.value?.valid ? "valid" : "invalid")
|
|
33
33
|
]
|
|
34
34
|
})
|
|
35
35
|
), l = { props: e, formData: r, validationData: t, ableToShowValidation: a, showStatusIcon: u, ableToAddValidationModifiers: i, modifiers: m, get NmorphValidationIcon() {
|
|
@@ -17,7 +17,7 @@ const h = /* @__PURE__ */ p({
|
|
|
17
17
|
}), a = s(
|
|
18
18
|
() => l({
|
|
19
19
|
nmorph: [u[e.height]],
|
|
20
|
-
"nmorph-error-box": [
|
|
20
|
+
"nmorph-error-box": [e.staticHeight && "static-height", t.value.length === 0 && "empty"]
|
|
21
21
|
})
|
|
22
22
|
), o = { props: e, currentError: t, modifiers: a };
|
|
23
23
|
return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
|
|
@@ -7,7 +7,7 @@ import T from "../../../assets/icons/plus-thin.svg.js";
|
|
|
7
7
|
import D from "../../../assets/icons/minus-thin.svg.js";
|
|
8
8
|
import k from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
9
9
|
import z from "../../basic/nmorph-button/NmorphButton.vue.js";
|
|
10
|
-
const
|
|
10
|
+
const E = /* @__PURE__ */ S({
|
|
11
11
|
__name: "NmorphNumberInput",
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: { type: Number, required: !1, default: 0 },
|
|
@@ -27,10 +27,7 @@ const K = /* @__PURE__ */ S({
|
|
|
27
27
|
const e = m, { id: d, name: c, autocomplete: f, tabindex: h } = R(e), g = n(
|
|
28
28
|
() => M({
|
|
29
29
|
nmorph: [H[e.height]],
|
|
30
|
-
"nmorph-number-input": [
|
|
31
|
-
`${e.disabled && "disabled"}`,
|
|
32
|
-
`${e.actionBtnPositionRight && "action-btn-position-right"}`
|
|
33
|
-
]
|
|
30
|
+
"nmorph-number-input": [e.disabled && "disabled", e.actionBtnPositionRight && "action-btn-position-right"]
|
|
34
31
|
})
|
|
35
32
|
), t = l(e.modelValue), b = () => {
|
|
36
33
|
t.value += e.step;
|
|
@@ -75,5 +72,5 @@ const K = /* @__PURE__ */ S({
|
|
|
75
72
|
}
|
|
76
73
|
});
|
|
77
74
|
export {
|
|
78
|
-
|
|
75
|
+
E as default
|
|
79
76
|
};
|
|
@@ -42,17 +42,17 @@ const de = /* @__PURE__ */ te({
|
|
|
42
42
|
);
|
|
43
43
|
const N = c(
|
|
44
44
|
() => ae({
|
|
45
|
-
nmorph: [le[l.height],
|
|
46
|
-
"nmorph-otp-input": [
|
|
45
|
+
nmorph: [le[l.height], d.value && "focused"],
|
|
46
|
+
"nmorph-otp-input": [l.disabled && "disabled"]
|
|
47
47
|
})
|
|
48
48
|
), T = c(
|
|
49
49
|
() => Array.from({ length: u.value }, (e, t) => t === 0 ? V.value : `${V.value}-${t + 1}`)
|
|
50
|
-
),
|
|
50
|
+
), E = c(() => l.mode === "numeric" ? "numeric" : "text"), B = c(() => q.value || "one-time-code"), C = c(() => {
|
|
51
51
|
if (l.mode === "numeric") return "[0-9]*";
|
|
52
52
|
if (l.mode === "alphanumeric") return "[A-Za-z0-9]*";
|
|
53
53
|
}), h = (e) => {
|
|
54
54
|
n.value[e] = i.value[e]?.inputDOMRef ?? null;
|
|
55
|
-
},
|
|
55
|
+
}, P = (e, t) => {
|
|
56
56
|
i.value[t] = e, O(() => {
|
|
57
57
|
h(t);
|
|
58
58
|
});
|
|
@@ -90,7 +90,7 @@ const de = /* @__PURE__ */ te({
|
|
|
90
90
|
y < u.value ? r(y) : r(u.value - 1);
|
|
91
91
|
}, S = (e, t) => {
|
|
92
92
|
H(e, t);
|
|
93
|
-
}, M = /* @__PURE__ */ new Map(),
|
|
93
|
+
}, M = /* @__PURE__ */ new Map(), $ = (e) => {
|
|
94
94
|
const t = M.get(e);
|
|
95
95
|
if (t) return t;
|
|
96
96
|
const a = c({
|
|
@@ -138,7 +138,7 @@ const de = /* @__PURE__ */ te({
|
|
|
138
138
|
},
|
|
139
139
|
{ immediate: !0 }
|
|
140
140
|
);
|
|
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:
|
|
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: E, resolvedAutocomplete: B, inputPattern: C, syncInputDOMRef: h, setInputRef: P, selectField: _, focusField: r, blurFields: F, updateCharAt: m, insertValue: H, inputHandler: S, fieldModels: M, getFieldModel: $, 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
142
|
return Object.defineProperty(z, "__isScriptSetup", { enumerable: !1, value: !0 }), z;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
@@ -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": [
|
|
28
|
+
"nmorph-radio": [e.disabled && "disabled", d.value && "checked", e.styleType]
|
|
29
29
|
})
|
|
30
30
|
), u = m(null);
|
|
31
31
|
p({ inputDOMRef: u });
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import './NmorphSelect.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { NmorphComponentHeight as
|
|
4
|
-
import { useModifiers as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import me from "
|
|
9
|
-
import he from "
|
|
10
|
-
import ge from "
|
|
11
|
-
import ye from "../../
|
|
12
|
-
import He from "
|
|
13
|
-
import be from "../../../assets/icons/
|
|
14
|
-
|
|
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(
|
|
42
|
+
setup(R, { expose: C, emit: P }) {
|
|
42
43
|
C();
|
|
43
|
-
const { t:
|
|
44
|
-
() => t.noElementPlaceholder ? t.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:
|
|
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),
|
|
49
|
-
if (t.valueRequired &&
|
|
50
|
-
n ? l.value = l.value.filter((
|
|
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),
|
|
55
|
+
}, p = d(!1), $ = () => {
|
|
55
56
|
p.value = !0;
|
|
56
|
-
},
|
|
57
|
+
}, U = () => {
|
|
57
58
|
p.value = !1;
|
|
58
|
-
},
|
|
59
|
-
() =>
|
|
60
|
-
nmorph: [
|
|
59
|
+
}, z = a(
|
|
60
|
+
() => de({
|
|
61
|
+
nmorph: [se[t.height]],
|
|
61
62
|
"nmorph-select": [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
),
|
|
73
|
-
...t.width !== void 0 && { "--base-width":
|
|
74
|
-
})),
|
|
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
|
|
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),
|
|
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:
|
|
100
|
-
overscan:
|
|
101
|
-
dynamic:
|
|
102
|
-
}),
|
|
103
|
-
|
|
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
|
-
),
|
|
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
|
|
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
|
-
}),
|
|
128
|
-
await
|
|
129
|
-
}),
|
|
130
|
-
document.removeEventListener("click",
|
|
120
|
+
}), ue(async () => {
|
|
121
|
+
await B(), N(), document.addEventListener("click", b);
|
|
122
|
+
}), oe(() => {
|
|
123
|
+
document.removeEventListener("click", b);
|
|
131
124
|
});
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
() => h.value ? `${
|
|
136
|
-
),
|
|
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 &&
|
|
136
|
+
r.value && O.value && H(O.value);
|
|
144
137
|
}, setVirtualOptionRef: (e, n) => {
|
|
145
|
-
|
|
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
|
|
146
|
+
return He;
|
|
155
147
|
}, get NmorphIcon() {
|
|
156
|
-
return
|
|
148
|
+
return ye;
|
|
157
149
|
}, get NmorphSelectOption() {
|
|
158
|
-
return
|
|
150
|
+
return ge;
|
|
159
151
|
}, get NmorphDropdown() {
|
|
160
|
-
return
|
|
152
|
+
return he;
|
|
161
153
|
}, get NmorphIconLoaderDots() {
|
|
162
|
-
return
|
|
154
|
+
return qe;
|
|
163
155
|
}, get NmorphIconChevronDown() {
|
|
164
|
-
return
|
|
156
|
+
return be;
|
|
165
157
|
} };
|
|
166
|
-
return Object.defineProperty(
|
|
158
|
+
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
167
159
|
}
|
|
168
160
|
});
|
|
169
161
|
export {
|
|
170
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
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
|
|
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(
|
|
23
|
+
setup(n, { expose: s, emit: m }) {
|
|
23
24
|
s();
|
|
24
|
-
const e =
|
|
25
|
+
const e = n, r = m, t = S(e.modelValue);
|
|
25
26
|
g(
|
|
26
27
|
() => e.modelValue,
|
|
27
|
-
(
|
|
28
|
-
|
|
28
|
+
(i) => {
|
|
29
|
+
t.value = i;
|
|
29
30
|
}
|
|
30
31
|
);
|
|
31
|
-
const f =
|
|
32
|
+
const f = d(
|
|
32
33
|
() => y({
|
|
33
|
-
"nmorph-select-button": [
|
|
34
|
+
"nmorph-select-button": [e.disabled && "disabled", e.fill && "fill", e.height]
|
|
34
35
|
})
|
|
35
|
-
),
|
|
36
|
-
...e.trackPadding !== void 0 && { "--track-padding":
|
|
37
|
-
...e.itemSize !== void 0 && { "--item-size":
|
|
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
|
-
})),
|
|
40
|
-
e.disabled || (
|
|
40
|
+
})), l = (i) => {
|
|
41
|
+
e.disabled || (t.value = i, r("update:model-value", i));
|
|
41
42
|
};
|
|
42
|
-
|
|
43
|
-
const
|
|
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(
|
|
47
|
+
return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
export {
|
|
50
|
-
|
|
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": [
|
|
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
|
|
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": [
|
|
31
|
+
"nmorph-slider": [e.disabled && "disabled"]
|
|
31
32
|
})
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}),
|
|
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
|
|
42
|
-
const t =
|
|
43
|
-
let
|
|
44
|
-
const
|
|
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:
|
|
47
|
+
thumb: P,
|
|
47
48
|
tooltip: U
|
|
48
49
|
};
|
|
49
|
-
}),
|
|
50
|
-
|
|
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" && (
|
|
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",
|
|
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
|
-
},
|
|
67
|
+
}, s = (t) => {
|
|
67
68
|
t.preventDefault(), v(t.clientX);
|
|
68
69
|
}, i = () => {
|
|
69
|
-
document.removeEventListener("pointermove",
|
|
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",
|
|
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),
|
|
80
|
-
"--nmorph-slider-thumb-width":
|
|
81
|
-
...e.sliderHeight !== void 0 && { "--slider-height":
|
|
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":
|
|
84
|
+
"--value-fixed-container-height": I(e.valueFixedContainerHeight)
|
|
84
85
|
}
|
|
85
|
-
})),
|
|
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(
|
|
89
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
89
90
|
}
|
|
90
91
|
});
|
|
91
92
|
export {
|