pds-dev-kit-web 2.2.257 → 2.2.259

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 (35) hide show
  1. package/dist/src/common/services/i18n/resources/en.json +2 -1
  2. package/dist/src/common/services/i18n/resources/es.json +2 -1
  3. package/dist/src/common/services/i18n/resources/fil.json +2 -1
  4. package/dist/src/common/services/i18n/resources/index.d.ts +7 -0
  5. package/dist/src/common/services/i18n/resources/ja.json +2 -1
  6. package/dist/src/common/services/i18n/resources/ko.json +2 -1
  7. package/dist/src/common/services/i18n/resources/zh-cn.json +2 -1
  8. package/dist/src/common/services/i18n/resources/zh-tw.json +2 -1
  9. package/dist/src/common/styles/colorSet/UIColor.json +6 -1
  10. package/dist/src/common/styles/colorSet/index.d.ts +131 -126
  11. package/dist/src/common/styles/colorSet/index.js +2 -2
  12. package/dist/src/common/styles/colorSet/ui-type.d.ts +5 -0
  13. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +12 -1
  14. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +12 -7
  15. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionBubble.d.ts +11 -0
  16. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionBubble.js +86 -0
  17. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionRow.d.ts +18 -0
  18. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionRow.js +133 -0
  19. package/dist/src/desktop/components/ChatBubbleListItem/components/index.d.ts +1 -0
  20. package/dist/src/desktop/components/ChatBubbleListItem/components/index.js +8 -0
  21. package/dist/src/desktop/components/TextButton/TextButton.d.ts +3 -2
  22. package/dist/src/desktop/components/TextButton/TextButton.js +27 -19
  23. package/dist/src/hybrid/components/LottieIcon/LottieIcon.js +1 -1
  24. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +12 -1
  25. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +12 -7
  26. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionBubble.d.ts +11 -0
  27. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionBubble.js +86 -0
  28. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionRow.d.ts +18 -0
  29. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionRow.js +126 -0
  30. package/dist/src/mobile/components/ChatBubbleListItem/components/index.d.ts +1 -0
  31. package/dist/src/mobile/components/ChatBubbleListItem/components/index.js +8 -0
  32. package/dist/src/mobile/components/TextButton/TextButton.d.ts +3 -2
  33. package/dist/src/mobile/components/TextButton/TextButton.js +27 -19
  34. package/package.json +1 -1
  35. package/release-note.md +3 -2
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ type ReactionType = 'heart' | 'like' | 'confetti';
3
+ type ReactionValueOption = {
4
+ type: ReactionType;
5
+ count: number;
6
+ };
7
+ type ReactionArrayType = ReactionValueOption[];
8
+ type Props = {
9
+ isMe: boolean;
10
+ downloadIBtnMode: 'use' | 'none';
11
+ reactionBtnMode: 'use' | 'none';
12
+ reactionBtnText: string;
13
+ reactionArray?: ReactionArrayType;
14
+ reactionBubblePosition: 'top' | 'bottom';
15
+ onClickReactionBtn?: (type: ReactionType) => void;
16
+ };
17
+ declare function ReactionRow({ isMe, reactionBtnMode, downloadIBtnMode, reactionBtnText, reactionArray, reactionBubblePosition, onClickReactionBtn }: Props): JSX.Element;
18
+ export default ReactionRow;
@@ -0,0 +1,133 @@
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 __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ var jsx_runtime_1 = require("react/jsx-runtime");
22
+ var react_1 = require("react");
23
+ var TextLabel_1 = require("../../../components/TextLabel");
24
+ var components_1 = require("../../../../hybrid/components");
25
+ var styled_components_1 = __importDefault(require("styled-components"));
26
+ var ReactionBubble_1 = __importDefault(require("./ReactionBubble"));
27
+ function ReactionRow(_a) {
28
+ var isMe = _a.isMe, reactionBtnMode = _a.reactionBtnMode, downloadIBtnMode = _a.downloadIBtnMode, reactionBtnText = _a.reactionBtnText, reactionArray = _a.reactionArray, reactionBubblePosition = _a.reactionBubblePosition, onClickReactionBtn = _a.onClickReactionBtn;
29
+ var _b = (0, react_1.useState)(false), isOpenReactionBubble = _b[0], setIsOpenReactionBubble = _b[1];
30
+ var bubbleRef = (0, react_1.useRef)(null);
31
+ var buttonRef = (0, react_1.useRef)(null);
32
+ /**
33
+ * @when 컴포넌트 렌더링 시
34
+ * @expected ReactionBubble의 외부를 클릭하면 ReactionBubble가 닫히도록 클릭 이벤트를 등록합니다.
35
+ * @clear document의 클릭 이벤트를 제거합니다.
36
+ */
37
+ (0, react_1.useEffect)(function () {
38
+ function handleClickOutside(event) {
39
+ var _a, _b;
40
+ event.stopPropagation();
41
+ if (event.target instanceof Node &&
42
+ (((_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) || ((_b = bubbleRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))))
43
+ return;
44
+ if (isOpenReactionBubble) {
45
+ setIsOpenReactionBubble(false);
46
+ }
47
+ }
48
+ document.addEventListener('mousedown', handleClickOutside);
49
+ return function () {
50
+ document.removeEventListener('mousedown', handleClickOutside);
51
+ };
52
+ }, [isOpenReactionBubble]);
53
+ var defaultReactions = [
54
+ { iconName: 'ic_lottie_heart', type: 'heart' },
55
+ { iconName: 'ic_lottie_thumb_up', type: 'like' },
56
+ { iconName: 'ic_lottie_confetti', type: 'confetti' }
57
+ ];
58
+ var handleOpenReactionBubble = function () {
59
+ if (!isOpenReactionBubble) {
60
+ setIsOpenReactionBubble(true);
61
+ return;
62
+ }
63
+ if (isOpenReactionBubble) {
64
+ setIsOpenReactionBubble(false);
65
+ return;
66
+ }
67
+ };
68
+ return ((0, jsx_runtime_1.jsxs)(S_Wrapper, { children: [(0, jsx_runtime_1.jsxs)(S_ReactionWrapper, __assign({ isMe: isMe, downloadIBtnMode: downloadIBtnMode === 'use' }, { children: [(0, jsx_runtime_1.jsx)(S_ButtonWrapper, __assign({ ref: buttonRef }, { children: !isMe && reactionBtnMode === 'use' && ((0, jsx_runtime_1.jsxs)(S_ReactionButton, __assign({ onClick: handleOpenReactionBubble }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: "ic_plus_circle", size: 12 }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: reactionBtnText, singleLineMode: "use", styleTheme: "caption2Bold" })] }))) })), reactionArray && ((0, jsx_runtime_1.jsx)(S_ReactionBadgeWrapper, { children: reactionArray.map(function (reaction, index) {
69
+ var iconName = function () {
70
+ switch (reaction.type) {
71
+ case 'heart':
72
+ return 'ic_lottie_heart';
73
+ case 'like':
74
+ return 'ic_lottie_thumb_up';
75
+ case 'confetti':
76
+ return 'ic_lottie_confetti';
77
+ }
78
+ };
79
+ return ((0, jsx_runtime_1.jsx)(S_ReactionBadge, __assign({ type: reaction.type }, { children: (0, jsx_runtime_1.jsx)(components_1.LottieIcon, { iconName: iconName(), size: 16, autoplayMode: "none", loopMode: "none" }) }), index));
80
+ }) }))] })), (0, jsx_runtime_1.jsx)(S_ReactionBubbleWrapper, __assign({ ref: bubbleRef, reactionBubblePosition: reactionBubblePosition }, { children: isOpenReactionBubble && ((0, jsx_runtime_1.jsx)(ReactionBubble_1.default, __assign({ pointingPosition: reactionBubblePosition === 'bottom' ? 'start_top' : 'start_bottom' }, { children: (0, jsx_runtime_1.jsx)(S_ReactionBadgeWrapper, { children: defaultReactions.map(function (reaction, index) { return ((0, jsx_runtime_1.jsx)(S_ReactionBadge, __assign({ type: reaction.type, isButton: true, onClick: function () {
81
+ onClickReactionBtn && onClickReactionBtn(reaction.type);
82
+ setIsOpenReactionBubble(false);
83
+ } }, { children: (0, jsx_runtime_1.jsx)(components_1.LottieIcon, { iconName: reaction.iconName, size: 16, autoplayMode: "none", loopMode: "none" }) }), index)); }) }) }))) }))] }));
84
+ }
85
+ exports.default = ReactionRow;
86
+ var S_Wrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n gap: ", ";\n position: relative;\n"], ["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n gap: ", ";\n position: relative;\n"])), function (_a) {
87
+ var theme = _a.theme;
88
+ return theme.spacing.spacingA;
89
+ });
90
+ var S_ReactionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n justify-content: space-between;\n max-width: -webkit-fill-available;\n padding-right: ", ";\n padding-top: ", ";\n width: 100%;\n"], ["\n display: flex;\n gap: ", ";\n justify-content: space-between;\n max-width: -webkit-fill-available;\n padding-right: ", ";\n padding-top: ", ";\n width: 100%;\n"])), function (_a) {
91
+ var theme = _a.theme;
92
+ return theme.spacing.spacingB;
93
+ }, function (_a) {
94
+ var isMe = _a.isMe, downloadIBtnMode = _a.downloadIBtnMode;
95
+ return !isMe && (downloadIBtnMode ? '40px' : '34px');
96
+ }, function (_a) {
97
+ var theme = _a.theme;
98
+ return theme.spacing.spacingA;
99
+ });
100
+ var S_ButtonWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
101
+ var S_ReactionButton = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: 8px;\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n gap: ", ";\n height: 24px;\n justify-content: center;\n max-width: fit-content;\n padding: 0 ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: 8px;\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n gap: ", ";\n height: 24px;\n justify-content: center;\n max-width: fit-content;\n padding: 0 ", ";\n"])), function (_a) {
102
+ var theme = _a.theme;
103
+ return theme.ui_cpnt_sheet_base_02;
104
+ }, function (_a) {
105
+ var theme = _a.theme;
106
+ return theme.spacing.spacingA;
107
+ }, function (_a) {
108
+ var theme = _a.theme;
109
+ return theme.spacing.spacingB;
110
+ });
111
+ var S_ReactionBadgeWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n"], ["\n display: flex;\n gap: ", ";\n"])), function (_a) {
112
+ var theme = _a.theme;
113
+ return theme.spacing.spacingA;
114
+ });
115
+ var S_ReactionBadge = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: 100%;\n cursor: ", ";\n display: flex;\n height: 24px;\n justify-content: center;\n width: 24px;\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: 100%;\n cursor: ", ";\n display: flex;\n height: 24px;\n justify-content: center;\n width: 24px;\n"])), function (_a) {
116
+ var theme = _a.theme, type = _a.type;
117
+ switch (type) {
118
+ case 'heart':
119
+ return theme.ui_cpnt_message_reaction_base_01;
120
+ case 'like':
121
+ return theme.ui_cpnt_message_reaction_base_02;
122
+ case 'confetti':
123
+ return theme.ui_cpnt_message_reaction_base_03;
124
+ }
125
+ }, function (_a) {
126
+ var isButton = _a.isButton;
127
+ return isButton && 'pointer';
128
+ });
129
+ var S_ReactionBubbleWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n left: 0;\n position: absolute;\n ", "\n z-index: 10;\n"], ["\n left: 0;\n position: absolute;\n ", "\n z-index: 10;\n"])), function (_a) {
130
+ var reactionBubblePosition = _a.reactionBubblePosition;
131
+ return reactionBubblePosition === 'bottom' ? 'top: 28px;' : 'bottom: 24px;';
132
+ });
133
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -0,0 +1 @@
1
+ export { default as ReactionRow } from './ReactionRow';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReactionRow = void 0;
7
+ var ReactionRow_1 = require("./ReactionRow");
8
+ Object.defineProperty(exports, "ReactionRow", { enumerable: true, get: function () { return __importDefault(ReactionRow_1).default; } });
@@ -1,4 +1,4 @@
1
- import type { PDSIconType, PDSTextType } from '../../../common';
1
+ import type { PDSIconType, PDSTextType, UiColors } from '../../../common';
2
2
  import type React from 'react';
3
3
  export type TextButtonProps = {
4
4
  text?: PDSTextType;
@@ -11,8 +11,9 @@ export type TextButtonProps = {
11
11
  iconFillType?: 'fill' | 'line';
12
12
  iconName?: PDSIconType;
13
13
  colorTheme?: 'none' | 'red' | 'grey_01' | 'grey2' | 'grey3' | 'white' | 'white2';
14
+ overrideColorKey?: UiColors;
14
15
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
15
16
  onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
16
17
  };
17
- declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, iconMode, iconFillType, iconName, colorTheme, onClick, onKeyDown, ...rest }: TextButtonProps): JSX.Element;
18
+ declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, iconMode, iconFillType, iconName, colorTheme, overrideColorKey, onClick, onKeyDown, ...rest }: TextButtonProps): JSX.Element;
18
19
  export default TextButton;
@@ -71,14 +71,16 @@ var textColor = {
71
71
  white: 'sysTextWhite',
72
72
  white2: 'sysTextWhite'
73
73
  };
74
- var iconColor = {
75
- none: 'ui_cpnt_button_icon_primary',
76
- red: 'ui_cpnt_button_icon_error',
77
- grey_01: 'ui_cpnt_button_icon_enabled',
78
- grey2: 'ui_cpnt_button_icon_default',
79
- grey3: 'ui_141',
80
- white: 'ui_cpnt_sidebar_icon_01',
81
- white2: 'ui_cpnt_sidebar_icon_01'
74
+ var getIconColor = function (overrideColorKey) {
75
+ return ({
76
+ none: overrideColorKey ? overrideColorKey : 'ui_cpnt_button_icon_primary',
77
+ red: overrideColorKey ? overrideColorKey : 'ui_cpnt_button_icon_error',
78
+ grey_01: overrideColorKey ? overrideColorKey : 'ui_cpnt_button_icon_enabled',
79
+ grey2: overrideColorKey ? overrideColorKey : 'ui_cpnt_button_icon_default',
80
+ grey3: overrideColorKey ? overrideColorKey : 'ui_141',
81
+ white: overrideColorKey ? overrideColorKey : 'ui_cpnt_sidebar_icon_01',
82
+ white2: overrideColorKey ? overrideColorKey : 'ui_cpnt_sidebar_icon_01'
83
+ });
82
84
  };
83
85
  var textDisabledColor = {
84
86
  none: 'sysTextTertiary',
@@ -89,14 +91,16 @@ var textDisabledColor = {
89
91
  white: 'sysTextTertiary',
90
92
  white2: 'sysTextTertiary'
91
93
  };
92
- var overrideTextColor = {
93
- none: undefined,
94
- red: undefined,
95
- grey_01: undefined,
96
- grey2: undefined,
97
- grey3: 'ui_141',
98
- white: undefined,
99
- white2: undefined
94
+ var getOverrideTextColor = function (overrideColorKey) {
95
+ return ({
96
+ none: overrideColorKey,
97
+ red: overrideColorKey,
98
+ grey_01: overrideColorKey,
99
+ grey2: overrideColorKey,
100
+ grey3: overrideColorKey ? overrideColorKey : 'ui_141',
101
+ white: overrideColorKey,
102
+ white2: overrideColorKey
103
+ });
100
104
  };
101
105
  var overrideTextDisabledColor = {
102
106
  none: undefined,
@@ -126,7 +130,7 @@ var backgroundPressedColor = {
126
130
  white2: 'ui_cpnt_textbutton_white_variation_base_pressed'
127
131
  };
128
132
  function TextButton(_a) {
129
- var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, fontWeight = _a.fontWeight, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.iconMode, iconMode = _f === void 0 ? 'none' : _f, _g = _a.iconFillType, iconFillType = _g === void 0 ? 'line' : _g, iconName = _a.iconName, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, onClick = _a.onClick, onKeyDown = _a.onKeyDown, rest = __rest(_a, ["text", "size", "responsiveMode", "fontWeight", "type", "state", "iconMode", "iconFillType", "iconName", "colorTheme", "onClick", "onKeyDown"]);
133
+ var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, fontWeight = _a.fontWeight, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.iconMode, iconMode = _f === void 0 ? 'none' : _f, _g = _a.iconFillType, iconFillType = _g === void 0 ? 'line' : _g, iconName = _a.iconName, _h = _a.colorTheme, colorTheme = _h === void 0 ? 'none' : _h, overrideColorKey = _a.overrideColorKey, onClick = _a.onClick, onKeyDown = _a.onKeyDown, rest = __rest(_a, ["text", "size", "responsiveMode", "fontWeight", "type", "state", "iconMode", "iconFillType", "iconName", "colorTheme", "overrideColorKey", "onClick", "onKeyDown"]);
130
134
  var buttonRef = (0, react_1.useRef)(null);
131
135
  /**
132
136
  * @when keydown 이벤트가 있을 때만
@@ -144,9 +148,13 @@ function TextButton(_a) {
144
148
  onClick(e);
145
149
  }
146
150
  };
147
- return ((0, jsx_runtime_1.jsxs)(S_Button, __assign({ ref: buttonRef, "x-pds-name": "TextButton", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, rest, { size: size, responsiveMode: responsiveMode, onClick: handleClick, onKeyDown: onKeyDown, type: type, fontWeight: fontWeight, disabled: state === 'disabled', state: state, hoverColor: backgroundHoverColor[colorTheme], pressedColor: backgroundPressedColor[colorTheme] }, { children: [size !== 'xsmall' && iconMode === 'left' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: state === 'disabled' ? 'ui_cpnt_button_text_disabled' : iconColor[colorTheme], fillType: iconFillType }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? textDisabledColor[colorTheme] : textColor[colorTheme], colorOverride: state === 'disabled'
151
+ return ((0, jsx_runtime_1.jsxs)(S_Button, __assign({ ref: buttonRef, "x-pds-name": "TextButton", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, rest, { size: size, responsiveMode: responsiveMode, onClick: handleClick, onKeyDown: onKeyDown, type: type, fontWeight: fontWeight, disabled: state === 'disabled', state: state, hoverColor: backgroundHoverColor[colorTheme], pressedColor: backgroundPressedColor[colorTheme] }, { children: [size !== 'xsmall' && iconMode === 'left' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: state === 'disabled'
152
+ ? 'ui_cpnt_button_text_disabled'
153
+ : getIconColor(overrideColorKey)[colorTheme], fillType: iconFillType }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? textDisabledColor[colorTheme] : textColor[colorTheme], colorOverride: state === 'disabled'
148
154
  ? overrideTextDisabledColor[colorTheme]
149
- : overrideTextColor[colorTheme], singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }), size !== 'xsmall' && iconMode === 'right' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }), (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: state === 'disabled' ? 'ui_cpnt_button_text_disabled' : iconColor[colorTheme], fillType: iconFillType })] }))] })));
155
+ : getOverrideTextColor(overrideColorKey)[colorTheme], singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }), size !== 'xsmall' && iconMode === 'right' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: size === 'large' || size === 'rlarge' ? 'spacing_b' : 'spacing_a', spacingType: "width" }), (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'large' || size === 'rlarge' ? 20 : 16, colorKey: state === 'disabled'
156
+ ? 'ui_cpnt_button_text_disabled'
157
+ : getIconColor(overrideColorKey)[colorTheme], fillType: iconFillType })] }))] })));
150
158
  }
151
159
  var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 14px;\n height: 48px;\n\n ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"], ["\n border-radius: 14px;\n height: 48px;\n\n ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"])), function (_a) {
152
160
  var size = _a.size;
@@ -16,7 +16,7 @@ var LottieIcon = function (_a) {
16
16
  var animationData = lotties_1.default[iconName];
17
17
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(S_Lottie, { "x-pds-name": "LottieIcon", "x-pds-element-type": "component", "x-pds-device-type": "hybrid", animationData: animationData, lottieRef: lottieRef, autoplay: autoplayMode === 'use' ? true : false, loop: loopMode === 'use' ? true : false, "$size": size, onComplete: onComplete }) }));
18
18
  };
19
- var S_Lottie = (0, styled_components_1.default)(lottie_react_1.default)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n min-height: ", ";\n min-width: ", ";\n width: ", ";\n"], ["\n height: ", ";\n min-height: ", ";\n min-width: ", ";\n width: ", ";\n"])), function (_a) {
19
+ var S_Lottie = (0, styled_components_1.default)(lottie_react_1.default)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: ", ";\n justify-content: center;\n min-height: ", ";\n min-width: ", ";\n width: ", ";\n"], ["\n align-items: center;\n display: flex;\n height: ", ";\n justify-content: center;\n min-height: ", ";\n min-width: ", ";\n width: ", ";\n"])), function (_a) {
20
20
  var $size = _a.$size;
21
21
  return "".concat($size, "px");
22
22
  }, function (_a) {
@@ -1,6 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import type { PDSTextType, PDSValueOption } from '../../../common';
3
3
  type ColorThemeType = 'grey' | 'brand_primary' | 'translucent_white' | 'translucent_black' | 'transparent';
4
+ type ReactionType = 'heart' | 'like' | 'confetti';
5
+ type ReactionValueOption = {
6
+ type: ReactionType;
7
+ count: number;
8
+ };
9
+ type ReactionArrayType = ReactionValueOption[];
4
10
  export type ChatBubbleListItemProps = {
5
11
  titleText?: PDSTextType;
6
12
  imageSrc?: string;
@@ -14,8 +20,13 @@ export type ChatBubbleListItemProps = {
14
20
  contextMenuState?: 'normal' | 'disabled';
15
21
  children?: React.ReactNode;
16
22
  downloadIBtnMode?: 'use' | 'none';
23
+ reactionBtnMode?: 'use' | 'none';
24
+ reactionBtnText?: string;
25
+ reactionArray?: ReactionArrayType;
26
+ reactionBubblePosition?: 'top' | 'bottom';
17
27
  onClickContextMenuItem?: (option: PDSValueOption) => void;
18
28
  onClickDownloadIBtn?: () => void;
29
+ onClickReactionBtn?: (type: ReactionType) => void;
19
30
  };
20
- declare function ChatBubbleListItem({ titleText, imageSrc, hoverMode, styleTheme, colorTheme, timeMode, timeText, labelText, contextMenuOptionArray, contextMenuState, children, downloadIBtnMode, onClickContextMenuItem, onClickDownloadIBtn }: ChatBubbleListItemProps): JSX.Element;
31
+ declare function ChatBubbleListItem({ titleText, imageSrc, hoverMode, styleTheme, colorTheme, timeMode, timeText, labelText, contextMenuOptionArray, contextMenuState, children, downloadIBtnMode, reactionBtnMode, reactionBtnText, reactionArray, reactionBubblePosition, onClickContextMenuItem, onClickDownloadIBtn, onClickReactionBtn }: ChatBubbleListItemProps): JSX.Element;
21
32
  export default ChatBubbleListItem;
@@ -50,6 +50,7 @@ var ContextMenuItem_1 = require("../ContextMenuItem");
50
50
  var IconButton_1 = require("../IconButton");
51
51
  var TextLabel_1 = require("../TextLabel");
52
52
  var ChatBubble_1 = __importDefault(require("./ChatBubble"));
53
+ var components_1 = require("./components");
53
54
  var Popup_1 = require("./Popup");
54
55
  var chatBubbleTailType = {
55
56
  other_avatar_impact: 'left_top',
@@ -68,8 +69,8 @@ var profileImageBorderColorTheme = {
68
69
  transparent: 'ui_cpnt_list_chatbubble_base_transparent'
69
70
  };
70
71
  function ChatBubbleListItem(_a) {
71
- 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, labelText = _a.labelText, contextMenuOptionArray = _a.contextMenuOptionArray, _e = _a.contextMenuState, contextMenuState = _e === void 0 ? 'normal' : _e, children = _a.children, _f = _a.downloadIBtnMode, downloadIBtnMode = _f === void 0 ? 'none' : _f, onClickContextMenuItem = _a.onClickContextMenuItem, onClickDownloadIBtn = _a.onClickDownloadIBtn;
72
- var _g = (0, react_1.useState)(false), isContextMenuOpen = _g[0], setIsContextMenuOpen = _g[1];
72
+ 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, labelText = _a.labelText, contextMenuOptionArray = _a.contextMenuOptionArray, _e = _a.contextMenuState, contextMenuState = _e === void 0 ? 'normal' : _e, children = _a.children, _f = _a.downloadIBtnMode, downloadIBtnMode = _f === void 0 ? 'none' : _f, _g = _a.reactionBtnMode, reactionBtnMode = _g === void 0 ? 'none' : _g, _h = _a.reactionBtnText, reactionBtnText = _h === void 0 ? '-' : _h, reactionArray = _a.reactionArray, _j = _a.reactionBubblePosition, reactionBubblePosition = _j === void 0 ? 'bottom' : _j, onClickContextMenuItem = _a.onClickContextMenuItem, onClickDownloadIBtn = _a.onClickDownloadIBtn, onClickReactionBtn = _a.onClickReactionBtn;
73
+ var _k = (0, react_1.useState)(false), isContextMenuOpen = _k[0], setIsContextMenuOpen = _k[1];
73
74
  var contextMenuRef = (0, react_1.useRef)(null);
74
75
  var chatBody = document.querySelector('#chatMessageBox');
75
76
  var rect = chatBody === null || chatBody === void 0 ? void 0 : chatBody.getBoundingClientRect();
@@ -137,7 +138,7 @@ function ChatBubbleListItem(_a) {
137
138
  }
138
139
  setIsContextMenuOpen(false);
139
140
  };
140
- 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_Box, { children: [downloadIBtnMode === 'use' && (0, jsx_runtime_1.jsx)("div", { style: { height: '32px', width: '1px' } }), (0, jsx_runtime_1.jsx)(S_DownloadIconWrapper, __assign({ isMe: isMe }, { children: downloadIBtnMode === 'use' && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { shapeType: "circular", iconFillType: "fill", baseColorKey: "ui_cpnt_list_chatbubble_download_button_base", iconColorKey: "ui_cpnt_button_icon_white", iconSize: 16, iconName: "ic_download", onClick: onClickDownloadIBtn })) })), (0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [labelText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: labelText, styleTheme: "caption2Bold", colorTheme: "sysTextTertiary" })), timeMode === 'use' && timeText && ((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_Box, { children: [downloadIBtnMode === 'use' && (0, jsx_runtime_1.jsx)("div", { style: { height: '32px', width: '1px' } }), (0, jsx_runtime_1.jsx)(S_DownloadIconWrapper, __assign({ isMe: isMe }, { children: downloadIBtnMode === 'use' && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { shapeType: "circular", iconFillType: "fill", baseColorKey: "ui_cpnt_list_chatbubble_download_button_base", iconColorKey: "ui_cpnt_button_icon_white", iconSize: 16, iconName: "ic_download", onClick: onClickDownloadIBtn })) })), (0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [labelText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: labelText, styleTheme: "caption2Bold", colorTheme: "sysTextTertiary" })), timeMode === 'use' && timeText && ((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)); }) }) })) })] })) }));
141
+ 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, __assign({ isMe: isMe }, { children: [(0, jsx_runtime_1.jsxs)(S_ChatBubbleWrapper, __assign({ isMe: isMe }, { children: [(0, jsx_runtime_1.jsxs)(S_BubbleWrapper, { children: [isMe && ((0, jsx_runtime_1.jsxs)(S_Box, { children: [downloadIBtnMode === 'use' && (0, jsx_runtime_1.jsx)("div", { style: { height: '32px', width: '1px' } }), (0, jsx_runtime_1.jsx)(S_DownloadIconWrapper, __assign({ isMe: isMe }, { children: downloadIBtnMode === 'use' && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { shapeType: "circular", iconFillType: "fill", baseColorKey: "ui_cpnt_list_chatbubble_download_button_base", iconColorKey: "ui_cpnt_button_icon_white", iconSize: 16, iconName: "ic_download", onClick: onClickDownloadIBtn })) })), (0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [labelText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: labelText, styleTheme: "caption2Bold", colorTheme: "sysTextTertiary" })), timeMode === 'use' && timeText && ((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_Box, { children: [downloadIBtnMode === 'use' && (0, jsx_runtime_1.jsx)("div", { style: { height: '32px', width: '1px' } }), (0, jsx_runtime_1.jsx)(S_DownloadIconWrapper, __assign({ isMe: isMe }, { children: downloadIBtnMode === 'use' && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { shapeType: "circular", iconFillType: "fill", baseColorKey: "ui_cpnt_list_chatbubble_download_button_base", iconColorKey: "ui_cpnt_button_icon_white", iconSize: 16, iconName: "ic_download", onClick: onClickDownloadIBtn })) })), (0, jsx_runtime_1.jsxs)(S_TimeWrapper, __assign({ isMe: isMe }, { children: [labelText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: labelText, styleTheme: "caption2Bold", colorTheme: "sysTextTertiary" })), timeMode === 'use' && timeText && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: timeText, styleTheme: "caption2Regular", colorTheme: "sysTextTertiary", singleLineMode: "use" }))] }))] }))] }), (0, jsx_runtime_1.jsx)(components_1.ReactionRow, { isMe: isMe, downloadIBtnMode: downloadIBtnMode, reactionBtnMode: reactionBtnMode, reactionBtnText: reactionBtnText, reactionArray: reactionArray, reactionBubblePosition: reactionBubblePosition, onClickReactionBtn: onClickReactionBtn })] })), 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)); }) }) })) })] })) }));
141
142
  }
142
143
  var MyChatBubbleListItem = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
143
144
  var theme = _a.theme;
@@ -171,12 +172,15 @@ var S_DownloadIconWrapper = styled_components_1.default.div(templateObject_7 ||
171
172
  return isMe && theme.spacing.spacingB;
172
173
  });
173
174
  var S_Box = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"])));
174
- var S_ChatBubbleBox = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"], ["\n display: flex;\n justify-content: space-between;\n"])));
175
- var MyChatBubble = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n justify-content: flex-end;\n"], ["\n justify-content: flex-end;\n"])));
176
- var S_ChatBubbleWrapper = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: flex;\n flex: 1;\n\n ", ";\n"], ["\n display: flex;\n flex: 1;\n\n ", ";\n"])), function (_a) {
175
+ var S_ChatBubbleBox = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n\n ", ";\n"], ["\n display: flex;\n justify-content: space-between;\n\n ", ";\n"])), function (_a) {
177
176
  var isMe = _a.isMe;
178
177
  return isMe && MyChatBubble;
179
178
  });
179
+ var MyChatBubble = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n justify-content: flex-end;\n"], ["\n justify-content: flex-end;\n"])));
180
+ var S_ChatBubbleWrapper = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: ", ";\n display: flex;\n flex: 1;\n flex-direction: column;\n max-width: fit-content;\n"], ["\n align-items: ", ";\n display: flex;\n flex: 1;\n flex-direction: column;\n max-width: fit-content;\n"])), function (_a) {
181
+ var isMe = _a.isMe;
182
+ return isMe && 'flex-end';
183
+ });
180
184
  var S_TimeWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: ", ";\n align-self: ", ";\n display: flex;\n flex-direction: column;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: ", ";\n align-self: ", ";\n display: flex;\n flex-direction: column;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
181
185
  var isMe = _a.isMe;
182
186
  return isMe && 'flex-end';
@@ -203,5 +207,6 @@ var S_SeeMoreButton = styled_components_1.default.div(templateObject_13 || (temp
203
207
  var hoverMode = _a.hoverMode;
204
208
  return hoverMode === 'use' && '1';
205
209
  });
210
+ var S_BubbleWrapper = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
206
211
  exports.default = ChatBubbleListItem;
207
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
212
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14;
@@ -0,0 +1,11 @@
1
+ import type { BubblePositionType } from '../../../../common/types/systemUI';
2
+ import type { ReactNode } from 'react';
3
+ type ContextBubbleSheetProps = {
4
+ pointingPosition: BubblePositionType;
5
+ children: ReactNode;
6
+ };
7
+ /**
8
+ * @description ChatBubbleListItem에서의 사용 용례와 비슷한 사용 방식이 발생 한 경우, 별도의 PDS로 분리할 예정입니다.
9
+ */
10
+ declare const ReactionBubble: ({ pointingPosition, children }: ContextBubbleSheetProps) => JSX.Element;
11
+ export default ReactionBubble;
@@ -0,0 +1,86 @@
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 __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ var jsx_runtime_1 = require("react/jsx-runtime");
42
+ var styled_components_1 = __importStar(require("styled-components"));
43
+ /**
44
+ * @description ChatBubbleListItem에서의 사용 용례와 비슷한 사용 방식이 발생 한 경우, 별도의 PDS로 분리할 예정입니다.
45
+ */
46
+ var ReactionBubble = function (_a) {
47
+ var _b = _a.pointingPosition, pointingPosition = _b === void 0 ? 'start_bottom' : _b, children = _a.children;
48
+ var theme = (0, styled_components_1.useTheme)();
49
+ return ((0, jsx_runtime_1.jsx)(S_ContextBubbleArea, __assign({ "$position": pointingPosition }, { children: (0, jsx_runtime_1.jsxs)(S_ContextBubbleWrapper, __assign({ "$position": pointingPosition }, { children: [children, (0, jsx_runtime_1.jsxs)(Arrow, __assign({ "$position": pointingPosition, viewBox: "0 0 18 10", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.jsx)("polygon", { points: "9,10 3,0 15,0", fill: theme.ui_cpnt_sheet_base_01 }), (0, jsx_runtime_1.jsx)("path", { d: "M3,1 L9,10", stroke: theme.ui_cpnt_sheet_border_01, strokeWidth: "1", strokeLinecap: "butt" }), (0, jsx_runtime_1.jsx)("path", { d: "M15,1 L9,10", stroke: theme.ui_cpnt_sheet_border_01, strokeWidth: "1", strokeLinecap: "butt" }), (0, jsx_runtime_1.jsx)("path", { d: "M0,0 L15,0", strokeWidth: "1" })] }))] })) })));
50
+ };
51
+ exports.default = ReactionBubble;
52
+ var S_ContextBubbleArea = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: column;\n ", "\n position: relative;\n"], ["\n align-items: center;\n display: flex;\n flex-direction: column;\n ", "\n position: relative;\n"])), function (_a) {
53
+ var $position = _a.$position, theme = _a.theme;
54
+ var isTop = $position.includes('top');
55
+ return !isTop
56
+ ? "margin-bottom: ".concat(theme.spacing.spacingB, ";")
57
+ : "margin-top: ".concat(theme.spacing.spacingB, ";");
58
+ });
59
+ var S_ContextBubbleWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border: ", ";\n border-radius: 12px;\n display: flex;\n padding: ", ";\n position: relative;\n width: 'fit-content';\n"], ["\n align-items: center;\n background-color: ", ";\n border: ", ";\n border-radius: 12px;\n display: flex;\n padding: ", ";\n position: relative;\n width: 'fit-content';\n"])), function (_a) {
60
+ var theme = _a.theme;
61
+ return theme.ui_cpnt_sheet_base_01;
62
+ }, function (_a) {
63
+ var theme = _a.theme;
64
+ return "1px solid ".concat(theme.ui_cpnt_sheet_border_01);
65
+ }, function (_a) {
66
+ var theme = _a.theme;
67
+ return "".concat(theme.spacing.spacingB, " ").concat(theme.spacing.spacingC);
68
+ });
69
+ var Arrow = styled_components_1.default.svg(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 12.6px;\n position: absolute;\n width: 15px;\n\n ", "\n\n ", "\n"], ["\n height: 12.6px;\n position: absolute;\n width: 15px;\n\n ", "\n\n ", "\n"])), function (_a) {
70
+ var $position = _a.$position;
71
+ var isTop = $position.includes('top');
72
+ if (isTop) {
73
+ return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n top: -10px;\n transform: translateX(-50%) rotate(180deg);\n "], ["\n top: -10px;\n transform: translateX(-50%) rotate(180deg);\n "])));
74
+ }
75
+ return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n bottom: -10px;\n transform: translateX(-50%);\n "], ["\n bottom: -10px;\n transform: translateX(-50%);\n "])));
76
+ }, function (_a) {
77
+ var $position = _a.$position;
78
+ if ($position.includes('center')) {
79
+ return "left: 50%;";
80
+ }
81
+ if ($position.includes('end')) {
82
+ return "right: 12px;";
83
+ }
84
+ return "left: 19.5px;";
85
+ });
86
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ type ReactionType = 'heart' | 'like' | 'confetti';
3
+ type ReactionValueOption = {
4
+ type: ReactionType;
5
+ count: number;
6
+ };
7
+ type ReactionArrayType = ReactionValueOption[];
8
+ type Props = {
9
+ isMe: boolean;
10
+ downloadIBtnMode: 'use' | 'none';
11
+ reactionBtnMode: 'use' | 'none';
12
+ reactionBtnText: string;
13
+ reactionArray?: ReactionArrayType;
14
+ reactionBubblePosition: 'top' | 'bottom';
15
+ onClickReactionBtn?: (type: ReactionType) => void;
16
+ };
17
+ declare function ReactionRow({ isMe, downloadIBtnMode, reactionBtnMode, reactionBtnText, reactionArray, reactionBubblePosition, onClickReactionBtn }: Props): JSX.Element;
18
+ export default ReactionRow;