@m3ui-vue/m3ui-vue 1.6.1 → 1.7.0
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/API.md +649 -28
- package/dist/{MButton-OQ4wIERQ.js → MButton-CN3wYwIG.js} +2 -2
- package/dist/{MButton-OQ4wIERQ.js.map → MButton-CN3wYwIG.js.map} +1 -1
- package/dist/MColorPickerModal-BKM1CHxr.js +577 -0
- package/dist/MColorPickerModal-BKM1CHxr.js.map +1 -0
- package/dist/{MDialog-DYMnaBlt.js → MDialog-1LAk9WAO.js} +2 -2
- package/dist/{MDialog-DYMnaBlt.js.map → MDialog-1LAk9WAO.js.map} +1 -1
- package/dist/{MListItem-D2cNUyzP.js → MListItem-BU5KDRCB.js} +376 -270
- package/dist/MListItem-BU5KDRCB.js.map +1 -0
- package/dist/{MLoadingIndicator-DWUj0BAB.js → MLoadingIndicator-RykOo5tf.js} +2 -2
- package/dist/{MLoadingIndicator-DWUj0BAB.js.map → MLoadingIndicator-RykOo5tf.js.map} +1 -1
- package/dist/{MSeekBar-C4cn9RIF.js → MSeekBar-B_Y3MpVz.js} +2 -2
- package/dist/{MSeekBar-C4cn9RIF.js.map → MSeekBar-B_Y3MpVz.js.map} +1 -1
- package/dist/MSegmentedButton-CiOOY1-N.js +105 -0
- package/dist/MSegmentedButton-CiOOY1-N.js.map +1 -0
- package/dist/MSlider-BCeVIxcq.js +739 -0
- package/dist/MSlider-BCeVIxcq.js.map +1 -0
- package/dist/{MSpinner-DZkXZJpc.js → MSpinner-Cs03qoqE.js} +2 -2
- package/dist/{MSpinner-DZkXZJpc.js.map → MSpinner-Cs03qoqE.js.map} +1 -1
- package/dist/{MTextField-CNH-byir.js → MTextField-NaFbMkjv.js} +162 -115
- package/dist/MTextField-NaFbMkjv.js.map +1 -0
- package/dist/MTooltip-CK39Zon4.js +183 -0
- package/dist/MTooltip-CK39Zon4.js.map +1 -0
- package/dist/_useFieldValidation-Bz34IAQY.js +191 -0
- package/dist/_useFieldValidation-Bz34IAQY.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/code-editor.js +184 -103
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAddressField.vue.d.ts +18 -3
- package/dist/components/MAppBarWithSearch.vue.d.ts +1 -1
- package/dist/components/MAudioRecorder.vue.d.ts +2 -2
- package/dist/components/MAutocomplete.vue.d.ts +22 -3
- package/dist/components/MCheckbox.vue.d.ts +23 -1
- package/dist/components/MCodeEditor.vue.d.ts +23 -1
- package/dist/components/MColorPicker.vue.d.ts +24 -3
- package/dist/components/MConfirmDialog.vue.d.ts +2 -2
- package/dist/components/MCountrySelect.vue.d.ts +13 -2
- package/dist/components/MCreditCardInput.vue.d.ts +33 -0
- package/dist/components/MCronField.vue.d.ts +23 -1
- package/dist/components/MDataTable.vue.d.ts +1 -1
- package/dist/components/MDatePicker.vue.d.ts +24 -3
- package/dist/components/MDateRangePicker.vue.d.ts +24 -3
- package/dist/components/MFileUpload.vue.d.ts +23 -2
- package/dist/components/MForm.vue.d.ts +61 -0
- package/dist/components/MJsonEditor.vue.d.ts +23 -1
- package/dist/components/MMapRoute.vue.d.ts +168 -0
- package/dist/components/MMaskField.vue.d.ts +20 -2
- package/dist/components/MMentionField.vue.d.ts +13 -2
- package/dist/components/MMultiAutocomplete.vue.d.ts +22 -3
- package/dist/components/MMultiSelect.vue.d.ts +22 -3
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MNotificationCenter.vue.d.ts +2 -2
- package/dist/components/MNumberField.vue.d.ts +20 -2
- package/dist/components/MPhoneInput.vue.d.ts +19 -4
- package/dist/components/MPinInput.vue.d.ts +24 -3
- package/dist/components/MPosKeypad.vue.d.ts +2 -2
- package/dist/components/MRadioGroup.vue.d.ts +23 -1
- package/dist/components/MRating.vue.d.ts +23 -1
- package/dist/components/MRichTextEditor.vue.d.ts +23 -1
- package/dist/components/MSearchBar.vue.d.ts +1 -1
- package/dist/components/MSegmentedButton.vue.d.ts +23 -2
- package/dist/components/MSelect.vue.d.ts +22 -3
- package/dist/components/MSignaturePad.vue.d.ts +19 -0
- package/dist/components/MSlider.vue.d.ts +23 -1
- package/dist/components/MSwitch.vue.d.ts +23 -1
- package/dist/components/MTable.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +20 -2
- package/dist/components/MText.vue.d.ts +1 -1
- package/dist/components/MTextField.vue.d.ts +26 -3
- package/dist/components/MTimePicker.vue.d.ts +24 -3
- package/dist/components/MTimezoneSelect.vue.d.ts +13 -2
- package/dist/components/MTour.vue.d.ts +2 -2
- package/dist/components/MTrackingTimeline.vue.d.ts +75 -0
- package/dist/components/MWindow.vue.d.ts +2 -2
- package/dist/composables/_routeGeometry.d.ts +26 -0
- package/dist/composables/_useFieldValidation.d.ts +91 -0
- package/dist/composables/mapRouting.d.ts +35 -0
- package/dist/composables/useLocale.d.ts +23 -0
- package/dist/composables/validation.d.ts +82 -0
- package/dist/draw.js +27 -26
- package/dist/draw.js.map +1 -1
- package/dist/flow.js +1 -1
- package/dist/gantt.js +2 -2
- package/dist/index.d.ts +5 -0
- package/dist/locales/index.js +154 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7350 -6183
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +4 -0
- package/dist/map.js +1319 -867
- package/dist/map.js.map +1 -1
- package/dist/media.js +4 -4
- package/dist/pdf.js +4 -4
- package/dist/rich-text-editor.js +189 -146
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useLocale-DaVSTdm0.js → useLocale-Dh1xZZ8i.js} +22 -1
- package/dist/useLocale-Dh1xZZ8i.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/MForm.test.ts +325 -0
- package/src/__tests__/MMapRoute.test.ts +384 -0
- package/src/__tests__/MPhoneInput.test.ts +5 -2
- package/src/__tests__/MRichTextEditor.test.ts +2 -1
- package/src/__tests__/MTrackingTimeline.test.ts +66 -0
- package/src/__tests__/_fakeMaplibre.ts +4 -1
- package/src/__tests__/_osrmRoutes.ts +10 -0
- package/src/__tests__/attrsFallthrough.test.ts +11 -0
- package/src/__tests__/fieldsValidation.test.ts +229 -0
- package/src/__tests__/ssr.test.ts +1 -0
- package/src/__tests__/validation.test.ts +77 -0
- package/src/components/MAddressField.vue +45 -8
- package/src/components/MAudioRecorder.vue +9 -9
- package/src/components/MAutocomplete.vue +69 -23
- package/src/components/MCheckbox.vue +80 -17
- package/src/components/MCodeEditor.vue +59 -2
- package/src/components/MColorPicker.vue +65 -16
- package/src/components/MCountrySelect.vue +17 -3
- package/src/components/MCreditCardInput.vue +76 -7
- package/src/components/MCronField.vue +60 -10
- package/src/components/MDatePicker.vue +65 -16
- package/src/components/MDateRangePicker.vue +66 -16
- package/src/components/MFileUpload.vue +71 -8
- package/src/components/MForm.vue +208 -0
- package/src/components/MJsonEditor.vue +57 -3
- package/src/components/MMapBaseLayers.vue +29 -28
- package/src/components/MMapMeasure.vue +1 -1
- package/src/components/MMapRoute.vue +470 -0
- package/src/components/MMaskField.vue +55 -13
- package/src/components/MMentionField.vue +17 -2
- package/src/components/MMultiAutocomplete.vue +70 -23
- package/src/components/MMultiSelect.vue +70 -23
- package/src/components/MNumberField.vue +58 -16
- package/src/components/MPhoneInput.vue +60 -18
- package/src/components/MPinInput.vue +58 -10
- package/src/components/MRadioGroup.vue +65 -4
- package/src/components/MRating.vue +62 -6
- package/src/components/MRichTextEditor.vue +64 -4
- package/src/components/MSegmentedButton.vue +59 -2
- package/src/components/MSelect.vue +72 -26
- package/src/components/MSignaturePad.vue +71 -6
- package/src/components/MSlider.vue +61 -10
- package/src/components/MSwitch.vue +63 -8
- package/src/components/MTagInput.vue +67 -25
- package/src/components/MTextField.vue +68 -14
- package/src/components/MTimePicker.vue +65 -16
- package/src/components/MTimezoneSelect.vue +17 -3
- package/src/components/MTrackingTimeline.vue +257 -0
- package/src/composables/_routeGeometry.ts +140 -0
- package/src/composables/_useFieldValidation.ts +287 -0
- package/src/composables/mapRouting.ts +55 -0
- package/src/composables/useLocale.ts +46 -0
- package/src/composables/validation.ts +178 -0
- package/src/index.ts +5 -0
- package/src/locales/de.ts +21 -0
- package/src/locales/es.ts +28 -7
- package/src/locales/fr.ts +21 -0
- package/src/locales/ja.ts +21 -0
- package/src/locales/ko.ts +21 -0
- package/src/locales/pt.ts +21 -0
- package/src/locales/zh.ts +21 -0
- package/src/map.ts +4 -0
- package/dist/MListItem-D2cNUyzP.js.map +0 -1
- package/dist/MSegmentedButton-BEB4gXLA.js +0 -64
- package/dist/MSegmentedButton-BEB4gXLA.js.map +0 -1
- package/dist/MSlider-BIkA6DiE.js +0 -690
- package/dist/MSlider-BIkA6DiE.js.map +0 -1
- package/dist/MTextField-CNH-byir.js.map +0 -1
- package/dist/MTooltip-Dd5g2zhh.js +0 -754
- package/dist/MTooltip-Dd5g2zhh.js.map +0 -1
- package/dist/useLocale-DaVSTdm0.js.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./MIcon-DpajuUTJ.js";
|
|
2
|
-
import { i as t } from "./useLocale-
|
|
3
|
-
import {
|
|
2
|
+
import { i as t } from "./useLocale-Dh1xZZ8i.js";
|
|
3
|
+
import { n } from "./_useFieldValidation-Bz34IAQY.js";
|
|
4
|
+
import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, getCurrentInstance as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, onMounted as m, openBlock as h, ref as g, renderSlot as _, toDisplayString as v, toValue as y, unref as b, useId as x, useSlots as S, watch as C, withDirectives as w } from "vue";
|
|
4
5
|
// src/composables/useFieldBg.ts
|
|
5
|
-
var
|
|
6
|
+
var T = [
|
|
6
7
|
"bg-surface-container-highest",
|
|
7
8
|
"bg-surface-container-high",
|
|
8
9
|
"bg-surface-container-low",
|
|
@@ -29,11 +30,11 @@ var w = [
|
|
|
29
30
|
"bg-tertiary",
|
|
30
31
|
"bg-error"
|
|
31
32
|
];
|
|
32
|
-
function
|
|
33
|
-
for (let t of
|
|
33
|
+
function E(e) {
|
|
34
|
+
for (let t of T) if (e.classList.contains(t)) return `var(--color-${t.slice(3)})`;
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function D(e) {
|
|
37
38
|
if (!e || e === "transparent") return !0;
|
|
38
39
|
let t = e.match(/^rgba?\(([^)]+)\)$/);
|
|
39
40
|
if (t) {
|
|
@@ -42,15 +43,15 @@ function E(e) {
|
|
|
42
43
|
}
|
|
43
44
|
return !1;
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
let
|
|
47
|
-
function i(
|
|
48
|
-
|
|
46
|
+
function O(e, t) {
|
|
47
|
+
let n = g("var(--color-surface)");
|
|
48
|
+
function i(r) {
|
|
49
|
+
n.value = r, e.value?.style.setProperty("--field-bg", t() ?? r);
|
|
49
50
|
}
|
|
50
51
|
function a() {
|
|
51
52
|
let t = e.value?.parentElement ?? null;
|
|
52
53
|
for (; t;) {
|
|
53
|
-
let e =
|
|
54
|
+
let e = E(t);
|
|
54
55
|
if (e) {
|
|
55
56
|
i(e);
|
|
56
57
|
return;
|
|
@@ -60,7 +61,7 @@ function D(e, t) {
|
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
63
|
let n = getComputedStyle(t).backgroundColor;
|
|
63
|
-
if (!
|
|
64
|
+
if (!D(n)) {
|
|
64
65
|
i(n);
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
@@ -69,7 +70,7 @@ function D(e, t) {
|
|
|
69
70
|
i("var(--color-surface)");
|
|
70
71
|
}
|
|
71
72
|
let o = null;
|
|
72
|
-
return
|
|
73
|
+
return m(() => {
|
|
73
74
|
a(), o = new MutationObserver(() => a()), o.observe(document.documentElement, {
|
|
74
75
|
attributes: !0,
|
|
75
76
|
attributeFilter: [
|
|
@@ -78,14 +79,14 @@ function D(e, t) {
|
|
|
78
79
|
"data-theme"
|
|
79
80
|
]
|
|
80
81
|
});
|
|
81
|
-
}),
|
|
82
|
+
}), p(() => o?.disconnect()), { resolvedFieldBg: r(() => t() ?? n.value) };
|
|
82
83
|
}
|
|
83
84
|
// src/composables/useAutoGrow.ts
|
|
84
|
-
function
|
|
85
|
+
function k(e, t = {}) {
|
|
85
86
|
let n = null, r = null, i = 0;
|
|
86
87
|
function a() {
|
|
87
88
|
if (!n) return;
|
|
88
|
-
let e = getComputedStyle(n), r = (e) => parseFloat(e) || 0, i = r(e.lineHeight) || r(e.fontSize) * 1.5 || 24, a = r(e.paddingTop) + r(e.paddingBottom), o = e.boxSizing === "border-box" ? r(e.borderTopWidth) + r(e.borderBottomWidth) : 0, s = (e.boxSizing === "border-box" ? a : 0) + o, c = (
|
|
89
|
+
let e = getComputedStyle(n), r = (e) => parseFloat(e) || 0, i = r(e.lineHeight) || r(e.fontSize) * 1.5 || 24, a = r(e.paddingTop) + r(e.paddingBottom), o = e.boxSizing === "border-box" ? r(e.borderTopWidth) + r(e.borderBottomWidth) : 0, s = (e.boxSizing === "border-box" ? a : 0) + o, c = (y(t.minRows) ?? 1) * i + s, l = y(t.maxRows), u = l ? l * i + s : Infinity;
|
|
89
90
|
n.style.height = "auto";
|
|
90
91
|
let d = n.scrollHeight + o + (e.boxSizing === "border-box" ? 0 : -a), f = Math.min(u, Math.max(c, d));
|
|
91
92
|
n.style.height = `${f}px`, n.style.overflowY = d > u ? "auto" : "hidden";
|
|
@@ -96,13 +97,13 @@ function O(e, t = {}) {
|
|
|
96
97
|
t !== i && (i = t, a());
|
|
97
98
|
}), r.observe(n)), a());
|
|
98
99
|
}
|
|
99
|
-
return
|
|
100
|
+
return C(() => y(e), o, {
|
|
100
101
|
immediate: !0,
|
|
101
102
|
flush: "post"
|
|
102
|
-
}),
|
|
103
|
+
}), C([() => y(t.minRows), () => y(t.maxRows)], () => a(), { flush: "post" }), t.value && C(t.value, () => a(), { flush: "post" }), u() && p(() => o(null)), { resize: a };
|
|
103
104
|
}
|
|
104
105
|
// src/composables/useDebounce.ts
|
|
105
|
-
function
|
|
106
|
+
function A(e, t) {
|
|
106
107
|
let n = null;
|
|
107
108
|
function r(...r) {
|
|
108
109
|
n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -112,20 +113,20 @@ function k(e, t) {
|
|
|
112
113
|
function i() {
|
|
113
114
|
n &&= (clearTimeout(n), null);
|
|
114
115
|
}
|
|
115
|
-
return
|
|
116
|
+
return p(i), {
|
|
116
117
|
debounced: r,
|
|
117
118
|
cancel: i
|
|
118
119
|
};
|
|
119
120
|
}
|
|
120
121
|
// src/composables/_fieldLayout.ts
|
|
121
|
-
var
|
|
122
|
+
var j = {
|
|
122
123
|
"right-4": "pr-4",
|
|
123
124
|
"right-10": "pr-10",
|
|
124
125
|
"right-12": "pr-12",
|
|
125
126
|
"right-16": "pr-16",
|
|
126
127
|
"right-24": "pr-24"
|
|
127
|
-
},
|
|
128
|
-
function
|
|
128
|
+
}, M = "block min-w-0 flex-1 truncate";
|
|
129
|
+
function N(e) {
|
|
129
130
|
let t = e.variant === "outlined", n = [
|
|
130
131
|
"pointer-events-none absolute truncate transition-all duration-200",
|
|
131
132
|
e.leading ? t ? "left-11" : "left-12" : t ? "left-3" : "left-4",
|
|
@@ -147,60 +148,64 @@ function M(e) {
|
|
|
147
148
|
e.color
|
|
148
149
|
].join(" ");
|
|
149
150
|
}
|
|
150
|
-
var
|
|
151
|
-
function
|
|
151
|
+
var P = "pointer-events-none absolute -top-2.5 left-3 max-w-[calc(100%-1.5rem)] truncate bg-(--field-bg) px-1 text-label-small";
|
|
152
|
+
function F(e) {
|
|
152
153
|
return e.tagName === "INPUT" || e.tagName === "TEXTAREA" ? e.value : (e.textContent ?? "").trim();
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
-
let t = e.scrollWidth > e.clientWidth ?
|
|
155
|
+
function I(e) {
|
|
156
|
+
let t = e.scrollWidth > e.clientWidth ? F(e) : "";
|
|
156
157
|
t ? e.title = t : e.removeAttribute("title");
|
|
157
158
|
}
|
|
158
|
-
var
|
|
159
|
+
var L = /* @__PURE__ */ new WeakMap(), R = {
|
|
159
160
|
mounted(e) {
|
|
160
|
-
let t = () =>
|
|
161
|
-
|
|
161
|
+
let t = () => I(e);
|
|
162
|
+
L.set(e, t), e.addEventListener("pointerenter", t);
|
|
162
163
|
},
|
|
163
164
|
updated(e) {
|
|
164
|
-
e.hasAttribute("title") &&
|
|
165
|
+
e.hasAttribute("title") && I(e);
|
|
165
166
|
},
|
|
166
167
|
beforeUnmount(e) {
|
|
167
|
-
let t =
|
|
168
|
-
t && e.removeEventListener("pointerenter", t),
|
|
168
|
+
let t = L.get(e);
|
|
169
|
+
t && e.removeEventListener("pointerenter", t), L.delete(e);
|
|
169
170
|
}
|
|
170
|
-
},
|
|
171
|
+
}, z = { class: "flex flex-col gap-1" }, B = [
|
|
171
172
|
"id",
|
|
172
173
|
"value",
|
|
173
174
|
"rows",
|
|
175
|
+
"name",
|
|
174
176
|
"disabled",
|
|
175
|
-
"required"
|
|
176
|
-
|
|
177
|
+
"required",
|
|
178
|
+
"aria-invalid",
|
|
179
|
+
"aria-describedby"
|
|
180
|
+
], V = [
|
|
177
181
|
"id",
|
|
178
182
|
"type",
|
|
179
183
|
"value",
|
|
184
|
+
"name",
|
|
180
185
|
"disabled",
|
|
181
186
|
"required",
|
|
187
|
+
"aria-invalid",
|
|
188
|
+
"aria-describedby",
|
|
182
189
|
"autocomplete"
|
|
183
|
-
],
|
|
190
|
+
], ee = ["for"], te = {
|
|
184
191
|
key: 0,
|
|
185
192
|
class: "text-error"
|
|
186
|
-
},
|
|
193
|
+
}, ne = {
|
|
187
194
|
key: 3,
|
|
188
195
|
class: "absolute right-2 top-1/2 -translate-y-1/2"
|
|
189
|
-
},
|
|
190
|
-
key: 0,
|
|
191
|
-
class: "px-4 text-body-small text-error"
|
|
192
|
-
}, K = {
|
|
193
|
-
key: 1,
|
|
194
|
-
class: "px-4 text-body-small text-on-surface-variant"
|
|
195
|
-
}, q = /* @__PURE__ */ c({
|
|
196
|
+
}, re = ["aria-label"], H = ["id"], U = ["id"], W = /* @__PURE__ */ l({
|
|
196
197
|
__name: "MTextField",
|
|
197
198
|
props: {
|
|
198
199
|
modelValue: {},
|
|
199
200
|
label: {},
|
|
200
201
|
type: { default: "text" },
|
|
201
202
|
variant: { default: "filled" },
|
|
202
|
-
error: { type: Boolean },
|
|
203
|
+
error: { type: [Boolean, String] },
|
|
203
204
|
errorLabel: {},
|
|
205
|
+
rules: {},
|
|
206
|
+
validateOn: {},
|
|
207
|
+
validateDebounce: {},
|
|
208
|
+
name: {},
|
|
204
209
|
hint: {},
|
|
205
210
|
disabled: { type: Boolean },
|
|
206
211
|
required: { type: Boolean },
|
|
@@ -217,110 +222,152 @@ var I = /* @__PURE__ */ new WeakMap(), L = {
|
|
|
217
222
|
fieldBg: {},
|
|
218
223
|
debounce: { default: 0 }
|
|
219
224
|
},
|
|
220
|
-
emits: [
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
emits: [
|
|
226
|
+
"update:modelValue",
|
|
227
|
+
"debounced",
|
|
228
|
+
"blur",
|
|
229
|
+
"focus"
|
|
230
|
+
],
|
|
231
|
+
setup(l, { expose: u, emit: p }) {
|
|
232
|
+
let m = t(), y = l, C = p, T = x(), E = S(), D = g(null), { resolvedFieldBg: M } = O(D, () => y.fieldBg), { debounced: P, cancel: F } = A((e) => C("debounced", e), y.debounce), I = g(null), L = g(null), W = r(() => I.value ?? L.value), G = n({
|
|
233
|
+
value: () => y.modelValue,
|
|
234
|
+
rules: () => y.rules,
|
|
235
|
+
required: () => y.required,
|
|
236
|
+
error: () => y.error,
|
|
237
|
+
errorLabel: () => y.errorLabel,
|
|
238
|
+
name: () => y.name,
|
|
239
|
+
validateOn: () => y.validateOn,
|
|
240
|
+
validateDebounce: () => y.validateDebounce,
|
|
241
|
+
disabled: () => y.disabled,
|
|
242
|
+
focus: () => W.value?.focus(),
|
|
243
|
+
el: () => W.value,
|
|
244
|
+
setValue: (e) => C("update:modelValue", e)
|
|
245
|
+
}), { hasError: K, message: q, messageId: J } = G, Y = G.disabled;
|
|
246
|
+
function X(e) {
|
|
247
|
+
G.onBlur(), C("blur", e);
|
|
248
|
+
}
|
|
249
|
+
k(() => y.multiline && y.autoGrow ? I.value : null, {
|
|
250
|
+
minRows: () => y.rows,
|
|
251
|
+
maxRows: () => y.maxRows,
|
|
252
|
+
value: () => y.modelValue
|
|
227
253
|
});
|
|
228
|
-
let
|
|
229
|
-
let e =
|
|
254
|
+
let ie = r(() => y.clearable && String(y.modelValue).length > 0 && !Y.value), Z = r(() => E.trailing || y.clearable ? "right-12" : "right-4"), Q = r(() => {
|
|
255
|
+
let e = y.leadingIcon ? "pl-12" : "pl-4", t = j[Z.value], n = y.multiline ? y.autoGrow ? "resize-none min-h-[56px]" : "resize-y min-h-[56px]" : "h-14", r = [
|
|
230
256
|
"peer block w-full text-body-large text-on-surface outline-none placeholder:text-transparent",
|
|
231
257
|
"transition-[border-color,border-width] duration-150",
|
|
232
258
|
"disabled:cursor-not-allowed disabled:text-on-surface/38",
|
|
233
|
-
|
|
259
|
+
K.value ? "caret-error" : "caret-primary",
|
|
234
260
|
n,
|
|
235
261
|
e,
|
|
236
262
|
t
|
|
237
263
|
];
|
|
238
|
-
return
|
|
264
|
+
return y.variant === "outlined" ? [
|
|
239
265
|
...r,
|
|
240
266
|
"rounded-xs border bg-transparent py-4",
|
|
241
|
-
|
|
267
|
+
K.value ? "border-error focus:border-2 focus:border-error" : "border-outline hover:border-on-surface focus:border-2 focus:border-primary",
|
|
242
268
|
"disabled:border-on-surface/12"
|
|
243
269
|
].join(" ") : [
|
|
244
270
|
...r,
|
|
245
|
-
|
|
246
|
-
|
|
271
|
+
y.multiline ? "rounded-t-xs bg-surface-container-highest border-b border-t-24 border-t-transparent pb-2" : "rounded-t-xs bg-surface-container-highest border-b pt-6 pb-2",
|
|
272
|
+
K.value ? "border-b-error focus:border-b-2 focus:border-b-error" : "border-b-on-surface-variant hover:border-b-on-surface focus:border-b-2 focus:border-b-primary",
|
|
247
273
|
"disabled:border-b-on-surface/38 disabled:bg-[color-mix(in_srgb,var(--color-on-surface)_4%,var(--color-surface-container-highest))]"
|
|
248
274
|
].join(" ");
|
|
249
|
-
}),
|
|
250
|
-
variant:
|
|
251
|
-
leading: !!
|
|
252
|
-
right:
|
|
275
|
+
}), ae = r(() => N({
|
|
276
|
+
variant: y.variant,
|
|
277
|
+
leading: !!y.leadingIcon,
|
|
278
|
+
right: Z.value,
|
|
253
279
|
floated: "peer",
|
|
254
|
-
color: [
|
|
280
|
+
color: [K.value ? "text-error peer-focus:text-error" : "text-on-surface-variant peer-focus:text-primary", "peer-disabled:text-on-surface/38"].join(" ")
|
|
255
281
|
}));
|
|
256
|
-
function
|
|
282
|
+
function $(e) {
|
|
257
283
|
let t = e.target;
|
|
258
|
-
|
|
284
|
+
C("update:modelValue", t.value), y.debounce > 0 && P(t.value);
|
|
259
285
|
}
|
|
260
|
-
return
|
|
261
|
-
inputEl:
|
|
262
|
-
focus: (e) =>
|
|
263
|
-
blur: () =>
|
|
264
|
-
select: () =>
|
|
265
|
-
|
|
266
|
-
|
|
286
|
+
return u({
|
|
287
|
+
inputEl: W,
|
|
288
|
+
focus: (e) => W.value?.focus(e),
|
|
289
|
+
blur: () => W.value?.blur(),
|
|
290
|
+
select: () => W.value?.select(),
|
|
291
|
+
validate: G.validate,
|
|
292
|
+
resetValidation: G.resetValidation,
|
|
293
|
+
setSelectionRange: (e, t, n) => W.value?.setSelectionRange(e, t, n)
|
|
294
|
+
}), (t, n) => (h(), a("div", z, [o("div", {
|
|
267
295
|
ref_key: "fieldBgEl",
|
|
268
|
-
ref:
|
|
269
|
-
class:
|
|
270
|
-
style:
|
|
296
|
+
ref: D,
|
|
297
|
+
class: d(["relative", l.variant === "outlined" ? "mt-2" : ""]),
|
|
298
|
+
style: f(l.variant === "outlined" ? { "--field-bg": b(M) } : void 0)
|
|
271
299
|
}, [
|
|
272
|
-
|
|
300
|
+
l.leadingIcon ? (h(), a("div", {
|
|
273
301
|
key: 0,
|
|
274
|
-
class:
|
|
275
|
-
}, [
|
|
276
|
-
name:
|
|
302
|
+
class: d(["pointer-events-none absolute left-3.5", [l.multiline ? "top-[55%] -translate-y-1/2" : l.variant === "filled" ? "top-4.5" : "top-4", b(Y) ? "text-on-surface/38" : "text-on-surface-variant"]])
|
|
303
|
+
}, [c(e, {
|
|
304
|
+
name: l.leadingIcon,
|
|
277
305
|
size: 24
|
|
278
|
-
}, null, 8, ["name"])], 2)) :
|
|
279
|
-
|
|
306
|
+
}, null, 8, ["name"])], 2)) : i("", !0),
|
|
307
|
+
l.multiline ? (h(), a("textarea", {
|
|
280
308
|
key: 1,
|
|
281
309
|
ref_key: "textareaEl",
|
|
282
|
-
ref:
|
|
283
|
-
id:
|
|
284
|
-
value: String(
|
|
285
|
-
rows:
|
|
286
|
-
|
|
287
|
-
|
|
310
|
+
ref: I,
|
|
311
|
+
id: b(T),
|
|
312
|
+
value: String(l.modelValue),
|
|
313
|
+
rows: l.rows,
|
|
314
|
+
name: l.name,
|
|
315
|
+
disabled: b(Y),
|
|
316
|
+
required: l.required,
|
|
317
|
+
"aria-invalid": b(K) || void 0,
|
|
318
|
+
"aria-describedby": b(q) || l.hint ? b(J) : void 0,
|
|
288
319
|
placeholder: " ",
|
|
289
|
-
class:
|
|
290
|
-
onInput:
|
|
291
|
-
|
|
320
|
+
class: d(Q.value),
|
|
321
|
+
onInput: $,
|
|
322
|
+
onBlur: X,
|
|
323
|
+
onFocus: n[0] ||= (e) => C("focus", e)
|
|
324
|
+
}, null, 42, B)) : w((h(), a("input", {
|
|
292
325
|
key: 2,
|
|
293
326
|
ref_key: "inputOnlyEl",
|
|
294
|
-
ref:
|
|
295
|
-
id:
|
|
296
|
-
type:
|
|
297
|
-
value:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
327
|
+
ref: L,
|
|
328
|
+
id: b(T),
|
|
329
|
+
type: l.type,
|
|
330
|
+
value: l.modelValue,
|
|
331
|
+
name: l.name,
|
|
332
|
+
disabled: b(Y),
|
|
333
|
+
required: l.required,
|
|
334
|
+
"aria-invalid": b(K) || void 0,
|
|
335
|
+
"aria-describedby": b(q) || l.hint ? b(J) : void 0,
|
|
336
|
+
autocomplete: l.autocomplete,
|
|
301
337
|
placeholder: " ",
|
|
302
|
-
class:
|
|
303
|
-
onInput:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
338
|
+
class: d(Q.value),
|
|
339
|
+
onInput: $,
|
|
340
|
+
onBlur: X,
|
|
341
|
+
onFocus: n[1] ||= (e) => C("focus", e)
|
|
342
|
+
}, null, 42, V)), [[b(R)]]),
|
|
343
|
+
o("label", {
|
|
344
|
+
for: b(T),
|
|
345
|
+
class: d(ae.value)
|
|
346
|
+
}, [s(v(l.label), 1), l.required ? (h(), a("span", te, "\xA0*")) : i("", !0)], 10, ee),
|
|
347
|
+
t.$slots.trailing ? (h(), a("div", ne, [_(t.$slots, "trailing")])) : ie.value ? (h(), a("button", {
|
|
310
348
|
key: 4,
|
|
311
|
-
"aria-label":
|
|
349
|
+
"aria-label": b(m).clear,
|
|
312
350
|
type: "button",
|
|
313
351
|
class: "absolute right-3 top-1/2 -translate-y-1/2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full text-on-surface-variant transition-colors hover:bg-on-surface/8 hover:text-on-surface",
|
|
314
|
-
onClick: n[
|
|
315
|
-
|
|
352
|
+
onClick: n[2] ||= (e) => {
|
|
353
|
+
b(F)(), C("update:modelValue", "");
|
|
316
354
|
}
|
|
317
|
-
}, [
|
|
355
|
+
}, [c(e, {
|
|
318
356
|
name: "close",
|
|
319
357
|
size: 18
|
|
320
|
-
})], 8,
|
|
321
|
-
], 6),
|
|
358
|
+
})], 8, re)) : i("", !0)
|
|
359
|
+
], 6), b(q) ? (h(), a("p", {
|
|
360
|
+
key: 0,
|
|
361
|
+
id: b(J),
|
|
362
|
+
role: "alert",
|
|
363
|
+
class: "px-4 text-body-small text-error"
|
|
364
|
+
}, v(b(q)), 9, H)) : l.hint ? (h(), a("p", {
|
|
365
|
+
key: 1,
|
|
366
|
+
id: b(J),
|
|
367
|
+
class: "px-4 text-body-small text-on-surface-variant"
|
|
368
|
+
}, v(l.hint), 9, U)) : i("", !0)]));
|
|
322
369
|
}
|
|
323
370
|
});
|
|
324
|
-
export {
|
|
371
|
+
export { N as a, k as c, P as i, O as l, j as n, R as o, M as r, A as s, W as t };
|
|
325
372
|
|
|
326
|
-
//# sourceMappingURL=MTextField-
|
|
373
|
+
//# sourceMappingURL=MTextField-NaFbMkjv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MTextField-NaFbMkjv.js","names":["$slots","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_normalizeStyle","_unref","_createVNode","MIcon","_withDirectives","_createTextVNode","_toDisplayString","_renderSlot","MIcon_default","useLocale","M3_BG_CLASSES","findM3BgVar","cls","el","isTransparent","color","m","parts","s","useFieldBg","detectedBg","ref","applyFieldBg","value","containerEl","fieldBgProp","resolveBg","cssVar","bg","observer","onMounted","onBeforeUnmount","computed","useAutoGrow","lastWidth","resize","cs","px","v","lineHeight","padding","border","extra","min","toValue","options","maxRows","max","content","height","attach","next","entry","w","watch","target","getCurrentInstance","useDebounce","timer","debounced","args","fn","ms","cancel","FIELD_PADDING_RIGHT","FIELD_VALUE","fieldLabelClasses","outlined","o","base","rest","floatedPeer","floated","OUTLINED_FLOATED_LABEL","fullText","updateTitle","text","hoverHandlers","vOverflowTitle","handler","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","MTextField_default","defineComponent","__expose","__emit","locale","props","__props","emit","id","useId","slots","useSlots","fieldBgEl","emitDebounced","cancelDebounce","textareaEl","inputOnlyEl","fieldEl","validation","useFieldValidation","errorMessage","isDisabled","onBlur","event","showClear","rightInset","inputClasses","pl","pr","size","hasError","labelClasses","onInput","start","end","direction","openBlock","createElementBlock","createElementVNode","normalizeClass","normalizeStyle","unref","resolvedFieldBg","createVNode","createCommentVNode","messageId","_cache","$event","withDirectives","createTextVNode","toDisplayString","_ctx","renderSlot"],"sources":["../src/composables/useFieldBg.ts","../src/composables/useAutoGrow.ts","../src/composables/useDebounce.ts","../src/composables/_fieldLayout.ts","../src/components/MTextField.vue"],"sourcesContent":["import { ref, computed, onMounted, onBeforeUnmount, type Ref } from 'vue'\n\nconst M3_BG_CLASSES = [\n 'bg-surface-container-highest',\n 'bg-surface-container-high',\n 'bg-surface-container-low',\n 'bg-surface-container-lowest',\n 'bg-surface-container',\n 'bg-surface-variant',\n 'bg-surface-bright',\n 'bg-surface-dim',\n 'bg-surface',\n 'bg-background',\n 'bg-inverse-surface',\n 'bg-primary-container',\n 'bg-secondary-container',\n 'bg-tertiary-container',\n 'bg-error-container',\n 'bg-primary-fixed',\n 'bg-primary-fixed-dim',\n 'bg-secondary-fixed',\n 'bg-secondary-fixed-dim',\n 'bg-tertiary-fixed',\n 'bg-tertiary-fixed-dim',\n 'bg-primary',\n 'bg-secondary',\n 'bg-tertiary',\n 'bg-error',\n] as const\n\nfunction findM3BgVar(el: HTMLElement): string | null {\n for (const cls of M3_BG_CLASSES) {\n if (el.classList.contains(cls)) return `var(--color-${cls.slice(3)})`\n }\n return null\n}\n\nfunction isTransparent(color: string): boolean {\n if (!color || color === 'transparent') return true\n const m = color.match(/^rgba?\\(([^)]+)\\)$/)\n if (m) {\n const parts = m[1]!.split(',').map((s) => s.trim())\n if (parts.length === 4 && parseFloat(parts[3]!) === 0) return true\n }\n return false\n}\n\n/**\n * Auto-detects the background behind `containerEl` and exposes it as `--field-bg`.\n * Prefers a CSS variable reference (e.g. var(--color-surface-container-low)) over a\n * raw computed color so the outlined label cutout transitions in sync with the rest\n * of the theme switch instead of lagging behind.\n *\n * @param containerEl The element that receives `--field-bg` as an inline style.\n * @param fieldBgProp Getter for the explicit `fieldBg` prop (overrides auto-detect).\n */\nexport function useFieldBg(\n containerEl: Ref<HTMLElement | null>,\n fieldBgProp: () => string | undefined,\n) {\n const detectedBg = ref<string>('var(--color-surface)')\n\n function applyFieldBg(value: string) {\n detectedBg.value = value\n containerEl.value?.style.setProperty('--field-bg', fieldBgProp() ?? value)\n }\n\n function resolveBg() {\n let el: HTMLElement | null = containerEl.value?.parentElement ?? null\n while (el) {\n const cssVar = findM3BgVar(el)\n if (cssVar) { applyFieldBg(cssVar); return }\n if (el === document.body) { applyFieldBg('var(--color-surface)'); return }\n const bg = getComputedStyle(el).backgroundColor\n if (!isTransparent(bg)) { applyFieldBg(bg); return }\n el = el.parentElement\n }\n applyFieldBg('var(--color-surface)')\n }\n\n let observer: MutationObserver | null = null\n\n onMounted(() => {\n resolveBg()\n observer = new MutationObserver(() => resolveBg())\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class', 'style', 'data-theme'],\n })\n })\n\n onBeforeUnmount(() => observer?.disconnect())\n\n const resolvedFieldBg = computed(() => fieldBgProp() ?? detectedBg.value)\n\n return { resolvedFieldBg }\n}\n","import { getCurrentInstance, onBeforeUnmount, toValue, watch, type MaybeRefOrGetter, type WatchSource } from 'vue'\n\nexport interface AutoGrowOptions {\n /** Fewest rows it shrinks to (default 1) */\n minRows?: MaybeRefOrGetter<number | undefined>\n /** Most rows it grows to; past them it scrolls. Unset grows without limit */\n maxRows?: MaybeRefOrGetter<number | undefined>\n /**\n * The text, when it can change without typing (cleared after sending, an emoji inserted…): a ref or getter, so the\n * height follows. Typing is followed on its own\n */\n value?: WatchSource<unknown>\n}\n\n/**\n * Makes a `<textarea>` grow with its text, between `minRows` and `maxRows` rows, scrolling past the last one: a chat\n * composer, a comment box. Works on any textarea, styled however you like (rows are measured from its computed line\n * height, padding and border). It also follows width changes, which rewrap the text. Returns `resize()` for anything\n * else that changes the text.\n */\nexport function useAutoGrow(target: MaybeRefOrGetter<HTMLTextAreaElement | null | undefined>, options: AutoGrowOptions = {}) {\n let el: HTMLTextAreaElement | null = null\n let observer: ResizeObserver | null = null\n let lastWidth = 0\n\n function resize() {\n if (!el) return\n const cs = getComputedStyle(el)\n const px = (v: string) => parseFloat(v) || 0\n // `normal` line height has no number: about 1.5× the font size\n const lineHeight = px(cs.lineHeight) || px(cs.fontSize) * 1.5 || 24\n const padding = px(cs.paddingTop) + px(cs.paddingBottom)\n const border = cs.boxSizing === 'border-box' ? px(cs.borderTopWidth) + px(cs.borderBottomWidth) : 0\n const extra = (cs.boxSizing === 'border-box' ? padding : 0) + border\n const min = (toValue(options.minRows) ?? 1) * lineHeight + extra\n const maxRows = toValue(options.maxRows)\n const max = maxRows ? maxRows * lineHeight + extra : Infinity\n\n // Collapse first so scrollHeight measures the text, not the current height\n el.style.height = 'auto'\n const content = el.scrollHeight + border + (cs.boxSizing === 'border-box' ? 0 : -padding)\n const height = Math.min(max, Math.max(min, content))\n el.style.height = `${height}px`\n el.style.overflowY = content > max ? 'auto' : 'hidden'\n }\n\n function attach(next: HTMLTextAreaElement | null | undefined) {\n if (el) {\n el.removeEventListener('input', resize)\n observer?.disconnect()\n // Released (autoGrow turned off, another element): back to its own height\n el.style.height = ''\n el.style.overflowY = ''\n }\n el = next ?? null\n if (!el) return\n el.addEventListener('input', resize)\n if (typeof ResizeObserver !== 'undefined') {\n // Only width changes rewrap the text; our own height writes would otherwise loop\n observer ??= new ResizeObserver(([entry]) => {\n const w = entry!.contentRect.width\n if (w !== lastWidth) {\n lastWidth = w\n resize()\n }\n })\n observer.observe(el)\n }\n resize()\n }\n\n watch(() => toValue(target), attach, { immediate: true, flush: 'post' })\n watch([() => toValue(options.minRows), () => toValue(options.maxRows)], () => resize(), { flush: 'post' })\n if (options.value) watch(options.value, () => resize(), { flush: 'post' })\n if (getCurrentInstance()) onBeforeUnmount(() => attach(null))\n\n return { resize }\n}\n","import { onBeforeUnmount } from 'vue'\n\nexport function useDebounce(fn: (...args: any[]) => void, ms: number) {\n let timer: ReturnType<typeof setTimeout> | null = null\n\n function debounced(...args: any[]) {\n if (timer) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = null\n fn(...args)\n }, ms)\n }\n\n function cancel() {\n if (timer) {\n clearTimeout(timer)\n timer = null\n }\n }\n\n onBeforeUnmount(cancel)\n\n return { debounced, cancel }\n}\n","import type { Directive } from 'vue'\n\n/**\n * Shared layout of the M3 text-field shell (internal, not exported from the package).\n *\n * Every field draws the same pieces: a 56px box, a label that floats from the middle of the box to its top\n * edge (filled) or onto the border (outlined), an optional leading icon and trailing buttons. The rules that\n * keep long content from running over those pieces live here, so a new field gets them by reusing this:\n *\n * - The label is inset from the right by as much as the box's own right padding (`right`), so it never runs\n * under a trailing button, floated (filled) or not. Floated on an outlined border, it shrinks to its own\n * text but stops 12px before the far corner, whatever its left offset (a leading icon moves it to 44px).\n * - A value shown as text in a fixed-height box (`FIELD_VALUE`) stays on one line and ends in \"…\", and\n * `vOverflowTitle` puts the whole of it in a tooltip only when it's cut. Screen readers get the full text\n * either way: the ellipsis is only visual.\n */\n\nexport type FieldVariant = 'filled' | 'outlined'\n\n/**\n * Right inset of the label, which must equal the field's right padding: `right-4` with nothing trailing,\n * `right-10` with a dropdown arrow, `right-12` with one trailing button, `right-16` with a clear button and\n * an arrow, `right-24` with two 32px buttons (MNumberField's stepper).\n */\nexport type FieldRightInset = 'right-4' | 'right-10' | 'right-12' | 'right-16' | 'right-24'\n\n/** Padding matching each inset, for the box itself */\nexport const FIELD_PADDING_RIGHT: Record<FieldRightInset, string> = {\n 'right-4': 'pr-4',\n 'right-10': 'pr-10',\n 'right-12': 'pr-12',\n 'right-16': 'pr-16',\n 'right-24': 'pr-24',\n}\n\n/** One line, cut with \"…\", allowed to shrink inside its flex row */\nexport const FIELD_VALUE = 'block min-w-0 flex-1 truncate'\n\nexport interface FieldLabelOptions {\n variant: FieldVariant\n /** There is a leading icon (the label starts after it) */\n leading?: boolean\n right: FieldRightInset\n /**\n * `true`/`false` when the component knows whether the label floats; `'peer'` to float it with CSS from\n * the preceding `.peer` input (focused, or its `placeholder=\" \"` not shown because it has a value)\n */\n floated: boolean | 'peer'\n /** Color classes (they depend on each component's notion of focus / error / disabled) */\n color: string\n}\n\nexport function fieldLabelClasses(o: FieldLabelOptions): string {\n const outlined = o.variant === 'outlined'\n const left = o.leading ? (outlined ? 'left-11' : 'left-12') : outlined ? 'left-3' : 'left-4'\n const base = ['pointer-events-none absolute truncate transition-all duration-200', left, o.right]\n const rest = outlined ? 'top-1/2 -translate-y-1/2 text-body-large' : 'top-[53%] -translate-y-1/2 text-body-large'\n\n if (o.floated === 'peer') {\n // Literal class names (Tailwind only sees complete strings)\n const floatedPeer = outlined\n ? o.leading\n ? 'peer-focus:-top-2.5 peer-focus:translate-y-0 peer-focus:text-label-small peer-focus:right-auto peer-focus:max-w-[calc(100%-3.5rem)] peer-focus:bg-[var(--field-bg)] peer-focus:px-1 ' +\n 'peer-[&:not(:placeholder-shown)]:-top-2.5 peer-[&:not(:placeholder-shown)]:translate-y-0 peer-[&:not(:placeholder-shown)]:text-label-small peer-[&:not(:placeholder-shown)]:right-auto peer-[&:not(:placeholder-shown)]:max-w-[calc(100%-3.5rem)] peer-[&:not(:placeholder-shown)]:bg-[var(--field-bg)] peer-[&:not(:placeholder-shown)]:px-1'\n : 'peer-focus:-top-2.5 peer-focus:translate-y-0 peer-focus:text-label-small peer-focus:right-auto peer-focus:max-w-[calc(100%-1.5rem)] peer-focus:bg-[var(--field-bg)] peer-focus:px-1 ' +\n 'peer-[&:not(:placeholder-shown)]:-top-2.5 peer-[&:not(:placeholder-shown)]:translate-y-0 peer-[&:not(:placeholder-shown)]:text-label-small peer-[&:not(:placeholder-shown)]:right-auto peer-[&:not(:placeholder-shown)]:max-w-[calc(100%-1.5rem)] peer-[&:not(:placeholder-shown)]:bg-[var(--field-bg)] peer-[&:not(:placeholder-shown)]:px-1'\n : 'peer-focus:top-2 peer-focus:translate-y-0 peer-focus:text-label-small ' +\n 'peer-[&:not(:placeholder-shown)]:top-2 peer-[&:not(:placeholder-shown)]:translate-y-0 peer-[&:not(:placeholder-shown)]:text-label-small'\n return [...base, rest, floatedPeer, o.color].join(' ')\n }\n\n const floated = outlined\n ? `-top-2.5 translate-y-0 text-label-small bg-[var(--field-bg)] px-1 right-auto ${o.leading ? 'max-w-[calc(100%-3.5rem)]' : 'max-w-[calc(100%-1.5rem)]'}`\n : 'top-2 translate-y-0 text-label-small'\n return [...base, o.floated ? floated : rest, o.color].join(' ')\n}\n\n/** A label always floated on an outlined border (the picker triggers): cut before the far corner */\nexport const OUTLINED_FLOATED_LABEL =\n 'pointer-events-none absolute -top-2.5 left-3 max-w-[calc(100%-1.5rem)] truncate bg-(--field-bg) px-1 text-label-small'\n\nfunction fullText(el: HTMLElement): string {\n // By tag, not instanceof: the element may come from another realm (an iframe, a test DOM)\n return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA'\n ? (el as HTMLInputElement).value\n : (el.textContent ?? '').trim()\n}\n\nfunction updateTitle(el: HTMLElement) {\n const cut = el.scrollWidth > el.clientWidth\n const text = cut ? fullText(el) : ''\n if (text) el.title = text\n else el.removeAttribute('title')\n}\n\nconst hoverHandlers = new WeakMap<HTMLElement, () => void>()\n\n/**\n * Puts the element's whole text (an input's value, or its text content) in `title` while it's cut by\n * overflow, measured when the pointer comes in, so a value that fits gets no redundant tooltip.\n */\nexport const vOverflowTitle: Directive<HTMLElement> = {\n mounted(el) {\n const handler = () => updateTitle(el)\n hoverHandlers.set(el, handler)\n el.addEventListener('pointerenter', handler)\n },\n updated(el) {\n // A value changed while hovered: keep the tooltip in step\n if (el.hasAttribute('title')) updateTitle(el)\n },\n beforeUnmount(el) {\n const handler = hoverHandlers.get(el)\n if (handler) el.removeEventListener('pointerenter', handler)\n hoverHandlers.delete(el)\n },\n}\n","<script setup lang=\"ts\">\n/**\n * The standard single- or multi-line text input, filled or outlined, with floating label.\n *\n * @slot trailing Custom trailing content (e.g. an icon button) — replaces the built-in clear button when\n * present\n * @event update:modelValue Emitted on every keystroke — powers v-model\n * @event debounced Emitted debounce ms after the user stops typing (only when debounce > 0)\n * @event blur Emitted when the field loses focus (wire vee-validate's `handleBlur` / Vuelidate's `$touch` here)\n * @event focus Emitted when the field gains focus\n */\nimport { computed, ref, useId, useSlots } from \"vue\";\nimport MIcon from \"./MIcon.vue\";\nimport { useAutoGrow } from \"../composables/useAutoGrow\";\nimport { useFieldBg } from \"../composables/useFieldBg\";\nimport { useDebounce } from \"../composables/useDebounce\";\nimport { useLocale } from '../composables/useLocale'\nimport { useFieldValidation } from '../composables/_useFieldValidation'\nimport type { ValidateOn, ValidationRule } from '../composables/validation'\nimport { FIELD_PADDING_RIGHT, fieldLabelClasses, vOverflowTitle, type FieldRightInset } from '../composables/_fieldLayout'\n\nconst locale = useLocale()\nconst props = withDefaults(\n defineProps<{\n /** Bound value (v-model) */\n modelValue: string | number;\n /** Field label */\n label: string;\n /** HTML input type */\n type?: string;\n /** Visual style */\n variant?: \"filled\" | \"outlined\";\n /**\n * Puts the field in error state (red border and label). A string is also the message, so a validation\n * library's error plugs straight in: `:error=\"errors.email\"`\n */\n error?: boolean | string;\n /** Error message shown below the field (only visible when error is true) */\n errorLabel?: string;\n /**\n * Validation rules: functions `(value, ctx) => true | 'message'` (may be async; see the built-in `required`,\n * `email`, `minLength`…) or a Standard Schema (zod, valibot…). Checked in order; the first failure is shown\n */\n rules?: ValidationRule | ValidationRule[];\n /** When the rules are checked and shown: on leaving the field (default; live after that), while typing, or only on submit (`MForm`) */\n validateOn?: ValidateOn;\n /** Wait this long (ms) after the value stops changing before re-checking (one request for an async rule, not one per key). Defaults to its `MForm`'s */\n validateDebounce?: number;\n /** Native `name`; also the key of this field in its `MForm`'s values, errors and schema */\n name?: string;\n /** Hint text shown below the field */\n hint?: string;\n /** Disables the field */\n disabled?: boolean;\n /** Marks as required — adds a red asterisk after the label; inside an `MForm` or with `rules`, also validates it */\n required?: boolean;\n /** Renders a textarea instead of an input */\n multiline?: boolean;\n /** Textarea rows (when multiline); with autoGrow, the fewest it shrinks to */\n rows?: number;\n /** Multiline only: grows with the text from `rows` up to `maxRows`, instead of a fixed height with a drag handle */\n autoGrow?: boolean;\n /** With autoGrow, the most rows it grows to before scrolling. Unset grows without limit */\n maxRows?: number;\n /** Passed through to the native autocomplete attribute */\n autocomplete?: string;\n /** Material Symbol shown before the input */\n leadingIcon?: string;\n /** Show a clear button when the field has a value */\n clearable?: boolean;\n /**\n * Overrides the auto-detected background color used to cut the floating label out of the outlined border\n */\n fieldBg?: string;\n /** Delay (ms) before firing the @debounced event. v-model always updates immediately */\n debounce?: number;\n }>(),\n {\n type: \"text\",\n variant: \"filled\",\n rows: 3,\n clearable: false,\n debounce: 0,\n },\n);\n\nconst emit = defineEmits<{ \"update:modelValue\": [string]; debounced: [string]; blur: [FocusEvent]; focus: [FocusEvent] }>();\n\nconst id = useId();\nconst slots = useSlots();\n\nconst fieldBgEl = ref<HTMLElement | null>(null);\nconst { resolvedFieldBg } = useFieldBg(fieldBgEl, () => props.fieldBg);\n\nconst { debounced: emitDebounced, cancel: cancelDebounce } = useDebounce((v: string) => emit(\"debounced\", v), props.debounce)\n\nconst textareaEl = ref<HTMLTextAreaElement | null>(null);\nconst inputOnlyEl = ref<HTMLInputElement | null>(null);\nconst fieldEl = computed(() => textareaEl.value ?? inputOnlyEl.value);\n\nconst validation = useFieldValidation({\n value: () => props.modelValue,\n rules: () => props.rules,\n required: () => props.required,\n error: () => props.error,\n errorLabel: () => props.errorLabel,\n name: () => props.name,\n validateOn: () => props.validateOn,\n validateDebounce: () => props.validateDebounce,\n disabled: () => props.disabled,\n focus: () => fieldEl.value?.focus(),\n el: () => fieldEl.value,\n setValue: (v) => emit(\"update:modelValue\", v as string),\n});\nconst { hasError, message: errorMessage, messageId } = validation;\nconst isDisabled = validation.disabled;\n\nfunction onBlur(event: FocusEvent) {\n validation.onBlur();\n emit(\"blur\", event);\n}\nuseAutoGrow(() => (props.multiline && props.autoGrow ? textareaEl.value : null), {\n minRows: () => props.rows,\n maxRows: () => props.maxRows,\n value: () => props.modelValue,\n});\n\nconst showClear = computed(() => props.clearable && String(props.modelValue).length > 0 && !isDisabled.value)\n\n// The label and the text both stop before a trailing button (the #trailing slot or the clear button)\nconst rightInset = computed<FieldRightInset>(() => (slots.trailing || props.clearable ? \"right-12\" : \"right-4\"));\n\nconst inputClasses = computed(() => {\n const pl = props.leadingIcon ? \"pl-12\" : \"pl-4\";\n const pr = FIELD_PADDING_RIGHT[rightInset.value];\n const size = props.multiline ? (props.autoGrow ? \"resize-none min-h-[56px]\" : \"resize-y min-h-[56px]\") : \"h-14\";\n const base = [\n \"peer block w-full text-body-large text-on-surface outline-none placeholder:text-transparent\",\n \"transition-[border-color,border-width] duration-150\",\n \"disabled:cursor-not-allowed disabled:text-on-surface/38\",\n hasError.value ? \"caret-error\" : \"caret-primary\",\n size,\n pl,\n pr,\n ];\n\n if (props.variant === \"outlined\") {\n return [\n ...base,\n \"rounded-xs border bg-transparent py-4\",\n hasError.value\n ? \"border-error focus:border-2 focus:border-error\"\n : \"border-outline hover:border-on-surface focus:border-2 focus:border-primary\",\n \"disabled:border-on-surface/12\",\n ].join(\" \");\n }\n\n return [\n ...base,\n // Multiline: the label's 24px band is a transparent top border rather than padding, so text scrolled up is\n // clipped below the label (at the padding box) instead of running behind it; the background still fills it\n props.multiline\n ? \"rounded-t-xs bg-surface-container-highest border-b border-t-24 border-t-transparent pb-2\"\n : \"rounded-t-xs bg-surface-container-highest border-b pt-6 pb-2\",\n hasError.value\n ? \"border-b-error focus:border-b-2 focus:border-b-error\"\n : \"border-b-on-surface-variant hover:border-b-on-surface focus:border-b-2 focus:border-b-primary\",\n \"disabled:border-b-on-surface/38 disabled:bg-[color-mix(in_srgb,var(--color-on-surface)_4%,var(--color-surface-container-highest))]\",\n ].join(\" \");\n});\n\nconst labelClasses = computed(() =>\n fieldLabelClasses({\n variant: props.variant,\n leading: !!props.leadingIcon,\n right: rightInset.value,\n floated: 'peer',\n color: [\n hasError.value ? 'text-error peer-focus:text-error' : 'text-on-surface-variant peer-focus:text-primary',\n 'peer-disabled:text-on-surface/38',\n ].join(' '),\n }),\n);\n\nfunction onInput(event: Event) {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement;\n emit(\"update:modelValue\", target.value);\n if (props.debounce > 0) emitDebounced(target.value)\n}\n\ndefineExpose({\n /** The `<input>` (or `<textarea>`) element */\n inputEl: fieldEl,\n /** Focuses the field */\n focus: (options?: FocusOptions) => fieldEl.value?.focus(options),\n /** Takes focus away from the field */\n blur: () => fieldEl.value?.blur(),\n /** Selects all its text */\n select: () => fieldEl.value?.select(),\n /** Checks its rules and shows the result; resolves to whether they pass */\n validate: validation.validate,\n /** Hides its validation error (until the next check) */\n resetValidation: validation.resetValidation,\n /** Selects part of its text (e.g. a file name without its extension) */\n setSelectionRange: (start: number, end: number, direction?: 'forward' | 'backward' | 'none') => fieldEl.value?.setSelectionRange(start, end, direction),\n})\n</script>\n\n<template>\n <div class=\"flex flex-col gap-1\">\n <!--\n --field-bg: background behind the floating label in outlined mode, so it\n \"cuts through\" the border. Auto-detected from the nearest opaque ancestor\n (see resolveBg); overridable via the fieldBg prop; falls back to surface.\n -->\n <div\n ref=\"fieldBgEl\"\n class=\"relative\"\n :class=\"variant === 'outlined' ? 'mt-2' : ''\"\n :style=\"variant === 'outlined' ? { '--field-bg': resolvedFieldBg } : undefined\"\n >\n <div\n v-if=\"leadingIcon\"\n class=\"pointer-events-none absolute left-3.5\"\n :class=\"[\n multiline ? 'top-[55%] -translate-y-1/2' : variant === 'filled' ? 'top-4.5' : 'top-4',\n isDisabled ? 'text-on-surface/38' : 'text-on-surface-variant',\n ]\"\n >\n <MIcon :name=\"leadingIcon\" :size=\"24\" />\n </div>\n\n <textarea\n v-if=\"multiline\"\n ref=\"textareaEl\"\n :id=\"id\"\n :value=\"String(modelValue)\"\n :rows=\"rows\"\n :name=\"name\"\n :disabled=\"isDisabled\"\n :required=\"required\"\n :aria-invalid=\"hasError || undefined\"\n :aria-describedby=\"errorMessage || hint ? messageId : undefined\"\n placeholder=\" \"\n :class=\"inputClasses\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n @focus=\"emit('focus', $event)\"\n />\n <input\n v-else\n ref=\"inputOnlyEl\"\n :id=\"id\"\n :type=\"type\"\n :value=\"modelValue\"\n :name=\"name\"\n :disabled=\"isDisabled\"\n :required=\"required\"\n :aria-invalid=\"hasError || undefined\"\n :aria-describedby=\"errorMessage || hint ? messageId : undefined\"\n :autocomplete=\"autocomplete\"\n placeholder=\" \"\n :class=\"inputClasses\"\n v-overflow-title\n @input=\"onInput\"\n @blur=\"onBlur\"\n @focus=\"emit('focus', $event)\"\n />\n\n <label :for=\"id\" :class=\"labelClasses\">\n {{ label }}<span v-if=\"required\" class=\"text-error\"> *</span>\n </label>\n\n <div v-if=\"$slots.trailing\" class=\"absolute right-2 top-1/2 -translate-y-1/2\">\n <slot name=\"trailing\" />\n </div>\n <button\n :aria-label=\"locale.clear\"\n v-else-if=\"showClear\"\n type=\"button\"\n class=\"absolute right-3 top-1/2 -translate-y-1/2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full text-on-surface-variant transition-colors hover:bg-on-surface/8 hover:text-on-surface\"\n @click=\"cancelDebounce(); emit('update:modelValue', '')\"\n >\n <MIcon name=\"close\" :size=\"18\" />\n </button>\n </div>\n\n <p v-if=\"errorMessage\" :id=\"messageId\" role=\"alert\" class=\"px-4 text-body-small text-error\">{{ errorMessage }}</p>\n <p v-else-if=\"hint\" :id=\"messageId\" class=\"px-4 text-body-small text-on-surface-variant\">{{ hint }}</p>\n </div>\n</template>\n"],"mappings":";;;;;AAEA,IAAMe,IAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA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