@quidgest/ui 0.20.1 → 0.21.1
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/CHANGELOG.md +28 -0
- package/README.md +10 -0
- package/dist/json/api.json +219 -3
- package/dist/manifest/components.json +1 -0
- package/dist/ui.css +239 -248
- package/dist/ui.esm.js +1306 -1139
- package/dist/ui.js +788 -621
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +788 -621
- package/dist/ui.scss +291 -34
- package/esm/components/QAccordion/QAccordionItem.vue.js +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +20 -24
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +32 -29
- package/esm/components/QCheckbox/QCheckbox.vue.js +1 -1
- package/esm/components/QDialog/QDialog.d.ts +4 -2
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +84 -74
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.vue.js +21 -12
- package/esm/components/QDialog/index.d.ts +72 -3
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +10 -1
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +9 -8
- package/esm/components/QDivider/QDivider.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.vue.js +3 -3
- package/esm/components/QFileUpload/QFileUpload.vue.js +1 -1
- package/esm/components/QGauge/QGauge.vue.js +1 -1
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +5 -2
- package/esm/components/QList/QListItemGroup.vue.js +1 -1
- package/esm/components/QObfuscation/QObfuscation.d.ts +1 -1
- package/esm/components/QObfuscation/QObfuscation.d.ts.map +1 -1
- package/esm/components/QObfuscation/QObfuscation.vue.js +53 -56
- package/esm/components/QObfuscation/index.d.ts +6 -6
- package/esm/components/QObfuscation/types.d.ts +1 -1
- package/esm/components/QObfuscation/types.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.d.ts +43 -0
- package/esm/components/QOverflow/QOverflow.d.ts.map +1 -0
- package/esm/components/QOverflow/QOverflow.vue.js +281 -0
- package/esm/components/QOverflow/QOverflow2.vue.js +5 -0
- package/esm/components/QOverflow/constants.d.ts +30 -0
- package/esm/components/QOverflow/constants.d.ts.map +1 -0
- package/esm/components/QOverflow/constants.js +12 -0
- package/esm/components/QOverflow/index.d.ts +58 -0
- package/esm/components/QOverflow/index.d.ts.map +1 -0
- package/esm/components/QOverflow/index.js +6 -0
- package/esm/components/QOverflow/types.d.ts +119 -0
- package/esm/components/QOverflow/types.d.ts.map +1 -0
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.vue.js +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +1 -1
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +2 -2
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +19 -10
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +51 -49
- package/esm/components/QSidebar/context.d.ts +7 -0
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.vue.js +1 -1
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +52 -50
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +37 -12
- package/esm/components/QTabs/context.d.ts +7 -0
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +1 -1
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +1 -1
- package/esm/components/QToast/QToast.d.ts +4 -2
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToast.vue.js +80 -67
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.vue.js +21 -16
- package/esm/components/QToast/index.d.ts +39 -3
- package/esm/components/QToast/index.d.ts.map +1 -1
- package/esm/components/QToast/types.d.ts +6 -2
- package/esm/components/QToast/types.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +58 -56
- package/esm/composables/index.d.ts +2 -2
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.d.ts +46 -17
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +57 -29
- package/esm/composables/useColor/types.d.ts +4 -1
- package/esm/composables/useColor/types.d.ts.map +1 -1
- package/esm/composables/useDialog/_internal.d.ts +2 -0
- package/esm/composables/useDialog/_internal.d.ts.map +1 -0
- package/esm/composables/useDialog/_internal.js +65 -0
- package/esm/composables/useDialog/index.d.ts +11 -3
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +38 -22
- package/esm/composables/useDialog/types.d.ts +25 -11
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.d.ts +17 -2
- package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.js +28 -11
- package/esm/composables/useGroup/index.d.ts.map +1 -1
- package/esm/composables/useGroup/index.js +12 -1
- package/esm/composables/useId/index.d.ts +18 -0
- package/esm/composables/useId/index.d.ts.map +1 -0
- package/esm/composables/useId/index.js +10 -0
- package/esm/composables/useToast/_internal.d.ts +2 -0
- package/esm/composables/useToast/_internal.d.ts.map +1 -0
- package/esm/composables/useToast/_internal.js +142 -0
- package/esm/composables/useToast/index.d.ts +8 -25
- package/esm/composables/useToast/index.d.ts.map +1 -1
- package/esm/composables/useToast/index.js +29 -26
- package/esm/composables/useToast/types.d.ts +31 -17
- package/esm/composables/useToast/types.d.ts.map +1 -1
- package/esm/framework.d.ts.map +1 -1
- package/esm/framework.js +16 -12
- package/esm/index.d.ts +1 -0
- package/esm/templates/theme.js +39 -39
- package/esm/utils/color/contrast.d.ts +11 -4
- package/esm/utils/color/contrast.d.ts.map +1 -1
- package/esm/utils/color/contrast.js +16 -3
- package/esm/utils/color/index.d.ts +1 -0
- package/esm/utils/color/index.d.ts.map +1 -1
- package/esm/utils/color/merge.d.ts +9 -0
- package/esm/utils/color/merge.d.ts.map +1 -1
- package/esm/utils/color/merge.js +21 -22
- package/esm/utils/color/parse.d.ts +21 -5
- package/esm/utils/color/parse.d.ts.map +1 -1
- package/esm/utils/color/parse.js +88 -20
- package/esm/utils/color/theme-colors.d.ts +35 -0
- package/esm/utils/color/theme-colors.d.ts.map +1 -0
- package/esm/utils/color/theme-colors.js +25 -0
- package/esm/utils/index.js +50 -42
- package/package.json +3 -5
- package/esm/composables/uid.d.ts +0 -9
- package/esm/composables/uid.d.ts.map +0 -1
- package/esm/composables/uid.js +0 -8
- package/esm/composables/useToast/types.js +0 -4
- package/esm/vendors/uuid/dist/native.js +0 -3
- package/esm/vendors/uuid/dist/rng.js +0 -11
- package/esm/vendors/uuid/dist/stringify.js +0 -8
- package/esm/vendors/uuid/dist/v4.js +0 -20
|
@@ -2,15 +2,15 @@ import { useGroupItem as e } from "../../composables/useGroup/index.js";
|
|
|
2
2
|
import { DEFAULT_TEXTS as t } from "../__internal__/QRequiredIndicator/constants.js";
|
|
3
3
|
import { QButton as n } from "../QButton/index.js";
|
|
4
4
|
import { QRequiredIndicator as r } from "../__internal__/QRequiredIndicator/index.js";
|
|
5
|
-
import { useId as i } from "../../composables/
|
|
5
|
+
import { useId as i } from "../../composables/useId/index.js";
|
|
6
6
|
import { TabsSymbol as a } from "./context.js";
|
|
7
|
-
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T,
|
|
7
|
+
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T, watch as E, withCtx as D, withDirectives as O } from "vue";
|
|
8
8
|
//#region src/components/QTabs/QTab.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var k = { class: "q-tab__title" }, A = { class: "q-tab__title-text" }, j = [
|
|
10
10
|
"id",
|
|
11
11
|
"aria-labelledby",
|
|
12
12
|
"tabindex"
|
|
13
|
-
],
|
|
13
|
+
], M = /*@__PURE__*/ m({
|
|
14
14
|
__name: "QTab",
|
|
15
15
|
props: {
|
|
16
16
|
id: {},
|
|
@@ -22,77 +22,79 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
|
|
|
22
22
|
texts: { default: () => t }
|
|
23
23
|
},
|
|
24
24
|
setup(t) {
|
|
25
|
-
let m = t,
|
|
26
|
-
if (!
|
|
27
|
-
let
|
|
28
|
-
if (!
|
|
29
|
-
let
|
|
30
|
-
if (!
|
|
31
|
-
}),
|
|
25
|
+
let m = t, M = h(a, void 0);
|
|
26
|
+
if (!M) throw Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.");
|
|
27
|
+
let N = i(S(m, "value")), P = i(), F = i(), I = e(N);
|
|
28
|
+
if (!I) throw Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.");
|
|
29
|
+
let L = w("tabBtn"), R = c(() => M.tabListEl.value), z = c(() => !!m.disabled), B = c(() => {
|
|
30
|
+
if (!z.value) return I.isActive.value ? 0 : -1;
|
|
31
|
+
}), V = c(() => [
|
|
32
32
|
"q-tab",
|
|
33
33
|
{
|
|
34
|
-
"q-tab--active":
|
|
35
|
-
"q-tab--disabled":
|
|
34
|
+
"q-tab--active": I.isActive.value,
|
|
35
|
+
"q-tab--disabled": z.value
|
|
36
36
|
},
|
|
37
37
|
m.class
|
|
38
38
|
]);
|
|
39
|
-
function V() {
|
|
40
|
-
(I.value?.$el)?.focus?.();
|
|
41
|
-
}
|
|
42
39
|
function H() {
|
|
43
|
-
|
|
40
|
+
(L.value?.$el)?.focus?.();
|
|
44
41
|
}
|
|
45
42
|
function U() {
|
|
46
|
-
|
|
43
|
+
z.value || I?.isActive.value || I?.toggle();
|
|
44
|
+
}
|
|
45
|
+
function W() {
|
|
46
|
+
U();
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let t =
|
|
48
|
+
function G(e) {
|
|
49
|
+
let t = M?.direction.value === "horizontal";
|
|
50
50
|
if (t && e.key === "ArrowRight" || !t && e.key === "ArrowDown") {
|
|
51
|
-
e.preventDefault(),
|
|
51
|
+
e.preventDefault(), M?.focusAdjacent(N.value, 1);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
if (t && e.key === "ArrowLeft" || !t && e.key === "ArrowUp") {
|
|
55
|
-
e.preventDefault(),
|
|
55
|
+
e.preventDefault(), M?.focusAdjacent(N.value, -1);
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
if (e.key === "Home") {
|
|
59
|
-
e.preventDefault(),
|
|
59
|
+
e.preventDefault(), M?.focusFirst();
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
e.key === "End" && (e.preventDefault(),
|
|
62
|
+
e.key === "End" && (e.preventDefault(), M?.focusLast());
|
|
63
63
|
}
|
|
64
64
|
return _(() => {
|
|
65
|
-
|
|
66
|
-
value:
|
|
67
|
-
disabled:
|
|
68
|
-
tabRef:
|
|
69
|
-
focus:
|
|
70
|
-
select:
|
|
65
|
+
M.register({
|
|
66
|
+
value: N.value,
|
|
67
|
+
disabled: z,
|
|
68
|
+
tabRef: L,
|
|
69
|
+
focus: H,
|
|
70
|
+
select: U
|
|
71
71
|
});
|
|
72
|
+
}), E(N, (e, t) => {
|
|
73
|
+
e !== t && M.updateValue(t, e);
|
|
72
74
|
}), v(() => {
|
|
73
|
-
|
|
74
|
-
}), (e, t) => (y(), d(o, null, [
|
|
75
|
+
M.unregister(N.value);
|
|
76
|
+
}), (e, t) => (y(), d(o, null, [R.value ? (y(), l(s, {
|
|
75
77
|
key: 0,
|
|
76
|
-
to:
|
|
78
|
+
to: R.value
|
|
77
79
|
}, [p(C(n), {
|
|
78
|
-
id: C(
|
|
80
|
+
id: C(P),
|
|
79
81
|
ref: "tabBtn",
|
|
80
82
|
borderless: "",
|
|
81
83
|
role: "tab",
|
|
82
84
|
variant: "text",
|
|
83
|
-
class: g(
|
|
84
|
-
disabled:
|
|
85
|
-
"data-value": C(
|
|
86
|
-
"aria-selected": C(
|
|
87
|
-
"aria-controls": C(
|
|
85
|
+
class: g(V.value),
|
|
86
|
+
disabled: z.value,
|
|
87
|
+
"data-value": C(N),
|
|
88
|
+
"aria-selected": C(I).isActive.value,
|
|
89
|
+
"aria-controls": C(F),
|
|
88
90
|
"aria-required": m.required || void 0,
|
|
89
|
-
tabindex:
|
|
90
|
-
onClick:
|
|
91
|
-
onKeydown:
|
|
91
|
+
tabindex: B.value,
|
|
92
|
+
onClick: W,
|
|
93
|
+
onKeydown: G
|
|
92
94
|
}, {
|
|
93
|
-
default:
|
|
95
|
+
default: D(() => [f("span", k, [
|
|
94
96
|
b(e.$slots, "title.prepend"),
|
|
95
|
-
b(e.$slots, "title", {}, () => [f("span",
|
|
97
|
+
b(e.$slots, "title", {}, () => [f("span", A, x(m.title), 1)]),
|
|
96
98
|
m.required ? (y(), l(C(r), {
|
|
97
99
|
key: 0,
|
|
98
100
|
announce: "",
|
|
@@ -110,14 +112,14 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
|
|
|
110
112
|
"aria-controls",
|
|
111
113
|
"aria-required",
|
|
112
114
|
"tabindex"
|
|
113
|
-
])], 8, ["to"])) : u("v-if", !0),
|
|
114
|
-
id: C(
|
|
115
|
+
])], 8, ["to"])) : u("v-if", !0), O(f("div", {
|
|
116
|
+
id: C(F),
|
|
115
117
|
class: "q-tabs__panel",
|
|
116
118
|
role: "tabpanel",
|
|
117
|
-
"aria-labelledby": C(
|
|
118
|
-
tabindex: C(
|
|
119
|
-
}, [b(e.$slots, "default")], 8,
|
|
119
|
+
"aria-labelledby": C(P),
|
|
120
|
+
tabindex: C(I).isActive.value ? 0 : void 0
|
|
121
|
+
}, [b(e.$slots, "default")], 8, j), [[T, C(I).isActive.value]])], 64));
|
|
120
122
|
}
|
|
121
123
|
});
|
|
122
124
|
//#endregion
|
|
123
|
-
export {
|
|
125
|
+
export { M as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;
|
|
1
|
+
{"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;AA2YC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAiBzC,KAAK,WAAW,GAAG,UAAU,CAAC;AA4V/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;;;EAiB/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;kBAUnB,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"}
|
|
@@ -105,27 +105,51 @@ var C = ["id"], w = {
|
|
|
105
105
|
let e = B();
|
|
106
106
|
e.length && (e.some((e) => e.value === D.value) || (D.value = e[0].value));
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
let H;
|
|
109
|
+
function U() {
|
|
110
|
+
H ||= l(() => {
|
|
111
|
+
H = void 0, V();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function W(e) {
|
|
115
|
+
if (A.value = [...A.value, e], !D.value) {
|
|
116
|
+
V();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
U();
|
|
110
120
|
}
|
|
111
|
-
function
|
|
121
|
+
function G(e) {
|
|
112
122
|
A.value = A.value.filter((t) => t.value !== e);
|
|
113
123
|
}
|
|
114
|
-
function
|
|
124
|
+
function K(e, t) {
|
|
125
|
+
if (e === t) return;
|
|
126
|
+
let n = A.value.findIndex((t) => t.value === e);
|
|
127
|
+
if (n !== -1) {
|
|
128
|
+
if (A.value = A.value.map((e, r) => r === n ? {
|
|
129
|
+
...e,
|
|
130
|
+
value: t
|
|
131
|
+
} : e), D.value === e || D.value === t) {
|
|
132
|
+
D.value = t;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
V();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function q(e, t) {
|
|
115
139
|
let n = B();
|
|
116
140
|
if (!n.length) return;
|
|
117
141
|
let r = n.findIndex((t) => t.value === e), i = n[r === -1 ? 0 : (r + t + n.length) % n.length];
|
|
118
142
|
i.select(), i.focus();
|
|
119
143
|
}
|
|
120
|
-
function
|
|
144
|
+
function J() {
|
|
121
145
|
let e = B()[0];
|
|
122
146
|
e && (e.select(), e.focus());
|
|
123
147
|
}
|
|
124
|
-
function
|
|
148
|
+
function Y() {
|
|
125
149
|
let e = B(), t = e[e.length - 1];
|
|
126
150
|
t && (t.select(), t.focus());
|
|
127
151
|
}
|
|
128
|
-
return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () =>
|
|
152
|
+
return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () => U()), S(() => [
|
|
129
153
|
D.value,
|
|
130
154
|
A.value.length,
|
|
131
155
|
c.direction,
|
|
@@ -136,11 +160,12 @@ var C = ["id"], w = {
|
|
|
136
160
|
}), m(n, {
|
|
137
161
|
tabListEl: k,
|
|
138
162
|
direction: r(() => c.direction),
|
|
139
|
-
register:
|
|
140
|
-
unregister:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
163
|
+
register: W,
|
|
164
|
+
unregister: G,
|
|
165
|
+
updateValue: K,
|
|
166
|
+
focusAdjacent: q,
|
|
167
|
+
focusFirst: J,
|
|
168
|
+
focusLast: Y
|
|
144
169
|
}), (e, t) => (p(), a("div", {
|
|
145
170
|
id: c.id,
|
|
146
171
|
class: u(F.value)
|
|
@@ -62,6 +62,13 @@ export type TabsContext = {
|
|
|
62
62
|
* @param value - The tab `value` to remove.
|
|
63
63
|
*/
|
|
64
64
|
unregister: (value: string) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Updates a registered tab's value in place so keyboard order is preserved.
|
|
67
|
+
*
|
|
68
|
+
* @param oldValue - The previously registered tab value.
|
|
69
|
+
* @param newValue - The updated tab value.
|
|
70
|
+
*/
|
|
71
|
+
updateValue: (oldValue: string, newValue: string) => void;
|
|
65
72
|
/**
|
|
66
73
|
* Activates and focuses the next or previous enabled tab relative to `currentValue`.
|
|
67
74
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,WAAW,GAAG,IAAI,CAAC,CAAA;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAElC;;;;OAIG;IACH,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAEtC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;IAExC;;;;OAIG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5D;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAA;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,WAAW,CAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,WAAW,GAAG,IAAI,CAAC,CAAA;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAElC;;;;OAIG;IACH,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAEtC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;IAExC;;;;OAIG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAEzD;;;;;OAKG;IACH,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5D;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAA;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,WAAW,CAAoB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useId as e } from "../../composables/
|
|
1
|
+
import { useId as e } from "../../composables/useId/index.js";
|
|
2
2
|
import { QField as t } from "../QField/index.js";
|
|
3
3
|
import { useTextareaAutosize as n } from "../../composables/useTextareaAutosize/index.js";
|
|
4
4
|
import { computed as r, createBlock as i, createElementVNode as a, createSlots as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderSlot as m, toHandlers as h, toRef as g, unref as _, useModel as v, vModelText as y, watch as b, withCtx as x, withDirectives as S } from "vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAqDA;AAsIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAA;AAKxC,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAqDA;AAsIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAA;AAKxC,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmE81d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;EAjDn/d;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+By2d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;OArBl/d,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,4 +1,4 @@
|
|
|
1
|
-
import { useId as e } from "../../composables/
|
|
1
|
+
import { useId as e } from "../../composables/useId/index.js";
|
|
2
2
|
import { QField as t } from "../QField/index.js";
|
|
3
3
|
import { QClearButton as n } from "../__internal__/QClearButton/index.js";
|
|
4
4
|
import { computed as r, createBlock as i, createCommentVNode as a, createElementVNode as o, createSlots as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, renderSlot as p, toRef as m, unref as h, useModel as g, useTemplateRef as _, vModelDynamic as v, watch as y, withCtx as b, withDirectives as x } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { provideTheme as e } from "../../composables/theme.js";
|
|
2
|
-
import { useId as t } from "../../composables/
|
|
2
|
+
import { useId as t } from "../../composables/useId/index.js";
|
|
3
3
|
import { createElementBlock as n, defineComponent as r, normalizeClass as i, onBeforeUnmount as a, openBlock as o, renderSlot as s, toRef as c, unref as l, watchEffect as u } from "vue";
|
|
4
4
|
//#region src/components/QThemeProvider/QThemeProvider.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var d = ["id"], f = /*@__PURE__*/ r({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ICONS } from './constants';
|
|
2
2
|
import { QToastProps } from '.';
|
|
3
|
+
type __VLS_Props = QToastProps & {};
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
attrs: Partial<{}>;
|
|
5
6
|
slots: {
|
|
@@ -13,15 +14,16 @@ declare function __VLS_template(): {
|
|
|
13
14
|
rootEl: any;
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
18
|
dismiss: () => any;
|
|
18
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
20
|
onDismiss?: (() => any) | undefined;
|
|
20
21
|
}>, {
|
|
21
22
|
variant: import('./types').QToastVariant;
|
|
22
23
|
color: string;
|
|
23
24
|
elevation: import('..').QCardElevation;
|
|
24
25
|
icons: typeof DEFAULT_ICONS;
|
|
26
|
+
entryKey: string;
|
|
25
27
|
timeout: number;
|
|
26
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QToast.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToast.vue"],"names":[],"mappings":"AAwEA;
|
|
1
|
+
{"version":3,"file":"QToast.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToast.vue"],"names":[],"mappings":"AAwEA;AA0PC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAc3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAMpC,KAAK,WAAW,GAAG,WAAW,GAAG,EAG9B,CAAC;AAiKL,iBAAS,cAAc;WAqOT,OAAO,IAA6B;;iCAdZ,GAAG;gCACJ,GAAG;yBACV,GAAG;yBAEH,GAAG;yBADH,GAAG;;;;EAgBhC;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;cAnaN,MAAM;;6EA4anB,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,16 +1,17 @@
|
|
|
1
1
|
import { rgbToHex as e } from "../../utils/color/conversion.js";
|
|
2
2
|
import { parseColor as t } from "../../utils/color/parse.js";
|
|
3
3
|
import { lighten as n } from "../../utils/color/manipulate.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { useColor as r } from "../../composables/useColor/index.js";
|
|
5
|
+
import { QButton as i } from "../QButton/index.js";
|
|
6
|
+
import { QCard as a } from "../QCard/index.js";
|
|
7
|
+
import { QIcon as o } from "../QIcon/index.js";
|
|
8
|
+
import { useId as s } from "../../composables/useId/index.js";
|
|
9
9
|
import { QCol as c, QContainer as l, QRow as u } from "../QGrid/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { ToastSymbol as d } from "../../composables/useToast/_internal.js";
|
|
11
|
+
import { DEFAULT_ICONS as f } from "./constants.js";
|
|
12
|
+
import { computed as p, createBlock as m, createCommentVNode as h, createElementVNode as g, createSlots as _, createVNode as v, defineComponent as y, guardReactiveProps as b, inject as x, normalizeClass as S, normalizeProps as C, normalizeStyle as w, onMounted as T, onUnmounted as E, openBlock as D, renderSlot as O, toDisplayString as k, toRef as A, unref as j, watch as M, withCtx as N } from "vue";
|
|
12
13
|
//#region src/components/QToast/QToast.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
14
|
+
var P = { class: "q-toast__title" }, F = /*@__PURE__*/ y({
|
|
14
15
|
__name: "QToast",
|
|
15
16
|
props: {
|
|
16
17
|
id: {},
|
|
@@ -22,72 +23,84 @@ var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
|
|
|
22
23
|
elevation: { default: "medium" },
|
|
23
24
|
variant: { default: "tonal" },
|
|
24
25
|
timeout: { default: 5e3 },
|
|
25
|
-
icons: { default: () =>
|
|
26
|
+
icons: { default: () => f },
|
|
27
|
+
entryKey: { default: void 0 }
|
|
26
28
|
},
|
|
27
29
|
emits: ["dismiss"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
30
|
-
|
|
30
|
+
setup(f, { emit: y }) {
|
|
31
|
+
let F = f, I = y, L = s(A(F, "id")), R = F.entryKey ? x(d, null) : null;
|
|
32
|
+
F.entryKey && (R?.registerToastEntry(F.entryKey, L.value), M(L, (e, t) => {
|
|
33
|
+
e === t || !F.entryKey || R?.updateToastEntryId(F.entryKey, e);
|
|
34
|
+
}));
|
|
35
|
+
let { style: z } = r(A(F, "color")), B = p(() => {
|
|
36
|
+
let e = F.block ? "q-toast--block" : void 0, t = F.title ? "q-toast--vertical" : void 0;
|
|
31
37
|
return [
|
|
32
38
|
"q-toast",
|
|
33
|
-
`q-toast--${
|
|
39
|
+
`q-toast--${F.variant}`,
|
|
34
40
|
e,
|
|
35
41
|
t,
|
|
36
|
-
|
|
37
|
-
M.class
|
|
42
|
+
F.class
|
|
38
43
|
];
|
|
39
|
-
}),
|
|
40
|
-
let r =
|
|
44
|
+
}), V = p(() => {
|
|
45
|
+
let r = z.value?.mainColor;
|
|
41
46
|
if (r) return e(n(t(r), 88));
|
|
42
|
-
}),
|
|
43
|
-
"--q-toast-main-color":
|
|
44
|
-
"--q-toast-on-main-color":
|
|
45
|
-
"--q-toast-hover-color":
|
|
46
|
-
"--q-toast-tonal-color":
|
|
47
|
-
}),
|
|
48
|
-
function
|
|
49
|
-
|
|
47
|
+
}), H = p(() => z.value ? {
|
|
48
|
+
"--q-toast-main-color": z.value.mainColor,
|
|
49
|
+
"--q-toast-on-main-color": z.value.onMainColor,
|
|
50
|
+
"--q-toast-hover-color": z.value.hoverColor,
|
|
51
|
+
"--q-toast-tonal-color": V.value
|
|
52
|
+
} : { "--q-toast-tonal-color": V.value }), U = p(() => F.variant === "bold" ? "bold" : "ghost"), W = p(() => F.variant === "tonal" && z.value?.hoverColor ? z.value.hoverColor : F.color), G, K, q;
|
|
53
|
+
function J() {
|
|
54
|
+
G !== void 0 && (window.clearTimeout(G), G = void 0), K = void 0, q = void 0, I("dismiss");
|
|
50
55
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
56
|
+
function Y(e) {
|
|
57
|
+
q = e, K = Date.now(), G = window.setTimeout(J, e);
|
|
53
58
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
return T(() => {
|
|
60
|
+
if (!F.entryKey) {
|
|
61
|
+
F.timeout > 0 && Y(F.timeout);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let e = R?.consumeRemainingTimeout(F.entryKey);
|
|
65
|
+
if (e !== void 0) {
|
|
66
|
+
e > 0 ? Y(e) : J();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
F.timeout > 0 && Y(F.timeout);
|
|
70
|
+
}), E(() => {
|
|
71
|
+
if (G !== void 0 && (window.clearTimeout(G), F.entryKey && R && K !== void 0 && q !== void 0)) {
|
|
72
|
+
let e = Date.now() - K, t = Math.max(0, q - e);
|
|
73
|
+
R.setRemainingTimeout(F.entryKey, t);
|
|
74
|
+
}
|
|
75
|
+
}), (e, t) => (D(), m(j(a), {
|
|
76
|
+
id: j(L),
|
|
77
|
+
elevation: F.elevation,
|
|
78
|
+
width: F.block ? "block" : void 0,
|
|
79
|
+
class: S(B.value),
|
|
80
|
+
style: w(H.value)
|
|
81
|
+
}, _({
|
|
82
|
+
default: N(() => [v(j(l), {
|
|
70
83
|
fluid: "",
|
|
71
84
|
class: "q-toast__body"
|
|
72
85
|
}, {
|
|
73
|
-
default:
|
|
86
|
+
default: N(() => [v(j(u), {
|
|
74
87
|
align: "center",
|
|
75
88
|
justify: "between"
|
|
76
89
|
}, {
|
|
77
|
-
default:
|
|
78
|
-
default:
|
|
90
|
+
default: N(() => [v(j(c), null, {
|
|
91
|
+
default: N(() => [O(e.$slots, "default", {}, () => [g("span", null, k(F.text), 1)])]),
|
|
79
92
|
_: 3
|
|
80
|
-
}),
|
|
93
|
+
}), F.title ? h("v-if", !0) : (D(), m(j(c), {
|
|
81
94
|
key: 0,
|
|
82
95
|
cols: "auto"
|
|
83
96
|
}, {
|
|
84
|
-
default:
|
|
97
|
+
default: N(() => [O(e.$slots, "dismiss", {}, () => [v(j(i), {
|
|
85
98
|
class: "q-toast__dismiss",
|
|
86
|
-
variant:
|
|
87
|
-
color:
|
|
88
|
-
onClick:
|
|
99
|
+
variant: U.value,
|
|
100
|
+
color: W.value,
|
|
101
|
+
onClick: J
|
|
89
102
|
}, {
|
|
90
|
-
default:
|
|
103
|
+
default: N(() => [v(j(o), C(b(F.icons.close)), null, 16)]),
|
|
91
104
|
_: 1
|
|
92
105
|
}, 8, ["variant", "color"])])]),
|
|
93
106
|
_: 3
|
|
@@ -97,28 +110,28 @@ var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
|
|
|
97
110
|
_: 3
|
|
98
111
|
})]),
|
|
99
112
|
_: 2
|
|
100
|
-
}, [
|
|
113
|
+
}, [F.title ? {
|
|
101
114
|
name: "header",
|
|
102
|
-
fn:
|
|
103
|
-
default:
|
|
115
|
+
fn: N(() => [v(j(l), { fluid: "" }, {
|
|
116
|
+
default: N(() => [v(j(u), {
|
|
104
117
|
align: "center",
|
|
105
118
|
justify: "between"
|
|
106
119
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
default:
|
|
109
|
-
e.$slots["title.prepend"] ?
|
|
110
|
-
|
|
111
|
-
e.$slots["title.append"] ?
|
|
120
|
+
default: N(() => [v(j(c), null, {
|
|
121
|
+
default: N(() => [g("div", P, [
|
|
122
|
+
e.$slots["title.prepend"] ? O(e.$slots, "title.prepend", { key: 0 }) : h("v-if", !0),
|
|
123
|
+
g("h4", null, k(F.title), 1),
|
|
124
|
+
e.$slots["title.append"] ? O(e.$slots, "title.append", { key: 1 }) : h("v-if", !0)
|
|
112
125
|
])]),
|
|
113
126
|
_: 3
|
|
114
|
-
}),
|
|
115
|
-
default:
|
|
127
|
+
}), v(j(c), { cols: "auto" }, {
|
|
128
|
+
default: N(() => [O(e.$slots, "dismiss", {}, () => [v(j(i), {
|
|
116
129
|
class: "q-toast__dismiss",
|
|
117
|
-
variant:
|
|
118
|
-
color:
|
|
119
|
-
onClick:
|
|
130
|
+
variant: U.value,
|
|
131
|
+
color: W.value,
|
|
132
|
+
onClick: J
|
|
120
133
|
}, {
|
|
121
|
-
default:
|
|
134
|
+
default: N(() => [v(j(o), C(b(F.icons.close)), null, 16)]),
|
|
122
135
|
_: 1
|
|
123
136
|
}, 8, ["variant", "color"])])]),
|
|
124
137
|
_: 3
|
|
@@ -138,4 +151,4 @@ var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
|
|
|
138
151
|
}
|
|
139
152
|
});
|
|
140
153
|
//#endregion
|
|
141
|
-
export {
|
|
154
|
+
export { F as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QToaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToaster.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QToaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToaster.vue"],"names":[],"mappings":"AAmBA;AAgFC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;;;;AA4HvC,wBAQG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QToast as
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { injectToastInstance as e, removeToastByEntryKey as t } from "../../composables/useToast/_internal.js";
|
|
2
|
+
import { QToast as n } from "./index.js";
|
|
3
|
+
import { Fragment as r, TransitionGroup as i, computed as a, createBlock as o, createElementBlock as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, onUnmounted as f, openBlock as p, renderList as m, unref as h, watch as g, withCtx as _ } from "vue";
|
|
4
4
|
//#region src/components/QToast/QToaster.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var v = /*@__PURE__*/ l({
|
|
6
6
|
__name: "QToaster",
|
|
7
7
|
props: {
|
|
8
8
|
id: {},
|
|
@@ -11,22 +11,27 @@ var h = /*@__PURE__*/ c({
|
|
|
11
11
|
maxToasts: {},
|
|
12
12
|
reverseOrder: { type: Boolean }
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
setup(l) {
|
|
15
|
+
let v = l, y = e(), { toasts: b } = y;
|
|
16
|
+
y.registerToaster(), f(() => y.unregisterToaster()), g(() => v.maxToasts, (e) => y.setMaxToasts(e), { immediate: !0 });
|
|
17
|
+
let x = a(() => {
|
|
18
|
+
let e = [...b.value];
|
|
19
|
+
return v.reverseOrder ? e.reverse() : e;
|
|
18
20
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
function S(e) {
|
|
22
|
+
t(y, e.entryKey);
|
|
23
|
+
}
|
|
24
|
+
return (e, t) => (p(), o(i, {
|
|
25
|
+
id: v.id,
|
|
21
26
|
name: "toast-stack",
|
|
22
27
|
tag: "div",
|
|
23
|
-
class:
|
|
24
|
-
"data-placement":
|
|
28
|
+
class: d(["q-toaster", v.class]),
|
|
29
|
+
"data-placement": v.placement
|
|
25
30
|
}, {
|
|
26
|
-
default:
|
|
27
|
-
key: e.
|
|
31
|
+
default: _(() => [(p(!0), s(r, null, m(x.value, (e) => (p(), s("div", {
|
|
32
|
+
key: e.entryKey,
|
|
28
33
|
class: "q-toast__container"
|
|
29
|
-
}, [
|
|
34
|
+
}, [c(h(n), u({ "entry-key": e.entryKey }, { ref_for: !0 }, e.props, { onDismiss: () => S(e) }), null, 16, ["entry-key", "onDismiss"])]))), 128))]),
|
|
30
35
|
_: 1
|
|
31
36
|
}, 8, [
|
|
32
37
|
"id",
|
|
@@ -36,4 +41,4 @@ var h = /*@__PURE__*/ c({
|
|
|
36
41
|
}
|
|
37
42
|
});
|
|
38
43
|
//#endregion
|
|
39
|
-
export {
|
|
44
|
+
export { v as default };
|