@plasmicpkgs/react-slick 0.0.18 → 0.0.23
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/index.d.ts +5 -1
- package/dist/react-slick.cjs.development.js +56 -2
- package/dist/react-slick.cjs.development.js.map +1 -1
- package/dist/react-slick.cjs.production.min.js +1 -1
- package/dist/react-slick.cjs.production.min.js.map +1 -1
- package/dist/react-slick.esm.js +55 -3
- package/dist/react-slick.esm.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Slider, { Settings } from "react-slick";
|
|
3
4
|
export declare const sliderMeta: ComponentMeta<Settings>;
|
|
5
|
+
export declare const SliderWrapper: React.ForwardRefExoticComponent<Settings & {
|
|
6
|
+
editingSlide?: number | undefined;
|
|
7
|
+
} & React.RefAttributes<Slider>>;
|
|
4
8
|
export declare function registerSlider(loader?: {
|
|
5
9
|
registerComponent: typeof registerComponent;
|
|
6
10
|
}, customSliderMeta?: ComponentMeta<Settings>): void;
|
|
@@ -5,8 +5,27 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var registerComponent = _interopDefault(require('@plasmicapp/host/registerComponent'));
|
|
8
|
+
var composeRefs = _interopDefault(require('@seznam/compose-react-refs'));
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var React__default = _interopDefault(React);
|
|
8
11
|
var Slider = _interopDefault(require('react-slick'));
|
|
9
12
|
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
14
|
+
if (source == null) return {};
|
|
15
|
+
var target = {};
|
|
16
|
+
var sourceKeys = Object.keys(source);
|
|
17
|
+
var key, i;
|
|
18
|
+
|
|
19
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
20
|
+
key = sourceKeys[i];
|
|
21
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
22
|
+
target[key] = source[key];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return target;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _excluded = ["editingSlide"];
|
|
10
29
|
var sliderMeta = {
|
|
11
30
|
name: "hostless-slider",
|
|
12
31
|
displayName: "Slider",
|
|
@@ -35,6 +54,26 @@ var sliderMeta = {
|
|
|
35
54
|
}
|
|
36
55
|
}]
|
|
37
56
|
},
|
|
57
|
+
editingSlide: {
|
|
58
|
+
displayName: "Currently edited slide",
|
|
59
|
+
type: "number",
|
|
60
|
+
description: "Switch to the specified slide (first is 0). Only affects the editor, not the final page.",
|
|
61
|
+
defaultValueHint: 0,
|
|
62
|
+
editOnly: true
|
|
63
|
+
},
|
|
64
|
+
// TODO Ideally, we are not showing any labels on these buttons, and we can place them in the same row.
|
|
65
|
+
// insertSlide: {
|
|
66
|
+
// displayName: "",
|
|
67
|
+
// type: "custom",
|
|
68
|
+
// description: "Insert a new slide right after the current slide.",
|
|
69
|
+
// control: MyReactComponent,
|
|
70
|
+
// },
|
|
71
|
+
// deleteSlide: {
|
|
72
|
+
// displayName: "",
|
|
73
|
+
// type: "custom",
|
|
74
|
+
// description: "Delete the current slide.",
|
|
75
|
+
// control: MyReactComponent,
|
|
76
|
+
// },
|
|
38
77
|
accessibility: {
|
|
39
78
|
displayName: "Accessibility",
|
|
40
79
|
type: "boolean",
|
|
@@ -251,14 +290,29 @@ var sliderMeta = {
|
|
|
251
290
|
maxWidth: "100%"
|
|
252
291
|
}
|
|
253
292
|
};
|
|
293
|
+
var SliderWrapper = /*#__PURE__*/React.forwardRef(function SliderWrapper_(_ref, userRef) {
|
|
294
|
+
var editingSlide = _ref.editingSlide,
|
|
295
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
296
|
+
|
|
297
|
+
var slider = React.useRef(null);
|
|
298
|
+
React.useEffect(function () {
|
|
299
|
+
if (editingSlide !== undefined) {
|
|
300
|
+
slider.current.slickGoTo(editingSlide);
|
|
301
|
+
}
|
|
302
|
+
}, [editingSlide]);
|
|
303
|
+
return React__default.createElement(Slider, Object.assign({
|
|
304
|
+
ref: composeRefs(slider, userRef)
|
|
305
|
+
}, props));
|
|
306
|
+
});
|
|
254
307
|
function registerSlider(loader, customSliderMeta) {
|
|
255
308
|
if (loader) {
|
|
256
|
-
loader.registerComponent(
|
|
309
|
+
loader.registerComponent(SliderWrapper, customSliderMeta != null ? customSliderMeta : sliderMeta);
|
|
257
310
|
} else {
|
|
258
|
-
registerComponent(
|
|
311
|
+
registerComponent(SliderWrapper, customSliderMeta != null ? customSliderMeta : sliderMeta);
|
|
259
312
|
}
|
|
260
313
|
}
|
|
261
314
|
|
|
315
|
+
exports.SliderWrapper = SliderWrapper;
|
|
262
316
|
exports.registerSlider = registerSlider;
|
|
263
317
|
exports.sliderMeta = sliderMeta;
|
|
264
318
|
//# sourceMappingURL=react-slick.cjs.development.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-slick.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Slider, { Settings } from \"react-slick\";\n\nexport const sliderMeta: ComponentMeta<Settings> = {\n name: \"hostless-slider\",\n displayName: \"Slider\",\n importName: \"Slider\",\n importPath: \"react-slick\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n ],\n },\n accessibility: {\n displayName: \"Accessibility\",\n type: \"boolean\",\n description: \"Enables tabbing and arrow key navigation\",\n defaultValueHint: true,\n },\n adaptiveHeight: {\n displayName: \"Adaptive Height\",\n type: \"boolean\",\n description: \"Adjust the slide's height automatically\",\n defaultValueHint: false,\n },\n arrows: {\n displayName: \"Arrows\",\n type: \"boolean\",\n description: \"Show next/prev arrows\",\n defaultValueHint: true,\n },\n autoplay: {\n displayName: \"Auto Play\",\n type: \"boolean\",\n description: \"Automatically start scrolling\",\n defaultValueHint: false,\n },\n autoplaySpeed: {\n displayName: \"Auto Play Speed\",\n type: \"number\",\n description: \"Delay between each auto scroll, in milliseconds\",\n defaultValueHint: 3000,\n hidden: (props) => !props.autoplay,\n },\n centerMode: {\n displayName: \"Center Mode\",\n type: \"boolean\",\n description:\n \"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts\",\n defaultValueHint: false,\n },\n centerPadding: {\n displayName: \"Center Padding\",\n type: \"string\",\n description: \"Side padding when in center mode (px or %)\",\n defaultValueHint: \"50px\",\n hidden: (props) => !props.centerMode,\n },\n dots: {\n displayName: \"Dots\",\n type: \"boolean\",\n description: \"Show dots for each slide\",\n defaultValueHint: false,\n },\n draggable: {\n displayName: \"Draggable\",\n type: \"boolean\",\n description: \"Enables mouse dragging on desktop\",\n defaultValueHint: true,\n },\n easing: {\n displayName: \"Easing\",\n type: \"string\",\n description: \"Easing method for transition\",\n defaultValueHint: \"linear\",\n },\n fade: {\n displayName: \"Fade\",\n type: \"boolean\",\n description: \"Cross-fade between slides\",\n defaultValueHint: false,\n },\n focusOnSelect: {\n displayName: \"Focus On Select\",\n type: \"boolean\",\n description: \"Go to slide on click\",\n defaultValueHint: false,\n },\n infinite: {\n displayName: \"Infinite\",\n type: \"boolean\",\n description: \"Infinitely wrap around contents\",\n defaultValueHint: true,\n },\n initialSlide: {\n displayName: \"Initial Slide\",\n type: \"number\",\n description: \"Index of initial slide\",\n defaultValueHint: 0,\n },\n lazyLoad: {\n displayName: \"Lazy Load\",\n type: \"choice\",\n options: [\"ondemand\", \"progressive\"],\n description:\n \"Load images or render components on demand or progressively\",\n },\n pauseOnDotsHover: {\n displayName: \"Pause On Dots Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on dots\",\n defaultValueHint: false,\n },\n pauseOnFocus: {\n displayName: \"Pause On Focus\",\n type: \"boolean\",\n description: \"Prevents autoplay while focused on slides\",\n defaultValueHint: false,\n },\n pauseOnHover: {\n displayName: \"Pause On Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on track\",\n defaultValueHint: true,\n },\n rows: {\n displayName: \"Rows\",\n type: \"number\",\n description: \"Number of rows per slide (enables grid mode)\",\n defaultValueHint: 1,\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n // Looks like the `slide` prop is not being used to set the container tag:\n // https://github.com/akiran/react-slick/issues/1318\n // https://github.com/akiran/react-slick/pull/1885\n // https://stackoverflow.com/questions/51492535/wrap-react-slick-li-slides-inside-ul\n //\n // slide: {\n // displayName: \"Slide Tag\",\n // type: \"string\",\n // description: 'Slide container element type',\n // defaultValueHint: \"div\",\n // },\n slidesPerRow: {\n displayName: \"Slides Per Row\",\n type: \"number\",\n description:\n \"Number of slides to display in grid mode, this is useful with rows option\",\n defaultValueHint: 1,\n },\n slidesToScroll: {\n displayName: \"Slides To Scroll\",\n type: \"number\",\n description: \"Number of slides to scroll at once\",\n defaultValueHint: 1,\n },\n slidesToShow: {\n displayName: \"Slides To Show\",\n type: \"number\",\n description: \"Number of slides to show in one frame\",\n defaultValueHint: 1,\n },\n speed: {\n displayName: \"Speed\",\n type: \"number\",\n description: \"Transition speed in milliseconds\",\n defaultValueHint: 500,\n },\n swipe: {\n displayName: \"Swipe\",\n type: \"boolean\",\n description: \"Enable swiping to change slides\",\n defaultValueHint: true,\n },\n swipeToSlide: {\n displayName: \"Swipe To Slide\",\n type: \"boolean\",\n description: \"Enable drag/swipe irrespective of 'slidesToScroll'\",\n defaultValueHint: false,\n },\n touchMove: {\n displayName: \"Touch Move\",\n type: \"boolean\",\n description: \"Enable slide moving on touch\",\n defaultValueHint: true,\n },\n touchThreshold: {\n displayName: \"Touch Threshold\",\n type: \"number\",\n description: \"Swipe distance threshold in pixels\",\n defaultValueHint: 5,\n },\n useCSS: {\n displayName: \"Use CSS\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transitions\",\n defaultValueHint: true,\n },\n useTransform: {\n displayName: \"Use Transform\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transforms\",\n defaultValueHint: true,\n },\n variableWidth: {\n displayName: \"Variable Width\",\n type: \"boolean\",\n description: \"Variable width slides\",\n defaultValueHint: false,\n },\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: ComponentMeta<Settings>\n) {\n if (loader) {\n loader.registerComponent(Slider, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(Slider, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["sliderMeta","name","displayName","importName","importPath","props","children","type","defaultValue","src","styles","maxWidth","accessibility","description","defaultValueHint","adaptiveHeight","arrows","autoplay","autoplaySpeed","hidden","centerMode","centerPadding","dots","draggable","easing","fade","focusOnSelect","infinite","initialSlide","lazyLoad","options","pauseOnDotsHover","pauseOnFocus","pauseOnHover","rows","rtl","slidesPerRow","slidesToScroll","slidesToShow","speed","swipe","swipeToSlide","touchMove","touchThreshold","useCSS","useTransform","variableWidth","vertical","isDefaultExport","defaultStyles","width","registerSlider","loader","customSliderMeta","registerComponent","Slider"],"mappings":";;;;;;;;;IAKaA,U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LiC,IAAAA,QAAQ,EAAE;AACR7C,MAAAA,WAAW,EAAE,UADL;AAERK,MAAAA,IAAI,EAAE,SAFE;AAGRM,MAAAA,WAAW,EAAE,qBAHL;AAIRC,MAAAA,gBAAgB,EAAE;AAJV;AArOL,GAL0C;AAiPjDkC,EAAAA,eAAe,EAAE,IAjPgC;AAkPjDC,EAAAA,aAAa,EAAE;AACbC,IAAAA,KAAK,EAAE,SADM;AAEbvC,IAAAA,QAAQ,EAAE;AAFG;AAlPkC;SAwPnCwC,eACdC,QACAC;AAEA,MAAID,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBC,MAAzB,EAAiCF,gBAAjC,WAAiCA,gBAAjC,GAAqDrD,UAArD;AACD,GAFD,MAEO;AACLsD,IAAAA,iBAAiB,CAACC,MAAD,EAASF,gBAAT,WAASA,gBAAT,GAA6BrD,UAA7B,CAAjB;AACD;AACF;;;;;"}
|
|
1
|
+
{"version":3,"file":"react-slick.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport composeRefs from \"@seznam/compose-react-refs\";\nimport React, { forwardRef, Ref, useEffect, useRef } from \"react\";\nimport Slider, { Settings } from \"react-slick\";\n\nexport const sliderMeta: ComponentMeta<Settings> = {\n name: \"hostless-slider\",\n displayName: \"Slider\",\n importName: \"Slider\",\n importPath: \"react-slick\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n ],\n },\n editingSlide: {\n displayName: \"Currently edited slide\",\n type: \"number\",\n description:\n \"Switch to the specified slide (first is 0). Only affects the editor, not the final page.\",\n defaultValueHint: 0,\n editOnly: true,\n },\n // TODO Ideally, we are not showing any labels on these buttons, and we can place them in the same row.\n // insertSlide: {\n // displayName: \"\",\n // type: \"custom\",\n // description: \"Insert a new slide right after the current slide.\",\n // control: MyReactComponent,\n // },\n // deleteSlide: {\n // displayName: \"\",\n // type: \"custom\",\n // description: \"Delete the current slide.\",\n // control: MyReactComponent,\n // },\n accessibility: {\n displayName: \"Accessibility\",\n type: \"boolean\",\n description: \"Enables tabbing and arrow key navigation\",\n defaultValueHint: true,\n },\n adaptiveHeight: {\n displayName: \"Adaptive Height\",\n type: \"boolean\",\n description: \"Adjust the slide's height automatically\",\n defaultValueHint: false,\n },\n arrows: {\n displayName: \"Arrows\",\n type: \"boolean\",\n description: \"Show next/prev arrows\",\n defaultValueHint: true,\n },\n autoplay: {\n displayName: \"Auto Play\",\n type: \"boolean\",\n description: \"Automatically start scrolling\",\n defaultValueHint: false,\n },\n autoplaySpeed: {\n displayName: \"Auto Play Speed\",\n type: \"number\",\n description: \"Delay between each auto scroll, in milliseconds\",\n defaultValueHint: 3000,\n hidden: (props) => !props.autoplay,\n },\n centerMode: {\n displayName: \"Center Mode\",\n type: \"boolean\",\n description:\n \"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts\",\n defaultValueHint: false,\n },\n centerPadding: {\n displayName: \"Center Padding\",\n type: \"string\",\n description: \"Side padding when in center mode (px or %)\",\n defaultValueHint: \"50px\",\n hidden: (props) => !props.centerMode,\n },\n dots: {\n displayName: \"Dots\",\n type: \"boolean\",\n description: \"Show dots for each slide\",\n defaultValueHint: false,\n },\n draggable: {\n displayName: \"Draggable\",\n type: \"boolean\",\n description: \"Enables mouse dragging on desktop\",\n defaultValueHint: true,\n },\n easing: {\n displayName: \"Easing\",\n type: \"string\",\n description: \"Easing method for transition\",\n defaultValueHint: \"linear\",\n },\n fade: {\n displayName: \"Fade\",\n type: \"boolean\",\n description: \"Cross-fade between slides\",\n defaultValueHint: false,\n },\n focusOnSelect: {\n displayName: \"Focus On Select\",\n type: \"boolean\",\n description: \"Go to slide on click\",\n defaultValueHint: false,\n },\n infinite: {\n displayName: \"Infinite\",\n type: \"boolean\",\n description: \"Infinitely wrap around contents\",\n defaultValueHint: true,\n },\n initialSlide: {\n displayName: \"Initial Slide\",\n type: \"number\",\n description: \"Index of initial slide\",\n defaultValueHint: 0,\n },\n lazyLoad: {\n displayName: \"Lazy Load\",\n type: \"choice\",\n options: [\"ondemand\", \"progressive\"],\n description:\n \"Load images or render components on demand or progressively\",\n },\n pauseOnDotsHover: {\n displayName: \"Pause On Dots Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on dots\",\n defaultValueHint: false,\n },\n pauseOnFocus: {\n displayName: \"Pause On Focus\",\n type: \"boolean\",\n description: \"Prevents autoplay while focused on slides\",\n defaultValueHint: false,\n },\n pauseOnHover: {\n displayName: \"Pause On Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on track\",\n defaultValueHint: true,\n },\n rows: {\n displayName: \"Rows\",\n type: \"number\",\n description: \"Number of rows per slide (enables grid mode)\",\n defaultValueHint: 1,\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n // Looks like the `slide` prop is not being used to set the container tag:\n // https://github.com/akiran/react-slick/issues/1318\n // https://github.com/akiran/react-slick/pull/1885\n // https://stackoverflow.com/questions/51492535/wrap-react-slick-li-slides-inside-ul\n //\n // slide: {\n // displayName: \"Slide Tag\",\n // type: \"string\",\n // description: 'Slide container element type',\n // defaultValueHint: \"div\",\n // },\n slidesPerRow: {\n displayName: \"Slides Per Row\",\n type: \"number\",\n description:\n \"Number of slides to display in grid mode, this is useful with rows option\",\n defaultValueHint: 1,\n },\n slidesToScroll: {\n displayName: \"Slides To Scroll\",\n type: \"number\",\n description: \"Number of slides to scroll at once\",\n defaultValueHint: 1,\n },\n slidesToShow: {\n displayName: \"Slides To Show\",\n type: \"number\",\n description: \"Number of slides to show in one frame\",\n defaultValueHint: 1,\n },\n speed: {\n displayName: \"Speed\",\n type: \"number\",\n description: \"Transition speed in milliseconds\",\n defaultValueHint: 500,\n },\n swipe: {\n displayName: \"Swipe\",\n type: \"boolean\",\n description: \"Enable swiping to change slides\",\n defaultValueHint: true,\n },\n swipeToSlide: {\n displayName: \"Swipe To Slide\",\n type: \"boolean\",\n description: \"Enable drag/swipe irrespective of 'slidesToScroll'\",\n defaultValueHint: false,\n },\n touchMove: {\n displayName: \"Touch Move\",\n type: \"boolean\",\n description: \"Enable slide moving on touch\",\n defaultValueHint: true,\n },\n touchThreshold: {\n displayName: \"Touch Threshold\",\n type: \"number\",\n description: \"Swipe distance threshold in pixels\",\n defaultValueHint: 5,\n },\n useCSS: {\n displayName: \"Use CSS\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transitions\",\n defaultValueHint: true,\n },\n useTransform: {\n displayName: \"Use Transform\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transforms\",\n defaultValueHint: true,\n },\n variableWidth: {\n displayName: \"Variable Width\",\n type: \"boolean\",\n description: \"Variable width slides\",\n defaultValueHint: false,\n },\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport const SliderWrapper = forwardRef(function SliderWrapper_(\n { editingSlide, ...props }: Settings & { editingSlide?: number },\n userRef?: Ref<Slider>\n) {\n const slider = useRef<Slider>(null);\n useEffect(() => {\n if (editingSlide !== undefined) {\n slider.current!.slickGoTo(editingSlide);\n }\n }, [editingSlide]);\n return <Slider ref={composeRefs(slider, userRef)} {...props} />;\n});\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: ComponentMeta<Settings>\n) {\n if (loader) {\n loader.registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["sliderMeta","name","displayName","importName","importPath","props","children","type","defaultValue","src","styles","maxWidth","editingSlide","description","defaultValueHint","editOnly","accessibility","adaptiveHeight","arrows","autoplay","autoplaySpeed","hidden","centerMode","centerPadding","dots","draggable","easing","fade","focusOnSelect","infinite","initialSlide","lazyLoad","options","pauseOnDotsHover","pauseOnFocus","pauseOnHover","rows","rtl","slidesPerRow","slidesToScroll","slidesToShow","speed","swipe","swipeToSlide","touchMove","touchThreshold","useCSS","useTransform","variableWidth","vertical","isDefaultExport","defaultStyles","width","SliderWrapper","forwardRef","SliderWrapper_","userRef","slider","useRef","useEffect","undefined","current","slickGoTo","React","Slider","ref","composeRefs","registerSlider","loader","customSliderMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOaA,UAAU,GAA4B;AACjDC,EAAAA,IAAI,EAAE,iBAD2C;AAEjDC,EAAAA,WAAW,EAAE,QAFoC;AAGjDC,EAAAA,UAAU,EAAE,QAHqC;AAIjDC,EAAAA,UAAU,EAAE,aAJqC;AAKjDC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAE,MADE;AAERC,MAAAA,YAAY,EAAE,CACZ;AACED,QAAAA,IAAI,EAAE,KADR;AAEEE,QAAAA,GAAG,EAAE,gEAFP;AAGEC,QAAAA,MAAM,EAAE;AACNC,UAAAA,QAAQ,EAAE;AADJ;AAHV,OADY,EAQZ;AACEJ,QAAAA,IAAI,EAAE,KADR;AAEEE,QAAAA,GAAG,EAAE,gEAFP;AAGEC,QAAAA,MAAM,EAAE;AACNC,UAAAA,QAAQ,EAAE;AADJ;AAHV,OARY,EAeZ;AACEJ,QAAAA,IAAI,EAAE,KADR;AAEEE,QAAAA,GAAG,EAAE,gEAFP;AAGEC,QAAAA,MAAM,EAA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AFsC;MACpC5C,oBAAAA;MAAiBP;;AAGnB,MAAMoD,MAAM,GAAGC,YAAM,CAAS,IAAT,CAArB;AACAC,EAAAA,eAAS,CAAC;AACR,QAAI/C,YAAY,KAAKgD,SAArB,EAAgC;AAC9BH,MAAAA,MAAM,CAACI,OAAP,CAAgBC,SAAhB,CAA0BlD,YAA1B;AACD;AACF,GAJQ,EAIN,CAACA,YAAD,CAJM,CAAT;AAKA,SAAOmD,4BAAA,CAACC,MAAD;AAAQC,IAAAA,GAAG,EAAEC,WAAW,CAACT,MAAD,EAASD,OAAT;KAAuBnD,MAA/C,CAAP;AACD,CAXsC;SAavB8D,eACdC,QACAC;AAEA,MAAID,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBjB,aAAzB,EAAwCgB,gBAAxC,WAAwCA,gBAAxC,GAA4DrE,UAA5D;AACD,GAFD,MAEO;AACLsE,IAAAA,iBAAiB,CAACjB,aAAD,EAAgBgB,gBAAhB,WAAgBA,gBAAhB,GAAoCrE,UAApC,CAAjB;AACD;AACF;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var i=e(require("@plasmicapp/host/registerComponent")),t=e(require("react-
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var i=e(require("@plasmicapp/host/registerComponent")),t=e(require("@seznam/compose-react-refs")),a=require("react"),l=e(a),s=e(require("react-slick")),o=["editingSlide"],n={name:"hostless-slider",displayName:"Slider",importName:"Slider",importPath:"react-slick",props:{children:{type:"slot",defaultValue:[{type:"img",src:"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1",styles:{maxWidth:"100%"}},{type:"img",src:"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2",styles:{maxWidth:"100%"}},{type:"img",src:"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3",styles:{maxWidth:"100%"}}]},editingSlide:{displayName:"Currently edited slide",type:"number",description:"Switch to the specified slide (first is 0). Only affects the editor, not the final page.",defaultValueHint:0,editOnly:!0},accessibility:{displayName:"Accessibility",type:"boolean",description:"Enables tabbing and arrow key navigation",defaultValueHint:!0},adaptiveHeight:{displayName:"Adaptive Height",type:"boolean",description:"Adjust the slide's height automatically",defaultValueHint:!1},arrows:{displayName:"Arrows",type:"boolean",description:"Show next/prev arrows",defaultValueHint:!0},autoplay:{displayName:"Auto Play",type:"boolean",description:"Automatically start scrolling",defaultValueHint:!1},autoplaySpeed:{displayName:"Auto Play Speed",type:"number",description:"Delay between each auto scroll, in milliseconds",defaultValueHint:3e3,hidden:function(e){return!e.autoplay}},centerMode:{displayName:"Center Mode",type:"boolean",description:"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts",defaultValueHint:!1},centerPadding:{displayName:"Center Padding",type:"string",description:"Side padding when in center mode (px or %)",defaultValueHint:"50px",hidden:function(e){return!e.centerMode}},dots:{displayName:"Dots",type:"boolean",description:"Show dots for each slide",defaultValueHint:!1},draggable:{displayName:"Draggable",type:"boolean",description:"Enables mouse dragging on desktop",defaultValueHint:!0},easing:{displayName:"Easing",type:"string",description:"Easing method for transition",defaultValueHint:"linear"},fade:{displayName:"Fade",type:"boolean",description:"Cross-fade between slides",defaultValueHint:!1},focusOnSelect:{displayName:"Focus On Select",type:"boolean",description:"Go to slide on click",defaultValueHint:!1},infinite:{displayName:"Infinite",type:"boolean",description:"Infinitely wrap around contents",defaultValueHint:!0},initialSlide:{displayName:"Initial Slide",type:"number",description:"Index of initial slide",defaultValueHint:0},lazyLoad:{displayName:"Lazy Load",type:"choice",options:["ondemand","progressive"],description:"Load images or render components on demand or progressively"},pauseOnDotsHover:{displayName:"Pause On Dots Hover",type:"boolean",description:"Prevents autoplay while hovering on dots",defaultValueHint:!1},pauseOnFocus:{displayName:"Pause On Focus",type:"boolean",description:"Prevents autoplay while focused on slides",defaultValueHint:!1},pauseOnHover:{displayName:"Pause On Hover",type:"boolean",description:"Prevents autoplay while hovering on track",defaultValueHint:!0},rows:{displayName:"Rows",type:"number",description:"Number of rows per slide (enables grid mode)",defaultValueHint:1},rtl:{displayName:"Reverse",type:"boolean",description:"Reverses the slide order",defaultValueHint:!1},slidesPerRow:{displayName:"Slides Per Row",type:"number",description:"Number of slides to display in grid mode, this is useful with rows option",defaultValueHint:1},slidesToScroll:{displayName:"Slides To Scroll",type:"number",description:"Number of slides to scroll at once",defaultValueHint:1},slidesToShow:{displayName:"Slides To Show",type:"number",description:"Number of slides to show in one frame",defaultValueHint:1},speed:{displayName:"Speed",type:"number",description:"Transition speed in milliseconds",defaultValueHint:500},swipe:{displayName:"Swipe",type:"boolean",description:"Enable swiping to change slides",defaultValueHint:!0},swipeToSlide:{displayName:"Swipe To Slide",type:"boolean",description:"Enable drag/swipe irrespective of 'slidesToScroll'",defaultValueHint:!1},touchMove:{displayName:"Touch Move",type:"boolean",description:"Enable slide moving on touch",defaultValueHint:!0},touchThreshold:{displayName:"Touch Threshold",type:"number",description:"Swipe distance threshold in pixels",defaultValueHint:5},useCSS:{displayName:"Use CSS",type:"boolean",description:"Enable/Disable CSS Transitions",defaultValueHint:!0},useTransform:{displayName:"Use Transform",type:"boolean",description:"Enable/Disable CSS Transforms",defaultValueHint:!0},variableWidth:{displayName:"Variable Width",type:"boolean",description:"Variable width slides",defaultValueHint:!1},vertical:{displayName:"Vertical",type:"boolean",description:"Vertical slide mode",defaultValueHint:!1}},isDefaultExport:!0,defaultStyles:{width:"stretch",maxWidth:"100%"}},d=a.forwardRef((function(e,i){var n=e.editingSlide,d=function(e,i){if(null==e)return{};var t,a,l={},s=Object.keys(e);for(a=0;a<s.length;a++)i.indexOf(t=s[a])>=0||(l[t]=e[t]);return l}(e,o),r=a.useRef(null);return a.useEffect((function(){void 0!==n&&r.current.slickGoTo(n)}),[n]),l.createElement(s,Object.assign({ref:t(r,i)},d))}));exports.SliderWrapper=d,exports.registerSlider=function(e,t){e?e.registerComponent(d,null!=t?t:n):i(d,null!=t?t:n)},exports.sliderMeta=n;
|
|
2
2
|
//# sourceMappingURL=react-slick.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-slick.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Slider, { Settings } from \"react-slick\";\n\nexport const sliderMeta: ComponentMeta<Settings> = {\n name: \"hostless-slider\",\n displayName: \"Slider\",\n importName: \"Slider\",\n importPath: \"react-slick\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n ],\n },\n accessibility: {\n displayName: \"Accessibility\",\n type: \"boolean\",\n description: \"Enables tabbing and arrow key navigation\",\n defaultValueHint: true,\n },\n adaptiveHeight: {\n displayName: \"Adaptive Height\",\n type: \"boolean\",\n description: \"Adjust the slide's height automatically\",\n defaultValueHint: false,\n },\n arrows: {\n displayName: \"Arrows\",\n type: \"boolean\",\n description: \"Show next/prev arrows\",\n defaultValueHint: true,\n },\n autoplay: {\n displayName: \"Auto Play\",\n type: \"boolean\",\n description: \"Automatically start scrolling\",\n defaultValueHint: false,\n },\n autoplaySpeed: {\n displayName: \"Auto Play Speed\",\n type: \"number\",\n description: \"Delay between each auto scroll, in milliseconds\",\n defaultValueHint: 3000,\n hidden: (props) => !props.autoplay,\n },\n centerMode: {\n displayName: \"Center Mode\",\n type: \"boolean\",\n description:\n \"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts\",\n defaultValueHint: false,\n },\n centerPadding: {\n displayName: \"Center Padding\",\n type: \"string\",\n description: \"Side padding when in center mode (px or %)\",\n defaultValueHint: \"50px\",\n hidden: (props) => !props.centerMode,\n },\n dots: {\n displayName: \"Dots\",\n type: \"boolean\",\n description: \"Show dots for each slide\",\n defaultValueHint: false,\n },\n draggable: {\n displayName: \"Draggable\",\n type: \"boolean\",\n description: \"Enables mouse dragging on desktop\",\n defaultValueHint: true,\n },\n easing: {\n displayName: \"Easing\",\n type: \"string\",\n description: \"Easing method for transition\",\n defaultValueHint: \"linear\",\n },\n fade: {\n displayName: \"Fade\",\n type: \"boolean\",\n description: \"Cross-fade between slides\",\n defaultValueHint: false,\n },\n focusOnSelect: {\n displayName: \"Focus On Select\",\n type: \"boolean\",\n description: \"Go to slide on click\",\n defaultValueHint: false,\n },\n infinite: {\n displayName: \"Infinite\",\n type: \"boolean\",\n description: \"Infinitely wrap around contents\",\n defaultValueHint: true,\n },\n initialSlide: {\n displayName: \"Initial Slide\",\n type: \"number\",\n description: \"Index of initial slide\",\n defaultValueHint: 0,\n },\n lazyLoad: {\n displayName: \"Lazy Load\",\n type: \"choice\",\n options: [\"ondemand\", \"progressive\"],\n description:\n \"Load images or render components on demand or progressively\",\n },\n pauseOnDotsHover: {\n displayName: \"Pause On Dots Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on dots\",\n defaultValueHint: false,\n },\n pauseOnFocus: {\n displayName: \"Pause On Focus\",\n type: \"boolean\",\n description: \"Prevents autoplay while focused on slides\",\n defaultValueHint: false,\n },\n pauseOnHover: {\n displayName: \"Pause On Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on track\",\n defaultValueHint: true,\n },\n rows: {\n displayName: \"Rows\",\n type: \"number\",\n description: \"Number of rows per slide (enables grid mode)\",\n defaultValueHint: 1,\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n // Looks like the `slide` prop is not being used to set the container tag:\n // https://github.com/akiran/react-slick/issues/1318\n // https://github.com/akiran/react-slick/pull/1885\n // https://stackoverflow.com/questions/51492535/wrap-react-slick-li-slides-inside-ul\n //\n // slide: {\n // displayName: \"Slide Tag\",\n // type: \"string\",\n // description: 'Slide container element type',\n // defaultValueHint: \"div\",\n // },\n slidesPerRow: {\n displayName: \"Slides Per Row\",\n type: \"number\",\n description:\n \"Number of slides to display in grid mode, this is useful with rows option\",\n defaultValueHint: 1,\n },\n slidesToScroll: {\n displayName: \"Slides To Scroll\",\n type: \"number\",\n description: \"Number of slides to scroll at once\",\n defaultValueHint: 1,\n },\n slidesToShow: {\n displayName: \"Slides To Show\",\n type: \"number\",\n description: \"Number of slides to show in one frame\",\n defaultValueHint: 1,\n },\n speed: {\n displayName: \"Speed\",\n type: \"number\",\n description: \"Transition speed in milliseconds\",\n defaultValueHint: 500,\n },\n swipe: {\n displayName: \"Swipe\",\n type: \"boolean\",\n description: \"Enable swiping to change slides\",\n defaultValueHint: true,\n },\n swipeToSlide: {\n displayName: \"Swipe To Slide\",\n type: \"boolean\",\n description: \"Enable drag/swipe irrespective of 'slidesToScroll'\",\n defaultValueHint: false,\n },\n touchMove: {\n displayName: \"Touch Move\",\n type: \"boolean\",\n description: \"Enable slide moving on touch\",\n defaultValueHint: true,\n },\n touchThreshold: {\n displayName: \"Touch Threshold\",\n type: \"number\",\n description: \"Swipe distance threshold in pixels\",\n defaultValueHint: 5,\n },\n useCSS: {\n displayName: \"Use CSS\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transitions\",\n defaultValueHint: true,\n },\n useTransform: {\n displayName: \"Use Transform\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transforms\",\n defaultValueHint: true,\n },\n variableWidth: {\n displayName: \"Variable Width\",\n type: \"boolean\",\n description: \"Variable width slides\",\n defaultValueHint: false,\n },\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: ComponentMeta<Settings>\n) {\n if (loader) {\n loader.registerComponent(Slider, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(Slider, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["sliderMeta","name","displayName","importName","importPath","props","children","type","defaultValue","src","styles","maxWidth","accessibility","description","defaultValueHint","adaptiveHeight","arrows","autoplay","autoplaySpeed","hidden","centerMode","centerPadding","dots","draggable","easing","fade","focusOnSelect","infinite","initialSlide","lazyLoad","options","pauseOnDotsHover","pauseOnFocus","pauseOnHover","rows","rtl","slidesPerRow","slidesToScroll","slidesToShow","speed","swipe","swipeToSlide","touchMove","touchThreshold","useCSS","useTransform","variableWidth","vertical","isDefaultExport","defaultStyles","width","loader","customSliderMeta","registerComponent","Slider"],"mappings":"6NAKaA,EAAsC,CACjDC,KAAM,kBACNC,YAAa,SACbC,WAAY,SACZC,WAAY,cACZC,MAAO,CACLC,SAAU,CACRC,KAAM,OACNC,aAAc,CACZ,CACED,KAAM,MACNE,IAAK,iEACLC,OAAQ,CACNC,SAAU,SAGd,CACEJ,KAAM,MACNE,IAAK,iEACLC,OAAQ,CACNC,SAAU,SAGd,CACEJ,KAAM,MACNE,IAAK,iEACLC,OAAQ,CACNC,SAAU,WAKlBC,cAAe,CACbV,YAAa,gBACbK,KAAM,UACNM,YAAa,2CACbC,kBAAkB,GAEpBC,eAAgB,CACdb,YAAa,kBACbK,KAAM,UACNM,YAAa,0CACbC,kBAAkB,GAEpBE,OAAQ,CACNd,YAAa,SACbK,KAAM,UACNM,YAAa,wBACbC,kBAAkB,GAEpBG,SAAU,CACRf,YAAa,YACbK,KAAM,UACNM,YAAa,gCACbC,kBAAkB,GAEpBI,cAAe,CACbhB,YAAa,kB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B,CACdnC,YAAa,mBACbK,KAAM,SACNM,YAAa,qCACbC,iBAAkB,GAEpBwB,aAAc,CACZpC,YAAa,iBACbK,KAAM,SACNM,YAAa,wCACbC,iBAAkB,GAEpByB,MAAO,CACLrC,YAAa,QACbK,KAAM,SACNM,YAAa,mCACbC,iBAAkB,KAEpB0B,MAAO,CACLtC,YAAa,QACbK,KAAM,UACNM,YAAa,kCACbC,kBAAkB,GAEpB2B,aAAc,CACZvC,YAAa,iBACbK,KAAM,UACNM,YAAa,qDACbC,kBAAkB,GAEpB4B,UAAW,CACTxC,YAAa,aACbK,KAAM,UACNM,YAAa,+BACbC,kBAAkB,GAEpB6B,eAAgB,CACdzC,YAAa,kBACbK,KAAM,SACNM,YAAa,qCACbC,iBAAkB,GAEpB8B,OAAQ,CACN1C,YAAa,UACbK,KAAM,UACNM,YAAa,iCACbC,kBAAkB,GAEpB+B,aAAc,CACZ3C,YAAa,gBACbK,KAAM,UACNM,YAAa,gCACbC,kBAAkB,GAEpBgC,cAAe,CACb5C,YAAa,iBACbK,KAAM,UACNM,YAAa,wBACbC,kBAAkB,GAEpBiC,SAAU,CACR7C,YAAa,WACbK,KAAM,UACNM,YAAa,sBACbC,kBAAkB,IAGtBkC,iBAAiB,EACjBC,cAAe,CACbC,MAAO,UACPvC,SAAU,yCAKZwC,EACAC,GAEID,EACFA,EAAOE,kBAAkBC,QAAQF,EAAAA,EAAoBpD,GAErDqD,EAAkBC,QAAQF,EAAAA,EAAoBpD"}
|
|
1
|
+
{"version":3,"file":"react-slick.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport composeRefs from \"@seznam/compose-react-refs\";\nimport React, { forwardRef, Ref, useEffect, useRef } from \"react\";\nimport Slider, { Settings } from \"react-slick\";\n\nexport const sliderMeta: ComponentMeta<Settings> = {\n name: \"hostless-slider\",\n displayName: \"Slider\",\n importName: \"Slider\",\n importPath: \"react-slick\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n ],\n },\n editingSlide: {\n displayName: \"Currently edited slide\",\n type: \"number\",\n description:\n \"Switch to the specified slide (first is 0). Only affects the editor, not the final page.\",\n defaultValueHint: 0,\n editOnly: true,\n },\n // TODO Ideally, we are not showing any labels on these buttons, and we can place them in the same row.\n // insertSlide: {\n // displayName: \"\",\n // type: \"custom\",\n // description: \"Insert a new slide right after the current slide.\",\n // control: MyReactComponent,\n // },\n // deleteSlide: {\n // displayName: \"\",\n // type: \"custom\",\n // description: \"Delete the current slide.\",\n // control: MyReactComponent,\n // },\n accessibility: {\n displayName: \"Accessibility\",\n type: \"boolean\",\n description: \"Enables tabbing and arrow key navigation\",\n defaultValueHint: true,\n },\n adaptiveHeight: {\n displayName: \"Adaptive Height\",\n type: \"boolean\",\n description: \"Adjust the slide's height automatically\",\n defaultValueHint: false,\n },\n arrows: {\n displayName: \"Arrows\",\n type: \"boolean\",\n description: \"Show next/prev arrows\",\n defaultValueHint: true,\n },\n autoplay: {\n displayName: \"Auto Play\",\n type: \"boolean\",\n description: \"Automatically start scrolling\",\n defaultValueHint: false,\n },\n autoplaySpeed: {\n displayName: \"Auto Play Speed\",\n type: \"number\",\n description: \"Delay between each auto scroll, in milliseconds\",\n defaultValueHint: 3000,\n hidden: (props) => !props.autoplay,\n },\n centerMode: {\n displayName: \"Center Mode\",\n type: \"boolean\",\n description:\n \"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts\",\n defaultValueHint: false,\n },\n centerPadding: {\n displayName: \"Center Padding\",\n type: \"string\",\n description: \"Side padding when in center mode (px or %)\",\n defaultValueHint: \"50px\",\n hidden: (props) => !props.centerMode,\n },\n dots: {\n displayName: \"Dots\",\n type: \"boolean\",\n description: \"Show dots for each slide\",\n defaultValueHint: false,\n },\n draggable: {\n displayName: \"Draggable\",\n type: \"boolean\",\n description: \"Enables mouse dragging on desktop\",\n defaultValueHint: true,\n },\n easing: {\n displayName: \"Easing\",\n type: \"string\",\n description: \"Easing method for transition\",\n defaultValueHint: \"linear\",\n },\n fade: {\n displayName: \"Fade\",\n type: \"boolean\",\n description: \"Cross-fade between slides\",\n defaultValueHint: false,\n },\n focusOnSelect: {\n displayName: \"Focus On Select\",\n type: \"boolean\",\n description: \"Go to slide on click\",\n defaultValueHint: false,\n },\n infinite: {\n displayName: \"Infinite\",\n type: \"boolean\",\n description: \"Infinitely wrap around contents\",\n defaultValueHint: true,\n },\n initialSlide: {\n displayName: \"Initial Slide\",\n type: \"number\",\n description: \"Index of initial slide\",\n defaultValueHint: 0,\n },\n lazyLoad: {\n displayName: \"Lazy Load\",\n type: \"choice\",\n options: [\"ondemand\", \"progressive\"],\n description:\n \"Load images or render components on demand or progressively\",\n },\n pauseOnDotsHover: {\n displayName: \"Pause On Dots Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on dots\",\n defaultValueHint: false,\n },\n pauseOnFocus: {\n displayName: \"Pause On Focus\",\n type: \"boolean\",\n description: \"Prevents autoplay while focused on slides\",\n defaultValueHint: false,\n },\n pauseOnHover: {\n displayName: \"Pause On Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on track\",\n defaultValueHint: true,\n },\n rows: {\n displayName: \"Rows\",\n type: \"number\",\n description: \"Number of rows per slide (enables grid mode)\",\n defaultValueHint: 1,\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n // Looks like the `slide` prop is not being used to set the container tag:\n // https://github.com/akiran/react-slick/issues/1318\n // https://github.com/akiran/react-slick/pull/1885\n // https://stackoverflow.com/questions/51492535/wrap-react-slick-li-slides-inside-ul\n //\n // slide: {\n // displayName: \"Slide Tag\",\n // type: \"string\",\n // description: 'Slide container element type',\n // defaultValueHint: \"div\",\n // },\n slidesPerRow: {\n displayName: \"Slides Per Row\",\n type: \"number\",\n description:\n \"Number of slides to display in grid mode, this is useful with rows option\",\n defaultValueHint: 1,\n },\n slidesToScroll: {\n displayName: \"Slides To Scroll\",\n type: \"number\",\n description: \"Number of slides to scroll at once\",\n defaultValueHint: 1,\n },\n slidesToShow: {\n displayName: \"Slides To Show\",\n type: \"number\",\n description: \"Number of slides to show in one frame\",\n defaultValueHint: 1,\n },\n speed: {\n displayName: \"Speed\",\n type: \"number\",\n description: \"Transition speed in milliseconds\",\n defaultValueHint: 500,\n },\n swipe: {\n displayName: \"Swipe\",\n type: \"boolean\",\n description: \"Enable swiping to change slides\",\n defaultValueHint: true,\n },\n swipeToSlide: {\n displayName: \"Swipe To Slide\",\n type: \"boolean\",\n description: \"Enable drag/swipe irrespective of 'slidesToScroll'\",\n defaultValueHint: false,\n },\n touchMove: {\n displayName: \"Touch Move\",\n type: \"boolean\",\n description: \"Enable slide moving on touch\",\n defaultValueHint: true,\n },\n touchThreshold: {\n displayName: \"Touch Threshold\",\n type: \"number\",\n description: \"Swipe distance threshold in pixels\",\n defaultValueHint: 5,\n },\n useCSS: {\n displayName: \"Use CSS\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transitions\",\n defaultValueHint: true,\n },\n useTransform: {\n displayName: \"Use Transform\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transforms\",\n defaultValueHint: true,\n },\n variableWidth: {\n displayName: \"Variable Width\",\n type: \"boolean\",\n description: \"Variable width slides\",\n defaultValueHint: false,\n },\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport const SliderWrapper = forwardRef(function SliderWrapper_(\n { editingSlide, ...props }: Settings & { editingSlide?: number },\n userRef?: Ref<Slider>\n) {\n const slider = useRef<Slider>(null);\n useEffect(() => {\n if (editingSlide !== undefined) {\n slider.current!.slickGoTo(editingSlide);\n }\n }, [editingSlide]);\n return <Slider ref={composeRefs(slider, userRef)} {...props} />;\n});\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: ComponentMeta<Settings>\n) {\n if (loader) {\n loader.registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["sliderMeta","name","displayName","importName","importPath","props","children","type","defaultValue","src","styles","maxWidth","editingSlide","description","defaultValueHint","editOnly","accessibility","adaptiveHeight","arrows","autoplay","autoplaySpeed","hidden","centerMode","centerPadding","dots","draggable","easing","fade","focusOnSelect","infinite","initialSlide","lazyLoad","options","pauseOnDotsHover","pauseOnFocus","pauseOnHover","rows","rtl","slidesPerRow","slidesToScroll","slidesToShow","speed","swipe","swipeToSlide","touchMove","touchThreshold","useCSS","useTransform","variableWidth","vertical","isDefaultExport","defaultStyles","width","SliderWrapper","forwardRef","userRef","slider","useRef","useEffect","undefined","current","slickGoTo","React","Slider","ref","composeRefs","loader","customSliderMeta","registerComponent"],"mappings":"qTAOaA,EAAsC,CACjDC,KAAM,kBACNC,YAAa,SACbC,WAAY,SACZC,WAAY,cACZC,MAAO,CACLC,SAAU,CACRC,KAAM,OACNC,aAAc,CACZ,CACED,KAAM,MACNE,IAAK,iEACLC,OAAQ,CACNC,SAAU,SAGd,CACEJ,KAAM,MACNE,IAAK,iEACLC,OAAQ,CACNC,SAAU,SAGd,CACEJ,KAAM,MACNE,IAAK,iEACLC,OAAQ,CACNC,SAAU,WAKlBC,aAAc,CACZV,YAAa,yBACbK,KAAM,SACNM,YACE,2FACFC,iBAAkB,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F4C,EAAOI,QAASC,UAAUjD,KAE3B,CAACA,IACGkD,gBAACC,iBAAOC,IAAKC,EAAYT,EAAQD,IAAclD,+DAItD6D,EACAC,GAEID,EACFA,EAAOE,kBAAkBf,QAAec,EAAAA,EAAoBnE,GAE5DoE,EAAkBf,QAAec,EAAAA,EAAoBnE"}
|
package/dist/react-slick.esm.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
2
|
+
import composeRefs from '@seznam/compose-react-refs';
|
|
3
|
+
import React, { forwardRef, useRef, useEffect } from 'react';
|
|
2
4
|
import Slider from 'react-slick';
|
|
3
5
|
|
|
6
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
7
|
+
if (source == null) return {};
|
|
8
|
+
var target = {};
|
|
9
|
+
var sourceKeys = Object.keys(source);
|
|
10
|
+
var key, i;
|
|
11
|
+
|
|
12
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
13
|
+
key = sourceKeys[i];
|
|
14
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
15
|
+
target[key] = source[key];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return target;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var _excluded = ["editingSlide"];
|
|
4
22
|
var sliderMeta = {
|
|
5
23
|
name: "hostless-slider",
|
|
6
24
|
displayName: "Slider",
|
|
@@ -29,6 +47,26 @@ var sliderMeta = {
|
|
|
29
47
|
}
|
|
30
48
|
}]
|
|
31
49
|
},
|
|
50
|
+
editingSlide: {
|
|
51
|
+
displayName: "Currently edited slide",
|
|
52
|
+
type: "number",
|
|
53
|
+
description: "Switch to the specified slide (first is 0). Only affects the editor, not the final page.",
|
|
54
|
+
defaultValueHint: 0,
|
|
55
|
+
editOnly: true
|
|
56
|
+
},
|
|
57
|
+
// TODO Ideally, we are not showing any labels on these buttons, and we can place them in the same row.
|
|
58
|
+
// insertSlide: {
|
|
59
|
+
// displayName: "",
|
|
60
|
+
// type: "custom",
|
|
61
|
+
// description: "Insert a new slide right after the current slide.",
|
|
62
|
+
// control: MyReactComponent,
|
|
63
|
+
// },
|
|
64
|
+
// deleteSlide: {
|
|
65
|
+
// displayName: "",
|
|
66
|
+
// type: "custom",
|
|
67
|
+
// description: "Delete the current slide.",
|
|
68
|
+
// control: MyReactComponent,
|
|
69
|
+
// },
|
|
32
70
|
accessibility: {
|
|
33
71
|
displayName: "Accessibility",
|
|
34
72
|
type: "boolean",
|
|
@@ -245,13 +283,27 @@ var sliderMeta = {
|
|
|
245
283
|
maxWidth: "100%"
|
|
246
284
|
}
|
|
247
285
|
};
|
|
286
|
+
var SliderWrapper = /*#__PURE__*/forwardRef(function SliderWrapper_(_ref, userRef) {
|
|
287
|
+
var editingSlide = _ref.editingSlide,
|
|
288
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
289
|
+
|
|
290
|
+
var slider = useRef(null);
|
|
291
|
+
useEffect(function () {
|
|
292
|
+
if (editingSlide !== undefined) {
|
|
293
|
+
slider.current.slickGoTo(editingSlide);
|
|
294
|
+
}
|
|
295
|
+
}, [editingSlide]);
|
|
296
|
+
return React.createElement(Slider, Object.assign({
|
|
297
|
+
ref: composeRefs(slider, userRef)
|
|
298
|
+
}, props));
|
|
299
|
+
});
|
|
248
300
|
function registerSlider(loader, customSliderMeta) {
|
|
249
301
|
if (loader) {
|
|
250
|
-
loader.registerComponent(
|
|
302
|
+
loader.registerComponent(SliderWrapper, customSliderMeta != null ? customSliderMeta : sliderMeta);
|
|
251
303
|
} else {
|
|
252
|
-
registerComponent(
|
|
304
|
+
registerComponent(SliderWrapper, customSliderMeta != null ? customSliderMeta : sliderMeta);
|
|
253
305
|
}
|
|
254
306
|
}
|
|
255
307
|
|
|
256
|
-
export { registerSlider, sliderMeta };
|
|
308
|
+
export { SliderWrapper, registerSlider, sliderMeta };
|
|
257
309
|
//# sourceMappingURL=react-slick.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-slick.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Slider, { Settings } from \"react-slick\";\n\nexport const sliderMeta: ComponentMeta<Settings> = {\n name: \"hostless-slider\",\n displayName: \"Slider\",\n importName: \"Slider\",\n importPath: \"react-slick\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n ],\n },\n accessibility: {\n displayName: \"Accessibility\",\n type: \"boolean\",\n description: \"Enables tabbing and arrow key navigation\",\n defaultValueHint: true,\n },\n adaptiveHeight: {\n displayName: \"Adaptive Height\",\n type: \"boolean\",\n description: \"Adjust the slide's height automatically\",\n defaultValueHint: false,\n },\n arrows: {\n displayName: \"Arrows\",\n type: \"boolean\",\n description: \"Show next/prev arrows\",\n defaultValueHint: true,\n },\n autoplay: {\n displayName: \"Auto Play\",\n type: \"boolean\",\n description: \"Automatically start scrolling\",\n defaultValueHint: false,\n },\n autoplaySpeed: {\n displayName: \"Auto Play Speed\",\n type: \"number\",\n description: \"Delay between each auto scroll, in milliseconds\",\n defaultValueHint: 3000,\n hidden: (props) => !props.autoplay,\n },\n centerMode: {\n displayName: \"Center Mode\",\n type: \"boolean\",\n description:\n \"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts\",\n defaultValueHint: false,\n },\n centerPadding: {\n displayName: \"Center Padding\",\n type: \"string\",\n description: \"Side padding when in center mode (px or %)\",\n defaultValueHint: \"50px\",\n hidden: (props) => !props.centerMode,\n },\n dots: {\n displayName: \"Dots\",\n type: \"boolean\",\n description: \"Show dots for each slide\",\n defaultValueHint: false,\n },\n draggable: {\n displayName: \"Draggable\",\n type: \"boolean\",\n description: \"Enables mouse dragging on desktop\",\n defaultValueHint: true,\n },\n easing: {\n displayName: \"Easing\",\n type: \"string\",\n description: \"Easing method for transition\",\n defaultValueHint: \"linear\",\n },\n fade: {\n displayName: \"Fade\",\n type: \"boolean\",\n description: \"Cross-fade between slides\",\n defaultValueHint: false,\n },\n focusOnSelect: {\n displayName: \"Focus On Select\",\n type: \"boolean\",\n description: \"Go to slide on click\",\n defaultValueHint: false,\n },\n infinite: {\n displayName: \"Infinite\",\n type: \"boolean\",\n description: \"Infinitely wrap around contents\",\n defaultValueHint: true,\n },\n initialSlide: {\n displayName: \"Initial Slide\",\n type: \"number\",\n description: \"Index of initial slide\",\n defaultValueHint: 0,\n },\n lazyLoad: {\n displayName: \"Lazy Load\",\n type: \"choice\",\n options: [\"ondemand\", \"progressive\"],\n description:\n \"Load images or render components on demand or progressively\",\n },\n pauseOnDotsHover: {\n displayName: \"Pause On Dots Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on dots\",\n defaultValueHint: false,\n },\n pauseOnFocus: {\n displayName: \"Pause On Focus\",\n type: \"boolean\",\n description: \"Prevents autoplay while focused on slides\",\n defaultValueHint: false,\n },\n pauseOnHover: {\n displayName: \"Pause On Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on track\",\n defaultValueHint: true,\n },\n rows: {\n displayName: \"Rows\",\n type: \"number\",\n description: \"Number of rows per slide (enables grid mode)\",\n defaultValueHint: 1,\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n // Looks like the `slide` prop is not being used to set the container tag:\n // https://github.com/akiran/react-slick/issues/1318\n // https://github.com/akiran/react-slick/pull/1885\n // https://stackoverflow.com/questions/51492535/wrap-react-slick-li-slides-inside-ul\n //\n // slide: {\n // displayName: \"Slide Tag\",\n // type: \"string\",\n // description: 'Slide container element type',\n // defaultValueHint: \"div\",\n // },\n slidesPerRow: {\n displayName: \"Slides Per Row\",\n type: \"number\",\n description:\n \"Number of slides to display in grid mode, this is useful with rows option\",\n defaultValueHint: 1,\n },\n slidesToScroll: {\n displayName: \"Slides To Scroll\",\n type: \"number\",\n description: \"Number of slides to scroll at once\",\n defaultValueHint: 1,\n },\n slidesToShow: {\n displayName: \"Slides To Show\",\n type: \"number\",\n description: \"Number of slides to show in one frame\",\n defaultValueHint: 1,\n },\n speed: {\n displayName: \"Speed\",\n type: \"number\",\n description: \"Transition speed in milliseconds\",\n defaultValueHint: 500,\n },\n swipe: {\n displayName: \"Swipe\",\n type: \"boolean\",\n description: \"Enable swiping to change slides\",\n defaultValueHint: true,\n },\n swipeToSlide: {\n displayName: \"Swipe To Slide\",\n type: \"boolean\",\n description: \"Enable drag/swipe irrespective of 'slidesToScroll'\",\n defaultValueHint: false,\n },\n touchMove: {\n displayName: \"Touch Move\",\n type: \"boolean\",\n description: \"Enable slide moving on touch\",\n defaultValueHint: true,\n },\n touchThreshold: {\n displayName: \"Touch Threshold\",\n type: \"number\",\n description: \"Swipe distance threshold in pixels\",\n defaultValueHint: 5,\n },\n useCSS: {\n displayName: \"Use CSS\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transitions\",\n defaultValueHint: true,\n },\n useTransform: {\n displayName: \"Use Transform\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transforms\",\n defaultValueHint: true,\n },\n variableWidth: {\n displayName: \"Variable Width\",\n type: \"boolean\",\n description: \"Variable width slides\",\n defaultValueHint: false,\n },\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: ComponentMeta<Settings>\n) {\n if (loader) {\n loader.registerComponent(Slider, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(Slider, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["sliderMeta","name","displayName","importName","importPath","props","children","type","defaultValue","src","styles","maxWidth","accessibility","description","defaultValueHint","adaptiveHeight","arrows","autoplay","autoplaySpeed","hidden","centerMode","centerPadding","dots","draggable","easing","fade","focusOnSelect","infinite","initialSlide","lazyLoad","options","pauseOnDotsHover","pauseOnFocus","pauseOnHover","rows","rtl","slidesPerRow","slidesToScroll","slidesToShow","speed","swipe","swipeToSlide","touchMove","touchThreshold","useCSS","useTransform","variableWidth","vertical","isDefaultExport","defaultStyles","width","registerSlider","loader","customSliderMeta","registerComponent","Slider"],"mappings":";;;IAKaA,UAAU,GAA4B;AACjDC,EAAAA,IAAI,EAAE,iBAD2C;AAEjDC,EAAAA,WAAW,EAAE,QAFoC;AAGjDC,EAAAA,UAAU,EAAE,QAHqC;AAIjDC,EAAAA,UAAU,EAAE,aAJqC;AAKjDC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAE,MADE;AAERC,MAAAA,YAAY,EAAE,CACZ;AACED,QAAAA,IAAI,EAAE,KADR;AAEEE,QAAAA,GAAG,EAAE,gEAFP;AAGEC,QAAAA,MAAM,EAAE;AACNC,UAAAA,QAAQ,EAAE;AADJ;AAHV,OADY,EAQZ;AACEJ,QAAAA,IAAI,EAAE,KADR;AAEEE,QAAAA,GAAG,EAAE,gEAFP;AAGEC,QAAAA,MAAM,EAAE;AACNC,UAAAA,QAAQ,EAAE;AADJ;AAHV,OARY,EAeZ;AACEJ,QAAAA,IAAI,EAAE,KADR;AAEEE,QAAAA,GAAG,EAAE,gEAFP;AAGEC,QAAAA,MAAM,EAAE;AACNC,UAAAA,QAAQ,EAAE;AADJ;AAHV,OAfY;AAFN,KADL;AA2BLC,IAAAA,aAAa,EAAE;AACbV,MAAAA,WAAW,EA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AAE;AACN1C,MAAAA,WAAW,EAAE,SADP;AAENK,MAAAA,IAAI,EAAE,SAFA;AAGNM,MAAAA,WAAW,EAAE,gCAHP;AAINC,MAAAA,gBAAgB,EAAE;AAJZ,KAnNH;AAyNL+B,IAAAA,YAAY,EAAE;AACZ3C,MAAAA,WAAW,EAAE,eADD;AAEZK,MAAAA,IAAI,EAAE,SAFM;AAGZM,MAAAA,WAAW,EAAE,+BAHD;AAIZC,MAAAA,gBAAgB,EAAE;AAJN,KAzNT;AA+NLgC,IAAAA,aAAa,EAAE;AACb5C,MAAAA,WAAW,EAAE,gBADA;AAEbK,MAAAA,IAAI,EAAE,SAFO;AAGbM,MAAAA,WAAW,EAAE,uBAHA;AAIbC,MAAAA,gBAAgB,EAAE;AAJL,KA/NV;AAqOLiC,IAAAA,QAAQ,EAAE;AACR7C,MAAAA,WAAW,EAAE,UADL;AAERK,MAAAA,IAAI,EAAE,SAFE;AAGRM,MAAAA,WAAW,EAAE,qBAHL;AAIRC,MAAAA,gBAAgB,EAAE;AAJV;AArOL,GAL0C;AAiPjDkC,EAAAA,eAAe,EAAE,IAjPgC;AAkPjDC,EAAAA,aAAa,EAAE;AACbC,IAAAA,KAAK,EAAE,SADM;AAEbvC,IAAAA,QAAQ,EAAE;AAFG;AAlPkC;SAwPnCwC,eACdC,QACAC;AAEA,MAAID,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBC,MAAzB,EAAiCF,gBAAjC,WAAiCA,gBAAjC,GAAqDrD,UAArD;AACD,GAFD,MAEO;AACLsD,IAAAA,iBAAiB,CAACC,MAAD,EAASF,gBAAT,WAASA,gBAAT,GAA6BrD,UAA7B,CAAjB;AACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"react-slick.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport composeRefs from \"@seznam/compose-react-refs\";\nimport React, { forwardRef, Ref, useEffect, useRef } from \"react\";\nimport Slider, { Settings } from \"react-slick\";\n\nexport const sliderMeta: ComponentMeta<Settings> = {\n name: \"hostless-slider\",\n displayName: \"Slider\",\n importName: \"Slider\",\n importPath: \"react-slick\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/FF0000/FFFFFF/?text=Slide_1\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/00FF00/FFFFFF/?text=Slide_2\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n {\n type: \"img\",\n src: \"https://via.placeholder.com/150x90/0000FF/FFFFFF/?text=Slide_3\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n ],\n },\n editingSlide: {\n displayName: \"Currently edited slide\",\n type: \"number\",\n description:\n \"Switch to the specified slide (first is 0). Only affects the editor, not the final page.\",\n defaultValueHint: 0,\n editOnly: true,\n },\n // TODO Ideally, we are not showing any labels on these buttons, and we can place them in the same row.\n // insertSlide: {\n // displayName: \"\",\n // type: \"custom\",\n // description: \"Insert a new slide right after the current slide.\",\n // control: MyReactComponent,\n // },\n // deleteSlide: {\n // displayName: \"\",\n // type: \"custom\",\n // description: \"Delete the current slide.\",\n // control: MyReactComponent,\n // },\n accessibility: {\n displayName: \"Accessibility\",\n type: \"boolean\",\n description: \"Enables tabbing and arrow key navigation\",\n defaultValueHint: true,\n },\n adaptiveHeight: {\n displayName: \"Adaptive Height\",\n type: \"boolean\",\n description: \"Adjust the slide's height automatically\",\n defaultValueHint: false,\n },\n arrows: {\n displayName: \"Arrows\",\n type: \"boolean\",\n description: \"Show next/prev arrows\",\n defaultValueHint: true,\n },\n autoplay: {\n displayName: \"Auto Play\",\n type: \"boolean\",\n description: \"Automatically start scrolling\",\n defaultValueHint: false,\n },\n autoplaySpeed: {\n displayName: \"Auto Play Speed\",\n type: \"number\",\n description: \"Delay between each auto scroll, in milliseconds\",\n defaultValueHint: 3000,\n hidden: (props) => !props.autoplay,\n },\n centerMode: {\n displayName: \"Center Mode\",\n type: \"boolean\",\n description:\n \"Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts\",\n defaultValueHint: false,\n },\n centerPadding: {\n displayName: \"Center Padding\",\n type: \"string\",\n description: \"Side padding when in center mode (px or %)\",\n defaultValueHint: \"50px\",\n hidden: (props) => !props.centerMode,\n },\n dots: {\n displayName: \"Dots\",\n type: \"boolean\",\n description: \"Show dots for each slide\",\n defaultValueHint: false,\n },\n draggable: {\n displayName: \"Draggable\",\n type: \"boolean\",\n description: \"Enables mouse dragging on desktop\",\n defaultValueHint: true,\n },\n easing: {\n displayName: \"Easing\",\n type: \"string\",\n description: \"Easing method for transition\",\n defaultValueHint: \"linear\",\n },\n fade: {\n displayName: \"Fade\",\n type: \"boolean\",\n description: \"Cross-fade between slides\",\n defaultValueHint: false,\n },\n focusOnSelect: {\n displayName: \"Focus On Select\",\n type: \"boolean\",\n description: \"Go to slide on click\",\n defaultValueHint: false,\n },\n infinite: {\n displayName: \"Infinite\",\n type: \"boolean\",\n description: \"Infinitely wrap around contents\",\n defaultValueHint: true,\n },\n initialSlide: {\n displayName: \"Initial Slide\",\n type: \"number\",\n description: \"Index of initial slide\",\n defaultValueHint: 0,\n },\n lazyLoad: {\n displayName: \"Lazy Load\",\n type: \"choice\",\n options: [\"ondemand\", \"progressive\"],\n description:\n \"Load images or render components on demand or progressively\",\n },\n pauseOnDotsHover: {\n displayName: \"Pause On Dots Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on dots\",\n defaultValueHint: false,\n },\n pauseOnFocus: {\n displayName: \"Pause On Focus\",\n type: \"boolean\",\n description: \"Prevents autoplay while focused on slides\",\n defaultValueHint: false,\n },\n pauseOnHover: {\n displayName: \"Pause On Hover\",\n type: \"boolean\",\n description: \"Prevents autoplay while hovering on track\",\n defaultValueHint: true,\n },\n rows: {\n displayName: \"Rows\",\n type: \"number\",\n description: \"Number of rows per slide (enables grid mode)\",\n defaultValueHint: 1,\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n // Looks like the `slide` prop is not being used to set the container tag:\n // https://github.com/akiran/react-slick/issues/1318\n // https://github.com/akiran/react-slick/pull/1885\n // https://stackoverflow.com/questions/51492535/wrap-react-slick-li-slides-inside-ul\n //\n // slide: {\n // displayName: \"Slide Tag\",\n // type: \"string\",\n // description: 'Slide container element type',\n // defaultValueHint: \"div\",\n // },\n slidesPerRow: {\n displayName: \"Slides Per Row\",\n type: \"number\",\n description:\n \"Number of slides to display in grid mode, this is useful with rows option\",\n defaultValueHint: 1,\n },\n slidesToScroll: {\n displayName: \"Slides To Scroll\",\n type: \"number\",\n description: \"Number of slides to scroll at once\",\n defaultValueHint: 1,\n },\n slidesToShow: {\n displayName: \"Slides To Show\",\n type: \"number\",\n description: \"Number of slides to show in one frame\",\n defaultValueHint: 1,\n },\n speed: {\n displayName: \"Speed\",\n type: \"number\",\n description: \"Transition speed in milliseconds\",\n defaultValueHint: 500,\n },\n swipe: {\n displayName: \"Swipe\",\n type: \"boolean\",\n description: \"Enable swiping to change slides\",\n defaultValueHint: true,\n },\n swipeToSlide: {\n displayName: \"Swipe To Slide\",\n type: \"boolean\",\n description: \"Enable drag/swipe irrespective of 'slidesToScroll'\",\n defaultValueHint: false,\n },\n touchMove: {\n displayName: \"Touch Move\",\n type: \"boolean\",\n description: \"Enable slide moving on touch\",\n defaultValueHint: true,\n },\n touchThreshold: {\n displayName: \"Touch Threshold\",\n type: \"number\",\n description: \"Swipe distance threshold in pixels\",\n defaultValueHint: 5,\n },\n useCSS: {\n displayName: \"Use CSS\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transitions\",\n defaultValueHint: true,\n },\n useTransform: {\n displayName: \"Use Transform\",\n type: \"boolean\",\n description: \"Enable/Disable CSS Transforms\",\n defaultValueHint: true,\n },\n variableWidth: {\n displayName: \"Variable Width\",\n type: \"boolean\",\n description: \"Variable width slides\",\n defaultValueHint: false,\n },\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport const SliderWrapper = forwardRef(function SliderWrapper_(\n { editingSlide, ...props }: Settings & { editingSlide?: number },\n userRef?: Ref<Slider>\n) {\n const slider = useRef<Slider>(null);\n useEffect(() => {\n if (editingSlide !== undefined) {\n slider.current!.slickGoTo(editingSlide);\n }\n }, [editingSlide]);\n return <Slider ref={composeRefs(slider, userRef)} {...props} />;\n});\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: ComponentMeta<Settings>\n) {\n if (loader) {\n loader.registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["sliderMeta","name","displayName","importName","importPath","props","children","type","defaultValue","src","styles","maxWidth","editingSlide","description","defaultValueHint","editOnly","accessibility","adaptiveHeight","arrows","autoplay","autoplaySpeed","hidden","centerMode","centerPadding","dots","draggable","easing","fade","focusOnSelect","infinite","initialSlide","lazyLoad","options","pauseOnDotsHover","pauseOnFocus","pauseOnHover","rows","rtl","slidesPerRow","slidesToScroll","slidesToShow","speed","swipe","swipeToSlide","touchMove","touchThreshold","useCSS","useTransform","variableWidth","vertical","isDefaultExport","defaultStyles","width","SliderWrapper","forwardRef","SliderWrapper_","userRef","slider","useRef","useEffect","undefined","current","slickGoTo","React","Slider","ref","composeRefs","registerSlider","loader","customSliderMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAOaA,UAAU,GAA4B;AACjDC,EAAAA,IAAI,EAAE,iBAD2C;AAEjDC,EAAAA,WAAW,EAAE,QAFoC;AAGjDC,EAAAA,UAAU,EAAE,QAHqC;AAIjDC,EAAAA,UAAU,EAAE,aAJqC;AAKjDC,EAA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|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Plasmic registration call for the HTML5 video element",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"analyze": "size-limit --why"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@plasmicapp/host": "1.0.
|
|
31
|
+
"@plasmicapp/host": "1.0.24",
|
|
32
32
|
"@size-limit/preset-small-lib": "^4.11.0",
|
|
33
33
|
"@types/node": "^14.0.26",
|
|
34
34
|
"@types/react-slick": "^0.23.7",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"typescript": "^3.9.7"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@seznam/compose-react-refs": "^1.0.6",
|
|
41
42
|
"react-slick": "^0.28.1",
|
|
42
43
|
"slick-carousel": "^1.8.1"
|
|
43
44
|
},
|