pds-dev-kit-web 2.2.254 → 2.2.255

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 (37) hide show
  1. package/dist/src/common/hooks/index.d.ts +1 -0
  2. package/dist/src/common/hooks/index.js +3 -1
  3. package/dist/src/common/hooks/useScrollbarDetector.d.ts +9 -0
  4. package/dist/src/common/hooks/useScrollbarDetector.js +70 -0
  5. package/dist/src/common/services/i18n/resources/en.json +1 -2
  6. package/dist/src/common/services/i18n/resources/es.json +1 -2
  7. package/dist/src/common/services/i18n/resources/fil.json +1 -2
  8. package/dist/src/common/services/i18n/resources/index.d.ts +0 -7
  9. package/dist/src/common/services/i18n/resources/ja.json +1 -2
  10. package/dist/src/common/services/i18n/resources/ko.json +1 -2
  11. package/dist/src/common/services/i18n/resources/zh-cn.json +1 -2
  12. package/dist/src/common/services/i18n/resources/zh-tw.json +1 -2
  13. package/dist/src/common/styles/colorSet/UIColor.json +1 -6
  14. package/dist/src/common/styles/colorSet/index.d.ts +126 -131
  15. package/dist/src/common/styles/colorSet/index.js +2 -2
  16. package/dist/src/common/styles/colorSet/ui-type.d.ts +0 -5
  17. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +1 -12
  18. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +7 -12
  19. package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.js +6 -3
  20. package/dist/src/desktop/components/TextField/TextField.js +12 -7
  21. package/dist/src/hybrid/components/LottieIcon/LottieIcon.js +1 -1
  22. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +1 -12
  23. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +7 -12
  24. package/package.json +1 -1
  25. package/release-note.md +2 -2
  26. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionBubble.d.ts +0 -11
  27. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionBubble.js +0 -86
  28. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionRow.d.ts +0 -18
  29. package/dist/src/desktop/components/ChatBubbleListItem/components/ReactionRow.js +0 -133
  30. package/dist/src/desktop/components/ChatBubbleListItem/components/index.d.ts +0 -1
  31. package/dist/src/desktop/components/ChatBubbleListItem/components/index.js +0 -8
  32. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionBubble.d.ts +0 -11
  33. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionBubble.js +0 -86
  34. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionRow.d.ts +0 -18
  35. package/dist/src/mobile/components/ChatBubbleListItem/components/ReactionRow.js +0 -126
  36. package/dist/src/mobile/components/ChatBubbleListItem/components/index.d.ts +0 -1
  37. package/dist/src/mobile/components/ChatBubbleListItem/components/index.js +0 -8
@@ -1,86 +0,0 @@
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;
@@ -1,18 +0,0 @@
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;
@@ -1,126 +0,0 @@
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 components_1 = require("../../../../hybrid/components");
24
- var TextLabel_1 = require("../../../components/TextLabel");
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, downloadIBtnMode = _a.downloadIBtnMode, reactionBtnMode = _a.reactionBtnMode, 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 handleClickReactionButton = function () {
59
- isOpenReactionBubble ? setIsOpenReactionBubble(false) : setIsOpenReactionBubble(true);
60
- };
61
- 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: handleClickReactionButton }, { 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) {
62
- var iconName = function () {
63
- switch (reaction.type) {
64
- case 'heart':
65
- return 'ic_lottie_heart';
66
- case 'like':
67
- return 'ic_lottie_thumb_up';
68
- case 'confetti':
69
- return 'ic_lottie_confetti';
70
- }
71
- };
72
- 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));
73
- }) }))] })), (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 () {
74
- onClickReactionBtn && onClickReactionBtn(reaction.type);
75
- setIsOpenReactionBubble(false);
76
- } }, { children: (0, jsx_runtime_1.jsx)(components_1.LottieIcon, { iconName: reaction.iconName, size: 16, autoplayMode: "none", loopMode: "none" }) }), index)); }) }) }))) }))] }));
77
- }
78
- exports.default = ReactionRow;
79
- 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) {
80
- var theme = _a.theme;
81
- return theme.spacing.spacingA;
82
- });
83
- 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) {
84
- var theme = _a.theme;
85
- return theme.spacing.spacingB;
86
- }, function (_a) {
87
- var isMe = _a.isMe, downloadIBtnMode = _a.downloadIBtnMode;
88
- return !isMe && (downloadIBtnMode ? '40px' : '34px');
89
- }, function (_a) {
90
- var theme = _a.theme;
91
- return theme.spacing.spacingA;
92
- });
93
- 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"])));
94
- 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 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 padding: 0 ", ";\n"])), function (_a) {
95
- var theme = _a.theme;
96
- return theme.ui_cpnt_sheet_base_02;
97
- }, function (_a) {
98
- var theme = _a.theme;
99
- return theme.spacing.spacingA;
100
- }, function (_a) {
101
- var theme = _a.theme;
102
- return theme.spacing.spacingB;
103
- });
104
- 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) {
105
- var theme = _a.theme;
106
- return theme.spacing.spacingA;
107
- });
108
- 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) {
109
- var theme = _a.theme, type = _a.type;
110
- switch (type) {
111
- case 'heart':
112
- return theme.ui_cpnt_message_reaction_base_01;
113
- case 'like':
114
- return theme.ui_cpnt_message_reaction_base_02;
115
- case 'confetti':
116
- return theme.ui_cpnt_message_reaction_base_03;
117
- }
118
- }, function (_a) {
119
- var isButton = _a.isButton;
120
- return isButton && 'pointer';
121
- });
122
- 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) {
123
- var reactionBubblePosition = _a.reactionBubblePosition;
124
- return reactionBubblePosition === 'bottom' ? 'top: 28px;' : 'bottom: 24px;';
125
- });
126
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -1 +0,0 @@
1
- export { default as ReactionRow } from './ReactionRow';
@@ -1,8 +0,0 @@
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; } });