pds-dev-kit-web 2.2.158 → 2.2.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/desktop/components/AdminListItem/AdminListItem.js +3 -3
- package/dist/src/desktop/components/BasicListItem/BasicListItem.d.ts +3 -1
- package/dist/src/desktop/components/BasicListItem/BasicListItem.js +17 -4
- package/dist/src/desktop/components/BasicListItem/RightBox/IconButton.d.ts +1 -0
- package/dist/src/desktop/components/BasicListItem/RightBox/IconButton.js +2 -2
- package/dist/src/mobile/components/BasicListItem/BasicListItem.d.ts +3 -1
- package/dist/src/mobile/components/BasicListItem/BasicListItem.js +17 -4
- package/dist/src/mobile/components/BasicListItem/RightBox/IconButton.d.ts +1 -0
- package/dist/src/mobile/components/BasicListItem/RightBox/IconButton.js +2 -2
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.js +3 -3
- package/package.json +1 -1
- package/release-note.md +2 -2
|
@@ -176,11 +176,11 @@ var hoverQuickActionBtnBox = (0, styled_components_1.css)(templateObject_10 || (
|
|
|
176
176
|
var theme = _a.theme;
|
|
177
177
|
return theme.ui_cpnt_datatable_textbutton_base_02;
|
|
178
178
|
});
|
|
179
|
-
var fixedQuickActionBtnBox = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n
|
|
179
|
+
var fixedQuickActionBtnBox = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n position: relative;\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n position: relative;\n"])), function (_a) {
|
|
180
180
|
var theme = _a.theme;
|
|
181
181
|
return theme.ui_cpnt_datatable_textbutton_base_01;
|
|
182
182
|
});
|
|
183
|
-
var S_QuickActionButtonBox = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"])), function (_a) {
|
|
183
|
+
var S_QuickActionButtonBox = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n opacity: 0;\n padding-left: ", ";\n padding-right: ", ";\n pointer-events: none;\n\n ", ";\n"], ["\n opacity: 0;\n padding-left: ", ";\n padding-right: ", ";\n pointer-events: none;\n\n ", ";\n"])), function (_a) {
|
|
184
184
|
var theme = _a.theme;
|
|
185
185
|
return theme.spacing.spacingC;
|
|
186
186
|
}, function (_a) {
|
|
@@ -261,7 +261,7 @@ var disabledAdminListItem = (0, styled_components_1.css)(templateObject_28 || (t
|
|
|
261
261
|
var theme = _a.theme;
|
|
262
262
|
return theme.ui_cpnt_datatable_base_selected;
|
|
263
263
|
});
|
|
264
|
-
var S_AdminListItem = styled_components_1.default.div(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n visibility: ", ";\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n\n ", "\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n visibility: ", ";\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n\n ", "\n ", "\n"])), function (_a) {
|
|
264
|
+
var S_AdminListItem = styled_components_1.default.div(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n visibility: ", ";\n opacity: 1;\n pointer-events: auto;\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n\n ", "\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n visibility: ", ";\n opacity: 1;\n pointer-events: auto;\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n\n ", "\n ", "\n"])), function (_a) {
|
|
265
265
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
266
266
|
return isSelected ? theme.ui_cpnt_datatable_base_selected : theme.ui_cpnt_datatable_base_default;
|
|
267
267
|
}, function (_a) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { PDSIconType, PDSTextType } from '../../../common';
|
|
3
3
|
export type BasicListItemProps = {
|
|
4
4
|
selectionMode?: 'none' | 'check' | 'radio';
|
|
5
|
+
state?: 'normal' | 'disabled';
|
|
5
6
|
titleText: PDSTextType;
|
|
6
7
|
titleTextColorTheme?: 'none' | 'logout';
|
|
7
8
|
descText?: PDSTextType;
|
|
@@ -39,6 +40,7 @@ export type BasicListItemProps = {
|
|
|
39
40
|
};
|
|
40
41
|
export type StyleProps = {
|
|
41
42
|
isSelected?: boolean;
|
|
43
|
+
state?: 'normal' | 'disabled';
|
|
42
44
|
selectionMode?: 'none' | 'check' | 'radio';
|
|
43
45
|
captionText?: PDSTextType;
|
|
44
46
|
badgeStatus?: 'cancel' | 'active' | 'inactive';
|
|
@@ -49,5 +51,5 @@ export type StyleProps = {
|
|
|
49
51
|
onlyLeftArea?: boolean;
|
|
50
52
|
dividerType?: 'none' | 'solid';
|
|
51
53
|
};
|
|
52
|
-
declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickIBtn1, onClickIBtn2, onClickMBtn, onClickRadio, onClickSwitch }: BasicListItemProps): JSX.Element;
|
|
54
|
+
declare function BasicListItem({ selectionMode, state, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickIBtn1, onClickIBtn2, onClickMBtn, onClickRadio, onClickSwitch }: BasicListItemProps): JSX.Element;
|
|
53
55
|
export default BasicListItem;
|
|
@@ -25,7 +25,7 @@ var Contents_1 = __importDefault(require("./Contents"));
|
|
|
25
25
|
var LeftBox_1 = require("./LeftBox");
|
|
26
26
|
var RightBox_1 = require("./RightBox");
|
|
27
27
|
function BasicListItem(_a) {
|
|
28
|
-
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText,
|
|
28
|
+
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, titleText = _a.titleText, _d = _a.titleTextColorTheme, titleTextColorTheme = _d === void 0 ? 'none' : _d, descText = _a.descText, _e = _a.badgeMode, badgeMode = _e === void 0 ? 'none' : _e, _f = _a.badgeStatus, badgeStatus = _f === void 0 ? 'inactive' : _f, _g = _a.imageIconMode, imageIconMode = _g === void 0 ? 'none' : _g, _h = _a.imageShapeType, imageShapeType = _h === void 0 ? 'round' : _h, imageSrc = _a.imageSrc, iconName = _a.iconName, _j = _a.iconFillType, iconFillType = _j === void 0 ? 'line' : _j, _k = _a.displayType, displayType = _k === void 0 ? 'none' : _k, captionText = _a.captionText, iBtn1IconName = _a.iBtn1IconName, _l = _a.iBtn1IconFillType, iBtn1IconFillType = _l === void 0 ? 'line' : _l, iBtn2IconName = _a.iBtn2IconName, _m = _a.iBtn2IconFillType, iBtn2IconFillType = _m === void 0 ? 'line' : _m, _o = _a.mBtnFillType, mBtnFillType = _o === void 0 ? 'fill' : _o, mBtnText = _a.mBtnText, _p = _a.mBtnState, mBtnState = _p === void 0 ? 'normal' : _p, _q = _a.dividerType, dividerType = _q === void 0 ? 'none' : _q, _r = _a.titleFontWeight, titleFontWeight = _r === void 0 ? 'regular' : _r, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _s = _a.switchState, switchState = _s === void 0 ? 'normal' : _s, _t = _a.switchStatus, switchStatus = _t === void 0 ? 'off' : _t, _u = _a.spacingMode, spacingMode = _u === void 0 ? 'use' : _u, onClick = _a.onClick, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch;
|
|
29
29
|
var methods = (0, react_hook_form_1.useFormContext)();
|
|
30
30
|
var isSelected = methods === null || methods === void 0 ? void 0 : methods.watch((checkboxId === null || checkboxId === void 0 ? void 0 : checkboxId.toString()) || '');
|
|
31
31
|
var handleIBtn1Click = function (e) {
|
|
@@ -35,6 +35,8 @@ function BasicListItem(_a) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
var handleClick = function (e) {
|
|
38
|
+
if (state === 'disabled')
|
|
39
|
+
return;
|
|
38
40
|
switch (selectionMode) {
|
|
39
41
|
case 'radio': {
|
|
40
42
|
if (onClickRadio && radioId) {
|
|
@@ -64,11 +66,22 @@ function BasicListItem(_a) {
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
};
|
|
67
|
-
|
|
69
|
+
function titleTextColor() {
|
|
70
|
+
if (state === 'disabled') {
|
|
71
|
+
return 'sysTextTertiary';
|
|
72
|
+
}
|
|
73
|
+
if (titleTextColorTheme === 'none') {
|
|
74
|
+
return 'sysTextPrimary';
|
|
75
|
+
}
|
|
76
|
+
return 'sysTextError';
|
|
77
|
+
}
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", state: state, displayType: displayType, selectionMode: selectionMode, isSelected: isSelected, onClick: handleClick, hasOnClick: !!onClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColor(), font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click, state: state })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click, state: state })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2, state: state }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click, state: state })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', state: state === 'disabled' ? 'disabled' : mBtnState, onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: state === 'disabled' ? 'disabled' : switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
|
|
68
79
|
}
|
|
69
80
|
var S_BasicListItem = styled_components_1.default.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n cursor: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n cursor: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"])), function (_a) {
|
|
70
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
71
|
-
return isSelected
|
|
81
|
+
var theme = _a.theme, isSelected = _a.isSelected, state = _a.state;
|
|
82
|
+
return isSelected || state === 'disabled'
|
|
83
|
+
? theme.ui_cpnt_list_base_area_select
|
|
84
|
+
: theme.ui_cpnt_list_base_area;
|
|
72
85
|
}, function (_a) {
|
|
73
86
|
var displayType = _a.displayType, selectionMode = _a.selectionMode, hasOnClick = _a.hasOnClick;
|
|
74
87
|
if (displayType === 'ibtn_amount1' || displayType === 'ibtn_text' || displayType === 'none') {
|
|
@@ -4,6 +4,7 @@ export type IconButtonPropTypes = {
|
|
|
4
4
|
iconName: BasicListItemProps['iBtn2IconName'];
|
|
5
5
|
fill: boolean;
|
|
6
6
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
state?: BasicListItemProps['state'];
|
|
7
8
|
};
|
|
8
9
|
declare const IconButton: React.FC<IconButtonPropTypes>;
|
|
9
10
|
export default IconButton;
|
|
@@ -11,8 +11,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
var IconButton_1 = require("../../IconButton");
|
|
13
13
|
var IconButton = function (_a) {
|
|
14
|
-
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey:
|
|
14
|
+
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick, state = _a.state;
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey: state === 'disabled' ? 'ui_cpnt_button_icon_disabled' : 'ui_cpnt_button_icon_default' })) }));
|
|
16
16
|
};
|
|
17
17
|
var S_IconWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n"])));
|
|
18
18
|
exports.default = IconButton;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { PDSIconType, PDSTextType } from '../../../common';
|
|
3
3
|
export type BasicListItemProps = {
|
|
4
4
|
selectionMode?: 'none' | 'check' | 'radio';
|
|
5
|
+
state?: 'normal' | 'disabled';
|
|
5
6
|
titleText: PDSTextType;
|
|
6
7
|
titleTextColorTheme?: 'none' | 'logout';
|
|
7
8
|
descText?: PDSTextType;
|
|
@@ -39,6 +40,7 @@ export type BasicListItemProps = {
|
|
|
39
40
|
};
|
|
40
41
|
export type StyleProps = {
|
|
41
42
|
isSelected?: boolean;
|
|
43
|
+
state?: 'normal' | 'disabled';
|
|
42
44
|
dividerType?: BasicListItemProps['dividerType'];
|
|
43
45
|
selectionMode?: 'none' | 'check' | 'radio';
|
|
44
46
|
captionText?: PDSTextType;
|
|
@@ -48,5 +50,5 @@ export type StyleProps = {
|
|
|
48
50
|
spacingMode?: 'none' | 'use';
|
|
49
51
|
onlyLeftArea?: boolean;
|
|
50
52
|
};
|
|
51
|
-
declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickRadio, onClickSwitch, onClickIBtn1, onClickIBtn2, onClickMBtn }: BasicListItemProps): JSX.Element;
|
|
53
|
+
declare function BasicListItem({ selectionMode, state, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickRadio, onClickSwitch, onClickIBtn1, onClickIBtn2, onClickMBtn }: BasicListItemProps): JSX.Element;
|
|
52
54
|
export default BasicListItem;
|
|
@@ -25,7 +25,7 @@ var Contents_1 = __importDefault(require("./Contents"));
|
|
|
25
25
|
var LeftBox_1 = require("./LeftBox");
|
|
26
26
|
var RightBox_1 = require("./RightBox");
|
|
27
27
|
function BasicListItem(_a) {
|
|
28
|
-
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText,
|
|
28
|
+
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, titleText = _a.titleText, _d = _a.titleTextColorTheme, titleTextColorTheme = _d === void 0 ? 'none' : _d, descText = _a.descText, _e = _a.badgeMode, badgeMode = _e === void 0 ? 'none' : _e, _f = _a.badgeStatus, badgeStatus = _f === void 0 ? 'inactive' : _f, _g = _a.imageIconMode, imageIconMode = _g === void 0 ? 'none' : _g, _h = _a.imageShapeType, imageShapeType = _h === void 0 ? 'round' : _h, imageSrc = _a.imageSrc, iconName = _a.iconName, _j = _a.iconFillType, iconFillType = _j === void 0 ? 'line' : _j, _k = _a.displayType, displayType = _k === void 0 ? 'none' : _k, captionText = _a.captionText, iBtn1IconName = _a.iBtn1IconName, _l = _a.iBtn1IconFillType, iBtn1IconFillType = _l === void 0 ? 'line' : _l, iBtn2IconName = _a.iBtn2IconName, _m = _a.iBtn2IconFillType, iBtn2IconFillType = _m === void 0 ? 'line' : _m, _o = _a.mBtnFillType, mBtnFillType = _o === void 0 ? 'fill' : _o, mBtnText = _a.mBtnText, _p = _a.mBtnState, mBtnState = _p === void 0 ? 'normal' : _p, _q = _a.dividerType, dividerType = _q === void 0 ? 'none' : _q, _r = _a.titleFontWeight, titleFontWeight = _r === void 0 ? 'regular' : _r, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _s = _a.switchState, switchState = _s === void 0 ? 'normal' : _s, _t = _a.switchStatus, switchStatus = _t === void 0 ? 'off' : _t, _u = _a.spacingMode, spacingMode = _u === void 0 ? 'use' : _u, onClick = _a.onClick, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn;
|
|
29
29
|
var methods = (0, react_hook_form_1.useFormContext)();
|
|
30
30
|
var isSelected = methods === null || methods === void 0 ? void 0 : methods.watch((checkboxId === null || checkboxId === void 0 ? void 0 : checkboxId.toString()) || '');
|
|
31
31
|
var handleIBtn1Click = function (e) {
|
|
@@ -35,6 +35,8 @@ function BasicListItem(_a) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
var handleClick = function (e) {
|
|
38
|
+
if (state === 'disabled')
|
|
39
|
+
return;
|
|
38
40
|
switch (selectionMode) {
|
|
39
41
|
case 'radio': {
|
|
40
42
|
if (onClickRadio && radioId) {
|
|
@@ -64,11 +66,22 @@ function BasicListItem(_a) {
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
};
|
|
67
|
-
|
|
69
|
+
function titleTextColor() {
|
|
70
|
+
if (state === 'disabled') {
|
|
71
|
+
return 'sysTextTertiary';
|
|
72
|
+
}
|
|
73
|
+
if (titleTextColorTheme === 'none') {
|
|
74
|
+
return 'sysTextPrimary';
|
|
75
|
+
}
|
|
76
|
+
return 'sysTextError';
|
|
77
|
+
}
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", state: state, isSelected: isSelected, onClick: handleClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColor(), font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2, state: state }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click, state: state })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', state: state === 'disabled' ? 'disabled' : mBtnState, onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: state === 'disabled' ? 'disabled' : switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
|
|
68
79
|
}
|
|
69
80
|
var S_BasicListItem = styled_components_1.default.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"])), function (_a) {
|
|
70
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
71
|
-
return isSelected
|
|
81
|
+
var theme = _a.theme, isSelected = _a.isSelected, state = _a.state;
|
|
82
|
+
return isSelected || state === 'disabled'
|
|
83
|
+
? theme.ui_cpnt_list_base_area_select
|
|
84
|
+
: theme.ui_cpnt_list_base_area;
|
|
72
85
|
}, function (_a) {
|
|
73
86
|
var spacingMode = _a.spacingMode, theme = _a.theme;
|
|
74
87
|
return spacingMode === 'use' && "0 ".concat(theme.spacing.spacingE);
|
|
@@ -11,8 +11,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
var IconButton_1 = require("../../IconButton");
|
|
13
13
|
var IconButton = function (_a) {
|
|
14
|
-
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey:
|
|
14
|
+
var iconName = _a.iconName, fill = _a.fill, onClick = _a.onClick, state = _a.state;
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(S_IconWrapper, { children: iconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, iconFillType: fill ? 'fill' : 'line', baseSize: "medium", iconSize: 20, shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClick, iconColorKey: state === 'disabled' ? 'ui_cpnt_button_icon_disabled' : 'ui_cpnt_button_icon_default' })) }));
|
|
16
16
|
};
|
|
17
17
|
var S_IconWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n"])));
|
|
18
18
|
exports.default = IconButton;
|
|
@@ -171,11 +171,11 @@ var hoverQuickActionBtnBox = (0, styled_components_1.css)(templateObject_10 || (
|
|
|
171
171
|
var theme = _a.theme;
|
|
172
172
|
return theme.ui_cpnt_datatable_textbutton_base_02;
|
|
173
173
|
});
|
|
174
|
-
var fixedQuickActionBtnBox = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n
|
|
174
|
+
var fixedQuickActionBtnBox = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n position: relative;\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n position: relative;\n"])), function (_a) {
|
|
175
175
|
var theme = _a.theme;
|
|
176
176
|
return theme.ui_cpnt_datatable_textbutton_base_01;
|
|
177
177
|
});
|
|
178
|
-
var S_QuickActionButtonBox = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"])), function (_a) {
|
|
178
|
+
var S_QuickActionButtonBox = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n opacity: 0;\n padding-left: ", ";\n padding-right: ", ";\n pointer-events: none;\n\n ", ";\n"], ["\n opacity: 0;\n padding-left: ", ";\n padding-right: ", ";\n pointer-events: none;\n\n ", ";\n"])), function (_a) {
|
|
179
179
|
var theme = _a.theme;
|
|
180
180
|
return theme.spacing.spacingC;
|
|
181
181
|
}, function (_a) {
|
|
@@ -252,7 +252,7 @@ var S_SelectionColumn = styled_components_1.default.div(templateObject_24 || (te
|
|
|
252
252
|
var hoverAdminListItem = (0, styled_components_1.css)(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n align-items: center;\n position: relative;\n"], ["\n align-items: center;\n position: relative;\n"])));
|
|
253
253
|
var fixedAdminListItem = (0, styled_components_1.css)(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n justify-content: space-between;\n"], ["\n justify-content: space-between;\n"])));
|
|
254
254
|
var flexibleHideColumnStyle = (0, styled_components_1.css)(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n @media only screen and (max-width: 1400px) {\n .hidableColumn {\n display: none;\n }\n }\n"], ["\n @media only screen and (max-width: 1400px) {\n .hidableColumn {\n display: none;\n }\n }\n"])));
|
|
255
|
-
var S_AdminListItem = styled_components_1.default.div(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n
|
|
255
|
+
var S_AdminListItem = styled_components_1.default.div(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n opacity: 1;\n pointer-events: auto;\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n opacity: 1;\n pointer-events: auto;\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n\n ", "\n"])), function (_a) {
|
|
256
256
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
257
257
|
return isSelected ? theme.ui_cpnt_datatable_base_selected : theme.ui_cpnt_datatable_base_default;
|
|
258
258
|
}, function (_a) {
|
package/package.json
CHANGED
package/release-note.md
CHANGED