@mantine/carousel 7.2.2 → 7.3.0-alpha.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.
Files changed (40) hide show
  1. package/cjs/Carousel.cjs +256 -0
  2. package/cjs/Carousel.cjs.map +1 -0
  3. package/cjs/{Carousel.context.js → Carousel.context.cjs} +1 -3
  4. package/cjs/Carousel.context.cjs.map +1 -0
  5. package/cjs/{Carousel.module.css.js → Carousel.module.css.cjs} +2 -4
  6. package/cjs/Carousel.module.css.cjs.map +1 -0
  7. package/cjs/CarouselSlide/CarouselSlide.cjs +31 -0
  8. package/cjs/CarouselSlide/CarouselSlide.cjs.map +1 -0
  9. package/cjs/CarouselVariables/{CarouselVariables.js → CarouselVariables.cjs} +2 -8
  10. package/cjs/CarouselVariables/CarouselVariables.cjs.map +1 -0
  11. package/cjs/{get-chevron-rotation.js → get-chevron-rotation.cjs} +1 -3
  12. package/cjs/get-chevron-rotation.cjs.map +1 -0
  13. package/cjs/{index.js → index.cjs} +4 -6
  14. package/cjs/index.cjs.map +1 -0
  15. package/cjs/{use-animation-offset-effect.js → use-animation-offset-effect.cjs} +1 -3
  16. package/cjs/use-animation-offset-effect.cjs.map +1 -0
  17. package/esm/Carousel.context.mjs.map +1 -1
  18. package/esm/Carousel.mjs +41 -104
  19. package/esm/Carousel.mjs.map +1 -1
  20. package/esm/{Carousel.module.mjs → Carousel.module.css.mjs} +2 -2
  21. package/esm/Carousel.module.css.mjs.map +1 -0
  22. package/esm/CarouselSlide/CarouselSlide.mjs +8 -34
  23. package/esm/CarouselSlide/CarouselSlide.mjs.map +1 -1
  24. package/esm/CarouselVariables/CarouselVariables.mjs.map +1 -1
  25. package/esm/get-chevron-rotation.mjs.map +1 -1
  26. package/esm/use-animation-offset-effect.mjs.map +1 -1
  27. package/lib/Carousel.context.d.ts +0 -1
  28. package/lib/Carousel.context.d.ts.map +1 -1
  29. package/package.json +28 -30
  30. package/cjs/Carousel.context.js.map +0 -1
  31. package/cjs/Carousel.js +0 -326
  32. package/cjs/Carousel.js.map +0 -1
  33. package/cjs/Carousel.module.css.js.map +0 -1
  34. package/cjs/CarouselSlide/CarouselSlide.js +0 -63
  35. package/cjs/CarouselSlide/CarouselSlide.js.map +0 -1
  36. package/cjs/CarouselVariables/CarouselVariables.js.map +0 -1
  37. package/cjs/get-chevron-rotation.js.map +0 -1
  38. package/cjs/index.js.map +0 -1
  39. package/cjs/use-animation-offset-effect.js.map +0 -1
  40. package/esm/Carousel.module.mjs.map +0 -1
package/package.json CHANGED
@@ -1,10 +1,29 @@
1
1
  {
2
2
  "name": "@mantine/carousel",
3
+ "version": "7.3.0-alpha.0",
3
4
  "description": "Embla based carousel",
4
- "version": "7.2.2",
5
- "main": "./cjs/index.js",
6
- "types": "./lib/index.d.ts",
5
+ "homepage": "https://mantine.dev/others/carousel/",
6
+ "license": "MIT",
7
+ "author": "Vitaly Rtishchev <rtivital@gmail.com>",
8
+ "keywords": [
9
+ "carousel",
10
+ "components",
11
+ "frontend",
12
+ "library",
13
+ "next",
14
+ "nextjs",
15
+ "react",
16
+ "slick",
17
+ "slider",
18
+ "ui",
19
+ "ui-kit"
20
+ ],
21
+ "sideEffects": [
22
+ "*.css"
23
+ ],
24
+ "main": "./cjs/index.cjs",
7
25
  "module": "./esm/index.mjs",
26
+ "types": "./lib/index.d.ts",
8
27
  "exports": {
9
28
  ".": {
10
29
  "import": {
@@ -13,43 +32,22 @@
13
32
  },
14
33
  "require": {
15
34
  "types": "./lib/index.d.ts",
16
- "default": "./cjs/index.js"
35
+ "default": "./cjs/index.cjs"
17
36
  }
18
37
  },
19
38
  "./styles.css": "./esm/index.css",
20
39
  "./styles.layer.css": "./esm/index.layer.css",
21
40
  "./styles/*": "./esm/styles/*"
22
41
  },
23
- "license": "MIT",
24
- "sideEffects": [
25
- "*.css"
26
- ],
27
- "author": "Vitaly Rtishchev <rtivital@gmail.com>",
28
- "homepage": "https://mantine.dev/others/carousel/",
29
42
  "repository": {
30
43
  "url": "https://github.com/mantinedev/mantine.git",
31
44
  "type": "git",
32
45
  "directory": "src/mantine-carousel"
33
46
  },
34
- "keywords": [
35
- "react",
36
- "next",
37
- "nextjs",
38
- "ui",
39
- "components",
40
- "ui-kit",
41
- "library",
42
- "frontend",
43
- "carousel",
44
- "slider",
45
- "slick"
46
- ],
47
47
  "peerDependencies": {
48
- "@mantine/core": "7.2.2",
49
- "@mantine/hooks": "7.2.2",
50
- "embla-carousel-react": "^7.0.0",
48
+ "@mantine/core": "7.3.0-alpha.0",
49
+ "@mantine/hooks": "7.3.0-alpha.0",
50
+ "embla-carousel-react": ">=7.0.0",
51
51
  "react": "^18.2.0"
52
- },
53
- "dependencies": {},
54
- "devDependencies": {}
55
- }
52
+ }
53
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Carousel.context.js","sources":["../src/Carousel.context.ts"],"sourcesContent":["import { createSafeContext, GetStylesApi } from '@mantine/core';\nimport type { CarouselFactory } from './Carousel';\n\ninterface CarouselContextValue {\n getStyles: GetStylesApi<CarouselFactory>;\n orientation: 'horizontal' | 'vertical' | undefined;\n}\n\nexport const [CarouselProvider, useCarouselContext] = createSafeContext<CarouselContextValue>(\n 'Carousel component was not found in tree'\n);\n"],"names":["createSafeContext"],"mappings":";;;;;;;AACY,MAAC,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,GAAGA,sBAAiB;AACvE,EAAE,0CAA0C;AAC5C;;;"}
package/cjs/Carousel.js DELETED
@@ -1,326 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var React = require('react');
7
- var core = require('@mantine/core');
8
- var hooks = require('@mantine/hooks');
9
- var useEmblaCarousel = require('embla-carousel-react');
10
- var getChevronRotation = require('./get-chevron-rotation.js');
11
- var Carousel_context = require('./Carousel.context.js');
12
- var CarouselSlide = require('./CarouselSlide/CarouselSlide.js');
13
- var CarouselVariables = require('./CarouselVariables/CarouselVariables.js');
14
- var Carousel_module = require('./Carousel.module.css.js');
15
-
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
17
-
18
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
- var useEmblaCarousel__default = /*#__PURE__*/_interopDefaultLegacy(useEmblaCarousel);
20
-
21
- var __defProp = Object.defineProperty;
22
- var __defProps = Object.defineProperties;
23
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
24
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
25
- var __hasOwnProp = Object.prototype.hasOwnProperty;
26
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
27
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
28
- var __spreadValues = (a, b) => {
29
- for (var prop in b || (b = {}))
30
- if (__hasOwnProp.call(b, prop))
31
- __defNormalProp(a, prop, b[prop]);
32
- if (__getOwnPropSymbols)
33
- for (var prop of __getOwnPropSymbols(b)) {
34
- if (__propIsEnum.call(b, prop))
35
- __defNormalProp(a, prop, b[prop]);
36
- }
37
- return a;
38
- };
39
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
40
- var __objRest = (source, exclude) => {
41
- var target = {};
42
- for (var prop in source)
43
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
44
- target[prop] = source[prop];
45
- if (source != null && __getOwnPropSymbols)
46
- for (var prop of __getOwnPropSymbols(source)) {
47
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
48
- target[prop] = source[prop];
49
- }
50
- return target;
51
- };
52
- const defaultProps = {
53
- controlSize: 26,
54
- controlsOffset: "sm",
55
- slideSize: "100%",
56
- slideGap: 0,
57
- orientation: "horizontal",
58
- align: "center",
59
- slidesToScroll: 1,
60
- includeGapInSize: true,
61
- draggable: true,
62
- dragFree: false,
63
- loop: false,
64
- speed: 10,
65
- initialSlide: 0,
66
- inViewThreshold: 0,
67
- withControls: true,
68
- withIndicators: false,
69
- skipSnaps: false,
70
- containScroll: "",
71
- withKeyboardEvents: true
72
- };
73
- const varsResolver = core.createVarsResolver(
74
- (_, { height, controlSize, controlsOffset }) => ({
75
- root: {
76
- "--carousel-height": core.rem(height),
77
- "--carousel-control-size": core.rem(controlSize),
78
- "--carousel-controls-offset": core.getSpacing(controlsOffset)
79
- }
80
- })
81
- );
82
- const Carousel = core.factory((_props, ref) => {
83
- const props = core.useProps("Carousel", defaultProps, _props);
84
- const _a = props, {
85
- classNames,
86
- className,
87
- style,
88
- styles,
89
- unstyled,
90
- vars,
91
- children,
92
- getEmblaApi,
93
- onNextSlide,
94
- onPreviousSlide,
95
- onSlideChange,
96
- nextControlProps,
97
- previousControlProps,
98
- controlSize,
99
- controlsOffset,
100
- slideSize,
101
- slideGap,
102
- orientation,
103
- height,
104
- align,
105
- slidesToScroll,
106
- includeGapInSize,
107
- draggable,
108
- dragFree,
109
- loop,
110
- speed,
111
- initialSlide,
112
- inViewThreshold,
113
- withControls,
114
- withIndicators,
115
- plugins,
116
- nextControlIcon,
117
- previousControlIcon,
118
- skipSnaps,
119
- containScroll,
120
- withKeyboardEvents
121
- } = _a, others = __objRest(_a, [
122
- "classNames",
123
- "className",
124
- "style",
125
- "styles",
126
- "unstyled",
127
- "vars",
128
- "children",
129
- "getEmblaApi",
130
- "onNextSlide",
131
- "onPreviousSlide",
132
- "onSlideChange",
133
- "nextControlProps",
134
- "previousControlProps",
135
- "controlSize",
136
- "controlsOffset",
137
- "slideSize",
138
- "slideGap",
139
- "orientation",
140
- "height",
141
- "align",
142
- "slidesToScroll",
143
- "includeGapInSize",
144
- "draggable",
145
- "dragFree",
146
- "loop",
147
- "speed",
148
- "initialSlide",
149
- "inViewThreshold",
150
- "withControls",
151
- "withIndicators",
152
- "plugins",
153
- "nextControlIcon",
154
- "previousControlIcon",
155
- "skipSnaps",
156
- "containScroll",
157
- "withKeyboardEvents"
158
- ]);
159
- const getStyles = core.useStyles({
160
- name: "Carousel",
161
- classes: Carousel_module['default'],
162
- props,
163
- className,
164
- style,
165
- classNames,
166
- styles,
167
- unstyled,
168
- vars,
169
- varsResolver
170
- });
171
- const responsiveClassName = core.useRandomClassName();
172
- const { dir } = core.useDirection();
173
- const [emblaRefElement, embla] = useEmblaCarousel__default(
174
- {
175
- axis: orientation === "horizontal" ? "x" : "y",
176
- direction: orientation === "horizontal" ? dir : void 0,
177
- startIndex: initialSlide,
178
- loop,
179
- align,
180
- slidesToScroll,
181
- draggable,
182
- dragFree,
183
- speed,
184
- inViewThreshold,
185
- skipSnaps,
186
- containScroll
187
- },
188
- plugins
189
- );
190
- const [selected, setSelected] = React.useState(0);
191
- const [slidesCount, setSlidesCount] = React.useState(0);
192
- const handleScroll = React.useCallback((index) => embla && embla.scrollTo(index), [embla]);
193
- const handleSelect = React.useCallback(() => {
194
- if (!embla)
195
- return;
196
- const slide = embla.selectedScrollSnap();
197
- setSelected(slide);
198
- onSlideChange == null ? void 0 : onSlideChange(slide);
199
- }, [embla, setSelected]);
200
- const handlePrevious = React.useCallback(() => {
201
- embla == null ? void 0 : embla.scrollPrev();
202
- onPreviousSlide == null ? void 0 : onPreviousSlide();
203
- }, [embla]);
204
- const handleNext = React.useCallback(() => {
205
- embla == null ? void 0 : embla.scrollNext();
206
- onNextSlide == null ? void 0 : onNextSlide();
207
- }, [embla]);
208
- const handleKeydown = React.useCallback(
209
- (event) => {
210
- if (withKeyboardEvents) {
211
- if (event.key === "ArrowRight") {
212
- event.preventDefault();
213
- handleNext();
214
- }
215
- if (event.key === "ArrowLeft") {
216
- event.preventDefault();
217
- handlePrevious();
218
- }
219
- }
220
- },
221
- [embla]
222
- );
223
- React.useEffect(() => {
224
- if (embla) {
225
- getEmblaApi == null ? void 0 : getEmblaApi(embla);
226
- handleSelect();
227
- setSlidesCount(embla.scrollSnapList().length);
228
- embla.on("select", handleSelect);
229
- return () => {
230
- embla.off("select", handleSelect);
231
- };
232
- }
233
- return void 0;
234
- }, [embla, slidesToScroll]);
235
- React.useEffect(() => {
236
- if (embla) {
237
- embla.reInit();
238
- setSlidesCount(embla.scrollSnapList().length);
239
- setSelected(
240
- (currentSelected) => hooks.clamp(currentSelected, 0, React.Children.toArray(children).length - 1)
241
- );
242
- }
243
- }, [React.Children.toArray(children).length, slidesToScroll]);
244
- const canScrollPrev = (embla == null ? void 0 : embla.canScrollPrev()) || false;
245
- const canScrollNext = (embla == null ? void 0 : embla.canScrollNext()) || false;
246
- const indicators = Array(slidesCount).fill(0).map((_, index) => /* @__PURE__ */ React__default.createElement(
247
- core.UnstyledButton,
248
- __spreadProps(__spreadValues({}, getStyles("indicator")), {
249
- key: index,
250
- "data-active": index === selected || void 0,
251
- "aria-hidden": true,
252
- tabIndex: -1,
253
- onClick: () => handleScroll(index)
254
- })
255
- ));
256
- return /* @__PURE__ */ React__default.createElement(Carousel_context.CarouselProvider, { value: { getStyles, orientation } }, /* @__PURE__ */ React__default.createElement(CarouselVariables.CarouselVariables, __spreadProps(__spreadValues({}, props), { selector: `.${responsiveClassName}` })), /* @__PURE__ */ React__default.createElement(
257
- core.Box,
258
- __spreadProps(__spreadValues(__spreadValues({
259
- ref
260
- }, getStyles("root", { className: responsiveClassName })), others), {
261
- mod: { orientation, "include-gap-in-size": includeGapInSize },
262
- onKeyDownCapture: handleKeydown
263
- }),
264
- /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({}, getStyles("viewport")), { ref: emblaRefElement }), /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({}, getStyles("container")), { "data-orientation": orientation }), children)),
265
- withIndicators && /* @__PURE__ */ React__default.createElement("div", __spreadValues({}, getStyles("indicators")), indicators),
266
- withControls && /* @__PURE__ */ React__default.createElement("div", __spreadValues({}, getStyles("controls")), /* @__PURE__ */ React__default.createElement(
267
- core.UnstyledButton,
268
- __spreadProps(__spreadValues(__spreadValues({}, previousControlProps), getStyles("control", {
269
- className: previousControlProps == null ? void 0 : previousControlProps.className,
270
- style: previousControlProps == null ? void 0 : previousControlProps.style
271
- })), {
272
- onClick: (event) => {
273
- var _a2;
274
- handlePrevious();
275
- (_a2 = previousControlProps == null ? void 0 : previousControlProps.onClick) == null ? void 0 : _a2.call(previousControlProps, event);
276
- },
277
- "data-inactive": !canScrollPrev || void 0,
278
- tabIndex: canScrollPrev ? 0 : -1
279
- }),
280
- typeof previousControlIcon !== "undefined" ? previousControlIcon : /* @__PURE__ */ React__default.createElement(
281
- core.AccordionChevron,
282
- {
283
- style: {
284
- transform: `rotate(${getChevronRotation.getChevronRotation({
285
- dir,
286
- orientation,
287
- direction: "previous"
288
- })}deg)`
289
- }
290
- }
291
- )
292
- ), /* @__PURE__ */ React__default.createElement(
293
- core.UnstyledButton,
294
- __spreadProps(__spreadValues(__spreadValues({}, getStyles("control", {
295
- className: nextControlProps == null ? void 0 : nextControlProps.className,
296
- style: nextControlProps == null ? void 0 : nextControlProps.style
297
- })), nextControlProps), {
298
- onClick: (event) => {
299
- var _a2;
300
- handleNext();
301
- (_a2 = nextControlProps == null ? void 0 : nextControlProps.onClick) == null ? void 0 : _a2.call(nextControlProps, event);
302
- },
303
- "data-inactive": !canScrollNext || void 0,
304
- tabIndex: canScrollNext ? 0 : -1
305
- }),
306
- typeof nextControlIcon !== "undefined" ? nextControlIcon : /* @__PURE__ */ React__default.createElement(
307
- core.AccordionChevron,
308
- {
309
- style: {
310
- transform: `rotate(${getChevronRotation.getChevronRotation({
311
- dir,
312
- orientation,
313
- direction: "next"
314
- })}deg)`
315
- }
316
- }
317
- )
318
- ))
319
- ));
320
- });
321
- Carousel.classes = Carousel_module['default'];
322
- Carousel.displayName = "@mantine/core/Carousel";
323
- Carousel.Slide = CarouselSlide.CarouselSlide;
324
-
325
- exports.Carousel = Carousel;
326
- //# sourceMappingURL=Carousel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Carousel.js","sources":["../src/Carousel.tsx"],"sourcesContent":["import React, { Children, useCallback, useEffect, useState } from 'react';\nimport {\n Box,\n BoxProps,\n StylesApiProps,\n factory,\n ElementProps,\n useProps,\n useStyles,\n createVarsResolver,\n Factory,\n MantineSpacing,\n StyleProp,\n useDirection,\n UnstyledButton,\n AccordionChevron,\n useRandomClassName,\n rem,\n getSpacing,\n} from '@mantine/core';\nimport { clamp } from '@mantine/hooks';\nimport useEmblaCarousel, { EmblaPluginType, EmblaCarouselType } from 'embla-carousel-react';\nimport { getChevronRotation } from './get-chevron-rotation';\nimport { CarouselProvider } from './Carousel.context';\nimport { CarouselSlide } from './CarouselSlide/CarouselSlide';\nimport { CarouselVariables } from './CarouselVariables/CarouselVariables';\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 type CarouselCssVariables = {\n root: '--carousel-height' | '--carousel-control-size' | '--carousel-controls-offset';\n};\n\nexport interface CarouselProps\n extends BoxProps,\n StylesApiProps<CarouselFactory>,\n ElementProps<'div'> {\n /** <Carousel.Slide /> components */\n children?: React.ReactNode;\n\n /** Called when next slide is shown */\n onNextSlide?: () => void;\n\n /** Called when previous slider is shown */\n onPreviousSlide?: () => void;\n\n /** Called with slide index when slide changes */\n onSlideChange?: (index: number) => void;\n\n /** Get embla API as ref */\n getEmblaApi?: (embla: EmblaCarouselType) => void;\n\n /** Props passed down to next control */\n nextControlProps?: React.ComponentPropsWithoutRef<'button'>;\n\n /** Props passed down to previous control */\n previousControlProps?: React.ComponentPropsWithoutRef<'button'>;\n\n /** Controls size of the next and previous controls, `26` by default */\n controlSize?: React.CSSProperties['width'];\n\n /** Controls position of the next and previous controls, key of `theme.spacing` or any valid CSS value, `'sm'` by default */\n controlsOffset?: MantineSpacing;\n\n /** Controls slide width based on viewport width, `'100%'` by default */\n slideSize?: StyleProp<string | number>;\n\n /** Key of theme.spacing or number to set gap between slides */\n slideGap?: StyleProp<MantineSpacing>;\n\n /** Carousel orientation, `'horizontal'` by default */\n orientation?: 'horizontal' | 'vertical';\n\n /** Slides container `height`, required for vertical orientation */\n height?: React.CSSProperties['height'];\n\n /** Determines how slides will be aligned relative to the container. Use number between 0-1 to align slides based on percentage, where 0.5 is 50%, `'center'` by default */\n align?: 'start' | 'center' | 'end' | number;\n\n /** Number of slides that will be scrolled with next/previous buttons, `1` by default */\n slidesToScroll?: number | 'auto';\n\n /** Determines whether gap between slides should be treated as part of the slide size, `true` by default */\n includeGapInSize?: boolean;\n\n /** Determines whether the carousel can be scrolled with mouse and touch interactions, `true` by default */\n draggable?: boolean;\n\n /** Determines whether momentum scrolling should be enabled, `false` by default */\n dragFree?: boolean;\n\n /** Enables infinite looping. `true` by default, automatically falls back to `false` if slide content isn't enough to loop. */\n loop?: boolean;\n\n /** Adjusts scroll speed when triggered by any of the methods. Higher numbers enables faster scrolling. */\n speed?: number;\n\n /** Index of initial slide */\n initialSlide?: number;\n\n /** Choose a fraction representing the percentage portion of a slide that needs to be visible in order to be considered in view. For example, 0.5 equals 50%. */\n inViewThreshold?: number;\n\n /** Determines whether next/previous controls should be displayed, true by default */\n withControls?: boolean;\n\n /** Determines whether indicators should be displayed, `false` by default */\n withIndicators?: boolean;\n\n /** An array of embla plugins */\n plugins?: EmblaPluginType[];\n\n /** Icon of the next control */\n nextControlIcon?: React.ReactNode;\n\n /** Icon of the previous control */\n previousControlIcon?: React.ReactNode;\n\n /** Allow the carousel to skip scroll snaps if it is dragged vigorously. Note that this option will be ignored if the dragFree option is set to `true`, `false` by default */\n skipSnaps?: boolean;\n\n /** Clear leading and trailing empty space that causes excessive scrolling. Use `trimSnaps` to only use snap points that trigger scrolling or keepSnaps to keep them. */\n containScroll?: 'trimSnaps' | 'keepSnaps' | '';\n\n /** Determines whether arrow key should switch slides, `true` by default */\n withKeyboardEvents?: boolean;\n}\n\nexport type CarouselFactory = Factory<{\n props: CarouselProps;\n ref: HTMLDivElement;\n stylesNames: CarouselStylesNames;\n vars: CarouselCssVariables;\n staticComponents: {\n Slide: typeof CarouselSlide;\n };\n}>;\n\nconst defaultProps: Partial<CarouselProps> = {\n controlSize: 26,\n controlsOffset: 'sm',\n slideSize: '100%',\n slideGap: 0,\n orientation: 'horizontal',\n align: 'center',\n slidesToScroll: 1,\n includeGapInSize: true,\n draggable: true,\n dragFree: false,\n loop: false,\n speed: 10,\n initialSlide: 0,\n inViewThreshold: 0,\n withControls: true,\n withIndicators: false,\n skipSnaps: false,\n containScroll: '',\n withKeyboardEvents: true,\n};\n\nconst varsResolver = createVarsResolver<CarouselFactory>(\n (_, { 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);\n\nexport const Carousel = factory<CarouselFactory>((_props, ref) => {\n const props = useProps('Carousel', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n getEmblaApi,\n onNextSlide,\n onPreviousSlide,\n onSlideChange,\n nextControlProps,\n previousControlProps,\n controlSize,\n controlsOffset,\n slideSize,\n slideGap,\n orientation,\n height,\n align,\n slidesToScroll,\n includeGapInSize,\n draggable,\n dragFree,\n loop,\n speed,\n initialSlide,\n inViewThreshold,\n withControls,\n withIndicators,\n plugins,\n nextControlIcon,\n previousControlIcon,\n skipSnaps,\n containScroll,\n withKeyboardEvents,\n ...others\n } = props;\n\n const getStyles = useStyles<CarouselFactory>({\n name: 'Carousel',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n\n const responsiveClassName = useRandomClassName();\n const { dir } = useDirection();\n\n const [emblaRefElement, embla] = useEmblaCarousel(\n {\n axis: orientation === 'horizontal' ? 'x' : 'y',\n direction: orientation === 'horizontal' ? dir : undefined,\n startIndex: initialSlide,\n loop,\n align,\n slidesToScroll,\n draggable,\n dragFree,\n speed,\n inViewThreshold,\n skipSnaps,\n containScroll,\n },\n plugins\n );\n\n const [selected, setSelected] = useState(0);\n const [slidesCount, setSlidesCount] = useState(0);\n\n const handleScroll = useCallback((index: number) => embla && embla.scrollTo(index), [embla]);\n\n const handleSelect = useCallback(() => {\n if (!embla) return;\n const slide = embla.selectedScrollSnap();\n setSelected(slide);\n onSlideChange?.(slide);\n }, [embla, setSelected]);\n\n const handlePrevious = useCallback(() => {\n embla?.scrollPrev();\n onPreviousSlide?.();\n }, [embla]);\n\n const handleNext = useCallback(() => {\n embla?.scrollNext();\n onNextSlide?.();\n }, [embla]);\n\n const handleKeydown = useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (withKeyboardEvents) {\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 },\n [embla]\n );\n\n useEffect(() => {\n if (embla) {\n getEmblaApi?.(embla);\n handleSelect();\n setSlidesCount(embla.scrollSnapList().length);\n embla.on('select', handleSelect);\n\n return () => {\n embla.off('select', handleSelect);\n };\n }\n\n return undefined;\n }, [embla, slidesToScroll]);\n\n useEffect(() => {\n if (embla) {\n embla.reInit();\n setSlidesCount(embla.scrollSnapList().length);\n setSelected((currentSelected) =>\n clamp(currentSelected, 0, Children.toArray(children).length - 1)\n );\n }\n }, [Children.toArray(children).length, slidesToScroll]);\n\n const canScrollPrev = embla?.canScrollPrev() || false;\n const canScrollNext = embla?.canScrollNext() || false;\n\n const indicators = Array(slidesCount)\n .fill(0)\n .map((_, index) => (\n <UnstyledButton\n {...getStyles('indicator')}\n key={index}\n data-active={index === selected || undefined}\n aria-hidden\n tabIndex={-1}\n onClick={() => handleScroll(index)}\n />\n ));\n\n return (\n <CarouselProvider value={{ getStyles, orientation }}>\n <CarouselVariables {...props} selector={`.${responsiveClassName}`} />\n <Box\n ref={ref}\n {...getStyles('root', { className: responsiveClassName })}\n {...others}\n mod={{ orientation, 'include-gap-in-size': includeGapInSize }}\n onKeyDownCapture={handleKeydown}\n >\n <div {...getStyles('viewport')} ref={emblaRefElement}>\n <div {...getStyles('container')} data-orientation={orientation}>\n {children}\n </div>\n </div>\n\n {withIndicators && <div {...getStyles('indicators')}>{indicators}</div>}\n\n {withControls && (\n <div {...getStyles('controls')}>\n <UnstyledButton\n {...previousControlProps}\n {...getStyles('control', {\n className: previousControlProps?.className,\n style: previousControlProps?.style,\n })}\n onClick={(event) => {\n handlePrevious();\n previousControlProps?.onClick?.(event);\n }}\n data-inactive={!canScrollPrev || undefined}\n tabIndex={canScrollPrev ? 0 : -1}\n >\n {typeof previousControlIcon !== 'undefined' ? (\n previousControlIcon\n ) : (\n <AccordionChevron\n style={{\n transform: `rotate(${getChevronRotation({\n dir,\n orientation,\n direction: 'previous',\n })}deg)`,\n }}\n />\n )}\n </UnstyledButton>\n\n <UnstyledButton\n {...getStyles('control', {\n className: nextControlProps?.className,\n style: nextControlProps?.style,\n })}\n {...nextControlProps}\n onClick={(event) => {\n handleNext();\n nextControlProps?.onClick?.(event);\n }}\n data-inactive={!canScrollNext || undefined}\n tabIndex={canScrollNext ? 0 : -1}\n >\n {typeof nextControlIcon !== 'undefined' ? (\n nextControlIcon\n ) : (\n <AccordionChevron\n style={{\n transform: `rotate(${getChevronRotation({\n dir,\n orientation,\n direction: 'next',\n })}deg)`,\n }}\n />\n )}\n </UnstyledButton>\n </div>\n )}\n </Box>\n </CarouselProvider>\n );\n});\n\nCarousel.classes = classes;\nCarousel.displayName = '@mantine/core/Carousel';\nCarousel.Slide = CarouselSlide;\n"],"names":["createVarsResolver","rem","getSpacing","factory","useProps","useStyles","classes","useRandomClassName","useDirection","useEmblaCarousel","useState","useCallback","useEffect","clamp","Children","React","UnstyledButton","CarouselProvider","CarouselVariables","Box","AccordionChevron","getChevronRotation","CarouselSlide"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAA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Aa;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Carousel.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,63 +0,0 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var React = require('react');
7
- var core = require('@mantine/core');
8
- var Carousel_context = require('../Carousel.context.js');
9
- var Carousel_module = require('../Carousel.module.css.js');
10
-
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
12
-
13
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
-
15
- var __defProp = Object.defineProperty;
16
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
17
- var __hasOwnProp = Object.prototype.hasOwnProperty;
18
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
19
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
- var __spreadValues = (a, b) => {
21
- for (var prop in b || (b = {}))
22
- if (__hasOwnProp.call(b, prop))
23
- __defNormalProp(a, prop, b[prop]);
24
- if (__getOwnPropSymbols)
25
- for (var prop of __getOwnPropSymbols(b)) {
26
- if (__propIsEnum.call(b, prop))
27
- __defNormalProp(a, prop, b[prop]);
28
- }
29
- return a;
30
- };
31
- var __objRest = (source, exclude) => {
32
- var target = {};
33
- for (var prop in source)
34
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
35
- target[prop] = source[prop];
36
- if (source != null && __getOwnPropSymbols)
37
- for (var prop of __getOwnPropSymbols(source)) {
38
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
39
- target[prop] = source[prop];
40
- }
41
- return target;
42
- };
43
- const defaultProps = {};
44
- const CarouselSlide = core.factory((props, ref) => {
45
- const _a = core.useProps(
46
- "CarouselSlide",
47
- defaultProps,
48
- props
49
- ), { classNames, className, style, styles, vars } = _a, others = __objRest(_a, ["classNames", "className", "style", "styles", "vars"]);
50
- const ctx = Carousel_context.useCarouselContext();
51
- return /* @__PURE__ */ React__default.createElement(
52
- core.Box,
53
- __spreadValues(__spreadValues({
54
- ref,
55
- mod: { orientation: ctx.orientation }
56
- }, ctx.getStyles("slide", { className, style, classNames, styles })), others)
57
- );
58
- });
59
- CarouselSlide.classes = Carousel_module['default'];
60
- CarouselSlide.displayName = "@mantine/core/CarouselSlide";
61
-
62
- exports.CarouselSlide = CarouselSlide;
63
- //# sourceMappingURL=CarouselSlide.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CarouselSlide.js","sources":["../../src/CarouselSlide/CarouselSlide.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n factory,\n ElementProps,\n useProps,\n Factory,\n} from '@mantine/core';\nimport { useCarouselContext } from '../Carousel.context';\nimport classes from '../Carousel.module.css';\n\nexport type CarouselSlideStylesNames = 'slide';\n\nexport interface CarouselSlideProps\n extends BoxProps,\n CompoundStylesApiProps<CarouselSlideFactory>,\n ElementProps<'div'> {}\n\nexport type CarouselSlideFactory = Factory<{\n props: CarouselSlideProps;\n ref: HTMLDivElement;\n stylesNames: CarouselSlideStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<CarouselSlideProps> = {};\n\nexport const CarouselSlide = factory<CarouselSlideFactory>((props, ref) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'CarouselSlide',\n defaultProps,\n props\n );\n\n const ctx = useCarouselContext();\n\n return (\n <Box\n ref={ref}\n mod={{ orientation: ctx.orientation }}\n {...ctx.getStyles('slide', { className, style, classNames, styles })}\n {...others}\n />\n );\n});\n\nCarouselSlide.classes = classes;\nCarouselSlide.displayName = '@mantine/core/CarouselSlide';\n"],"names":["factory","useProps","useCarouselContext","React","Box","classes"],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,C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EAAE,MAAM,CAAC;AACjF,GAAG,CAAC;AACJ,CAAC,EAAE;AACH,aAAa,CAAC,OAAO,GAAGC,0BAAO,CAAC;AAChC,aAAa,CAAC,WAAW,GAAG,6BAA6B;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CarouselVariables.js","sources":["../../src/CarouselVariables/CarouselVariables.tsx"],"sourcesContent":["import React from 'react';\nimport {\n getSortedBreakpoints,\n useMantineTheme,\n keys,\n getSpacing,\n MantineBreakpoint,\n filterProps,\n InlineStyles,\n getBaseValue,\n rem,\n} from '@mantine/core';\nimport type { CarouselProps } from '../Carousel';\n\ninterface CarouselVariablesProps extends CarouselProps {\n selector: string;\n}\n\nexport function CarouselVariables({ slideGap, slideSize, selector }: CarouselVariablesProps) {\n const theme = useMantineTheme();\n\n const baseStyles: Record<string, string | undefined> = filterProps({\n '--carousel-slide-gap': getSpacing(getBaseValue(slideGap)),\n '--carousel-slide-size': rem(getBaseValue(slideSize)),\n });\n\n const queries = keys(theme.breakpoints).reduce<Record<string, Record<string, any>>>(\n (acc, breakpoint) => {\n if (!acc[breakpoint]) {\n acc[breakpoint] = {};\n }\n\n if (typeof slideGap === 'object' && slideGap[breakpoint] !== undefined) {\n acc[breakpoint]['--carousel-slide-gap'] = getSpacing(slideGap[breakpoint]);\n }\n\n if (typeof slideSize === 'object' && slideSize[breakpoint] !== undefined) {\n acc[breakpoint]['--carousel-slide-size'] = getSpacing(slideSize[breakpoint]);\n }\n\n return acc;\n },\n {}\n );\n\n const sortedBreakpoints = getSortedBreakpoints(keys(queries), theme).filter(\n (breakpoint) => keys(queries[breakpoint.value]).length > 0\n );\n\n const media = sortedBreakpoints.map((breakpoint) => ({\n query: `(min-width: ${theme.breakpoints[breakpoint.value as MantineBreakpoint]})`,\n styles: queries[breakpoint.value],\n }));\n\n return <InlineStyles styles={baseStyles} media={media} selector={selector} />;\n}\n"],"names":["useMantineTheme","filterProps","getSpacing","getBaseValue","rem","keys","getSortedBreakpoints","React","InlineStyles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;AAC7E,IAAI,CAAC,UAAU,KAAKA,SAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;AAC9D,GAAG,CAAC;AACJ,EAAE,MAAM,KAAK,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,MAAM;AACvD,IAAI,KAAK,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChE,IAAI,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;AACrC,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,uBAAuBE,cAAK,CAAC,aAAa,CAACC,iBAAY,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AACpG;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-chevron-rotation.js","sources":["../src/get-chevron-rotation.ts"],"sourcesContent":["interface Options {\n dir: 'rtl' | 'ltr';\n orientation: 'horizontal' | 'vertical' | undefined;\n direction: 'next' | 'previous';\n}\n\nexport function getChevronRotation({ dir, orientation, direction }: Options) {\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"],"names":[],"mappings":";;;;;AAAO,SAAS,kBAAkB,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;AACpE,EAAE,IAAI,SAAS,KAAK,UAAU,EAAE;AAChC,IAAI,OAAO,WAAW,KAAK,YAAY,GAAG,EAAE,IAAI,GAAG,KAAK,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;AAC/E,GAAG;AACH,EAAE,OAAO,WAAW,KAAK,YAAY,GAAG,EAAE,IAAI,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1E;;"}
package/cjs/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-animation-offset-effect.js","sources":["../src/use-animation-offset-effect.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport type { EmblaCarouselType } from 'embla-carousel-react';\n\nexport function useAnimationOffsetEffect(\n embla: EmblaCarouselType | null | undefined,\n transitionDuration: number\n) {\n useEffect(() => {\n if (embla) {\n window.setTimeout(() => {\n embla.reInit();\n }, transitionDuration);\n }\n }, [embla, transitionDuration]);\n}\n"],"names":["useEffect"],"mappings":";;;;;;;AACO,SAAS,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,EAAE;AACpE,EAAEA,eAAS,CAAC,MAAM;AAClB,IAAI,IAAI,KAAK,EAAE;AACf,MAAM,MAAM,CAAC,UAAU,CAAC,MAAM;AAC9B,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;AACvB,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAC7B,KAAK;AACL,GAAG,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAClC;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Carousel.module.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}