@quidgest/ui 0.14.12 → 0.14.14
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/manifest/components.json +3 -0
- package/dist/ui.css +1726 -211
- package/dist/ui.esm.js +11110 -1888
- package/dist/ui.js +21 -21
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1212 -255
- package/dist/ui.scss +278 -85
- package/esm/components/QBadge/QBadge.d.ts +2 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +75 -66
- package/esm/components/QBadge/index.d.ts +3 -0
- package/esm/components/QBadge/index.d.ts.map +1 -1
- package/esm/components/QBadge/types.d.ts +7 -0
- package/esm/components/QBadge/types.d.ts.map +1 -1
- package/esm/components/QBadge/types.js +5 -2
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts +22 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +43 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue2.js +4 -0
- package/esm/components/QBadgeIndicator/index.d.ts +28 -0
- package/esm/components/QBadgeIndicator/index.d.ts.map +1 -0
- package/esm/components/QBadgeIndicator/index.js +6 -0
- package/esm/components/QBadgeIndicator/types.d.ts +19 -0
- package/esm/components/QBadgeIndicator/types.d.ts.map +1 -0
- package/esm/components/QCombobox/QCombobox.d.ts +32 -4
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/index.d.ts +56 -7
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +36 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +168 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.vue2.js +4 -0
- package/esm/components/QDateTimePicker/index.d.ts +54 -0
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -0
- package/esm/components/QDateTimePicker/index.js +6 -0
- package/esm/components/QDateTimePicker/types.d.ts +93 -0
- package/esm/components/QDateTimePicker/types.d.ts.map +1 -0
- package/esm/components/QDateTimePicker/types.js +15 -0
- package/esm/components/QFileUpload/QFileUpload.d.ts +37 -0
- package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -0
- package/esm/components/QFileUpload/QFileUpload.vue.js +238 -0
- package/esm/components/QFileUpload/QFileUpload.vue2.js +4 -0
- package/esm/components/QFileUpload/index.d.ts +52 -0
- package/esm/components/QFileUpload/index.d.ts.map +1 -0
- package/esm/components/QFileUpload/index.js +6 -0
- package/esm/components/QFileUpload/types.d.ts +69 -0
- package/esm/components/QFileUpload/types.d.ts.map +1 -0
- package/esm/components/QFileUpload/types.js +28 -0
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +64 -64
- package/esm/components/QTextField/QTextField.d.ts +3 -0
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +51 -39
- package/esm/components/QTextField/index.d.ts +7 -0
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/types.d.ts +11 -0
- package/esm/components/QTextField/types.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +50 -29
- package/esm/components/index.d.ts +3 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +62 -56
- package/esm/composables/maska.d.ts +28 -0
- package/esm/composables/maska.d.ts.map +1 -0
- package/esm/composables/maska.js +26 -0
- package/esm/composables/useDropZone/index.d.ts +38 -0
- package/esm/composables/useDropZone/index.d.ts.map +1 -0
- package/esm/composables/useDropZone/index.js +62 -0
- package/esm/index.d.ts +3 -0
- package/esm/utils/color.js +57 -27
- package/esm/utils/date/date.d.ts +9 -0
- package/esm/utils/date/date.d.ts.map +1 -0
- package/esm/utils/date/date.js +91 -0
- package/esm/utils/date/index.d.ts +4 -0
- package/esm/utils/date/index.d.ts.map +1 -0
- package/esm/utils/date/tokens.d.ts +49 -0
- package/esm/utils/date/tokens.d.ts.map +1 -0
- package/esm/utils/date/tokens.js +243 -0
- package/esm/utils/download.d.ts +7 -0
- package/esm/utils/download.d.ts.map +1 -0
- package/esm/utils/download.js +16 -0
- package/esm/utils/string.d.ts.map +1 -1
- package/esm/utils/string.js +5 -2
- package/esm/utils/time.d.ts +36 -0
- package/esm/utils/time.d.ts.map +1 -0
- package/esm/utils/time.js +14 -0
- package/esm/vendors/@vuepic/vue-datepicker/dist/vue-datepicker.js +5148 -0
- package/esm/vendors/date-fns/_lib/addLeadingZeros.js +7 -0
- package/esm/vendors/date-fns/_lib/defaultOptions.js +7 -0
- package/esm/vendors/date-fns/_lib/format/formatters.js +583 -0
- package/esm/vendors/date-fns/_lib/format/lightFormatters.js +59 -0
- package/esm/vendors/date-fns/_lib/format/longFormatters.js +52 -0
- package/esm/vendors/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/esm/vendors/date-fns/_lib/normalizeDates.js +11 -0
- package/esm/vendors/date-fns/_lib/normalizeInterval.js +8 -0
- package/esm/vendors/date-fns/_lib/protectedTokens.js +20 -0
- package/esm/vendors/date-fns/add.js +20 -0
- package/esm/vendors/date-fns/addDays.js +10 -0
- package/esm/vendors/date-fns/addHours.js +9 -0
- package/esm/vendors/date-fns/addMilliseconds.js +9 -0
- package/esm/vendors/date-fns/addMonths.js +20 -0
- package/esm/vendors/date-fns/addQuarters.js +8 -0
- package/esm/vendors/date-fns/addYears.js +8 -0
- package/esm/vendors/date-fns/compareAsc.js +9 -0
- package/esm/vendors/date-fns/constants.js +9 -0
- package/esm/vendors/date-fns/constructFrom.js +8 -0
- package/esm/vendors/date-fns/differenceInCalendarDays.js +16 -0
- package/esm/vendors/date-fns/differenceInCalendarYears.js +13 -0
- package/esm/vendors/date-fns/differenceInYears.js +17 -0
- package/esm/vendors/date-fns/eachDayOfInterval.js +17 -0
- package/esm/vendors/date-fns/eachQuarterOfInterval.js +18 -0
- package/esm/vendors/date-fns/endOfQuarter.js +9 -0
- package/esm/vendors/date-fns/endOfWeek.js +11 -0
- package/esm/vendors/date-fns/endOfYear.js +9 -0
- package/esm/vendors/date-fns/format.js +59 -0
- package/esm/vendors/date-fns/getDay.js +8 -0
- package/esm/vendors/date-fns/getDayOfYear.js +11 -0
- package/esm/vendors/date-fns/getDaysInMonth.js +10 -0
- package/esm/vendors/date-fns/getDefaultOptions.js +8 -0
- package/esm/vendors/date-fns/getHours.js +8 -0
- package/esm/vendors/date-fns/getISODay.js +9 -0
- package/esm/vendors/date-fns/getISOWeek.js +12 -0
- package/esm/vendors/date-fns/getISOWeekYear.js +15 -0
- package/esm/vendors/date-fns/getMinutes.js +8 -0
- package/esm/vendors/date-fns/getMonth.js +8 -0
- package/esm/vendors/date-fns/getQuarter.js +9 -0
- package/esm/vendors/date-fns/getSeconds.js +8 -0
- package/esm/vendors/date-fns/getWeek.js +12 -0
- package/esm/vendors/date-fns/getWeekYear.js +17 -0
- package/esm/vendors/date-fns/getYear.js +8 -0
- package/esm/vendors/date-fns/isAfter.js +8 -0
- package/esm/vendors/date-fns/isBefore.js +8 -0
- package/esm/vendors/date-fns/isDate.js +7 -0
- package/esm/vendors/date-fns/isEqual.js +8 -0
- package/esm/vendors/date-fns/isSameQuarter.js +14 -0
- package/esm/vendors/date-fns/isValid.js +9 -0
- package/esm/vendors/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/esm/vendors/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/esm/vendors/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/esm/vendors/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/match.js +110 -0
- package/esm/vendors/date-fns/locale/en-US.js +21 -0
- package/esm/vendors/date-fns/parse/_lib/Parser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/Setter.js +41 -0
- package/esm/vendors/date-fns/parse/_lib/constants.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/AMPMParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DateParser.js +61 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DayOfYearParser.js +51 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DayParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DayPeriodParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/EraParser.js +33 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ExtendedYearParser.js +21 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour0To11Parser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour0to23Parser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour1To24Parser.js +33 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour1to12Parser.js +33 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISODayParser.js +105 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +48 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +48 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +40 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalDayParser.js +80 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekParser.js +48 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +69 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/MinuteParser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/MonthParser.js +77 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/QuarterParser.js +75 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/SecondParser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +80 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +77 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +75 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/YearParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers.js +67 -0
- package/esm/vendors/date-fns/parse/_lib/utils.js +103 -0
- package/esm/vendors/date-fns/parse.js +89 -0
- package/esm/vendors/date-fns/set.js +11 -0
- package/esm/vendors/date-fns/setDay.js +12 -0
- package/esm/vendors/date-fns/setHours.js +9 -0
- package/esm/vendors/date-fns/setISODay.js +11 -0
- package/esm/vendors/date-fns/setISOWeek.js +10 -0
- package/esm/vendors/date-fns/setMilliseconds.js +9 -0
- package/esm/vendors/date-fns/setMinutes.js +9 -0
- package/esm/vendors/date-fns/setMonth.js +13 -0
- package/esm/vendors/date-fns/setSeconds.js +9 -0
- package/esm/vendors/date-fns/setWeek.js +10 -0
- package/esm/vendors/date-fns/setYear.js +10 -0
- package/esm/vendors/date-fns/startOfDay.js +9 -0
- package/esm/vendors/date-fns/startOfISOWeek.js +8 -0
- package/esm/vendors/date-fns/startOfISOWeekYear.js +11 -0
- package/esm/vendors/date-fns/startOfMonth.js +9 -0
- package/esm/vendors/date-fns/startOfQuarter.js +9 -0
- package/esm/vendors/date-fns/startOfWeek.js +11 -0
- package/esm/vendors/date-fns/startOfWeekYear.js +13 -0
- package/esm/vendors/date-fns/startOfYear.js +9 -0
- package/esm/vendors/date-fns/sub.js +19 -0
- package/esm/vendors/date-fns/subDays.js +8 -0
- package/esm/vendors/date-fns/subMonths.js +8 -0
- package/esm/vendors/date-fns/subYears.js +8 -0
- package/esm/vendors/date-fns/toDate.js +8 -0
- package/esm/vendors/date-fns/transpose.js +18 -0
- package/esm/vendors/maska/dist/maska.js +179 -0
- package/package.json +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ne, mergeModels as
|
|
1
|
+
import { defineComponent as ne, mergeModels as V, useModel as oe, computed as l, reactive as A, watch as k, ref as U, nextTick as v, onMounted as re, onBeforeUnmount as ie, createElementBlock as E, openBlock as u, Fragment as ae, createBlock as B, createCommentVNode as g, Teleport as le, createVNode as se, normalizeClass as z, Transition as de, withCtx as I, unref as b, createElementVNode as P, normalizeStyle as N, mergeProps as ue, withKeys as ce, renderSlot as fe } from "vue";
|
|
2
2
|
import { QRemoveScrollBar as me } from "../QRemoveScrollBar/index.js";
|
|
3
3
|
import { QThemeProvider as ve } from "../QThemeProvider/index.js";
|
|
4
4
|
import { getSideFromPlacement as pe, computePosition as he } from "../../composables/overlay.js";
|
|
@@ -7,7 +7,7 @@ import { getElement as we } from "../../utils/getElement.js";
|
|
|
7
7
|
const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "QOverlay",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ V({
|
|
11
11
|
anchor: {},
|
|
12
12
|
appearance: { default: "regular" },
|
|
13
13
|
arrow: { type: Boolean },
|
|
@@ -31,9 +31,9 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
31
31
|
modelValue: { type: Boolean },
|
|
32
32
|
modelModifiers: {}
|
|
33
33
|
}),
|
|
34
|
-
emits: /* @__PURE__ */
|
|
35
|
-
setup(
|
|
36
|
-
const t =
|
|
34
|
+
emits: /* @__PURE__ */ V(["enter", "leave"], ["update:modelValue"]),
|
|
35
|
+
setup(_, { emit: Q }) {
|
|
36
|
+
const t = _, T = Q, r = oe(_, "modelValue"), D = ye(), F = l(() => [
|
|
37
37
|
"q-overlay",
|
|
38
38
|
`q-overlay--${pe(n.placement)}`,
|
|
39
39
|
{
|
|
@@ -41,13 +41,13 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
41
41
|
"q-overlay--inverted": t.appearance === "inverted"
|
|
42
42
|
},
|
|
43
43
|
t.class
|
|
44
|
-
]), c = l(() => t.anchor === void 0),
|
|
44
|
+
]), c = l(() => t.anchor === void 0), C = l(() => (r.value || n.animating) && !t.nonModal), K = l(() => (r.value || n.animating) && t.scrollLock), n = A({
|
|
45
45
|
animating: !1,
|
|
46
46
|
top: 0,
|
|
47
47
|
left: 0,
|
|
48
48
|
width: 0,
|
|
49
49
|
placement: t.placement
|
|
50
|
-
}), i =
|
|
50
|
+
}), i = A({
|
|
51
51
|
top: void 0,
|
|
52
52
|
left: void 0,
|
|
53
53
|
hidden: !0
|
|
@@ -68,7 +68,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
68
68
|
left: i.left !== void 0 ? `${i.left}px` : void 0,
|
|
69
69
|
opacity: i.hidden ? 0 : 1
|
|
70
70
|
};
|
|
71
|
-
}), p =
|
|
71
|
+
}), p = U(null), h = U(null);
|
|
72
72
|
function a() {
|
|
73
73
|
const e = d();
|
|
74
74
|
if (!e || !h.value)
|
|
@@ -93,32 +93,32 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
93
93
|
);
|
|
94
94
|
let f;
|
|
95
95
|
function y() {
|
|
96
|
-
|
|
96
|
+
S(0);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function x() {
|
|
99
|
+
S(t.delay);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
f &&
|
|
101
|
+
function S(e) {
|
|
102
|
+
f && q(), f = window.setTimeout(() => {
|
|
103
103
|
r.value = !0;
|
|
104
104
|
}, e);
|
|
105
105
|
}
|
|
106
106
|
function s() {
|
|
107
|
-
if (f &&
|
|
107
|
+
if (f && q(), r.value = !1, t.anchor && t.trigger === "click") {
|
|
108
108
|
const e = d();
|
|
109
109
|
e == null || e.focus();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function q() {
|
|
113
113
|
clearTimeout(f), f = void 0;
|
|
114
114
|
}
|
|
115
115
|
k(W, () => v(H));
|
|
116
116
|
function H() {
|
|
117
|
-
|
|
117
|
+
T("enter");
|
|
118
118
|
}
|
|
119
|
-
let
|
|
119
|
+
let $;
|
|
120
120
|
function J() {
|
|
121
|
-
window.clearTimeout(
|
|
121
|
+
window.clearTimeout($), $ = window.setTimeout(() => n.animating = !1, 200), T("leave");
|
|
122
122
|
}
|
|
123
123
|
function d() {
|
|
124
124
|
return t.anchor ? we(t.anchor) : null;
|
|
@@ -137,7 +137,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
137
137
|
e.addEventListener("click", y);
|
|
138
138
|
break;
|
|
139
139
|
case "hover":
|
|
140
|
-
e.addEventListener("mouseenter",
|
|
140
|
+
e.addEventListener("mouseenter", x), e.addEventListener("mouseleave", s), e.addEventListener("focusin", y), e.addEventListener("focusout", s);
|
|
141
141
|
break;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -149,7 +149,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
149
149
|
e.removeEventListener("click", y);
|
|
150
150
|
break;
|
|
151
151
|
case "hover":
|
|
152
|
-
e.removeEventListener("mouseenter",
|
|
152
|
+
e.removeEventListener("mouseenter", x), e.removeEventListener("mouseleave", s), e.removeEventListener("focusin", y), e.removeEventListener("focusout", s);
|
|
153
153
|
break;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
@@ -159,83 +159,83 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
159
159
|
function ee() {
|
|
160
160
|
window.removeEventListener("resize", a), t.scrollLock || window.removeEventListener("scroll", a);
|
|
161
161
|
}
|
|
162
|
-
let
|
|
163
|
-
function
|
|
164
|
-
d() ? (a(),
|
|
162
|
+
let L;
|
|
163
|
+
function M() {
|
|
164
|
+
d() ? (a(), L = window.setTimeout(M, 100)) : s();
|
|
165
165
|
}
|
|
166
166
|
function te() {
|
|
167
|
-
c.value || (Z(), t.spy ?
|
|
167
|
+
c.value || (Z(), t.spy ? M() : a()), (c.value || t.trigger === "click") && v(() => {
|
|
168
168
|
var e;
|
|
169
169
|
return (e = h.value) == null ? void 0 : e.focus();
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
function M() {
|
|
173
|
-
c.value || ee(), t.spy && (clearTimeout(E), E = void 0), n.top = 0, n.left = 0;
|
|
174
|
-
}
|
|
175
172
|
function R() {
|
|
173
|
+
c.value || ee(), t.spy && (clearTimeout(L), L = void 0), n.top = 0, n.left = 0;
|
|
174
|
+
}
|
|
175
|
+
function O() {
|
|
176
176
|
t.persistent || s();
|
|
177
177
|
}
|
|
178
178
|
return re(() => {
|
|
179
179
|
v(X);
|
|
180
180
|
}), ie(() => {
|
|
181
|
-
Y(),
|
|
181
|
+
Y(), R();
|
|
182
182
|
}), k(
|
|
183
183
|
r,
|
|
184
184
|
(e) => {
|
|
185
|
-
v(() => e ? te() :
|
|
185
|
+
v(() => e ? te() : R());
|
|
186
186
|
},
|
|
187
187
|
{ immediate: !0 }
|
|
188
|
-
), (e, w) => (u(),
|
|
188
|
+
), (e, w) => (u(), E(
|
|
189
189
|
ae,
|
|
190
190
|
null,
|
|
191
191
|
[
|
|
192
|
-
(u(),
|
|
192
|
+
(u(), B(le, {
|
|
193
193
|
disabled: !r.value && !n.animating || t.inline,
|
|
194
194
|
to: t.attach
|
|
195
195
|
}, [
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
C.value ? (u(), E(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
key: 0,
|
|
200
|
+
class: z([
|
|
201
|
+
t.backdropClass,
|
|
202
|
+
"q-overlay__underlay",
|
|
203
|
+
{ "q-overlay__underlay--blur": t.backdropBlur }
|
|
204
|
+
])
|
|
205
|
+
},
|
|
206
|
+
null,
|
|
207
|
+
2
|
|
208
|
+
/* CLASS */
|
|
209
|
+
)) : g("v-if", !0),
|
|
210
|
+
se(de, {
|
|
211
|
+
name: t.transition,
|
|
212
|
+
appear: "",
|
|
213
|
+
onLeave: J
|
|
198
214
|
}, {
|
|
199
215
|
default: I(() => [
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
key: 0,
|
|
204
|
-
class: P([
|
|
205
|
-
t.backdropClass,
|
|
206
|
-
"q-overlay__underlay",
|
|
207
|
-
{ "q-overlay__underlay--blur": t.backdropBlur }
|
|
208
|
-
])
|
|
209
|
-
},
|
|
210
|
-
null,
|
|
211
|
-
2
|
|
212
|
-
/* CLASS */
|
|
213
|
-
)) : L("v-if", !0),
|
|
214
|
-
z(se, {
|
|
215
|
-
name: t.transition,
|
|
216
|
-
appear: "",
|
|
217
|
-
onLeave: J
|
|
216
|
+
r.value ? (u(), B(b(ve), {
|
|
217
|
+
key: 0,
|
|
218
|
+
theme: b(D).current.value.name
|
|
218
219
|
}, {
|
|
219
220
|
default: I(() => [
|
|
220
|
-
|
|
221
|
+
P(
|
|
221
222
|
"div",
|
|
222
223
|
{
|
|
223
|
-
|
|
224
|
-
class: P(F.value),
|
|
224
|
+
class: z(F.value),
|
|
225
225
|
style: N(j.value)
|
|
226
226
|
},
|
|
227
227
|
[
|
|
228
|
-
|
|
228
|
+
P("div", ue({
|
|
229
229
|
ref_key: "overlayRef",
|
|
230
230
|
ref: h,
|
|
231
231
|
class: "q-overlay__content",
|
|
232
232
|
tabindex: "-1",
|
|
233
|
-
role:
|
|
233
|
+
role: C.value ? "dialog" : void 0
|
|
234
234
|
}, e.$attrs, {
|
|
235
|
-
onKeydown: ce(
|
|
236
|
-
onBlur:
|
|
235
|
+
onKeydown: ce(O, ["escape"]),
|
|
236
|
+
onBlur: O
|
|
237
237
|
}), [
|
|
238
|
-
t.arrow ? (u(),
|
|
238
|
+
t.arrow ? (u(), E(
|
|
239
239
|
"div",
|
|
240
240
|
{
|
|
241
241
|
key: 0,
|
|
@@ -248,23 +248,23 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
248
248
|
null,
|
|
249
249
|
4
|
|
250
250
|
/* STYLE */
|
|
251
|
-
)) :
|
|
251
|
+
)) : g("v-if", !0),
|
|
252
252
|
fe(e.$slots, "default")
|
|
253
253
|
], 16, ke)
|
|
254
254
|
],
|
|
255
255
|
6
|
|
256
256
|
/* CLASS, STYLE */
|
|
257
|
-
)
|
|
257
|
+
)
|
|
258
258
|
]),
|
|
259
259
|
_: 3
|
|
260
260
|
/* FORWARDED */
|
|
261
|
-
}, 8, ["
|
|
261
|
+
}, 8, ["theme"])) : g("v-if", !0)
|
|
262
262
|
]),
|
|
263
263
|
_: 3
|
|
264
264
|
/* FORWARDED */
|
|
265
|
-
}, 8, ["
|
|
265
|
+
}, 8, ["name"])
|
|
266
266
|
], 8, ["disabled", "to"])),
|
|
267
|
-
K.value ? (u(),
|
|
267
|
+
K.value ? (u(), B(b(me), { key: 0 })) : g("v-if", !0)
|
|
268
268
|
],
|
|
269
269
|
64
|
|
270
270
|
/* STABLE_FRAGMENT */
|
|
@@ -91,8 +91,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
91
91
|
inputRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
92
92
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
93
93
|
"update:modelValue": (value: string) => any;
|
|
94
|
+
} & {
|
|
95
|
+
"click:clear": (event: Event) => any;
|
|
94
96
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
95
97
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
98
|
+
"onClick:clear"?: ((event: Event) => any) | undefined;
|
|
96
99
|
}>, {
|
|
97
100
|
type: string;
|
|
98
101
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAoDA;AAoHC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,KAAK,WAAW,GAAG,eAAe,CAAC;AAwDpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAqE2je,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;EAnDhte;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+Bske,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;OArB/se,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QField as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as C, mergeModels as c, useModel as g, ref as y, computed as o, createBlock as b, openBlock as h, unref as r, normalizeClass as R, createSlots as V, withCtx as a, withDirectives as z, createElementVNode as M, mergeProps as w, vModelDynamic as Q, renderSlot as d, createCommentVNode as D } from "vue";
|
|
2
|
+
import { QField as F } from "../QField/index.js";
|
|
3
|
+
import { QClearButton as L } from "../__internal__/QClearButton/index.js";
|
|
4
|
+
import { useId as N } from "../../composables/uid.js";
|
|
5
|
+
const S = ["id", "type", "role", "required", "placeholder", "readonly", "disabled", "maxlength"], P = /* @__PURE__ */ C({
|
|
5
6
|
inheritAttrs: !1,
|
|
6
7
|
__name: "QTextField",
|
|
7
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ c({
|
|
8
9
|
id: {},
|
|
9
10
|
placeholder: {},
|
|
10
11
|
label: {},
|
|
12
|
+
clearable: { type: Boolean },
|
|
11
13
|
size: {},
|
|
12
14
|
maxLength: {},
|
|
13
15
|
readonly: { type: Boolean },
|
|
@@ -15,55 +17,59 @@ const C = ["id", "type", "role", "required", "placeholder", "readonly", "disable
|
|
|
15
17
|
required: { type: Boolean },
|
|
16
18
|
role: {},
|
|
17
19
|
type: { default: "text" },
|
|
18
|
-
class: {}
|
|
20
|
+
class: {},
|
|
21
|
+
texts: {}
|
|
19
22
|
}, {
|
|
20
23
|
modelValue: {},
|
|
21
24
|
modelModifiers: {}
|
|
22
25
|
}),
|
|
23
|
-
emits: ["update:modelValue"],
|
|
24
|
-
setup(
|
|
25
|
-
const e =
|
|
26
|
+
emits: /* @__PURE__ */ c(["click:clear"], ["update:modelValue"]),
|
|
27
|
+
setup(n, { expose: v, emit: k }) {
|
|
28
|
+
const e = n, x = k, t = g(n, "modelValue"), s = N(e.id), i = y(null), p = y(null), q = o(
|
|
26
29
|
() => e.readonly || e.disabled ? void 0 : e.placeholder
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
), u = o(() => e.clearable && !e.readonly && !e.disabled), f = o(() => u.value && t.value);
|
|
31
|
+
function $(l) {
|
|
32
|
+
u.value && (t.value = "", x("click:clear", l));
|
|
33
|
+
}
|
|
34
|
+
return v({
|
|
35
|
+
fieldRef: o(() => {
|
|
30
36
|
var l;
|
|
31
|
-
return (l =
|
|
37
|
+
return (l = i.value) == null ? void 0 : l.fieldRef;
|
|
32
38
|
}),
|
|
33
|
-
inputRef:
|
|
34
|
-
}), (l,
|
|
39
|
+
inputRef: p
|
|
40
|
+
}), (l, m) => (h(), b(r(F), {
|
|
35
41
|
ref_key: "fieldRef",
|
|
36
|
-
ref:
|
|
37
|
-
class:
|
|
38
|
-
for:
|
|
42
|
+
ref: i,
|
|
43
|
+
class: R(["q-text-field", e.class]),
|
|
44
|
+
for: r(s),
|
|
39
45
|
label: e.label,
|
|
40
46
|
size: e.size,
|
|
41
47
|
readonly: e.readonly,
|
|
42
48
|
disabled: e.disabled,
|
|
43
49
|
required: e.required
|
|
44
|
-
},
|
|
45
|
-
"label.prepend":
|
|
46
|
-
|
|
50
|
+
}, V({
|
|
51
|
+
"label.prepend": a(() => [
|
|
52
|
+
d(l.$slots, "label.prepend")
|
|
47
53
|
]),
|
|
48
|
-
"label.append":
|
|
49
|
-
|
|
54
|
+
"label.append": a(() => [
|
|
55
|
+
d(l.$slots, "label.append")
|
|
50
56
|
]),
|
|
51
|
-
default:
|
|
52
|
-
|
|
53
|
-
id:
|
|
57
|
+
default: a(() => [
|
|
58
|
+
z(M("input", w({
|
|
59
|
+
id: r(s),
|
|
54
60
|
ref_key: "inputRef",
|
|
55
|
-
ref:
|
|
56
|
-
"onUpdate:modelValue":
|
|
61
|
+
ref: p,
|
|
62
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => t.value = B),
|
|
57
63
|
class: "q-text-field__input",
|
|
58
64
|
type: e.type,
|
|
59
65
|
role: e.role,
|
|
60
66
|
required: e.required,
|
|
61
|
-
placeholder:
|
|
67
|
+
placeholder: q.value,
|
|
62
68
|
readonly: e.readonly,
|
|
63
69
|
disabled: e.disabled,
|
|
64
70
|
maxlength: e.maxLength
|
|
65
|
-
}, l.$attrs), null, 16,
|
|
66
|
-
[
|
|
71
|
+
}, l.$attrs), null, 16, S), [
|
|
72
|
+
[Q, t.value]
|
|
67
73
|
])
|
|
68
74
|
]),
|
|
69
75
|
_: 2
|
|
@@ -71,22 +77,28 @@ const C = ["id", "type", "role", "required", "placeholder", "readonly", "disable
|
|
|
71
77
|
}, [
|
|
72
78
|
l.$slots.prepend ? {
|
|
73
79
|
name: "prepend",
|
|
74
|
-
fn:
|
|
75
|
-
|
|
80
|
+
fn: a(() => [
|
|
81
|
+
d(l.$slots, "prepend")
|
|
76
82
|
]),
|
|
77
83
|
key: "0"
|
|
78
84
|
} : void 0,
|
|
79
|
-
l.$slots.append ? {
|
|
85
|
+
l.$slots.append || f.value ? {
|
|
80
86
|
name: "append",
|
|
81
|
-
fn:
|
|
82
|
-
|
|
87
|
+
fn: a(() => [
|
|
88
|
+
d(l.$slots, "append"),
|
|
89
|
+
f.value ? (h(), b(r(L), {
|
|
90
|
+
key: 0,
|
|
91
|
+
"data-testid": "q-text-field__clear-button",
|
|
92
|
+
texts: e.texts,
|
|
93
|
+
onClick: $
|
|
94
|
+
}, null, 8, ["texts"])) : D("v-if", !0)
|
|
83
95
|
]),
|
|
84
96
|
key: "1"
|
|
85
97
|
} : void 0,
|
|
86
98
|
l.$slots.extras ? {
|
|
87
99
|
name: "extras",
|
|
88
|
-
fn:
|
|
89
|
-
|
|
100
|
+
fn: a(() => [
|
|
101
|
+
d(l.$slots, "extras")
|
|
90
102
|
]),
|
|
91
103
|
key: "2"
|
|
92
104
|
} : void 0
|
|
@@ -94,5 +106,5 @@ const C = ["id", "type", "role", "required", "placeholder", "readonly", "disable
|
|
|
94
106
|
}
|
|
95
107
|
});
|
|
96
108
|
export {
|
|
97
|
-
|
|
109
|
+
P as default
|
|
98
110
|
};
|
|
@@ -3,11 +3,14 @@ declare const QTextField: {
|
|
|
3
3
|
modelValue?: string;
|
|
4
4
|
} & import('./types').QTextFieldProps> & Readonly<{
|
|
5
5
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
6
|
+
"onClick:clear"?: ((event: Event) => any) | undefined;
|
|
6
7
|
}>, {
|
|
7
8
|
fieldRef: import('vue').ComputedRef<HTMLElement | null | undefined>;
|
|
8
9
|
inputRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
9
10
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
11
|
"update:modelValue": (value: string) => any;
|
|
12
|
+
} & {
|
|
13
|
+
"click:clear": (event: Event) => any;
|
|
11
14
|
}, import('vue').PublicProps, {
|
|
12
15
|
type: string;
|
|
13
16
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
@@ -91,6 +94,7 @@ declare const QTextField: {
|
|
|
91
94
|
modelValue?: string;
|
|
92
95
|
} & import('./types').QTextFieldProps> & Readonly<{
|
|
93
96
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
97
|
+
"onClick:clear"?: ((event: Event) => any) | undefined;
|
|
94
98
|
}>, {
|
|
95
99
|
fieldRef: import('vue').ComputedRef<HTMLElement | null | undefined>;
|
|
96
100
|
inputRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
@@ -104,11 +108,14 @@ declare const QTextField: {
|
|
|
104
108
|
modelValue?: string;
|
|
105
109
|
} & import('./types').QTextFieldProps> & Readonly<{
|
|
106
110
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
111
|
+
"onClick:clear"?: ((event: Event) => any) | undefined;
|
|
107
112
|
}>, {
|
|
108
113
|
fieldRef: import('vue').ComputedRef<HTMLElement | null | undefined>;
|
|
109
114
|
inputRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
110
115
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
111
116
|
"update:modelValue": (value: string) => any;
|
|
117
|
+
} & {
|
|
118
|
+
"click:clear": (event: Event) => any;
|
|
112
119
|
}, string, {
|
|
113
120
|
type: string;
|
|
114
121
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAIyvzB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAJh1zB,CAAA;AAG/C,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -12,6 +12,10 @@ export type QTextFieldProps = {
|
|
|
12
12
|
* The label of the input.
|
|
13
13
|
*/
|
|
14
14
|
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the value of the field can be cleared.
|
|
17
|
+
*/
|
|
18
|
+
clearable?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* The size of the text field.
|
|
17
21
|
*/
|
|
@@ -46,5 +50,12 @@ export type QTextFieldProps = {
|
|
|
46
50
|
* Custom set of classes to apply to the component.
|
|
47
51
|
*/
|
|
48
52
|
class?: string | unknown[];
|
|
53
|
+
/**
|
|
54
|
+
* Custom text configurations.
|
|
55
|
+
*/
|
|
56
|
+
texts?: typeof DEFAULT_TEXTS;
|
|
57
|
+
};
|
|
58
|
+
export declare const DEFAULT_TEXTS: {
|
|
59
|
+
clearValue: string;
|
|
49
60
|
};
|
|
50
61
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,aAAa;;CAEQ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAkCA;
|
|
1
|
+
{"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAkCA;AAyHC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA6ElC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkFT,OAAO,IAA6B;;;;;;YAXtB,GAAG;yBACF,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useId as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as g, mergeModels as V, useModel as v, onMounted as B, onUnmounted as k, watch as M, createElementBlock as l, openBlock as a, Fragment as m, renderSlot as u, createVNode as w, unref as r, normalizeClass as x, withCtx as C, createBlock as T, createCommentVNode as A, normalizeProps as D, mergeProps as N, createTextVNode as Q, toDisplayString as _ } from "vue";
|
|
2
|
+
import { QIcon as z } from "../QIcon/index.js";
|
|
3
|
+
import { QOverlay as H } from "../QOverlay/index.js";
|
|
4
|
+
import { useId as I } from "../../composables/uid.js";
|
|
5
|
+
import { getElement as p } from "../../utils/getElement.js";
|
|
6
|
+
const L = ["innerHTML"], F = /* @__PURE__ */ g({
|
|
6
7
|
__name: "QTooltip",
|
|
7
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ V({
|
|
8
9
|
id: {},
|
|
9
10
|
anchor: {},
|
|
10
11
|
appearance: { default: "inverted" },
|
|
@@ -24,18 +25,38 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
24
25
|
modelModifiers: {}
|
|
25
26
|
}),
|
|
26
27
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
const e =
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
setup(i) {
|
|
29
|
+
const e = i, d = v(i, "modelValue"), n = I(e.id);
|
|
30
|
+
function c(o) {
|
|
31
|
+
const t = p(o);
|
|
32
|
+
t == null || t.setAttribute("aria-describedby", n);
|
|
33
|
+
}
|
|
34
|
+
function f() {
|
|
35
|
+
e.anchor && c(e.anchor);
|
|
36
|
+
}
|
|
37
|
+
B(f);
|
|
38
|
+
function s(o) {
|
|
39
|
+
const t = p(o);
|
|
40
|
+
t == null || t.removeAttribute("aria-describedby");
|
|
41
|
+
}
|
|
42
|
+
function y() {
|
|
43
|
+
e.anchor && s(e.anchor);
|
|
44
|
+
}
|
|
45
|
+
k(y);
|
|
46
|
+
function h(o, t) {
|
|
47
|
+
t && s(t), o && c(o);
|
|
48
|
+
}
|
|
49
|
+
return M(() => e.anchor, h), (o, t) => (a(), l(
|
|
50
|
+
m,
|
|
31
51
|
null,
|
|
32
52
|
[
|
|
33
|
-
|
|
34
|
-
props: { "aria-describedby":
|
|
53
|
+
u(o.$slots, "anchor", {
|
|
54
|
+
props: { "aria-describedby": r(n) }
|
|
35
55
|
}),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
56
|
+
w(r(H), {
|
|
57
|
+
modelValue: d.value,
|
|
58
|
+
"onUpdate:modelValue": t[0] || (t[0] = (b) => d.value = b),
|
|
59
|
+
id: r(n),
|
|
39
60
|
anchor: e.anchor,
|
|
40
61
|
role: "tooltip",
|
|
41
62
|
"non-modal": "",
|
|
@@ -43,30 +64,30 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
43
64
|
arrow: e.arrow,
|
|
44
65
|
attach: e.attach,
|
|
45
66
|
inline: e.inline,
|
|
46
|
-
class:
|
|
67
|
+
class: x(["q-tooltip", e.class]),
|
|
47
68
|
delay: e.delay,
|
|
48
69
|
disabled: e.disabled,
|
|
49
70
|
placement: e.placement,
|
|
50
71
|
trigger: e.trigger
|
|
51
72
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
54
|
-
e.icon ? (a(),
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
default: C(() => [
|
|
74
|
+
u(o.$slots, "default", {}, () => [
|
|
75
|
+
e.icon ? (a(), T(
|
|
76
|
+
r(z),
|
|
77
|
+
D(N({ key: 0 }, e.icon)),
|
|
57
78
|
null,
|
|
58
79
|
16
|
|
59
80
|
/* FULL_PROPS */
|
|
60
|
-
)) :
|
|
61
|
-
e.html ? (a(),
|
|
81
|
+
)) : A("v-if", !0),
|
|
82
|
+
e.html ? (a(), l("span", {
|
|
62
83
|
key: 1,
|
|
63
84
|
innerHTML: e.text
|
|
64
|
-
}, null, 8,
|
|
65
|
-
|
|
85
|
+
}, null, 8, L)) : (a(), l(
|
|
86
|
+
m,
|
|
66
87
|
{ key: 2 },
|
|
67
88
|
[
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
Q(
|
|
90
|
+
_(e.text),
|
|
70
91
|
1
|
|
71
92
|
/* TEXT */
|
|
72
93
|
)
|
|
@@ -78,7 +99,7 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
78
99
|
]),
|
|
79
100
|
_: 3
|
|
80
101
|
/* FORWARDED */
|
|
81
|
-
}, 8, ["
|
|
102
|
+
}, 8, ["modelValue", "id", "anchor", "appearance", "arrow", "attach", "inline", "class", "delay", "disabled", "placement", "trigger"])
|
|
82
103
|
],
|
|
83
104
|
64
|
|
84
105
|
/* STABLE_FRAGMENT */
|
|
@@ -86,5 +107,5 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
86
107
|
}
|
|
87
108
|
});
|
|
88
109
|
export {
|
|
89
|
-
|
|
110
|
+
F as default
|
|
90
111
|
};
|