@quidgest/ui 0.16.13 → 0.16.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 +2 -0
- package/dist/ui.css +229 -0
- package/dist/ui.esm.js +5025 -4776
- package/dist/ui.js +18 -18
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1041 -1021
- package/dist/ui.scss +154 -1
- package/esm/components/QCombobox/QCombobox.d.ts +40 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +126 -117
- package/esm/components/QCombobox/index.d.ts +20 -0
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.d.ts +2 -2
- package/esm/components/QSidebar/QSidebarPanel.vue.js +24 -25
- package/esm/components/QToast/QToast.d.ts +33 -0
- package/esm/components/QToast/QToast.d.ts.map +1 -0
- package/esm/components/QToast/QToast.vue.js +212 -0
- package/esm/components/QToast/QToast.vue2.js +4 -0
- package/esm/components/QToast/QToaster.d.ts +6 -0
- package/esm/components/QToast/QToaster.d.ts.map +1 -0
- package/esm/components/QToast/QToaster.vue.js +48 -0
- package/esm/components/QToast/QToaster.vue2.js +4 -0
- package/esm/components/QToast/index.d.ts +56 -0
- package/esm/components/QToast/index.d.ts.map +1 -0
- package/esm/components/QToast/index.js +8 -0
- package/esm/components/QToast/types.d.ts +69 -0
- package/esm/components/QToast/types.d.ts.map +1 -0
- package/esm/components/QToast/types.js +8 -0
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +15 -12
- package/esm/composables/index.d.ts +1 -0
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/useDialog/types.d.ts +1 -1
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useToast/index.d.ts +33 -0
- package/esm/composables/useToast/index.d.ts.map +1 -0
- package/esm/composables/useToast/index.js +35 -0
- package/esm/composables/useToast/types.d.ts +40 -0
- package/esm/composables/useToast/types.d.ts.map +1 -0
- package/esm/composables/useToast/types.js +4 -0
- package/esm/framework.d.ts.map +1 -1
- package/esm/framework.js +25 -19
- package/esm/index.d.ts +2 -0
- package/esm/index.js +7 -5
- package/esm/utils/color.js +29 -24
- package/package.json +1 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { defineComponent as U, toRef as j, computed as d, onMounted as A, onUnmounted as D, createBlock as h, openBlock as y, unref as e, normalizeStyle as E, normalizeClass as H, createSlots as M, withCtx as l, createVNode as s, createCommentVNode as v, renderSlot as r, createElementVNode as p, toDisplayString as b, normalizeProps as k, guardReactiveProps as q } from "vue";
|
|
2
|
+
import { DEFAULT_ICONS as P } from "./types.js";
|
|
3
|
+
import { QButton as w } from "../QButton/index.js";
|
|
4
|
+
import { QCard as F } from "../QCard/index.js";
|
|
5
|
+
import { QContainer as T, QRow as $, QCol as c } from "../QGrid/index.js";
|
|
6
|
+
import { QIcon as g } from "../QIcon/index.js";
|
|
7
|
+
import { useTheme as L } from "../../composables/theme.js";
|
|
8
|
+
import { useColor as O } from "../../composables/useColor/index.js";
|
|
9
|
+
import { parseColor as x, colorToHex as G, lighten as J } from "../../utils/color.js";
|
|
10
|
+
const K = { class: "q-toast__title" }, nt = /* @__PURE__ */ U({
|
|
11
|
+
__name: "QToast",
|
|
12
|
+
props: {
|
|
13
|
+
id: {},
|
|
14
|
+
class: {},
|
|
15
|
+
block: { type: Boolean },
|
|
16
|
+
color: { default: "info" },
|
|
17
|
+
elevation: { default: "medium" },
|
|
18
|
+
icons: { default: () => P },
|
|
19
|
+
text: {},
|
|
20
|
+
timeout: { default: 5e3 },
|
|
21
|
+
title: {},
|
|
22
|
+
variant: { default: "tonal" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["dismiss"],
|
|
25
|
+
setup(Q, { emit: V }) {
|
|
26
|
+
const t = Q, S = V, B = L(), { isUtilityColor: f, style: u } = O(j(t, "color")), N = d(() => {
|
|
27
|
+
const o = f.value ? `q-toast--${t.color}` : void 0, n = t.block ? "q-toast--block" : void 0, i = t.title ? "q-toast--vertical" : void 0;
|
|
28
|
+
return [
|
|
29
|
+
"q-toast",
|
|
30
|
+
`q-toast--${t.variant}`,
|
|
31
|
+
o,
|
|
32
|
+
n,
|
|
33
|
+
i,
|
|
34
|
+
t.class
|
|
35
|
+
];
|
|
36
|
+
}), C = d(() => {
|
|
37
|
+
var i;
|
|
38
|
+
const o = f.value ? R(t.color) : (i = u.value) == null ? void 0 : i.mainColor;
|
|
39
|
+
if (!o) return;
|
|
40
|
+
const n = x(o);
|
|
41
|
+
return G(J(n, 88));
|
|
42
|
+
}), z = d(() => {
|
|
43
|
+
var o, n, i;
|
|
44
|
+
return f.value ? {
|
|
45
|
+
"--q-toast-tonal-color": C.value
|
|
46
|
+
} : {
|
|
47
|
+
"--q-toast-main-color": (o = u.value) == null ? void 0 : o.mainColor,
|
|
48
|
+
"--q-toast-on-main-color": (n = u.value) == null ? void 0 : n.onMainColor,
|
|
49
|
+
"--q-toast-hover-color": (i = u.value) == null ? void 0 : i.hoverColor,
|
|
50
|
+
"--q-toast-tonal-color": C.value
|
|
51
|
+
};
|
|
52
|
+
}), _ = d(() => t.variant === "bold" ? "bold" : "ghost");
|
|
53
|
+
let a;
|
|
54
|
+
function m() {
|
|
55
|
+
a !== void 0 && window.clearTimeout(a), S("dismiss");
|
|
56
|
+
}
|
|
57
|
+
function I() {
|
|
58
|
+
a = window.setTimeout(m, t.timeout);
|
|
59
|
+
}
|
|
60
|
+
function R(o) {
|
|
61
|
+
const n = B.current.value.scheme;
|
|
62
|
+
if (o in n)
|
|
63
|
+
return n[o];
|
|
64
|
+
}
|
|
65
|
+
return A(() => {
|
|
66
|
+
t.timeout > 0 && I();
|
|
67
|
+
}), D(() => {
|
|
68
|
+
a !== void 0 && window.clearTimeout(a);
|
|
69
|
+
}), (o, n) => (y(), h(e(F), {
|
|
70
|
+
id: t.id,
|
|
71
|
+
elevation: t.elevation,
|
|
72
|
+
width: t.block ? "block" : void 0,
|
|
73
|
+
class: H(N.value),
|
|
74
|
+
style: E(z.value)
|
|
75
|
+
}, M({
|
|
76
|
+
default: l(() => [
|
|
77
|
+
s(e(T), {
|
|
78
|
+
fluid: "",
|
|
79
|
+
class: "q-toast__body"
|
|
80
|
+
}, {
|
|
81
|
+
default: l(() => [
|
|
82
|
+
s(e($), {
|
|
83
|
+
align: "center",
|
|
84
|
+
justify: "between"
|
|
85
|
+
}, {
|
|
86
|
+
default: l(() => [
|
|
87
|
+
s(e(c), null, {
|
|
88
|
+
default: l(() => [
|
|
89
|
+
r(o.$slots, "default", {}, () => [
|
|
90
|
+
p(
|
|
91
|
+
"span",
|
|
92
|
+
null,
|
|
93
|
+
b(t.text),
|
|
94
|
+
1
|
|
95
|
+
/* TEXT */
|
|
96
|
+
)
|
|
97
|
+
])
|
|
98
|
+
]),
|
|
99
|
+
_: 3
|
|
100
|
+
/* FORWARDED */
|
|
101
|
+
}),
|
|
102
|
+
t.title ? v("v-if", !0) : (y(), h(e(c), {
|
|
103
|
+
key: 0,
|
|
104
|
+
cols: "auto"
|
|
105
|
+
}, {
|
|
106
|
+
default: l(() => [
|
|
107
|
+
r(o.$slots, "dismiss", {}, () => [
|
|
108
|
+
s(e(w), {
|
|
109
|
+
class: "q-toast__dismiss",
|
|
110
|
+
variant: _.value,
|
|
111
|
+
color: t.color,
|
|
112
|
+
onClick: m
|
|
113
|
+
}, {
|
|
114
|
+
default: l(() => [
|
|
115
|
+
s(
|
|
116
|
+
e(g),
|
|
117
|
+
k(q(t.icons.close)),
|
|
118
|
+
null,
|
|
119
|
+
16
|
|
120
|
+
/* FULL_PROPS */
|
|
121
|
+
)
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
/* STABLE */
|
|
125
|
+
}, 8, ["variant", "color"])
|
|
126
|
+
])
|
|
127
|
+
]),
|
|
128
|
+
_: 3
|
|
129
|
+
/* FORWARDED */
|
|
130
|
+
}))
|
|
131
|
+
]),
|
|
132
|
+
_: 3
|
|
133
|
+
/* FORWARDED */
|
|
134
|
+
})
|
|
135
|
+
]),
|
|
136
|
+
_: 3
|
|
137
|
+
/* FORWARDED */
|
|
138
|
+
})
|
|
139
|
+
]),
|
|
140
|
+
_: 2
|
|
141
|
+
/* DYNAMIC */
|
|
142
|
+
}, [
|
|
143
|
+
t.title ? {
|
|
144
|
+
name: "header",
|
|
145
|
+
fn: l(() => [
|
|
146
|
+
s(e(T), { fluid: "" }, {
|
|
147
|
+
default: l(() => [
|
|
148
|
+
s(e($), {
|
|
149
|
+
align: "center",
|
|
150
|
+
justify: "between"
|
|
151
|
+
}, {
|
|
152
|
+
default: l(() => [
|
|
153
|
+
s(e(c), null, {
|
|
154
|
+
default: l(() => [
|
|
155
|
+
p("div", K, [
|
|
156
|
+
o.$slots["title.prepend"] ? r(o.$slots, "title.prepend", { key: 0 }) : v("v-if", !0),
|
|
157
|
+
p(
|
|
158
|
+
"h4",
|
|
159
|
+
null,
|
|
160
|
+
b(t.title),
|
|
161
|
+
1
|
|
162
|
+
/* TEXT */
|
|
163
|
+
),
|
|
164
|
+
o.$slots["title.append"] ? r(o.$slots, "title.append", { key: 1 }) : v("v-if", !0)
|
|
165
|
+
])
|
|
166
|
+
]),
|
|
167
|
+
_: 3
|
|
168
|
+
/* FORWARDED */
|
|
169
|
+
}),
|
|
170
|
+
s(e(c), { cols: "auto" }, {
|
|
171
|
+
default: l(() => [
|
|
172
|
+
r(o.$slots, "dismiss", {}, () => [
|
|
173
|
+
s(e(w), {
|
|
174
|
+
class: "q-toast__dismiss",
|
|
175
|
+
variant: _.value,
|
|
176
|
+
color: t.color,
|
|
177
|
+
onClick: m
|
|
178
|
+
}, {
|
|
179
|
+
default: l(() => [
|
|
180
|
+
s(
|
|
181
|
+
e(g),
|
|
182
|
+
k(q(t.icons.close)),
|
|
183
|
+
null,
|
|
184
|
+
16
|
|
185
|
+
/* FULL_PROPS */
|
|
186
|
+
)
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
/* STABLE */
|
|
190
|
+
}, 8, ["variant", "color"])
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
_: 3
|
|
194
|
+
/* FORWARDED */
|
|
195
|
+
})
|
|
196
|
+
]),
|
|
197
|
+
_: 3
|
|
198
|
+
/* FORWARDED */
|
|
199
|
+
})
|
|
200
|
+
]),
|
|
201
|
+
_: 3
|
|
202
|
+
/* FORWARDED */
|
|
203
|
+
})
|
|
204
|
+
]),
|
|
205
|
+
key: "0"
|
|
206
|
+
} : void 0
|
|
207
|
+
]), 1032, ["id", "elevation", "width", "class", "style"]));
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
export {
|
|
211
|
+
nt as default
|
|
212
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QToasterProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<QToasterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QToasterProps> & Readonly<{}>, {
|
|
3
|
+
placement: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center";
|
|
4
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=QToaster.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QToaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToaster.vue"],"names":[],"mappings":"AAkBA;AAwDC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;;;;AAyG7C,wBAQG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as m, computed as p, createBlock as d, openBlock as r, TransitionGroup as u, normalizeClass as f, withCtx as _, createElementBlock as a, Fragment as v, renderList as T, createVNode as k, unref as o, mergeProps as x } from "vue";
|
|
2
|
+
import { QToast as g } from "./index.js";
|
|
3
|
+
import { useToast as B } from "../../composables/useToast/index.js";
|
|
4
|
+
const D = /* @__PURE__ */ m({
|
|
5
|
+
__name: "QToaster",
|
|
6
|
+
props: {
|
|
7
|
+
id: {},
|
|
8
|
+
class: {},
|
|
9
|
+
placement: { default: "top-right" },
|
|
10
|
+
maxToasts: {},
|
|
11
|
+
reverseOrder: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(n) {
|
|
14
|
+
const e = n, { toasts: i, removeToast: l } = B(), c = p(() => {
|
|
15
|
+
let t = [...i.value];
|
|
16
|
+
return e.reverseOrder && (t = t.reverse()), t.slice(0, e.maxToasts);
|
|
17
|
+
});
|
|
18
|
+
return (t, h) => (r(), d(u, {
|
|
19
|
+
id: e.id,
|
|
20
|
+
name: "toast-stack",
|
|
21
|
+
tag: "div",
|
|
22
|
+
class: f(["q-toaster", e.class]),
|
|
23
|
+
"data-placement": e.placement
|
|
24
|
+
}, {
|
|
25
|
+
default: _(() => [
|
|
26
|
+
(r(!0), a(
|
|
27
|
+
v,
|
|
28
|
+
null,
|
|
29
|
+
T(c.value, (s) => (r(), a("div", {
|
|
30
|
+
key: s.id,
|
|
31
|
+
class: "q-toast__container"
|
|
32
|
+
}, [
|
|
33
|
+
k(o(g), x({ ref_for: !0 }, s.props, {
|
|
34
|
+
onDismiss: () => o(l)(s.id)
|
|
35
|
+
}), null, 16, ["onDismiss"])
|
|
36
|
+
]))),
|
|
37
|
+
128
|
|
38
|
+
/* KEYED_FRAGMENT */
|
|
39
|
+
))
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
/* STABLE */
|
|
43
|
+
}, 8, ["id", "class", "data-placement"]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
D as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { QToastProps } from './types';
|
|
2
|
+
declare const QToast: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<QToastProps> & Readonly<{
|
|
4
|
+
onDismiss?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
+
dismiss: () => any;
|
|
7
|
+
}, import('vue').PublicProps, {
|
|
8
|
+
color: string;
|
|
9
|
+
variant: import('./types').QToastVariant;
|
|
10
|
+
elevation: import('../QCard/types').QCardElevation;
|
|
11
|
+
icons: typeof import('./types').DEFAULT_ICONS;
|
|
12
|
+
timeout: number;
|
|
13
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
14
|
+
P: {};
|
|
15
|
+
B: {};
|
|
16
|
+
D: {};
|
|
17
|
+
C: {};
|
|
18
|
+
M: {};
|
|
19
|
+
Defaults: {};
|
|
20
|
+
}, Readonly<QToastProps> & Readonly<{
|
|
21
|
+
onDismiss?: (() => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, {
|
|
23
|
+
color: string;
|
|
24
|
+
variant: import('./types').QToastVariant;
|
|
25
|
+
elevation: import('../QCard/types').QCardElevation;
|
|
26
|
+
icons: typeof import('./types').DEFAULT_ICONS;
|
|
27
|
+
timeout: number;
|
|
28
|
+
}>;
|
|
29
|
+
__isFragment?: never;
|
|
30
|
+
__isTeleport?: never;
|
|
31
|
+
__isSuspense?: never;
|
|
32
|
+
} & import('vue').ComponentOptionsBase<Readonly<QToastProps> & Readonly<{
|
|
33
|
+
onDismiss?: (() => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
35
|
+
dismiss: () => any;
|
|
36
|
+
}, string, {
|
|
37
|
+
color: string;
|
|
38
|
+
variant: import('./types').QToastVariant;
|
|
39
|
+
elevation: import('../QCard/types').QCardElevation;
|
|
40
|
+
icons: typeof import('./types').DEFAULT_ICONS;
|
|
41
|
+
timeout: number;
|
|
42
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
43
|
+
$slots: {
|
|
44
|
+
'title.prepend'?(_: {}): any;
|
|
45
|
+
'title.append'?(_: {}): any;
|
|
46
|
+
dismiss?(_: {}): any;
|
|
47
|
+
dismiss?(_: {}): any;
|
|
48
|
+
default?(_: {}): any;
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
declare const QToaster: import('vue').DefineComponent<import('./types').QToasterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./types').QToasterProps> & Readonly<{}>, {
|
|
52
|
+
placement: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center";
|
|
53
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
54
|
+
export { QToast, QToaster };
|
|
55
|
+
export type { QToastProps };
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAK1C,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAA;AACvC,QAAA,MAAM,QAAQ;;6EAA6B,CAAA;AAG3C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AAG3B,YAAY,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
2
|
+
import { QCardElevation } from '../QCard/types';
|
|
3
|
+
export type QToastVariant = 'bold' | 'tonal' | 'outlined';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the QToaster component.
|
|
6
|
+
*/
|
|
7
|
+
export type QToasterProps = QBaseComponentProps & {
|
|
8
|
+
/**
|
|
9
|
+
* Determines where the toast notifications will appear on the screen.
|
|
10
|
+
*/
|
|
11
|
+
placement?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
|
|
12
|
+
/**
|
|
13
|
+
* Maximum number of toasts displayed at once.
|
|
14
|
+
* Additional toasts will be queued.
|
|
15
|
+
*/
|
|
16
|
+
maxToasts?: number;
|
|
17
|
+
/**
|
|
18
|
+
* If true, toasts will be stacked in reverse order (newest on top).
|
|
19
|
+
* Defaults to true.
|
|
20
|
+
*/
|
|
21
|
+
reverseOrder?: boolean;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Props for the QToast component.
|
|
25
|
+
*/
|
|
26
|
+
export type QToastProps = QBaseComponentProps & {
|
|
27
|
+
/**
|
|
28
|
+
* If true, the toast spans the full width of its container.
|
|
29
|
+
*/
|
|
30
|
+
block?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The color of the toast.
|
|
33
|
+
* Can be chosen from utility colors like 'success' or 'danger',
|
|
34
|
+
* or specified using CSS color codes.
|
|
35
|
+
*/
|
|
36
|
+
color?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The shadow depth of the toast. Defaults to 'high'.
|
|
39
|
+
*/
|
|
40
|
+
elevation?: QCardElevation;
|
|
41
|
+
/**
|
|
42
|
+
* Custom icon configurations.
|
|
43
|
+
*/
|
|
44
|
+
icons?: typeof DEFAULT_ICONS;
|
|
45
|
+
/**
|
|
46
|
+
* The text on the toast body.
|
|
47
|
+
*/
|
|
48
|
+
text?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The time (ms) until the toast is dismissed.
|
|
51
|
+
* If set to 0 or negative, the toast will have no timeout timer.
|
|
52
|
+
* Defaults to 0.
|
|
53
|
+
*/
|
|
54
|
+
timeout?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The title of the toast.
|
|
57
|
+
*/
|
|
58
|
+
title?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Specifies the visual style of the toast.
|
|
61
|
+
*/
|
|
62
|
+
variant?: QToastVariant;
|
|
63
|
+
};
|
|
64
|
+
export declare const DEFAULT_ICONS: {
|
|
65
|
+
close: {
|
|
66
|
+
icon: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGpD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;AAEzD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;OAEG;IACH,SAAS,CAAC,EACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,CAAA;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;CACvB,CAAA;AAGD,eAAO,MAAM,aAAa;;;;CAIM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/esm/components/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { QCard as n } from "./QCard/index.js";
|
|
|
7
7
|
import { QCheckbox as s, QCheckboxLabel as L } from "./QCheckbox/index.js";
|
|
8
8
|
import { QCollapsible as g } from "./QCollapsible/index.js";
|
|
9
9
|
import { QColorPicker as P } from "./QColorPicker/index.js";
|
|
10
|
-
import { QCombobox as
|
|
10
|
+
import { QCombobox as b } from "./QCombobox/index.js";
|
|
11
11
|
import { QDateTimePicker as G } from "./QDateTimePicker/index.js";
|
|
12
12
|
import { QDialog as y, QDialogProvider as D } from "./QDialog/index.js";
|
|
13
13
|
import { QDismissibleLayer as S } from "./QDismissibleLayer/index.js";
|
|
@@ -27,7 +27,7 @@ import { QOverlay as io } from "./QOverlay/index.js";
|
|
|
27
27
|
import { QPasswordField as lo } from "./QPasswordField/index.js";
|
|
28
28
|
import { QPopover as co } from "./QPopover/index.js";
|
|
29
29
|
import { QPropertyList as Lo, QPropertyListGroup as uo, QPropertyListPanel as go, QPropertyListRow as Io } from "./QPropertyList/index.js";
|
|
30
|
-
import { QRadioButton as
|
|
30
|
+
import { QRadioButton as To, QRadioGroup as bo } from "./QRadioGroup/index.js";
|
|
31
31
|
import { QSelect as Go } from "./QSelect/index.js";
|
|
32
32
|
import { QSidebar as yo } from "./QSidebar/index.js";
|
|
33
33
|
import { QSkeletonLoader as Fo } from "./QSkeletonLoader/index.js";
|
|
@@ -35,9 +35,10 @@ import { QSpinnerLoader as ko } from "./QSpinnerLoader/index.js";
|
|
|
35
35
|
import { QTextArea as wo } from "./QTextArea/index.js";
|
|
36
36
|
import { QTextField as ho } from "./QTextField/index.js";
|
|
37
37
|
import { QThemeProvider as Mo } from "./QThemeProvider/index.js";
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
38
|
+
import { QToast as Uo, QToaster as jo } from "./QToast/index.js";
|
|
39
|
+
import { QToggle as zo } from "./QToggle/index.js";
|
|
40
|
+
import { QToggleGroup as Ho, QToggleGroupItem as Jo } from "./QToggleGroup/index.js";
|
|
41
|
+
import { QTooltip as No } from "./QTooltip/index.js";
|
|
41
42
|
export {
|
|
42
43
|
e as QAccordion,
|
|
43
44
|
t as QAccordionItem,
|
|
@@ -51,7 +52,7 @@ export {
|
|
|
51
52
|
z as QCol,
|
|
52
53
|
g as QCollapsible,
|
|
53
54
|
P as QColorPicker,
|
|
54
|
-
|
|
55
|
+
b as QCombobox,
|
|
55
56
|
E as QContainer,
|
|
56
57
|
G as QDateTimePicker,
|
|
57
58
|
y as QDialog,
|
|
@@ -80,8 +81,8 @@ export {
|
|
|
80
81
|
uo as QPropertyListGroup,
|
|
81
82
|
go as QPropertyListPanel,
|
|
82
83
|
Io as QPropertyListRow,
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
To as QRadioButton,
|
|
85
|
+
bo as QRadioGroup,
|
|
85
86
|
H as QRow,
|
|
86
87
|
Go as QSelect,
|
|
87
88
|
yo as QSidebar,
|
|
@@ -91,8 +92,10 @@ export {
|
|
|
91
92
|
wo as QTextArea,
|
|
92
93
|
ho as QTextField,
|
|
93
94
|
Mo as QThemeProvider,
|
|
94
|
-
Uo as
|
|
95
|
-
|
|
96
|
-
zo as
|
|
97
|
-
Ho as
|
|
95
|
+
Uo as QToast,
|
|
96
|
+
jo as QToaster,
|
|
97
|
+
zo as QToggle,
|
|
98
|
+
Ho as QToggleGroup,
|
|
99
|
+
Jo as QToggleGroupItem,
|
|
100
|
+
No as QTooltip
|
|
98
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAErE;;GAEG;AACH,KAAK,cAAc,GAAG;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAErE;;GAEG;AACH,KAAK,cAAc,GAAG;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;OAEG;IACH,OAAO,EAAE,cAAc,EAAE,CAAA;CACzB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ToastInstance, UseToastReturn } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* A composable function that manages existing QToast instances.
|
|
4
|
+
*
|
|
5
|
+
* @returns An object containing:
|
|
6
|
+
* - toasts: The array of currently active QToast instances.
|
|
7
|
+
* - addToast: A function that adds a QToast instance to the DOM, according to the given QToastProps.
|
|
8
|
+
* - removeToast: A function to remove a QToast instance from the DOM.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useToast(): UseToastReturn;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new toast instance for managing toast notifications.
|
|
13
|
+
*
|
|
14
|
+
* @returns An object containing a reactive array of toast items.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createToastInstance(): ToastInstance;
|
|
17
|
+
/**
|
|
18
|
+
* Provides a toast notification instance to the current Vue component context.
|
|
19
|
+
*
|
|
20
|
+
* @returns The provided toast instance for managing toast notifications.
|
|
21
|
+
*
|
|
22
|
+
* @see createToastInstance
|
|
23
|
+
* @see ToastSymbol
|
|
24
|
+
*/
|
|
25
|
+
export declare function provideToast(): ToastInstance;
|
|
26
|
+
/**
|
|
27
|
+
* Injects the ToastInstance provided by the ToastSymbol.
|
|
28
|
+
*
|
|
29
|
+
* @throws If the ToastInstance has not been provided via provideToast.
|
|
30
|
+
* @returns The injected ToastInstance.
|
|
31
|
+
*/
|
|
32
|
+
export declare function injectToastInstance(): ToastInstance;
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useToast/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,aAAa,EAAkB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAA;AAMjG;;;;;;;GAOG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAoCzC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,CAInD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,aAAa,CAI5C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,CAMnD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ToastSymbol as a } from "./types.js";
|
|
2
|
+
import { inject as i, ref as u } from "vue";
|
|
3
|
+
import { useId as c } from "../uid.js";
|
|
4
|
+
function p() {
|
|
5
|
+
const { toasts: t } = f();
|
|
6
|
+
function s(n, o) {
|
|
7
|
+
const e = c(o);
|
|
8
|
+
return t.value.push({ id: e, props: n }), e;
|
|
9
|
+
}
|
|
10
|
+
function r(n) {
|
|
11
|
+
const o = t.value.findIndex((e) => e.id === n);
|
|
12
|
+
o !== -1 && t.value.splice(o, 1);
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
toasts: t,
|
|
16
|
+
addToast: s,
|
|
17
|
+
removeToast: r
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function I() {
|
|
21
|
+
return {
|
|
22
|
+
toasts: u([])
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function f() {
|
|
26
|
+
const t = i(a);
|
|
27
|
+
if (!t)
|
|
28
|
+
throw new Error("useInjectedToast must be used after provideToast");
|
|
29
|
+
return t;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
I as createToastInstance,
|
|
33
|
+
f as injectToastInstance,
|
|
34
|
+
p as useToast
|
|
35
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { QToastProps } from '../../components/QToast';
|
|
3
|
+
export declare const ToastSymbol: InjectionKey<ToastInstance>;
|
|
4
|
+
/**
|
|
5
|
+
* Represents an instance of the toast notification system.
|
|
6
|
+
*/
|
|
7
|
+
export type ToastInstance = {
|
|
8
|
+
/**
|
|
9
|
+
* A Vue Ref containing the list of active toast notifications.
|
|
10
|
+
*/
|
|
11
|
+
toasts: Ref<ToastItem[]>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Represents a single toast item managed in the toasts state array.
|
|
15
|
+
*/
|
|
16
|
+
export type ToastItem = {
|
|
17
|
+
/**
|
|
18
|
+
* A unique identifier for the toast item.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* The properties applied to the toast item, conforming to `QToastProps`.
|
|
23
|
+
*/
|
|
24
|
+
props: QToastProps;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Represents the return type of the `useToast` composable, providing methods and state
|
|
28
|
+
* for managing toast notifications.
|
|
29
|
+
*/
|
|
30
|
+
export type UseToastReturn = ToastInstance & {
|
|
31
|
+
/**
|
|
32
|
+
* A function to add a toast item to the DOM.
|
|
33
|
+
*/
|
|
34
|
+
addToast(props: QToastProps, id?: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* A function to remove a toast item from the DOM.
|
|
37
|
+
*/
|
|
38
|
+
removeToast(id: string): void;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useToast/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,aAAa,CAAyB,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;CACxB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACvB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,EAAE,WAAW,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC5C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEjD;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA"}
|