pds-dev-kit-web 2.2.157 → 2.2.159
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/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/mobile/components/DatePicker/DatePicker.js +1 -1
- package/dist/src/mobile/components/DatePicker/DatePickerHeader.d.ts +2 -1
- package/dist/src/mobile/components/DatePicker/DatePickerHeader.js +2 -2
- package/dist/src/mobile/components/DatePicker/Day.js +1 -1
- package/package.json +1 -1
- package/release-note.md +2 -2
|
@@ -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;
|
|
@@ -95,7 +95,7 @@ var DatePicker = function (_a) {
|
|
|
95
95
|
return ((0, jsx_runtime_1.jsxs)(CalendarContainer, __assign({ id: id }, { children: [(0, jsx_runtime_1.jsx)(DatePickerHeader_1.default, { headerTitle: t('str_35', {
|
|
96
96
|
year: currentMonth.getFullYear(),
|
|
97
97
|
month: String(currentMonth.getMonth() + 1)
|
|
98
|
-
}), textButtonText: quickActionMode === 'use' ? quickActionBtnText : undefined, onClickPrevButton: function () { return setCurrentMonth(function (prev) { return dateHelper_1.DateHelper.addMonths(prev, -1); }); }, onClickNextButton: function () { return setCurrentMonth(function (prev) { return dateHelper_1.DateHelper.addMonths(prev, 1); }); }, onClickTextButton: handleQuickActionButtonClick }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsxs)(S_MonthContainer, { children: [(0, jsx_runtime_1.jsx)(S_DayOfWeekContainer, __assign({ id: "weeks" }, { children: days
|
|
98
|
+
}), textButtonText: quickActionMode === 'use' ? quickActionBtnText : undefined, isTextButtonDisabled: currentMonth.getMonth() === new Date().getMonth(), onClickPrevButton: function () { return setCurrentMonth(function (prev) { return dateHelper_1.DateHelper.addMonths(prev, -1); }); }, onClickNextButton: function () { return setCurrentMonth(function (prev) { return dateHelper_1.DateHelper.addMonths(prev, 1); }); }, onClickTextButton: handleQuickActionButtonClick }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsxs)(S_MonthContainer, { children: [(0, jsx_runtime_1.jsx)(S_DayOfWeekContainer, __assign({ id: "weeks" }, { children: days
|
|
99
99
|
.slice(startOfWeek === 'monday' ? 1 : 0)
|
|
100
100
|
.concat(startOfWeek === 'monday' ? [t('str_3893')] : [])
|
|
101
101
|
.map(function (day) { return ((0, jsx_runtime_1.jsx)(S_DayOfWeek, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: day, styleTheme: "caption2Bold", colorTheme: "sysTextSecondary", textAlign: "center" }) }, "".concat(id, "_").concat(day))); }) })), (0, jsx_runtime_1.jsx)(S_Grid, { children: calendarDates.map(function (d) {
|
|
@@ -3,9 +3,10 @@ import type { PDSTextType } from '../../../common/types';
|
|
|
3
3
|
type Props = {
|
|
4
4
|
headerTitle: string;
|
|
5
5
|
textButtonText?: PDSTextType;
|
|
6
|
+
isTextButtonDisabled: boolean;
|
|
6
7
|
onClickPrevButton: () => void;
|
|
7
8
|
onClickNextButton: () => void;
|
|
8
9
|
onClickTextButton: () => void;
|
|
9
10
|
};
|
|
10
|
-
declare function DatePickerHeader({ headerTitle, textButtonText, onClickPrevButton, onClickNextButton, onClickTextButton }: Props): JSX.Element;
|
|
11
|
+
declare function DatePickerHeader({ headerTitle, textButtonText, isTextButtonDisabled, onClickPrevButton, onClickNextButton, onClickTextButton }: Props): JSX.Element;
|
|
11
12
|
export default DatePickerHeader;
|
|
@@ -13,8 +13,8 @@ var IconButton_1 = require("../IconButton");
|
|
|
13
13
|
var TextButton_1 = require("../TextButton");
|
|
14
14
|
var TextLabel_1 = require("../TextLabel");
|
|
15
15
|
function DatePickerHeader(_a) {
|
|
16
|
-
var headerTitle = _a.headerTitle, textButtonText = _a.textButtonText, onClickPrevButton = _a.onClickPrevButton, onClickNextButton = _a.onClickNextButton, onClickTextButton = _a.onClickTextButton;
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(S_HeaderContainer, { children: [(0, jsx_runtime_1.jsx)(S_LeftIconWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { onClick: onClickPrevButton, iconName: "ic_arrow_left", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: 16, baseSize: "medium" }) }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: headerTitle, textAlign: "center" }), (0, jsx_runtime_1.jsx)(S_RightIconWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { onClick: onClickNextButton, iconName: "ic_arrow_right", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: 16, baseSize: "medium" }) }), textButtonText && ((0, jsx_runtime_1.jsx)(S_TextButtonWrapper, { children: (0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { text: textButtonText, size: "xsmall", fontWeight: "bold", onClick: onClickTextButton }) }))] }));
|
|
16
|
+
var headerTitle = _a.headerTitle, textButtonText = _a.textButtonText, isTextButtonDisabled = _a.isTextButtonDisabled, onClickPrevButton = _a.onClickPrevButton, onClickNextButton = _a.onClickNextButton, onClickTextButton = _a.onClickTextButton;
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(S_HeaderContainer, { children: [(0, jsx_runtime_1.jsx)(S_LeftIconWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { onClick: onClickPrevButton, iconName: "ic_arrow_left", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: 16, baseSize: "medium" }) }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: headerTitle, textAlign: "center" }), (0, jsx_runtime_1.jsx)(S_RightIconWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { onClick: onClickNextButton, iconName: "ic_arrow_right", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: 16, baseSize: "medium" }) }), textButtonText && ((0, jsx_runtime_1.jsx)(S_TextButtonWrapper, { children: (0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { text: textButtonText, size: "xsmall", fontWeight: "bold", onClick: onClickTextButton, state: isTextButtonDisabled ? 'disabled' : 'normal' }) }))] }));
|
|
18
18
|
}
|
|
19
19
|
var S_HeaderContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n justify-items: center;\n margin: 0 ", ";\n position: relative;\n"], ["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n justify-items: center;\n margin: 0 ", ";\n position: relative;\n"])), function (_a) {
|
|
20
20
|
var theme = _a.theme;
|
|
@@ -75,7 +75,7 @@ function Day(_a) {
|
|
|
75
75
|
};
|
|
76
76
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(S_DayWrapper, __assign({ isToday: isToday, isSelectedDay: !!isSelected, isOutOfThisMonthWeek: isOtherMonth, onClick: function () { return selectable && onClick(date); } }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: date.getDate(), textAlign: "center", styleTheme: isSelected ? 'caption1Bold' : 'caption1Regular', colorTheme: getColorTheme() }) })) }));
|
|
77
77
|
}
|
|
78
|
-
var selectedDay = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius:
|
|
78
|
+
var selectedDay = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 10px;\n"], ["\n background-color: ", ";\n border-radius: 10px;\n"])), function (_a) {
|
|
79
79
|
var theme = _a.theme;
|
|
80
80
|
return theme.ui_cpnt_calendar_status_a;
|
|
81
81
|
});
|
package/package.json
CHANGED
package/release-note.md
CHANGED