pds-dev-kit-web 2.2.21 → 2.2.23
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.
- package/dist/src/common/assets/icons/line/Chapter.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Chapter.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +1 -0
- package/dist/src/common/assets/icons/line/index.js +2 -0
- package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.d.ts +1 -1
- package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.js +12 -3
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +3 -1
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +42 -46
- package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.d.ts +1 -1
- package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.js +12 -3
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +3 -1
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +42 -46
- package/package.json +1 -1
- package/release-note.md +5 -6
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
var Chapter = function (_a) {
|
|
27
|
+
var color = _a.color, size = _a.size, rest = __rest(_a, ["color", "size"]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest, { children: (0, jsx_runtime_1.jsxs)("g", __assign({ fill: "none", fillRule: "evenodd" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: color, d: "M5.6613,11.4557 L5.6613,9.2747 C5.6613,8.6267 6.3613,8.2227 6.9223,8.5467 L8.8113,9.6367 L10.7003,10.7277 C11.2613,11.0517 11.2613,11.8597 10.7003,12.1837 L8.8113,13.2747 L6.9223,14.3647 C6.3613,14.6887 5.6613,14.2847 5.6613,13.6367 L5.6613,11.4557 Z" }), (0, jsx_runtime_1.jsx)("path", { stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M11.6363,5.9619 C9.6583,4.1809 5.8493,3.5079 3.4303,4.4109 C2.8643,4.6219 2.3983,5.2749 2.3983,5.8789 L2.3993,18.1849 C2.3993,18.7149 2.9373,19.0399 3.4293,18.8419 C5.9343,17.8349 9.7133,18.3309 11.6713,19.8739 C11.8653,20.0269 12.1213,20.0269 12.3163,19.8729 C14.3223,18.2839 18.0623,17.8379 20.5753,18.8439 C21.0653,19.0399 21.6013,18.7129 21.6013,18.1849 L21.6013,5.8789 C21.6013,5.2749 21.1363,4.6219 20.5703,4.4109 C18.1513,3.5079 14.3423,4.1809 12.3643,5.9619 C12.1523,6.1529 11.8483,6.1529 11.6363,5.9619 Z M14.1962,8.9646 L18.2602,8.9646 M14.1962,11.765 L18.2602,11.765 M14.1962,14.5653 L18.2602,14.5653" })] })) })));
|
|
29
|
+
};
|
|
30
|
+
exports.default = Chapter;
|
|
@@ -43,6 +43,7 @@ declare const lineIcons: {
|
|
|
43
43
|
readonly ic_cart: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
44
44
|
readonly ic_channel: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
45
45
|
readonly ic_channel_setting: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
46
|
+
readonly ic_chapter: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
46
47
|
readonly ic_chat: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
47
48
|
readonly ic_chat_counseling: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
48
49
|
readonly ic_chat_crm: ({ color, size, ...rest }: import("../IconType").default) => JSX.Element;
|
|
@@ -46,6 +46,7 @@ var Carousel_1 = __importDefault(require("./Carousel"));
|
|
|
46
46
|
var Cart_1 = __importDefault(require("./Cart"));
|
|
47
47
|
var Channel_1 = __importDefault(require("./Channel"));
|
|
48
48
|
var ChannelSetting_1 = __importDefault(require("./ChannelSetting"));
|
|
49
|
+
var Chapter_1 = __importDefault(require("./Chapter"));
|
|
49
50
|
var Chat_1 = __importDefault(require("./Chat"));
|
|
50
51
|
var ChatCounseling_1 = __importDefault(require("./ChatCounseling"));
|
|
51
52
|
var ChatCrm_1 = __importDefault(require("./ChatCrm"));
|
|
@@ -310,6 +311,7 @@ var lineIcons = {
|
|
|
310
311
|
ic_cart: Cart_1.default,
|
|
311
312
|
ic_channel: Channel_1.default,
|
|
312
313
|
ic_channel_setting: ChannelSetting_1.default,
|
|
314
|
+
ic_chapter: Chapter_1.default,
|
|
313
315
|
ic_chat: Chat_1.default,
|
|
314
316
|
ic_chat_counseling: ChatCounseling_1.default,
|
|
315
317
|
ic_chat_crm: ChatCrm_1.default,
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
hoverMode?: 'none' | 'use';
|
|
9
9
|
contextMenuOptionArray?: PDSValueOption[];
|
|
10
10
|
contextMenuState?: 'normal' | 'disabled';
|
|
11
|
-
colorTheme?: 'seller' | 'seller_transparent' | 'subscriber' | 'subscriber_transparent' | 'secondary_transparent_grey' | 'white_transparent_grey';
|
|
11
|
+
colorTheme?: 'seller' | 'seller_transparent' | 'subscriber' | 'subscriber_transparent' | 'secondary_transparent_grey' | 'white_transparent_grey' | 'brand_primary_solid' | 'brand_primary_translucent' | 'secondary_transparent' | 'white_transparent';
|
|
12
12
|
onClickContextMenuItem?: (option: PDSValueOption) => void;
|
|
13
13
|
};
|
|
14
14
|
declare function BasicChatListItem({ titleText, contentText, leftImageMode, imageSrc, hoverMode, contextMenuOptionArray, onClickContextMenuItem, contextMenuState, colorTheme }: Props): JSX.Element;
|
|
@@ -33,7 +33,11 @@ var titleTextColors = {
|
|
|
33
33
|
subscriber: 'sysTextSecondary',
|
|
34
34
|
subscriber_transparent: 'sysTextWhite',
|
|
35
35
|
secondary_transparent_grey: 'sysTextSecondary',
|
|
36
|
-
white_transparent_grey: 'sysTextWhite'
|
|
36
|
+
white_transparent_grey: 'sysTextWhite',
|
|
37
|
+
brand_primary_solid: 'usrTextBrandPrimary',
|
|
38
|
+
brand_primary_translucent: 'usrTextBrandPrimary',
|
|
39
|
+
secondary_transparent: 'sysTextSecondary',
|
|
40
|
+
white_transparent: 'sysTextWhite'
|
|
37
41
|
};
|
|
38
42
|
var backgroundColorTheme = {
|
|
39
43
|
seller: 'ui_cpnt_list_base_area_seller',
|
|
@@ -41,10 +45,14 @@ var backgroundColorTheme = {
|
|
|
41
45
|
subscriber: 'ui_cpnt_list_base_area',
|
|
42
46
|
subscriber_transparent: 'ui_cpnt_list_base_area_transparent',
|
|
43
47
|
secondary_transparent_grey: 'ui_cpnt_list_base_area',
|
|
44
|
-
white_transparent_grey: 'ui_cpnt_list_base_area_transparent'
|
|
48
|
+
white_transparent_grey: 'ui_cpnt_list_base_area_transparent',
|
|
49
|
+
brand_primary_solid: 'ui_cpnt_list_base_area_seller',
|
|
50
|
+
brand_primary_translucent: 'ui_cpnt_list_base_area_transparent_seller',
|
|
51
|
+
secondary_transparent: 'ui_cpnt_list_base_area',
|
|
52
|
+
white_transparent: 'ui_cpnt_list_base_area_transparent'
|
|
45
53
|
};
|
|
46
54
|
function BasicChatListItem(_a) {
|
|
47
|
-
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 ? '
|
|
55
|
+
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 ? 'secondary_transparent' : _e;
|
|
48
56
|
var _f = (0, react_1.useState)(false), isContextMenuOpen = _f[0], setIsContextMenuOpen = _f[1];
|
|
49
57
|
var contextMenuRef = (0, react_1.useRef)(null);
|
|
50
58
|
var chatBody = document.querySelector('#chatMessageBox');
|
|
@@ -79,6 +87,7 @@ function BasicChatListItem(_a) {
|
|
|
79
87
|
var contentTextColorOverride;
|
|
80
88
|
var iconColorKey;
|
|
81
89
|
switch (colorTheme) {
|
|
90
|
+
case 'white_transparent':
|
|
82
91
|
case 'subscriber_transparent': {
|
|
83
92
|
contentTextColorTheme = 'sysTextWhite';
|
|
84
93
|
iconColorKey = 'ui_cpnt_button_icon_white';
|
|
@@ -9,10 +9,12 @@ export type ChatBubbleListItemProps = {
|
|
|
9
9
|
colorTheme?: ColorThemeType;
|
|
10
10
|
timeMode?: 'none' | 'use';
|
|
11
11
|
timeText?: PDSTextType;
|
|
12
|
+
countMode?: 'none' | 'use';
|
|
13
|
+
countText?: PDSTextType;
|
|
12
14
|
contextMenuOptionArray?: PDSValueOption[];
|
|
13
15
|
contextMenuState?: 'normal' | 'disabled';
|
|
14
16
|
children?: React.ReactNode;
|
|
15
17
|
onClickContextMenuItem?: (option: PDSValueOption) => void;
|
|
16
18
|
};
|
|
17
|
-
declare function ChatBubbleListItem({ titleText, imageSrc, hoverMode, styleTheme, colorTheme, timeMode, timeText, contextMenuOptionArray, contextMenuState, children, onClickContextMenuItem }: ChatBubbleListItemProps): JSX.Element;
|
|
19
|
+
declare function ChatBubbleListItem({ titleText, imageSrc, hoverMode, styleTheme, colorTheme, timeMode, timeText, countMode, countText, contextMenuOptionArray, contextMenuState, children, onClickContextMenuItem }: ChatBubbleListItemProps): JSX.Element;
|
|
18
20
|
export default ChatBubbleListItem;
|
|
@@ -67,12 +67,40 @@ var profileImageBorderColorTheme = {
|
|
|
67
67
|
translucent_black: 'ui_avatar_border_translucent_black'
|
|
68
68
|
};
|
|
69
69
|
function ChatBubbleListItem(_a) {
|
|
70
|
-
var titleText = _a.titleText, imageSrc = _a.imageSrc, _b = _a.hoverMode, hoverMode = _b === void 0 ? 'use' : _b, styleTheme = _a.styleTheme, _c = _a.colorTheme, colorTheme = _c === void 0 ? 'grey' : _c, _d = _a.timeMode, timeMode = _d === void 0 ? 'use' : _d, timeText = _a.timeText, contextMenuOptionArray = _a.contextMenuOptionArray,
|
|
71
|
-
var
|
|
72
|
-
var _f = (0, react_1.useState)(false), isContextMenuOpen = _f[0], setIsContextMenuOpen = _f[1];
|
|
70
|
+
var titleText = _a.titleText, imageSrc = _a.imageSrc, _b = _a.hoverMode, hoverMode = _b === void 0 ? 'use' : _b, styleTheme = _a.styleTheme, _c = _a.colorTheme, colorTheme = _c === void 0 ? 'grey' : _c, _d = _a.timeMode, timeMode = _d === void 0 ? 'use' : _d, timeText = _a.timeText, _e = _a.countMode, countMode = _e === void 0 ? 'none' : _e, countText = _a.countText, contextMenuOptionArray = _a.contextMenuOptionArray, _f = _a.contextMenuState, contextMenuState = _f === void 0 ? 'normal' : _f, children = _a.children, onClickContextMenuItem = _a.onClickContextMenuItem;
|
|
71
|
+
var _g = (0, react_1.useState)(false), isContextMenuOpen = _g[0], setIsContextMenuOpen = _g[1];
|
|
73
72
|
var contextMenuRef = (0, react_1.useRef)(null);
|
|
74
73
|
var chatBody = document.querySelector('#chatMessageBox');
|
|
75
74
|
var rect = chatBody === null || chatBody === void 0 ? void 0 : chatBody.getBoundingClientRect();
|
|
75
|
+
var isMe = styleTheme.includes('me');
|
|
76
|
+
var isProfileImageShow = styleTheme === 'other_avatar_impact' || styleTheme === 'other_avatar';
|
|
77
|
+
var isTitleTextShow = styleTheme === 'other_avatar_impact' || styleTheme === 'other_avatar' || styleTheme === 'other';
|
|
78
|
+
var hasLeftSpacing = styleTheme === 'other_avatar_impact' ||
|
|
79
|
+
styleTheme === 'other_avatar' ||
|
|
80
|
+
styleTheme === 'other_avatar_sub';
|
|
81
|
+
var titleTextColorTheme = 'sysTextPrimary';
|
|
82
|
+
var countTextColorTheme = 'sysTextBrandPrimary';
|
|
83
|
+
switch (colorTheme) {
|
|
84
|
+
case 'grey': {
|
|
85
|
+
titleTextColorTheme = 'sysTextPrimary';
|
|
86
|
+
countTextColorTheme = 'sysTextBrandPrimary';
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case 'brand_primary': {
|
|
90
|
+
titleTextColorTheme = 'usrTextBrandPrimary';
|
|
91
|
+
countTextColorTheme = 'sysTextBrandPrimary';
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case 'translucent_white': {
|
|
95
|
+
titleTextColorTheme = 'sysTextBlack';
|
|
96
|
+
countTextColorTheme = 'sysTextTertiary';
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'translucent_black': {
|
|
100
|
+
titleTextColorTheme = 'sysTextWhite';
|
|
101
|
+
countTextColorTheme = 'sysTextTertiary';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
76
104
|
/**
|
|
77
105
|
* @when contextMenu가 열려 있을 때
|
|
78
106
|
* @expected ChatList body의 스크롤을 숨기고, contextMenu의 외부를 클릭하면 contextMenu가 닫히도록 합니다.
|
|
@@ -111,48 +139,7 @@ function ChatBubbleListItem(_a) {
|
|
|
111
139
|
}
|
|
112
140
|
setIsContextMenuOpen(false);
|
|
113
141
|
};
|
|
114
|
-
|
|
115
|
-
if (styleTheme === 'other_avatar_impact' || styleTheme === 'other_avatar') {
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
return false;
|
|
119
|
-
};
|
|
120
|
-
var isShowTitleText = function () {
|
|
121
|
-
if (styleTheme === 'other_avatar_impact' ||
|
|
122
|
-
styleTheme === 'other_avatar' ||
|
|
123
|
-
styleTheme === 'other') {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
return false;
|
|
127
|
-
};
|
|
128
|
-
var checkTextColorTheme = function () {
|
|
129
|
-
switch (colorTheme) {
|
|
130
|
-
case 'grey': {
|
|
131
|
-
return 'sysTextPrimary';
|
|
132
|
-
}
|
|
133
|
-
case 'brand_primary': {
|
|
134
|
-
return 'usrTextBrandPrimary';
|
|
135
|
-
}
|
|
136
|
-
case 'translucent_white': {
|
|
137
|
-
return 'sysTextBlack';
|
|
138
|
-
}
|
|
139
|
-
case 'translucent_black': {
|
|
140
|
-
return 'sysTextWhite';
|
|
141
|
-
}
|
|
142
|
-
default: {
|
|
143
|
-
return 'sysTextPrimary';
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
var isLeftSpacingChecker = function () {
|
|
148
|
-
if (styleTheme === 'other_avatar_impact' ||
|
|
149
|
-
styleTheme === 'other_avatar' ||
|
|
150
|
-
styleTheme === 'other_avatar_sub') {
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
return false;
|
|
154
|
-
};
|
|
155
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(S_ChatBubbleListItem, __assign({ "x-pds-name": "ChatBubbleListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isMe: isMe }, { children: [isLeftSpacingChecker() ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isShowProfileImage() ? ((0, jsx_runtime_1.jsx)(S_ImageViewWrapper, __assign({ isOtherAvatarImpact: styleTheme === 'other_avatar_impact', colorTheme: colorTheme }, { children: (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { shapeType: "circular", ratio: "1_1", scaleType: "cover", src: imageSrc, width: styleTheme === 'other_avatar_impact' ? 36 : 38 }) }))) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_g", spacingType: "width" })) })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [isShowTitleText() && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, styleTheme: "caption1Bold", colorTheme: colorTheme && checkTextColorTheme() }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" })] })), (0, jsx_runtime_1.jsxs)(S_ChatBubbleBox, { children: [(0, jsx_runtime_1.jsxs)(S_ChatBubbleWrapper, __assign({ isMe: isMe }, { children: [timeMode === 'use' && timeText && isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(ChatBubble_1.default, __assign({ colorTheme: colorTheme, tailType: chatBubbleTailType[styleTheme] }, { children: children })), timeMode === 'use' && timeText && !isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" })] }))] })), hoverMode === 'use' && !isMe && ((0, jsx_runtime_1.jsx)(S_SeeMoreButton, __assign({ isContextMenuOpen: isContextMenuOpen, hoverMode: hoverMode, ref: contextMenuRef }, { children: (0, jsx_runtime_1.jsx)(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 }) })))] })] }), (0, jsx_runtime_1.jsx)(Popup_1.PopupProvider, { children: (0, jsx_runtime_1.jsx)(Popup_1.Popup, __assign({ targetRef: contextMenuRef, isOpen: isContextMenuOpen, placement: "top-end", wrapperHeight: rect === null || rect === void 0 ? void 0 : rect.height, onClickOutside: function () { return setIsContextMenuOpen(false); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, { children: contextMenuOptionArray === null || contextMenuOptionArray === void 0 ? void 0 : contextMenuOptionArray.map(function (el) { return ((0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, onClick: handleContextMenuItemClick, state: contextMenuState }, el.value)); }) }) })) })] })) }));
|
|
142
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(S_ChatBubbleListItem, __assign({ "x-pds-name": "ChatBubbleListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isMe: isMe }, { children: [hasLeftSpacing ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isProfileImageShow ? ((0, jsx_runtime_1.jsx)(S_ImageViewWrapper, __assign({ isOtherAvatarImpact: styleTheme === 'other_avatar_impact', colorTheme: colorTheme }, { children: (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { shapeType: "circular", ratio: "1_1", scaleType: "cover", src: imageSrc, width: styleTheme === 'other_avatar_impact' ? 36 : 38 }) }))) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_g", spacingType: "width" })) })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [isTitleTextShow && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, styleTheme: "caption1Bold", colorTheme: titleTextColorTheme }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" })] })), (0, jsx_runtime_1.jsxs)(S_ChatBubbleBox, { children: [(0, jsx_runtime_1.jsxs)(S_ChatBubbleWrapper, __assign({ isMe: isMe }, { children: [isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [countMode === 'use' && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: countText, styleTheme: "caption2Regular", colorTheme: countTextColorTheme })), timeMode === 'use' && timeText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" })] }))] }))), (0, jsx_runtime_1.jsx)(ChatBubble_1.default, __assign({ colorTheme: colorTheme, tailType: chatBubbleTailType[styleTheme] }, { children: children })), !isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [countMode === 'use' && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: countText, styleTheme: "caption2Regular", colorTheme: countTextColorTheme })), timeMode === 'use' && timeText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" })] }))] })))] })), hoverMode === 'use' && !isMe && ((0, jsx_runtime_1.jsx)(S_SeeMoreButton, __assign({ isContextMenuOpen: isContextMenuOpen, hoverMode: hoverMode, ref: contextMenuRef }, { children: (0, jsx_runtime_1.jsx)(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 }) })))] })] }), (0, jsx_runtime_1.jsx)(Popup_1.PopupProvider, { children: (0, jsx_runtime_1.jsx)(Popup_1.Popup, __assign({ targetRef: contextMenuRef, isOpen: isContextMenuOpen, placement: "top-end", wrapperHeight: rect === null || rect === void 0 ? void 0 : rect.height, onClickOutside: function () { return setIsContextMenuOpen(false); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, { children: contextMenuOptionArray === null || contextMenuOptionArray === void 0 ? void 0 : contextMenuOptionArray.map(function (el) { return ((0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, onClick: handleContextMenuItemClick, state: contextMenuState }, el.value)); }) }) })) })] })) }));
|
|
156
143
|
}
|
|
157
144
|
var MyChatBubbleListItem = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
|
158
145
|
var theme = _a.theme;
|
|
@@ -184,7 +171,16 @@ var S_ChatBubbleWrapper = styled_components_1.default.div(templateObject_9 || (t
|
|
|
184
171
|
var isMe = _a.isMe;
|
|
185
172
|
return isMe && MyChatBubble;
|
|
186
173
|
});
|
|
187
|
-
var S_TimeWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-self: flex-end;\n display: flex;\n"], ["\n align-self: flex-end;\n display: flex;\n"])))
|
|
174
|
+
var S_TimeWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: ", ";\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: ", ";\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
175
|
+
var isMe = _a.isMe;
|
|
176
|
+
return isMe && 'flex-end';
|
|
177
|
+
}, function (_a) {
|
|
178
|
+
var isMe = _a.isMe, theme = _a.theme;
|
|
179
|
+
return !isMe && theme.spacing.spacingA;
|
|
180
|
+
}, function (_a) {
|
|
181
|
+
var isMe = _a.isMe, theme = _a.theme;
|
|
182
|
+
return isMe && theme.spacing.spacingA;
|
|
183
|
+
});
|
|
188
184
|
var S_SeeMoreButton = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n height: 24px;\n justify-content: right;\n margin-top: ", ";\n min-width: 48px;\n opacity: ", ";\n padding-right: ", ";\n position: relative;\n width: 48px;\n\n ", ":hover & {\n opacity: ", ";\n }\n"], ["\n box-sizing: border-box;\n display: flex;\n height: 24px;\n justify-content: right;\n margin-top: ", ";\n min-width: 48px;\n opacity: ", ";\n padding-right: ", ";\n position: relative;\n width: 48px;\n\n ", ":hover & {\n opacity: ", ";\n }\n"])), function (_a) {
|
|
189
185
|
var theme = _a.theme;
|
|
190
186
|
return theme.spacing.spacingB;
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
hoverMode?: 'none' | 'use';
|
|
9
9
|
contextMenuOptionArray?: PDSValueOption[];
|
|
10
10
|
contextMenuState?: 'normal' | 'disabled';
|
|
11
|
-
colorTheme?: 'seller' | 'seller_transparent' | 'subscriber' | 'subscriber_transparent' | 'secondary_transparent_grey' | 'white_transparent_grey';
|
|
11
|
+
colorTheme?: 'seller' | 'seller_transparent' | 'subscriber' | 'subscriber_transparent' | 'secondary_transparent_grey' | 'white_transparent_grey' | 'brand_primary_solid' | 'brand_primary_translucent' | 'secondary_transparent' | 'white_transparent';
|
|
12
12
|
onClickContextMenuItem?: (option: PDSValueOption) => void;
|
|
13
13
|
};
|
|
14
14
|
declare function BasicChatListItem({ titleText, contentText, leftImageMode, imageSrc, hoverMode, contextMenuOptionArray, onClickContextMenuItem, contextMenuState, colorTheme }: Props): JSX.Element;
|
|
@@ -33,7 +33,11 @@ var titleTextColors = {
|
|
|
33
33
|
subscriber: 'sysTextSecondary',
|
|
34
34
|
subscriber_transparent: 'sysTextWhite',
|
|
35
35
|
secondary_transparent_grey: 'sysTextSecondary',
|
|
36
|
-
white_transparent_grey: 'sysTextWhite'
|
|
36
|
+
white_transparent_grey: 'sysTextWhite',
|
|
37
|
+
brand_primary_solid: 'usrTextBrandPrimary',
|
|
38
|
+
brand_primary_translucent: 'usrTextBrandPrimary',
|
|
39
|
+
secondary_transparent: 'sysTextSecondary',
|
|
40
|
+
white_transparent: 'sysTextWhite'
|
|
37
41
|
};
|
|
38
42
|
var backgroundColorTheme = {
|
|
39
43
|
seller: 'ui_cpnt_list_base_area_seller',
|
|
@@ -41,10 +45,14 @@ var backgroundColorTheme = {
|
|
|
41
45
|
subscriber: 'ui_cpnt_list_base_area',
|
|
42
46
|
subscriber_transparent: 'ui_cpnt_list_base_area_transparent',
|
|
43
47
|
secondary_transparent_grey: 'ui_cpnt_list_base_area',
|
|
44
|
-
white_transparent_grey: 'ui_cpnt_list_base_area_transparent'
|
|
48
|
+
white_transparent_grey: 'ui_cpnt_list_base_area_transparent',
|
|
49
|
+
brand_primary_solid: 'ui_cpnt_list_base_area_seller',
|
|
50
|
+
brand_primary_translucent: 'ui_cpnt_list_base_area_transparent_seller',
|
|
51
|
+
secondary_transparent: 'ui_cpnt_list_base_area',
|
|
52
|
+
white_transparent: 'ui_cpnt_list_base_area_transparent'
|
|
45
53
|
};
|
|
46
54
|
function BasicChatListItem(_a) {
|
|
47
|
-
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 ? '
|
|
55
|
+
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 ? 'secondary_transparent' : _e;
|
|
48
56
|
var _f = (0, react_1.useState)(false), isContextMenuOpen = _f[0], setIsContextMenuOpen = _f[1];
|
|
49
57
|
var contextMenuRef = (0, react_1.useRef)(null);
|
|
50
58
|
var chatBody = document.querySelector('#chatMessageBox');
|
|
@@ -96,6 +104,7 @@ function BasicChatListItem(_a) {
|
|
|
96
104
|
var contentTextColorOverride;
|
|
97
105
|
var iconColorKey;
|
|
98
106
|
switch (colorTheme) {
|
|
107
|
+
case 'white_transparent':
|
|
99
108
|
case 'subscriber_transparent': {
|
|
100
109
|
contentTextColorTheme = 'sysTextWhite';
|
|
101
110
|
iconColorKey = 'ui_cpnt_button_icon_white';
|
|
@@ -9,10 +9,12 @@ export type ChatBubbleListItemProps = {
|
|
|
9
9
|
colorTheme?: ColorThemeType;
|
|
10
10
|
timeMode?: 'none' | 'use';
|
|
11
11
|
timeText?: PDSTextType;
|
|
12
|
+
countMode?: 'none' | 'use';
|
|
13
|
+
countText?: PDSTextType;
|
|
12
14
|
contextMenuOptionArray?: PDSValueOption[];
|
|
13
15
|
contextMenuState?: 'normal' | 'disabled';
|
|
14
16
|
children?: React.ReactNode;
|
|
15
17
|
onClickContextMenuItem?: (option: PDSValueOption) => void;
|
|
16
18
|
};
|
|
17
|
-
declare function ChatBubbleListItem({ titleText, imageSrc, hoverMode, styleTheme, colorTheme, timeMode, timeText, contextMenuOptionArray, contextMenuState, children, onClickContextMenuItem }: ChatBubbleListItemProps): JSX.Element;
|
|
19
|
+
declare function ChatBubbleListItem({ titleText, imageSrc, hoverMode, styleTheme, colorTheme, timeMode, timeText, countMode, countText, contextMenuOptionArray, contextMenuState, children, onClickContextMenuItem }: ChatBubbleListItemProps): JSX.Element;
|
|
18
20
|
export default ChatBubbleListItem;
|
|
@@ -67,12 +67,40 @@ var profileImageBorderColorTheme = {
|
|
|
67
67
|
translucent_black: 'ui_avatar_border_translucent_black'
|
|
68
68
|
};
|
|
69
69
|
function ChatBubbleListItem(_a) {
|
|
70
|
-
var titleText = _a.titleText, imageSrc = _a.imageSrc, _b = _a.hoverMode, hoverMode = _b === void 0 ? 'use' : _b, styleTheme = _a.styleTheme, _c = _a.colorTheme, colorTheme = _c === void 0 ? 'grey' : _c, _d = _a.timeMode, timeMode = _d === void 0 ? 'use' : _d, timeText = _a.timeText, contextMenuOptionArray = _a.contextMenuOptionArray,
|
|
71
|
-
var
|
|
72
|
-
var _f = (0, react_1.useState)(false), isContextMenuOpen = _f[0], setIsContextMenuOpen = _f[1];
|
|
70
|
+
var titleText = _a.titleText, imageSrc = _a.imageSrc, _b = _a.hoverMode, hoverMode = _b === void 0 ? 'use' : _b, styleTheme = _a.styleTheme, _c = _a.colorTheme, colorTheme = _c === void 0 ? 'grey' : _c, _d = _a.timeMode, timeMode = _d === void 0 ? 'use' : _d, timeText = _a.timeText, _e = _a.countMode, countMode = _e === void 0 ? 'none' : _e, countText = _a.countText, contextMenuOptionArray = _a.contextMenuOptionArray, _f = _a.contextMenuState, contextMenuState = _f === void 0 ? 'normal' : _f, children = _a.children, onClickContextMenuItem = _a.onClickContextMenuItem;
|
|
71
|
+
var _g = (0, react_1.useState)(false), isContextMenuOpen = _g[0], setIsContextMenuOpen = _g[1];
|
|
73
72
|
var contextMenuRef = (0, react_1.useRef)(null);
|
|
74
73
|
var chatBody = document.querySelector('#chatMessageBox');
|
|
75
74
|
var rect = chatBody === null || chatBody === void 0 ? void 0 : chatBody.getBoundingClientRect();
|
|
75
|
+
var isMe = styleTheme.includes('me');
|
|
76
|
+
var isProfileImageShow = styleTheme === 'other_avatar_impact' || styleTheme === 'other_avatar';
|
|
77
|
+
var isTitleTextShow = styleTheme === 'other_avatar_impact' || styleTheme === 'other_avatar' || styleTheme === 'other';
|
|
78
|
+
var hasLeftSpacing = styleTheme === 'other_avatar_impact' ||
|
|
79
|
+
styleTheme === 'other_avatar' ||
|
|
80
|
+
styleTheme === 'other_avatar_sub';
|
|
81
|
+
var titleTextColorTheme = 'sysTextPrimary';
|
|
82
|
+
var countTextColorTheme = 'sysTextBrandPrimary';
|
|
83
|
+
switch (colorTheme) {
|
|
84
|
+
case 'grey': {
|
|
85
|
+
titleTextColorTheme = 'sysTextPrimary';
|
|
86
|
+
countTextColorTheme = 'sysTextBrandPrimary';
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case 'brand_primary': {
|
|
90
|
+
titleTextColorTheme = 'usrTextBrandPrimary';
|
|
91
|
+
countTextColorTheme = 'sysTextBrandPrimary';
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case 'translucent_white': {
|
|
95
|
+
titleTextColorTheme = 'sysTextBlack';
|
|
96
|
+
countTextColorTheme = 'sysTextTertiary';
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'translucent_black': {
|
|
100
|
+
titleTextColorTheme = 'sysTextWhite';
|
|
101
|
+
countTextColorTheme = 'sysTextTertiary';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
76
104
|
/**
|
|
77
105
|
* @when contextMenu가 열려 있을 때
|
|
78
106
|
* @expected ChatList body의 스크롤을 숨기고, contextMenu의 외부를 클릭하면 contextMenu가 닫히도록 합니다.
|
|
@@ -113,48 +141,7 @@ function ChatBubbleListItem(_a) {
|
|
|
113
141
|
}
|
|
114
142
|
setIsContextMenuOpen(false);
|
|
115
143
|
};
|
|
116
|
-
|
|
117
|
-
if (styleTheme === 'other_avatar_impact' || styleTheme === 'other_avatar') {
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
return false;
|
|
121
|
-
};
|
|
122
|
-
var isShowTitleText = function () {
|
|
123
|
-
if (styleTheme === 'other_avatar_impact' ||
|
|
124
|
-
styleTheme === 'other_avatar' ||
|
|
125
|
-
styleTheme === 'other') {
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
return false;
|
|
129
|
-
};
|
|
130
|
-
var checkTextColorTheme = function () {
|
|
131
|
-
switch (colorTheme) {
|
|
132
|
-
case 'grey': {
|
|
133
|
-
return 'sysTextPrimary';
|
|
134
|
-
}
|
|
135
|
-
case 'brand_primary': {
|
|
136
|
-
return 'usrTextBrandPrimary';
|
|
137
|
-
}
|
|
138
|
-
case 'translucent_white': {
|
|
139
|
-
return 'sysTextBlack';
|
|
140
|
-
}
|
|
141
|
-
case 'translucent_black': {
|
|
142
|
-
return 'sysTextWhite';
|
|
143
|
-
}
|
|
144
|
-
default: {
|
|
145
|
-
return 'sysTextPrimary';
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
var isLeftSpacingChecker = function () {
|
|
150
|
-
if (styleTheme === 'other_avatar_impact' ||
|
|
151
|
-
styleTheme === 'other_avatar' ||
|
|
152
|
-
styleTheme === 'other_avatar_sub') {
|
|
153
|
-
return true;
|
|
154
|
-
}
|
|
155
|
-
return false;
|
|
156
|
-
};
|
|
157
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(S_ChatBubbleListItem, __assign({ "x-pds-name": "ChatBubbleListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", isMe: isMe }, { children: [isLeftSpacingChecker() ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isShowProfileImage() ? ((0, jsx_runtime_1.jsx)(S_ImageViewWrapper, __assign({ isOtherAvatarImpact: styleTheme === 'other_avatar_impact', colorTheme: colorTheme }, { children: (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { shapeType: "circular", ratio: "1_1", scaleType: "cover", src: imageSrc, width: styleTheme === 'other_avatar_impact' ? 36 : 38 }) }))) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_g", spacingType: "width" })) })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [isShowTitleText() && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, styleTheme: "caption1Bold", colorTheme: colorTheme && checkTextColorTheme() }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" })] })), (0, jsx_runtime_1.jsxs)(S_ChatBubbleBox, { children: [(0, jsx_runtime_1.jsxs)(S_ChatBubbleWrapper, __assign({ isMe: isMe }, { children: [timeMode === 'use' && timeText && isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(ChatBubble_1.default, __assign({ colorTheme: colorTheme, tailType: chatBubbleTailType[styleTheme] }, { children: children })), timeMode === 'use' && timeText && !isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" })] }))] })), hoverMode === 'use' && !isMe && ((0, jsx_runtime_1.jsx)(S_SeeMoreButton, __assign({ isContextMenuOpen: isContextMenuOpen, hoverMode: hoverMode, ref: contextMenuRef }, { children: (0, jsx_runtime_1.jsx)(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 }) })))] })] }), (0, jsx_runtime_1.jsx)(Popup_1.PopupProvider, { children: (0, jsx_runtime_1.jsx)(Popup_1.Popup, __assign({ targetRef: contextMenuRef, isOpen: isContextMenuOpen, placement: "top-end", wrapperHeight: rect === null || rect === void 0 ? void 0 : rect.height, onClickOutside: function () { return setIsContextMenuOpen(false); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, { children: contextMenuOptionArray === null || contextMenuOptionArray === void 0 ? void 0 : contextMenuOptionArray.map(function (el) { return ((0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, onClick: handleContextMenuItemClick, state: contextMenuState }, el.value)); }) }) })) })] })) }));
|
|
144
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(S_ChatBubbleListItem, __assign({ "x-pds-name": "ChatBubbleListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", isMe: isMe }, { children: [hasLeftSpacing ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isProfileImageShow ? ((0, jsx_runtime_1.jsx)(S_ImageViewWrapper, __assign({ isOtherAvatarImpact: styleTheme === 'other_avatar_impact', colorTheme: colorTheme }, { children: (0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { shapeType: "circular", ratio: "1_1", scaleType: "cover", src: imageSrc, width: styleTheme === 'other_avatar_impact' ? 36 : 38 }) }))) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_g", spacingType: "width" })) })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })), (0, jsx_runtime_1.jsxs)(S_RightBox, { children: [isTitleTextShow && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: titleText, styleTheme: "caption1Bold", colorTheme: titleTextColorTheme }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" })] })), (0, jsx_runtime_1.jsxs)(S_ChatBubbleBox, { children: [(0, jsx_runtime_1.jsxs)(S_ChatBubbleWrapper, __assign({ isMe: isMe }, { children: [isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [countMode === 'use' && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: countText, styleTheme: "caption2Regular", colorTheme: countTextColorTheme })), timeMode === 'use' && timeText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" })] }))] }))), (0, jsx_runtime_1.jsx)(ChatBubble_1.default, __assign({ colorTheme: colorTheme, tailType: chatBubbleTailType[styleTheme] }, { children: children })), !isMe && ((0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [countMode === 'use' && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: countText, styleTheme: "caption2Regular", colorTheme: countTextColorTheme })), timeMode === 'use' && timeText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a" }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" })] }))] })))] })), hoverMode === 'use' && !isMe && ((0, jsx_runtime_1.jsx)(S_SeeMoreButton, __assign({ isContextMenuOpen: isContextMenuOpen, hoverMode: hoverMode, ref: contextMenuRef }, { children: (0, jsx_runtime_1.jsx)(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 }) })))] })] }), (0, jsx_runtime_1.jsx)(Popup_1.PopupProvider, { children: (0, jsx_runtime_1.jsx)(Popup_1.Popup, __assign({ targetRef: contextMenuRef, isOpen: isContextMenuOpen, placement: "top-end", wrapperHeight: rect === null || rect === void 0 ? void 0 : rect.height, onClickOutside: function () { return setIsContextMenuOpen(false); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, { children: contextMenuOptionArray === null || contextMenuOptionArray === void 0 ? void 0 : contextMenuOptionArray.map(function (el) { return ((0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, onClick: handleContextMenuItemClick, state: contextMenuState }, el.value)); }) }) })) })] })) }));
|
|
158
145
|
}
|
|
159
146
|
var MyChatBubbleListItem = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
|
160
147
|
var theme = _a.theme;
|
|
@@ -186,7 +173,16 @@ var S_ChatBubbleWrapper = styled_components_1.default.div(templateObject_9 || (t
|
|
|
186
173
|
var isMe = _a.isMe;
|
|
187
174
|
return isMe && MyChatBubble;
|
|
188
175
|
});
|
|
189
|
-
var S_TimeWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-self: flex-end;\n display: flex;\n"], ["\n align-self: flex-end;\n display: flex;\n"])))
|
|
176
|
+
var S_TimeWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: ", ";\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: ", ";\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
177
|
+
var isMe = _a.isMe;
|
|
178
|
+
return isMe && 'flex-end';
|
|
179
|
+
}, function (_a) {
|
|
180
|
+
var isMe = _a.isMe, theme = _a.theme;
|
|
181
|
+
return !isMe && theme.spacing.spacingA;
|
|
182
|
+
}, function (_a) {
|
|
183
|
+
var isMe = _a.isMe, theme = _a.theme;
|
|
184
|
+
return isMe && theme.spacing.spacingA;
|
|
185
|
+
});
|
|
190
186
|
var S_SeeMoreButton = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n height: 24px;\n justify-content: right;\n margin-top: ", ";\n min-width: 48px;\n opacity: ", ";\n padding-right: ", ";\n position: relative;\n width: 48px;\n\n ", ":hover & {\n opacity: ", ";\n }\n"], ["\n box-sizing: border-box;\n display: flex;\n height: 24px;\n justify-content: right;\n margin-top: ", ";\n min-width: 48px;\n opacity: ", ";\n padding-right: ", ";\n position: relative;\n width: 48px;\n\n ", ":hover & {\n opacity: ", ";\n }\n"])), function (_a) {
|
|
191
187
|
var theme = _a.theme;
|
|
192
188
|
return theme.spacing.spacingB;
|
package/package.json
CHANGED
package/release-note.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# PDS-DEV-KIT-WEB Release Notes
|
|
2
|
-
## [v2.2.
|
|
3
|
-
##
|
|
2
|
+
## [v2.2.23]
|
|
3
|
+
## daily|https://design.storybook.publ.biz/
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* fontFamily: google font는 모두 따음표 추가
|
|
5
|
+
### Component
|
|
6
|
+
* Icon
|
|
7
|
+
* ic_chapter line 추가
|