pds-dev-kit-web-test 2.7.159 → 2.7.160
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/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +8 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +4 -2
- package/package.json +1 -1
|
@@ -120,9 +120,9 @@ function SlideBanner(props) {
|
|
|
120
120
|
var _a;
|
|
121
121
|
switch (component.type) {
|
|
122
122
|
case 'PREV':
|
|
123
|
-
return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles:
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn }));
|
|
124
124
|
case 'NEXT':
|
|
125
|
-
return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles:
|
|
125
|
+
return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn }));
|
|
126
126
|
case 'PAGINATION':
|
|
127
127
|
return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? customPaginationHoverStyle : customPaginationNormalStyle, current: currentSlide, isPrevBtnDisabled: loop ? false : isBeginning, isNextBtnDisabled: loop ? false : isEnd, total: ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length) || 0, onBulletClick: onClickBullet, onPrevBtnClick: onClickPrevBtn, onNextBtnClick: onClickNextBtn }));
|
|
128
128
|
case 'PROGRESSBAR':
|
|
@@ -3,9 +3,10 @@ import type { CustomNavigationProps } from '../types';
|
|
|
3
3
|
export interface CustomNavigationNextBtnProps {
|
|
4
4
|
isDisabled: boolean;
|
|
5
5
|
styles: CustomNavigationProps;
|
|
6
|
+
hoverStyles?: CustomNavigationProps;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const CustomNavigationNextBtn: ({ isDisabled, styles, onClick }: CustomNavigationNextBtnProps) => JSX.Element;
|
|
9
|
+
export declare const CustomNavigationNextBtn: ({ isDisabled, styles, hoverStyles, onClick }: CustomNavigationNextBtnProps) => JSX.Element;
|
|
9
10
|
export interface FlexBoxProps {
|
|
10
11
|
direction?: 'row' | 'column';
|
|
11
12
|
justifyContent?: string;
|
|
@@ -40,11 +40,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.CustomNavigationNextBtn = void 0;
|
|
42
42
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
+
var react_1 = require("react");
|
|
43
44
|
var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal/desktop/IconButton");
|
|
44
45
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
45
46
|
var navigationConfigs_1 = require("./navigationConfigs");
|
|
46
47
|
var CustomNavigationNextBtn = function (_a) {
|
|
47
|
-
var isDisabled = _a.isDisabled, styles = _a.styles, onClick = _a.onClick;
|
|
48
|
+
var isDisabled = _a.isDisabled, styles = _a.styles, hoverStyles = _a.hoverStyles, onClick = _a.onClick;
|
|
49
|
+
var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1];
|
|
48
50
|
var nextButton = styles.nextBtnType === 'NONE'
|
|
49
51
|
? undefined
|
|
50
52
|
: navigationConfigs_1.nextButtonMappedIcons[styles.nextBtnType || 'DESIGN1'];
|
|
@@ -58,7 +60,11 @@ var CustomNavigationNextBtn = function (_a) {
|
|
|
58
60
|
buttonSize = 'xxlarge';
|
|
59
61
|
iconSize = 48;
|
|
60
62
|
}
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nextButton && ((0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "cb-slidebanner-next-button", disabled: isDisabled, "$size": styles.nextBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: nextButton.shapeType, borderColorKey: nextButton.borderColorKey, overrideBaseColorHex:
|
|
63
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nextButton && ((0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "cb-slidebanner-next-button", disabled: isDisabled, "$size": styles.nextBtnSize, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: nextButton.shapeType, borderColorKey: nextButton.borderColorKey, overrideBaseColorHex: isHovered ? hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.nextBtnPrimaryColor : styles.nextBtnPrimaryColor,
|
|
64
|
+
// overrideBaseColorHexHover={hoverStyles?.nextBtnPrimaryColor}
|
|
65
|
+
iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: isHovered ? hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.nextBtnSecondaryColor : styles.nextBtnSecondaryColor,
|
|
66
|
+
// overrideIconColorHexHover={hoverStyles?.nextBtnSecondaryColor}
|
|
67
|
+
shadow: nextButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
|
|
62
68
|
};
|
|
63
69
|
exports.CustomNavigationNextBtn = CustomNavigationNextBtn;
|
|
64
70
|
var S_NextButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n ", ";\n"], ["\n cursor: pointer;\n\n ", ";\n"])), function (_a) {
|
|
@@ -3,9 +3,10 @@ import type { CustomNavigationProps } from '../types';
|
|
|
3
3
|
export interface CustomNavigationPrevBtnProps {
|
|
4
4
|
isDisabled: boolean;
|
|
5
5
|
styles: CustomNavigationProps;
|
|
6
|
+
hoverStyles?: CustomNavigationProps;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, onClick }: CustomNavigationPrevBtnProps) => JSX.Element;
|
|
9
|
+
export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, hoverStyles, onClick }: CustomNavigationPrevBtnProps) => JSX.Element;
|
|
9
10
|
export interface FlexBoxProps {
|
|
10
11
|
direction?: 'row' | 'column';
|
|
11
12
|
justifyContent?: string;
|
|
@@ -40,11 +40,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.CustomNavigationPrevBtn = void 0;
|
|
42
42
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
+
var react_1 = require("react");
|
|
43
44
|
var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal/desktop/IconButton");
|
|
44
45
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
45
46
|
var navigationConfigs_1 = require("./navigationConfigs");
|
|
46
47
|
var CustomNavigationPrevBtn = function (_a) {
|
|
47
|
-
var isDisabled = _a.isDisabled, styles = _a.styles, onClick = _a.onClick;
|
|
48
|
+
var isDisabled = _a.isDisabled, styles = _a.styles, hoverStyles = _a.hoverStyles, onClick = _a.onClick;
|
|
49
|
+
var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1];
|
|
48
50
|
var prevButton = styles.prevBtnType === 'NONE'
|
|
49
51
|
? undefined
|
|
50
52
|
: navigationConfigs_1.prevButtonMappedIcons[styles.prevBtnType || 'DESIGN1'];
|
|
@@ -58,7 +60,7 @@ var CustomNavigationPrevBtn = function (_a) {
|
|
|
58
60
|
buttonSize = 'xxlarge';
|
|
59
61
|
iconSize = 48;
|
|
60
62
|
}
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: prevButton && ((0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "cb-slidebanner-prev-button", disabled: isDisabled, "$size": styles.prevBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, overrideBaseColorHex: styles.prevBtnPrimaryColor, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.prevBtnSecondaryColor, shadow: prevButton.shadow, onClick: onClick }) }))) }));
|
|
63
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: prevButton && ((0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "cb-slidebanner-prev-button", disabled: isDisabled, "$size": styles.prevBtnSize, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, overrideBaseColorHex: isHovered ? hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnPrimaryColor : styles.prevBtnPrimaryColor, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: isHovered ? hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnSecondaryColor : styles.prevBtnSecondaryColor, shadow: prevButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
|
|
62
64
|
};
|
|
63
65
|
exports.CustomNavigationPrevBtn = CustomNavigationPrevBtn;
|
|
64
66
|
var S_PrevButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n ", ";\n"], ["\n cursor: pointer;\n\n ", ";\n"])), function (_a) {
|