@mmb-digital/ds-lilly 0.10.63 → 0.10.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ds-lilly.js
CHANGED
|
@@ -109091,7 +109091,7 @@ var Arrow = function (_a) {
|
|
|
109091
109091
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isRounded: true, isSmall: true, allowEventPropagation: false, ariaLabel: messages[direction === 'left' ? 'back' : 'next'], onlyIconName: direction === 'left' ? 'arrowLeftFill' : 'arrowRightFill', type: "filled", onClick: direction === 'left' ? slider.slickPrev : slider.slickNext }))) : null;
|
|
109092
109092
|
};
|
|
109093
109093
|
var Carousel = function (_a) {
|
|
109094
|
-
var _b = _a.hasPreview, hasPreview = _b === void 0 ? true : _b, messages = _a.messages, onChange = _a.onChange, slides = _a.slides, props = Carousel_rest(_a, ["hasPreview", "messages", "onChange", "slides"]);
|
|
109094
|
+
var _b = _a.hasPreview, hasPreview = _b === void 0 ? true : _b, messages = _a.messages, onChange = _a.onChange, slides = _a.slides, theme = _a.theme, props = Carousel_rest(_a, ["hasPreview", "messages", "onChange", "slides", "theme"]);
|
|
109095
109095
|
var _c = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(props.initialSlide || 0), nextSlide = _c[0], setNextSlide = _c[1];
|
|
109096
109096
|
var _d = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(), width = _d[0], setWidth = _d[1];
|
|
109097
109097
|
var _e = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isSwiping = _e[0], setSwiping = _e[1];
|
|
@@ -109117,7 +109117,7 @@ var Carousel = function (_a) {
|
|
|
109117
109117
|
// TODO: try enable later
|
|
109118
109118
|
setSwiping(false);
|
|
109119
109119
|
}, arrows: true, centerMode: true, draggable: true, infinite: false, swipe: true, initialSlide: props.initialSlide || 0, slidesToShow: 1, variableWidth: true, useTransform: false, nextArrow: (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Arrow, { direction: "right", isSwiping: isSwiping, messages: messages, show: nextSlide < slides.length - 1, slideWidth: slideWidth, slider: sliderRef.current, width: width })), prevArrow: (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Arrow, { direction: "left", isSwiping: isSwiping, messages: messages, show: nextSlide > 0, slideWidth: slideWidth, slider: sliderRef.current, width: width })) }, props), { dots: !hasPreview });
|
|
109120
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { ref: function (ref) { return setWidth(ref === null || ref === void 0 ? void 0 : ref.clientWidth); }, className:
|
|
109120
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { ref: function (ref) { return setWidth(ref === null || ref === void 0 ? void 0 : ref.clientWidth); }, className: classBinder_cx('c-carousel', theme) },
|
|
109121
109121
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-carousel__wrapper') },
|
|
109122
109122
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(lib_default.a, Carousel_assign({}, config, { ref: function (ref) { return (sliderRef.current = ref); } }), slides.map(function (_a, key) {
|
|
109123
109123
|
var alt = _a.alt, src = _a.src;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import 'slick-carousel/slick/slick.css';
|
|
2
2
|
import 'slick-carousel/slick/slick-theme.css';
|
|
3
3
|
import { Settings } from 'react-slick';
|
|
4
|
+
import { ComponentPropsType } from '../../../utils';
|
|
4
5
|
declare type Messages = {
|
|
5
6
|
next: string;
|
|
6
7
|
back: string;
|
|
7
8
|
};
|
|
8
|
-
|
|
9
|
+
interface Props extends ComponentPropsType, Partial<Settings> {
|
|
9
10
|
slides: Array<{
|
|
10
11
|
src: string;
|
|
11
12
|
alt: string;
|
|
@@ -13,7 +14,7 @@ declare type Props = Partial<Settings> & {
|
|
|
13
14
|
onChange?: (index: number) => void;
|
|
14
15
|
hasPreview?: boolean;
|
|
15
16
|
messages: Messages;
|
|
16
|
-
}
|
|
17
|
-
export declare const Carousel: ({ hasPreview, messages, onChange, slides, ...props }: Props) => JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export declare const Carousel: ({ hasPreview, messages, onChange, slides, theme, ...props }: Props) => JSX.Element;
|
|
18
19
|
export {};
|
|
19
20
|
//# sourceMappingURL=Carousel.d.ts.map
|