@quidgest/ui 0.16.19 → 0.16.21

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.
Files changed (41) hide show
  1. package/dist/manifest/components.json +2 -0
  2. package/dist/ui.css +289 -10
  3. package/dist/ui.esm.js +5132 -4825
  4. package/dist/ui.js +19 -19
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +718 -692
  7. package/dist/ui.scss +264 -15
  8. package/esm/components/QAvatar/QAvatar.d.ts +23 -0
  9. package/esm/components/QAvatar/QAvatar.d.ts.map +1 -0
  10. package/esm/components/QAvatar/QAvatar.vue.js +49 -0
  11. package/esm/components/QAvatar/QAvatar.vue2.js +4 -0
  12. package/esm/components/QAvatar/index.d.ts +31 -0
  13. package/esm/components/QAvatar/index.d.ts.map +1 -0
  14. package/esm/components/QAvatar/index.js +6 -0
  15. package/esm/components/QAvatar/types.d.ts +30 -0
  16. package/esm/components/QAvatar/types.d.ts.map +1 -0
  17. package/esm/components/QCarousel/QCarousel.d.ts +44 -0
  18. package/esm/components/QCarousel/QCarousel.d.ts.map +1 -0
  19. package/esm/components/QCarousel/QCarousel.vue.js +355 -0
  20. package/esm/components/QCarousel/QCarousel.vue2.js +4 -0
  21. package/esm/components/QCarousel/constants.d.ts +14 -0
  22. package/esm/components/QCarousel/constants.d.ts.map +1 -0
  23. package/esm/components/QCarousel/constants.js +16 -0
  24. package/esm/components/QCarousel/index.d.ts +119 -0
  25. package/esm/components/QCarousel/index.d.ts.map +1 -0
  26. package/esm/components/QCarousel/index.js +6 -0
  27. package/esm/components/QCarousel/types.d.ts +79 -0
  28. package/esm/components/QCarousel/types.d.ts.map +1 -0
  29. package/esm/components/QCombobox/QCombobox.d.ts +4 -4
  30. package/esm/components/QCombobox/index.d.ts +10 -10
  31. package/esm/components/QGrid/QRow.d.ts +1 -1
  32. package/esm/components/QGrid/index.d.ts +3 -3
  33. package/esm/components/QSelect/QSelect.d.ts +4 -4
  34. package/esm/components/QSelect/index.d.ts +10 -10
  35. package/esm/components/QTextArea/QTextArea.d.ts +1 -1
  36. package/esm/components/QTextArea/index.d.ts +3 -3
  37. package/esm/components/index.d.ts +2 -0
  38. package/esm/components/index.d.ts.map +1 -1
  39. package/esm/components/index.js +102 -98
  40. package/esm/index.d.ts +2 -0
  41. package/package.json +1 -1
@@ -0,0 +1,355 @@
1
+ import { defineComponent as ne, mergeModels as z, useModel as re, ref as E, computed as N, watch as B, onMounted as ie, onUnmounted as ce, createElementBlock as l, openBlock as s, normalizeClass as L, createCommentVNode as a, createVNode as u, createElementVNode as q, unref as d, Fragment as p, normalizeStyle as $, renderList as Q, withModifiers as ue, renderSlot as de, toDisplayString as b, withCtx as F, mergeProps as U, nextTick as fe } from "vue";
2
+ import { DEFAULT_TEXTS as he, DEFAULT_ICONS as _e } from "./constants.js";
3
+ import { QButton as K } from "../QButton/index.js";
4
+ import { QIcon as O } from "../QIcon/index.js";
5
+ import { QSkeletonLoader as m } from "../QSkeletonLoader/index.js";
6
+ const ve = ["id"], pe = {
7
+ key: 0,
8
+ class: "q-carousel__skeleton"
9
+ }, me = { class: "q-carousel__skeleton-caption" }, ye = {
10
+ key: 0,
11
+ class: "q-carousel__skeleton-controls"
12
+ }, ge = ["onClick"], ke = ["src", "alt"], we = {
13
+ key: 1,
14
+ class: "q-carousel__empty-container"
15
+ }, Ce = {
16
+ key: 2,
17
+ class: "q-carousel__caption-global"
18
+ }, qe = {
19
+ key: 0,
20
+ class: "q-carousel__title"
21
+ }, be = {
22
+ key: 1,
23
+ class: "q-carousel__subtitle"
24
+ }, Te = {
25
+ key: 3,
26
+ class: "q-carousel__indicators"
27
+ }, Se = ["aria-label", "aria-current", "onClick"], Ie = { class: "q-carousel__sr-only" }, De = { class: "q-carousel__sr-only" }, Le = /* @__PURE__ */ ne({
28
+ __name: "QCarousel",
29
+ props: /* @__PURE__ */ z({
30
+ id: {},
31
+ class: {},
32
+ slides: { default: () => [] },
33
+ showIndicators: { type: Boolean },
34
+ showControls: { type: Boolean },
35
+ autoCycleInterval: { default: 5e3 },
36
+ autoCyclePause: { default: "hover" },
37
+ ride: { default: "carousel" },
38
+ swipeThreshold: { default: 50 },
39
+ wrap: { type: Boolean, default: !0 },
40
+ animationDuration: { default: 500 },
41
+ loading: { type: Boolean },
42
+ icons: { default: () => _e },
43
+ texts: { default: () => he }
44
+ }, {
45
+ currentSlide: { default: 0 },
46
+ currentSlideModifiers: {}
47
+ }),
48
+ emits: /* @__PURE__ */ z(["slide:before-change", "slide:after-change", "slide:click"], ["update:currentSlide"]),
49
+ setup(X, { emit: V }) {
50
+ const t = X, y = V, T = re(X, "currentSlide"), o = E(0);
51
+ let f = !1, S = !1, I = 0, D = 0;
52
+ const P = E(0), M = E(0);
53
+ let g, k;
54
+ const H = N(() => ({
55
+ transform: `translateX(-${o.value * 100}%)`,
56
+ transition: f ? `transform ${t.animationDuration}ms cubic-bezier(0.4, 0, 0.2, 1)` : "none"
57
+ })), R = N(() => ({
58
+ "--q-carousel-progress-duration": `${t.autoCycleInterval}ms`,
59
+ "--q-carousel-progress-width": `${P.value}%`
60
+ }));
61
+ function r(e) {
62
+ if (e < 0 || e >= t.slides.length || e === o.value || f) return;
63
+ const i = o.value, n = t.slides[i], v = t.slides[e];
64
+ y("slide:before-change", v.id, n == null ? void 0 : n.id), o.value = e, T.value = e, t.animationDuration > 0 ? (f = !0, setTimeout(() => {
65
+ f = !1, y("slide:after-change", v.id, n == null ? void 0 : n.id);
66
+ }, t.animationDuration)) : fe(() => {
67
+ y("slide:after-change", v.id, n == null ? void 0 : n.id);
68
+ });
69
+ }
70
+ function w() {
71
+ const e = o.value + 1;
72
+ e >= t.slides.length ? t.wrap && r(0) : r(e);
73
+ }
74
+ function A() {
75
+ const e = o.value - 1;
76
+ e < 0 ? t.wrap && r(t.slides.length - 1) : r(e);
77
+ }
78
+ function j(e) {
79
+ const i = window.getSelection();
80
+ if (i != null && i.toString().length) return;
81
+ const n = t.slides[e];
82
+ y("slide:click", n.id);
83
+ }
84
+ function G(e) {
85
+ const i = {};
86
+ return e != null && e.colorPlaceholder && (i["background-color"] = e.colorPlaceholder), i;
87
+ }
88
+ function J() {
89
+ t.autoCycleInterval && (k = window.setInterval(() => {
90
+ P.value = (Date.now() - M.value) / t.autoCycleInterval * 100;
91
+ }, 50));
92
+ }
93
+ function C() {
94
+ !t.autoCycleInterval || t.slides.length <= 1 || (_(), t.ride === "carousel" && !S && (M.value = Date.now(), J(), g = window.setTimeout(w, t.autoCycleInterval)));
95
+ }
96
+ function _() {
97
+ g && window.clearTimeout(g), k && window.clearInterval(k), g = void 0, k = void 0, M.value = 0, P.value = 0;
98
+ }
99
+ function W() {
100
+ _(), C();
101
+ }
102
+ function Y() {
103
+ t.autoCyclePause === "hover" && (S = !0, _());
104
+ }
105
+ function Z() {
106
+ t.autoCyclePause === "hover" && (S = !1, C());
107
+ }
108
+ function ee(e) {
109
+ if (!f)
110
+ switch (e.key) {
111
+ case "ArrowLeft":
112
+ e.preventDefault(), A();
113
+ break;
114
+ case "ArrowRight":
115
+ e.preventDefault(), w();
116
+ break;
117
+ case "Home":
118
+ e.preventDefault(), r(0);
119
+ break;
120
+ case "End":
121
+ e.preventDefault(), r(t.slides.length - 1);
122
+ break;
123
+ }
124
+ }
125
+ function te(e) {
126
+ f || (I = e.touches[0].clientX, _());
127
+ }
128
+ function oe(e) {
129
+ f || (D = e.touches[0].clientX);
130
+ }
131
+ function le() {
132
+ if (f) return;
133
+ const e = I - D;
134
+ Math.abs(e) > t.swipeThreshold && (e > 0 ? w() : A()), I = 0, D = 0, C();
135
+ }
136
+ function se(e) {
137
+ return t.texts.goToSlide.replace("{0}", `${e + 1}`);
138
+ }
139
+ function ae(e) {
140
+ if (e.length === 0) {
141
+ o.value = 0, T.value = 0, _();
142
+ return;
143
+ }
144
+ o.value >= e.length && r(0);
145
+ }
146
+ return B(() => t.slides, ae, { immediate: !0, deep: !0 }), B(o, W), B(T, (e) => {
147
+ e !== o.value && r(e);
148
+ }), ie(C), ce(_), (e, i) => {
149
+ var n, v, x;
150
+ return s(), l("div", {
151
+ id: t.id,
152
+ class: L(["q-carousel", t.class]),
153
+ tabindex: "0",
154
+ onMouseenter: Y,
155
+ onMouseleave: Z,
156
+ onKeydown: ee
157
+ }, [
158
+ a(" Skeleton Loader "),
159
+ e.loading ? (s(), l("div", pe, [
160
+ a(" Image placeholder "),
161
+ u(d(m), {
162
+ width: "100%",
163
+ height: "100%"
164
+ }),
165
+ a(" Overlay skeletons for text/captions "),
166
+ q("div", me, [
167
+ u(d(m), {
168
+ type: "text",
169
+ width: "40%",
170
+ height: "24px",
171
+ class: "q-carousel__skeleton-title"
172
+ }),
173
+ u(d(m), {
174
+ type: "text",
175
+ width: "60%",
176
+ height: "16px",
177
+ class: "q-carousel__skeleton-subtitle"
178
+ })
179
+ ]),
180
+ a(" Controls "),
181
+ t.showControls ? (s(), l("div", ye, [
182
+ u(d(m), {
183
+ type: "icon",
184
+ width: "40px",
185
+ height: "40px",
186
+ class: "q-carousel__skeleton-control"
187
+ }),
188
+ u(d(m), {
189
+ type: "icon",
190
+ width: "40px",
191
+ height: "40px",
192
+ class: "q-carousel__skeleton-control"
193
+ })
194
+ ])) : a("v-if", !0)
195
+ ])) : (s(), l(
196
+ p,
197
+ { key: 1 },
198
+ [
199
+ (n = e.slides) != null && n.length ? (s(), l(
200
+ p,
201
+ { key: 0 },
202
+ [
203
+ a(" Carousel Content "),
204
+ q(
205
+ "div",
206
+ {
207
+ class: "q-carousel__track",
208
+ style: $(H.value),
209
+ onTouchstart: te,
210
+ onTouchmove: oe,
211
+ onTouchend: le
212
+ },
213
+ [
214
+ (s(!0), l(
215
+ p,
216
+ null,
217
+ Q(e.slides, (h, c) => (s(), l("div", {
218
+ key: h.id,
219
+ class: L([
220
+ "q-carousel__slide",
221
+ { "q-carousel__slide--active": c === o.value }
222
+ ]),
223
+ style: $(G(h)),
224
+ onClick: ue(() => j(c), ["stop", "prevent"])
225
+ }, [
226
+ h.image ? (s(), l("img", {
227
+ key: 0,
228
+ src: h.image,
229
+ alt: h.title || `Slide ${c + 1}`,
230
+ class: "q-carousel__image",
231
+ decoding: "async",
232
+ loading: "lazy"
233
+ }, null, 8, ke)) : a("v-if", !0)
234
+ ], 14, ge))),
235
+ 128
236
+ /* KEYED_FRAGMENT */
237
+ ))
238
+ ],
239
+ 36
240
+ /* STYLE, NEED_HYDRATION */
241
+ )
242
+ ],
243
+ 64
244
+ /* STABLE_FRAGMENT */
245
+ )) : (s(), l("div", we, [
246
+ de(e.$slots, "empty")
247
+ ])),
248
+ a(" Captions (centered, above indicators) "),
249
+ e.slides[o.value] ? (s(), l("div", Ce, [
250
+ (v = e.slides[o.value]) != null && v.title ? (s(), l(
251
+ "h2",
252
+ qe,
253
+ b(e.slides[o.value].title),
254
+ 1
255
+ /* TEXT */
256
+ )) : a("v-if", !0),
257
+ (x = e.slides[o.value]) != null && x.subtitle ? (s(), l(
258
+ "p",
259
+ be,
260
+ b(e.slides[o.value].subtitle),
261
+ 1
262
+ /* TEXT */
263
+ )) : a("v-if", !0)
264
+ ])) : a("v-if", !0),
265
+ a(" Indicators "),
266
+ e.showIndicators && e.slides.length > 1 ? (s(), l("ol", Te, [
267
+ (s(!0), l(
268
+ p,
269
+ null,
270
+ Q(e.slides, (h, c) => (s(), l("li", {
271
+ key: h.id,
272
+ class: L([
273
+ "q-carousel__indicator",
274
+ { "q-carousel__indicator--active": c === o.value }
275
+ ]),
276
+ "data-testid": "carousel-indicator",
277
+ style: $(c === o.value ? R.value : {}),
278
+ "aria-label": se(c),
279
+ "aria-current": c === o.value,
280
+ onClick: () => r(c)
281
+ }, null, 14, Se))),
282
+ 128
283
+ /* KEYED_FRAGMENT */
284
+ ))
285
+ ])) : a("v-if", !0),
286
+ a(" Controls "),
287
+ e.showControls && e.slides.length > 1 ? (s(), l(
288
+ p,
289
+ { key: 4 },
290
+ [
291
+ u(d(K), {
292
+ class: "q-carousel__control q-carousel__control--prev",
293
+ "data-testid": "carousel-prev",
294
+ "aria-label": e.texts.previousText,
295
+ onClick: A
296
+ }, {
297
+ default: F(() => [
298
+ u(
299
+ d(O),
300
+ U({ class: "q-carousel__control-icon q-carousel__control-icon--prev" }, t.icons.back),
301
+ null,
302
+ 16
303
+ /* FULL_PROPS */
304
+ ),
305
+ q(
306
+ "span",
307
+ Ie,
308
+ b(e.texts.previousText),
309
+ 1
310
+ /* TEXT */
311
+ )
312
+ ]),
313
+ _: 1
314
+ /* STABLE */
315
+ }, 8, ["aria-label"]),
316
+ u(d(K), {
317
+ class: "q-carousel__control q-carousel__control--next",
318
+ "data-testid": "carousel-next",
319
+ "aria-label": e.texts.nextText,
320
+ onClick: w
321
+ }, {
322
+ default: F(() => [
323
+ u(
324
+ d(O),
325
+ U({ class: "q-carousel__control-icon q-carousel__control-icon--next" }, t.icons.forward),
326
+ null,
327
+ 16
328
+ /* FULL_PROPS */
329
+ ),
330
+ q(
331
+ "span",
332
+ De,
333
+ b(e.texts.nextText),
334
+ 1
335
+ /* TEXT */
336
+ )
337
+ ]),
338
+ _: 1
339
+ /* STABLE */
340
+ }, 8, ["aria-label"])
341
+ ],
342
+ 64
343
+ /* STABLE_FRAGMENT */
344
+ )) : a("v-if", !0)
345
+ ],
346
+ 64
347
+ /* STABLE_FRAGMENT */
348
+ ))
349
+ ], 42, ve);
350
+ };
351
+ }
352
+ });
353
+ export {
354
+ Le as default
355
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QCarousel.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,14 @@
1
+ export declare const DEFAULT_ICONS: {
2
+ back: {
3
+ icon: string;
4
+ };
5
+ forward: {
6
+ icon: string;
7
+ };
8
+ };
9
+ export declare const DEFAULT_TEXTS: {
10
+ previousText: string;
11
+ nextText: string;
12
+ goToSlide: string;
13
+ };
14
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/QCarousel/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;CAOM,CAAA;AAGhC,eAAO,MAAM,aAAa;;;;CAIQ,CAAA"}
@@ -0,0 +1,16 @@
1
+ const o = {
2
+ back: {
3
+ icon: "chevron-left"
4
+ },
5
+ forward: {
6
+ icon: "chevron-right"
7
+ }
8
+ }, e = {
9
+ previousText: "Previous",
10
+ nextText: "Next",
11
+ goToSlide: "Go to slide {0}"
12
+ };
13
+ export {
14
+ o as DEFAULT_ICONS,
15
+ e as DEFAULT_TEXTS
16
+ };
@@ -0,0 +1,119 @@
1
+ declare const QCarousel: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ currentSlide?: number;
4
+ } & import('../../types/component').QBaseComponentProps & {
5
+ slides?: import('./types').Slide[];
6
+ showIndicators?: boolean;
7
+ showControls?: boolean;
8
+ autoCycleInterval?: number;
9
+ autoCyclePause?: "hover" | "false";
10
+ ride?: "carousel" | "false";
11
+ swipeThreshold?: number;
12
+ wrap?: boolean;
13
+ animationDuration?: number;
14
+ loading?: boolean;
15
+ icons?: typeof import('./constants').DEFAULT_ICONS;
16
+ texts?: typeof import('./constants').DEFAULT_TEXTS;
17
+ }> & Readonly<{
18
+ "onSlide:before-change"?: ((newId: string, oldId?: string | undefined) => any) | undefined;
19
+ "onSlide:after-change"?: ((newId: string, oldId?: string | undefined) => any) | undefined;
20
+ "onSlide:click"?: ((id: string) => any) | undefined;
21
+ "onUpdate:currentSlide"?: ((value: number) => any) | undefined;
22
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ "slide:before-change": (newId: string, oldId?: string | undefined) => any;
24
+ "slide:after-change": (newId: string, oldId?: string | undefined) => any;
25
+ "slide:click": (id: string) => any;
26
+ "update:currentSlide": (value: number) => any;
27
+ }, import('vue').PublicProps, {
28
+ icons: typeof import('./constants').DEFAULT_ICONS;
29
+ texts: typeof import('./constants').DEFAULT_TEXTS;
30
+ slides: import('./types').Slide[];
31
+ autoCycleInterval: number;
32
+ autoCyclePause: "hover" | "false";
33
+ ride: "carousel" | "false";
34
+ swipeThreshold: number;
35
+ wrap: boolean;
36
+ animationDuration: number;
37
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
38
+ P: {};
39
+ B: {};
40
+ D: {};
41
+ C: {};
42
+ M: {};
43
+ Defaults: {};
44
+ }, Readonly<{
45
+ currentSlide?: number;
46
+ } & import('../../types/component').QBaseComponentProps & {
47
+ slides?: import('./types').Slide[];
48
+ showIndicators?: boolean;
49
+ showControls?: boolean;
50
+ autoCycleInterval?: number;
51
+ autoCyclePause?: "hover" | "false";
52
+ ride?: "carousel" | "false";
53
+ swipeThreshold?: number;
54
+ wrap?: boolean;
55
+ animationDuration?: number;
56
+ loading?: boolean;
57
+ icons?: typeof import('./constants').DEFAULT_ICONS;
58
+ texts?: typeof import('./constants').DEFAULT_TEXTS;
59
+ }> & Readonly<{
60
+ "onSlide:before-change"?: ((newId: string, oldId?: string | undefined) => any) | undefined;
61
+ "onSlide:after-change"?: ((newId: string, oldId?: string | undefined) => any) | undefined;
62
+ "onSlide:click"?: ((id: string) => any) | undefined;
63
+ "onUpdate:currentSlide"?: ((value: number) => any) | undefined;
64
+ }>, {}, {}, {}, {}, {
65
+ icons: typeof import('./constants').DEFAULT_ICONS;
66
+ texts: typeof import('./constants').DEFAULT_TEXTS;
67
+ slides: import('./types').Slide[];
68
+ autoCycleInterval: number;
69
+ autoCyclePause: "hover" | "false";
70
+ ride: "carousel" | "false";
71
+ swipeThreshold: number;
72
+ wrap: boolean;
73
+ animationDuration: number;
74
+ }>;
75
+ __isFragment?: never;
76
+ __isTeleport?: never;
77
+ __isSuspense?: never;
78
+ } & import('vue').ComponentOptionsBase<Readonly<{
79
+ currentSlide?: number;
80
+ } & import('../../types/component').QBaseComponentProps & {
81
+ slides?: import('./types').Slide[];
82
+ showIndicators?: boolean;
83
+ showControls?: boolean;
84
+ autoCycleInterval?: number;
85
+ autoCyclePause?: "hover" | "false";
86
+ ride?: "carousel" | "false";
87
+ swipeThreshold?: number;
88
+ wrap?: boolean;
89
+ animationDuration?: number;
90
+ loading?: boolean;
91
+ icons?: typeof import('./constants').DEFAULT_ICONS;
92
+ texts?: typeof import('./constants').DEFAULT_TEXTS;
93
+ }> & Readonly<{
94
+ "onSlide:before-change"?: ((newId: string, oldId?: string | undefined) => any) | undefined;
95
+ "onSlide:after-change"?: ((newId: string, oldId?: string | undefined) => any) | undefined;
96
+ "onSlide:click"?: ((id: string) => any) | undefined;
97
+ "onUpdate:currentSlide"?: ((value: number) => any) | undefined;
98
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
99
+ "slide:before-change": (newId: string, oldId?: string | undefined) => any;
100
+ "slide:after-change": (newId: string, oldId?: string | undefined) => any;
101
+ "slide:click": (id: string) => any;
102
+ "update:currentSlide": (value: number) => any;
103
+ }, string, {
104
+ icons: typeof import('./constants').DEFAULT_ICONS;
105
+ texts: typeof import('./constants').DEFAULT_TEXTS;
106
+ slides: import('./types').Slide[];
107
+ autoCycleInterval: number;
108
+ autoCyclePause: "hover" | "false";
109
+ ride: "carousel" | "false";
110
+ swipeThreshold: number;
111
+ wrap: boolean;
112
+ animationDuration: number;
113
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
114
+ $slots: {
115
+ empty?(_: {}): any;
116
+ };
117
+ });
118
+ export { QCarousel };
119
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QCarousel/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8B,CAAA;AAG7C,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import o from "./QCarousel.vue.js";
2
+ import { setupPropsProxy as r } from "../../utils/setupPropsProxy.js";
3
+ const s = r(o);
4
+ export {
5
+ s as QCarousel
6
+ };
@@ -0,0 +1,79 @@
1
+ import { QBaseComponentProps } from 'src/types/component';
2
+ import { DEFAULT_ICONS, DEFAULT_TEXTS } from './constants';
3
+ /**
4
+ * Represents a single slide in the carousel.
5
+ */
6
+ export type Slide = {
7
+ /** Unique identifier for the slide */
8
+ id: string;
9
+ /** Optional title text displayed on the slide */
10
+ title?: string;
11
+ /** Optional subtitle text displayed below the title */
12
+ subtitle?: string;
13
+ /** Image URL or path for the slide */
14
+ image: string;
15
+ /** Optional placeholder background color shown while the image loads */
16
+ colorPlaceholder?: string;
17
+ };
18
+ /**
19
+ * Props for the QCarousel component.
20
+ */
21
+ export type QCarouselProps = QBaseComponentProps & {
22
+ /** Array of slides to be displayed in the carousel */
23
+ slides?: Slide[];
24
+ /** Whether to show slide indicators (dots) below the carousel */
25
+ showIndicators?: boolean;
26
+ /** Whether to show previous/next navigation controls */
27
+ showControls?: boolean;
28
+ /** Time interval in milliseconds between automatic slide transitions */
29
+ autoCycleInterval?: number;
30
+ /** Pausing behavior for auto cycling:
31
+ * - `'hover'`: pause when hovering over the carousel
32
+ * - `'false'`: do not pause
33
+ */
34
+ autoCyclePause?: 'hover' | 'false';
35
+ /** Determines if the carousel should auto-start cycling:
36
+ * - `'carousel'`: start cycling automatically
37
+ * - `'false'`: do not auto-start
38
+ */
39
+ ride?: 'carousel' | 'false';
40
+ /**
41
+ * The minimum horizontal distance in pixels that a touch gesture
42
+ * must travel to be recognized as a swipe.
43
+ */
44
+ swipeThreshold?: number;
45
+ /** Whether the carousel should loop back to the start after the last slide */
46
+ wrap?: boolean;
47
+ /** Duration of slide transition animations in milliseconds */
48
+ animationDuration?: number;
49
+ /** Whether the carousel is in a loading state (e.g., slides not yet ready) */
50
+ loading?: boolean;
51
+ /** Custom icon configurations. */
52
+ icons?: typeof DEFAULT_ICONS;
53
+ /** Custom text overrides for controls and labels */
54
+ texts?: typeof DEFAULT_TEXTS;
55
+ };
56
+ export type QCarouselEmits = {
57
+ /**
58
+ * Emitted right before the slide changes.
59
+ * Useful for hooking into transitions.
60
+ *
61
+ * @param newId - Id of the slide to be shown
62
+ * @param oldId - Id of the slide being hidden, if it exists
63
+ */
64
+ 'slide:before-change': [newId: string, oldId?: string];
65
+ /**
66
+ * Emitted after a slide transition completes.
67
+ *
68
+ * @param newId - Id of the now-active slide
69
+ * @param oldId - Id of the previous slide, if it exists
70
+ */
71
+ 'slide:after-change': [newId: string, oldId?: string];
72
+ /**
73
+ * Emitted when a slide is clicked.
74
+ *
75
+ * @param id - Id of the clicked slide
76
+ */
77
+ 'slide:click': [id: string];
78
+ };
79
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QCarousel/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE/D;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IACnB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAA;IAEV,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IAEb,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAClD,sDAAsD;IACtD,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;IAEhB,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAElC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B,oDAAoD;IACpD,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B;;;;;;OAMG;IACH,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;IAEtD;;;;;OAKG;IACH,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;IAErD;;;;OAIG;IACH,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;CAC3B,CAAA"}
@@ -902,16 +902,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
902
902
  "update:open": (value: boolean) => any;
903
903
  "update:search": (value: string) => any;
904
904
  } & {
905
+ hide: () => any;
906
+ show: () => any;
905
907
  "before-show": () => any;
906
908
  "before-hide": () => any;
907
- show: () => any;
908
- hide: () => any;
909
909
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
910
910
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
911
+ onHide?: (() => any) | undefined;
912
+ onShow?: (() => any) | undefined;
911
913
  "onBefore-show"?: (() => any) | undefined;
912
914
  "onBefore-hide"?: (() => any) | undefined;
913
- onShow?: (() => any) | undefined;
914
- onHide?: (() => any) | undefined;
915
915
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
916
916
  "onUpdate:search"?: ((value: string) => any) | undefined;
917
917
  }>, {