pds-dev-kit-web 2.2.8 → 2.2.9

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.
@@ -835,5 +835,6 @@
835
835
  "ui_cpnt_modalwithtab_sidetab_hover": "sys_component_base_01",
836
836
  "ui_cpnt_modalwithtab_sidetab_pressed": "sys_component_base_04",
837
837
  "ui_107": "sys_component_border_white_opacity20",
838
- "ui_cpnt_textlabel_sys_white_02": "sys_text_white_02"
838
+ "ui_cpnt_textlabel_sys_white_02": "sys_text_white_02",
839
+ "ui_cpnt_headerbar_base_area_transparent": "sys_container_background_04"
839
840
  }
@@ -1303,6 +1303,7 @@ declare const colorSet: {
1303
1303
  ui_cpnt_modalwithtab_sidetab_pressed: string;
1304
1304
  ui_107: string;
1305
1305
  ui_cpnt_textlabel_sys_white_02: string;
1306
+ ui_cpnt_headerbar_base_area_transparent: string;
1306
1307
  };
1307
1308
  readonly PaletteColor_Dark: {
1308
1309
  sys_container_background_01: string;
@@ -836,4 +836,5 @@ export interface UITheme {
836
836
  ui_cpnt_modalwithtab_sidetab_pressed: string;
837
837
  ui_107: string;
838
838
  ui_cpnt_textlabel_sys_white_02: string;
839
+ ui_cpnt_headerbar_base_area_transparent: string;
839
840
  }
@@ -18,9 +18,11 @@ type Props = {
18
18
  iBtn1Type?: 'submit' | 'reset' | 'button';
19
19
  iBtn2State?: 'normal' | 'disabled';
20
20
  iBtn2Type?: 'submit' | 'reset' | 'button';
21
+ colorTheme?: ColorTheme;
21
22
  onClickLeftBtn?: (e: React.MouseEvent<HTMLButtonElement>) => void;
22
23
  onClickIBtn1?: (e: React.MouseEvent<HTMLButtonElement>) => void;
23
24
  onClickIBtn2?: (e: React.MouseEvent<HTMLButtonElement>) => void;
24
25
  };
25
- declare function MobileHeaderBar({ titleType, titleText, captionText, leftBtnMode, displayType, iBtn1IconName, iBtn1IconFillType, iBtn1IconColorKey, iBtn2IconName, iBtn2IconFillType, iBtn2IconColorKey, dividerMode, imageSrc, iBtn1State, iBtn1Type, iBtn2State, iBtn2Type, onClickLeftBtn, onClickIBtn1, onClickIBtn2 }: Props): JSX.Element;
26
+ export type ColorTheme = 'none' | 'transparent_white';
27
+ declare function MobileHeaderBar({ titleType, titleText, captionText, leftBtnMode, displayType, iBtn1IconName, iBtn1IconFillType, iBtn1IconColorKey, iBtn2IconName, iBtn2IconFillType, iBtn2IconColorKey, dividerMode, imageSrc, iBtn1State, iBtn1Type, iBtn2State, iBtn2Type, colorTheme, onClickLeftBtn, onClickIBtn1, onClickIBtn2 }: Props): JSX.Element;
26
28
  export default MobileHeaderBar;
@@ -23,8 +23,10 @@ var styled_components_1 = __importDefault(require("styled-components"));
23
23
  var hybrid_1 = require("../../../hybrid");
24
24
  var IconButton_1 = require("../IconButton");
25
25
  var TextLabel_1 = require("../TextLabel");
26
+ var utils_1 = require("./utils");
26
27
  function MobileHeaderBar(_a) {
27
- var _b = _a.titleType, titleType = _b === void 0 ? 'text' : _b, titleText = _a.titleText, captionText = _a.captionText, _c = _a.leftBtnMode, leftBtnMode = _c === void 0 ? 'back' : _c, _d = _a.displayType, displayType = _d === void 0 ? 'none' : _d, iBtn1IconName = _a.iBtn1IconName, _e = _a.iBtn1IconFillType, iBtn1IconFillType = _e === void 0 ? 'line' : _e, _f = _a.iBtn1IconColorKey, iBtn1IconColorKey = _f === void 0 ? 'ui_cpnt_button_icon_enabled' : _f, iBtn2IconName = _a.iBtn2IconName, _g = _a.iBtn2IconFillType, iBtn2IconFillType = _g === void 0 ? 'line' : _g, _h = _a.iBtn2IconColorKey, iBtn2IconColorKey = _h === void 0 ? 'ui_cpnt_button_icon_enabled' : _h, _j = _a.dividerMode, dividerMode = _j === void 0 ? 'none' : _j, imageSrc = _a.imageSrc, _k = _a.iBtn1State, iBtn1State = _k === void 0 ? 'normal' : _k, _l = _a.iBtn1Type, iBtn1Type = _l === void 0 ? 'button' : _l, _m = _a.iBtn2State, iBtn2State = _m === void 0 ? 'normal' : _m, _o = _a.iBtn2Type, iBtn2Type = _o === void 0 ? 'button' : _o, onClickLeftBtn = _a.onClickLeftBtn, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2;
28
+ var _b = _a.titleType, titleType = _b === void 0 ? 'text' : _b, titleText = _a.titleText, captionText = _a.captionText, _c = _a.leftBtnMode, leftBtnMode = _c === void 0 ? 'back' : _c, _d = _a.displayType, displayType = _d === void 0 ? 'none' : _d, iBtn1IconName = _a.iBtn1IconName, _e = _a.iBtn1IconFillType, iBtn1IconFillType = _e === void 0 ? 'line' : _e, iBtn1IconColorKey = _a.iBtn1IconColorKey, iBtn2IconName = _a.iBtn2IconName, _f = _a.iBtn2IconFillType, iBtn2IconFillType = _f === void 0 ? 'line' : _f, iBtn2IconColorKey = _a.iBtn2IconColorKey, _g = _a.dividerMode, dividerMode = _g === void 0 ? 'none' : _g, imageSrc = _a.imageSrc, _h = _a.iBtn1State, iBtn1State = _h === void 0 ? 'normal' : _h, _j = _a.iBtn1Type, iBtn1Type = _j === void 0 ? 'button' : _j, _k = _a.iBtn2State, iBtn2State = _k === void 0 ? 'normal' : _k, _l = _a.iBtn2Type, iBtn2Type = _l === void 0 ? 'button' : _l, _m = _a.colorTheme, colorTheme = _m === void 0 ? 'none' : _m, onClickLeftBtn = _a.onClickLeftBtn, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2;
29
+ var _o = (0, utils_1.getOptionalColorTheme)(colorTheme), titleColor = _o.titleColor, captionColor = _o.captionColor, iconButtonIconColor = _o.iconButtonIconColor, baseColor = _o.baseColor, dividerColor = _o.dividerColor;
28
30
  var handleClickLeftBtn = function (e) {
29
31
  if (onClickLeftBtn) {
30
32
  onClickLeftBtn(e);
@@ -57,18 +59,18 @@ function MobileHeaderBar(_a) {
57
59
  if (!iconName) {
58
60
  return (0, jsx_runtime_1.jsx)("div", {});
59
61
  }
60
- return ((0, jsx_runtime_1.jsx)(S_LeftButtonBox, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, fillType: "fill", iconFillType: "line", baseSize: "large", iconSize: 24, shapeType: "rectangle", onClick: handleClickLeftBtn, iconColorKey: "ui_cpnt_button_icon_enabled", baseColorKey: "ui_cpnt_button_fill_base_transparent" }) }));
62
+ return ((0, jsx_runtime_1.jsx)(S_LeftButtonBox, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: iconName, fillType: "fill", iconFillType: "line", baseSize: "large", iconSize: 24, shapeType: "rectangle", onClick: handleClickLeftBtn, iconColorKey: iconButtonIconColor, baseColorKey: "ui_cpnt_button_fill_base_transparent" }) }));
61
63
  };
62
64
  var title = function () {
63
65
  switch (titleType) {
64
66
  case 'text': {
65
67
  if (captionText) {
66
- return ((0, jsx_runtime_1.jsxs)(S_CaptionTextBox, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "height" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: "sysTextPrimary", styleTheme: "body2Bold", singleLineMode: "use", textAlign: "center", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "height" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: captionText, colorTheme: "sysTextTertiary", styleTheme: "caption2Regular", singleLineMode: "use", textAlign: "center", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 })] }));
68
+ return ((0, jsx_runtime_1.jsxs)(S_CaptionTextBox, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "height" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: titleColor, styleTheme: "body2Bold", singleLineMode: "use", textAlign: "center", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "height" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: captionText, colorTheme: captionColor, styleTheme: "caption2Regular", singleLineMode: "use", textAlign: "center", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 })] }));
67
69
  }
68
- return ((0, jsx_runtime_1.jsx)(S_TextTypeBox, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: "sysTextPrimary", styleTheme: "body2Bold", singleLineMode: "use", textAlign: "center", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 }) }));
70
+ return ((0, jsx_runtime_1.jsx)(S_TextTypeBox, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: titleColor, styleTheme: "body2Bold", singleLineMode: "use", textAlign: "center", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 }) }));
69
71
  }
70
72
  case 'profile': {
71
- return ((0, jsx_runtime_1.jsxs)(S_ProfileWrapper, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" }), (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { src: imageSrc, shapeType: "circular", width: 40, ratio: "1_1", scaleType: "cover", borderMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: "sysTextPrimary", styleTheme: "caption1Regular", singleLineMode: "use", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d" })] }));
73
+ return ((0, jsx_runtime_1.jsxs)(S_ProfileWrapper, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" }), (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { src: imageSrc, shapeType: "circular", width: 40, ratio: "1_1", scaleType: "cover", borderMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, colorTheme: titleColor, styleTheme: "caption1Regular", singleLineMode: "use", wordBreak: "break_all", ellipsisMode: "use", lineLimit: 1 }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d" })] }));
72
74
  }
73
75
  case 'image': {
74
76
  return ((0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { src: imageSrc, shapeType: "rectangle", height: 32, scaleType: "contain", width: 160 }));
@@ -79,19 +81,19 @@ function MobileHeaderBar(_a) {
79
81
  if (displayType === 'none') {
80
82
  return (0, jsx_runtime_1.jsx)("div", {});
81
83
  }
82
- return ((0, jsx_runtime_1.jsxs)(S_IBtnBox, { children: [displayType === 'ibtn_amount2' && iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconSize: 24, baseSize: "large", iconName: iBtn2IconName, fillType: "fill", onClick: handleClickIBtn2, iconFillType: iBtn2IconFillType, iconColorKey: iBtn2IconColorKey, baseColorKey: "ui_cpnt_button_fill_base_transparent", type: iBtn2Type, state: iBtn2State })), (displayType === 'ibtn_amount1' || displayType === 'ibtn_amount2') && iBtn1IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconSize: 24, baseSize: "large", iconName: iBtn1IconName, fillType: "fill", onClick: handleClickIBtn1, iconFillType: iBtn1IconFillType, iconColorKey: iBtn1IconColorKey, baseColorKey: "ui_cpnt_button_fill_base_transparent", type: iBtn1Type, state: iBtn1State }))] }));
84
+ return ((0, jsx_runtime_1.jsxs)(S_IBtnBox, { children: [displayType === 'ibtn_amount2' && iBtn2IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconSize: 24, baseSize: "large", iconName: iBtn2IconName, fillType: "fill", onClick: handleClickIBtn2, iconFillType: iBtn2IconFillType, iconColorKey: iBtn2IconColorKey !== null && iBtn2IconColorKey !== void 0 ? iBtn2IconColorKey : iconButtonIconColor, baseColorKey: "ui_cpnt_button_fill_base_transparent", type: iBtn2Type, state: iBtn2State })), (displayType === 'ibtn_amount1' || displayType === 'ibtn_amount2') && iBtn1IconName && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconSize: 24, baseSize: "large", iconName: iBtn1IconName, fillType: "fill", onClick: handleClickIBtn1, iconFillType: iBtn1IconFillType, iconColorKey: iBtn1IconColorKey !== null && iBtn1IconColorKey !== void 0 ? iBtn1IconColorKey : iconButtonIconColor, baseColorKey: "ui_cpnt_button_fill_base_transparent", type: iBtn1Type, state: iBtn1State }))] }));
83
85
  };
84
- return ((0, jsx_runtime_1.jsxs)(S_MobileHeaderBar, __assign({ "x-pds-name": "MobileHeaderBar", "x-pds-element-type": "component", "x-pds-device-type": "mobile", hasBorder: dividerMode === 'solid', hasCaptionText: (captionText === null || captionText === void 0 ? void 0 : captionText.toString) ? true : false, expand: titleType === 'profile' }, { children: [(0, jsx_runtime_1.jsxs)(S_ButtonWrapper, { children: [(titleType === 'profile' || captionText) && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), leftIcon()] }), displayType === 'ibtn_amount2' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_g", spacingType: "width" }), (0, jsx_runtime_1.jsx)(S_Title, { children: title() }), (0, jsx_runtime_1.jsxs)(S_ButtonWrapper, { children: [(titleType === 'profile' || captionText) && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), iBtn()] })] })));
86
+ return ((0, jsx_runtime_1.jsxs)(S_MobileHeaderBar, __assign({ "x-pds-name": "MobileHeaderBar", "x-pds-element-type": "component", "x-pds-device-type": "mobile", hasBorder: dividerMode === 'solid', borderColor: dividerColor, hasCaptionText: (captionText === null || captionText === void 0 ? void 0 : captionText.toString) ? true : false, expand: titleType === 'profile', baseColor: baseColor }, { children: [(0, jsx_runtime_1.jsxs)(S_ButtonWrapper, { children: [(titleType === 'profile' || captionText) && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), leftIcon()] }), displayType === 'ibtn_amount2' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_g", spacingType: "width" }), (0, jsx_runtime_1.jsx)(S_Title, { children: title() }), (0, jsx_runtime_1.jsxs)(S_ButtonWrapper, { children: [(titleType === 'profile' || captionText) && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), iBtn()] })] })));
85
87
  }
86
88
  var S_MobileHeaderBar = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: ", ";\n background-color: ", ";\n border-bottom: ", ";\n box-sizing: border-box;\n display: flex;\n height: ", ";\n justify-content: space-between;\n padding: 0 ", ";\n"], ["\n align-items: ", ";\n background-color: ", ";\n border-bottom: ", ";\n box-sizing: border-box;\n display: flex;\n height: ", ";\n justify-content: space-between;\n padding: 0 ", ";\n"])), function (_a) {
87
89
  var expand = _a.expand, hasCaptionText = _a.hasCaptionText;
88
90
  return expand || hasCaptionText ? 'flex-start' : 'center';
89
91
  }, function (_a) {
90
- var theme = _a.theme;
91
- return theme.ui_cpnt_headerbar_base_area;
92
+ var theme = _a.theme, baseColor = _a.baseColor;
93
+ return theme[baseColor];
92
94
  }, function (_a) {
93
- var hasBorder = _a.hasBorder, theme = _a.theme;
94
- return hasBorder && "1px solid ".concat(theme.ui_cpnt_divider);
95
+ var hasBorder = _a.hasBorder, theme = _a.theme, borderColor = _a.borderColor;
96
+ return hasBorder && "1px solid ".concat(theme[borderColor]);
95
97
  }, function (_a) {
96
98
  var expand = _a.expand, hasCaptionText = _a.hasCaptionText;
97
99
  return (expand || hasCaptionText ? 'auto' : '56px');
@@ -0,0 +1,12 @@
1
+ import type { TextStyleProps } from '../TextLabel/TextLabel';
2
+ import type { ColorTheme } from './MobileHeaderBar';
3
+ import type { UiColors } from '../../../common/index';
4
+ type MobileHeaderbarColorThemeType = {
5
+ titleColor: TextStyleProps['colorTheme'];
6
+ captionColor: TextStyleProps['colorTheme'];
7
+ iconButtonIconColor: UiColors;
8
+ baseColor: UiColors;
9
+ dividerColor: UiColors;
10
+ };
11
+ export declare function getOptionalColorTheme(colorTheme: ColorTheme): MobileHeaderbarColorThemeType;
12
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOptionalColorTheme = void 0;
4
+ function getOptionalColorTheme(colorTheme) {
5
+ if (colorTheme === 'transparent_white') {
6
+ return {
7
+ titleColor: 'sysTextWhite',
8
+ captionColor: 'sysTextWhite',
9
+ iconButtonIconColor: 'ui_cpnt_headerbar_icon_02',
10
+ baseColor: 'ui_cpnt_headerbar_base_area_transparent',
11
+ dividerColor: 'ui_cpnt_divider_white_opacity00'
12
+ };
13
+ }
14
+ return {
15
+ titleColor: 'sysTextPrimary',
16
+ captionColor: 'sysTextTertiary',
17
+ iconButtonIconColor: 'ui_cpnt_button_icon_enabled',
18
+ baseColor: 'ui_cpnt_headerbar_base_area',
19
+ dividerColor: 'ui_cpnt_divider'
20
+ };
21
+ }
22
+ exports.getOptionalColorTheme = getOptionalColorTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,10 +1,7 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.8]
2
+ ## [v2.2.9]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### common
6
- * TextFieldBase
7
- * 자동완성시 텍스트 색상이 톤을 따라 갈 수 있도록 수정
8
- ### sub
9
- * DynamicLayout - custom section
10
- * textUtil에서 PRETENDARD를 선택할 경우 Pretendard-Regular가 아닌 Pretendard JP가 부여될 수 있도록 수정
6
+ * MobileHeaderBar
7
+ * MobileHeaderBar: colorTheme transparent 추가
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["es2015"]
3
- }