pds-dev-kit-web 0.5.13 → 0.5.14

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.
Files changed (92) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/src/common/index.d.ts +2 -5
  3. package/dist/src/common/services/i18n/resources/en.json +83 -27
  4. package/dist/src/common/services/i18n/resources/es.json +69 -13
  5. package/dist/src/common/services/i18n/resources/index.d.ts +228 -4
  6. package/dist/src/common/services/i18n/resources/jp.json +69 -13
  7. package/dist/src/common/services/i18n/resources/ko.json +69 -13
  8. package/dist/src/common/styles/colorSet/UIColor.json +1 -1
  9. package/dist/src/common/styles/colorSet/index.d.ts +55 -55
  10. package/dist/src/common/styles/colorSet/index.js +2 -2
  11. package/dist/src/common/styles/ui-colors.js +1 -1
  12. package/dist/src/common/types/index.d.ts +5 -0
  13. package/dist/src/common/types/index.js +17 -0
  14. package/dist/src/common/types/styled-components.d.ts +3 -0
  15. package/dist/src/common/types/text.d.ts +2 -0
  16. package/dist/src/common/types/text.js +2 -0
  17. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +3 -9
  18. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +10 -9
  19. package/dist/src/desktop/components/Card/Card.d.ts +3 -2
  20. package/dist/src/desktop/components/Card/Card.js +1 -7
  21. package/dist/src/desktop/components/Checkbox/Checkbox.d.ts +2 -2
  22. package/dist/src/desktop/components/Chip/Chip.d.ts +2 -5
  23. package/dist/src/desktop/components/Chip/Chip.js +6 -1
  24. package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.d.ts +2 -1
  25. package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.d.ts +5 -5
  26. package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.js +13 -3
  27. package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.d.ts +3 -2
  28. package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.js +2 -2
  29. package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.d.ts +3 -7
  30. package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.js +8 -7
  31. package/dist/src/desktop/components/FilterBar/FilterBar.d.ts +2 -5
  32. package/dist/src/desktop/components/FloatingActionButton/FloatingActionButton.d.ts +2 -5
  33. package/dist/src/desktop/components/FloatingActionButton/FloatingActionButton.js +12 -2
  34. package/dist/src/desktop/components/Hero/Hero.d.ts +3 -2
  35. package/dist/src/desktop/components/IconButton/IconButton.d.ts +1 -6
  36. package/dist/src/desktop/components/IconButton/IconButton.js +14 -4
  37. package/dist/src/desktop/components/MainButton/MainButton.d.ts +2 -5
  38. package/dist/src/desktop/components/MainButton/MainButton.js +11 -1
  39. package/dist/src/desktop/components/Radio/Radio.d.ts +2 -1
  40. package/dist/src/desktop/components/Radio/Radio.js +6 -1
  41. package/dist/src/desktop/components/ReactionButton/ReactionButton.d.ts +2 -1
  42. package/dist/src/desktop/components/Select/Select.d.ts +2 -1
  43. package/dist/src/desktop/components/StatusBlock/StatusBlock.d.ts +2 -1
  44. package/dist/src/desktop/components/TextButton/TextButton.d.ts +2 -1
  45. package/dist/src/desktop/components/TextButton/TextButton.js +6 -1
  46. package/dist/src/desktop/components/TextField/TextField.d.ts +3 -8
  47. package/dist/src/desktop/components/TextField/TextField.js +13 -2
  48. package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +2 -4
  49. package/dist/src/desktop/components/UploadIconButton/UploadIconButton.js +6 -1
  50. package/dist/src/desktop/components/UploadMainButton/UploadMainButton.d.ts +2 -2
  51. package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +6 -1
  52. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.d.ts +2 -1
  53. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +6 -1
  54. package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.d.ts +4 -3
  55. package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.js +23 -14
  56. package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.d.ts +2 -1
  57. package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.js +2 -2
  58. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +3 -9
  59. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +10 -9
  60. package/dist/src/mobile/components/BlogTextField/BlogTextField.d.ts +3 -8
  61. package/dist/src/mobile/components/BlogTextField/BlogTextField.js +1 -0
  62. package/dist/src/mobile/components/Card/Card.d.ts +3 -2
  63. package/dist/src/mobile/components/Card/Card.js +1 -7
  64. package/dist/src/mobile/components/Checkbox/Checkbox.d.ts +2 -2
  65. package/dist/src/mobile/components/Chip/Chip.d.ts +2 -5
  66. package/dist/src/mobile/components/Chip/Chip.js +11 -6
  67. package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.d.ts +2 -1
  68. package/dist/src/mobile/components/IconButton/IconButton.d.ts +2 -2
  69. package/dist/src/mobile/components/IconButton/IconButton.js +12 -2
  70. package/dist/src/mobile/components/MainButton/MainButton.d.ts +4 -7
  71. package/dist/src/mobile/components/MainButton/MainButton.js +12 -2
  72. package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.d.ts +2 -2
  73. package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.js +18 -3
  74. package/dist/src/mobile/components/MobileTabBar/MobileTabBar.d.ts +2 -1
  75. package/dist/src/mobile/components/MobileTabBar/MobileTabBar.js +3 -3
  76. package/dist/src/mobile/components/Radio/Radio.d.ts +2 -1
  77. package/dist/src/mobile/components/Radio/Radio.js +6 -1
  78. package/dist/src/mobile/components/ReactionButton/ReactionButton.d.ts +4 -3
  79. package/dist/src/mobile/components/ReactionButton/ReactionButton.js +5 -5
  80. package/dist/src/mobile/components/Select/Select.d.ts +2 -1
  81. package/dist/src/mobile/components/StatusBlock/StatusBlock.d.ts +2 -1
  82. package/dist/src/mobile/components/TextButton/TextButton.d.ts +2 -1
  83. package/dist/src/mobile/components/TextButton/TextButton.js +6 -1
  84. package/dist/src/mobile/components/TextField/TextField.d.ts +3 -8
  85. package/dist/src/mobile/components/TextField/TextField.js +13 -2
  86. package/dist/src/mobile/components/TextLabel/TextLabel.d.ts +2 -4
  87. package/dist/src/mobile/components/UploadIconButton/UploadIconButton.js +6 -1
  88. package/dist/src/mobile/components/UploadMainButton/UploadMainButton.d.ts +2 -2
  89. package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +6 -1
  90. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.d.ts +2 -1
  91. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +6 -1
  92. package/package.json +1 -1
@@ -33,6 +33,11 @@ var hybrid_1 = require("../../../hybrid");
33
33
  var types_1 = require("./types");
34
34
  function UploadIconButton(_a) {
35
35
  var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, _g = _a.iconName, iconName = _g === void 0 ? 'ic_upload' : _g, iconColorKey = _a.iconColorKey, _h = _a.shadow, shadow = _h === void 0 ? 'hidden' : _h, _j = _a.colorTheme, colorTheme = _j === void 0 ? 'none' : _j, _k = _a.state, state = _k === void 0 ? 'normal' : _k, _l = _a.accept, accept = _l === void 0 ? '*' : _l, _m = _a.multipleMode, multipleMode = _m === void 0 ? 'none' : _m, onClick = _a.onClick;
36
+ var handleClick = function (e) {
37
+ if (onClick) {
38
+ onClick(e);
39
+ }
40
+ };
36
41
  var IconColorSelect = function () {
37
42
  if (state === 'disabled') {
38
43
  return 'ui_cpnt_button_icon_disabled';
@@ -46,7 +51,7 @@ function UploadIconButton(_a) {
46
51
  return types_1.iconStateColors[fillType];
47
52
  };
48
53
  return (react_1.default.createElement(S_UploadIconButton, { fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, isDisabled: state === 'disabled' },
49
- react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: onClick }),
54
+ react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: handleClick }),
50
55
  react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: iconSize, colorKey: IconColorSelect(), fillType: iconFillType })));
51
56
  }
52
57
  var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
2
+ import { FillIconNameKeys, LineIconNameKeys, PDSTextType } from '../../../common';
3
3
  declare type UploadMainButtonProps = {
4
- text?: string;
4
+ text?: PDSTextType;
5
5
  fillType?: 'fill' | 'line';
6
6
  size?: 'large' | 'medium' | 'small' | 'xsmall' | 'rlarge';
7
7
  fontWeight?: 'bold' | 'regular';
@@ -33,6 +33,11 @@ var TextLabel_1 = require("../TextLabel");
33
33
  var types_1 = require("./types");
34
34
  function UploadMainButton(_a) {
35
35
  var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, fontWeight = _a.fontWeight, _d = _a.iconMode, iconMode = _d === void 0 ? 'none' : _d, _e = _a.iconFillType, iconFillType = _e === void 0 ? 'line' : _e, _f = _a.iconName, iconName = _f === void 0 ? 'ic_upload' : _f, _g = _a.colorTheme, colorTheme = _g === void 0 ? 'none' : _g, _h = _a.state, state = _h === void 0 ? 'normal' : _h, _j = _a.accept, accept = _j === void 0 ? '*' : _j, _k = _a.multipleMode, multipleMode = _k === void 0 ? 'none' : _k, onClick = _a.onClick;
36
+ var handleClick = function (e) {
37
+ if (onClick) {
38
+ onClick(e);
39
+ }
40
+ };
36
41
  var selectTextThemeColor = function () {
37
42
  if (colorTheme === 'line3' && state === 'disabled') {
38
43
  return 'ui_cpnt_button_text_darktheme_disabled';
@@ -55,7 +60,7 @@ function UploadMainButton(_a) {
55
60
  return types_1.iconFillTypeColors[fillType];
56
61
  };
57
62
  return (react_1.default.createElement(S_UploadMainButton, { fillType: fillType, size: size, fontWeight: fontWeight, colorTheme: colorTheme, disabled: state === 'disabled' },
58
- react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: onClick }),
63
+ react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: handleClick }),
59
64
  size !== 'xsmall' && iconMode === 'left' && (react_1.default.createElement(react_1.default.Fragment, null,
60
65
  react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: iconColor(), fillType: iconFillType }),
61
66
  react_1.default.createElement(hybrid_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }))),
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
+ import { PDSTextType } from '../../../common';
2
3
  declare type UploadTextButtonProps = {
3
- text?: string;
4
+ text?: PDSTextType;
4
5
  size?: 'rlarge' | 'large' | 'medium' | 'small' | 'xsmall';
5
6
  fontWeight?: 'bold' | 'regular';
6
7
  state?: 'normal' | 'disabled';
@@ -38,8 +38,13 @@ var textStyle = {
38
38
  };
39
39
  function UploadTextButton(_a) {
40
40
  var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, fontWeight = _a.fontWeight, _c = _a.state, state = _c === void 0 ? 'normal' : _c, _d = _a.accept, accept = _d === void 0 ? '*' : _d, _e = _a.multipleMode, multipleMode = _e === void 0 ? 'none' : _e, onClick = _a.onClick;
41
+ var handleClick = function (e) {
42
+ if (onClick) {
43
+ onClick(e);
44
+ }
45
+ };
41
46
  return (react_1.default.createElement(S_UploadTextButton, { size: size, fontWeight: fontWeight, disabled: state === 'disabled' },
42
- react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: onClick }),
47
+ react_1.default.createElement("input", { type: "file", hidden: true, disabled: state === 'disabled', accept: accept, multiple: multipleMode === 'use', onChange: handleClick }),
43
48
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? 'sysTextTertiary' : 'usrTextBrandPrimary', btnMode: "use" })));
44
49
  }
45
50
  var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n width: ", ";\n"], ["\n height: 48px;\n width: ", ";\n"])), function (_a) {
@@ -1,17 +1,18 @@
1
1
  /// <reference types="react" />
2
+ import { PDSTextType } from '../../../common';
2
3
  declare type TextObj = {
3
4
  path: string;
4
- title: string;
5
+ title: PDSTextType;
5
6
  code: string;
6
7
  };
7
8
  declare type Props = {
8
9
  logoImageSrc?: string;
9
- titleText?: string;
10
+ titleText?: PDSTextType;
10
11
  menuMode: 'center_text' | 'none';
11
12
  textArray?: TextObj[];
12
13
  userImageSrc?: string;
13
14
  loginInfoMode?: 'none' | 'profile' | 'button';
14
- mBtnText?: string;
15
+ mBtnText?: PDSTextType;
15
16
  dividerType?: 'none' | 'solid';
16
17
  onClickLogo?: () => void;
17
18
  onClickLoginInfo?: () => void;
@@ -29,12 +29,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importStar(require("react"));
30
30
  var react_router_dom_1 = require("react-router-dom");
31
31
  var styled_components_1 = __importDefault(require("styled-components"));
32
- var Divider_1 = require("../../../hybrid/components/Divider");
33
- var ImageView_1 = require("../../../hybrid/components/ImageView");
34
- var ContextMenu_1 = __importDefault(require("../ContextMenu/ContextMenu"));
32
+ var hybrid_1 = require("../../../hybrid");
33
+ var ContextMenu_1 = require("../ContextMenu");
35
34
  var ContextMenuItem_1 = require("../ContextMenuItem");
36
- var IconButton_1 = __importDefault(require("../IconButton/IconButton"));
37
- var MainButton_1 = __importDefault(require("../MainButton/MainButton"));
35
+ var IconButton_1 = require("../IconButton");
36
+ var MainButton_1 = require("../MainButton");
38
37
  var TextLabel_1 = require("../TextLabel");
39
38
  function UserDesktopNavBar(_a) {
40
39
  var logoImageSrc = _a.logoImageSrc, titleText = _a.titleText, _b = _a.menuMode, menuMode = _b === void 0 ? 'center_text' : _b, textArray = _a.textArray, userImageSrc = _a.userImageSrc, _c = _a.loginInfoMode, loginInfoMode = _c === void 0 ? 'profile' : _c, mBtnText = _a.mBtnText, _d = _a.dividerType, dividerType = _d === void 0 ? 'none' : _d, onClickLogo = _a.onClickLogo, onClickLoginInfo = _a.onClickLoginInfo;
@@ -58,24 +57,34 @@ function UserDesktopNavBar(_a) {
58
57
  var hiddenTexts = array.slice(MAX_VISIBLE_TEXTS_NUM);
59
58
  return hiddenTexts;
60
59
  }
61
- var handleOnclick = function (path) {
60
+ var handleClick = function (path) {
62
61
  history.push(path);
63
62
  };
63
+ var handleClickLogo = function () {
64
+ if (onClickLogo) {
65
+ onClickLogo();
66
+ }
67
+ };
68
+ var handleClickLoginInfo = function () {
69
+ if (onClickLoginInfo) {
70
+ onClickLoginInfo();
71
+ }
72
+ };
64
73
  return (react_1.default.createElement(S_UserDesktopNavBar, null,
65
74
  react_1.default.createElement(S_NavBar, null,
66
- logoImageSrc ? (react_1.default.createElement(S_Logo, { src: logoImageSrc, onClick: onClickLogo })) : (react_1.default.createElement(S_TextWrapper, { onClick: onClickLogo },
75
+ logoImageSrc ? (react_1.default.createElement(S_Logo, { src: logoImageSrc, onClick: handleClickLogo })) : (react_1.default.createElement(S_TextWrapper, { onClick: handleClickLogo },
67
76
  react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, singleLineMode: "use", styleTheme: "headingBold", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 1 }))),
68
77
  menuMode === 'center_text' && (react_1.default.createElement(S_pApps, null,
69
- visibleTexts.map(function (value) { return (react_1.default.createElement(S_VisiblePAppWrapper, { key: value.path, onClick: function () { return handleOnclick(value.path); } }, currentPathName.includes(value.path) ? (react_1.default.createElement(TextLabel_1.TextLabel, { text: value.title, styleTheme: "body1Bold", colorTheme: "sysTextPrimary", singleLineMode: "use" })) : (react_1.default.createElement(TextLabel_1.TextLabel, { text: value.title, styleTheme: "body1Regular", colorTheme: "sysTextSecondary", singleLineMode: "use" })))); }),
78
+ visibleTexts.map(function (value) { return (react_1.default.createElement(S_VisiblePAppWrapper, { key: value.path, onClick: function () { return handleClick(value.path); } }, currentPathName.includes(value.path) ? (react_1.default.createElement(TextLabel_1.TextLabel, { text: value.title, styleTheme: "body1Bold", colorTheme: "sysTextPrimary", singleLineMode: "use" })) : (react_1.default.createElement(TextLabel_1.TextLabel, { text: value.title, styleTheme: "body1Regular", colorTheme: "sysTextSecondary", singleLineMode: "use" })))); }),
70
79
  hiddenTexts.length > 0 && (react_1.default.createElement(S_MorePApps, null,
71
80
  react_1.default.createElement(S_IconButtonWrapper, { onClick: function () { return setIsContextMenuOpen(!isContextMenuOpen); } },
72
- react_1.default.createElement(IconButton_1.default, { fillType: "fill", baseSize: "medium", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: 24, iconName: "ic_more", iconColorKey: "ui_cpnt_button_icon_default", shapeType: "rectangle", iconFillType: "fill" })),
73
- react_1.default.createElement(S_ContextMenuWrapper, null, isContextMenuOpen && (react_1.default.createElement(ContextMenu_1.default, null, hiddenTexts.map(function (pApp) { return (react_1.default.createElement(ContextMenuItem_1.ContextMenuItem, { key: pApp.path, size: "medium", value: pApp.path, text: pApp.title, onClick: handleOnclick })); })))))))),
81
+ react_1.default.createElement(IconButton_1.IconButton, { fillType: "fill", baseSize: "medium", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: 24, iconName: "ic_more", iconColorKey: "ui_cpnt_button_icon_default", shapeType: "rectangle", iconFillType: "fill" })),
82
+ react_1.default.createElement(S_ContextMenuWrapper, null, isContextMenuOpen && (react_1.default.createElement(ContextMenu_1.ContextMenu, null, hiddenTexts.map(function (pApp) { return (react_1.default.createElement(ContextMenuItem_1.ContextMenuItem, { key: pApp.path, size: "medium", value: pApp.path, text: pApp.title, onClick: handleClick })); })))))))),
74
83
  react_1.default.createElement(S_ProfileWrapper, null,
75
- loginInfoMode === 'profile' && (react_1.default.createElement(S_ImageViewWrapper, { onClick: onClickLoginInfo },
76
- react_1.default.createElement(ImageView_1.ImageView, { src: userImageSrc, shapeType: "circular", width: 32, ratio: "1_1", scaleType: "cover", borderMode: "use" }))),
77
- loginInfoMode === 'button' && (react_1.default.createElement(MainButton_1.default, { size: "small", fillType: "line", text: mBtnText, onClick: onClickLoginInfo })))),
78
- dividerType === 'solid' && react_1.default.createElement(Divider_1.Divider, null)));
84
+ loginInfoMode === 'profile' && (react_1.default.createElement(S_ImageViewWrapper, { onClick: handleClickLoginInfo },
85
+ react_1.default.createElement(hybrid_1.ImageView, { src: userImageSrc, shapeType: "circular", width: 32, ratio: "1_1", scaleType: "cover", borderMode: "use" }))),
86
+ loginInfoMode === 'button' && (react_1.default.createElement(MainButton_1.MainButton, { size: "small", fillType: "line", text: mBtnText, onClick: handleClickLoginInfo })))),
87
+ dividerType === 'solid' && react_1.default.createElement(hybrid_1.Divider, null)));
79
88
  }
80
89
  var S_UserDesktopNavBar = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 64px;\n background-color: ", ";\n min-width: 1200px;\n"], ["\n height: 64px;\n background-color: ", ";\n min-width: 1200px;\n"])), function (_a) {
81
90
  var theme = _a.theme;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { PDSTextType } from '../../../common';
2
3
  declare type TextObj = {
3
4
  path: string;
4
- title: string;
5
+ title: PDSTextType;
5
6
  };
6
7
  export declare type UserDesktopTabBarProps = {
7
8
  textArray: TextObj[];
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var react_router_dom_1 = require("react-router-dom");
31
31
  var styled_components_1 = __importStar(require("styled-components"));
32
- var Divider_1 = require("../../../hybrid/components/Divider");
32
+ var hybrid_1 = require("../../../hybrid");
33
33
  var TextLabel_1 = require("../TextLabel");
34
34
  function UserDesktopTabBar(_a) {
35
35
  var textArray = _a.textArray, _b = _a.styleTheme, styleTheme = _b === void 0 ? 'main' : _b;
@@ -45,7 +45,7 @@ function UserDesktopTabBar(_a) {
45
45
  handleClick(value);
46
46
  } },
47
47
  react_1.default.createElement(TextLabel_1.TextLabel, { text: value.title, styleTheme: pathname === value.path ? 'body2Bold' : 'body2Regular', colorTheme: pathname === value.path ? 'usrTextBrandPrimary' : 'sysTextSecondary', singleLineMode: "use" }))); })),
48
- react_1.default.createElement(Divider_1.Divider, { direction: "horizontal" })));
48
+ react_1.default.createElement(hybrid_1.Divider, { direction: "horizontal" })));
49
49
  }
50
50
  var S_TabWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
51
51
  var styleTheme = _a.styleTheme;
@@ -1,16 +1,10 @@
1
- import { TFunctionResult } from 'i18next';
2
1
  import React from 'react';
3
2
  import { Path } from 'react-hook-form';
4
- import { desktopFontSize, fontWeight } from '../../../../common/styles/theme';
5
- import { uiColors } from '../../../../common/styles/ui-colors';
6
- import { IFormValues } from '../../../../common/types/form';
7
- export declare type DesktopFontSize = keyof typeof desktopFontSize;
8
- export declare type FontWeight = keyof typeof fontWeight;
9
- export declare type UiColors = keyof typeof uiColors;
3
+ import { DesktopFontSize, FontWeight, IFormValues, PDSTextType, UiColors } from '../../../../common';
10
4
  export declare type TextFieldBaseProps = {
11
5
  name: Path<IFormValues>;
12
- hintText?: string | number | null | TFunctionResult;
13
- defaultText?: string | number | null | TFunctionResult;
6
+ hintText?: PDSTextType;
7
+ defaultText?: PDSTextType;
14
8
  validation?: {
15
9
  [key: string]: any;
16
10
  };
@@ -45,10 +45,11 @@ var __rest = (this && this.__rest) || function (s, e) {
45
45
  return t;
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
+ /* eslint-disable react/jsx-no-bind */
48
49
  var react_1 = __importStar(require("react"));
49
50
  var react_hook_form_1 = require("react-hook-form");
50
51
  var styled_components_1 = __importStar(require("styled-components"));
51
- var theme_1 = require("../../../../common/styles/theme");
52
+ var common_1 = require("../../../../common");
52
53
  var IconButton_1 = require("../../../components/IconButton");
53
54
  function TextFieldBase(_a) {
54
55
  var name = _a.name, hintText = _a.hintText, defaultText = _a.defaultText, validation = _a.validation, _b = _a.preventBlankMode, preventBlankMode = _b === void 0 ? 'none' : _b, _c = _a.textLineType, textLineType = _c === void 0 ? 'single' : _c, multiRows = _a.multiRows, autoMinRows = _a.autoMinRows, autoMaxRows = _a.autoMaxRows, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, min = _a.min, max = _a.max, _g = _a.maxLength, maxLength = _g === void 0 ? Infinity : _g, _h = _a.textSize, textSize = _h === void 0 ? 'form2' : _h, _j = _a.textWeight, textWeight = _j === void 0 ? 'normal' : _j, textPadding = _a.textPadding, _k = _a.fieldHeight, fieldHeight = _k === void 0 ? 48 : _k, _l = _a.deleteIconMode, deleteIconMode = _l === void 0 ? 'use' : _l, _m = _a.deleteIconSize, deleteIconSize = _m === void 0 ? 20 : _m, _o = _a.deleteIconColor, deleteIconColor = _o === void 0 ? 'ui_cpnt_button_icon_disabled' : _o, isFocused = _a.isFocused, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyUp = _a.onKeyUp, onTarget = _a.onTarget, rest = __rest(_a, ["name", "hintText", "defaultText", "validation", "preventBlankMode", "textLineType", "multiRows", "autoMinRows", "autoMaxRows", "inputType", "state", "colorTheme", "min", "max", "maxLength", "textSize", "textWeight", "textPadding", "fieldHeight", "deleteIconMode", "deleteIconSize", "deleteIconColor", "isFocused", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onTarget"]);
@@ -175,7 +176,7 @@ function TextFieldBase(_a) {
175
176
  if (textLineType === 'single') {
176
177
  return (react_1.default.createElement(S_InputWrapper, null,
177
178
  react_1.default.createElement(S_Input, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, type: inputType, state: state, readOnly: state === 'read_only', disabled: state === 'disabled', maxLength: maxLength, textSize: textSize, textWeight: textWeight, textPadding: textPadding, colorTheme: colorTheme, min: min, max: max, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: ref })),
178
- deleteIconMode === 'use' && isFocused && (react_1.default.createElement(IconButton_1.IconButton, { iconName: "ic_delete", baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: deleteIconSize, iconColorKey: deleteIconColor, iconFillType: "fill", state: state === 'disabled' ? 'disabled' : 'normal', onTouchStart: deleteValue }))));
179
+ deleteIconMode === 'use' && isFocused && (react_1.default.createElement(IconButton_1.IconButton, { iconName: "ic_delete", baseSize: "small", shapeType: "rectangle", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconSize: deleteIconSize, iconColorKey: deleteIconColor, iconFillType: "fill", state: state === 'disabled' ? 'disabled' : 'normal', onMouseDown: deleteValue }))));
179
180
  }
180
181
  if (textLineType === 'multi') {
181
182
  return (react_1.default.createElement(S_Multi, __assign({}, register(name, validation), rest, { name: name, defaultValue: defaultText, placeholder: hintText, state: state, readOnly: state === 'read_only' && true, disabled: state === 'disabled' && true, maxLength: maxLength, rows: multiRows, textSize: textSize, textWeight: textWeight, textPadding: textPadding, colorTheme: colorTheme, onFocus: handleFocus, onTarget: handleTarget, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: ref })));
@@ -215,13 +216,13 @@ var basicStyle = (0, styled_components_1.css)(templateObject_4 || (templateObjec
215
216
  }[colorTheme];
216
217
  }, function (_a) {
217
218
  var textSize = _a.textSize;
218
- return theme_1.desktopFontSize[textSize];
219
+ return common_1.desktopFontSize[textSize];
219
220
  }, function (_a) {
220
221
  var textWeight = _a.textWeight;
221
- return theme_1.fontWeight[textWeight];
222
+ return common_1.fontWeight[textWeight];
222
223
  }, function (_a) {
223
224
  var textSize = _a.textSize;
224
- return theme_1.desktopLineHeight[textSize];
225
+ return common_1.desktopLineHeight[textSize];
225
226
  }, function (_a) {
226
227
  var theme = _a.theme, colorTheme = _a.colorTheme;
227
228
  return colorTheme &&
@@ -249,15 +250,15 @@ var S_Auto = styled_components_1.default.textarea(templateObject_6 || (templateO
249
250
  var autoMaxRows = _a.autoMaxRows, textSize = _a.textSize, fieldHeight = _a.fieldHeight;
250
251
  return autoMaxRows &&
251
252
  fieldHeight &&
252
- "max-height: " + Number(theme_1.desktopFontSize[textSize].substring(0, 2)) *
253
- Number(theme_1.desktopLineHeight[textSize]) *
253
+ "max-height: " + Number(common_1.desktopFontSize[textSize].substring(0, 2)) *
254
+ Number(common_1.desktopLineHeight[textSize]) *
254
255
  autoMaxRows + "px;";
255
256
  }, function (_a) {
256
257
  var autoMinRows = _a.autoMinRows, textSize = _a.textSize, fieldHeight = _a.fieldHeight;
257
258
  return autoMinRows &&
258
259
  fieldHeight &&
259
- "min-height: " + Number(theme_1.desktopFontSize[textSize].substring(0, 2)) *
260
- Number(theme_1.desktopLineHeight[textSize]) *
260
+ "min-height: " + Number(common_1.desktopFontSize[textSize].substring(0, 2)) *
261
+ Number(common_1.desktopLineHeight[textSize]) *
261
262
  autoMinRows + "px;";
262
263
  });
263
264
  var S_Multi = styled_components_1.default.textarea(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n"], ["\n ", "\n display: block;\n overflow-y: auto;\n resize: none;\n"])), basicStyle);
@@ -1,14 +1,9 @@
1
- import { TFunctionResult } from 'i18next';
2
1
  import React from 'react';
3
2
  import { Path } from 'react-hook-form';
4
- import fillIcons from '../../../common/assets/icons/fill';
5
- import lineIcons from '../../../common/assets/icons/line';
6
- import { IFormValues } from '../../../common/types/form';
7
- export declare type FillIconNameKeys = keyof typeof fillIcons;
8
- export declare type LineIconNameKeys = keyof typeof lineIcons;
3
+ import { IFormValues, PDSTextType } from '../../../common';
9
4
  export declare type BlogTextFieldProps = {
10
- hintText?: string | number | null | TFunctionResult;
11
- defaultText?: string | number | null | TFunctionResult;
5
+ hintText?: PDSTextType;
6
+ defaultText?: PDSTextType;
12
7
  size?: 'rlarge';
13
8
  textLineType?: 'multi' | 'auto';
14
9
  multiRows?: number;
@@ -26,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ /* eslint-disable react/jsx-no-bind */
29
30
  var react_1 = __importDefault(require("react"));
30
31
  var styled_components_1 = __importStar(require("styled-components"));
31
32
  var components_1 = require("../../common/components");
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { PDSTextType } from '../../../common';
2
3
  export declare type CardProps = {
3
- titleText?: string;
4
- descText?: string;
4
+ titleText?: PDSTextType;
5
+ descText?: PDSTextType;
5
6
  imageIconMode?: 'none' | 'image' | 'icon';
6
7
  imageSrc?: string;
7
8
  selectState?: 'unselected' | 'selected';
@@ -9,13 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  var react_1 = __importDefault(require("react"));
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- // TODO 추후 기획에 수정이 생길 시 icon 반영
13
- // import { uiColors } from '../../../common';
14
- // import fillIcons from '../../../common/assets/icons/fill';
15
- // import lineIcons from '../../../common/assets/icons/line';
16
- // import { Icon } from '../../../hybrid/components/Icon';
17
12
  var hybrid_1 = require("../../../hybrid");
18
- var ImageView_1 = require("../../../hybrid/components/ImageView");
19
13
  var TextLabel_1 = require("../TextLabel");
20
14
  function Card(_a) {
21
15
  var titleText = _a.titleText, descText = _a.descText, _b = _a.imageIconMode, imageIconMode = _b === void 0 ? 'none' : _b, imageSrc = _a.imageSrc, _c = _a.selectState, selectState = _c === void 0 ? 'unselected' : _c, onClick = _a.onClick;
@@ -25,7 +19,7 @@ function Card(_a) {
25
19
  }
26
20
  };
27
21
  return (react_1.default.createElement(S_CardGroups, { selectState: selectState, onClick: handleClick },
28
- imageIconMode !== 'none' && (react_1.default.createElement(S_ImageIconModeBox, null, imageIconMode === 'image' && imageSrc && (react_1.default.createElement(ImageView_1.ImageView, { shapeType: "rectangle", width: "responsive", ratio: "16_9", scaleType: "cover", src: imageSrc })))),
22
+ imageIconMode !== 'none' && (react_1.default.createElement(S_ImageIconModeBox, null, imageIconMode === 'image' && imageSrc && (react_1.default.createElement(hybrid_1.ImageView, { shapeType: "rectangle", width: "responsive", ratio: "16_9", scaleType: "cover", src: imageSrc })))),
29
23
  react_1.default.createElement(S_Content, null,
30
24
  react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, styleTheme: "body2Bold", colorTheme: "sysTextPrimary" }),
31
25
  react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_c" }),
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { Path } from 'react-hook-form';
3
- import { IFormValues } from '../../../common/types/form';
3
+ import { IFormValues, PDSTextType } from '../../../common';
4
4
  declare type CheckboxProps = {
5
- text?: string;
5
+ text?: PDSTextType;
6
6
  fontWeight?: 'bold' | 'regular';
7
7
  state?: 'normal' | 'disabled';
8
8
  name: Path<IFormValues>;
@@ -1,12 +1,9 @@
1
1
  /// <reference types="react" />
2
- import fillIcons from '../../../common/assets/icons/fill';
3
- import lineIcons from '../../../common/assets/icons/line';
4
- export declare type FillIconNameKeys = keyof typeof fillIcons;
5
- export declare type LineIconNameKeys = keyof typeof lineIcons;
2
+ import { FillIconNameKeys, LineIconNameKeys, PDSTextType } from '../../../common';
6
3
  declare type DisplayType = 'category_choice' | 'filter_single' | 'filter_multi' | 'removable' | 'label' | 'time' | 'information';
7
4
  export declare type ChipProps = {
8
5
  displayType?: DisplayType;
9
- text?: string | number;
6
+ text?: PDSTextType;
10
7
  filterIconMode?: 'none' | 'left';
11
8
  iconFillType?: 'line' | 'fill';
12
9
  iconName?: FillIconNameKeys | LineIconNameKeys;
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  var react_1 = __importDefault(require("react"));
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- var Icon_1 = require("../../../hybrid/components/Icon");
12
+ var hybrid_1 = require("../../../hybrid");
13
13
  var TextLabel_1 = require("../TextLabel");
14
14
  function Chip(_a) {
15
15
  var _b = _a.displayType, displayType = _b === void 0 ? 'filter_single' : _b, text = _a.text, _c = _a.filterIconMode, filterIconMode = _c === void 0 ? 'none' : _c, _d = _a.iconFillType, iconFillType = _d === void 0 ? 'line' : _d, iconName = _a.iconName, _e = _a.activeChipId, activeChipId = _e === void 0 ? 0 : _e, chipId = _a.chipId, onClickChip = _a.onClickChip, onClickXMarkIcon = _a.onClickXMarkIcon;
@@ -18,15 +18,20 @@ function Chip(_a) {
18
18
  onClickChip();
19
19
  }
20
20
  };
21
+ var handleClickXMarkIcon = function () {
22
+ if (onClickXMarkIcon) {
23
+ onClickXMarkIcon();
24
+ }
25
+ };
21
26
  var chipType = function () {
22
27
  switch (displayType) {
23
28
  case 'category_choice':
24
29
  return (react_1.default.createElement(S_CategoryChoiceChip, { isActive: chipId === activeChipId, onClick: handleClick },
25
30
  chipId !== activeChipId && (react_1.default.createElement(S_CategoryIconWrapper, { isActive: chipId === activeChipId },
26
- react_1.default.createElement(Icon_1.Icon, { size: 16, fillType: "line", iconName: "ic_filter", colorKey: "ui_cpnt_chip_line_icon_01" }))),
31
+ react_1.default.createElement(hybrid_1.Icon, { size: 16, fillType: "line", iconName: "ic_filter", colorKey: "ui_cpnt_chip_line_icon_01" }))),
27
32
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", btnMode: "use", colorTheme: chipId === activeChipId ? 'usrTextBrandOnPrimary' : 'sysTextPrimary' }),
28
33
  chipId === activeChipId && (react_1.default.createElement(S_CategoryIconWrapper, { isActive: chipId === activeChipId },
29
- react_1.default.createElement(Icon_1.Icon, { size: 12, fillType: "line", iconName: "ic_xmark", colorKey: "ui_cpnt_chip_fill_icon_active_01" })))));
34
+ react_1.default.createElement(hybrid_1.Icon, { size: 12, fillType: "line", iconName: "ic_xmark", colorKey: "ui_cpnt_chip_fill_icon_active_01" })))));
30
35
  case 'information':
31
36
  return (react_1.default.createElement(S_InfoChip, { onClick: handleClick },
32
37
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Regular", btnMode: "use", colorTheme: "sysTextPrimary" })));
@@ -39,12 +44,12 @@ function Chip(_a) {
39
44
  case 'removable':
40
45
  return (react_1.default.createElement(S_RemovableChip, { onClick: handleClick },
41
46
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", btnMode: "use", colorTheme: "sysTextSecondary" }),
42
- react_1.default.createElement(S_XIconWrapper, { onClick: onClickXMarkIcon },
43
- react_1.default.createElement(Icon_1.Icon, { size: 12, iconName: "ic_xmark", fillType: "line", colorKey: "ui_cpnt_chip_fill_icon_inactive" }))));
47
+ react_1.default.createElement(S_XIconWrapper, { onClick: handleClickXMarkIcon },
48
+ react_1.default.createElement(hybrid_1.Icon, { size: 12, iconName: "ic_xmark", fillType: "line", colorKey: "ui_cpnt_chip_fill_icon_inactive" }))));
44
49
  default:
45
50
  return (react_1.default.createElement(S_FilterSingleChip, { isActive: chipId === activeChipId, onClick: handleClick },
46
51
  filterIconMode === 'left' && (react_1.default.createElement(S_FilterIconWrapper, null,
47
- react_1.default.createElement(Icon_1.Icon, { fillType: iconFillType, iconName: iconName, size: 16, colorKey: chipId === activeChipId
52
+ react_1.default.createElement(hybrid_1.Icon, { fillType: iconFillType, iconName: iconName, size: 16, colorKey: chipId === activeChipId
48
53
  ? 'ui_cpnt_chip_fill_icon_active_01'
49
54
  : 'ui_cpnt_chip_line_icon_02' }))),
50
55
  react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", btnMode: "use", colorTheme: chipId === activeChipId ? 'usrTextBrandOnPrimary' : 'sysTextSecondary' })));
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
+ import { PDSTextType } from '../../../common';
2
3
  export declare type ContextMenuItemProps = {
3
- text: string;
4
+ text: PDSTextType;
4
5
  size?: 'large' | 'medium' | 'small';
5
6
  value: string | number | boolean;
6
7
  isSelected?: boolean;
@@ -15,7 +15,7 @@ export declare type IconButtonProps = {
15
15
  type?: 'submit' | 'reset' | 'button';
16
16
  state?: 'normal' | 'disabled';
17
17
  onClick?: (...args: any) => any;
18
- onTouchStart?: (...args: any) => any;
18
+ onMouseDown?: (...args: any) => any;
19
19
  };
20
- declare function IconButton({ fillType, shapeType, baseSize, baseColorKey, borderColorKey, iconSize, iconFillType, iconName, iconColorKey, shadow, colorTheme, type, state, onClick, onTouchStart }: IconButtonProps): JSX.Element;
20
+ declare function IconButton({ fillType, shapeType, baseSize, baseColorKey, borderColorKey, iconSize, iconFillType, iconName, iconColorKey, shadow, colorTheme, type, state, onClick, onMouseDown }: IconButtonProps): JSX.Element;
21
21
  export default IconButton;
@@ -31,7 +31,17 @@ var styled_components_1 = __importStar(require("styled-components"));
31
31
  var ui_colors_1 = require("../../../common/styles/ui-colors");
32
32
  var hybrid_1 = require("../../../hybrid");
33
33
  function IconButton(_a) {
34
- var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _g = _a.shadow, shadow = _g === void 0 ? 'hidden' : _g, _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, onTouchStart = _a.onTouchStart;
34
+ var _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.shapeType, shapeType = _c === void 0 ? 'rectangle' : _c, _d = _a.baseSize, baseSize = _d === void 0 ? 'small' : _d, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e, _f = _a.iconFillType, iconFillType = _f === void 0 ? 'line' : _f, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _g = _a.shadow, shadow = _g === void 0 ? 'hidden' : _g, _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;
35
+ var handleClick = function () {
36
+ if (onClick) {
37
+ onClick();
38
+ }
39
+ };
40
+ var handleMouseDown = function () {
41
+ if (onMouseDown) {
42
+ onMouseDown();
43
+ }
44
+ };
35
45
  var iconStateColorObj = {
36
46
  fill: 'ui_cpnt_button_icon_on_primary',
37
47
  line: 'ui_cpnt_button_icon_enabled'
@@ -52,7 +62,7 @@ function IconButton(_a) {
52
62
  }
53
63
  return iconStateColorObj[fillType];
54
64
  };
55
- return (react_1.default.createElement(S_IconButton, { fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: onClick, onTouchStart: onTouchStart },
65
+ return (react_1.default.createElement(S_IconButton, { fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: handleClick, onMouseDown: handleMouseDown },
56
66
  react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: iconSize, colorKey: IconColorSelect(), fillType: iconFillType })));
57
67
  }
58
68
  var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
@@ -1,10 +1,7 @@
1
1
  /// <reference types="react" />
2
- import fillIcons from '../../../common/assets/icons/fill';
3
- import lineIcons from '../../../common/assets/icons/line';
4
- export declare type FillIconNameKeys = keyof typeof fillIcons;
5
- export declare type LineIconNameKeys = keyof typeof lineIcons;
2
+ import { FillIconNameKeys, LineIconNameKeys, PDSTextType } from '../../../common';
6
3
  export declare type MainButtonProps = {
7
- text?: string;
4
+ text?: PDSTextType;
8
5
  fillType?: 'fill' | 'line';
9
6
  size?: 'large' | 'medium' | 'small' | 'xsmall' | 'rlarge';
10
7
  fontWeight?: 'bold' | 'regular';
@@ -15,7 +12,7 @@ export declare type MainButtonProps = {
15
12
  type?: 'button' | 'submit';
16
13
  state?: 'normal' | 'disabled';
17
14
  onClick?: (...args: any) => any;
18
- onTouchStart?: (...args: any) => any;
15
+ onMouseDown?: (...args: any) => any;
19
16
  };
20
- declare function MainButton({ text, fillType, size, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onTouchStart }: MainButtonProps): JSX.Element;
17
+ declare function MainButton({ text, fillType, size, fontWeight, iconMode, iconFillType, iconName, colorTheme, type, state, onClick, onMouseDown }: MainButtonProps): JSX.Element;
21
18
  export default MainButton;
@@ -37,7 +37,17 @@ var TextLabel_1 = require("../TextLabel");
37
37
  // borderColorKey?: string;
38
38
  // shadow?: 'hidden' | 'visible';
39
39
  function MainButton(_a) {
40
- var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, fontWeight = _a.fontWeight, _d = _a.iconMode, iconMode = _d === void 0 ? 'none' : _d, _e = _a.iconFillType, iconFillType = _e === void 0 ? 'line' : _e, iconName = _a.iconName, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, _g = _a.type, type = _g === void 0 ? 'button' : _g, _h = _a.state, state = _h === void 0 ? 'normal' : _h, onClick = _a.onClick, onTouchStart = _a.onTouchStart;
40
+ var text = _a.text, _b = _a.fillType, fillType = _b === void 0 ? 'fill' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, fontWeight = _a.fontWeight, _d = _a.iconMode, iconMode = _d === void 0 ? 'none' : _d, _e = _a.iconFillType, iconFillType = _e === void 0 ? 'line' : _e, iconName = _a.iconName, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, _g = _a.type, type = _g === void 0 ? 'button' : _g, _h = _a.state, state = _h === void 0 ? 'normal' : _h, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
41
+ var handleClick = function () {
42
+ if (onClick) {
43
+ onClick();
44
+ }
45
+ };
46
+ var handleMouseDown = function () {
47
+ if (onMouseDown) {
48
+ onMouseDown();
49
+ }
50
+ };
41
51
  var textStyle = {
42
52
  rlarge: 'body1Bold',
43
53
  large: 'body1Bold',
@@ -84,7 +94,7 @@ function MainButton(_a) {
84
94
  }
85
95
  return iconFillTypeColorObj[fillType];
86
96
  };
87
- return (react_1.default.createElement(S_Button, { fillType: fillType, size: size, fontWeight: fontWeight, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: onClick, onTouchStart: onTouchStart },
97
+ return (react_1.default.createElement(S_Button, { fillType: fillType, size: size, fontWeight: fontWeight, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', onClick: handleClick, onMouseDown: handleMouseDown },
88
98
  size !== 'xsmall' && iconMode === 'left' && (react_1.default.createElement(react_1.default.Fragment, null,
89
99
  react_1.default.createElement(hybrid_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: iconColor(), fillType: iconFillType }),
90
100
  react_1.default.createElement(hybrid_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }))),
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { FillIconNameKeys, LineIconNameKeys, UiColors } from '../../../common';
2
+ import { FillIconNameKeys, LineIconNameKeys, PDSTextType, UiColors } from '../../../common';
3
3
  declare type Props = {
4
4
  titleType?: 'text' | 'profile' | 'image';
5
- titleText?: string;
5
+ titleText?: PDSTextType;
6
6
  leftBtnMode?: 'none' | 'back' | 'menu' | 'close';
7
7
  displayType?: 'none' | 'ibtn_amount1' | 'ibtn_amount2';
8
8
  iBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
@@ -14,6 +14,21 @@ var IconButton_1 = require("../IconButton");
14
14
  var TextLabel_1 = require("../TextLabel");
15
15
  function MobileHeaderBar(_a) {
16
16
  var _b = _a.titleType, titleType = _b === void 0 ? 'text' : _b, titleText = _a.titleText, _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.dividerType, dividerType = _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;
17
+ var handleClickLeftBtn = function () {
18
+ if (onClickLeftBtn) {
19
+ onClickLeftBtn();
20
+ }
21
+ };
22
+ var handleClickIBtn1 = function () {
23
+ if (onClickIBtn1) {
24
+ onClickIBtn1();
25
+ }
26
+ };
27
+ var handleClickIBtn2 = function () {
28
+ if (onClickIBtn2) {
29
+ onClickIBtn2();
30
+ }
31
+ };
17
32
  var getLeftIconName = function () {
18
33
  switch (leftBtnMode) {
19
34
  case 'back':
@@ -32,7 +47,7 @@ function MobileHeaderBar(_a) {
32
47
  return react_1.default.createElement("div", null);
33
48
  }
34
49
  return (react_1.default.createElement(S_LeftButtonBox, null,
35
- react_1.default.createElement(IconButton_1.IconButton, { iconName: iconName, fillType: "fill", iconFillType: "line", baseSize: "large", iconSize: 24, shapeType: "rectangle", onClick: onClickLeftBtn, baseColorKey: "ui_cpnt_button_fill_base_transparent" })));
50
+ react_1.default.createElement(IconButton_1.IconButton, { iconName: iconName, fillType: "fill", iconFillType: "line", baseSize: "large", iconSize: 24, shapeType: "rectangle", onClick: handleClickLeftBtn, baseColorKey: "ui_cpnt_button_fill_base_transparent" })));
36
51
  };
37
52
  var title = function () {
38
53
  switch (titleType) {
@@ -57,8 +72,8 @@ function MobileHeaderBar(_a) {
57
72
  return react_1.default.createElement("div", null);
58
73
  }
59
74
  return (react_1.default.createElement(S_IBtnBox, null,
60
- displayType === 'ibtn_amount2' && iBtn2IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconSize: 24, baseSize: "large", iconName: iBtn2IconName, fillType: "fill", onClick: onClickIBtn2, iconFillType: iBtn2IconFillType, iconColorKey: iBtn2IconColorKey, baseColorKey: "ui_cpnt_button_fill_base_transparent", type: iBtn2Type, state: iBtn2State })),
61
- (displayType === 'ibtn_amount1' || displayType === 'ibtn_amount2') && iBtn1IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconSize: 24, baseSize: "large", iconName: iBtn1IconName, fillType: "fill", onClick: onClickIBtn1, iconFillType: iBtn1IconFillType, iconColorKey: iBtn1IconColorKey, baseColorKey: "ui_cpnt_button_fill_base_transparent", type: iBtn1Type, state: iBtn1State }))));
75
+ displayType === 'ibtn_amount2' && iBtn2IconName && (react_1.default.createElement(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 })),
76
+ (displayType === 'ibtn_amount1' || displayType === 'ibtn_amount2') && iBtn1IconName && (react_1.default.createElement(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 }))));
62
77
  };
63
78
  return (react_1.default.createElement(S_MobileHeaderBar, { hasBorder: dividerType === 'solid', expand: titleType === 'profile' },
64
79
  react_1.default.createElement(S_ButtonWrapper, null,
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { PDSTextType } from '../../../common';
2
3
  declare type TextObj = {
3
4
  path: string;
4
- title: string;
5
+ title: PDSTextType;
5
6
  };
6
7
  export declare type MobileTabBarProps = {
7
8
  textArray: TextObj[];