@mantine-vue/carousel 1.1.2
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/cjs/index.cjs +586 -0
- package/cjs/index.cjs.map +1 -0
- package/esm/index.mjs +560 -0
- package/esm/index.mjs.map +1 -0
- package/lib/Carousel.context.d.ts +5 -0
- package/lib/Carousel.d.ts +66 -0
- package/lib/CarouselSlide.d.ts +161 -0
- package/lib/CarouselVariables.d.ts +67 -0
- package/lib/get-chevron-rotation.d.ts +6 -0
- package/lib/get-indicator-navigation.d.ts +3 -0
- package/lib/index.d.mts +6 -0
- package/lib/index.d.ts +6 -0
- package/package.json +48 -0
- package/styles.css +173 -0
- package/styles.layer.css +175 -0
package/cjs/index.cjs
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let vue = require("vue");
|
|
25
|
+
let embla_carousel_vue = require("embla-carousel-vue");
|
|
26
|
+
embla_carousel_vue = __toESM(embla_carousel_vue);
|
|
27
|
+
let _mantine_vue_hooks = require("@mantine-vue/hooks");
|
|
28
|
+
let _mantine_vue_core = require("@mantine-vue/core");
|
|
29
|
+
//#region src/Carousel.context.ts
|
|
30
|
+
var [provideCarouselContext, useCarouselContext] = (0, _mantine_vue_core.createSafeContext)("Carousel component was not found in tree");
|
|
31
|
+
var Carousel_module_default = {
|
|
32
|
+
root: "_root_avx3r_1",
|
|
33
|
+
viewport: "_viewport_avx3r_6",
|
|
34
|
+
container: "_container_avx3r_15",
|
|
35
|
+
controls: "_controls_avx3r_35",
|
|
36
|
+
control: "_control_avx3r_35",
|
|
37
|
+
indicators: "_indicators_avx3r_87",
|
|
38
|
+
indicator: "_indicator_avx3r_87",
|
|
39
|
+
slide: "_slide_avx3r_135"
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/CarouselSlide.ts
|
|
43
|
+
var CarouselSlideBaseComponent = (0, vue.defineComponent)({
|
|
44
|
+
name: "CarouselSlide",
|
|
45
|
+
inheritAttrs: false,
|
|
46
|
+
props: {
|
|
47
|
+
classNames: {
|
|
48
|
+
type: [Object, Function],
|
|
49
|
+
default: void 0
|
|
50
|
+
},
|
|
51
|
+
styles: {
|
|
52
|
+
type: [Object, Function],
|
|
53
|
+
default: void 0
|
|
54
|
+
},
|
|
55
|
+
mod: {
|
|
56
|
+
type: [Object, Array],
|
|
57
|
+
default: void 0
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
setup(props, { attrs, slots }) {
|
|
61
|
+
const ctx = useCarouselContext();
|
|
62
|
+
return () => (0, vue.h)(_mantine_vue_core.Box, {
|
|
63
|
+
mod: [{ orientation: ctx.orientation }, props.mod],
|
|
64
|
+
role: "group",
|
|
65
|
+
"aria-roledescription": "slide",
|
|
66
|
+
"aria-label": "Carousel slide",
|
|
67
|
+
...attrs,
|
|
68
|
+
...ctx.getStyles("slide", {
|
|
69
|
+
className: attrs.class,
|
|
70
|
+
style: attrs.style,
|
|
71
|
+
classNames: props.classNames,
|
|
72
|
+
styles: props.styles
|
|
73
|
+
})
|
|
74
|
+
}, slots);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
var CarouselSlide = Object.assign((0, _mantine_vue_core.withBoxProps)(CarouselSlideBaseComponent), { classes: Carousel_module_default });
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/CarouselVariables.ts
|
|
80
|
+
function isObject(value) {
|
|
81
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
82
|
+
}
|
|
83
|
+
var sharedProps = {
|
|
84
|
+
selector: {
|
|
85
|
+
type: String,
|
|
86
|
+
required: true
|
|
87
|
+
},
|
|
88
|
+
slideSize: {
|
|
89
|
+
type: [
|
|
90
|
+
String,
|
|
91
|
+
Number,
|
|
92
|
+
Object
|
|
93
|
+
],
|
|
94
|
+
default: void 0
|
|
95
|
+
},
|
|
96
|
+
slideGap: {
|
|
97
|
+
type: [
|
|
98
|
+
String,
|
|
99
|
+
Number,
|
|
100
|
+
Object
|
|
101
|
+
],
|
|
102
|
+
default: void 0
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var CarouselVariables = (0, vue.defineComponent)({
|
|
106
|
+
name: "CarouselVariables",
|
|
107
|
+
props: sharedProps,
|
|
108
|
+
setup(props) {
|
|
109
|
+
const theme = (0, _mantine_vue_core.useMantineTheme)();
|
|
110
|
+
return () => {
|
|
111
|
+
const baseStyles = (0, _mantine_vue_core.filterProps)({
|
|
112
|
+
"--carousel-slide-gap": (0, _mantine_vue_core.getSpacing)((0, _mantine_vue_core.getBaseValue)(props.slideGap)),
|
|
113
|
+
"--carousel-slide-size": (0, _mantine_vue_core.rem)((0, _mantine_vue_core.getBaseValue)(props.slideSize))
|
|
114
|
+
});
|
|
115
|
+
const queries = (0, _mantine_vue_core.keys)(theme.value.breakpoints).reduce((acc, breakpoint) => {
|
|
116
|
+
acc[breakpoint] = acc[breakpoint] ?? {};
|
|
117
|
+
if (isObject(props.slideGap) && props.slideGap[breakpoint] !== void 0) acc[breakpoint]["--carousel-slide-gap"] = (0, _mantine_vue_core.getSpacing)(props.slideGap[breakpoint]);
|
|
118
|
+
if (isObject(props.slideSize) && props.slideSize[breakpoint] !== void 0) acc[breakpoint]["--carousel-slide-size"] = (0, _mantine_vue_core.rem)(props.slideSize[breakpoint]);
|
|
119
|
+
return acc;
|
|
120
|
+
}, {});
|
|
121
|
+
const media = (0, _mantine_vue_core.getSortedBreakpoints)(theme.value.breakpoints).reduce((acc, item) => {
|
|
122
|
+
if ((0, _mantine_vue_core.keys)(queries[item.breakpoint] ?? {}).length > 0) acc[`(min-width: ${theme.value.breakpoints[item.breakpoint]})`] = queries[item.breakpoint];
|
|
123
|
+
return acc;
|
|
124
|
+
}, {});
|
|
125
|
+
return (0, vue.h)(_mantine_vue_core.InlineStyles, {
|
|
126
|
+
selector: props.selector,
|
|
127
|
+
styles: baseStyles,
|
|
128
|
+
media
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
function getBreakpoints(values) {
|
|
134
|
+
return isObject(values) ? (0, _mantine_vue_core.keys)(values).filter((breakpoint) => breakpoint !== "base") : [];
|
|
135
|
+
}
|
|
136
|
+
function sortBreakpoints(breakpoints) {
|
|
137
|
+
return breakpoints.sort((a, b) => (0, _mantine_vue_core.px)(a) - (0, _mantine_vue_core.px)(b));
|
|
138
|
+
}
|
|
139
|
+
var CarouselContainerVariables = (0, vue.defineComponent)({
|
|
140
|
+
name: "CarouselContainerVariables",
|
|
141
|
+
props: sharedProps,
|
|
142
|
+
setup(props) {
|
|
143
|
+
return () => {
|
|
144
|
+
const baseStyles = (0, _mantine_vue_core.filterProps)({
|
|
145
|
+
"--carousel-slide-gap": (0, _mantine_vue_core.getSpacing)((0, _mantine_vue_core.getBaseValue)(props.slideGap)),
|
|
146
|
+
"--carousel-slide-size": (0, _mantine_vue_core.rem)((0, _mantine_vue_core.getBaseValue)(props.slideSize))
|
|
147
|
+
});
|
|
148
|
+
const container = sortBreakpoints(Array.from(new Set([...getBreakpoints(props.slideGap), ...getBreakpoints(props.slideSize)]))).reduce((acc, breakpoint) => {
|
|
149
|
+
const key = `carousel (min-width: ${breakpoint})`;
|
|
150
|
+
acc[key] = {};
|
|
151
|
+
if (isObject(props.slideGap) && props.slideGap[breakpoint] !== void 0) acc[key]["--carousel-slide-gap"] = (0, _mantine_vue_core.getSpacing)(props.slideGap[breakpoint]);
|
|
152
|
+
if (isObject(props.slideSize) && props.slideSize[breakpoint] !== void 0) acc[key]["--carousel-slide-size"] = (0, _mantine_vue_core.rem)(props.slideSize[breakpoint]);
|
|
153
|
+
return acc;
|
|
154
|
+
}, {});
|
|
155
|
+
return (0, vue.h)(_mantine_vue_core.InlineStyles, {
|
|
156
|
+
selector: props.selector,
|
|
157
|
+
styles: baseStyles,
|
|
158
|
+
container
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/get-chevron-rotation.ts
|
|
165
|
+
function getChevronRotation({ dir, orientation, direction }) {
|
|
166
|
+
if (direction === "previous") return orientation === "horizontal" ? 90 * (dir === "ltr" ? 1 : -1) : -180;
|
|
167
|
+
return orientation === "horizontal" ? 90 * (dir === "ltr" ? -1 : 1) : 0;
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/get-indicator-navigation.ts
|
|
171
|
+
function getNextIndicatorIndex(index, total) {
|
|
172
|
+
return index < total - 1 ? index + 1 : 0;
|
|
173
|
+
}
|
|
174
|
+
function getPreviousIndicatorIndex(index, total) {
|
|
175
|
+
return index > 0 ? index - 1 : total - 1;
|
|
176
|
+
}
|
|
177
|
+
function clamp(value, min, max) {
|
|
178
|
+
return Math.min(Math.max(value, min), max);
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/Carousel.ts
|
|
182
|
+
var defaultProps = {
|
|
183
|
+
controlSize: 26,
|
|
184
|
+
controlsOffset: "sm",
|
|
185
|
+
slideSize: "100%",
|
|
186
|
+
slideGap: 0,
|
|
187
|
+
orientation: "horizontal",
|
|
188
|
+
includeGapInSize: true,
|
|
189
|
+
initialSlide: 0,
|
|
190
|
+
withControls: true,
|
|
191
|
+
withIndicators: false,
|
|
192
|
+
withKeyboardEvents: true,
|
|
193
|
+
type: "media"
|
|
194
|
+
};
|
|
195
|
+
var defaultEmblaOptions = {
|
|
196
|
+
align: "center",
|
|
197
|
+
loop: false,
|
|
198
|
+
slidesToScroll: 1,
|
|
199
|
+
dragFree: false,
|
|
200
|
+
inViewThreshold: 0,
|
|
201
|
+
skipSnaps: false,
|
|
202
|
+
containScroll: "trimSnaps"
|
|
203
|
+
};
|
|
204
|
+
var varsResolver = (0, _mantine_vue_core.createVarsResolver)((_, { height, controlSize, controlsOffset }) => ({ root: {
|
|
205
|
+
"--carousel-height": (0, _mantine_vue_core.rem)(height),
|
|
206
|
+
"--carousel-control-size": (0, _mantine_vue_core.rem)(controlSize),
|
|
207
|
+
"--carousel-controls-offset": (0, _mantine_vue_core.getSpacing)(controlsOffset)
|
|
208
|
+
} }));
|
|
209
|
+
function useRandomClassName() {
|
|
210
|
+
return `__mantine-vue-carousel-${Math.random().toString(36).slice(2, 9)}`;
|
|
211
|
+
}
|
|
212
|
+
function countRealSlides(nodes) {
|
|
213
|
+
if (!nodes) return 0;
|
|
214
|
+
return nodes.filter((node) => node.type !== vue.Comment).length;
|
|
215
|
+
}
|
|
216
|
+
var CarouselBaseComponent = (0, vue.defineComponent)({
|
|
217
|
+
name: "Carousel",
|
|
218
|
+
inheritAttrs: false,
|
|
219
|
+
props: {
|
|
220
|
+
emblaOptions: {
|
|
221
|
+
type: Object,
|
|
222
|
+
default: void 0
|
|
223
|
+
},
|
|
224
|
+
onNextSlide: {
|
|
225
|
+
type: Function,
|
|
226
|
+
default: void 0
|
|
227
|
+
},
|
|
228
|
+
onPreviousSlide: {
|
|
229
|
+
type: Function,
|
|
230
|
+
default: void 0
|
|
231
|
+
},
|
|
232
|
+
onSlideChange: {
|
|
233
|
+
type: Function,
|
|
234
|
+
default: void 0
|
|
235
|
+
},
|
|
236
|
+
getEmblaApi: {
|
|
237
|
+
type: Function,
|
|
238
|
+
default: void 0
|
|
239
|
+
},
|
|
240
|
+
nextControlProps: {
|
|
241
|
+
type: Object,
|
|
242
|
+
default: void 0
|
|
243
|
+
},
|
|
244
|
+
previousControlProps: {
|
|
245
|
+
type: Object,
|
|
246
|
+
default: void 0
|
|
247
|
+
},
|
|
248
|
+
controlSize: {
|
|
249
|
+
type: [String, Number],
|
|
250
|
+
default: void 0
|
|
251
|
+
},
|
|
252
|
+
controlsOffset: {
|
|
253
|
+
type: [String, Number],
|
|
254
|
+
default: void 0
|
|
255
|
+
},
|
|
256
|
+
slideSize: {
|
|
257
|
+
type: [
|
|
258
|
+
String,
|
|
259
|
+
Number,
|
|
260
|
+
Object
|
|
261
|
+
],
|
|
262
|
+
default: void 0
|
|
263
|
+
},
|
|
264
|
+
slideGap: {
|
|
265
|
+
type: [
|
|
266
|
+
String,
|
|
267
|
+
Number,
|
|
268
|
+
Object
|
|
269
|
+
],
|
|
270
|
+
default: void 0
|
|
271
|
+
},
|
|
272
|
+
orientation: {
|
|
273
|
+
type: String,
|
|
274
|
+
default: void 0
|
|
275
|
+
},
|
|
276
|
+
type: {
|
|
277
|
+
type: String,
|
|
278
|
+
default: void 0
|
|
279
|
+
},
|
|
280
|
+
height: {
|
|
281
|
+
type: [String, Number],
|
|
282
|
+
default: void 0
|
|
283
|
+
},
|
|
284
|
+
includeGapInSize: {
|
|
285
|
+
type: Boolean,
|
|
286
|
+
default: void 0
|
|
287
|
+
},
|
|
288
|
+
initialSlide: {
|
|
289
|
+
type: Number,
|
|
290
|
+
default: void 0
|
|
291
|
+
},
|
|
292
|
+
withControls: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: void 0
|
|
295
|
+
},
|
|
296
|
+
withIndicators: {
|
|
297
|
+
type: Boolean,
|
|
298
|
+
default: void 0
|
|
299
|
+
},
|
|
300
|
+
plugins: {
|
|
301
|
+
type: Array,
|
|
302
|
+
default: void 0
|
|
303
|
+
},
|
|
304
|
+
nextControlIcon: {
|
|
305
|
+
type: null,
|
|
306
|
+
default: void 0
|
|
307
|
+
},
|
|
308
|
+
previousControlIcon: {
|
|
309
|
+
type: null,
|
|
310
|
+
default: void 0
|
|
311
|
+
},
|
|
312
|
+
withKeyboardEvents: {
|
|
313
|
+
type: Boolean,
|
|
314
|
+
default: void 0
|
|
315
|
+
},
|
|
316
|
+
getIndicatorProps: {
|
|
317
|
+
type: Function,
|
|
318
|
+
default: void 0
|
|
319
|
+
},
|
|
320
|
+
id: {
|
|
321
|
+
type: String,
|
|
322
|
+
default: void 0
|
|
323
|
+
},
|
|
324
|
+
mod: {
|
|
325
|
+
type: [Object, Array],
|
|
326
|
+
default: void 0
|
|
327
|
+
},
|
|
328
|
+
classNames: {
|
|
329
|
+
type: [Object, Function],
|
|
330
|
+
default: void 0
|
|
331
|
+
},
|
|
332
|
+
styles: {
|
|
333
|
+
type: [Object, Function],
|
|
334
|
+
default: void 0
|
|
335
|
+
},
|
|
336
|
+
vars: {
|
|
337
|
+
type: [Object, Function],
|
|
338
|
+
default: void 0
|
|
339
|
+
},
|
|
340
|
+
unstyled: {
|
|
341
|
+
type: Boolean,
|
|
342
|
+
default: false
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
setup(rawProps, { attrs, slots }) {
|
|
346
|
+
const props = (0, _mantine_vue_core.useProps)("Carousel", defaultProps, rawProps);
|
|
347
|
+
const getStyles = (0, _mantine_vue_core.useStyles)({
|
|
348
|
+
name: "Carousel",
|
|
349
|
+
classes: Carousel_module_default,
|
|
350
|
+
props,
|
|
351
|
+
get className() {
|
|
352
|
+
return attrs.class;
|
|
353
|
+
},
|
|
354
|
+
get style() {
|
|
355
|
+
return attrs.style;
|
|
356
|
+
},
|
|
357
|
+
get classNames() {
|
|
358
|
+
return props.classNames;
|
|
359
|
+
},
|
|
360
|
+
get styles() {
|
|
361
|
+
return props.styles;
|
|
362
|
+
},
|
|
363
|
+
get unstyled() {
|
|
364
|
+
return props.unstyled;
|
|
365
|
+
},
|
|
366
|
+
get vars() {
|
|
367
|
+
return props.vars;
|
|
368
|
+
},
|
|
369
|
+
varsResolver
|
|
370
|
+
});
|
|
371
|
+
const _id = (0, _mantine_vue_hooks.useId)(props.id);
|
|
372
|
+
const responsiveClassName = useRandomClassName();
|
|
373
|
+
const { dir } = (0, _mantine_vue_core.useDirection)();
|
|
374
|
+
const [emblaNode, embla] = (0, embla_carousel_vue.default)((0, vue.computed)(() => ({
|
|
375
|
+
axis: props.orientation === "horizontal" ? "x" : "y",
|
|
376
|
+
direction: props.orientation === "horizontal" ? dir.value : void 0,
|
|
377
|
+
startIndex: props.initialSlide,
|
|
378
|
+
...defaultEmblaOptions,
|
|
379
|
+
...props.emblaOptions
|
|
380
|
+
})), (0, vue.computed)(() => props.plugins ?? []));
|
|
381
|
+
const selected = (0, vue.ref)(0);
|
|
382
|
+
const slidesCount = (0, vue.ref)(0);
|
|
383
|
+
const slotSlideCount = (0, vue.ref)(0);
|
|
384
|
+
const handleScroll = (index) => {
|
|
385
|
+
embla.value?.scrollTo(index);
|
|
386
|
+
};
|
|
387
|
+
const handleSelect = () => {
|
|
388
|
+
const instance = embla.value;
|
|
389
|
+
if (!instance) return;
|
|
390
|
+
const slide = instance.selectedScrollSnap();
|
|
391
|
+
const changed = slide !== selected.value;
|
|
392
|
+
selected.value = slide;
|
|
393
|
+
if (changed) props.onSlideChange?.(slide);
|
|
394
|
+
};
|
|
395
|
+
const handlePrevious = () => {
|
|
396
|
+
embla.value?.scrollPrev();
|
|
397
|
+
props.onPreviousSlide?.();
|
|
398
|
+
};
|
|
399
|
+
const handleNext = () => {
|
|
400
|
+
embla.value?.scrollNext();
|
|
401
|
+
props.onNextSlide?.();
|
|
402
|
+
};
|
|
403
|
+
const handleKeydown = (event) => {
|
|
404
|
+
if (!props.withKeyboardEvents) return;
|
|
405
|
+
if (event.key === "ArrowRight") {
|
|
406
|
+
event.preventDefault();
|
|
407
|
+
handleNext();
|
|
408
|
+
}
|
|
409
|
+
if (event.key === "ArrowLeft") {
|
|
410
|
+
event.preventDefault();
|
|
411
|
+
handlePrevious();
|
|
412
|
+
}
|
|
413
|
+
if (event.key === "Home") {
|
|
414
|
+
event.preventDefault();
|
|
415
|
+
embla.value?.scrollTo(0);
|
|
416
|
+
}
|
|
417
|
+
if (event.key === "End") {
|
|
418
|
+
event.preventDefault();
|
|
419
|
+
embla.value?.scrollTo(embla.value.scrollSnapList().length - 1);
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
const handleIndicatorKeyDown = (event, index) => {
|
|
423
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
424
|
+
const nextKey = isHorizontal ? "ArrowRight" : "ArrowDown";
|
|
425
|
+
const prevKey = isHorizontal ? "ArrowLeft" : "ArrowUp";
|
|
426
|
+
const parent = event.currentTarget?.parentElement;
|
|
427
|
+
if (event.key === nextKey) {
|
|
428
|
+
event.preventDefault();
|
|
429
|
+
const nextIndex = getNextIndicatorIndex(index, slidesCount.value);
|
|
430
|
+
handleScroll(nextIndex);
|
|
431
|
+
(parent?.children[nextIndex])?.focus();
|
|
432
|
+
}
|
|
433
|
+
if (event.key === prevKey) {
|
|
434
|
+
event.preventDefault();
|
|
435
|
+
const prevIndex = getPreviousIndicatorIndex(index, slidesCount.value);
|
|
436
|
+
handleScroll(prevIndex);
|
|
437
|
+
(parent?.children[prevIndex])?.focus();
|
|
438
|
+
}
|
|
439
|
+
if (event.key === "Home") {
|
|
440
|
+
event.preventDefault();
|
|
441
|
+
handleScroll(0);
|
|
442
|
+
(parent?.children[0])?.focus();
|
|
443
|
+
}
|
|
444
|
+
if (event.key === "End") {
|
|
445
|
+
event.preventDefault();
|
|
446
|
+
handleScroll(slidesCount.value - 1);
|
|
447
|
+
(parent?.children[slidesCount.value - 1])?.focus();
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
(0, vue.watch)(embla, (instance, _prev, onCleanup) => {
|
|
451
|
+
if (!instance) return;
|
|
452
|
+
props.getEmblaApi?.(instance);
|
|
453
|
+
handleSelect();
|
|
454
|
+
slidesCount.value = instance.scrollSnapList().length;
|
|
455
|
+
instance.on("select", handleSelect);
|
|
456
|
+
onCleanup(() => {
|
|
457
|
+
instance.off("select", handleSelect);
|
|
458
|
+
});
|
|
459
|
+
}, { immediate: true });
|
|
460
|
+
(0, vue.watch)([slotSlideCount, () => props.emblaOptions?.slidesToScroll], ([childrenCount]) => {
|
|
461
|
+
const instance = embla.value;
|
|
462
|
+
if (!instance) return;
|
|
463
|
+
instance.reInit();
|
|
464
|
+
slidesCount.value = instance.scrollSnapList().length;
|
|
465
|
+
selected.value = clamp(selected.value, 0, childrenCount - 1);
|
|
466
|
+
});
|
|
467
|
+
provideCarouselContext({
|
|
468
|
+
getStyles,
|
|
469
|
+
get orientation() {
|
|
470
|
+
return props.orientation;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
return () => {
|
|
474
|
+
const canScrollPrev = embla.value?.canScrollPrev() || false;
|
|
475
|
+
const canScrollNext = embla.value?.canScrollNext() || false;
|
|
476
|
+
const defaultSlot = slots.default?.();
|
|
477
|
+
slotSlideCount.value = countRealSlides(defaultSlot);
|
|
478
|
+
const indicators = Array(slidesCount.value).fill(0).map((_, index) => (0, vue.h)(_mantine_vue_core.UnstyledButton, {
|
|
479
|
+
...getStyles("indicator"),
|
|
480
|
+
key: index,
|
|
481
|
+
role: "tab",
|
|
482
|
+
"aria-label": `Go to slide ${index + 1}`,
|
|
483
|
+
"aria-selected": index === selected.value,
|
|
484
|
+
tabindex: index === selected.value ? 0 : -1,
|
|
485
|
+
"data-active": index === selected.value || void 0,
|
|
486
|
+
onClick: () => handleScroll(index),
|
|
487
|
+
onKeydown: (event) => handleIndicatorKeyDown(event, index),
|
|
488
|
+
"data-orientation": props.orientation,
|
|
489
|
+
onMousedown: (event) => event.preventDefault(),
|
|
490
|
+
...props.getIndicatorProps?.(index)
|
|
491
|
+
}));
|
|
492
|
+
const variablesProps = {
|
|
493
|
+
selector: `.${responsiveClassName}`,
|
|
494
|
+
slideSize: props.slideSize,
|
|
495
|
+
slideGap: props.slideGap
|
|
496
|
+
};
|
|
497
|
+
return [props.type === "container" ? (0, vue.h)(CarouselContainerVariables, variablesProps) : (0, vue.h)(CarouselVariables, variablesProps), (0, vue.h)(_mantine_vue_core.Box, {
|
|
498
|
+
role: "region",
|
|
499
|
+
"aria-roledescription": "carousel",
|
|
500
|
+
...attrs,
|
|
501
|
+
...getStyles("root", { className: responsiveClassName }),
|
|
502
|
+
id: _id.value,
|
|
503
|
+
mod: [{
|
|
504
|
+
orientation: props.orientation,
|
|
505
|
+
"include-gap-in-size": props.includeGapInSize
|
|
506
|
+
}, props.mod],
|
|
507
|
+
onKeydownCapture: handleKeydown
|
|
508
|
+
}, () => [
|
|
509
|
+
(0, vue.h)(_mantine_vue_core.VisuallyHidden, {
|
|
510
|
+
role: "status",
|
|
511
|
+
"aria-live": "polite",
|
|
512
|
+
"aria-atomic": "true"
|
|
513
|
+
}, () => slidesCount.value > 0 ? `Slide ${selected.value + 1} of ${slidesCount.value}` : ""),
|
|
514
|
+
props.withControls && (0, vue.h)("div", {
|
|
515
|
+
...getStyles("controls"),
|
|
516
|
+
"data-orientation": props.orientation
|
|
517
|
+
}, [(0, vue.h)(_mantine_vue_core.UnstyledButton, {
|
|
518
|
+
"aria-controls": _id.value,
|
|
519
|
+
"aria-label": "Previous slide",
|
|
520
|
+
"aria-disabled": !canScrollPrev,
|
|
521
|
+
"data-inactive": !canScrollPrev || void 0,
|
|
522
|
+
"data-type": "previous",
|
|
523
|
+
tabindex: canScrollPrev ? 0 : -1,
|
|
524
|
+
...props.previousControlProps,
|
|
525
|
+
...getStyles("control", {
|
|
526
|
+
className: props.previousControlProps?.className,
|
|
527
|
+
style: props.previousControlProps?.style
|
|
528
|
+
}),
|
|
529
|
+
onClick: (event) => {
|
|
530
|
+
handlePrevious();
|
|
531
|
+
props.previousControlProps?.onClick?.(event);
|
|
532
|
+
}
|
|
533
|
+
}, () => typeof props.previousControlIcon !== "undefined" ? props.previousControlIcon : (0, vue.h)(_mantine_vue_core.AccordionChevron, { style: { transform: `rotate(${getChevronRotation({
|
|
534
|
+
dir: dir.value,
|
|
535
|
+
orientation: props.orientation,
|
|
536
|
+
direction: "previous"
|
|
537
|
+
})}deg)` } })), (0, vue.h)(_mantine_vue_core.UnstyledButton, {
|
|
538
|
+
"aria-controls": _id.value,
|
|
539
|
+
"aria-label": "Next slide",
|
|
540
|
+
"aria-disabled": !canScrollNext,
|
|
541
|
+
"data-inactive": !canScrollNext || void 0,
|
|
542
|
+
"data-type": "next",
|
|
543
|
+
tabindex: canScrollNext ? 0 : -1,
|
|
544
|
+
...getStyles("control", {
|
|
545
|
+
className: props.nextControlProps?.className,
|
|
546
|
+
style: props.nextControlProps?.style
|
|
547
|
+
}),
|
|
548
|
+
...props.nextControlProps,
|
|
549
|
+
onClick: (event) => {
|
|
550
|
+
handleNext();
|
|
551
|
+
props.nextControlProps?.onClick?.(event);
|
|
552
|
+
}
|
|
553
|
+
}, () => typeof props.nextControlIcon !== "undefined" ? props.nextControlIcon : (0, vue.h)(_mantine_vue_core.AccordionChevron, { style: { transform: `rotate(${getChevronRotation({
|
|
554
|
+
dir: dir.value,
|
|
555
|
+
orientation: props.orientation,
|
|
556
|
+
direction: "next"
|
|
557
|
+
})}deg)` } }))]),
|
|
558
|
+
(0, vue.h)("div", {
|
|
559
|
+
...getStyles("viewport"),
|
|
560
|
+
ref: emblaNode,
|
|
561
|
+
"data-type": props.type
|
|
562
|
+
}, [(0, vue.h)("div", {
|
|
563
|
+
...getStyles("container", { className: responsiveClassName }),
|
|
564
|
+
"data-orientation": props.orientation
|
|
565
|
+
}, defaultSlot)]),
|
|
566
|
+
props.withIndicators && (0, vue.h)("div", {
|
|
567
|
+
...getStyles("indicators"),
|
|
568
|
+
role: "tablist",
|
|
569
|
+
"aria-label": "Slides",
|
|
570
|
+
"data-orientation": props.orientation
|
|
571
|
+
}, indicators)
|
|
572
|
+
])];
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
var Carousel = Object.assign((0, _mantine_vue_core.withBoxProps)(CarouselBaseComponent), {
|
|
577
|
+
classes: Carousel_module_default,
|
|
578
|
+
varsResolver,
|
|
579
|
+
Slide: CarouselSlide
|
|
580
|
+
});
|
|
581
|
+
//#endregion
|
|
582
|
+
exports.Carousel = Carousel;
|
|
583
|
+
exports.CarouselSlide = CarouselSlide;
|
|
584
|
+
exports.useCarouselContext = useCarouselContext;
|
|
585
|
+
|
|
586
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/Carousel.context.ts","../src/Carousel.module.css","../src/CarouselSlide.ts","../src/CarouselVariables.ts","../src/get-chevron-rotation.ts","../src/get-indicator-navigation.ts","../src/Carousel.ts"],"sourcesContent":["import { createSafeContext } from '@mantine-vue/core'\n\nexport interface CarouselContextValue {\n getStyles: (selector: string, options?: Record<string, any>) => Record<string, any>\n orientation: 'horizontal' | 'vertical' | undefined\n}\n\nexport const [provideCarouselContext, useCarouselContext] = createSafeContext<CarouselContextValue>(\n 'Carousel component was not found in tree',\n)\n",".root {\n --carousel-height: auto;\n position: relative;\n}\n\n.viewport {\n height: var(--carousel-height);\n overflow: hidden;\n\n &[data-type='container'] {\n container: carousel / inline-size;\n }\n}\n\n.container {\n display: flex;\n flex-direction: row;\n height: var(--carousel-height);\n\n :where([data-include-gap-in-size]) & {\n &:where([data-orientation='vertical']) {\n margin-bottom: calc(var(--carousel-slide-gap) * -1);\n }\n\n &:where([data-orientation='horizontal']) {\n margin-inline-end: calc(var(--carousel-slide-gap) * -1);\n }\n }\n\n &:where([data-orientation='vertical']) {\n flex-direction: column;\n }\n}\n\n.controls {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: space-between;\n z-index: 1;\n pointer-events: none;\n\n &:where([data-orientation='vertical']) {\n inset-inline-start: calc(50% - var(--carousel-control-size) / 2);\n top: 0;\n bottom: 0;\n flex-direction: column;\n padding: var(--carousel-controls-offset) 0;\n }\n\n &:where([data-orientation='horizontal']) {\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: calc(50% - var(--carousel-control-size) / 2);\n flex-direction: row;\n padding: 0 var(--carousel-controls-offset);\n }\n}\n\n.control {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: var(--carousel-control-size);\n min-height: var(--carousel-control-size);\n border-radius: var(--carousel-control-size);\n pointer-events: all;\n background-color: var(--mantine-color-white);\n color: var(--mantine-color-black);\n box-shadow: var(--mantine-shadow-md);\n border: 1px solid var(--mantine-color-gray-3);\n transition: opacity 100ms ease;\n\n @mixin where-light {\n opacity: 0.85;\n }\n\n @mixin where-dark {\n opacity: 0.65;\n }\n\n @mixin hover {\n opacity: 1;\n }\n}\n\n.indicators {\n position: absolute;\n display: flex;\n justify-content: center;\n gap: 8px;\n pointer-events: none;\n\n &:where([data-orientation='vertical']) {\n bottom: 0;\n top: 0;\n inset-inline-end: var(--mantine-spacing-md);\n flex-direction: column;\n }\n\n &:where([data-orientation='horizontal']) {\n bottom: var(--mantine-spacing-md);\n inset-inline-start: 0;\n inset-inline-end: 0;\n flex-direction: row;\n }\n}\n\n.indicator {\n pointer-events: all;\n border-radius: var(--mantine-radius-xl);\n box-shadow: var(--mantine-shadow-sm);\n opacity: 0.6;\n background-color: var(--mantine-color-white);\n\n @mixin hover {\n opacity: 1;\n }\n\n &:where([data-active]) {\n opacity: 1;\n }\n\n &:where([data-orientation='vertical']) {\n width: 5px;\n height: 25px;\n }\n\n &:where([data-orientation='horizontal']) {\n width: 25px;\n height: 5px;\n }\n}\n\n.slide {\n position: relative;\n flex: 0 0 var(--carousel-slide-size, 100%);\n\n .root:where([data-include-gap-in-size]) & {\n &:where([data-orientation='vertical']) {\n padding-bottom: var(--carousel-slide-gap);\n }\n\n &:where([data-orientation='horizontal']) {\n padding-inline-end: var(--carousel-slide-gap);\n }\n }\n\n .root:where(:not([data-include-gap-in-size])) & {\n &:where([data-orientation='vertical']) {\n margin-bottom: var(--carousel-slide-gap);\n }\n\n &:where([data-orientation='horizontal']) {\n margin-inline-end: var(--carousel-slide-gap);\n }\n }\n}\n","import { defineComponent, h, type PropType } from 'vue'\nimport { Box, withBoxProps } from '@mantine-vue/core'\nimport { useCarouselContext } from './Carousel.context'\nimport classes from './Carousel.module.css'\n\nexport type CarouselSlideStylesNames = 'slide'\n\nexport interface CarouselSlideProps {\n classNames?: any\n styles?: any\n mod?: any\n}\n\nconst CarouselSlideBaseComponent = defineComponent({\n name: 'CarouselSlide',\n inheritAttrs: false,\n props: {\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n mod: { type: [Object, Array] as PropType<any>, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const ctx = useCarouselContext()\n\n return () =>\n h(\n Box,\n {\n mod: [{ orientation: ctx.orientation }, props.mod],\n role: 'group',\n 'aria-roledescription': 'slide',\n 'aria-label': 'Carousel slide',\n ...attrs,\n ...ctx.getStyles('slide', {\n className: attrs.class,\n style: attrs.style,\n classNames: props.classNames,\n styles: props.styles,\n }),\n },\n slots,\n )\n },\n})\n\nexport const CarouselSlide = Object.assign(withBoxProps(CarouselSlideBaseComponent), { classes })\n","import { defineComponent, h, type PropType } from 'vue'\nimport {\n filterProps,\n getBaseValue,\n getSortedBreakpoints,\n getSpacing,\n InlineStyles,\n keys,\n px,\n rem,\n useMantineTheme,\n} from '@mantine-vue/core'\n\ntype StyleProp<T> = T | Partial<Record<string, T>>\n\nfunction isObject(value: unknown): value is Record<string, any> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nconst sharedProps = {\n selector: { type: String, required: true },\n slideSize: {\n type: [String, Number, Object] as PropType<StyleProp<string | number>>,\n default: undefined,\n },\n slideGap: {\n type: [String, Number, Object] as PropType<StyleProp<string | number>>,\n default: undefined,\n },\n}\n\nexport const CarouselVariables = defineComponent({\n name: 'CarouselVariables',\n props: sharedProps,\n setup(props) {\n const theme = useMantineTheme()\n\n return () => {\n const baseStyles = filterProps({\n '--carousel-slide-gap': getSpacing(getBaseValue(props.slideGap)),\n '--carousel-slide-size': rem(getBaseValue(props.slideSize)),\n })\n\n const queries = keys(theme.value.breakpoints).reduce<Record<string, Record<string, any>>>(\n (acc, breakpoint) => {\n acc[breakpoint] = acc[breakpoint] ?? {}\n\n if (isObject(props.slideGap) && props.slideGap[breakpoint] !== undefined) {\n acc[breakpoint]['--carousel-slide-gap'] = getSpacing(props.slideGap[breakpoint])\n }\n\n if (isObject(props.slideSize) && props.slideSize[breakpoint] !== undefined) {\n acc[breakpoint]['--carousel-slide-size'] = rem(props.slideSize[breakpoint])\n }\n\n return acc\n },\n {},\n )\n\n const media = getSortedBreakpoints(theme.value.breakpoints).reduce<\n Record<string, Record<string, any>>\n >((acc, item) => {\n if (keys(queries[item.breakpoint] ?? {}).length > 0) {\n acc[`(min-width: ${theme.value.breakpoints[item.breakpoint]})`] = queries[item.breakpoint]\n }\n\n return acc\n }, {})\n\n return h(InlineStyles, { selector: props.selector!, styles: baseStyles, media })\n }\n },\n})\n\nfunction getBreakpoints(values: unknown) {\n return isObject(values) ? keys(values).filter((breakpoint) => breakpoint !== 'base') : []\n}\n\nfunction sortBreakpoints(breakpoints: string[]) {\n return breakpoints.sort((a, b) => px(a) - px(b))\n}\n\nexport const CarouselContainerVariables = defineComponent({\n name: 'CarouselContainerVariables',\n props: sharedProps,\n setup(props) {\n return () => {\n const baseStyles = filterProps({\n '--carousel-slide-gap': getSpacing(getBaseValue(props.slideGap)),\n '--carousel-slide-size': rem(getBaseValue(props.slideSize)),\n })\n\n const breakpoints = sortBreakpoints(\n Array.from(\n new Set([...getBreakpoints(props.slideGap), ...getBreakpoints(props.slideSize)]),\n ),\n )\n\n const container = breakpoints.reduce<Record<string, Record<string, any>>>(\n (acc, breakpoint) => {\n const key = `carousel (min-width: ${breakpoint})`\n acc[key] = {}\n\n if (isObject(props.slideGap) && props.slideGap[breakpoint] !== undefined) {\n acc[key]['--carousel-slide-gap'] = getSpacing(props.slideGap[breakpoint])\n }\n\n if (isObject(props.slideSize) && props.slideSize[breakpoint] !== undefined) {\n acc[key]['--carousel-slide-size'] = rem(props.slideSize[breakpoint])\n }\n\n return acc\n },\n {},\n )\n\n return h(InlineStyles, { selector: props.selector!, styles: baseStyles, container })\n }\n },\n})\n","// Ported verbatim from @mantine/carousel/src/get-chevron-rotation.ts – pure function, no\n// React/Vue specifics.\nexport interface GetChevronRotationOptions {\n dir: 'rtl' | 'ltr'\n orientation: 'horizontal' | 'vertical' | undefined\n direction: 'next' | 'previous'\n}\n\nexport function getChevronRotation({ dir, orientation, direction }: GetChevronRotationOptions) {\n if (direction === 'previous') {\n return orientation === 'horizontal' ? 90 * (dir === 'ltr' ? 1 : -1) : -180\n }\n\n return orientation === 'horizontal' ? 90 * (dir === 'ltr' ? -1 : 1) : 0\n}\n","// Extracted so the wrap-around index math can be unit tested without mounting a component.\nexport function getNextIndicatorIndex(index: number, total: number): number {\n return index < total - 1 ? index + 1 : 0\n}\n\nexport function getPreviousIndicatorIndex(index: number, total: number): number {\n return index > 0 ? index - 1 : total - 1\n}\n\n// Note: when `max < min` (e.g. an empty carousel), this clamps to `max`, not `min`.\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max)\n}\n","import {\n Comment,\n computed,\n defineComponent,\n h,\n ref,\n watch,\n type DefineComponent,\n type PropType,\n type VNode,\n} from 'vue'\nimport emblaCarouselVue from 'embla-carousel-vue'\nimport type { EmblaCarouselType, EmblaOptionsType, EmblaPluginType } from 'embla-carousel'\nimport { useId } from '@mantine-vue/hooks'\nimport {\n Box,\n createVarsResolver,\n getSpacing,\n rem,\n useDirection,\n useProps,\n useStyles,\n UnstyledButton,\n VisuallyHidden,\n withBoxProps,\n AccordionChevron,\n} from '@mantine-vue/core'\nimport { provideCarouselContext } from './Carousel.context'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselContainerVariables, CarouselVariables } from './CarouselVariables'\nimport { getChevronRotation } from './get-chevron-rotation'\nimport { clamp, getNextIndicatorIndex, getPreviousIndicatorIndex } from './get-indicator-navigation'\nimport classes from './Carousel.module.css'\n\nexport type CarouselStylesNames =\n | 'slide'\n | 'root'\n | 'viewport'\n | 'container'\n | 'controls'\n | 'control'\n | 'indicators'\n | 'indicator'\n\nexport interface CarouselProps {\n /** Options passed down to embla carousel */\n emblaOptions?: EmblaOptionsType\n /** Called when next slide is shown */\n onNextSlide?: () => void\n /** Called when previous slider is shown */\n onPreviousSlide?: () => void\n /** Called with slide index when slide changes */\n onSlideChange?: (index: number) => void\n /** Get embla API as ref */\n getEmblaApi?: (embla: EmblaCarouselType) => void\n /** Props passed down to next control */\n nextControlProps?: Record<string, any>\n /** Props passed down to previous control */\n previousControlProps?: Record<string, any>\n /** Controls size of the next and previous controls @default 26 */\n controlSize?: string | number\n /** Controls position of the next and previous controls, key of `theme.spacing` or any valid CSS value @default 'sm' */\n controlsOffset?: string | number\n /** Controls slide width based on viewport width @default '100%' */\n slideSize?: string | number | Record<string, string | number>\n /** Key of theme.spacing or number to set gap between slides */\n slideGap?: string | number | Record<string, string | number>\n /** Carousel orientation @default 'horizontal' */\n orientation?: 'horizontal' | 'vertical'\n /** Determines type of queries used for responsive styles @default 'media' */\n type?: 'media' | 'container'\n /** Slides container `height`, required for vertical orientation */\n height?: string | number\n /** Determines whether gap between slides should be treated as part of the slide size @default true */\n includeGapInSize?: boolean\n /** Index of initial slide */\n initialSlide?: number\n /** Determines whether next/previous controls should be displayed @default true */\n withControls?: boolean\n /** Determines whether indicators should be displayed @default false */\n withIndicators?: boolean\n /** A list of embla plugins */\n plugins?: EmblaPluginType[]\n /** Icon of the next control */\n nextControlIcon?: any\n /** Icon of the previous control */\n previousControlIcon?: any\n /** Determines whether arrow key should switch slides @default true */\n withKeyboardEvents?: boolean\n /** Function to get props for indicator button */\n getIndicatorProps?: (index: number) => Record<string, any>\n id?: string\n classNames?: any\n styles?: any\n vars?: any\n unstyled?: boolean\n mod?: any\n}\n\nconst defaultProps = {\n controlSize: 26,\n controlsOffset: 'sm',\n slideSize: '100%',\n slideGap: 0,\n orientation: 'horizontal',\n includeGapInSize: true,\n initialSlide: 0,\n withControls: true,\n withIndicators: false,\n withKeyboardEvents: true,\n type: 'media',\n} as const\n\nconst defaultEmblaOptions: EmblaOptionsType = {\n align: 'center',\n loop: false,\n slidesToScroll: 1,\n dragFree: false,\n inViewThreshold: 0,\n skipSnaps: false,\n containScroll: 'trimSnaps',\n}\n\nconst varsResolver = createVarsResolver<any>((_, { height, controlSize, controlsOffset }) => ({\n root: {\n '--carousel-height': rem(height),\n '--carousel-control-size': rem(controlSize),\n '--carousel-controls-offset': getSpacing(controlsOffset),\n },\n}))\n\nfunction useRandomClassName() {\n return `__mantine-vue-carousel-${Math.random().toString(36).slice(2, 9)}`\n}\n\nfunction countRealSlides(nodes: VNode[] | undefined): number {\n if (!nodes) {\n return 0\n }\n\n return nodes.filter((node) => node.type !== Comment).length\n}\n\nconst CarouselBaseComponent = defineComponent({\n name: 'Carousel',\n inheritAttrs: false,\n props: {\n emblaOptions: { type: Object as PropType<EmblaOptionsType>, default: undefined },\n onNextSlide: { type: Function as PropType<() => void>, default: undefined },\n onPreviousSlide: { type: Function as PropType<() => void>, default: undefined },\n onSlideChange: { type: Function as PropType<(index: number) => void>, default: undefined },\n getEmblaApi: {\n type: Function as PropType<(embla: EmblaCarouselType) => void>,\n default: undefined,\n },\n nextControlProps: { type: Object as PropType<Record<string, any>>, default: undefined },\n previousControlProps: { type: Object as PropType<Record<string, any>>, default: undefined },\n controlSize: { type: [String, Number], default: undefined },\n controlsOffset: { type: [String, Number], default: undefined },\n slideSize: { type: [String, Number, Object], default: undefined },\n slideGap: { type: [String, Number, Object], default: undefined },\n orientation: { type: String as PropType<'horizontal' | 'vertical'>, default: undefined },\n type: { type: String as PropType<'media' | 'container'>, default: undefined },\n height: { type: [String, Number], default: undefined },\n includeGapInSize: { type: Boolean, default: undefined },\n initialSlide: { type: Number, default: undefined },\n withControls: { type: Boolean, default: undefined },\n withIndicators: { type: Boolean, default: undefined },\n plugins: { type: Array as PropType<EmblaPluginType[]>, default: undefined },\n nextControlIcon: { type: null, default: undefined },\n previousControlIcon: { type: null, default: undefined },\n withKeyboardEvents: { type: Boolean, default: undefined },\n getIndicatorProps: {\n type: Function as PropType<(index: number) => Record<string, any>>,\n default: undefined,\n },\n id: { type: String, default: undefined },\n mod: { type: [Object, Array] as PropType<any>, default: undefined },\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n vars: { type: [Object, Function], default: undefined },\n unstyled: { type: Boolean, default: false },\n },\n setup(rawProps, { attrs, slots }) {\n const props = useProps('Carousel', defaultProps, rawProps)\n\n const getStyles = useStyles({\n name: 'Carousel',\n classes,\n props,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n get classNames() {\n return props.classNames as any\n },\n get styles() {\n return props.styles as any\n },\n get unstyled() {\n return props.unstyled\n },\n get vars() {\n return props.vars as any\n },\n varsResolver,\n })\n\n const _id = useId(props.id)\n const responsiveClassName = useRandomClassName()\n const { dir } = useDirection()\n\n const emblaOptionsRef = computed<EmblaOptionsType>(() => ({\n axis: props.orientation === 'horizontal' ? 'x' : 'y',\n direction: props.orientation === 'horizontal' ? dir.value : undefined,\n startIndex: props.initialSlide,\n ...defaultEmblaOptions,\n ...props.emblaOptions,\n }))\n const pluginsRef = computed(() => props.plugins ?? [])\n\n const [emblaNode, embla] = emblaCarouselVue(emblaOptionsRef, pluginsRef)\n\n const selected = ref(0)\n const slidesCount = ref(0)\n const slotSlideCount = ref(0)\n\n const handleScroll = (index: number) => {\n embla.value?.scrollTo(index)\n }\n\n const handleSelect = () => {\n const instance = embla.value\n if (!instance) {\n return\n }\n const slide = instance.selectedScrollSnap()\n const changed = slide !== selected.value\n selected.value = slide\n if (changed) {\n props.onSlideChange?.(slide)\n }\n }\n\n const handlePrevious = () => {\n embla.value?.scrollPrev()\n props.onPreviousSlide?.()\n }\n\n const handleNext = () => {\n embla.value?.scrollNext()\n props.onNextSlide?.()\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (!props.withKeyboardEvents) {\n return\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n handleNext()\n }\n\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n handlePrevious()\n }\n\n if (event.key === 'Home') {\n event.preventDefault()\n embla.value?.scrollTo(0)\n }\n\n if (event.key === 'End') {\n event.preventDefault()\n embla.value?.scrollTo(embla.value.scrollSnapList().length - 1)\n }\n }\n\n const handleIndicatorKeyDown = (event: KeyboardEvent, index: number) => {\n const isHorizontal = props.orientation === 'horizontal'\n const nextKey = isHorizontal ? 'ArrowRight' : 'ArrowDown'\n const prevKey = isHorizontal ? 'ArrowLeft' : 'ArrowUp'\n const parent = (event.currentTarget as HTMLElement | null)?.parentElement\n\n if (event.key === nextKey) {\n event.preventDefault()\n const nextIndex = getNextIndicatorIndex(index, slidesCount.value)\n handleScroll(nextIndex)\n ;(parent?.children[nextIndex] as HTMLElement | undefined)?.focus()\n }\n\n if (event.key === prevKey) {\n event.preventDefault()\n const prevIndex = getPreviousIndicatorIndex(index, slidesCount.value)\n handleScroll(prevIndex)\n ;(parent?.children[prevIndex] as HTMLElement | undefined)?.focus()\n }\n\n if (event.key === 'Home') {\n event.preventDefault()\n handleScroll(0)\n ;(parent?.children[0] as HTMLElement | undefined)?.focus()\n }\n\n if (event.key === 'End') {\n event.preventDefault()\n handleScroll(slidesCount.value - 1)\n ;(parent?.children[slidesCount.value - 1] as HTMLElement | undefined)?.focus()\n }\n }\n\n watch(\n embla,\n (instance, _prev, onCleanup) => {\n if (!instance) {\n return\n }\n\n props.getEmblaApi?.(instance)\n handleSelect()\n slidesCount.value = instance.scrollSnapList().length\n instance.on('select', handleSelect)\n\n onCleanup(() => {\n instance.off('select', handleSelect)\n })\n },\n { immediate: true },\n )\n\n watch([slotSlideCount, () => props.emblaOptions?.slidesToScroll], ([childrenCount]) => {\n const instance = embla.value\n if (!instance) {\n return\n }\n\n instance.reInit()\n slidesCount.value = instance.scrollSnapList().length\n selected.value = clamp(selected.value, 0, childrenCount - 1)\n })\n\n provideCarouselContext({\n getStyles,\n get orientation() {\n return props.orientation\n },\n } as any)\n\n return () => {\n const canScrollPrev = embla.value?.canScrollPrev() || false\n const canScrollNext = embla.value?.canScrollNext() || false\n\n const defaultSlot = slots.default?.()\n slotSlideCount.value = countRealSlides(defaultSlot)\n\n const indicators = Array(slidesCount.value)\n .fill(0)\n .map((_, index) =>\n h(UnstyledButton, {\n ...getStyles('indicator'),\n key: index,\n role: 'tab',\n 'aria-label': `Go to slide ${index + 1}`,\n 'aria-selected': index === selected.value,\n tabindex: index === selected.value ? 0 : -1,\n 'data-active': index === selected.value || undefined,\n onClick: () => handleScroll(index),\n onKeydown: (event: KeyboardEvent) => handleIndicatorKeyDown(event, index),\n 'data-orientation': props.orientation,\n onMousedown: (event: Event) => event.preventDefault(),\n ...props.getIndicatorProps?.(index),\n }),\n )\n\n const variablesProps = {\n selector: `.${responsiveClassName}`,\n slideSize: props.slideSize,\n slideGap: props.slideGap,\n }\n\n return [\n props.type === 'container'\n ? h(CarouselContainerVariables, variablesProps)\n : h(CarouselVariables, variablesProps),\n\n h(\n Box,\n {\n role: 'region',\n 'aria-roledescription': 'carousel',\n ...attrs,\n ...getStyles('root', { className: responsiveClassName }),\n id: _id.value,\n mod: [\n { orientation: props.orientation, 'include-gap-in-size': props.includeGapInSize },\n props.mod,\n ],\n onKeydownCapture: handleKeydown,\n },\n () => [\n h(\n VisuallyHidden,\n { role: 'status', 'aria-live': 'polite', 'aria-atomic': 'true' },\n () =>\n slidesCount.value > 0 ? `Slide ${selected.value + 1} of ${slidesCount.value}` : '',\n ),\n\n props.withControls &&\n h('div', { ...getStyles('controls'), 'data-orientation': props.orientation }, [\n h(\n UnstyledButton,\n {\n 'aria-controls': _id.value,\n 'aria-label': 'Previous slide',\n 'aria-disabled': !canScrollPrev,\n 'data-inactive': !canScrollPrev || undefined,\n 'data-type': 'previous',\n tabindex: canScrollPrev ? 0 : -1,\n ...props.previousControlProps,\n ...getStyles('control', {\n className: props.previousControlProps?.className,\n style: props.previousControlProps?.style,\n }),\n onClick: (event: Event) => {\n handlePrevious()\n props.previousControlProps?.onClick?.(event)\n },\n },\n () =>\n typeof props.previousControlIcon !== 'undefined'\n ? props.previousControlIcon\n : h(AccordionChevron, {\n style: {\n transform: `rotate(${getChevronRotation({\n dir: dir.value,\n orientation: props.orientation,\n direction: 'previous',\n })}deg)`,\n },\n }),\n ),\n\n h(\n UnstyledButton,\n {\n 'aria-controls': _id.value,\n 'aria-label': 'Next slide',\n 'aria-disabled': !canScrollNext,\n 'data-inactive': !canScrollNext || undefined,\n 'data-type': 'next',\n tabindex: canScrollNext ? 0 : -1,\n ...getStyles('control', {\n className: props.nextControlProps?.className,\n style: props.nextControlProps?.style,\n }),\n ...props.nextControlProps,\n onClick: (event: Event) => {\n handleNext()\n props.nextControlProps?.onClick?.(event)\n },\n },\n () =>\n typeof props.nextControlIcon !== 'undefined'\n ? props.nextControlIcon\n : h(AccordionChevron, {\n style: {\n transform: `rotate(${getChevronRotation({\n dir: dir.value,\n orientation: props.orientation,\n direction: 'next',\n })}deg)`,\n },\n }),\n ),\n ]),\n\n h('div', { ...getStyles('viewport'), ref: emblaNode, 'data-type': props.type }, [\n h(\n 'div',\n {\n ...getStyles('container', { className: responsiveClassName }),\n 'data-orientation': props.orientation,\n },\n defaultSlot,\n ),\n ]),\n\n props.withIndicators &&\n h(\n 'div',\n {\n ...getStyles('indicators'),\n role: 'tablist',\n 'aria-label': 'Slides',\n 'data-orientation': props.orientation,\n },\n indicators,\n ),\n ],\n ),\n ]\n }\n },\n})\n\nexport const Carousel: DefineComponent<CarouselProps> & {\n classes: typeof classes\n varsResolver: typeof varsResolver\n Slide: typeof CarouselSlide\n} = Object.assign(withBoxProps(CarouselBaseComponent) as DefineComponent<CarouselProps>, {\n classes,\n varsResolver,\n Slide: CarouselSlide,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAa,CAAC,wBAAwB,uBAAA,GAAA,kBAAA,mBACpC,0CACF;;;;;;;;;;;;;AEIA,IAAM,8BAAA,GAAA,IAAA,iBAA6C;CACjD,MAAM;CACN,cAAc;CACd,OAAO;EACL,YAAY;GAAE,MAAM,CAAC,QAAQ,QAAQ;GAAG,SAAS,KAAA;EAAU;EAC3D,QAAQ;GAAE,MAAM,CAAC,QAAQ,QAAQ;GAAG,SAAS,KAAA;EAAU;EACvD,KAAK;GAAE,MAAM,CAAC,QAAQ,KAAK;GAAoB,SAAS,KAAA;EAAU;CACpE;CACA,MAAM,OAAO,EAAE,OAAO,SAAS;EAC7B,MAAM,MAAM,mBAAmB;EAE/B,cAAA,GAAA,IAAA,GAEI,kBAAA,KACA;GACE,KAAK,CAAC,EAAE,aAAa,IAAI,YAAY,GAAG,MAAM,GAAG;GACjD,MAAM;GACN,wBAAwB;GACxB,cAAc;GACd,GAAG;GACH,GAAG,IAAI,UAAU,SAAS;IACxB,WAAW,MAAM;IACjB,OAAO,MAAM;IACb,YAAY,MAAM;IAClB,QAAQ,MAAM;GAChB,CAAC;EACH,GACA,KACF;CACJ;AACF,CAAC;AAED,IAAa,gBAAgB,OAAO,QAAA,GAAA,kBAAA,cAAoB,0BAA0B,GAAG,EAAE,SAAA,wBA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