pds-dev-kit-web 1.4.26 → 1.4.29

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 (59) hide show
  1. package/dist/src/GlobalStyle.js +1 -1
  2. package/dist/src/common/assets/icons/line/PostColumn.d.ts +4 -0
  3. package/dist/src/common/assets/icons/line/PostColumn.js +34 -0
  4. package/dist/src/common/assets/icons/line/index.d.ts +1 -0
  5. package/dist/src/common/assets/icons/line/index.js +2 -0
  6. package/dist/src/common/styles/colorSet/UIColor.json +2 -1
  7. package/dist/src/common/styles/colorSet/index.d.ts +1 -0
  8. package/dist/src/common/styles/colorSet/ui-type.d.ts +1 -0
  9. package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.d.ts +3 -3
  10. package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.js +30 -43
  11. package/dist/src/desktop/components/BasicChatListItem/Popup.d.ts +19 -0
  12. package/dist/src/desktop/components/BasicChatListItem/Popup.js +238 -0
  13. package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.d.ts +4 -1
  14. package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.js +4 -4
  15. package/dist/src/desktop/components/ChatList/Body.d.ts +2 -2
  16. package/dist/src/desktop/components/ChatList/Body.js +11 -12
  17. package/dist/src/desktop/components/ChatList/ChatList.d.ts +6 -5
  18. package/dist/src/desktop/components/ChatList/ChatList.js +6 -6
  19. package/dist/src/desktop/components/ChatList/Header.d.ts +2 -2
  20. package/dist/src/desktop/components/ChatList/Header.js +2 -2
  21. package/dist/src/desktop/components/Chip/Chip.js +12 -12
  22. package/dist/src/desktop/components/ContextMenu/ContextMenu.js +8 -2
  23. package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +4 -4
  24. package/dist/src/desktop/components/Dropdown/Dropdown.js +12 -5
  25. package/dist/src/desktop/components/MainButton/MainButton.js +5 -5
  26. package/dist/src/desktop/components/Select/Select.js +4 -1
  27. package/dist/src/desktop/components/StatusBlock/StatusBlock.js +11 -5
  28. package/dist/src/desktop/components/TextButton/TextButton.js +5 -5
  29. package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +5 -5
  30. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +5 -5
  31. package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
  32. package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/ContentsContainer.js +2 -1
  33. package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSG.d.ts +1 -1
  34. package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSG.js +16 -10
  35. package/dist/src/desktop/layout/LayoutWS/ContainersBox/ContainersBox.d.ts +1 -1
  36. package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.d.ts +3 -3
  37. package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.js +30 -43
  38. package/dist/src/mobile/components/BasicChatListItem/Popup.d.ts +19 -0
  39. package/dist/src/mobile/components/BasicChatListItem/Popup.js +238 -0
  40. package/dist/src/mobile/components/BodyTextGroup/BodyTextGroup.d.ts +4 -1
  41. package/dist/src/mobile/components/BodyTextGroup/BodyTextGroup.js +4 -4
  42. package/dist/src/mobile/components/ChatList/Body.d.ts +2 -2
  43. package/dist/src/mobile/components/ChatList/Body.js +4 -3
  44. package/dist/src/mobile/components/ChatList/ChatList.d.ts +6 -5
  45. package/dist/src/mobile/components/ChatList/ChatList.js +7 -7
  46. package/dist/src/mobile/components/ChatList/Header.d.ts +2 -2
  47. package/dist/src/mobile/components/ChatList/Header.js +2 -2
  48. package/dist/src/mobile/components/Chip/Chip.js +12 -12
  49. package/dist/src/mobile/components/ContextMenu/ContextMenu.js +8 -2
  50. package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +4 -4
  51. package/dist/src/mobile/components/Dropdown/Dropdown.js +12 -5
  52. package/dist/src/mobile/components/MainButton/MainButton.js +5 -5
  53. package/dist/src/mobile/components/Select/Select.js +4 -1
  54. package/dist/src/mobile/components/StatusBlock/StatusBlock.js +4 -4
  55. package/dist/src/mobile/components/TextButton/TextButton.js +4 -4
  56. package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +5 -5
  57. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +5 -5
  58. package/package.json +1 -1
  59. package/release-note.md +27 -3
@@ -5,6 +5,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  var styled_components_1 = require("styled-components");
8
- var GlobalStyle = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n html {\n height: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n width: 100%;\n }\n\n body {\n font-family: -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n height: 100%;\n margin: 0;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n width: 100%;\n }\n\n body::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n #root {\n height: 100%;\n width: 100%;\n }\n\n div, span, textarea, ul {\n font-family: -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n }\n\n div::-webkit-scrollbar, span::-webkit-scrollbar, textarea::-webkit-scrollbar, ul::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n input {\n font-family: -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n }\n\n a,\n [type='checkbox'],\n [type='radio'] {\n color: inherit;\n -webkit-tap-highlight-color: rgba(26, 26, 26, 0.301961);\n text-decoration: none;\n }\n\n code {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;\n }\n\n button {\n cursor: pointer;\n font-family: inherit;\n outline: none;\n }\n\ninput:-webkit-autofill,\ninput:-webkit-autofill:hover,\ninput:-webkit-autofill:focus,\ninput:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n box-shadow: 0 0 0 1000px white inset !important;\n}\n"], ["\n html {\n height: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n width: 100%;\n }\n\n body {\n font-family: -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n height: 100%;\n margin: 0;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n width: 100%;\n }\n\n body::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n #root {\n height: 100%;\n width: 100%;\n }\n\n div, span, textarea, ul {\n font-family: -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n }\n\n div::-webkit-scrollbar, span::-webkit-scrollbar, textarea::-webkit-scrollbar, ul::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n input {\n font-family: -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n }\n\n a,\n [type='checkbox'],\n [type='radio'] {\n color: inherit;\n -webkit-tap-highlight-color: rgba(26, 26, 26, 0.301961);\n text-decoration: none;\n }\n\n code {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;\n }\n\n button {\n cursor: pointer;\n font-family: inherit;\n outline: none;\n }\n\ninput:-webkit-autofill,\ninput:-webkit-autofill:hover,\ninput:-webkit-autofill:focus,\ninput:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n box-shadow: 0 0 0 1000px white inset !important;\n}\n"])));
8
+ var GlobalStyle = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard-jp.css');\n \n html {\n height: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n width: 100%;\n }\n\n body {\n font-family: Pretendard JP, -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n height: 100%;\n margin: 0;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n width: 100%;\n }\n\n body::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n #root {\n height: 100%;\n width: 100%;\n }\n\n div, span, textarea, ul {\n font-family: Pretendard JP, -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n }\n\n div::-webkit-scrollbar, span::-webkit-scrollbar, textarea::-webkit-scrollbar, ul::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n input {\n font-family: Pretendard JP, -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n }\n\n a,\n [type='checkbox'],\n [type='radio'] {\n color: inherit;\n -webkit-tap-highlight-color: rgba(26, 26, 26, 0.301961);\n text-decoration: none;\n }\n\n code {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;\n }\n\n button {\n cursor: pointer;\n font-family: inherit;\n outline: none;\n }\n\ninput:-webkit-autofill,\ninput:-webkit-autofill:hover,\ninput:-webkit-autofill:focus,\ninput:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n box-shadow: 0 0 0 1000px white inset !important;\n}\n"], ["\n @import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard-jp.css');\n \n html {\n height: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n width: 100%;\n }\n\n body {\n font-family: Pretendard JP, -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n height: 100%;\n margin: 0;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n width: 100%;\n }\n\n body::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n #root {\n height: 100%;\n width: 100%;\n }\n\n div, span, textarea, ul {\n font-family: Pretendard JP, -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n }\n\n div::-webkit-scrollbar, span::-webkit-scrollbar, textarea::-webkit-scrollbar, ul::-webkit-scrollbar {\n display: none; /* Chrome, Safari, Opera */\n }\n\n input {\n font-family: Pretendard JP, -apple-system, BlinkMacSystemFont, Basier Square, Noto Sans KR, Segoe UI, Apple SD Gothic Neo, Roboto, Helvetica Neue, Arial, sans-serif;\n font-stretch: normal;\n font-style: normal;\n letter-spacing: normal;\n }\n\n a,\n [type='checkbox'],\n [type='radio'] {\n color: inherit;\n -webkit-tap-highlight-color: rgba(26, 26, 26, 0.301961);\n text-decoration: none;\n }\n\n code {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;\n }\n\n button {\n cursor: pointer;\n font-family: inherit;\n outline: none;\n }\n\ninput:-webkit-autofill,\ninput:-webkit-autofill:hover,\ninput:-webkit-autofill:focus,\ninput:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px white inset !important;\n box-shadow: 0 0 0 1000px white inset !important;\n}\n"])));
9
9
  exports.default = GlobalStyle;
10
10
  var templateObject_1;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import IconType from '../IconType';
3
+ declare const PostColumn: ({ color, size, ...rest }: IconType) => JSX.Element;
4
+ export default PostColumn;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ var react_1 = __importDefault(require("react"));
29
+ var PostColumn = function (_a) {
30
+ var color = _a.color, size = _a.size, rest = __rest(_a, ["color", "size"]);
31
+ return (react_1.default.createElement("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest),
32
+ react_1.default.createElement("path", { fill: color, fillRule: "evenodd", d: "M18.5,2 C20.433,2 22,3.567 22,5.5 L22,5.5 L22,18.5 C22,20.433 20.433,22 18.5,22 L18.5,22 L5.5,22 C3.567,22 2,20.433 2,18.5 L2,18.5 L2,5.5 C2,3.567 3.567,2 5.5,2 L5.5,2 Z M18.5,3.5 L5.5,3.5 C4.397,3.5 3.5,4.397 3.5,5.5 L3.5,5.5 L3.5,18.5 C3.5,19.603 4.397,20.5 5.5,20.5 L5.5,20.5 L15.23,20.5 L14.1017582,18.8869552 L13.7979992,19.1907141 C13.6179939,19.3696967 13.3254853,19.3696967 13.1465028,19.1896914 L13.1465028,19.1896914 L11.9641952,18.0063611 C11.7841899,17.8263558 11.7841899,17.5348699 11.9641952,17.3548646 L11.9641952,17.3548646 L12.3968216,16.9222382 C10.7287043,15.8411836 8.58705028,14.9800219 7.50497295,14.4410288 C7.03655006,14.2078401 6.75529177,13.7118027 6.80233861,13.1912192 C7.05393693,10.4082963 6.36255293,8.70949628 5.97697339,7.99867989 L5.97697339,7.99867989 C5.93197206,7.92708687 5.90538037,7.87492624 5.87265213,7.82890216 C5.81435496,7.66628373 5.85321974,7.48423291 5.97697339,7.36047927 L5.97697339,7.36047927 L6.24186756,7.09660786 L10.649952,11.5046923 C10.4914246,11.9935703 10.6008596,12.5499503 10.9884847,12.9375754 C11.5397509,13.4888416 12.4346636,13.4888416 12.9859299,12.9375754 C13.5371961,12.3863091 13.5371961,11.4924192 12.9859299,10.9411529 C12.5972821,10.5525051 12.0419248,10.4440928 11.5530467,10.6015975 L11.5530467,10.6015975 L7.14496234,6.19351307 L7.41087927,5.92759615 C7.53463291,5.8038425 7.71668373,5.76497772 7.88032492,5.82327489 C7.92532624,5.85600313 7.97748687,5.88157206 8.04294334,5.9214596 L8.04294334,5.9214596 C8.76091904,6.31317569 10.4586963,7.00558245 13.2416192,6.75500689 C13.7622027,6.70796005 14.2582401,6.99024109 14.4914288,7.45866398 C15.0293992,8.54074131 15.8844243,10.6895546 16.9624106,12.361763 L16.9624106,12.361763 L17.4062874,11.9168635 C17.5862927,11.7378809 17.8788013,11.7378809 18.0577838,11.9178863 L18.0577838,11.9178863 L19.2411141,13.1012166 C19.4200967,13.2812219 19.4200967,13.5727077 19.2400914,13.752713 L19.2400914,13.752713 L18.9404235,14.052381 L20.5,15.146 L20.5,5.5 C20.5,4.44713636 19.6826921,3.58197107 18.6490673,3.50549502 L18.5,3.5 Z" })));
33
+ };
34
+ exports.default = PostColumn;
@@ -79,6 +79,7 @@ declare const lineIcons: {
79
79
  readonly ic_plus: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
80
80
  readonly ic_plus_circle: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
81
81
  readonly ic_post_blog: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
82
+ readonly ic_post_column: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
82
83
  readonly ic_post_community_p: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
83
84
  readonly ic_post_free: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
84
85
  readonly ic_post_inquiry: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
@@ -82,6 +82,7 @@ var Plan_1 = __importDefault(require("./Plan"));
82
82
  var Plus_1 = __importDefault(require("./Plus"));
83
83
  var PlusCircle_1 = __importDefault(require("./PlusCircle"));
84
84
  var PostBlog_1 = __importDefault(require("./PostBlog"));
85
+ var PostColumn_1 = __importDefault(require("./PostColumn"));
85
86
  var PostCommunityP_1 = __importDefault(require("./PostCommunityP"));
86
87
  var PostFree_1 = __importDefault(require("./PostFree"));
87
88
  var PostInquiry_1 = __importDefault(require("./PostInquiry"));
@@ -224,6 +225,7 @@ var lineIcons = {
224
225
  ic_plus: Plus_1.default,
225
226
  ic_plus_circle: PlusCircle_1.default,
226
227
  ic_post_blog: PostBlog_1.default,
228
+ ic_post_column: PostColumn_1.default,
227
229
  ic_post_community_p: PostCommunityP_1.default,
228
230
  ic_post_free: PostFree_1.default,
229
231
  ic_post_inquiry: PostInquiry_1.default,
@@ -526,5 +526,6 @@
526
526
  "ui_cpnt_sheet_base_03": "sys_component_base_white_opacity00",
527
527
  "ui_48": "sys_text_social_login_01",
528
528
  "ui_49": "sys_text_social_login_02",
529
- "ui_50": "sys_text_white"
529
+ "ui_50": "sys_text_white",
530
+ "ui_51": "sys_background_dimmed_65"
530
531
  }
@@ -946,6 +946,7 @@ declare const colorSet: {
946
946
  ui_48: string;
947
947
  ui_49: string;
948
948
  ui_50: string;
949
+ ui_51: string;
949
950
  };
950
951
  };
951
952
  export default colorSet;
@@ -527,4 +527,5 @@ export interface UITheme {
527
527
  ui_48: string;
528
528
  ui_49: string;
529
529
  ui_50: string;
530
+ ui_51: string;
530
531
  }
@@ -5,11 +5,11 @@ declare type Props = {
5
5
  contentText?: PDSTextType;
6
6
  leftImageMode?: 'none' | 'use';
7
7
  imageSrc?: string;
8
- hoverBtnMode?: 'none' | 'use';
8
+ hoverMode?: 'none' | 'use';
9
9
  contextMenuOptionArray?: PDSValueOption[];
10
10
  contextMenuState?: 'normal' | 'disabled';
11
11
  colorTheme?: 'seller' | 'subscriber';
12
- onClickContextMenu?: (option: PDSValueOption) => void;
12
+ onClickContextMenuItem?: (option: PDSValueOption) => void;
13
13
  };
14
- declare function BasicChatListItem({ titleText, contentText, leftImageMode, imageSrc, hoverBtnMode, contextMenuOptionArray, onClickContextMenu, contextMenuState, colorTheme }: Props): JSX.Element;
14
+ declare function BasicChatListItem({ titleText, contentText, leftImageMode, imageSrc, hoverMode, contextMenuOptionArray, onClickContextMenuItem, contextMenuState, colorTheme }: Props): JSX.Element;
15
15
  export default BasicChatListItem;
@@ -33,6 +33,7 @@ var ContextMenu_1 = require("../ContextMenu");
33
33
  var ContextMenuItem_1 = require("../ContextMenuItem");
34
34
  var IconButton_1 = require("../IconButton");
35
35
  var TextLabel_1 = require("../TextLabel");
36
+ var Popup_1 = require("./Popup");
36
37
  var titleTextColors = {
37
38
  seller: 'usrTextBrandPrimary',
38
39
  subscriber: 'sysTextSecondary'
@@ -42,9 +43,11 @@ var backgroundColorTheme = {
42
43
  subscriber: 'ui_cpnt_list_base_area'
43
44
  };
44
45
  function BasicChatListItem(_a) {
45
- var titleText = _a.titleText, contentText = _a.contentText, _b = _a.leftImageMode, leftImageMode = _b === void 0 ? 'none' : _b, imageSrc = _a.imageSrc, _c = _a.hoverBtnMode, hoverBtnMode = _c === void 0 ? 'use' : _c, contextMenuOptionArray = _a.contextMenuOptionArray, onClickContextMenu = _a.onClickContextMenu, _d = _a.contextMenuState, contextMenuState = _d === void 0 ? 'normal' : _d, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'subscriber' : _e;
46
+ var titleText = _a.titleText, contentText = _a.contentText, _b = _a.leftImageMode, leftImageMode = _b === void 0 ? 'none' : _b, imageSrc = _a.imageSrc, _c = _a.hoverMode, hoverMode = _c === void 0 ? 'use' : _c, contextMenuOptionArray = _a.contextMenuOptionArray, onClickContextMenuItem = _a.onClickContextMenuItem, _d = _a.contextMenuState, contextMenuState = _d === void 0 ? 'normal' : _d, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'subscriber' : _e;
46
47
  var _f = (0, react_1.useState)(false), isContextMenuOpen = _f[0], setIsContextMenuOpen = _f[1];
47
48
  var contextMenuRef = (0, react_1.useRef)(null);
49
+ var chatBody = document.querySelector('#chatMessageBox');
50
+ var rect = chatBody === null || chatBody === void 0 ? void 0 : chatBody.getBoundingClientRect();
48
51
  /**
49
52
  * @when contextMenu가 열려 있을 때
50
53
  * @expected ChatList body의 스크롤을 숨기고, contextMenu의 외부를 클릭하면 contextMenu가 닫히도록 합니다.
@@ -52,57 +55,45 @@ function BasicChatListItem(_a) {
52
55
  */
53
56
  (0, react_1.useEffect)(function () {
54
57
  // NOTE pop up 개념이 생기기 전까지의 임시 조치 방법입니다.
55
- var chatBody = document.querySelector('#chatMessageBox');
56
- if (chatBody) {
57
- if (isContextMenuOpen) {
58
- chatBody.style.overflowY = 'hidden';
59
- }
60
- else {
61
- chatBody.style.overflowY = 'auto';
62
- }
58
+ if (!chatBody) {
59
+ return;
63
60
  }
64
- function handleClickOutside(e) {
65
- if (contextMenuRef.current && !contextMenuRef.current.contains(e.target)) {
66
- if (isContextMenuOpen) {
67
- e.stopPropagation();
68
- setIsContextMenuOpen(false);
69
- }
70
- }
71
- }
72
- document.addEventListener('click', handleClickOutside);
73
- return function () {
74
- document.removeEventListener('click', handleClickOutside);
75
- };
76
- }, [isContextMenuOpen]);
77
- var handleClickMoreButton = function () {
61
+ chatBody.style.overflowY = isContextMenuOpen ? 'hidden' : 'auto';
62
+ }, [isContextMenuOpen, chatBody]);
63
+ var handleMoreButtonClick = function (e) {
64
+ e.stopPropagation();
78
65
  setIsContextMenuOpen(function (prev) { return !prev; });
79
66
  };
80
- var handleClickContextMenuItem = function (option) {
81
- if (onClickContextMenu) {
82
- onClickContextMenu(option);
67
+ var handleContextMenuItemClick = function (option) {
68
+ if (onClickContextMenuItem) {
69
+ onClickContextMenuItem(option);
83
70
  }
84
71
  setIsContextMenuOpen(false);
85
72
  };
86
73
  return (react_1.default.createElement(react_1.default.Fragment, null,
87
- react_1.default.createElement(S_BasicChatListItem, { colorTheme: colorTheme, hoverBtnMode: hoverBtnMode },
74
+ react_1.default.createElement(S_BasicChatListItem, { colorTheme: colorTheme, hoverMode: hoverMode },
88
75
  leftImageMode === 'use' && (react_1.default.createElement(S_ImageViewWrapper, null,
89
76
  react_1.default.createElement(hybrid_1.ImageView, { shapeType: "circular", ratio: "1_1", scaleType: "cover", src: imageSrc, width: "responsive" }))),
90
77
  react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, styleTheme: "caption1Bold", colorTheme: titleTextColors[colorTheme] }),
91
78
  react_1.default.createElement(S_ContentTextWrapper, null,
92
79
  react_1.default.createElement(TextLabel_1.TextLabel, { text: contentText, styleTheme: "caption1Regular", colorTheme: "sysTextPrimary", wordBreak: "break_all" })),
93
- react_1.default.createElement(S_SeeMoreButton, { isContextMenuOpen: isContextMenuOpen },
94
- react_1.default.createElement(IconButton_1.IconButton, { fillType: "fill", baseSize: "xsmall", iconFillType: "fill", iconSize: 20, iconName: "ic_more", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: "ui_cpnt_button_icon_on_primary", onClick: handleClickMoreButton }),
95
- isContextMenuOpen && (react_1.default.createElement(S_ContextMenuWrapper, { ref: contextMenuRef },
96
- react_1.default.createElement(ContextMenu_1.ContextMenu, null, contextMenuOptionArray === null || contextMenuOptionArray === void 0 ? void 0 : contextMenuOptionArray.map(function (el) { return (react_1.default.createElement(ContextMenuItem_1.ContextMenuItem, { key: el.value, option: el, onClick: handleClickContextMenuItem, state: contextMenuState })); }))))))));
80
+ hoverMode === 'use' && (react_1.default.createElement(S_SeeMoreButton, { isContextMenuOpen: isContextMenuOpen, ref: contextMenuRef },
81
+ react_1.default.createElement(IconButton_1.IconButton, { fillType: "fill", baseSize: "xsmall", iconFillType: "fill", iconSize: 20, iconName: "ic_more", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: "ui_cpnt_button_icon_enabled", onClick: handleMoreButtonClick }))),
82
+ react_1.default.createElement(Popup_1.PopupProvider, null,
83
+ react_1.default.createElement(Popup_1.Popup, { targetRef: contextMenuRef, isOpen: isContextMenuOpen, placement: "v-auto", wrapperHeight: rect === null || rect === void 0 ? void 0 : rect.height, onClickOutside: function () { return setIsContextMenuOpen(false); } },
84
+ react_1.default.createElement(ContextMenu_1.ContextMenu, null, contextMenuOptionArray === null || contextMenuOptionArray === void 0 ? void 0 : contextMenuOptionArray.map(function (el) { return (react_1.default.createElement(ContextMenuItem_1.ContextMenuItem, { key: el.value, option: el, onClick: handleContextMenuItemClick, state: contextMenuState })); })))))));
97
85
  }
98
- var S_SeeMoreButton = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n margin-left: ", ";\n position: relative;\n"], ["\n display: ", ";\n margin-left: ", ";\n position: relative;\n"])), function (_a) {
99
- var isContextMenuOpen = _a.isContextMenuOpen;
100
- return (isContextMenuOpen ? 'block' : 'none');
101
- }, function (_a) {
86
+ var S_SeeMoreButton = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: ", ";\n position: relative;\n visibility: ", ";\n"], ["\n margin-left: ", ";\n position: relative;\n visibility: ", ";\n"])), function (_a) {
102
87
  var theme = _a.theme;
103
88
  return theme.spacing.spacingA;
89
+ }, function (_a) {
90
+ var isContextMenuOpen = _a.isContextMenuOpen;
91
+ return (isContextMenuOpen ? 'visible' : 'hidden');
104
92
  });
105
- var S_BasicChatListItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n height: fit-content;\n min-height: 24px;\n max-width: 100%;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n ", ";\n\n :hover {\n ", " {\n display: ", ";\n }\n }\n"], ["\n display: flex;\n height: fit-content;\n min-height: 24px;\n max-width: 100%;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n ", ";\n\n :hover {\n ", " {\n display: ", ";\n }\n }\n"])), function (_a) {
93
+ var S_BasicChatListItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n height: fit-content;\n max-width: 100%;\n min-height: 24px;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n :hover {\n ", " {\n visibility: ", ";\n }\n }\n"], ["\n background-color: ", ";\n display: flex;\n height: fit-content;\n max-width: 100%;\n min-height: 24px;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n :hover {\n ", " {\n visibility: ", ";\n }\n }\n"])), function (_a) {
94
+ var colorTheme = _a.colorTheme, theme = _a.theme;
95
+ return colorTheme && theme[backgroundColorTheme[colorTheme]];
96
+ }, function (_a) {
106
97
  var theme = _a.theme;
107
98
  return theme.spacing.spacingA;
108
99
  }, function (_a) {
@@ -114,12 +105,9 @@ var S_BasicChatListItem = styled_components_1.default.div(templateObject_2 || (t
114
105
  }, function (_a) {
115
106
  var theme = _a.theme;
116
107
  return theme.spacing.spacingA;
117
- }, function (_a) {
118
- var colorTheme = _a.colorTheme, theme = _a.theme;
119
- return colorTheme && theme[backgroundColorTheme[colorTheme]];
120
108
  }, S_SeeMoreButton, function (_a) {
121
- var hoverBtnMode = _a.hoverBtnMode;
122
- return hoverBtnMode === 'use' && 'block';
109
+ var hoverMode = _a.hoverMode;
110
+ return hoverMode === 'use' && 'visible';
123
111
  });
124
112
  var S_ImageViewWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 24px;\n margin-right: ", ";\n min-width: 24px;\n width: 24px;\n"], ["\n height: 24px;\n margin-right: ", ";\n min-width: 24px;\n width: 24px;\n"])), function (_a) {
125
113
  var theme = _a.theme;
@@ -129,6 +117,5 @@ var S_ContentTextWrapper = styled_components_1.default.div(templateObject_4 || (
129
117
  var theme = _a.theme;
130
118
  return theme.spacing.spacingC;
131
119
  });
132
- var S_ContextMenuWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: absolute;\n right: -4px;\n z-index: 10;\n"], ["\n position: absolute;\n right: -4px;\n z-index: 10;\n"])));
133
120
  exports.default = BasicChatListItem;
134
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
121
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1,19 @@
1
+ import React, { MutableRefObject } from 'react';
2
+ declare type Props = {
3
+ targetRef: MutableRefObject<HTMLElement | null>;
4
+ isOpen: boolean;
5
+ onClickOutside?: () => void;
6
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
7
+ placement: string;
8
+ wrapperHeight?: number;
9
+ children: React.ReactNode;
10
+ };
11
+ declare function Popup({ targetRef, isOpen, onClickOutside, onClick, placement, wrapperHeight, children }: Props): JSX.Element;
12
+ /**
13
+ * 팝업 루트 프로바이더
14
+ * 팝업을 사용하기 위해서는 팝업 프로바이더가 상위 컴포넌트로 있어야 합니다.
15
+ */
16
+ declare function PopupProvider({ children }: {
17
+ children: React.ReactNode;
18
+ }): JSX.Element;
19
+ export { PopupProvider, Popup };
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Popup = exports.PopupProvider = void 0;
30
+ var react_1 = __importStar(require("react"));
31
+ var react_dom_1 = require("react-dom");
32
+ var styled_components_1 = __importDefault(require("styled-components"));
33
+ var PopupContext = (0, react_1.createContext)({
34
+ current: null
35
+ });
36
+ function getHAutoPlacement(_a) {
37
+ var targetRect = _a.targetRect, popupRect = _a.popupRect;
38
+ var leftSpaced = targetRect.right + popupRect.width > window.innerWidth;
39
+ var topSpaced = targetRect.bottom + popupRect.height > window.innerHeight;
40
+ return (leftSpaced ? 'left' : 'right') + "-" + (topSpaced ? 'end' : 'start');
41
+ }
42
+ function getVAutoPlacement(_a) {
43
+ var targetRect = _a.targetRect, popupRect = _a.popupRect, wrapperHeight = _a.wrapperHeight;
44
+ var leftSpaced = targetRect.right + popupRect.width > window.innerWidth;
45
+ var topSpaced = targetRect.bottom + popupRect.height > (wrapperHeight || window.innerWidth);
46
+ return (topSpaced ? 'top' : 'bottom') + "-" + (leftSpaced ? 'end' : 'start');
47
+ }
48
+ function getVCenterPlacement(_a) {
49
+ var targetRect = _a.targetRect, popupRect = _a.popupRect;
50
+ var leftSpaced = targetRect.right + popupRect.width > window.innerWidth;
51
+ return leftSpaced ? 'left-center' : 'right-center';
52
+ }
53
+ function getHCenterPlacement(_a) {
54
+ var targetRect = _a.targetRect, popupRect = _a.popupRect;
55
+ var topSpaced = targetRect.bottom + popupRect.height > window.innerHeight;
56
+ return topSpaced ? 'top-center' : 'bottom-center';
57
+ }
58
+ /**
59
+ * 위치 정규화
60
+ */
61
+ function getNormalizedPlacement(_a) {
62
+ var placement = _a.placement, targetRect = _a.targetRect, popupRect = _a.popupRect, wrapperHeight = _a.wrapperHeight;
63
+ switch (placement) {
64
+ case 'v-auto':
65
+ return getVAutoPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
66
+ case 'h-auto':
67
+ return getHAutoPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
68
+ case 'v-center':
69
+ return getVCenterPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
70
+ case 'h-center':
71
+ return getHCenterPlacement({ targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
72
+ default:
73
+ return placement;
74
+ }
75
+ }
76
+ function updatePosition(_a) {
77
+ var targetElem = _a.targetElem, popupElem = _a.popupElem, placement = _a.placement, wrapperHeight = _a.wrapperHeight;
78
+ var targetRect = targetElem.getBoundingClientRect();
79
+ var popupRect = popupElem.getBoundingClientRect();
80
+ var normPlacement = getNormalizedPlacement({ placement: placement, targetRect: targetRect, popupRect: popupRect, wrapperHeight: wrapperHeight });
81
+ switch (normPlacement) {
82
+ case 'top':
83
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
84
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
85
+ popupElem.style.width = 'auto';
86
+ break;
87
+ case 'top-start':
88
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
89
+ popupElem.style.left = targetRect.left + "px";
90
+ popupElem.style.width = 'auto';
91
+ break;
92
+ case 'top-end':
93
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
94
+ popupElem.style.left = targetRect.left + targetRect.width - popupRect.width + "px";
95
+ popupElem.style.width = 'auto';
96
+ break;
97
+ case 'top-both':
98
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
99
+ popupElem.style.left = targetRect.left + "px";
100
+ popupElem.style.width = targetRect.width + "px";
101
+ break;
102
+ case 'top-center':
103
+ popupElem.style.top = targetRect.top - popupRect.height + "px";
104
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
105
+ popupElem.style.width = 'auto';
106
+ break;
107
+ case 'bottom':
108
+ popupElem.style.top = targetRect.bottom + "px";
109
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
110
+ popupElem.style.width = 'auto';
111
+ break;
112
+ case 'bottom-start':
113
+ popupElem.style.top = targetRect.bottom + "px";
114
+ popupElem.style.left = targetRect.left + "px";
115
+ popupElem.style.width = 'auto';
116
+ break;
117
+ case 'bottom-end':
118
+ popupElem.style.top = targetRect.bottom + "px";
119
+ popupElem.style.left = targetRect.right - popupRect.width + "px";
120
+ popupElem.style.width = 'auto';
121
+ break;
122
+ case 'bottom-both':
123
+ popupElem.style.top = targetRect.bottom + "px";
124
+ popupElem.style.left = targetRect.left + "px";
125
+ popupElem.style.width = targetRect.width + "px";
126
+ break;
127
+ case 'bottom-center':
128
+ popupElem.style.top = targetRect.bottom + "px";
129
+ popupElem.style.left = targetRect.left - (popupRect.width - targetRect.width) / 2 + "px";
130
+ popupElem.style.width = 'auto';
131
+ break;
132
+ case 'left':
133
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
134
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
135
+ popupElem.style.width = 'auto';
136
+ break;
137
+ case 'left-start':
138
+ popupElem.style.top = targetRect.top + "px";
139
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
140
+ popupElem.style.width = 'auto';
141
+ break;
142
+ case 'left-end':
143
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) + "px";
144
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
145
+ popupElem.style.width = 'auto';
146
+ break;
147
+ case 'left-center':
148
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
149
+ popupElem.style.left = targetRect.left - popupRect.width + "px";
150
+ popupElem.style.width = 'auto';
151
+ break;
152
+ case 'right':
153
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
154
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
155
+ popupElem.style.width = 'auto';
156
+ break;
157
+ case 'right-start':
158
+ popupElem.style.top = targetRect.top + "px";
159
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
160
+ popupElem.style.width = 'auto';
161
+ break;
162
+ case 'right-end':
163
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) + "px";
164
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
165
+ popupElem.style.width = 'auto';
166
+ break;
167
+ case 'right-center':
168
+ popupElem.style.top = targetRect.top - (popupRect.height - targetRect.height) / 2 + "px";
169
+ popupElem.style.left = targetRect.left + targetRect.width + "px";
170
+ popupElem.style.width = 'auto';
171
+ break;
172
+ default:
173
+ break;
174
+ }
175
+ return normPlacement;
176
+ }
177
+ function Popup(_a) {
178
+ var targetRef = _a.targetRef, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, onClickOutside = _a.onClickOutside, onClick = _a.onClick, _c = _a.placement, placement = _c === void 0 ? 'bottom-start' : _c, wrapperHeight = _a.wrapperHeight, children = _a.children;
179
+ var popupRootRef = (0, react_1.useContext)(PopupContext);
180
+ var _d = (0, react_1.useState)('bottom'), normPlacement = _d[0], setNormPlacement = _d[1];
181
+ var popupRef = (0, react_1.useRef)(null);
182
+ /**
183
+ * 팝업 외의 다른 요소 클릭시 팝업이 닫히도록 합니다.
184
+ */
185
+ (0, react_1.useEffect)(function () {
186
+ function handleClickOutside(e) {
187
+ if (popupRootRef.current && !popupRootRef.current.contains(e.target)) {
188
+ if (onClickOutside) {
189
+ onClickOutside();
190
+ }
191
+ }
192
+ }
193
+ window.document.addEventListener('mousedown', handleClickOutside);
194
+ return function () {
195
+ window.document.removeEventListener('mousedown', handleClickOutside);
196
+ };
197
+ }, [popupRootRef, onClickOutside]);
198
+ /**
199
+ * 전체 UI 렌더링이 한 프레임 완료된 후에 팝업 위치를 결정합니다.
200
+ */
201
+ (0, react_1.useEffect)(function () {
202
+ window.requestAnimationFrame(function () {
203
+ if (!targetRef.current || !popupRef.current) {
204
+ return;
205
+ }
206
+ var targetElem = targetRef.current;
207
+ var popupElem = popupRef.current;
208
+ var updatedPlacement = updatePosition({ targetElem: targetElem, popupElem: popupElem, placement: placement, wrapperHeight: wrapperHeight });
209
+ setNormPlacement(updatedPlacement);
210
+ });
211
+ }, [isOpen, placement, wrapperHeight, targetRef, popupRef]);
212
+ function handlePopupClick(e) {
213
+ e.stopPropagation();
214
+ if (onClick) {
215
+ onClick(e);
216
+ }
217
+ }
218
+ if (!popupRootRef || !popupRootRef.current || !isOpen) {
219
+ return react_1.default.createElement(react_1.default.Fragment, null);
220
+ }
221
+ var popupComponent = (react_1.default.createElement(S_Popup, { ref: popupRef, onClick: function (e) { return handlePopupClick(e); } }, typeof children === 'function' ? children(normPlacement) : children));
222
+ return (0, react_dom_1.createPortal)(popupComponent, popupRootRef.current);
223
+ }
224
+ exports.Popup = Popup;
225
+ var S_Popup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n left: -1000px;\n position: fixed;\n top: -1000px;\n z-index: 1000;\n"], ["\n left: -1000px;\n position: fixed;\n top: -1000px;\n z-index: 1000;\n"])));
226
+ /**
227
+ * 팝업 루트 프로바이더
228
+ * 팝업을 사용하기 위해서는 팝업 프로바이더가 상위 컴포넌트로 있어야 합니다.
229
+ */
230
+ function PopupProvider(_a) {
231
+ var children = _a.children;
232
+ var ref = (0, react_1.useRef)();
233
+ return (react_1.default.createElement(react_1.default.Fragment, null,
234
+ react_1.default.createElement(PopupContext.Provider, { value: ref }, children),
235
+ react_1.default.createElement("div", { ref: ref })));
236
+ }
237
+ exports.PopupProvider = PopupProvider;
238
+ var templateObject_1;
@@ -4,7 +4,10 @@ declare type BodyTextGroupProps = {
4
4
  titleText: PDSTextType;
5
5
  descText?: PDSTextType;
6
6
  contentText?: PDSTextType;
7
+ titleTextWordBreak?: 'normal' | 'break_all' | 'keep_all' | 'break_word';
8
+ descTextWordBreak?: 'normal' | 'break_all' | 'keep_all' | 'break_word';
9
+ contentTextWordBreak?: 'normal' | 'break_all' | 'keep_all' | 'break_word';
7
10
  contentFontWeight?: 'regular' | 'bold';
8
11
  };
9
- declare function BodyTextGroup({ titleText, descText, contentText, contentFontWeight }: BodyTextGroupProps): JSX.Element;
12
+ declare function BodyTextGroup({ titleText, descText, contentText, titleTextWordBreak, descTextWordBreak, contentTextWordBreak, contentFontWeight }: BodyTextGroupProps): JSX.Element;
10
13
  export default BodyTextGroup;
@@ -7,14 +7,14 @@ var react_1 = __importDefault(require("react"));
7
7
  var hybrid_1 = require("../../../hybrid");
8
8
  var TextLabel_1 = require("../TextLabel");
9
9
  function BodyTextGroup(_a) {
10
- var titleText = _a.titleText, descText = _a.descText, contentText = _a.contentText, _b = _a.contentFontWeight, contentFontWeight = _b === void 0 ? 'regular' : _b;
10
+ var titleText = _a.titleText, descText = _a.descText, contentText = _a.contentText, _b = _a.titleTextWordBreak, titleTextWordBreak = _b === void 0 ? 'keep_all' : _b, _c = _a.descTextWordBreak, descTextWordBreak = _c === void 0 ? 'keep_all' : _c, _d = _a.contentTextWordBreak, contentTextWordBreak = _d === void 0 ? 'keep_all' : _d, _e = _a.contentFontWeight, contentFontWeight = _e === void 0 ? 'regular' : _e;
11
11
  return (react_1.default.createElement("div", null,
12
- react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, styleTheme: "subTitleBold", colorTheme: "sysTextPrimary" }),
12
+ react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, wordBreak: titleTextWordBreak, styleTheme: "subTitleBold", colorTheme: "sysTextPrimary" }),
13
13
  descText && (react_1.default.createElement(react_1.default.Fragment, null,
14
14
  react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
15
- react_1.default.createElement(TextLabel_1.TextLabel, { text: descText, styleTheme: "caption1Regular", colorTheme: "sysTextSecondary" }))),
15
+ react_1.default.createElement(TextLabel_1.TextLabel, { text: descText, wordBreak: descTextWordBreak, styleTheme: "caption1Regular", colorTheme: "sysTextSecondary" }))),
16
16
  contentText && (react_1.default.createElement(react_1.default.Fragment, null,
17
17
  react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
18
- react_1.default.createElement(TextLabel_1.TextLabel, { text: contentText, styleTheme: contentFontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorTheme: "sysTextPrimary" })))));
18
+ react_1.default.createElement(TextLabel_1.TextLabel, { text: contentText, wordBreak: contentTextWordBreak, styleTheme: contentFontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorTheme: "sysTextPrimary" })))));
19
19
  }
20
20
  exports.default = BodyTextGroup;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { Props as ChatListProps } from './ChatList';
3
- declare type Props = Pick<ChatListProps, 'scrollVisibleType' | 'children' | 'bodyBtnText'> & {
3
+ declare type Props = Pick<ChatListProps, 'scrollVisibleType' | 'children' | 'bodyMBtnText'> & {
4
4
  isSubmitted: boolean;
5
5
  };
6
- declare function Body({ scrollVisibleType, children, isSubmitted, bodyBtnText }: Props): JSX.Element;
6
+ declare function Body({ scrollVisibleType, children, isSubmitted, bodyMBtnText }: Props): JSX.Element;
7
7
  export default Body;
@@ -31,10 +31,11 @@ var styled_components_1 = __importStar(require("styled-components"));
31
31
  var MainButton_1 = require("../MainButton");
32
32
  var useAutoScrollToBottom_1 = __importDefault(require("./useAutoScrollToBottom"));
33
33
  function Body(_a) {
34
- var scrollVisibleType = _a.scrollVisibleType, children = _a.children, isSubmitted = _a.isSubmitted, bodyBtnText = _a.bodyBtnText;
34
+ var scrollVisibleType = _a.scrollVisibleType, children = _a.children, isSubmitted = _a.isSubmitted, bodyMBtnText = _a.bodyMBtnText;
35
35
  var _b = (0, react_1.useState)(false), isButtonShow = _b[0], setIsButtonShow = _b[1];
36
36
  var _c = (0, useAutoScrollToBottom_1.default)(), triggerScrollToBottom = _c.triggerScrollToBottom, EndOfList = _c.EndOfList;
37
37
  var scrollRef = (0, react_1.useRef)(null);
38
+ var childrenLength = react_1.default.Children.count(children);
38
39
  /**
39
40
  * @when 스크롤하지 않은 상태에서 chatMessages가 업데이트 될 때마다
40
41
  * @expected 채팅 리스트의 맨 밑으로 스크롤 내린다.
@@ -48,26 +49,24 @@ function Body(_a) {
48
49
  return;
49
50
  }
50
51
  triggerScrollToBottom();
51
- }, [children, isButtonShow, isSubmitted]);
52
+ }, [childrenLength, isButtonShow, isSubmitted]);
52
53
  var handleClickMBtn = function () {
53
54
  triggerScrollToBottom();
54
55
  };
55
- var handleScroll = function () {
56
- if (scrollRef.current) {
57
- var _a = scrollRef.current, scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
58
- if (Math.ceil(scrollTop) + clientHeight === scrollHeight) {
59
- setIsButtonShow(false);
60
- return;
61
- }
62
- setIsButtonShow(true);
56
+ var handleScroll = function (e) {
57
+ var _a = e.currentTarget, scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
58
+ if (scrollTop + clientHeight === scrollHeight) {
59
+ setIsButtonShow(false);
60
+ return;
63
61
  }
62
+ setIsButtonShow(true);
64
63
  };
65
64
  return (react_1.default.createElement(S_Body, null,
66
65
  react_1.default.createElement(S_ChatMessageBox, { id: "chatMessageBox", onScroll: handleScroll, ref: scrollRef, scrollVisibleType: scrollVisibleType },
67
66
  children,
68
67
  react_1.default.createElement(EndOfList, null)),
69
68
  isButtonShow && (react_1.default.createElement(S_BottomButtonWrapper, null,
70
- react_1.default.createElement(MainButton_1.MainButton, { text: bodyBtnText, size: "small", onClick: handleClickMBtn })))));
69
+ react_1.default.createElement(MainButton_1.MainButton, { text: bodyMBtnText, size: "small", onClick: handleClickMBtn })))));
71
70
  }
72
71
  var S_Body = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n"], ["\n flex: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n"])));
73
72
  var scrollVisibleStyle = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ::-webkit-scrollbar {\n display: block;\n }\n"], ["\n ::-webkit-scrollbar {\n display: block;\n }\n"])));
@@ -82,7 +81,7 @@ var S_ChatMessageBox = styled_components_1.default.div(templateObject_4 || (temp
82
81
  hidden: scrollHiddenStyle
83
82
  }[scrollVisibleType];
84
83
  });
85
- var S_BottomButtonWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: absolute;\n bottom: ", ";\n left: 50%;\n transform: translate(-50%, 0);\n"], ["\n position: absolute;\n bottom: ", ";\n left: 50%;\n transform: translate(-50%, 0);\n"])), function (_a) {
84
+ var S_BottomButtonWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n bottom: ", ";\n left: 50%;\n position: absolute;\n transform: translate(-50%, 0);\n"], ["\n bottom: ", ";\n left: 50%;\n position: absolute;\n transform: translate(-50%, 0);\n"])), function (_a) {
86
85
  var theme = _a.theme;
87
86
  return theme.spacing.spacingC;
88
87
  });