pds-dev-kit-web-test 0.2.54 → 0.3.0
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/fill/BellOff.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/BellOff.js +30 -0
- package/dist/src/common/assets/icons/fill/VideocallPro.js +1 -1
- package/dist/src/common/assets/icons/fill/Vodplus.js +1 -1
- package/dist/src/common/assets/icons/fill/index.d.ts +1 -0
- package/dist/src/common/assets/icons/fill/index.js +2 -0
- package/dist/src/common/assets/icons/line/BellOff.d.ts +4 -0
- package/dist/src/common/assets/icons/line/BellOff.js +30 -0
- package/dist/src/common/assets/icons/line/ChatRoom11.d.ts +4 -0
- package/dist/src/common/assets/icons/line/ChatRoom11.js +30 -0
- package/dist/src/common/assets/icons/line/ChatRoomFree.d.ts +4 -0
- package/dist/src/common/assets/icons/line/ChatRoomFree.js +30 -0
- package/dist/src/common/assets/icons/line/ChatRoomGroup.d.ts +4 -0
- package/dist/src/common/assets/icons/line/ChatRoomGroup.js +30 -0
- package/dist/src/common/assets/icons/line/ChatRoomPaid.d.ts +4 -0
- package/dist/src/common/assets/icons/line/ChatRoomPaid.js +30 -0
- package/dist/src/common/assets/icons/line/DesignPreference.js +1 -1
- package/dist/src/common/assets/icons/line/PappType.js +1 -1
- package/dist/src/common/assets/icons/line/PaymentRegularly.js +1 -1
- package/dist/src/common/assets/icons/line/PostVote.js +1 -1
- package/dist/src/common/assets/icons/line/Target.js +1 -1
- package/dist/src/common/assets/icons/line/TypefaceDisplay20.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TypefaceDisplay20.js +30 -0
- package/dist/src/common/assets/icons/line/TypefaceHand20.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TypefaceHand20.js +30 -0
- package/dist/src/common/assets/icons/line/TypefaceMonospace20.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TypefaceMonospace20.js +30 -0
- package/dist/src/common/assets/icons/line/TypefaceSansSerif20.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TypefaceSansSerif20.js +30 -0
- package/dist/src/common/assets/icons/line/TypefaceSerif20.d.ts +4 -0
- package/dist/src/common/assets/icons/line/TypefaceSerif20.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +10 -0
- package/dist/src/common/assets/icons/line/index.js +20 -0
- package/dist/src/common/hooks/index.d.ts +1 -0
- package/dist/src/common/hooks/index.js +3 -1
- package/dist/src/common/hooks/useAbsolutePositioner.d.ts +13 -0
- package/dist/src/common/hooks/useAbsolutePositioner.js +54 -0
- package/dist/src/common/hooks/useTooltip.d.ts +17 -0
- package/dist/src/common/hooks/useTooltip.js +76 -0
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +2 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +2 -1
- package/dist/src/common/styles/colorSet/UIColor.json +2 -1
- package/dist/src/common/styles/colorSet/index.d.ts +963 -960
- package/dist/src/common/styles/colorSet/index.js +5 -5
- package/dist/src/common/styles/colorSet/ui-type.d.ts +1 -0
- package/dist/src/common/styles/systemUI/index.d.ts +1 -0
- package/dist/src/common/styles/systemUI/index.js +5 -0
- package/dist/src/common/styles/systemUI/tooltipStyle.d.ts +1 -0
- package/dist/src/common/styles/systemUI/tooltipStyle.js +28 -0
- package/dist/src/common/types/components.d.ts +3 -2
- package/dist/src/common/types/systemUI.d.ts +13 -0
- package/dist/src/common/types/systemUI.js +2 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/clickTypeSystemUICssGenerator.d.ts +13 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/clickTypeSystemUICssGenerator.js +20 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.d.ts +17 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +71 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/index.d.ts +1 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/index.js +8 -0
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +54 -42
- package/dist/src/desktop/components/BasicButtonGroup/constants.d.ts +0 -6
- package/dist/src/desktop/components/BasicButtonGroup/constants.js +1 -8
- package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.d.ts +2 -4
- package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.js +14 -5
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +3 -3
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +41 -45
- package/dist/src/desktop/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/src/desktop/components/Dropdown/Dropdown.js +48 -9
- package/dist/src/desktop/components/IconButton/IconButton.d.ts +3 -1
- package/dist/src/desktop/components/IconButton/IconButton.js +48 -44
- package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.js +54 -42
- package/dist/src/desktop/components/SegmentedButtonGroup/constants.d.ts +0 -6
- package/dist/src/desktop/components/SegmentedButtonGroup/constants.js +1 -8
- package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +3 -1
- package/dist/src/desktop/components/TextLabel/TextLabel.js +33 -63
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.d.ts +3 -1
- package/dist/src/desktop/components/UploadIconButton/UploadIconButton.js +49 -45
- package/dist/src/desktop/components/UploadIconButton/constants.d.ts +7 -0
- package/dist/src/desktop/components/UploadIconButton/constants.js +10 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.js +2 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTW.d.ts +18 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTW.js +112 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.d.ts +1 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.js +3 -1
- package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.js +8 -4
- package/dist/src/hybrid/components/Icon/Icon.js +2 -1
- package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.d.ts +2 -4
- package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.js +14 -5
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +3 -3
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +41 -45
- package/dist/src/mobile/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/src/mobile/components/Dropdown/Dropdown.js +48 -9
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/fill/VideocallPro.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/fill/Vodplus.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/DesignPreference.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/PappType.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/PaymentRegularly.js +1 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/PostVote.js +1 -1
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +1 -1
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +19 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
- package/dist/src/sub/GoogleFontkit/headless/GoogleFontItem.js +0 -6
- package/dist/src/sub/GoogleFontkit/headless/GoogleFontsList.js +17 -37
- package/dist/src/sub/GoogleFontkit/types.d.ts +1 -1
- package/dist/src/sub/GoogleFontkit/utils/applyActiveFont.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/applyActiveFont.js +0 -3
- package/dist/src/sub/GoogleFontkit/utils/createStyleSheet.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/createStyleSheet.js +0 -3
- package/dist/src/sub/GoogleFontkit/utils/extractFontStyles.js +0 -4
- package/dist/src/sub/GoogleFontkit/utils/fillStyleSheet.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/fillStyleSheet.js +0 -4
- package/dist/src/sub/GoogleFontkit/utils/getActiveFontStylesheet.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/getActiveFontStylesheet.js +0 -3
- package/dist/src/sub/GoogleFontkit/utils/getFontId.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/getFontId.js +0 -3
- package/dist/src/sub/GoogleFontkit/utils/isStyleSheetExists.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/isStyleSheetExists.js +0 -3
- package/dist/src/sub/GoogleFontkit/utils/setStyleSheetType.d.ts +0 -3
- package/dist/src/sub/GoogleFontkit/utils/setStyleSheetType.js +0 -3
- package/package.json +1 -1
- package/release-note.md +3 -3
|
@@ -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,
|
|
71
|
-
var isMe = styleTheme.includes('me');
|
|
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;
|
|
72
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: contextMenuPosition, 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;
|
|
@@ -24,7 +24,7 @@ function ContextMenu(_a) {
|
|
|
24
24
|
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight, customWidth = _a.customWidth;
|
|
25
25
|
return ((0, jsx_runtime_1.jsx)(S_ContextMenu, __assign({ "x-pds-name": "ContextMenu", "x-pds-element-type": "component", "x-pds-device-type": "desktop", autoWidth: autoWidthMode === 'use', maxHeight: maxHeight, customWidth: customWidth }, { children: children })));
|
|
26
26
|
}
|
|
27
|
-
var S_ContextMenu = styled_components_1.default.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index:
|
|
27
|
+
var S_ContextMenu = styled_components_1.default.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index: 400;\n\n ", "\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index: 400;\n\n ", "\n"])), function (_a) {
|
|
28
28
|
var theme = _a.theme;
|
|
29
29
|
return theme.ui_cpnt_contextmenu_base;
|
|
30
30
|
}, function (_a) {
|
|
@@ -37,9 +37,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
37
37
|
__setModuleDefault(result, mod);
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
40
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
44
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
45
|
var react_1 = require("react");
|
|
46
|
+
var react_dom_1 = require("react-dom");
|
|
47
|
+
var clickTypeSystemUICssGenerator_1 = __importDefault(require("../../../common/utils/SystemUIPositionGenerator/clickTypeSystemUICssGenerator"));
|
|
43
48
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
44
49
|
var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
|
|
45
50
|
var hybrid_1 = require("../../../hybrid");
|
|
@@ -55,6 +60,10 @@ function Dropdown(_a) {
|
|
|
55
60
|
size = _e === void 0 ? 'large' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, valueArray = _a.valueArray, customWidth = _a.customWidth, _g = _a.displayType, displayType = _g === void 0 ? 'text_only' : _g, _h = _a.fontWeight, fontWeight = _h === void 0 ? 'regular' : _h, onChange = _a.onChange;
|
|
56
61
|
var _j = (0, react_1.useState)(false), isFocused = _j[0], setIsFocused = _j[1];
|
|
57
62
|
var _k = (0, react_1.useState)(null), selectedValue = _k[0], setSelectedValue = _k[1];
|
|
63
|
+
var _l = (0, react_1.useState)(null), contextMenuSizeOffset = _l[0], setContextMenuSizeOffset = _l[1];
|
|
64
|
+
var _m = (0, react_1.useState)(null), dropdownPositionOffset = _m[0], setDropdownPositionOffset = _m[1];
|
|
65
|
+
var contextMenuRef = (0, react_1.useRef)(null);
|
|
66
|
+
var dropdownRef = (0, react_1.useRef)(null);
|
|
58
67
|
/**
|
|
59
68
|
* @when value 프롭의 값에 따라
|
|
60
69
|
* @expected 값이 null일 때 드롭다운을 초기화하고, 값이 있다면 해당 값으로 설정해줍니다.
|
|
@@ -80,6 +89,36 @@ function Dropdown(_a) {
|
|
|
80
89
|
}
|
|
81
90
|
setSelectedValue(defaultValue);
|
|
82
91
|
}, [defaultValue]);
|
|
92
|
+
/**
|
|
93
|
+
* @when : isFocused 변경되었을 때
|
|
94
|
+
* @expected : dropdownRef, contextMenuRef 의 위치를 업데이트합니다.
|
|
95
|
+
* @clear :
|
|
96
|
+
*/
|
|
97
|
+
(0, react_1.useEffect)(function () {
|
|
98
|
+
if (!isFocused && contextMenuRef.current) {
|
|
99
|
+
setContextMenuSizeOffset(null);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (dropdownRef.current) {
|
|
103
|
+
var _a = dropdownRef.current.getBoundingClientRect(), top_1 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
|
|
104
|
+
setDropdownPositionOffset({
|
|
105
|
+
top: top_1 + window.scrollY,
|
|
106
|
+
right: right + window.scrollX,
|
|
107
|
+
bottom: bottom + window.scrollY,
|
|
108
|
+
left: left + window.scrollX
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
if (contextMenuRef.current) {
|
|
112
|
+
setContextMenuSizeOffset({
|
|
113
|
+
height: contextMenuRef.current.offsetHeight,
|
|
114
|
+
width: contextMenuRef.current.offsetWidth
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, [isFocused]);
|
|
118
|
+
var contextMenuPositionCss = (0, clickTypeSystemUICssGenerator_1.default)({
|
|
119
|
+
sizeOffset: contextMenuSizeOffset,
|
|
120
|
+
positionOffset: dropdownPositionOffset
|
|
121
|
+
});
|
|
83
122
|
var handleClick = function () {
|
|
84
123
|
if (state === 'disabled' || state === 'read_only') {
|
|
85
124
|
return;
|
|
@@ -101,12 +140,14 @@ function Dropdown(_a) {
|
|
|
101
140
|
}
|
|
102
141
|
};
|
|
103
142
|
var getCustomWidth = function () {
|
|
143
|
+
var _a;
|
|
104
144
|
if (customWidth) {
|
|
105
145
|
return customWidth;
|
|
106
146
|
}
|
|
107
|
-
if (
|
|
108
|
-
return
|
|
147
|
+
if ((_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) {
|
|
148
|
+
return "".concat(dropdownRef.current.offsetWidth, "px");
|
|
109
149
|
}
|
|
150
|
+
return '';
|
|
110
151
|
};
|
|
111
152
|
var getIconColorKey = function () {
|
|
112
153
|
if (state === 'disabled' || state === 'read_only') {
|
|
@@ -194,7 +235,8 @@ function Dropdown(_a) {
|
|
|
194
235
|
var LARGE_HEIGHT = 48;
|
|
195
236
|
return LARGE_HEIGHT * maxHeightItemNumber;
|
|
196
237
|
}, [size, maxHeightItemNumber]);
|
|
197
|
-
return ((0, jsx_runtime_1.jsxs)(S_Dropdown, __assign({ "x-pds-name": "Dropdown", "x-pds-element-type": "component", "x-pds-device-type": "desktop", className: "container", size: size, tabIndex: 0, onBlur: handleBlur, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_Select, __assign({ size: size, onClick: handleClick, isFocused: isFocused, state: state, colorTheme: colorTheme, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_TextLabel, __assign({ size: size, responsiveMode: responsiveMode, displayType: displayType }, { children: [(displayType === 'icon_only' || displayType === 'icon_text') && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.iconName) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: size === 'small' ? 20 : 24, iconName: selectedValue.iconName, fillType: selectedValue.iconFillType, colorKey: getIconColorKey() }), displayType === 'icon_text' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (displayType === 'text_only' || displayType === 'icon_text') && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) || (value === null || value === void 0 ? void 0 : value.text) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) || hintText, styleTheme: fontWeight === 'bold' ? 'form2Bold' : 'form2Regular', singleLineMode: "use", colorTheme: getTextColorTheme(), colorOverride: getTextColorOverride(), ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }))] })), (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getArrowIconColorKey() })] })), isFocused &&
|
|
238
|
+
return ((0, jsx_runtime_1.jsxs)(S_Dropdown, __assign({ "x-pds-name": "Dropdown", "x-pds-element-type": "component", "x-pds-device-type": "desktop", className: "container", ref: dropdownRef, size: size, tabIndex: 0, onBlur: handleBlur, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_Select, __assign({ size: size, onClick: handleClick, isFocused: isFocused, state: state, colorTheme: colorTheme, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_TextLabel, __assign({ size: size, responsiveMode: responsiveMode, displayType: displayType }, { children: [(displayType === 'icon_only' || displayType === 'icon_text') && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.iconName) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: size === 'small' ? 20 : 24, iconName: selectedValue.iconName, fillType: selectedValue.iconFillType, colorKey: getIconColorKey() }), displayType === 'icon_text' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (displayType === 'text_only' || displayType === 'icon_text') && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) || (value === null || value === void 0 ? void 0 : value.text) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) || hintText, styleTheme: fontWeight === 'bold' ? 'form2Bold' : 'form2Regular', singleLineMode: "use", colorTheme: getTextColorTheme(), colorOverride: getTextColorOverride(), ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }))] })), (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getArrowIconColorKey() })] })), isFocused &&
|
|
239
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", maxHeight: maxHeight, customWidth: getCustomWidth() }, { children: valueArray.map(function (el) { return ((0, jsx_runtime_1.jsx)("div", __assign({ onMouseDown: function () { return handleClickOption(el); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, size: size, isSelected: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.value) === el.value, state: el.state, displayType: displayType }) }), el.value)); }) })) })), document.body)] })));
|
|
198
240
|
}
|
|
199
241
|
var S_TextLabel = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-right: ", ";\n\n ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-right: ", ";\n\n ", ";\n"])), function (_a) {
|
|
200
242
|
var theme = _a.theme;
|
|
@@ -392,12 +434,9 @@ var S_Select = styled_components_1.default.div(templateObject_15 || (templateObj
|
|
|
392
434
|
var state = _a.state;
|
|
393
435
|
return state === 'normal' && normalActionColor;
|
|
394
436
|
});
|
|
395
|
-
var S_ContextMenuWrapper = styled_components_1.default.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: block;\n
|
|
396
|
-
var
|
|
397
|
-
return
|
|
398
|
-
}, function (_a) {
|
|
399
|
-
var displayType = _a.displayType;
|
|
400
|
-
return (displayType === 'icon_only' ? '100%' : 'inherit');
|
|
437
|
+
var S_ContextMenuWrapper = styled_components_1.default.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: block;\n position: absolute;\n\n ", ";\n"], ["\n display: block;\n position: absolute;\n\n ", ";\n"])), function (_a) {
|
|
438
|
+
var contextMenuPositionCss = _a.contextMenuPositionCss;
|
|
439
|
+
return contextMenuPositionCss;
|
|
401
440
|
});
|
|
402
441
|
exports.default = Dropdown;
|
|
403
442
|
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, templateObject_15, templateObject_16;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FillIconNameKeys, LineIconNameKeys, PDSTextType, UiColors } from '../../../common';
|
|
3
|
+
import type { IconCaseTooltipPositionType } from '../../../common/types/systemUI';
|
|
3
4
|
export type IconButtonProps = {
|
|
4
5
|
tooltipText?: PDSTextType;
|
|
5
|
-
|
|
6
|
+
/** @deprecated 'left_top', 'left_bottom', 'right_top', 'right_bottom' will replace 'top' or 'bottom' */
|
|
7
|
+
tooltipPosition?: IconCaseTooltipPositionType;
|
|
6
8
|
fillType?: 'fill' | 'line';
|
|
7
9
|
shapeType?: 'circular' | 'rectangle' | 'round';
|
|
8
10
|
baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
@@ -40,14 +40,55 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
42
|
var react_1 = require("react");
|
|
43
|
+
var react_dom_1 = require("react-dom");
|
|
44
|
+
var systemUI_1 = require("../../../common/styles/systemUI");
|
|
45
|
+
var SystemUIPositionGenerator_1 = require("../../../common/utils/SystemUIPositionGenerator");
|
|
43
46
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
44
47
|
var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
|
|
45
48
|
var hybrid_1 = require("../../../hybrid");
|
|
46
|
-
var TextLabel_1 = require("../TextLabel");
|
|
47
49
|
var constants_1 = require("./constants");
|
|
48
50
|
function IconButton(_a) {
|
|
49
|
-
var tooltipText = _a.tooltipText, _b = _a.tooltipPosition, tooltipPosition = _b === void 0 ? '
|
|
51
|
+
var tooltipText = _a.tooltipText, _b = _a.tooltipPosition, tooltipPosition = _b === void 0 ? 'bottom' : _b, _c = _a.fillType, fillType = _c === void 0 ? 'fill' : _c, _d = _a.shapeType, shapeType = _d === void 0 ? 'rectangle' : _d, _e = _a.baseSize, baseSize = _e === void 0 ? 'small' : _e, baseColorKey = _a.baseColorKey, borderColorKey = _a.borderColorKey, _f = _a.iconSize, iconSize = _f === void 0 ? 24 : _f, _g = _a.iconFillType, iconFillType = _g === void 0 ? 'line' : _g, iconName = _a.iconName, iconColorKey = _a.iconColorKey, _h = _a.shadow, shadow = _h === void 0 ? 'hidden' : _h, _j = _a.colorTheme, colorTheme = _j === void 0 ? 'none' : _j, _k = _a.type, type = _k === void 0 ? 'button' : _k, _l = _a.state, state = _l === void 0 ? 'normal' : _l, tabIndex = _a.tabIndex, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
50
52
|
var _m = (0, react_1.useState)(false), isTooltipOpen = _m[0], setIsTooltipOpen = _m[1];
|
|
53
|
+
var tooltipPositionTargetRef = (0, react_1.useRef)(null);
|
|
54
|
+
var tooltipRef = (0, react_1.useRef)(null);
|
|
55
|
+
var _o = (0, react_1.useState)(null), tooltipSizeOffset = _o[0], setTooltipSizeOffset = _o[1];
|
|
56
|
+
var _p = (0, react_1.useState)(null), tooltipPositionOffset = _p[0], setTooltipPositionOffset = _p[1];
|
|
57
|
+
/**
|
|
58
|
+
* @when : 화면진입 시, dependency 변경되었을 때
|
|
59
|
+
* @expected : tooltipPositionTargetRef, tooltipRef 의 위치를 업데이트합니다.
|
|
60
|
+
* @clear :
|
|
61
|
+
*/
|
|
62
|
+
(0, react_1.useEffect)(function () {
|
|
63
|
+
if (!tooltipPositionTargetRef.current || !tooltipText) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!isTooltipOpen && tooltipRef.current) {
|
|
67
|
+
setTooltipSizeOffset(null);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
var _a = tooltipPositionTargetRef.current.getBoundingClientRect(), top = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
|
|
71
|
+
setTooltipPositionOffset({
|
|
72
|
+
top: top + window.scrollY,
|
|
73
|
+
right: right + window.scrollX,
|
|
74
|
+
bottom: bottom + window.scrollY,
|
|
75
|
+
left: left + window.scrollX
|
|
76
|
+
});
|
|
77
|
+
if (tooltipRef.current) {
|
|
78
|
+
setTooltipSizeOffset({
|
|
79
|
+
height: tooltipRef.current.offsetHeight,
|
|
80
|
+
width: tooltipRef.current.offsetWidth
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}, [isTooltipOpen]);
|
|
84
|
+
var tooltipPositionCss = (0, SystemUIPositionGenerator_1.hoverTypeSystemUICssGenerator)({
|
|
85
|
+
baseSize: constants_1.ICON_BUTTON_SIZE[baseSize],
|
|
86
|
+
sizeOffset: tooltipSizeOffset,
|
|
87
|
+
positionOffset: tooltipPositionOffset,
|
|
88
|
+
systemUIPosition: tooltipPosition.includes('_')
|
|
89
|
+
? tooltipPosition
|
|
90
|
+
: "center_".concat(tooltipPosition)
|
|
91
|
+
});
|
|
51
92
|
var handleTooltipToggle = function (value) {
|
|
52
93
|
setIsTooltipOpen(value);
|
|
53
94
|
};
|
|
@@ -84,7 +125,7 @@ function IconButton(_a) {
|
|
|
84
125
|
}
|
|
85
126
|
return iconStateColorObj[fillType];
|
|
86
127
|
};
|
|
87
|
-
return ((0, jsx_runtime_1.jsxs)(S_IconButton, __assign({ "x-pds-name": "IconButton", "x-pds-element-type": "component", "x-pds-device-type": "desktop", fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', tabIndex: tabIndex, onClick: handleClick, onMouseDown: handleMouseDown, onPointerEnter: function () { return tooltipText && handleTooltipToggle(true); }, onPointerLeave: function () { return tooltipText && handleTooltipToggle(false); } }, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { iconName: iconName, size: iconSize, colorKey: IconColorSelect(), fillType: iconFillType }),
|
|
128
|
+
return ((0, jsx_runtime_1.jsxs)(S_IconButton, __assign({ "x-pds-name": "IconButton", "x-pds-element-type": "component", "x-pds-device-type": "desktop", ref: tooltipPositionTargetRef, fillType: fillType, shapeType: shapeType, baseSize: baseSize, baseColorKey: baseColorKey, borderColorKey: borderColorKey, shadow: shadow, colorTheme: colorTheme, type: type, state: state, disabled: state === 'disabled', tabIndex: tabIndex, onClick: handleClick, onMouseDown: handleMouseDown, onPointerEnter: function () { return tooltipText && handleTooltipToggle(true); }, onPointerLeave: function () { return tooltipText && handleTooltipToggle(false); } }, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { iconName: iconName, size: iconSize, colorKey: IconColorSelect(), fillType: iconFillType }), isTooltipOpen && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss }, { children: tooltipText })), document.body) }))] })));
|
|
88
129
|
}
|
|
89
130
|
var fillDisabled = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
90
131
|
var theme = _a.theme, baseColorKey = _a.baseColorKey;
|
|
@@ -188,46 +229,9 @@ var iconButtonStyle = (0, styled_components_1.css)(templateObject_13 || (templat
|
|
|
188
229
|
}[baseSize];
|
|
189
230
|
});
|
|
190
231
|
var S_IconButton = styled_components_1.default.button(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), iconButtonStyle);
|
|
191
|
-
var
|
|
192
|
-
var
|
|
193
|
-
return
|
|
194
|
-
{
|
|
195
|
-
xxlarge: constants_1.TOOLTIP_POSITION_SPACING.xxlarge,
|
|
196
|
-
large: constants_1.TOOLTIP_POSITION_SPACING.large,
|
|
197
|
-
medium: constants_1.TOOLTIP_POSITION_SPACING.medium,
|
|
198
|
-
small: constants_1.TOOLTIP_POSITION_SPACING.small,
|
|
199
|
-
xsmall: constants_1.TOOLTIP_POSITION_SPACING.xsmall
|
|
200
|
-
}[baseSize];
|
|
201
|
-
});
|
|
202
|
-
var tooltipLeftTop = (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n bottom: ", ";\n right: 0;\n"], ["\n bottom: ", ";\n right: 0;\n"])), tooltipPositionSpacing);
|
|
203
|
-
var tooltipLeftBottom = (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n right: 0;\n top: ", ";\n"], ["\n right: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
204
|
-
var tooltipCenterTop = (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n bottom: ", ";\n"], ["\n bottom: ", ";\n"])), tooltipPositionSpacing);
|
|
205
|
-
var tooltipCenterBottom = (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n top: ", ";\n"], ["\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
206
|
-
var tooltipRightTop = (0, styled_components_1.css)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n bottom: ", ";\n left: 0;\n"], ["\n bottom: ", ";\n left: 0;\n"])), tooltipPositionSpacing);
|
|
207
|
-
var tooltipRightBottom = (0, styled_components_1.css)(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n left: 0;\n top: ", ";\n"], ["\n left: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
208
|
-
var S_TooltipWrapper = styled_components_1.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"])), function (_a) {
|
|
209
|
-
var theme = _a.theme;
|
|
210
|
-
return theme.ui_cpnt_button_tooltip_base;
|
|
211
|
-
}, function (_a) {
|
|
212
|
-
var theme = _a.theme;
|
|
213
|
-
return theme.spacing.spacingA;
|
|
214
|
-
}, function (_a) {
|
|
215
|
-
var theme = _a.theme;
|
|
216
|
-
return "".concat(theme.spacing.spacingA, " ").concat(theme.spacing.spacingB);
|
|
217
|
-
}, function (_a) {
|
|
218
|
-
var isTooltipOpen = _a.isTooltipOpen;
|
|
219
|
-
return !isTooltipOpen && 'display: none';
|
|
220
|
-
}, function (_a) {
|
|
221
|
-
var tooltipPosition = _a.tooltipPosition;
|
|
222
|
-
return tooltipPosition &&
|
|
223
|
-
{
|
|
224
|
-
left_top: tooltipLeftTop,
|
|
225
|
-
left_bottom: tooltipLeftBottom,
|
|
226
|
-
center_top: tooltipCenterTop,
|
|
227
|
-
center_bottom: tooltipCenterBottom,
|
|
228
|
-
right_top: tooltipRightTop,
|
|
229
|
-
right_bottom: tooltipRightBottom
|
|
230
|
-
}[tooltipPosition];
|
|
232
|
+
var S_TooltipWrapper = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n\n ", ";\n"], ["\n ", "\n\n ", ";\n"])), systemUI_1.TooltipWrapperStyle, function (_a) {
|
|
233
|
+
var tooltipPositionCss = _a.tooltipPositionCss;
|
|
234
|
+
return tooltipPositionCss;
|
|
231
235
|
});
|
|
232
236
|
exports.default = IconButton;
|
|
233
|
-
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, templateObject_15
|
|
237
|
+
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, templateObject_15;
|
|
@@ -40,6 +40,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
42
|
var react_1 = require("react");
|
|
43
|
+
var react_dom_1 = require("react-dom");
|
|
44
|
+
var systemUI_1 = require("../../../common/styles/systemUI");
|
|
45
|
+
var SystemUIPositionGenerator_1 = require("../../../common/utils/SystemUIPositionGenerator");
|
|
43
46
|
var components_1 = require("../../../hybrid/components");
|
|
44
47
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
45
48
|
var TextLabel_1 = require("../TextLabel");
|
|
@@ -47,6 +50,39 @@ var constants_1 = require("./constants");
|
|
|
47
50
|
function SegmentedButtonGroup(_a) {
|
|
48
51
|
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, value = _a.value, valueArray = _a.valueArray, _c = _a.selectionType, selectionType = _c === void 0 ? 'single' : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
|
|
49
52
|
var _e = (0, react_1.useState)(null), currentButtonIndex = _e[0], setCurrentButtonIndex = _e[1];
|
|
53
|
+
var _f = (0, react_1.useState)(null), tooltipSizeOffset = _f[0], setTooltipSizeOffset = _f[1];
|
|
54
|
+
var _g = (0, react_1.useState)(null), tooltipPositionOffset = _g[0], setTooltipPositionOffset = _g[1];
|
|
55
|
+
var tooltipRef = (0, react_1.useRef)(null);
|
|
56
|
+
var tooltipPositionTargetRef = (0, react_1.useRef)(null);
|
|
57
|
+
/**
|
|
58
|
+
* @when : hoveredButtonIndex 변경되었을 때
|
|
59
|
+
* @expected : tooltipPositionTargetRef, tooltipRef 의 위치를 업데이트합니다.
|
|
60
|
+
* @clear :
|
|
61
|
+
*/
|
|
62
|
+
(0, react_1.useEffect)(function () {
|
|
63
|
+
if (currentButtonIndex === null) {
|
|
64
|
+
setTooltipSizeOffset(null);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (tooltipPositionTargetRef.current) {
|
|
68
|
+
var _a = tooltipPositionTargetRef.current.getBoundingClientRect(), top_1 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
|
|
69
|
+
var countFromLeft = currentButtonIndex;
|
|
70
|
+
var countFromRight = valueArray.length - (currentButtonIndex + 1);
|
|
71
|
+
var itemSize = constants_1.ICON_BUTTON_SIZE[size];
|
|
72
|
+
setTooltipPositionOffset({
|
|
73
|
+
top: top_1 + window.scrollY,
|
|
74
|
+
right: right + window.scrollX - itemSize * countFromRight,
|
|
75
|
+
bottom: bottom + window.scrollY,
|
|
76
|
+
left: left + window.scrollX + itemSize * countFromLeft
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (tooltipRef.current) {
|
|
80
|
+
setTooltipSizeOffset({
|
|
81
|
+
height: tooltipRef.current.offsetHeight,
|
|
82
|
+
width: tooltipRef.current.offsetWidth
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}, [currentButtonIndex]);
|
|
50
86
|
var handleClick = function (value) {
|
|
51
87
|
if (onClick) {
|
|
52
88
|
onClick(value);
|
|
@@ -75,9 +111,20 @@ function SegmentedButtonGroup(_a) {
|
|
|
75
111
|
}
|
|
76
112
|
return 'ui_cpnt_button_icon_enabled';
|
|
77
113
|
};
|
|
78
|
-
return ((0, jsx_runtime_1.jsx)(S_SegmentedButtonGroupGroups, __assign({ "x-pds-name": "SegmentedButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop", selectionType: selectionType }, { children: valueArray.map(function (_a, index) {
|
|
79
|
-
var currentButtonValue = _a.value, iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? '
|
|
80
|
-
|
|
114
|
+
return ((0, jsx_runtime_1.jsx)(S_SegmentedButtonGroupGroups, __assign({ "x-pds-name": "SegmentedButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop", selectionType: selectionType, ref: tooltipPositionTargetRef }, { children: valueArray.map(function (_a, index) {
|
|
115
|
+
var currentButtonValue = _a.value, iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e;
|
|
116
|
+
var tooltipPositionCss = (0, SystemUIPositionGenerator_1.hoverTypeSystemUICssGenerator)({
|
|
117
|
+
baseSize: constants_1.ICON_BUTTON_SIZE[size],
|
|
118
|
+
sizeOffset: tooltipSizeOffset,
|
|
119
|
+
positionOffset: tooltipPositionOffset,
|
|
120
|
+
systemUIPosition: tooltipPosition.includes('_')
|
|
121
|
+
? tooltipPosition
|
|
122
|
+
: "center_".concat(tooltipPosition)
|
|
123
|
+
});
|
|
124
|
+
var isCurrentButton = index === currentButtonIndex;
|
|
125
|
+
return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue), onPointerEnter: function () { return setCurrentButtonIndex(index); }, onPointerLeave: function () { return setCurrentButtonIndex(null); } }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }), tooltipText &&
|
|
126
|
+
isCurrentButton &&
|
|
127
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })), document.body)] }), String(currentButtonValue)));
|
|
81
128
|
}) })));
|
|
82
129
|
}
|
|
83
130
|
var S_SegmentedButtonGroupGroups = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
|
|
@@ -150,44 +197,9 @@ var S_BasicButton = styled_components_1.default.button(templateObject_5 || (temp
|
|
|
150
197
|
var theme = _a.theme;
|
|
151
198
|
return theme.ui_cpnt_segmentedbuttongroup_base_disabled;
|
|
152
199
|
});
|
|
153
|
-
var
|
|
154
|
-
var
|
|
155
|
-
return
|
|
156
|
-
{
|
|
157
|
-
large: constants_1.TOOLTIP_POSITION_SPACING.large,
|
|
158
|
-
medium: constants_1.TOOLTIP_POSITION_SPACING.medium,
|
|
159
|
-
small: constants_1.TOOLTIP_POSITION_SPACING.small
|
|
160
|
-
}[size];
|
|
161
|
-
});
|
|
162
|
-
var tooltipLeftTop = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n bottom: ", ";\n right: 0;\n"], ["\n bottom: ", ";\n right: 0;\n"])), tooltipPositionSpacing);
|
|
163
|
-
var tooltipLeftBottom = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n right: 0;\n top: ", ";\n"], ["\n right: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
164
|
-
var tooltipCenterTop = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n bottom: ", ";\n"], ["\n bottom: ", ";\n"])), tooltipPositionSpacing);
|
|
165
|
-
var tooltipCenterBottom = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n top: ", ";\n"], ["\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
166
|
-
var tooltipRightTop = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n bottom: ", ";\n left: 0;\n"], ["\n bottom: ", ";\n left: 0;\n"])), tooltipPositionSpacing);
|
|
167
|
-
var tooltipRightBottom = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n left: 0;\n top: ", ";\n"], ["\n left: 0;\n top: ", ";\n"])), tooltipPositionSpacing);
|
|
168
|
-
var S_TooltipWrapper = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n padding: ", ";\n position: absolute;\n width: max-content;\n z-index: 400;\n\n ", ";\n\n ", "\n"])), function (_a) {
|
|
169
|
-
var theme = _a.theme;
|
|
170
|
-
return theme.ui_cpnt_button_tooltip_base;
|
|
171
|
-
}, function (_a) {
|
|
172
|
-
var theme = _a.theme;
|
|
173
|
-
return theme.spacing.spacingA;
|
|
174
|
-
}, function (_a) {
|
|
175
|
-
var theme = _a.theme;
|
|
176
|
-
return "".concat(theme.spacing.spacingA, " ").concat(theme.spacing.spacingB);
|
|
177
|
-
}, function (_a) {
|
|
178
|
-
var isTooltipOpen = _a.isTooltipOpen;
|
|
179
|
-
return !isTooltipOpen && 'display: none';
|
|
180
|
-
}, function (_a) {
|
|
181
|
-
var tooltipPosition = _a.tooltipPosition;
|
|
182
|
-
return tooltipPosition &&
|
|
183
|
-
{
|
|
184
|
-
left_top: tooltipLeftTop,
|
|
185
|
-
left_bottom: tooltipLeftBottom,
|
|
186
|
-
center_top: tooltipCenterTop,
|
|
187
|
-
center_bottom: tooltipCenterBottom,
|
|
188
|
-
right_top: tooltipRightTop,
|
|
189
|
-
right_bottom: tooltipRightBottom
|
|
190
|
-
}[tooltipPosition];
|
|
200
|
+
var S_TooltipWrapper = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n\n ", ";\n"], ["\n ", "\n\n ", ";\n"])), systemUI_1.TooltipWrapperStyle, function (_a) {
|
|
201
|
+
var tooltipPositionCss = _a.tooltipPositionCss;
|
|
202
|
+
return tooltipPositionCss;
|
|
191
203
|
});
|
|
192
204
|
exports.default = SegmentedButtonGroup;
|
|
193
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6
|
|
205
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ICON_BUTTON_SIZE = void 0;
|
|
4
4
|
exports.ICON_BUTTON_SIZE = {
|
|
5
5
|
large: 48,
|
|
6
6
|
medium: 40,
|
|
7
7
|
small: 32
|
|
8
8
|
};
|
|
9
|
-
exports.ICON_BUTTON_TOOLTIP_SPACING = 8;
|
|
10
|
-
// NOTE - iconSize 크기에 따라 위치를 이동시켜주고, iconButtonSize에 간격까지 8px을 추가해준 값입니다.(IconButton과 tooltip의 간격)
|
|
11
|
-
exports.TOOLTIP_POSITION_SPACING = {
|
|
12
|
-
large: "calc(".concat(exports.ICON_BUTTON_SIZE.large, "px + ").concat(exports.ICON_BUTTON_TOOLTIP_SPACING, "px)"),
|
|
13
|
-
medium: "calc(".concat(exports.ICON_BUTTON_SIZE.medium, "px + ").concat(exports.ICON_BUTTON_TOOLTIP_SPACING, "px)"),
|
|
14
|
-
small: "calc(".concat(exports.ICON_BUTTON_SIZE.small, "px + ").concat(exports.ICON_BUTTON_TOOLTIP_SPACING, "px)")
|
|
15
|
-
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PDSTextType, UiColors } from '../../../common';
|
|
3
|
+
import type { TextCaseTooltipPositionType } from '../../../common/types/systemUI';
|
|
3
4
|
export type TextLabelProps = {
|
|
4
5
|
text: PDSTextType;
|
|
5
6
|
tooltipText?: PDSTextType;
|
|
6
|
-
|
|
7
|
+
/** @deprecated 'left_top', 'left_bottom', 'right_top', 'right_bottom' will replace 'top' or 'bottom' */
|
|
8
|
+
tooltipPosition?: TextCaseTooltipPositionType;
|
|
7
9
|
tooltipIconColorKey?: UiColors;
|
|
8
10
|
textAlign?: 'left' | 'center' | 'right';
|
|
9
11
|
styleTheme?: 'displayBold' | 'wizardPageTitleBold' | 'headingBold' | 'leadParaBold' | 'leadParaRegular' | 'subTitleBold' | 'subTitleRegular' | 'body1Bold' | 'body1Regular' | 'body2Bold' | 'body2Regular' | 'caption1Bold' | 'caption1Regular' | 'caption2Bold' | 'caption2Regular' | 'form1Regular' | 'form1Bold' | 'form2Regular' | 'form2Bold' | 'blog1Regular';
|