pds-dev-kit-web-test 0.0.6 → 0.0.9
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/README.md +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -3
- package/dist/src/GlobalStyle.js +1 -1
- package/dist/src/common/assets/icons/line/Coins.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Coins.js +34 -0
- package/dist/src/common/assets/icons/line/Ghost.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Ghost.js +36 -0
- package/dist/src/common/assets/icons/line/Home.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Home.js +36 -0
- package/dist/src/common/assets/icons/line/PaymentFreeTrial.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PaymentFreeTrial.js +34 -0
- package/dist/src/common/assets/icons/line/PaymentOnetime.js +1 -1
- package/dist/src/common/assets/icons/line/PaymentRegularly.js +2 -1
- package/dist/src/common/assets/icons/line/PostColumn.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PostColumn.js +34 -0
- package/dist/src/common/assets/icons/line/PostPaperPlane.d.ts +4 -0
- package/dist/src/common/assets/icons/line/PostPaperPlane.js +36 -0
- package/dist/src/common/assets/icons/line/index.d.ts +6 -0
- package/dist/src/common/assets/icons/line/index.js +12 -0
- package/dist/src/common/components/BoxLayout/Row.js +1 -1
- package/dist/src/common/components/Navigations/ContextTextLabelNav.d.ts +3 -2
- package/dist/src/common/components/Navigations/ContextTextLabelNav.js +10 -5
- package/dist/src/common/hooks/useDetectOverflow.js +1 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +4 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +4 -1
- package/dist/src/common/styles/colorSet/UIColor.json +20 -1
- package/dist/src/common/styles/colorSet/index.d.ts +202 -177
- package/dist/src/common/styles/colorSet/index.js +3 -3
- package/dist/src/common/styles/colorSet/ui-type.d.ts +19 -0
- package/dist/src/common/styles/theme.js +8 -8
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +2 -1
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +6 -6
- package/dist/src/desktop/components/AdminList/AdminList.d.ts +20 -11
- package/dist/src/desktop/components/AdminList/AdminList.js +5 -28
- package/dist/src/desktop/components/AdminList/BulkActionBar.d.ts +7 -1
- package/dist/src/desktop/components/AdminList/BulkActionBar.js +4 -4
- package/dist/src/desktop/components/AdminListHeader/HeaderBar.js +1 -1
- package/dist/src/desktop/components/AdminListItem/AdminListItem.d.ts +2 -2
- package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.d.ts +15 -0
- package/dist/src/desktop/components/BasicChatListItem/BasicChatListItem.js +121 -0
- package/dist/src/desktop/components/BasicChatListItem/Popup.d.ts +19 -0
- package/dist/src/desktop/components/BasicChatListItem/Popup.js +238 -0
- package/dist/src/desktop/components/BasicChatListItem/index.d.ts +1 -0
- package/dist/src/desktop/components/BasicChatListItem/index.js +8 -0
- package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.d.ts +4 -1
- package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.js +4 -4
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubble.d.ts +8 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubble.js +76 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +17 -0
- package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +160 -0
- package/dist/src/desktop/components/ChatBubbleListItem/Popup.d.ts +19 -0
- package/dist/src/desktop/components/ChatBubbleListItem/Popup.js +238 -0
- package/dist/src/desktop/components/ChatBubbleListItem/index.d.ts +1 -0
- package/dist/src/desktop/components/ChatBubbleListItem/index.js +8 -0
- package/dist/src/desktop/components/ChatList/Body.d.ts +7 -0
- package/dist/src/desktop/components/ChatList/Body.js +108 -0
- package/dist/src/desktop/components/ChatList/ChatList.d.ts +45 -0
- package/dist/src/desktop/components/ChatList/ChatList.js +105 -0
- package/dist/src/desktop/components/ChatList/ChatTextField.d.ts +25 -0
- package/dist/src/desktop/components/ChatList/ChatTextField.js +59 -0
- package/dist/src/desktop/components/ChatList/Footer.d.ts +25 -0
- package/dist/src/desktop/components/ChatList/Footer.js +27 -0
- package/dist/src/desktop/components/ChatList/Header.d.ts +5 -0
- package/dist/src/desktop/components/ChatList/Header.js +53 -0
- package/dist/src/desktop/components/ChatList/index.d.ts +1 -0
- package/dist/src/desktop/components/ChatList/index.js +8 -0
- package/dist/src/desktop/components/ChatList/useAutoScrollToBottom.d.ts +10 -0
- package/dist/src/desktop/components/ChatList/useAutoScrollToBottom.js +53 -0
- package/dist/src/desktop/components/Chip/Chip.js +14 -14
- package/dist/src/desktop/components/ContextMenu/ContextMenu.d.ts +2 -1
- package/dist/src/desktop/components/ContextMenu/ContextMenu.js +14 -5
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +4 -4
- package/dist/src/desktop/components/DesktopTabBar/DesktopTabBar.js +41 -47
- package/dist/src/desktop/components/Dropdown/Dropdown.d.ts +3 -3
- package/dist/src/desktop/components/Dropdown/Dropdown.js +51 -19
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/PrimaryMenu.js +1 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/SecondaryMenu.js +1 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ContextMenuNavs/ContextMenuItemNav.js +5 -39
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/IconNav.d.ts +2 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/IconNav.js +2 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ImageIconNav.d.ts +2 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/ImageIconNav.js +2 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/MenuItemNav.d.ts +1 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/MenuItemNav.js +2 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/InternalLinkMenuItemNav.d.ts +1 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/InternalLinkMenuItemNav.js +4 -4
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/PAppMenuItemNav.d.ts +1 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/PAppMenuItemNav.js +1 -1
- package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.d.ts +2 -1
- package/dist/src/desktop/components/EditApplyTextField/EditApplyTextField.js +12 -11
- package/dist/src/desktop/components/FilterBar/FilterBar.js +1 -1
- package/dist/src/desktop/components/MainButton/MainButton.js +5 -5
- package/dist/src/desktop/components/Select/Select.d.ts +3 -2
- package/dist/src/desktop/components/Select/Select.js +11 -5
- package/dist/src/desktop/components/StatusBlock/StatusBlock.js +11 -5
- package/dist/src/desktop/components/TextButton/TextButton.js +5 -5
- package/dist/src/desktop/components/TextField/TextField.d.ts +3 -1
- package/dist/src/desktop/components/TextField/TextField.js +17 -11
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +7 -7
- package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +5 -5
- package/dist/src/desktop/components/UserDesktopNavBar/UserDesktopNavBar.js +4 -1
- package/dist/src/desktop/components/index.d.ts +4 -1
- package/dist/src/desktop/components/index.js +7 -1
- package/dist/src/desktop/index.d.ts +2 -2
- package/dist/src/desktop/index.js +5 -2
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/ContentsContainer.js +2 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFE.d.ts +2 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFE.js +41 -11
- package/dist/src/desktop/layout/LayoutWF/ContainersBox/ContainersBox.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWF/ContainersBox/ContainersBox.js +2 -0
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/ContentsContainer.js +2 -1
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSG.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWS/Containers/ContentsContainer/variation/WSG.js +16 -10
- package/dist/src/desktop/layout/LayoutWS/ContainersBox/ContainersBox.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/ContentsContainer.js +9 -6
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTN.d.ts +3 -2
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTN.js +2 -2
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTO.d.ts +3 -2
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTO.js +8 -10
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTP.d.ts +3 -2
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTP.js +8 -10
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTQ.js +5 -5
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTT.d.ts +11 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTT.js +65 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.d.ts +13 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/WTU.js +96 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.d.ts +2 -0
- package/dist/src/desktop/layout/LayoutWT/Containers/ContentsContainer/variation/index.js +5 -1
- package/dist/src/desktop/layout/LayoutWT/Containers/SubMenuContainer/variation/LeftSubMenu.js +1 -1
- package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.d.ts +1 -1
- package/dist/src/desktop/layout/LayoutWT/ContainersBox/ContainersBox.js +20 -11
- package/dist/src/desktop/panels/DesktopBasicModal/DesktopBasicModal.js +7 -4
- package/dist/src/hybrid/components/Divider/Divider.js +4 -1
- package/dist/src/hybrid/components/Spacing/Spacing.js +1 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +2 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +6 -6
- package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.d.ts +15 -0
- package/dist/src/mobile/components/BasicChatListItem/BasicChatListItem.js +121 -0
- package/dist/src/mobile/components/BasicChatListItem/Popup.d.ts +19 -0
- package/dist/src/mobile/components/BasicChatListItem/Popup.js +238 -0
- package/dist/src/mobile/components/BasicChatListItem/index.d.ts +1 -0
- package/dist/src/mobile/components/BasicChatListItem/index.js +8 -0
- package/dist/src/mobile/components/BodyTextGroup/BodyTextGroup.d.ts +4 -1
- package/dist/src/mobile/components/BodyTextGroup/BodyTextGroup.js +4 -4
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubble.d.ts +8 -0
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubble.js +76 -0
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +17 -0
- package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +160 -0
- package/dist/src/mobile/components/ChatBubbleListItem/Popup.d.ts +19 -0
- package/dist/src/mobile/components/ChatBubbleListItem/Popup.js +238 -0
- package/dist/src/mobile/components/ChatBubbleListItem/index.d.ts +1 -0
- package/dist/src/mobile/components/ChatBubbleListItem/index.js +8 -0
- package/dist/src/mobile/components/ChatList/Body.d.ts +7 -0
- package/dist/src/mobile/components/ChatList/Body.js +109 -0
- package/dist/src/mobile/components/ChatList/ChatList.d.ts +45 -0
- package/dist/src/mobile/components/ChatList/ChatList.js +105 -0
- package/dist/src/mobile/components/ChatList/ChatTextField.d.ts +25 -0
- package/dist/src/mobile/components/ChatList/ChatTextField.js +59 -0
- package/dist/src/mobile/components/ChatList/Footer.d.ts +25 -0
- package/dist/src/mobile/components/ChatList/Footer.js +27 -0
- package/dist/src/mobile/components/ChatList/Header.d.ts +5 -0
- package/dist/src/mobile/components/ChatList/Header.js +53 -0
- package/dist/src/mobile/components/ChatList/index.d.ts +1 -0
- package/dist/src/mobile/components/ChatList/index.js +8 -0
- package/dist/src/mobile/components/ChatList/useAutoScrollToBottom.d.ts +10 -0
- package/dist/src/mobile/components/ChatList/useAutoScrollToBottom.js +53 -0
- package/dist/src/mobile/components/Chip/Chip.js +14 -14
- package/dist/src/mobile/components/ContextMenu/ContextMenu.d.ts +2 -1
- package/dist/src/mobile/components/ContextMenu/ContextMenu.js +14 -5
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +4 -4
- package/dist/src/mobile/components/Dropdown/Dropdown.d.ts +3 -3
- package/dist/src/mobile/components/Dropdown/Dropdown.js +51 -19
- package/dist/src/mobile/components/MainButton/MainButton.js +5 -5
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.d.ts +2 -1
- package/dist/src/mobile/components/MobileHeaderBar/MobileHeaderBar.js +23 -13
- package/dist/src/mobile/components/Select/Select.d.ts +3 -2
- package/dist/src/mobile/components/Select/Select.js +11 -5
- package/dist/src/mobile/components/StatusBlock/StatusBlock.js +4 -4
- package/dist/src/mobile/components/TextButton/TextButton.js +4 -4
- package/dist/src/mobile/components/TextField/TextField.d.ts +3 -1
- package/dist/src/mobile/components/TextField/TextField.js +17 -11
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +7 -7
- package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +5 -5
- package/dist/src/mobile/components/index.d.ts +4 -1
- package/dist/src/mobile/components/index.js +7 -1
- package/dist/src/mobile/index.d.ts +2 -2
- package/dist/src/mobile/index.js +4 -1
- package/package.json +1 -1
- package/release-note.md +4 -2
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var react_1 = __importStar(require("react"));
|
|
41
|
+
var react_hook_form_1 = require("react-hook-form");
|
|
42
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
43
|
+
var hybrid_1 = require("../../../hybrid");
|
|
44
|
+
var Body_1 = __importDefault(require("./Body"));
|
|
45
|
+
var Footer_1 = __importDefault(require("./Footer"));
|
|
46
|
+
var Header_1 = __importDefault(require("./Header"));
|
|
47
|
+
var baseBackgroundColors = {
|
|
48
|
+
solid: 'ui_cpnt_list_base_area_solid',
|
|
49
|
+
translucent: 'ui_cpnt_list_base_area_translucent',
|
|
50
|
+
transparent: 'ui_cpnt_list_base_area_translucent'
|
|
51
|
+
};
|
|
52
|
+
var ChatList = react_1.default.forwardRef(function (_a, ref) {
|
|
53
|
+
var _b = _a.styleTheme, styleTheme = _b === void 0 ? 'solid' : _b, _c = _a.headerMode, headerMode = _c === void 0 ? 'use' : _c, titleText = _a.titleText, descText = _a.descText, captionText = _a.captionText, _d = _a.titleStyleTheme, titleStyleTheme = _d === void 0 ? 'subTitleBold' : _d, _e = _a.headerDisplayType, headerDisplayType = _e === void 0 ? 'none' : _e, _f = _a.headerIBtn1IconName, headerIBtn1IconName = _f === void 0 ? 'ic_xmark' : _f, _g = _a.headerIBtn1IconFillType, headerIBtn1IconFillType = _g === void 0 ? 'line' : _g, children = _a.children, _h = _a.textFieldState, textFieldState = _h === void 0 ? 'normal' : _h, textFieldHintText = _a.textFieldHintText, textFieldDefaultText = _a.textFieldDefaultText, textFieldMaxLength = _a.textFieldMaxLength, _j = _a.scrollVisibleType, scrollVisibleType = _j === void 0 ? 'moving' : _j, footerChildren = _a.footerChildren, _k = _a.submitIBtnState, submitIBtnState = _k === void 0 ? 'normal' : _k, bodyMBtnText = _a.bodyMBtnText, _l = _a.bodySpacingMode, bodySpacingMode = _l === void 0 ? 'none' : _l, onSubmit = _a.onSubmit, onClickHeaderIBtn1 = _a.onClickHeaderIBtn1, submitIBtnIconName = _a.submitIBtnIconName, submitIBtnIconFillType = _a.submitIBtnIconFillType, _m = _a.footerIBtn1State, footerIBtn1State = _m === void 0 ? 'normal' : _m, footerIBtn1IconName = _a.footerIBtn1IconName, footerIBtn1IconFillType = _a.footerIBtn1IconFillType, _o = _a.footerIBtn1Type, footerIBtn1Type = _o === void 0 ? 'button' : _o, onClickFooterIBtn1 = _a.onClickFooterIBtn1, _p = _a.footerIBtn2State, footerIBtn2State = _p === void 0 ? 'normal' : _p, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn2IconFillType = _a.footerIBtn2IconFillType, _q = _a.footerIBtn2Type, footerIBtn2Type = _q === void 0 ? 'button' : _q, onClickFooterIBtn2 = _a.onClickFooterIBtn2, _r = _a.footerIBtn3State, footerIBtn3State = _r === void 0 ? 'normal' : _r, footerIBtn3IconName = _a.footerIBtn3IconName, footerIBtn3IconFillType = _a.footerIBtn3IconFillType, _s = _a.footerIBtn3Type, footerIBtn3Type = _s === void 0 ? 'button' : _s, footerIBtn3Accept = _a.footerIBtn3Accept, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
|
|
54
|
+
var methods = (0, react_hook_form_1.useForm)({
|
|
55
|
+
mode: 'onChange',
|
|
56
|
+
defaultValues: {
|
|
57
|
+
chat: ''
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
var reset = methods.reset, handleSubmit = methods.handleSubmit, control = methods.control, _t = methods.formState, isValid = _t.isValid, isDirty = _t.isDirty, isSubmitSuccessful = _t.isSubmitSuccessful;
|
|
61
|
+
/**
|
|
62
|
+
* @when 폼 제출에 성공했을 시
|
|
63
|
+
* @expected 폼을 초기화합니다.
|
|
64
|
+
* @clear -
|
|
65
|
+
*/
|
|
66
|
+
(0, react_1.useEffect)(function () {
|
|
67
|
+
if (isSubmitSuccessful) {
|
|
68
|
+
reset();
|
|
69
|
+
}
|
|
70
|
+
}, [isSubmitSuccessful]);
|
|
71
|
+
var inputValue = (0, react_hook_form_1.useWatch)({ name: 'chat', control: control });
|
|
72
|
+
var isSubmitButtonActive = (0, react_1.useMemo)(function () {
|
|
73
|
+
if (!submitIBtnState) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return isDirty && isValid && inputValue.length > 0 && submitIBtnState === 'normal';
|
|
77
|
+
}, [isDirty, isValid, inputValue, submitIBtnState]);
|
|
78
|
+
var handleSubmitChat = function (_a) {
|
|
79
|
+
var chat = _a.chat;
|
|
80
|
+
if (!chat || !isSubmitButtonActive) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
onSubmit(chat);
|
|
84
|
+
};
|
|
85
|
+
var callBackAfterScrollToBottom = function () {
|
|
86
|
+
reset();
|
|
87
|
+
};
|
|
88
|
+
return (react_1.default.createElement(S_ChatList, { backgroundColor: baseBackgroundColors[styleTheme], id: "chatList" },
|
|
89
|
+
headerMode === 'use' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
90
|
+
react_1.default.createElement(Header_1.default, { styleTheme: styleTheme, titleText: titleText, descText: descText, captionText: captionText, titleStyleTheme: titleStyleTheme, headerDisplayType: headerDisplayType, headerIBtn1IconName: headerIBtn1IconName, headerIBtn1IconFillType: headerIBtn1IconFillType, onClickHeaderIBtn1: onClickHeaderIBtn1 }),
|
|
91
|
+
react_1.default.createElement(hybrid_1.Divider, null))),
|
|
92
|
+
react_1.default.createElement(Body_1.default, { scrollVisibleType: scrollVisibleType, isSubmitted: isSubmitSuccessful, bodyMBtnText: bodyMBtnText, bodySpacingMode: bodySpacingMode, callBackAfterScrollToBottom: callBackAfterScrollToBottom, ref: ref }, children),
|
|
93
|
+
react_1.default.createElement(hybrid_1.Divider, null),
|
|
94
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" }),
|
|
95
|
+
react_1.default.createElement(react_hook_form_1.FormProvider, __assign({}, methods),
|
|
96
|
+
react_1.default.createElement("form", { onSubmit: handleSubmit(handleSubmitChat) },
|
|
97
|
+
react_1.default.createElement(Footer_1.default, { textFieldDefaultText: textFieldDefaultText, textFieldHintText: textFieldHintText, textFieldState: textFieldState, textFieldMaxLength: textFieldMaxLength, footerChildren: footerChildren, isSubmitBtnActive: isSubmitButtonActive, submitIBtnIconName: submitIBtnIconName, submitIBtnIconFillType: submitIBtnIconFillType, footerIBtn1State: footerIBtn1State, footerIBtn1IconName: footerIBtn1IconName, footerIBtn1IconFillType: footerIBtn1IconFillType, footerIBtn1Type: footerIBtn1Type, onClickFooterIBtn1: onClickFooterIBtn1, footerIBtn2State: footerIBtn2State, footerIBtn2IconName: footerIBtn2IconName, footerIBtn2IconFillType: footerIBtn2IconFillType, footerIBtn2Type: footerIBtn2Type, onClickFooterIBtn2: onClickFooterIBtn2, footerIBtn3State: footerIBtn3State, footerIBtn3IconName: footerIBtn3IconName, footerIBtn3IconFillType: footerIBtn3IconFillType, footerIBtn3Type: footerIBtn3Type, footerIBtn3Accept: footerIBtn3Accept, onClickFooterIBtn3: onClickFooterIBtn3 }))),
|
|
98
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_d" })));
|
|
99
|
+
});
|
|
100
|
+
var S_ChatList = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n"], ["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n"])), function (_a) {
|
|
101
|
+
var backgroundColor = _a.backgroundColor, theme = _a.theme;
|
|
102
|
+
return theme[backgroundColor];
|
|
103
|
+
});
|
|
104
|
+
exports.default = ChatList;
|
|
105
|
+
var templateObject_1;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
|
|
3
|
+
import type { Props as ChatListProps } from './ChatList';
|
|
4
|
+
declare type Props = Pick<ChatListProps, 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength' | 'footerIBtn3Accept'> & {
|
|
5
|
+
isSubmitBtnActive?: boolean;
|
|
6
|
+
submitIBtnIconName?: FillIconNameKeys | LineIconNameKeys;
|
|
7
|
+
submitIBtnIconFillType?: 'fill' | 'line';
|
|
8
|
+
footerIBtn1State?: 'disabled' | 'normal';
|
|
9
|
+
footerIBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
10
|
+
footerIBtn1IconFillType?: 'fill' | 'line';
|
|
11
|
+
footerIBtn1Type?: 'button' | 'upload';
|
|
12
|
+
onClickFooterIBtn1?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
|
+
footerIBtn2State?: 'disabled' | 'normal';
|
|
14
|
+
footerIBtn2IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
15
|
+
footerIBtn2IconFillType?: 'fill' | 'line';
|
|
16
|
+
footerIBtn2Type?: 'button' | 'upload';
|
|
17
|
+
onClickFooterIBtn2?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
18
|
+
footerIBtn3State?: 'disabled' | 'normal';
|
|
19
|
+
footerIBtn3IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
20
|
+
footerIBtn3IconFillType?: 'fill' | 'line';
|
|
21
|
+
footerIBtn3Type?: 'button' | 'upload';
|
|
22
|
+
onClickFooterIBtn3?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
23
|
+
};
|
|
24
|
+
declare function ChatTextField({ textFieldDefaultText, textFieldHintText, textFieldState, textFieldMaxLength, isSubmitBtnActive, submitIBtnIconName, submitIBtnIconFillType, footerIBtn1State, footerIBtn1IconName, footerIBtn1IconFillType, footerIBtn1Type, onClickFooterIBtn1, footerIBtn2State, footerIBtn2IconName, footerIBtn2IconFillType, footerIBtn2Type, onClickFooterIBtn2, footerIBtn3State, footerIBtn3IconName, footerIBtn3IconFillType, footerIBtn3Type, footerIBtn3Accept, onClickFooterIBtn3 }: Props): JSX.Element;
|
|
25
|
+
export default ChatTextField;
|
|
@@ -0,0 +1,59 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
var react_1 = __importDefault(require("react"));
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var IconButton_1 = require("../IconButton");
|
|
13
|
+
var TextField_1 = require("../TextField");
|
|
14
|
+
var UploadIconButton_1 = require("../UploadIconButton");
|
|
15
|
+
function ChatTextField(_a) {
|
|
16
|
+
var textFieldDefaultText = _a.textFieldDefaultText, textFieldHintText = _a.textFieldHintText, textFieldState = _a.textFieldState, textFieldMaxLength = _a.textFieldMaxLength, isSubmitBtnActive = _a.isSubmitBtnActive, _b = _a.submitIBtnIconName, submitIBtnIconName = _b === void 0 ? 'ic_paper_plane' : _b, _c = _a.submitIBtnIconFillType, submitIBtnIconFillType = _c === void 0 ? 'fill' : _c, footerIBtn1State = _a.footerIBtn1State, footerIBtn1IconName = _a.footerIBtn1IconName, footerIBtn1IconFillType = _a.footerIBtn1IconFillType, footerIBtn1Type = _a.footerIBtn1Type, onClickFooterIBtn1 = _a.onClickFooterIBtn1, footerIBtn2State = _a.footerIBtn2State, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn2IconFillType = _a.footerIBtn2IconFillType, footerIBtn2Type = _a.footerIBtn2Type, onClickFooterIBtn2 = _a.onClickFooterIBtn2, footerIBtn3State = _a.footerIBtn3State, footerIBtn3IconName = _a.footerIBtn3IconName, footerIBtn3IconFillType = _a.footerIBtn3IconFillType, footerIBtn3Type = _a.footerIBtn3Type, footerIBtn3Accept = _a.footerIBtn3Accept, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
|
|
17
|
+
var chatValidation = {
|
|
18
|
+
validate: function (value) {
|
|
19
|
+
if (!value)
|
|
20
|
+
return true;
|
|
21
|
+
return value.trim().length ? true : false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
25
|
+
react_1.default.createElement(S_FooterContentWrapper, { footerIBtn2IconName: footerIBtn2IconName, footerIBtn3IconName: footerIBtn3IconName },
|
|
26
|
+
footerIBtn3IconName && (react_1.default.createElement(react_1.default.Fragment, null, footerIBtn3Type === 'button' ? (react_1.default.createElement(IconButton_1.IconButton, { iconName: footerIBtn3IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn3State === 'normal'
|
|
27
|
+
? 'ui_cpnt_button_icon_primary'
|
|
28
|
+
: 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn3IconFillType, iconSize: 24, state: footerIBtn3State, onClick: onClickFooterIBtn3 })) : (react_1.default.createElement(UploadIconButton_1.UploadIconButton, { iconName: footerIBtn3IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn3State === 'normal'
|
|
29
|
+
? 'ui_cpnt_button_icon_primary'
|
|
30
|
+
: 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn3IconFillType, iconSize: 24, state: footerIBtn3State, accept: footerIBtn3Accept, onClick: onClickFooterIBtn3 })))),
|
|
31
|
+
footerIBtn2IconName && (react_1.default.createElement(react_1.default.Fragment, null, footerIBtn2Type === 'button' ? (react_1.default.createElement(IconButton_1.IconButton, { iconName: footerIBtn2IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn2State === 'normal'
|
|
32
|
+
? 'ui_cpnt_button_icon_primary'
|
|
33
|
+
: 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn2IconFillType, iconSize: 24, state: footerIBtn2State, onClick: onClickFooterIBtn2 })) : (react_1.default.createElement(UploadIconButton_1.UploadIconButton, { iconName: footerIBtn2IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn2State === 'normal'
|
|
34
|
+
? 'ui_cpnt_button_icon_primary'
|
|
35
|
+
: 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn2IconFillType, iconSize: 24, state: footerIBtn2State, onClick: onClickFooterIBtn2 })))),
|
|
36
|
+
react_1.default.createElement(S_TextFieldWrapper, null,
|
|
37
|
+
react_1.default.createElement(TextField_1.TextField, { name: "chat", responsiveMode: "use", textLineType: "single", inputType: "text", hintText: textFieldHintText, defaultText: textFieldDefaultText, validation: chatValidation, maxLength: textFieldMaxLength, enterSubmitMode: "use", validationPoint: "onChange", state: textFieldState, autoComplete: "off" })),
|
|
38
|
+
footerIBtn1IconName && (react_1.default.createElement(react_1.default.Fragment, null, footerIBtn1Type === 'button' ? (react_1.default.createElement(IconButton_1.IconButton, { iconName: footerIBtn1IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn1State === 'normal'
|
|
39
|
+
? 'ui_cpnt_button_icon_primary'
|
|
40
|
+
: 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn1IconFillType, iconSize: 24, state: footerIBtn1State, onClick: onClickFooterIBtn1 })) : (react_1.default.createElement(UploadIconButton_1.UploadIconButton, { iconName: footerIBtn1IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: footerIBtn1State === 'normal'
|
|
41
|
+
? 'ui_cpnt_button_icon_primary'
|
|
42
|
+
: 'ui_cpnt_button_icon_disabled', iconFillType: footerIBtn1IconFillType, iconSize: 24, state: footerIBtn1State, onClick: onClickFooterIBtn1 })))),
|
|
43
|
+
react_1.default.createElement(IconButton_1.IconButton, { iconName: submitIBtnIconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: isSubmitBtnActive ? 'ui_cpnt_button_icon_primary' : 'ui_cpnt_button_icon_disabled', iconFillType: submitIBtnIconFillType, iconSize: 24, type: "submit", state: isSubmitBtnActive ? 'normal' : 'disabled' }))));
|
|
44
|
+
}
|
|
45
|
+
var S_FooterContentWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
46
|
+
var theme = _a.theme, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn3IconName = _a.footerIBtn3IconName;
|
|
47
|
+
return footerIBtn2IconName || footerIBtn3IconName
|
|
48
|
+
? "" + theme.spacing.spacingC
|
|
49
|
+
: "" + theme.spacing.spacingE;
|
|
50
|
+
}, function (_a) {
|
|
51
|
+
var theme = _a.theme;
|
|
52
|
+
return theme.spacing.spacingC;
|
|
53
|
+
});
|
|
54
|
+
var S_TextFieldWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n margin-right: ", ";\n"], ["\n flex: 1;\n margin-right: ", ";\n"])), function (_a) {
|
|
55
|
+
var theme = _a.theme;
|
|
56
|
+
return theme.spacing.spacingB;
|
|
57
|
+
});
|
|
58
|
+
exports.default = ChatTextField;
|
|
59
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FillIconNameKeys, LineIconNameKeys } from '../../../common';
|
|
3
|
+
import type { Props as ChatListProps } from './ChatList';
|
|
4
|
+
declare type Props = Pick<ChatListProps, 'footerChildren' | 'textFieldDefaultText' | 'textFieldHintText' | 'textFieldState' | 'textFieldMaxLength' | 'footerIBtn3Accept'> & {
|
|
5
|
+
isSubmitBtnActive: boolean;
|
|
6
|
+
submitIBtnIconName?: FillIconNameKeys | LineIconNameKeys;
|
|
7
|
+
submitIBtnIconFillType?: 'fill' | 'line';
|
|
8
|
+
footerIBtn1State?: 'disabled' | 'normal';
|
|
9
|
+
footerIBtn1IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
10
|
+
footerIBtn1IconFillType?: 'fill' | 'line';
|
|
11
|
+
footerIBtn1Type?: 'button' | 'upload';
|
|
12
|
+
onClickFooterIBtn1?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
|
+
footerIBtn2State?: 'disabled' | 'normal';
|
|
14
|
+
footerIBtn2IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
15
|
+
footerIBtn2IconFillType?: 'fill' | 'line';
|
|
16
|
+
footerIBtn2Type?: 'button' | 'upload';
|
|
17
|
+
onClickFooterIBtn2?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
18
|
+
footerIBtn3State?: 'disabled' | 'normal';
|
|
19
|
+
footerIBtn3IconName?: FillIconNameKeys | LineIconNameKeys;
|
|
20
|
+
footerIBtn3IconFillType?: 'fill' | 'line';
|
|
21
|
+
footerIBtn3Type?: 'button' | 'upload';
|
|
22
|
+
onClickFooterIBtn3?: (e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
23
|
+
};
|
|
24
|
+
declare function Footer({ footerChildren, textFieldDefaultText, textFieldHintText, textFieldState, textFieldMaxLength, submitIBtnIconName, submitIBtnIconFillType, isSubmitBtnActive, footerIBtn1State, footerIBtn1IconName, footerIBtn1IconFillType, footerIBtn1Type, onClickFooterIBtn1, footerIBtn2State, footerIBtn2IconName, footerIBtn2IconFillType, footerIBtn2Type, onClickFooterIBtn2, footerIBtn3State, footerIBtn3IconName, footerIBtn3IconFillType, footerIBtn3Type, footerIBtn3Accept, onClickFooterIBtn3 }: Props): JSX.Element;
|
|
25
|
+
export default Footer;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
var react_1 = __importDefault(require("react"));
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var ChatTextField_1 = __importDefault(require("./ChatTextField"));
|
|
13
|
+
function Footer(_a) {
|
|
14
|
+
var footerChildren = _a.footerChildren, textFieldDefaultText = _a.textFieldDefaultText, textFieldHintText = _a.textFieldHintText, textFieldState = _a.textFieldState, textFieldMaxLength = _a.textFieldMaxLength, submitIBtnIconName = _a.submitIBtnIconName, submitIBtnIconFillType = _a.submitIBtnIconFillType, isSubmitBtnActive = _a.isSubmitBtnActive, footerIBtn1State = _a.footerIBtn1State, footerIBtn1IconName = _a.footerIBtn1IconName, footerIBtn1IconFillType = _a.footerIBtn1IconFillType, footerIBtn1Type = _a.footerIBtn1Type, onClickFooterIBtn1 = _a.onClickFooterIBtn1, footerIBtn2State = _a.footerIBtn2State, footerIBtn2IconName = _a.footerIBtn2IconName, footerIBtn2IconFillType = _a.footerIBtn2IconFillType, footerIBtn2Type = _a.footerIBtn2Type, onClickFooterIBtn2 = _a.onClickFooterIBtn2, footerIBtn3State = _a.footerIBtn3State, footerIBtn3IconName = _a.footerIBtn3IconName, footerIBtn3IconFillType = _a.footerIBtn3IconFillType, footerIBtn3Type = _a.footerIBtn3Type, footerIBtn3Accept = _a.footerIBtn3Accept, onClickFooterIBtn3 = _a.onClickFooterIBtn3;
|
|
15
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
|
+
react_1.default.createElement(ChatTextField_1.default, { textFieldDefaultText: textFieldDefaultText, textFieldHintText: textFieldHintText, textFieldState: textFieldState, textFieldMaxLength: textFieldMaxLength, isSubmitBtnActive: isSubmitBtnActive, submitIBtnIconName: submitIBtnIconName, submitIBtnIconFillType: submitIBtnIconFillType, footerIBtn1State: footerIBtn1State, footerIBtn1IconName: footerIBtn1IconName, footerIBtn1IconFillType: footerIBtn1IconFillType, footerIBtn1Type: footerIBtn1Type, onClickFooterIBtn1: onClickFooterIBtn1, footerIBtn2State: footerIBtn2State, footerIBtn2IconName: footerIBtn2IconName, footerIBtn2IconFillType: footerIBtn2IconFillType, footerIBtn2Type: footerIBtn2Type, onClickFooterIBtn2: onClickFooterIBtn2, footerIBtn3State: footerIBtn3State, footerIBtn3IconName: footerIBtn3IconName, footerIBtn3IconFillType: footerIBtn3IconFillType, footerIBtn3Type: footerIBtn3Type, footerIBtn3Accept: footerIBtn3Accept, onClickFooterIBtn3: onClickFooterIBtn3 }),
|
|
17
|
+
react_1.default.createElement(S_FooterChildrenWrapper, null, footerChildren)));
|
|
18
|
+
}
|
|
19
|
+
var S_FooterChildrenWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
20
|
+
var theme = _a.theme;
|
|
21
|
+
return theme.spacing.spacingE;
|
|
22
|
+
}, function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return theme.spacing.spacingC;
|
|
25
|
+
});
|
|
26
|
+
exports.default = Footer;
|
|
27
|
+
var templateObject_1;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Props as ChatListProps } from './ChatList';
|
|
3
|
+
declare type Props = Required<Pick<ChatListProps, 'styleTheme'>> & Pick<ChatListProps, 'titleText' | 'descText' | 'captionText' | 'titleStyleTheme' | 'headerDisplayType' | 'headerIBtn1IconName' | 'headerIBtn1IconFillType' | 'onClickHeaderIBtn1'>;
|
|
4
|
+
declare function Header({ styleTheme, titleText, descText, captionText, titleStyleTheme, headerDisplayType, headerIBtn1IconName, headerIBtn1IconFillType, onClickHeaderIBtn1 }: Props): JSX.Element;
|
|
5
|
+
export default Header;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
var react_1 = __importDefault(require("react"));
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var hybrid_1 = require("../../../hybrid");
|
|
13
|
+
var IconButton_1 = require("../IconButton");
|
|
14
|
+
var TextLabel_1 = require("../TextLabel");
|
|
15
|
+
var titleTextColors = {
|
|
16
|
+
solid: 'sysTextPrimary',
|
|
17
|
+
translucent: 'sysTextWhite',
|
|
18
|
+
transparent: 'sysTextWhite'
|
|
19
|
+
};
|
|
20
|
+
var iconColors = {
|
|
21
|
+
solid: 'ui_cpnt_button_icon_enabled',
|
|
22
|
+
translucent: 'ui_cpnt_button_icon_white',
|
|
23
|
+
transparent: 'ui_cpnt_button_icon_white'
|
|
24
|
+
};
|
|
25
|
+
function Header(_a) {
|
|
26
|
+
var styleTheme = _a.styleTheme, titleText = _a.titleText, descText = _a.descText, captionText = _a.captionText, titleStyleTheme = _a.titleStyleTheme, headerDisplayType = _a.headerDisplayType, headerIBtn1IconName = _a.headerIBtn1IconName, headerIBtn1IconFillType = _a.headerIBtn1IconFillType, onClickHeaderIBtn1 = _a.onClickHeaderIBtn1;
|
|
27
|
+
return (react_1.default.createElement(S_HeaderContentWrapper, null,
|
|
28
|
+
react_1.default.createElement(S_HeaderLeftBox, null,
|
|
29
|
+
titleText && (react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, styleTheme: titleStyleTheme, colorTheme: titleTextColors[styleTheme], wordBreak: "break_all" })),
|
|
30
|
+
descText && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
31
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_c" }),
|
|
32
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: descText, styleTheme: "body2Regular", colorTheme: "sysTextSecondary", colorOverride: styleTheme === 'translucent' ? 'ui_cpnt_list_text_caption_02' : undefined, wordBreak: "break_all" }))),
|
|
33
|
+
captionText && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
|
+
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_a" }),
|
|
35
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: captionText, styleTheme: "caption1Regular", colorTheme: "sysTextTertiary", colorOverride: styleTheme === 'translucent' ? 'ui_cpnt_list_text_caption_03' : undefined, wordBreak: "break_all" })))),
|
|
36
|
+
headerDisplayType === 'ibtn1' && headerIBtn1IconName && (react_1.default.createElement(IconButton_1.IconButton, { iconName: headerIBtn1IconName, baseSize: "large", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: iconColors[styleTheme], iconSize: 24, iconFillType: headerIBtn1IconFillType, onClick: onClickHeaderIBtn1 }))));
|
|
37
|
+
}
|
|
38
|
+
var S_HeaderContentWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"])), function (_a) {
|
|
39
|
+
var theme = _a.theme;
|
|
40
|
+
return theme.spacing.spacingD;
|
|
41
|
+
}, function (_a) {
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return theme.spacing.spacingE;
|
|
44
|
+
}, function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return theme.spacing.spacingC;
|
|
47
|
+
}, function (_a) {
|
|
48
|
+
var theme = _a.theme;
|
|
49
|
+
return theme.spacing.spacingD;
|
|
50
|
+
});
|
|
51
|
+
var S_HeaderLeftBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n"], ["\n flex: 1;\n"])));
|
|
52
|
+
exports.default = Header;
|
|
53
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChatList } from './ChatList';
|
|
@@ -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.ChatList = void 0;
|
|
7
|
+
var ChatList_1 = require("./ChatList");
|
|
8
|
+
Object.defineProperty(exports, "ChatList", { enumerable: true, get: function () { return __importDefault(ChatList_1).default; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
behavior?: 'auto' | 'smooth';
|
|
4
|
+
heightOfEndOfList?: number;
|
|
5
|
+
};
|
|
6
|
+
declare function useAutoScrollToBottom({ behavior, heightOfEndOfList }?: Props): {
|
|
7
|
+
triggerScrollToBottom: () => void;
|
|
8
|
+
EndOfList: () => JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export default useAutoScrollToBottom;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
var react_1 = __importStar(require("react"));
|
|
23
|
+
function useAutoScrollToBottom(_a) {
|
|
24
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.behavior, behavior = _c === void 0 ? 'auto' : _c, _d = _b.heightOfEndOfList, heightOfEndOfList = _d === void 0 ? 10 : _d;
|
|
25
|
+
var scrollRef = (0, react_1.useRef)(null);
|
|
26
|
+
var _e = (0, react_1.useState)(false), scrollTrigger = _e[0], setScrollTrigger = _e[1];
|
|
27
|
+
/**
|
|
28
|
+
* @when scrollTrigger가 변할 때마다(false -> true, vice versa)
|
|
29
|
+
* @expected EndOfList가 화면에 보이도록 스크롤 한다.
|
|
30
|
+
* @clear -
|
|
31
|
+
*/
|
|
32
|
+
(0, react_1.useEffect)(function () {
|
|
33
|
+
if (scrollRef.current) {
|
|
34
|
+
scrollRef.current.scrollIntoView({ behavior: behavior });
|
|
35
|
+
// NOTE: 스크롤을 빠르게 하는 중에 scrollIntoView시 스크롤 영역만큼 렌더가 안되는 이슈에 대한 임시조치
|
|
36
|
+
setTimeout(function () {
|
|
37
|
+
var _a;
|
|
38
|
+
(_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: behavior });
|
|
39
|
+
}, 100);
|
|
40
|
+
}
|
|
41
|
+
}, [scrollTrigger]);
|
|
42
|
+
var triggerScrollToBottom = (0, react_1.useCallback)(function () {
|
|
43
|
+
setScrollTrigger(function (prev) { return !prev; });
|
|
44
|
+
}, []);
|
|
45
|
+
function EndOfList() {
|
|
46
|
+
return react_1.default.createElement("li", { style: { listStyle: 'none', height: heightOfEndOfList + "px" }, ref: scrollRef });
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
triggerScrollToBottom: triggerScrollToBottom,
|
|
50
|
+
EndOfList: EndOfList
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.default = useAutoScrollToBottom;
|
|
@@ -60,48 +60,48 @@ function Chip(_a) {
|
|
|
60
60
|
!isActive && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
61
61
|
react_1.default.createElement(Icon_1.Icon, { size: 16, fillType: "line", iconName: "ic_filter", colorKey: "ui_cpnt_chip_line_icon_01" }),
|
|
62
62
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }))),
|
|
63
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: isActive ? 'usrTextBrandOnPrimary' : 'sysTextPrimary', ellipsisMode: "use", lineLimit: 1 }),
|
|
63
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: isActive ? 'usrTextBrandOnPrimary' : 'sysTextPrimary', ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }),
|
|
64
64
|
isActive && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
65
65
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }),
|
|
66
66
|
react_1.default.createElement(Icon_1.Icon, { size: 12, fillType: "line", iconName: "ic_xmark", colorKey: "ui_cpnt_chip_fill_icon_active_01" })))));
|
|
67
67
|
case 'information':
|
|
68
68
|
return (react_1.default.createElement(S_InfoChip, { onClick: handleClickChip },
|
|
69
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Regular", singleLineMode: "use", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 1 })));
|
|
69
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Regular", singleLineMode: "use", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })));
|
|
70
70
|
case 'label':
|
|
71
71
|
return (react_1.default.createElement(S_LabelChip, { onClick: handleClickChip },
|
|
72
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Bold", singleLineMode: "use", colorTheme: "sysTextTertiary", ellipsisMode: "use", lineLimit: 1 })));
|
|
72
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Bold", singleLineMode: "use", colorTheme: "sysTextTertiary", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })));
|
|
73
73
|
case 'time':
|
|
74
74
|
return (react_1.default.createElement(S_TimeChip, { onClick: handleClickChip },
|
|
75
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Bold", singleLineMode: "use", colorTheme: "sysTextWhite", ellipsisMode: "use", lineLimit: 1 })));
|
|
75
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption2Bold", singleLineMode: "use", colorTheme: "sysTextWhite", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })));
|
|
76
76
|
case 'removable':
|
|
77
77
|
return (react_1.default.createElement(S_RemovableChip, { onClick: handleClickChip },
|
|
78
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: "sysTextSecondary", ellipsisMode: "use", lineLimit: 1 }),
|
|
78
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: "sysTextSecondary", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }),
|
|
79
79
|
react_1.default.createElement(S_XIconWrapper, { onClick: handleClickXMarkIcon },
|
|
80
80
|
react_1.default.createElement(Icon_1.Icon, { size: 12, iconName: "ic_xmark", fillType: "line", colorKey: "ui_cpnt_chip_fill_icon_inactive" }))));
|
|
81
81
|
default:
|
|
82
82
|
return (react_1.default.createElement(S_FilterSingleChip, { isActive: isActive, onClick: handleClickChip },
|
|
83
83
|
filterIconMode === 'left' && (react_1.default.createElement(S_FilterIconWrapper, null,
|
|
84
84
|
react_1.default.createElement(Icon_1.Icon, { fillType: iconFillType, iconName: iconName, size: 16, colorKey: isActive ? 'ui_cpnt_chip_fill_icon_active_01' : 'ui_cpnt_chip_line_icon_02' }))),
|
|
85
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: isActive ? 'usrTextBrandOnPrimary' : 'sysTextSecondary', ellipsisMode: "use", lineLimit: 1 })));
|
|
85
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: text, styleTheme: "caption1Regular", singleLineMode: "use", colorTheme: isActive ? 'usrTextBrandOnPrimary' : 'sysTextSecondary', ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })));
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
return react_1.default.createElement(S_ChipWrapper, null, chipType());
|
|
89
89
|
}
|
|
90
90
|
exports.default = Chip;
|
|
91
|
-
var S_CategoryChoiceChip = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius:
|
|
91
|
+
var S_CategoryChoiceChip = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 20px;\n box-sizing: border-box;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 40px;\n line-height: 40px;\n }\n\n ", ";\n"], ["\n border-radius: 20px;\n box-sizing: border-box;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 40px;\n line-height: 40px;\n }\n\n ", ";\n"])), function (_a) {
|
|
92
92
|
var theme = _a.theme, isActive = _a.isActive;
|
|
93
93
|
return isActive ? theme.ui_cpnt_chip_fill_base_active_01 : '';
|
|
94
94
|
}, function (_a) {
|
|
95
95
|
var theme = _a.theme;
|
|
96
|
-
return theme.spacing.
|
|
96
|
+
return theme.spacing.spacingD;
|
|
97
97
|
}, function (_a) {
|
|
98
98
|
var theme = _a.theme;
|
|
99
|
-
return theme.spacing.
|
|
99
|
+
return theme.spacing.spacingD;
|
|
100
100
|
}, function (_a) {
|
|
101
101
|
var theme = _a.theme, isActive = _a.isActive;
|
|
102
102
|
return isActive ? '' : "border: 1px solid " + theme.ui_cpnt_chip_line_border_01;
|
|
103
103
|
});
|
|
104
|
-
var S_InfoChip = styled_components_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: 12px;\n box-sizing: border-box;\n display: flex;\n height: 24px;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: 12px;\n box-sizing: border-box;\n display: flex;\n height: 24px;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
104
|
+
var S_InfoChip = styled_components_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: 12px;\n box-sizing: border-box;\n display: flex;\n height: 24px;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 24px;\n line-height: 24px;\n }\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: 12px;\n box-sizing: border-box;\n display: flex;\n height: 24px;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 24px;\n line-height: 24px;\n }\n"])), function (_a) {
|
|
105
105
|
var theme = _a.theme;
|
|
106
106
|
return theme.ui_cpnt_chip_fill_base_inactive;
|
|
107
107
|
}, function (_a) {
|
|
@@ -111,7 +111,7 @@ var S_InfoChip = styled_components_1.default.span(templateObject_2 || (templateO
|
|
|
111
111
|
var theme = _a.theme;
|
|
112
112
|
return theme.spacing.spacingC;
|
|
113
113
|
});
|
|
114
|
-
var S_RemovableChip = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
114
|
+
var S_RemovableChip = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 32px;\n line-height: 32px;\n }\n"], ["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 32px;\n line-height: 32px;\n }\n"])), function (_a) {
|
|
115
115
|
var theme = _a.theme;
|
|
116
116
|
return theme.ui_cpnt_chip_fill_base_inactive;
|
|
117
117
|
}, function (_a) {
|
|
@@ -125,7 +125,7 @@ var S_XIconWrapper = styled_components_1.default.div(templateObject_4 || (templa
|
|
|
125
125
|
var theme = _a.theme;
|
|
126
126
|
return theme.spacing.spacingB;
|
|
127
127
|
});
|
|
128
|
-
var S_FilterSingleChip = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
128
|
+
var S_FilterSingleChip = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 32px;\n line-height: 32px;\n }\n"], ["\n background-color: ", ";\n border-radius: 16px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n padding-left: ", ";\n padding-right: ", ";\n\n & > div {\n height: 32px;\n line-height: 32px;\n }\n"])), function (_a) {
|
|
129
129
|
var theme = _a.theme, isActive = _a.isActive;
|
|
130
130
|
return isActive ? theme.ui_cpnt_chip_fill_base_active_01 : theme.ui_cpnt_chip_fill_base_inactive;
|
|
131
131
|
}, function (_a) {
|
|
@@ -139,14 +139,14 @@ var S_FilterIconWrapper = styled_components_1.default.div(templateObject_6 || (t
|
|
|
139
139
|
var theme = _a.theme;
|
|
140
140
|
return theme.spacing.spacingA;
|
|
141
141
|
});
|
|
142
|
-
var S_LabelChip = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: 1px solid ", ";\n border-radius: 10px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n padding: 0 ", ";\n"], ["\n border: 1px solid ", ";\n border-radius: 10px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n padding: 0 ", ";\n"])), function (_a) {
|
|
142
|
+
var S_LabelChip = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: 1px solid ", ";\n border-radius: 10px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n padding: 0 ", ";\n\n & > div {\n height: 20px;\n line-height: 20px;\n }\n"], ["\n border: 1px solid ", ";\n border-radius: 10px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n padding: 0 ", ";\n\n & > div {\n height: 20px;\n line-height: 20px;\n }\n"])), function (_a) {
|
|
143
143
|
var theme = _a.theme;
|
|
144
144
|
return theme.ui_cpnt_chip_line_border_01;
|
|
145
145
|
}, function (_a) {
|
|
146
146
|
var theme = _a.theme;
|
|
147
147
|
return theme.spacing.spacingB;
|
|
148
148
|
});
|
|
149
|
-
var S_TimeChip = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n height: 20px;\n padding: 0 ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n background-color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n height: 20px;\n padding: 0 ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_a) {
|
|
149
|
+
var S_TimeChip = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n height: 20px;\n padding: 0 ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > div {\n height: 20px;\n line-height: 20px;\n }\n"], ["\n background-color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n height: 20px;\n padding: 0 ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > div {\n height: 20px;\n line-height: 20px;\n }\n"])), function (_a) {
|
|
150
150
|
var theme = _a.theme;
|
|
151
151
|
return theme.ui_cpnt_chip_base_playtime;
|
|
152
152
|
}, function (_a) {
|
|
@@ -3,6 +3,7 @@ declare type ContextMenuProps = {
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
autoWidthMode?: 'none' | 'use';
|
|
5
5
|
maxHeight?: number;
|
|
6
|
+
customWidth?: string;
|
|
6
7
|
};
|
|
7
|
-
declare function ContextMenu({ children, autoWidthMode, maxHeight }: ContextMenuProps): JSX.Element;
|
|
8
|
+
declare function ContextMenu({ children, autoWidthMode, maxHeight, customWidth }: ContextMenuProps): JSX.Element;
|
|
8
9
|
export default ContextMenu;
|
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
var react_1 = __importDefault(require("react"));
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
function ContextMenu(_a) {
|
|
13
|
-
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight;
|
|
14
|
-
return (react_1.default.createElement(S_ContextMenu, { autoWidth: autoWidthMode === 'use', maxHeight: maxHeight }, children));
|
|
13
|
+
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight, customWidth = _a.customWidth;
|
|
14
|
+
return (react_1.default.createElement(S_ContextMenu, { autoWidth: autoWidthMode === 'use', maxHeight: maxHeight, customWidth: customWidth }, children));
|
|
15
15
|
}
|
|
16
|
-
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-sizing: border-box;\n box-shadow: ", ";\n list-style: none;\n margin: 0;\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n vertical-align: baseline;\n width: ", ";\n max-height: ", ";\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-sizing: border-box;\n box-shadow: ", ";\n list-style: none;\n margin: 0;\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n vertical-align: baseline;\n width: ", ";\n max-height: ", ";\n"])), function (_a) {
|
|
16
|
+
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-sizing: border-box;\n box-shadow: ", ";\n list-style: none;\n margin: 0;\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n vertical-align: baseline;\n width: ", ";\n max-height: ", ";\n\n ", "\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-sizing: border-box;\n box-shadow: ", ";\n list-style: none;\n margin: 0;\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n vertical-align: baseline;\n width: ", ";\n max-height: ", ";\n\n ", "\n"])), function (_a) {
|
|
17
17
|
var theme = _a.theme;
|
|
18
18
|
return theme.ui_cpnt_contextmenu_base;
|
|
19
19
|
}, function (_a) {
|
|
@@ -26,11 +26,20 @@ var S_ContextMenu = styled_components_1.default.ul(templateObject_1 || (template
|
|
|
26
26
|
var theme = _a.theme;
|
|
27
27
|
return theme.spacing.spacingB;
|
|
28
28
|
}, function (_a) {
|
|
29
|
-
var autoWidth = _a.autoWidth;
|
|
30
|
-
|
|
29
|
+
var autoWidth = _a.autoWidth, customWidth = _a.customWidth;
|
|
30
|
+
if (autoWidth) {
|
|
31
|
+
return 'inherit';
|
|
32
|
+
}
|
|
33
|
+
if (customWidth) {
|
|
34
|
+
return 'auto';
|
|
35
|
+
}
|
|
36
|
+
return 'max-content';
|
|
31
37
|
}, function (_a) {
|
|
32
38
|
var maxHeight = _a.maxHeight;
|
|
33
39
|
return (maxHeight ? maxHeight + "px" : 'none');
|
|
40
|
+
}, function (_a) {
|
|
41
|
+
var customWidth = _a.customWidth;
|
|
42
|
+
return customWidth && "width: " + customWidth + ";min-width: " + customWidth + ";";
|
|
34
43
|
});
|
|
35
44
|
exports.default = ContextMenu;
|
|
36
45
|
var templateObject_1;
|
|
@@ -53,17 +53,17 @@ function ContextMenuItem(_a) {
|
|
|
53
53
|
textColorTheme = 'sysTextTertiary';
|
|
54
54
|
}
|
|
55
55
|
return (react_1.default.createElement(S_ContextMenuItem, { size: size, onClick: handleClick, selected: isSelected, disabled: state === 'disabled' },
|
|
56
|
-
react_1.default.createElement(TextLabel_1.TextLabel, { text: (option === null || option === void 0 ? void 0 : option.text) || text, styleTheme: "form2Regular", singleLineMode: "use", colorTheme: textColorTheme })));
|
|
56
|
+
react_1.default.createElement(TextLabel_1.TextLabel, { text: (option === null || option === void 0 ? void 0 : option.text) || text, styleTheme: "form2Regular", singleLineMode: "use", colorTheme: textColorTheme, ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" })));
|
|
57
57
|
}
|
|
58
|
-
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n padding: 0 ", ";\n"], ["\n height: 48px;\n padding: 0 ", ";\n"])), function (_a) {
|
|
58
|
+
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n padding: 0 ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"], ["\n height: 48px;\n padding: 0 ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"])), function (_a) {
|
|
59
59
|
var theme = _a.theme;
|
|
60
60
|
return theme.spacing.spacingE;
|
|
61
61
|
});
|
|
62
|
-
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n padding: 0 ", ";\n"], ["\n height: 40px;\n padding: 0 ", ";\n"])), function (_a) {
|
|
62
|
+
var medium = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n padding: 0 ", ";\n\n & > div {\n height: 40px;\n line-height: 40px;\n }\n"], ["\n height: 40px;\n padding: 0 ", ";\n\n & > div {\n height: 40px;\n line-height: 40px;\n }\n"])), function (_a) {
|
|
63
63
|
var theme = _a.theme;
|
|
64
64
|
return theme.spacing.spacingD;
|
|
65
65
|
});
|
|
66
|
-
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n padding: 0 ", ";\n"], ["\n height: 32px;\n padding: 0 ", ";\n"])), function (_a) {
|
|
66
|
+
var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 32px;\n padding: 0 ", ";\n\n & > div {\n height: 32px;\n line-height: 32px;\n }\n"], ["\n height: 32px;\n padding: 0 ", ";\n\n & > div {\n height: 32px;\n line-height: 32px;\n }\n"])), function (_a) {
|
|
67
67
|
var theme = _a.theme;
|
|
68
68
|
return theme.spacing.spacingD;
|
|
69
69
|
});
|
|
@@ -7,15 +7,15 @@ declare type DropDownValues = PDSValueOption & {
|
|
|
7
7
|
declare type Props = {
|
|
8
8
|
colorTheme?: 'none' | 'dark' | 'white';
|
|
9
9
|
defaultValue?: PDSValueOption;
|
|
10
|
-
value?: PDSValueOption;
|
|
10
|
+
value?: PDSValueOption | null;
|
|
11
11
|
hintText?: TFunctionResult;
|
|
12
12
|
maxHeightItemNumber?: number;
|
|
13
13
|
responsiveMode?: 'none' | 'use';
|
|
14
|
-
selectionMode?: 'single' | 'multi';
|
|
15
14
|
size?: 'large' | 'small';
|
|
16
15
|
state?: 'normal' | 'read_only' | 'disabled';
|
|
17
16
|
valueArray: DropDownValues[];
|
|
17
|
+
customWidth?: string;
|
|
18
18
|
onChange?: (option: PDSValueOption) => void;
|
|
19
19
|
};
|
|
20
|
-
declare function Dropdown({ colorTheme, value, defaultValue, hintText, maxHeightItemNumber, responsiveMode,
|
|
20
|
+
declare function Dropdown({ colorTheme, value, defaultValue, hintText, maxHeightItemNumber, responsiveMode, size, state, valueArray, customWidth, onChange }: Props): JSX.Element;
|
|
21
21
|
export default Dropdown;
|