@mantine-vue/carousel 3.0.0 → 3.2.0
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 +360 -431
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +359 -433
- package/esm/index.mjs.map +1 -1
- package/lib/components/Carousel/Carousel.types.d.ts +86 -0
- package/lib/components/Carousel/Carousel.vue.d.ts +19 -0
- package/lib/components/Carousel/index.d.ts +17 -0
- package/lib/components/CarouselSlide/CarouselSlide.types.d.ts +20 -0
- package/lib/components/CarouselSlide/CarouselSlide.vue.d.ts +16 -0
- package/lib/components/CarouselSlide/index.d.ts +10 -0
- package/lib/components/CarouselVariables/CarouselContainerVariables.vue.d.ts +4 -0
- package/lib/components/CarouselVariables/CarouselVariables.types.d.ts +9 -0
- package/lib/components/CarouselVariables/CarouselVariables.utils.d.ts +6 -0
- package/lib/components/CarouselVariables/CarouselVariables.vue.d.ts +4 -0
- package/lib/components/CarouselVariables/index.d.ts +3 -0
- package/lib/index.d.mts +4 -4
- package/lib/index.d.ts +4 -4
- package/package.json +3 -3
- package/lib/Carousel.d.ts +0 -66
- package/lib/CarouselSlide.d.ts +0 -169
- package/lib/CarouselVariables.d.ts +0 -67
package/cjs/index.cjs
CHANGED
|
@@ -21,142 +21,93 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
|
+
let _mantine_vue_core = require("@mantine-vue/core");
|
|
24
25
|
let vue = require("vue");
|
|
25
26
|
let embla_carousel_vue = require("embla-carousel-vue");
|
|
26
27
|
embla_carousel_vue = __toESM(embla_carousel_vue);
|
|
27
28
|
let _mantine_vue_hooks = require("@mantine-vue/hooks");
|
|
28
|
-
let _mantine_vue_core = require("@mantine-vue/core");
|
|
29
29
|
//#region src/Carousel.context.ts
|
|
30
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
31
|
//#endregion
|
|
42
|
-
//#region src/
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
}
|
|
32
|
+
//#region src/components/CarouselVariables/CarouselVariables.utils.ts
|
|
33
|
+
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34
|
+
var getBaseStyles = (props) => (0, _mantine_vue_core.filterProps)({
|
|
35
|
+
"--carousel-slide-gap": (0, _mantine_vue_core.getSpacing)((0, _mantine_vue_core.getBaseValue)(props.slideGap)),
|
|
36
|
+
"--carousel-slide-size": (0, _mantine_vue_core.rem)((0, _mantine_vue_core.getBaseValue)(props.slideSize))
|
|
76
37
|
});
|
|
77
|
-
var CarouselSlide = Object.assign((0, _mantine_vue_core.withBoxProps)(CarouselSlideBaseComponent), { classes: Carousel_module_default });
|
|
78
38
|
//#endregion
|
|
79
|
-
//#region src/CarouselVariables.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
slideSize: {
|
|
89
|
-
type: [
|
|
90
|
-
String,
|
|
91
|
-
Number,
|
|
92
|
-
Object
|
|
93
|
-
],
|
|
94
|
-
default: void 0
|
|
39
|
+
//#region src/components/CarouselVariables/CarouselContainerVariables.vue
|
|
40
|
+
var CarouselContainerVariables_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
41
|
+
name: "CarouselContainerVariables",
|
|
42
|
+
__name: "CarouselContainerVariables",
|
|
43
|
+
props: {
|
|
44
|
+
selector: {},
|
|
45
|
+
slideSize: {},
|
|
46
|
+
slideGap: {}
|
|
95
47
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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;
|
|
48
|
+
setup(__props) {
|
|
49
|
+
const props = __props;
|
|
50
|
+
const styles = (0, vue.computed)(() => getBaseStyles(props));
|
|
51
|
+
const container = (0, vue.computed)(() => {
|
|
52
|
+
const getBreakpoints = (value) => isObject(value) ? (0, _mantine_vue_core.keys)(value).filter((key) => key !== "base") : [];
|
|
53
|
+
return [...new Set([...getBreakpoints(props.slideGap), ...getBreakpoints(props.slideSize)])].sort((a, b) => (0, _mantine_vue_core.px)(a) - (0, _mantine_vue_core.px)(b)).reduce((result, breakpoint) => {
|
|
54
|
+
const values = {};
|
|
55
|
+
if (isObject(props.slideGap) && props.slideGap[breakpoint] !== void 0) values["--carousel-slide-gap"] = (0, _mantine_vue_core.getSpacing)(props.slideGap[breakpoint]);
|
|
56
|
+
if (isObject(props.slideSize) && props.slideSize[breakpoint] !== void 0) values["--carousel-slide-size"] = (0, _mantine_vue_core.rem)(props.slideSize[breakpoint]);
|
|
57
|
+
result[`carousel (min-width: ${breakpoint})`] = values;
|
|
58
|
+
return result;
|
|
120
59
|
}, {});
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}, {});
|
|
125
|
-
return (0, vue.h)(_mantine_vue_core.InlineStyles, {
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.InlineStyles), {
|
|
126
63
|
selector: props.selector,
|
|
127
|
-
styles:
|
|
128
|
-
|
|
129
|
-
}
|
|
64
|
+
styles: styles.value,
|
|
65
|
+
container: container.value
|
|
66
|
+
}, null, 8, [
|
|
67
|
+
"selector",
|
|
68
|
+
"styles",
|
|
69
|
+
"container"
|
|
70
|
+
]);
|
|
130
71
|
};
|
|
131
72
|
}
|
|
132
73
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
if (isObject(props.
|
|
152
|
-
|
|
153
|
-
return
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/CarouselVariables/CarouselVariables.vue
|
|
76
|
+
var CarouselVariables_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
77
|
+
name: "CarouselVariables",
|
|
78
|
+
__name: "CarouselVariables",
|
|
79
|
+
props: {
|
|
80
|
+
selector: {},
|
|
81
|
+
slideSize: {},
|
|
82
|
+
slideGap: {}
|
|
83
|
+
},
|
|
84
|
+
setup(__props) {
|
|
85
|
+
const props = __props;
|
|
86
|
+
const theme = (0, _mantine_vue_core.useMantineTheme)();
|
|
87
|
+
const styles = (0, vue.computed)(() => getBaseStyles(props));
|
|
88
|
+
const media = (0, vue.computed)(() => {
|
|
89
|
+
const queries = (0, _mantine_vue_core.keys)(theme.value.breakpoints).reduce((result, breakpoint) => {
|
|
90
|
+
const values = {};
|
|
91
|
+
if (isObject(props.slideGap) && props.slideGap[breakpoint] !== void 0) values["--carousel-slide-gap"] = (0, _mantine_vue_core.getSpacing)(props.slideGap[breakpoint]);
|
|
92
|
+
if (isObject(props.slideSize) && props.slideSize[breakpoint] !== void 0) values["--carousel-slide-size"] = (0, _mantine_vue_core.rem)(props.slideSize[breakpoint]);
|
|
93
|
+
result[breakpoint] = values;
|
|
94
|
+
return result;
|
|
95
|
+
}, {});
|
|
96
|
+
return (0, _mantine_vue_core.getSortedBreakpoints)(theme.value.breakpoints).reduce((result, item) => {
|
|
97
|
+
if ((0, _mantine_vue_core.keys)(queries[item.breakpoint] ?? {}).length) result[`(min-width: ${theme.value.breakpoints[item.breakpoint]})`] = queries[item.breakpoint];
|
|
98
|
+
return result;
|
|
154
99
|
}, {});
|
|
155
|
-
|
|
100
|
+
});
|
|
101
|
+
return (_ctx, _cache) => {
|
|
102
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.InlineStyles), {
|
|
156
103
|
selector: props.selector,
|
|
157
|
-
styles:
|
|
158
|
-
|
|
159
|
-
}
|
|
104
|
+
styles: styles.value,
|
|
105
|
+
media: media.value
|
|
106
|
+
}, null, 8, [
|
|
107
|
+
"selector",
|
|
108
|
+
"styles",
|
|
109
|
+
"media"
|
|
110
|
+
]);
|
|
160
111
|
};
|
|
161
112
|
}
|
|
162
113
|
});
|
|
@@ -177,200 +128,108 @@ function getPreviousIndicatorIndex(index, total) {
|
|
|
177
128
|
function clamp(value, min, max) {
|
|
178
129
|
return Math.min(Math.max(value, min), max);
|
|
179
130
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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"
|
|
131
|
+
var Carousel_module_default = {
|
|
132
|
+
root: "_root_avx3r_1",
|
|
133
|
+
viewport: "_viewport_avx3r_6",
|
|
134
|
+
container: "_container_avx3r_15",
|
|
135
|
+
controls: "_controls_avx3r_35",
|
|
136
|
+
control: "_control_avx3r_35",
|
|
137
|
+
indicators: "_indicators_avx3r_87",
|
|
138
|
+
indicator: "_indicator_avx3r_87",
|
|
139
|
+
slide: "_slide_avx3r_135"
|
|
203
140
|
};
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/Carousel/Carousel.vue?vue&type=script&setup=true&lang.ts
|
|
143
|
+
var _hoisted_1 = ["data-orientation"];
|
|
144
|
+
var _hoisted_2 = ["data-type"];
|
|
145
|
+
var _hoisted_3 = ["data-orientation"];
|
|
146
|
+
var _hoisted_4 = ["data-orientation"];
|
|
204
147
|
var varsResolver = (0, _mantine_vue_core.createVarsResolver)((_, { height, controlSize, controlsOffset }) => ({ root: {
|
|
205
148
|
"--carousel-height": (0, _mantine_vue_core.rem)(height),
|
|
206
149
|
"--carousel-control-size": (0, _mantine_vue_core.rem)(controlSize),
|
|
207
150
|
"--carousel-controls-offset": (0, _mantine_vue_core.getSpacing)(controlsOffset)
|
|
208
151
|
} }));
|
|
209
|
-
|
|
210
|
-
|
|
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)({
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/components/Carousel/Carousel.vue
|
|
154
|
+
var Carousel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
217
155
|
name: "Carousel",
|
|
218
156
|
inheritAttrs: false,
|
|
157
|
+
__name: "Carousel",
|
|
219
158
|
props: {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
},
|
|
159
|
+
rootRef: {},
|
|
160
|
+
emblaOptions: {},
|
|
161
|
+
nextControlProps: {},
|
|
162
|
+
previousControlProps: {},
|
|
163
|
+
controlSize: { default: 26 },
|
|
164
|
+
controlsOffset: { default: "sm" },
|
|
165
|
+
slideSize: { default: "100%" },
|
|
166
|
+
slideGap: { default: 0 },
|
|
167
|
+
orientation: { default: "horizontal" },
|
|
168
|
+
type: { default: "media" },
|
|
169
|
+
height: {},
|
|
284
170
|
includeGapInSize: {
|
|
285
171
|
type: Boolean,
|
|
286
|
-
default:
|
|
287
|
-
},
|
|
288
|
-
initialSlide: {
|
|
289
|
-
type: Number,
|
|
290
|
-
default: void 0
|
|
172
|
+
default: true
|
|
291
173
|
},
|
|
174
|
+
initialSlide: { default: 0 },
|
|
292
175
|
withControls: {
|
|
293
176
|
type: Boolean,
|
|
294
|
-
default:
|
|
177
|
+
default: true
|
|
295
178
|
},
|
|
296
179
|
withIndicators: {
|
|
297
180
|
type: Boolean,
|
|
298
|
-
default:
|
|
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
|
|
181
|
+
default: false
|
|
311
182
|
},
|
|
183
|
+
plugins: {},
|
|
184
|
+
nextControlIcon: {},
|
|
185
|
+
previousControlIcon: {},
|
|
312
186
|
withKeyboardEvents: {
|
|
313
187
|
type: Boolean,
|
|
314
|
-
default:
|
|
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
|
|
188
|
+
default: true
|
|
331
189
|
},
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
},
|
|
336
|
-
vars: {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
unstyled: {
|
|
341
|
-
type: Boolean,
|
|
342
|
-
default: false
|
|
343
|
-
}
|
|
190
|
+
getIndicatorProps: {},
|
|
191
|
+
id: {},
|
|
192
|
+
classNames: {},
|
|
193
|
+
styles: {},
|
|
194
|
+
vars: {},
|
|
195
|
+
unstyled: { type: Boolean },
|
|
196
|
+
mod: {}
|
|
344
197
|
},
|
|
345
|
-
|
|
346
|
-
|
|
198
|
+
emits: [
|
|
199
|
+
"next-slide",
|
|
200
|
+
"previous-slide",
|
|
201
|
+
"slide-change",
|
|
202
|
+
"embla-api-ready"
|
|
203
|
+
],
|
|
204
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
205
|
+
const props = (0, _mantine_vue_core.useProps)("Carousel", null, __props);
|
|
206
|
+
const emit = __emit;
|
|
207
|
+
const attrs = (0, vue.useAttrs)();
|
|
208
|
+
const slots = (0, vue.useSlots)();
|
|
347
209
|
const getStyles = (0, _mantine_vue_core.useStyles)({
|
|
348
210
|
name: "Carousel",
|
|
349
211
|
classes: Carousel_module_default,
|
|
350
212
|
props,
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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
|
-
},
|
|
213
|
+
className: attrs.class,
|
|
214
|
+
style: attrs.style,
|
|
215
|
+
classNames: props.classNames,
|
|
216
|
+
styles: props.styles,
|
|
217
|
+
unstyled: props.unstyled,
|
|
218
|
+
vars: props.vars,
|
|
369
219
|
varsResolver
|
|
370
220
|
});
|
|
371
|
-
const
|
|
372
|
-
const responsiveClassName =
|
|
221
|
+
const id = (0, _mantine_vue_hooks.useId)(props.id);
|
|
222
|
+
const responsiveClassName = `__mantine-vue-carousel-${Math.random().toString(36).slice(2, 9)}`;
|
|
373
223
|
const { dir } = (0, _mantine_vue_core.useDirection)();
|
|
224
|
+
const defaultEmblaOptions = {
|
|
225
|
+
align: "center",
|
|
226
|
+
loop: false,
|
|
227
|
+
slidesToScroll: 1,
|
|
228
|
+
dragFree: false,
|
|
229
|
+
inViewThreshold: 0,
|
|
230
|
+
skipSnaps: false,
|
|
231
|
+
containScroll: "trimSnaps"
|
|
232
|
+
};
|
|
374
233
|
const [emblaNode, embla] = (0, embla_carousel_vue.default)((0, vue.computed)(() => ({
|
|
375
234
|
axis: props.orientation === "horizontal" ? "x" : "y",
|
|
376
235
|
direction: props.orientation === "horizontal" ? dir.value : void 0,
|
|
@@ -381,81 +240,136 @@ var CarouselBaseComponent = (0, vue.defineComponent)({
|
|
|
381
240
|
const selected = (0, vue.ref)(0);
|
|
382
241
|
const slidesCount = (0, vue.ref)(0);
|
|
383
242
|
const slotSlideCount = (0, vue.ref)(0);
|
|
384
|
-
const
|
|
243
|
+
const canScrollPrev = (0, vue.computed)(() => selected.value >= 0 && embla.value?.canScrollPrev() || false);
|
|
244
|
+
const canScrollNext = (0, vue.computed)(() => selected.value >= 0 && embla.value?.canScrollNext() || false);
|
|
245
|
+
const variablesProps = (0, vue.computed)(() => ({
|
|
246
|
+
selector: `.${responsiveClassName}`,
|
|
247
|
+
slideSize: props.slideSize,
|
|
248
|
+
slideGap: props.slideGap
|
|
249
|
+
}));
|
|
250
|
+
function countRealSlides(nodes) {
|
|
251
|
+
return nodes.filter((node) => node.type !== vue.Comment).length;
|
|
252
|
+
}
|
|
253
|
+
function renderSlides() {
|
|
254
|
+
const nodes = slots.default?.() ?? [];
|
|
255
|
+
slotSlideCount.value = countRealSlides(nodes);
|
|
256
|
+
return nodes;
|
|
257
|
+
}
|
|
258
|
+
function scrollTo(index) {
|
|
385
259
|
embla.value?.scrollTo(index);
|
|
386
|
-
}
|
|
387
|
-
|
|
260
|
+
}
|
|
261
|
+
function select() {
|
|
388
262
|
const instance = embla.value;
|
|
389
263
|
if (!instance) return;
|
|
390
264
|
const slide = instance.selectedScrollSnap();
|
|
391
265
|
const changed = slide !== selected.value;
|
|
392
266
|
selected.value = slide;
|
|
393
|
-
if (changed)
|
|
394
|
-
}
|
|
395
|
-
|
|
267
|
+
if (changed) emit("slide-change", slide);
|
|
268
|
+
}
|
|
269
|
+
function previous() {
|
|
396
270
|
embla.value?.scrollPrev();
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
|
|
271
|
+
emit("previous-slide");
|
|
272
|
+
}
|
|
273
|
+
function next() {
|
|
400
274
|
embla.value?.scrollNext();
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
|
|
275
|
+
emit("next-slide");
|
|
276
|
+
}
|
|
277
|
+
function keydown(event) {
|
|
404
278
|
if (!props.withKeyboardEvents) return;
|
|
405
279
|
if (event.key === "ArrowRight") {
|
|
406
280
|
event.preventDefault();
|
|
407
|
-
|
|
281
|
+
next();
|
|
408
282
|
}
|
|
409
283
|
if (event.key === "ArrowLeft") {
|
|
410
284
|
event.preventDefault();
|
|
411
|
-
|
|
285
|
+
previous();
|
|
412
286
|
}
|
|
413
287
|
if (event.key === "Home") {
|
|
414
288
|
event.preventDefault();
|
|
415
|
-
|
|
289
|
+
scrollTo(0);
|
|
416
290
|
}
|
|
417
291
|
if (event.key === "End") {
|
|
418
292
|
event.preventDefault();
|
|
419
|
-
|
|
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();
|
|
293
|
+
scrollTo((embla.value?.scrollSnapList().length ?? 1) - 1);
|
|
443
294
|
}
|
|
444
|
-
|
|
295
|
+
}
|
|
296
|
+
function indicatorKeydown(event, index) {
|
|
297
|
+
const nextKey = props.orientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
298
|
+
const previousKey = props.orientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
299
|
+
const parent = event.currentTarget.parentElement;
|
|
300
|
+
let target = null;
|
|
301
|
+
if (event.key === nextKey) target = getNextIndicatorIndex(index, slidesCount.value);
|
|
302
|
+
if (event.key === previousKey) target = getPreviousIndicatorIndex(index, slidesCount.value);
|
|
303
|
+
if (event.key === "Home") target = 0;
|
|
304
|
+
if (event.key === "End") target = slidesCount.value - 1;
|
|
305
|
+
if (target !== null) {
|
|
445
306
|
event.preventDefault();
|
|
446
|
-
|
|
447
|
-
(parent?.children[
|
|
307
|
+
scrollTo(target);
|
|
308
|
+
(parent?.children[target])?.focus();
|
|
448
309
|
}
|
|
449
|
-
}
|
|
450
|
-
|
|
310
|
+
}
|
|
311
|
+
function indicatorAttrs(index) {
|
|
312
|
+
return {
|
|
313
|
+
...getStyles("indicator"),
|
|
314
|
+
role: "tab",
|
|
315
|
+
"aria-label": `Go to slide ${index + 1}`,
|
|
316
|
+
"aria-selected": index === selected.value,
|
|
317
|
+
tabindex: index === selected.value ? 0 : -1,
|
|
318
|
+
"data-active": index === selected.value || void 0,
|
|
319
|
+
"data-orientation": props.orientation,
|
|
320
|
+
onClick: () => scrollTo(index),
|
|
321
|
+
onKeydown: (event) => indicatorKeydown(event, index),
|
|
322
|
+
onMousedown: (event) => event.preventDefault(),
|
|
323
|
+
...props.getIndicatorProps?.(index)
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function previousAttrs() {
|
|
327
|
+
return {
|
|
328
|
+
"aria-controls": id.value,
|
|
329
|
+
"aria-label": "Previous slide",
|
|
330
|
+
"aria-disabled": !canScrollPrev.value,
|
|
331
|
+
"data-inactive": !canScrollPrev.value || void 0,
|
|
332
|
+
"data-type": "previous",
|
|
333
|
+
tabindex: canScrollPrev.value ? 0 : -1,
|
|
334
|
+
...props.previousControlProps,
|
|
335
|
+
...getStyles("control", {
|
|
336
|
+
className: props.previousControlProps?.className,
|
|
337
|
+
style: props.previousControlProps?.style
|
|
338
|
+
}),
|
|
339
|
+
onClick: (event) => {
|
|
340
|
+
previous();
|
|
341
|
+
props.previousControlProps?.onClick?.(event);
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function nextAttrs() {
|
|
346
|
+
return {
|
|
347
|
+
"aria-controls": id.value,
|
|
348
|
+
"aria-label": "Next slide",
|
|
349
|
+
"aria-disabled": !canScrollNext.value,
|
|
350
|
+
"data-inactive": !canScrollNext.value || void 0,
|
|
351
|
+
"data-type": "next",
|
|
352
|
+
tabindex: canScrollNext.value ? 0 : -1,
|
|
353
|
+
...getStyles("control", {
|
|
354
|
+
className: props.nextControlProps?.className,
|
|
355
|
+
style: props.nextControlProps?.style
|
|
356
|
+
}),
|
|
357
|
+
...props.nextControlProps,
|
|
358
|
+
onClick: (event) => {
|
|
359
|
+
next();
|
|
360
|
+
props.nextControlProps?.onClick?.(event);
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
const renderPreviousIcon = () => props.previousControlIcon;
|
|
365
|
+
const renderNextIcon = () => props.nextControlIcon;
|
|
366
|
+
(0, vue.watch)(embla, (instance, _previous, onCleanup) => {
|
|
451
367
|
if (!instance) return;
|
|
452
|
-
|
|
453
|
-
|
|
368
|
+
emit("embla-api-ready", instance);
|
|
369
|
+
select();
|
|
454
370
|
slidesCount.value = instance.scrollSnapList().length;
|
|
455
|
-
instance.on("select",
|
|
456
|
-
onCleanup(() =>
|
|
457
|
-
instance.off("select", handleSelect);
|
|
458
|
-
});
|
|
371
|
+
instance.on("select", select);
|
|
372
|
+
onCleanup(() => instance.off("select", select));
|
|
459
373
|
}, { immediate: true });
|
|
460
374
|
(0, vue.watch)([slotSlideCount, () => props.emblaOptions?.slidesToScroll], ([childrenCount]) => {
|
|
461
375
|
const instance = embla.value;
|
|
@@ -470,110 +384,125 @@ var CarouselBaseComponent = (0, vue.defineComponent)({
|
|
|
470
384
|
return props.orientation;
|
|
471
385
|
}
|
|
472
386
|
});
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
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, {
|
|
387
|
+
const rootElement = (0, vue.ref)(null);
|
|
388
|
+
const setRootRef = (node) => {
|
|
389
|
+
rootElement.value = node;
|
|
390
|
+
(0, _mantine_vue_hooks.assignRef)(props.rootRef, node);
|
|
391
|
+
};
|
|
392
|
+
__expose({
|
|
393
|
+
embla,
|
|
394
|
+
rootElement
|
|
395
|
+
});
|
|
396
|
+
return (_ctx, _cache) => {
|
|
397
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [(0, vue.unref)(props).type === "container" ? ((0, vue.openBlock)(), (0, vue.createBlock)(CarouselContainerVariables_default, (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 0 }, variablesProps.value)), null, 16)) : ((0, vue.openBlock)(), (0, vue.createBlock)(CarouselVariables_default, (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 1 }, variablesProps.value)), null, 16)), (0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.Box), (0, vue.mergeProps)({ rootRef: setRootRef }, {
|
|
498
398
|
role: "region",
|
|
499
399
|
"aria-roledescription": "carousel",
|
|
500
|
-
...attrs,
|
|
501
|
-
...getStyles("root", { className: responsiveClassName })
|
|
502
|
-
|
|
400
|
+
...(0, vue.unref)(attrs),
|
|
401
|
+
...(0, vue.unref)(getStyles)("root", { className: responsiveClassName })
|
|
402
|
+
}, {
|
|
403
|
+
id: (0, vue.unref)(id),
|
|
503
404
|
mod: [{
|
|
504
|
-
orientation: props.orientation,
|
|
505
|
-
"include-gap-in-size": props.includeGapInSize
|
|
506
|
-
}, props.mod],
|
|
507
|
-
onKeydownCapture:
|
|
508
|
-
},
|
|
509
|
-
(0, vue.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
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
|
|
405
|
+
orientation: (0, vue.unref)(props).orientation,
|
|
406
|
+
"include-gap-in-size": (0, vue.unref)(props).includeGapInSize
|
|
407
|
+
}, (0, vue.unref)(props).mod],
|
|
408
|
+
onKeydownCapture: keydown
|
|
409
|
+
}), {
|
|
410
|
+
default: (0, vue.withCtx)(() => [
|
|
411
|
+
(0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.VisuallyHidden), {
|
|
412
|
+
role: "status",
|
|
413
|
+
"aria-live": "polite",
|
|
414
|
+
"aria-atomic": "true"
|
|
415
|
+
}, {
|
|
416
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(slidesCount.value > 0 ? `Slide ${selected.value + 1} of ${slidesCount.value}` : ""), 1)]),
|
|
417
|
+
_: 1
|
|
547
418
|
}),
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
419
|
+
(0, vue.unref)(props).withControls ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(getStyles)("controls"), { "data-orientation": (0, vue.unref)(props).orientation }), [(0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.UnstyledButton), (0, vue.normalizeProps)((0, vue.guardReactiveProps)(previousAttrs())), {
|
|
420
|
+
default: (0, vue.withCtx)(() => [(0, vue.unref)(props).previousControlIcon !== void 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderPreviousIcon), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.AccordionChevron), {
|
|
421
|
+
key: 1,
|
|
422
|
+
style: (0, vue.normalizeStyle)({ transform: `rotate(${(0, vue.unref)(getChevronRotation)({
|
|
423
|
+
dir: (0, vue.unref)(dir),
|
|
424
|
+
orientation: (0, vue.unref)(props).orientation,
|
|
425
|
+
direction: "previous"
|
|
426
|
+
})}deg)` })
|
|
427
|
+
}, null, 8, ["style"]))]),
|
|
428
|
+
_: 1
|
|
429
|
+
}, 16), (0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.UnstyledButton), (0, vue.normalizeProps)((0, vue.guardReactiveProps)(nextAttrs())), {
|
|
430
|
+
default: (0, vue.withCtx)(() => [(0, vue.unref)(props).nextControlIcon !== void 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderNextIcon), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.AccordionChevron), {
|
|
431
|
+
key: 1,
|
|
432
|
+
style: (0, vue.normalizeStyle)({ transform: `rotate(${(0, vue.unref)(getChevronRotation)({
|
|
433
|
+
dir: (0, vue.unref)(dir),
|
|
434
|
+
orientation: (0, vue.unref)(props).orientation,
|
|
435
|
+
direction: "next"
|
|
436
|
+
})}deg)` })
|
|
437
|
+
}, null, 8, ["style"]))]),
|
|
438
|
+
_: 1
|
|
439
|
+
}, 16)], 16, _hoisted_1)) : (0, vue.createCommentVNode)("", true),
|
|
440
|
+
(0, vue.createElementVNode)("div", (0, vue.mergeProps)({
|
|
441
|
+
ref_key: "emblaNode",
|
|
442
|
+
ref: emblaNode
|
|
443
|
+
}, (0, vue.unref)(getStyles)("viewport"), { "data-type": (0, vue.unref)(props).type }), [(0, vue.createElementVNode)("div", (0, vue.mergeProps)((0, vue.unref)(getStyles)("container", { className: responsiveClassName }), { "data-orientation": (0, vue.unref)(props).orientation }), [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderSlides)))], 16, _hoisted_3)], 16, _hoisted_2),
|
|
444
|
+
(0, vue.unref)(props).withIndicators ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", (0, vue.mergeProps)({ key: 1 }, (0, vue.unref)(getStyles)("indicators"), {
|
|
445
|
+
role: "tablist",
|
|
446
|
+
"aria-label": "Slides",
|
|
447
|
+
"data-orientation": (0, vue.unref)(props).orientation
|
|
448
|
+
}), [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(slidesCount.value, (index) => {
|
|
449
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.UnstyledButton), (0, vue.mergeProps)({ key: index - 1 }, { ref_for: true }, indicatorAttrs(index - 1)), null, 16);
|
|
450
|
+
}), 128))], 16, _hoisted_4)) : (0, vue.createCommentVNode)("", true)
|
|
451
|
+
]),
|
|
452
|
+
_: 1
|
|
453
|
+
}, 16, ["id", "mod"])], 64);
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region src/components/CarouselSlide/CarouselSlide.vue
|
|
459
|
+
var CarouselSlide_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
460
|
+
name: "CarouselSlide",
|
|
461
|
+
inheritAttrs: false,
|
|
462
|
+
__name: "CarouselSlide",
|
|
463
|
+
props: {
|
|
464
|
+
rootRef: { type: [Object, Function] },
|
|
465
|
+
classNames: {},
|
|
466
|
+
styles: {},
|
|
467
|
+
mod: {}
|
|
468
|
+
},
|
|
469
|
+
setup(__props, { expose: __expose }) {
|
|
470
|
+
const props = __props;
|
|
471
|
+
const attrs = (0, vue.useAttrs)();
|
|
472
|
+
const context = useCarouselContext();
|
|
473
|
+
const rootElement = (0, vue.ref)(null);
|
|
474
|
+
const setRootRef = (node) => {
|
|
475
|
+
rootElement.value = node;
|
|
476
|
+
(0, _mantine_vue_hooks.assignRef)(props.rootRef, node);
|
|
477
|
+
};
|
|
478
|
+
__expose({ rootElement });
|
|
479
|
+
return (_ctx, _cache) => {
|
|
480
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.Box), (0, vue.mergeProps)({ rootRef: setRootRef }, {
|
|
481
|
+
...(0, vue.unref)(attrs),
|
|
482
|
+
...(0, vue.unref)(context).getStyles("slide", {
|
|
483
|
+
className: (0, vue.unref)(attrs).class,
|
|
484
|
+
style: (0, vue.unref)(attrs).style,
|
|
485
|
+
classNames: props.classNames,
|
|
486
|
+
styles: props.styles
|
|
487
|
+
})
|
|
488
|
+
}, {
|
|
489
|
+
mod: [{ orientation: (0, vue.unref)(context).orientation }, props.mod],
|
|
490
|
+
role: "group",
|
|
491
|
+
"aria-roledescription": "slide",
|
|
492
|
+
"aria-label": "Carousel slide"
|
|
493
|
+
}), {
|
|
494
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
495
|
+
_: 3
|
|
496
|
+
}, 16, ["mod"]);
|
|
573
497
|
};
|
|
574
498
|
}
|
|
575
499
|
});
|
|
576
|
-
|
|
500
|
+
//#endregion
|
|
501
|
+
//#region src/components/CarouselSlide/index.ts
|
|
502
|
+
var CarouselSlide = (0, _mantine_vue_core.factory)(CarouselSlide_default, { classes: Carousel_module_default });
|
|
503
|
+
//#endregion
|
|
504
|
+
//#region src/components/Carousel/index.ts
|
|
505
|
+
var Carousel = (0, _mantine_vue_core.factory)(Carousel_default, {
|
|
577
506
|
classes: Carousel_module_default,
|
|
578
507
|
varsResolver,
|
|
579
508
|
Slide: CarouselSlide
|