pds-dev-kit-web 2.2.167 → 2.2.169

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.
@@ -2,7 +2,6 @@ export declare class DateHelper {
2
2
  static padZero(num: number): string;
3
3
  static formatDate(date: Date): string;
4
4
  static parseDate(dateStr: string): Date;
5
- static toISOString(date: Date): string;
6
5
  static getToday(): string;
7
6
  static isSameDay(a: string | Date, b: string | Date): boolean;
8
7
  static isBefore(a: Date, b: Date): boolean;
@@ -17,40 +17,24 @@ var DateHelper = /** @class */ (function () {
17
17
  return "".concat(date.getFullYear(), "-").concat(this.padZero(date.getMonth() + 1), "-").concat(this.padZero(date.getDate()));
18
18
  };
19
19
  /*
20
- * 문자열을 Date 객체로 파싱 (기본적으로 KST 0시로 설정)
20
+ * 문자열을 Date 객체로 파싱
21
21
  */
22
22
  DateHelper.parseDate = function (dateStr) {
23
- var date = new Date(dateStr);
24
- if (isNaN(date.getTime())) {
25
- // 시간이 없을 시 YYYY-MM-DD로 변환
26
- var _a = dateStr.split('-').map(Number), y = _a[0], m = _a[1], d = _a[2];
27
- return new Date(y, m - 1, d);
28
- }
29
- // KST로 변환한 후, 0시로 정렬
30
- var kstOffset = 9 * 60; // 9시간
31
- var kst = new Date(date.getTime() + (date.getTimezoneOffset() + kstOffset) * 60 * 1000);
32
- return new Date(kst.getFullYear(), kst.getMonth(), kst.getDate());
33
- };
34
- /*
35
- * Date 객체를 ISO 문자열로 반환 (KST 기준 0시로 세팅)
36
- */
37
- DateHelper.toISOString = function (date) {
38
- var kst = new Date(date.getTime() - (date.getTimezoneOffset() + 9 * 60) * 60 * 1000);
39
- return new Date(kst.getFullYear(), kst.getMonth(), kst.getDate()).toISOString();
23
+ var _a = dateStr.split('-').map(Number), y = _a[0], m = _a[1], d = _a[2];
24
+ return new Date(y, m - 1, d);
40
25
  };
41
26
  /*
42
27
  * 오늘 날짜를 'YYYY-MM-DD' 형식으로 반환
43
28
  */
44
29
  DateHelper.getToday = function () {
45
- var now = new Date();
46
- return this.formatDate(now);
30
+ return this.formatDate(new Date());
47
31
  };
48
32
  /*
49
33
  * 두 날짜가 같은 날인지 비교 (string 또는 Date 입력 가능)
50
34
  */
51
35
  DateHelper.isSameDay = function (a, b) {
52
- var dateA = typeof a === 'string' ? new Date(a) : a;
53
- var dateB = typeof b === 'string' ? new Date(b) : b;
36
+ var dateA = typeof a === 'string' ? this.parseDate(a) : a;
37
+ var dateB = typeof b === 'string' ? this.parseDate(b) : b;
54
38
  return (dateA.getFullYear() === dateB.getFullYear() &&
55
39
  dateA.getMonth() === dateB.getMonth() &&
56
40
  dateA.getDate() === dateB.getDate());
@@ -15,6 +15,7 @@ export type BasicListItemProps = {
15
15
  iconFillType?: 'fill' | 'line';
16
16
  displayType?: 'none' | 'text' | 'ibtn_text' | 'ibtn_amount1' | 'ibtn_amount2' | 'mbtn' | 'switch';
17
17
  captionText?: PDSTextType;
18
+ captionTextColorTheme?: 'none' | 'active' | 'inactive';
18
19
  iBtn1IconName?: PDSIconType;
19
20
  iBtn1IconFillType?: 'fill' | 'line';
20
21
  iBtn2IconName?: PDSIconType;
@@ -51,5 +52,5 @@ export type StyleProps = {
51
52
  onlyLeftArea?: boolean;
52
53
  dividerType?: 'none' | 'solid';
53
54
  };
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;
55
+ declare function BasicListItem({ selectionMode, state, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, captionTextColorTheme, 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;
55
56
  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, _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;
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, _l = _a.captionTextColorTheme, captionTextColorTheme = _l === void 0 ? 'none' : _l, iBtn1IconName = _a.iBtn1IconName, _m = _a.iBtn1IconFillType, iBtn1IconFillType = _m === void 0 ? 'line' : _m, iBtn2IconName = _a.iBtn2IconName, _o = _a.iBtn2IconFillType, iBtn2IconFillType = _o === void 0 ? 'line' : _o, _p = _a.mBtnFillType, mBtnFillType = _p === void 0 ? 'fill' : _p, mBtnText = _a.mBtnText, _q = _a.mBtnState, mBtnState = _q === void 0 ? 'normal' : _q, _r = _a.dividerType, dividerType = _r === void 0 ? 'none' : _r, _s = _a.titleFontWeight, titleFontWeight = _s === void 0 ? 'regular' : _s, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _t = _a.switchState, switchState = _t === void 0 ? 'normal' : _t, _u = _a.switchStatus, switchStatus = _u === void 0 ? 'off' : _u, _v = _a.spacingMode, spacingMode = _v === void 0 ? 'use' : _v, 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) {
@@ -75,7 +75,16 @@ function BasicListItem(_a) {
75
75
  }
76
76
  return 'sysTextError';
77
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 }))] }))] })) })));
78
+ function captionTextColor() {
79
+ if (state === 'disabled') {
80
+ return 'sysTextTertiary';
81
+ }
82
+ if (captionTextColorTheme === 'active') {
83
+ return 'sysTextBrandSeconVariant';
84
+ }
85
+ return 'sysTextTertiary';
86
+ }
87
+ 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, colorTheme: captionTextColor() })] })] })), (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 }))] }))] })) })));
79
88
  }
80
89
  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) {
81
90
  var theme = _a.theme, isSelected = _a.isSelected, state = _a.state;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { TextLabelProps } from '../TextLabel/TextLabel';
2
3
  import type { PDSTextType } from '../../../common/types';
3
4
  type ContentsPropTypes = React.FunctionComponent & {
4
5
  Title: React.FC<TitlePropTypes>;
@@ -6,11 +7,12 @@ type ContentsPropTypes = React.FunctionComponent & {
6
7
  };
7
8
  type TitlePropTypes = {
8
9
  text: PDSTextType;
9
- colorTheme: 'sysTextPrimary' | 'sysTextSecondary' | 'sysTextTertiary' | 'sysTextWhite' | 'sysTextBlack' | 'sysTextError' | 'sysTextWarning' | 'sysTextBrandPrimary' | 'sysTextBrandSeconVariant' | 'usrTextBrandPrimary' | 'usrTextBrandSeconVariant' | 'usrTextBrandOnPrimary';
10
+ colorTheme: TextLabelProps['colorTheme'];
10
11
  font: 'body2Bold' | 'body2Regular';
11
12
  };
12
13
  type CaptionPropTypes = {
13
14
  text: PDSTextType;
15
+ colorTheme: TextLabelProps['colorTheme'];
14
16
  };
15
17
  declare const Contents: ContentsPropTypes;
16
18
  export default Contents;
@@ -20,8 +20,8 @@ var Title = function (_a) {
20
20
  return ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: colorTheme, styleTheme: font, singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) }));
21
21
  };
22
22
  var Caption = function (_a) {
23
- var text = _a.text;
24
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: "sysTextTertiary", styleTheme: "caption1Regular", textAlign: "left", singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })] }));
23
+ var text = _a.text, colorTheme = _a.colorTheme;
24
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: colorTheme, styleTheme: "caption1Regular", textAlign: "left", singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })] }));
25
25
  };
26
26
  var S_TextBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n"])));
27
27
  var S_TextWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n justify-content: center;\n width: 100%;\n"], ["\n justify-content: center;\n width: 100%;\n"])));
@@ -15,6 +15,7 @@ export type BasicListItemProps = {
15
15
  iconFillType?: 'fill' | 'line';
16
16
  displayType?: 'none' | 'text' | 'ibtn_text' | 'ibtn_amount1' | 'ibtn_amount2' | 'mbtn' | 'switch';
17
17
  captionText?: PDSTextType;
18
+ captionTextColorTheme?: 'none' | 'active' | 'inactive';
18
19
  iBtn1IconName?: PDSIconType;
19
20
  iBtn1IconFillType?: 'fill' | 'line';
20
21
  iBtn2IconName?: PDSIconType;
@@ -50,5 +51,5 @@ export type StyleProps = {
50
51
  spacingMode?: 'none' | 'use';
51
52
  onlyLeftArea?: boolean;
52
53
  };
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;
54
+ declare function BasicListItem({ selectionMode, state, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, captionTextColorTheme, 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;
54
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, _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;
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, _l = _a.captionTextColorTheme, captionTextColorTheme = _l === void 0 ? 'none' : _l, iBtn1IconName = _a.iBtn1IconName, _m = _a.iBtn1IconFillType, iBtn1IconFillType = _m === void 0 ? 'line' : _m, iBtn2IconName = _a.iBtn2IconName, _o = _a.iBtn2IconFillType, iBtn2IconFillType = _o === void 0 ? 'line' : _o, _p = _a.mBtnFillType, mBtnFillType = _p === void 0 ? 'fill' : _p, mBtnText = _a.mBtnText, _q = _a.mBtnState, mBtnState = _q === void 0 ? 'normal' : _q, _r = _a.dividerType, dividerType = _r === void 0 ? 'none' : _r, _s = _a.titleFontWeight, titleFontWeight = _s === void 0 ? 'regular' : _s, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _t = _a.switchState, switchState = _t === void 0 ? 'normal' : _t, _u = _a.switchStatus, switchStatus = _u === void 0 ? 'off' : _u, _v = _a.spacingMode, spacingMode = _v === void 0 ? 'use' : _v, 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) {
@@ -75,7 +75,16 @@ function BasicListItem(_a) {
75
75
  }
76
76
  return 'sysTextError';
77
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 }))] }))] })) })));
78
+ function captionTextColor() {
79
+ if (state === 'disabled') {
80
+ return 'sysTextTertiary';
81
+ }
82
+ if (captionTextColorTheme === 'active') {
83
+ return 'sysTextBrandSeconVariant';
84
+ }
85
+ return 'sysTextTertiary';
86
+ }
87
+ 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, colorTheme: captionTextColor() })] })] })), (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 }))] }))] })) })));
79
88
  }
80
89
  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) {
81
90
  var theme = _a.theme, isSelected = _a.isSelected, state = _a.state;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { TextLabelProps } from '../TextLabel/TextLabel';
2
3
  import type { PDSTextType } from '../../../common/types';
3
4
  type ContentsPropTypes = React.FunctionComponent & {
4
5
  Title: React.FC<TitlePropTypes>;
@@ -6,11 +7,12 @@ type ContentsPropTypes = React.FunctionComponent & {
6
7
  };
7
8
  type TitlePropTypes = {
8
9
  text: PDSTextType;
9
- colorTheme: 'sysTextPrimary' | 'sysTextSecondary' | 'sysTextTertiary' | 'sysTextWhite' | 'sysTextBlack' | 'sysTextError' | 'sysTextWarning' | 'sysTextBrandPrimary' | 'sysTextBrandSeconVariant' | 'usrTextBrandPrimary' | 'usrTextBrandSeconVariant' | 'usrTextBrandOnPrimary';
10
+ colorTheme: TextLabelProps['colorTheme'];
10
11
  font: 'body2Bold' | 'body2Regular';
11
12
  };
12
13
  type CaptionPropTypes = {
13
14
  text: PDSTextType;
15
+ colorTheme: TextLabelProps['colorTheme'];
14
16
  };
15
17
  declare const Contents: ContentsPropTypes;
16
18
  export default Contents;
@@ -20,8 +20,8 @@ var Title = function (_a) {
20
20
  return ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: colorTheme, styleTheme: font, singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) }));
21
21
  };
22
22
  var Caption = function (_a) {
23
- var text = _a.text;
24
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: "sysTextTertiary", styleTheme: "caption1Regular", textAlign: "left", singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })] }));
23
+ var text = _a.text, colorTheme = _a.colorTheme;
24
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, colorTheme: colorTheme, styleTheme: "caption1Regular", textAlign: "left", singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })] }));
25
25
  };
26
26
  var S_TextBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n"])));
27
27
  var S_TextWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n justify-content: center;\n width: 100%;\n"], ["\n justify-content: center;\n width: 100%;\n"])));
@@ -76,22 +76,22 @@ var DatePicker = function (_a) {
76
76
  var handleDateClick = function (target) {
77
77
  if (!onChange)
78
78
  return;
79
- var ISODate = dateHelper_1.DateHelper.toISOString(target);
79
+ var selectedDateStr = dateHelper_1.DateHelper.formatDate(target);
80
80
  if (type === 'single') {
81
- onChange(ISODate);
81
+ onChange(selectedDateStr);
82
82
  return;
83
83
  }
84
84
  if (!startDate || (startDate && endDate)) {
85
- onChange(ISODate, undefined);
85
+ onChange(selectedDateStr, undefined);
86
86
  return;
87
87
  }
88
88
  var parsedStartDate = dateHelper_1.DateHelper.parseDate(startDate);
89
89
  if (dateHelper_1.DateHelper.isBefore(target, parsedStartDate)) {
90
- onChange(ISODate, undefined);
90
+ onChange(selectedDateStr, undefined);
91
91
  return;
92
92
  }
93
- var startISO = dateHelper_1.DateHelper.toISOString(parsedStartDate);
94
- onChange(startISO, ISODate);
93
+ var startISO = dateHelper_1.DateHelper.formatDate(parsedStartDate);
94
+ onChange(startISO, selectedDateStr);
95
95
  };
96
96
  var handleQuickActionButtonClick = function () {
97
97
  var today = new Date();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.167",
3
+ "version": "2.2.169",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.167]
2
+ ## [v2.2.169]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### 업데이트 사항
6
- * [PDS-1300] TextField에서 textLinType이 auto, multi일 때, 우측 아이콘 영역 개선 건
6
+ * [PDS-1303] BasicListItem captionText의 colorTheme 지정 가능하도록 추가