hplx-react-elements-dev 1.1.6 → 1.1.7
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/esm/carousel/imageCarousel.d.ts +1 -1
- package/dist/esm/index.js +63 -57
- package/dist/esm/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CarouselProps } from "../types";
|
|
3
3
|
import "../carousel/imageCarousel.css";
|
|
4
|
-
declare const ImageCarousel: ({ imageList, isNextPrev, caroselLeftIcon, caroselRightIcon, timeInterval, autoPlay, carouselIndicator }: CarouselProps) => JSX.Element;
|
|
4
|
+
declare const ImageCarousel: ({ leftIconClassName, rightIconClassName, imageList, isNextPrev, caroselLeftIcon, caroselRightIcon, timeInterval, autoPlay, carouselIndicator }: CarouselProps) => JSX.Element;
|
|
5
5
|
export default ImageCarousel;
|
package/dist/esm/index.js
CHANGED
|
@@ -20515,27 +20515,31 @@ var PopUpModal = function PopUpModal(_a) {
|
|
|
20515
20515
|
};
|
|
20516
20516
|
|
|
20517
20517
|
var ImageCarousel = function ImageCarousel(_a) {
|
|
20518
|
-
var
|
|
20519
|
-
|
|
20520
|
-
|
|
20521
|
-
|
|
20522
|
-
|
|
20523
|
-
_d = _a.
|
|
20524
|
-
|
|
20525
|
-
_e = _a.
|
|
20526
|
-
|
|
20527
|
-
_f = _a.
|
|
20528
|
-
|
|
20529
|
-
_g = _a.
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
var
|
|
20537
|
-
|
|
20538
|
-
|
|
20518
|
+
var _b = _a.leftIconClassName,
|
|
20519
|
+
leftIconClassName = _b === void 0 ? '' : _b,
|
|
20520
|
+
_c = _a.rightIconClassName,
|
|
20521
|
+
rightIconClassName = _c === void 0 ? '' : _c,
|
|
20522
|
+
imageList = _a.imageList,
|
|
20523
|
+
_d = _a.isNextPrev,
|
|
20524
|
+
isNextPrev = _d === void 0 ? true : _d,
|
|
20525
|
+
_e = _a.caroselLeftIcon,
|
|
20526
|
+
caroselLeftIcon = _e === void 0 ? 'hx_left' : _e,
|
|
20527
|
+
_f = _a.caroselRightIcon,
|
|
20528
|
+
caroselRightIcon = _f === void 0 ? 'hx_right' : _f,
|
|
20529
|
+
_g = _a.timeInterval,
|
|
20530
|
+
timeInterval = _g === void 0 ? 5000 : _g,
|
|
20531
|
+
_h = _a.autoPlay,
|
|
20532
|
+
autoPlay = _h === void 0 ? true : _h,
|
|
20533
|
+
_j = _a.carouselIndicator,
|
|
20534
|
+
carouselIndicator = _j === void 0 ? true : _j;
|
|
20535
|
+
|
|
20536
|
+
var _k = useState(0),
|
|
20537
|
+
current = _k[0],
|
|
20538
|
+
setCurrent = _k[1];
|
|
20539
|
+
|
|
20540
|
+
var _l = useState(autoPlay),
|
|
20541
|
+
isAutoPlay = _l[0],
|
|
20542
|
+
setIsAutoPlay = _l[1];
|
|
20539
20543
|
|
|
20540
20544
|
var length = imageList.length;
|
|
20541
20545
|
|
|
@@ -20583,45 +20587,47 @@ var ImageCarousel = function ImageCarousel(_a) {
|
|
|
20583
20587
|
}
|
|
20584
20588
|
|
|
20585
20589
|
var carouselIndicatorDoms = [];
|
|
20586
|
-
return
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
children: [Boolean(caroselLeftIcon) && isNextPrev && jsxRuntime.exports.jsx("div", __assign({
|
|
20590
|
-
className: "left-arrow"
|
|
20590
|
+
return (//
|
|
20591
|
+
jsxRuntime.exports.jsxs("div", __assign({
|
|
20592
|
+
className: "slider"
|
|
20591
20593
|
}, {
|
|
20592
|
-
children: jsxRuntime.exports.jsx("
|
|
20593
|
-
className:
|
|
20594
|
-
onClick: prevSlide
|
|
20595
|
-
})
|
|
20596
|
-
})), Boolean(caroselRightIcon) && isNextPrev && jsxRuntime.exports.jsx("div", __assign({
|
|
20597
|
-
className: "right-arrow "
|
|
20598
|
-
}, {
|
|
20599
|
-
children: jsxRuntime.exports.jsx("span", {
|
|
20600
|
-
className: caroselRightIcon,
|
|
20601
|
-
onClick: nextSlide
|
|
20602
|
-
})
|
|
20603
|
-
})), imageList.map(function (d, index) {
|
|
20604
|
-
carouselIndicatorDoms.push(jsxRuntime.exports.jsx("li", {
|
|
20605
|
-
className: index === current ? 'active' : '',
|
|
20606
|
-
onClick: function onClick() {
|
|
20607
|
-
goToSlide(index);
|
|
20608
|
-
}
|
|
20609
|
-
}));
|
|
20610
|
-
return jsxRuntime.exports.jsx("div", __assign({
|
|
20611
|
-
className: index === current ? 'slide active ' : 'slide'
|
|
20594
|
+
children: [Boolean(caroselLeftIcon) && isNextPrev && jsxRuntime.exports.jsx("div", __assign({
|
|
20595
|
+
className: "left-arrow hplxt-flex hplxt-items-center hplxt-justify-center ".concat(leftIconClassName)
|
|
20612
20596
|
}, {
|
|
20613
|
-
children:
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
className: 'image'
|
|
20597
|
+
children: jsxRuntime.exports.jsx("span", {
|
|
20598
|
+
className: "".concat(caroselLeftIcon),
|
|
20599
|
+
onClick: prevSlide
|
|
20617
20600
|
})
|
|
20618
|
-
}),
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20601
|
+
})), Boolean(caroselRightIcon) && isNextPrev && jsxRuntime.exports.jsx("div", __assign({
|
|
20602
|
+
className: "right-arrow hplxt-flex hplxt-items-center hplxt-justify-center ".concat(rightIconClassName)
|
|
20603
|
+
}, {
|
|
20604
|
+
children: jsxRuntime.exports.jsx("span", {
|
|
20605
|
+
className: "".concat(caroselRightIcon),
|
|
20606
|
+
onClick: nextSlide
|
|
20607
|
+
})
|
|
20608
|
+
})), imageList.map(function (d, index) {
|
|
20609
|
+
carouselIndicatorDoms.push(jsxRuntime.exports.jsx("li", {
|
|
20610
|
+
className: index === current ? 'active' : '',
|
|
20611
|
+
onClick: function onClick() {
|
|
20612
|
+
goToSlide(index);
|
|
20613
|
+
}
|
|
20614
|
+
}));
|
|
20615
|
+
return jsxRuntime.exports.jsx("div", __assign({
|
|
20616
|
+
className: index === current ? 'slide active ' : 'slide'
|
|
20617
|
+
}, {
|
|
20618
|
+
children: index === current && jsxRuntime.exports.jsx("img", {
|
|
20619
|
+
src: d,
|
|
20620
|
+
alt: d,
|
|
20621
|
+
className: 'image'
|
|
20622
|
+
})
|
|
20623
|
+
}), index);
|
|
20624
|
+
}), carouselIndicator && jsxRuntime.exports.jsx("ul", __assign({
|
|
20625
|
+
className: "carousel-indicators"
|
|
20626
|
+
}, {
|
|
20627
|
+
children: carouselIndicatorDoms
|
|
20628
|
+
}))]
|
|
20629
|
+
}))
|
|
20630
|
+
);
|
|
20625
20631
|
};
|
|
20626
20632
|
|
|
20627
20633
|
export { AddSuggestion, Avatar, Badge, BadgeGroup, Button, ButtonGroups, CalendarView, Card, Checkbox, CheckboxGroup, CheckboxGroupItem, CollapsibleCard, DatePicker, DoubleInput, DropdownField, DropdownItems as DropdownItem, ImageCarousel, InputField, InputFieldSplit, InputTag, InputTagDropdownItem, MessageToast, NestedDropdown, OtpField, PopUpModal, ProgressBar, ProgressCircle, RadioBtn, Slider, TextAreaField, ToggleSwitch, Tooltip, Typography };
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -456,6 +456,8 @@ export interface InputTagProps {
|
|
|
456
456
|
getInputValue?: (value: string) => void;
|
|
457
457
|
}
|
|
458
458
|
export interface CarouselProps {
|
|
459
|
+
leftIconClassName?: string;
|
|
460
|
+
rightIconClassName?: string;
|
|
459
461
|
imageList: Array<string>;
|
|
460
462
|
isNextPrev?: boolean;
|
|
461
463
|
caroselLeftIcon?: string;
|