pds-dev-kit-web 1.4.54 → 1.4.56

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.
@@ -11,6 +11,8 @@ declare type BrandLogo = {
11
11
  declare type UserProfile = {
12
12
  src: string;
13
13
  href: string;
14
+ leftIconButton?: React.ReactNode;
15
+ overrideUserProfile?: React.ReactNode;
14
16
  };
15
17
  export declare type Props = {
16
18
  isPreview?: boolean;
@@ -69,7 +69,7 @@ function DynamicDesktopNavBar(_a) {
69
69
  react_1.default.createElement(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text }),
70
70
  react_1.default.createElement(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }),
71
71
  showSecondaryMenu && (react_1.default.createElement(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })),
72
- react_1.default.createElement(blocks_1.UserProfile, { src: userProfile.src, to: userProfile.href, style: userProfileOptions.style })))));
72
+ react_1.default.createElement(blocks_1.UserProfile, { src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })))));
73
73
  }
74
74
  var S_Grid = (0, styled_components_1.default)(BoxLayout_1.Grid)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n justify-items: center;\n gap: 24px;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n justify-items: center;\n gap: 24px;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
75
75
  var theme = _a.theme;
@@ -1,9 +1,11 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { CSSProperties } from 'styled-components';
3
3
  declare type Props = {
4
4
  src: string;
5
5
  to: string;
6
+ leftIconButton?: React.ReactNode;
7
+ overrideUserProfile?: React.ReactNode;
6
8
  style?: CSSProperties;
7
9
  };
8
- declare function UserProfile({ src, to, style }: Props): JSX.Element;
10
+ declare function UserProfile({ src, to, overrideUserProfile, leftIconButton, style }: Props): JSX.Element;
9
11
  export default UserProfile;
@@ -12,11 +12,15 @@ var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var Navigations_1 = require("../../../../common/components/Navigations");
13
13
  var hybrid_1 = require("../../../../hybrid");
14
14
  function UserProfile(_a) {
15
- var src = _a.src, to = _a.to, style = _a.style;
16
- return (react_1.default.createElement(S_UserProfile, { style: style },
15
+ var src = _a.src, to = _a.to, overrideUserProfile = _a.overrideUserProfile, leftIconButton = _a.leftIconButton, style = _a.style;
16
+ return (react_1.default.createElement(S_UserProfile, { style: style }, overrideUserProfile ? (overrideUserProfile) : (react_1.default.createElement(S_ImageViewWrapper, null,
17
+ leftIconButton && (react_1.default.createElement(react_1.default.Fragment, null,
18
+ leftIconButton,
19
+ react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }))),
17
20
  react_1.default.createElement(Navigations_1.NavLink, { to: to },
18
- react_1.default.createElement(hybrid_1.ImageView, { width: 32, ratio: "1_1", scaleType: "cover", shapeType: "circular", src: src, borderMode: "use" }))));
21
+ react_1.default.createElement(hybrid_1.ImageView, { width: 32, ratio: "1_1", scaleType: "cover", shapeType: "circular", src: src, borderMode: "use" }))))));
19
22
  }
20
23
  var S_UserProfile = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n grid-area: USER_PROFILE;\n justify-content: flex-end;\n"], ["\n display: flex;\n grid-area: USER_PROFILE;\n justify-content: flex-end;\n"])));
24
+ var S_ImageViewWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
21
25
  exports.default = UserProfile;
22
- var templateObject_1;
26
+ var templateObject_1, templateObject_2;
@@ -252,7 +252,7 @@ var S_S_TextFieldBaseWrapper = styled_components_1.default.div(templateObject_10
252
252
  var customWidth = _a.customWidth;
253
253
  return customWidth && "width: " + customWidth + ";";
254
254
  });
255
- var S_Error = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n margin-right: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n margin-right: ", ";\n text-align: left;\n"])), function (_a) {
255
+ var S_Error = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n margin-right: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n margin-right: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
256
256
  var theme = _a.theme;
257
257
  return theme.ui_cpnt_textfield_text_error;
258
258
  }, function (_a) {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FillIconNameKeys, LineIconNameKeys, PDSTextType } from '../../../common';
3
3
  export declare type MainButtonProps = {
4
4
  text?: PDSTextType;
@@ -14,8 +14,8 @@ export declare type MainButtonProps = {
14
14
  colorTheme?: 'none' | 'line1' | 'line2' | 'line3';
15
15
  type?: 'button' | 'submit';
16
16
  state?: 'normal' | 'disabled';
17
- onClick?: (...args: any) => any;
18
- onMouseDown?: (...args: any) => any;
17
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
18
+ onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
19
19
  };
20
20
  declare function MainButton({ text, shapeType, fillType, styleTheme, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
21
21
  export default MainButton;
@@ -37,14 +37,14 @@ var TextLabel_1 = require("../TextLabel");
37
37
  // shadow?: 'hidden' | 'visible';
38
38
  function MainButton(_a) {
39
39
  var text = _a.text, _b = _a.shapeType, shapeType = _b === void 0 ? 'round' : _b, fillType = _a.fillType, _c = _a.styleTheme, styleTheme = _c === void 0 ? 'primary' : _c, _d = _a.size, size = _d === void 0 ? 'large' : _d, _e = _a.responsiveMode, responsiveMode = _e === void 0 ? 'none' : _e, fontWeight = _a.fontWeight, _f = _a.iconMode, iconMode = _f === void 0 ? 'none' : _f, _g = _a.iconFillType, iconFillType = _g === void 0 ? 'line' : _g, iconName = _a.iconName, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
40
- var handleClick = function () {
40
+ var handleClick = function (e) {
41
41
  if (onClick) {
42
- onClick();
42
+ onClick(e);
43
43
  }
44
44
  };
45
- var handleMouseDown = function () {
45
+ var handleMouseDown = function (e) {
46
46
  if (onMouseDown) {
47
- onMouseDown();
47
+ onMouseDown(e);
48
48
  }
49
49
  };
50
50
  var textStyle = {
@@ -265,7 +265,7 @@ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_13 || (t
265
265
  return customWidth && "width: " + customWidth + ";";
266
266
  });
267
267
  var S_IconBox = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
268
- var S_Error = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"])), function (_a) {
268
+ var S_Error = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
269
269
  var theme = _a.theme, colorTheme = _a.colorTheme;
270
270
  return colorTheme === 'none'
271
271
  ? theme.ui_cpnt_textfield_text_error
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FillIconNameKeys, LineIconNameKeys, PDSTextType } from '../../../common';
3
3
  export declare type MainButtonProps = {
4
4
  text?: PDSTextType;
@@ -14,8 +14,8 @@ export declare type MainButtonProps = {
14
14
  colorTheme?: 'none' | 'line1' | 'line2' | 'line3';
15
15
  type?: 'button' | 'submit';
16
16
  state?: 'normal' | 'disabled';
17
- onClick?: (...args: any) => any;
18
- onMouseDown?: (...args: any) => any;
17
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
18
+ onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
19
19
  };
20
20
  declare function MainButton({ text, shapeType, fillType, styleTheme, size, responsiveMode, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
21
21
  export default MainButton;
@@ -37,14 +37,14 @@ var TextLabel_1 = require("../TextLabel");
37
37
  // shadow?: 'hidden' | 'visible';
38
38
  function MainButton(_a) {
39
39
  var text = _a.text, _b = _a.shapeType, shapeType = _b === void 0 ? 'round' : _b, fillType = _a.fillType, _c = _a.styleTheme, styleTheme = _c === void 0 ? 'primary' : _c, _d = _a.size, size = _d === void 0 ? 'large' : _d, _e = _a.responsiveMode, responsiveMode = _e === void 0 ? 'none' : _e, fontWeight = _a.fontWeight, _f = _a.iconMode, iconMode = _f === void 0 ? 'none' : _f, _g = _a.iconFillType, iconFillType = _g === void 0 ? 'line' : _g, iconName = _a.iconName, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, _j = _a.type, type = _j === void 0 ? 'button' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
40
- var handleClick = function () {
40
+ var handleClick = function (e) {
41
41
  if (onClick) {
42
- onClick();
42
+ onClick(e);
43
43
  }
44
44
  };
45
- var handleMouseDown = function () {
45
+ var handleMouseDown = function (e) {
46
46
  if (onMouseDown) {
47
- onMouseDown();
47
+ onMouseDown(e);
48
48
  }
49
49
  };
50
50
  var textStyle = {
@@ -262,7 +262,7 @@ var S_TextFieldWrapper = styled_components_1.default.div(templateObject_13 || (t
262
262
  return customWidth && "width: " + customWidth + ";";
263
263
  });
264
264
  var S_IconBox = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
265
- var S_Error = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"])), function (_a) {
265
+ var S_Error = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
266
266
  var theme = _a.theme, colorTheme = _a.colorTheme;
267
267
  return colorTheme === 'none'
268
268
  ? theme.ui_cpnt_textfield_text_error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "1.4.54",
3
+ "version": "1.4.56",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v1.4.54]
2
+ ## [v1.4.56]
3
3
 
4
4
  ### Component
5
5
  * EditApplyTextField
6
- * 스토리북 control 사용할 있게 수정
7
- * Radio
8
- * 스토리북 control 사용할 수 있게 수정
6
+ * error message 두줄 표시도 가능하게 수정
7
+ * MainButton
8
+ * onClick type 변경
9
+ * onMouseDown type 변경
9
10
  * TextField
10
- * 스토리북 control 사용할 있게 수정
11
+ * error message 두줄 표시도 가능하게 수정