@rpg-engine/long-bow 0.6.86 → 0.6.88
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/components/ChatRevamp/SearchCharacter.d.ts +5 -5
- package/dist/long-bow.cjs.development.js +166 -105
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +166 -105
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChatRevamp/ChatRevamp.tsx +81 -50
- package/src/components/ChatRevamp/SearchCharacter.tsx +184 -86
- package/src/stories/ChatRevamp.stories.tsx +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { ICharacter } from '@rpg-engine/shared/dist/types/character.types';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { IStyles } from '../Chat/Chat';
|
|
3
|
-
import type { PrivateChatCharacter } from './ChatRevamp';
|
|
4
4
|
interface ISearchCharacterProps {
|
|
5
5
|
onFocus?: () => void;
|
|
6
6
|
onBlur?: () => void;
|
|
7
7
|
onChangeCharacterName: (characterName: string) => void;
|
|
8
8
|
styles?: IStyles;
|
|
9
|
-
recentCharacters?:
|
|
10
|
-
onCharacterClick?: (character:
|
|
9
|
+
recentCharacters?: ICharacter[];
|
|
10
|
+
onCharacterClick?: (character: ICharacter) => void;
|
|
11
11
|
hideSearchCharacterUI: () => void;
|
|
12
12
|
}
|
|
13
|
-
export declare const SearchCharacter:
|
|
13
|
+
export declare const SearchCharacter: React.FC<ISearchCharacterProps>;
|
|
14
14
|
export {};
|
|
@@ -26392,29 +26392,27 @@ var SearchCharacter = function SearchCharacter(_ref) {
|
|
|
26392
26392
|
onCharacterClick = _ref.onCharacterClick,
|
|
26393
26393
|
_ref$styles = _ref.styles,
|
|
26394
26394
|
styles = _ref$styles === void 0 ? {
|
|
26395
|
-
textColor:
|
|
26396
|
-
buttonColor:
|
|
26397
|
-
buttonBackgroundColor:
|
|
26398
|
-
width: '
|
|
26395
|
+
textColor: uiColors.white,
|
|
26396
|
+
buttonColor: uiColors.orange,
|
|
26397
|
+
buttonBackgroundColor: uiColors.darkGray,
|
|
26398
|
+
width: '100%',
|
|
26399
26399
|
height: 'auto'
|
|
26400
26400
|
} : _ref$styles;
|
|
26401
26401
|
var _useState = React.useState(''),
|
|
26402
26402
|
characterName = _useState[0],
|
|
26403
26403
|
setCharacterName = _useState[1];
|
|
26404
|
+
var _useState2 = React.useState(false),
|
|
26405
|
+
isFocused = _useState2[0],
|
|
26406
|
+
setIsFocused = _useState2[1];
|
|
26404
26407
|
var searchCharacterRef = React.useRef(null);
|
|
26405
26408
|
React.useEffect(function () {
|
|
26406
|
-
|
|
26407
|
-
|
|
26408
|
-
|
|
26409
|
-
}
|
|
26410
|
-
}, 100);
|
|
26411
|
-
return function () {
|
|
26412
|
-
return clearTimeout(timer);
|
|
26413
|
-
};
|
|
26409
|
+
if (searchCharacterRef.current) {
|
|
26410
|
+
searchCharacterRef.current.focus();
|
|
26411
|
+
}
|
|
26414
26412
|
}, []);
|
|
26415
26413
|
var handleSubmit = function handleSubmit(event) {
|
|
26416
26414
|
event.preventDefault();
|
|
26417
|
-
if (!characterName
|
|
26415
|
+
if (!characterName.trim()) return;
|
|
26418
26416
|
onChangeCharacterName(characterName);
|
|
26419
26417
|
};
|
|
26420
26418
|
var handleCharacterClick = function handleCharacterClick(character) {
|
|
@@ -26423,77 +26421,131 @@ var SearchCharacter = function SearchCharacter(_ref) {
|
|
|
26423
26421
|
onCharacterClick(character);
|
|
26424
26422
|
hideSearchCharacterUI();
|
|
26425
26423
|
};
|
|
26426
|
-
|
|
26424
|
+
var handleFocus = function handleFocus() {
|
|
26425
|
+
setIsFocused(true);
|
|
26426
|
+
onFocus == null ? void 0 : onFocus();
|
|
26427
|
+
};
|
|
26428
|
+
var handleBlur = function handleBlur() {
|
|
26429
|
+
setIsFocused(false);
|
|
26430
|
+
onBlur == null ? void 0 : onBlur();
|
|
26431
|
+
};
|
|
26432
|
+
return React__default.createElement(SearchContainer, {
|
|
26433
|
+
width: styles.width || 'auto'
|
|
26434
|
+
}, React__default.createElement(Form$2, {
|
|
26427
26435
|
onSubmit: handleSubmit
|
|
26428
|
-
}, React__default.createElement(
|
|
26429
|
-
|
|
26430
|
-
}, React__default.createElement(TextField$1, {
|
|
26436
|
+
}, React__default.createElement(InputWrapper, {
|
|
26437
|
+
isFocused: isFocused
|
|
26438
|
+
}, React__default.createElement(SearchIcon, null, React__default.createElement(rx.RxMagnifyingGlass, null)), React__default.createElement(TextField$1, {
|
|
26431
26439
|
value: characterName,
|
|
26432
26440
|
ref: searchCharacterRef,
|
|
26433
|
-
id: "characterName",
|
|
26434
|
-
name: 'characterName',
|
|
26435
26441
|
onChange: function onChange(e) {
|
|
26436
26442
|
setCharacterName(e.target.value);
|
|
26437
26443
|
onChangeCharacterName(e.target.value);
|
|
26438
26444
|
},
|
|
26439
|
-
placeholder:
|
|
26440
|
-
height: 20,
|
|
26445
|
+
placeholder: "Search for a character...",
|
|
26441
26446
|
type: "text",
|
|
26442
26447
|
autoComplete: "off",
|
|
26443
|
-
onFocus:
|
|
26444
|
-
onBlur:
|
|
26445
|
-
|
|
26446
|
-
|
|
26447
|
-
|
|
26448
|
-
|
|
26449
|
-
type:
|
|
26450
|
-
|
|
26451
|
-
|
|
26452
|
-
|
|
26453
|
-
|
|
26454
|
-
|
|
26455
|
-
|
|
26456
|
-
|
|
26457
|
-
|
|
26458
|
-
})))), recentCharacters && recentCharacters.length > 0 && React__default.createElement(ListContainer, null, recentCharacters.map(function (character) {
|
|
26459
|
-
return React__default.createElement(ListElement, {
|
|
26460
|
-
onPointerDown: function onPointerDown() {
|
|
26448
|
+
onFocus: handleFocus,
|
|
26449
|
+
onBlur: handleBlur
|
|
26450
|
+
}), characterName && React__default.createElement(ClearButton, {
|
|
26451
|
+
onClick: function onClick() {
|
|
26452
|
+
return setCharacterName('');
|
|
26453
|
+
},
|
|
26454
|
+
type: "button"
|
|
26455
|
+
}, React__default.createElement(rx.RxCross2, null))), React__default.createElement(SearchButton, {
|
|
26456
|
+
type: "submit",
|
|
26457
|
+
buttonColor: styles.buttonColor,
|
|
26458
|
+
buttonBackgroundColor: styles.buttonBackgroundColor
|
|
26459
|
+
}, "Search")), recentCharacters && recentCharacters.length > 0 && React__default.createElement(ResultsContainer, null, React__default.createElement(ResultsTitle, null, "Recent Characters"), React__default.createElement(ResultsList, null, recentCharacters.map(function (character) {
|
|
26460
|
+
return React__default.createElement(ResultItem, {
|
|
26461
|
+
key: character._id,
|
|
26462
|
+
onClick: function onClick() {
|
|
26461
26463
|
return handleCharacterClick(character);
|
|
26462
|
-
}
|
|
26463
|
-
|
|
26464
|
-
|
|
26465
|
-
|
|
26464
|
+
}
|
|
26465
|
+
}, React__default.createElement(CharacterAvatar, {
|
|
26466
|
+
src: character.textureKey || '/default-avatar.png',
|
|
26467
|
+
alt: character.name
|
|
26468
|
+
}), React__default.createElement(CharacterInfo, null, React__default.createElement(CharacterName, null, React__default.createElement(Ellipsis, {
|
|
26469
|
+
maxLines: 1,
|
|
26470
|
+
maxWidth: "150px"
|
|
26471
|
+
}, character.name)), React__default.createElement(CharacterDescription, null, React__default.createElement(Ellipsis, {
|
|
26472
|
+
maxLines: 1,
|
|
26473
|
+
maxWidth: "150px"
|
|
26474
|
+
}, "Class: " + character["class"] + ", Level: " + character.skills.level))));
|
|
26475
|
+
}))));
|
|
26466
26476
|
};
|
|
26467
26477
|
var SearchContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26468
26478
|
displayName: "SearchCharacter__SearchContainer",
|
|
26469
26479
|
componentId: "sc-172lyfr-0"
|
|
26470
|
-
})(["width:
|
|
26480
|
+
})(["width:", ";max-width:600px;margin:0 auto;"], function (_ref2) {
|
|
26481
|
+
var width = _ref2.width;
|
|
26482
|
+
return width;
|
|
26483
|
+
});
|
|
26471
26484
|
var Form$2 = /*#__PURE__*/styled__default.form.withConfig({
|
|
26472
26485
|
displayName: "SearchCharacter__Form",
|
|
26473
26486
|
componentId: "sc-172lyfr-1"
|
|
26474
|
-
})(["display:flex;
|
|
26487
|
+
})(["display:flex;gap:10px;margin-bottom:20px;"]);
|
|
26488
|
+
var InputWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
26489
|
+
displayName: "SearchCharacter__InputWrapper",
|
|
26490
|
+
componentId: "sc-172lyfr-2"
|
|
26491
|
+
})(["position:relative;flex-grow:1;display:flex;align-items:center;background-color:", ";border-radius:24px;padding:8px 16px;transition:all 0.3s ease;box-shadow:", ";"], uiColors.raisinBlack, function (_ref3) {
|
|
26492
|
+
var isFocused = _ref3.isFocused;
|
|
26493
|
+
return isFocused ? "0 0 0 2px " + uiColors.orange : 'none';
|
|
26494
|
+
});
|
|
26495
|
+
var SearchIcon = /*#__PURE__*/styled__default.span.withConfig({
|
|
26496
|
+
displayName: "SearchCharacter__SearchIcon",
|
|
26497
|
+
componentId: "sc-172lyfr-3"
|
|
26498
|
+
})(["color:", ";margin-right:8px;"], uiColors.gray);
|
|
26475
26499
|
var TextField$1 = /*#__PURE__*/styled__default.input.withConfig({
|
|
26476
26500
|
displayName: "SearchCharacter__TextField",
|
|
26477
|
-
componentId: "sc-172lyfr-
|
|
26478
|
-
})(["width:100%;background-color:
|
|
26501
|
+
componentId: "sc-172lyfr-4"
|
|
26502
|
+
})(["width:100%;background-color:transparent;border:none;color:", ";font-size:", ";outline:none;&::placeholder{color:", ";}"], uiColors.white, uiFonts.size.medium, uiColors.gray);
|
|
26503
|
+
var ClearButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
26504
|
+
displayName: "SearchCharacter__ClearButton",
|
|
26505
|
+
componentId: "sc-172lyfr-5"
|
|
26506
|
+
})(["background:none;border:none;color:", ";cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;"], uiColors.gray);
|
|
26479
26507
|
var SearchButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
26480
26508
|
displayName: "SearchCharacter__SearchButton",
|
|
26481
|
-
componentId: "sc-172lyfr-
|
|
26482
|
-
})(["color:", ";
|
|
26483
|
-
var
|
|
26484
|
-
return buttonColor;
|
|
26485
|
-
}, function (_ref3) {
|
|
26486
|
-
var buttonBackgroundColor = _ref3.buttonBackgroundColor;
|
|
26509
|
+
componentId: "sc-172lyfr-6"
|
|
26510
|
+
})(["background-color:", ";color:", ";border:none;border-radius:24px;padding:8px 16px;font-size:", ";font-weight:bold;cursor:pointer;transition:all 0.3s ease;&:hover{background-color:", ";color:", ";}"], function (_ref4) {
|
|
26511
|
+
var buttonBackgroundColor = _ref4.buttonBackgroundColor;
|
|
26487
26512
|
return buttonBackgroundColor;
|
|
26488
|
-
})
|
|
26489
|
-
var
|
|
26490
|
-
|
|
26491
|
-
|
|
26492
|
-
|
|
26493
|
-
|
|
26494
|
-
|
|
26495
|
-
|
|
26496
|
-
|
|
26513
|
+
}, function (_ref5) {
|
|
26514
|
+
var buttonColor = _ref5.buttonColor;
|
|
26515
|
+
return buttonColor;
|
|
26516
|
+
}, uiFonts.size.medium, uiColors.orange, uiColors.white);
|
|
26517
|
+
var ResultsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26518
|
+
displayName: "SearchCharacter__ResultsContainer",
|
|
26519
|
+
componentId: "sc-172lyfr-7"
|
|
26520
|
+
})(["background-color:", ";border-radius:8px;padding:16px;"], uiColors.raisinBlack);
|
|
26521
|
+
var ResultsTitle = /*#__PURE__*/styled__default.h3.withConfig({
|
|
26522
|
+
displayName: "SearchCharacter__ResultsTitle",
|
|
26523
|
+
componentId: "sc-172lyfr-8"
|
|
26524
|
+
})(["color:", ";font-size:", ";margin-bottom:12px;"], uiColors.white, uiFonts.size.medium);
|
|
26525
|
+
var ResultsList = /*#__PURE__*/styled__default.ul.withConfig({
|
|
26526
|
+
displayName: "SearchCharacter__ResultsList",
|
|
26527
|
+
componentId: "sc-172lyfr-9"
|
|
26528
|
+
})(["list-style-type:none;padding:0;margin:0;"]);
|
|
26529
|
+
var ResultItem = /*#__PURE__*/styled__default.li.withConfig({
|
|
26530
|
+
displayName: "SearchCharacter__ResultItem",
|
|
26531
|
+
componentId: "sc-172lyfr-10"
|
|
26532
|
+
})(["display:flex;align-items:center;padding:8px;cursor:pointer;border-radius:4px;transition:all 0.2s ease;&:hover{background-color:", ";}"], uiColors.darkGray);
|
|
26533
|
+
var CharacterAvatar = /*#__PURE__*/styled__default.img.withConfig({
|
|
26534
|
+
displayName: "SearchCharacter__CharacterAvatar",
|
|
26535
|
+
componentId: "sc-172lyfr-11"
|
|
26536
|
+
})(["width:40px;height:40px;border-radius:50%;margin-right:12px;object-fit:cover;"]);
|
|
26537
|
+
var CharacterInfo = /*#__PURE__*/styled__default.div.withConfig({
|
|
26538
|
+
displayName: "SearchCharacter__CharacterInfo",
|
|
26539
|
+
componentId: "sc-172lyfr-12"
|
|
26540
|
+
})(["flex-grow:1;"]);
|
|
26541
|
+
var CharacterName = /*#__PURE__*/styled__default.div.withConfig({
|
|
26542
|
+
displayName: "SearchCharacter__CharacterName",
|
|
26543
|
+
componentId: "sc-172lyfr-13"
|
|
26544
|
+
})(["color:", ";font-size:", ";font-weight:bold;margin-bottom:4px;"], uiColors.white, uiFonts.size.medium);
|
|
26545
|
+
var CharacterDescription = /*#__PURE__*/styled__default.div.withConfig({
|
|
26546
|
+
displayName: "SearchCharacter__CharacterDescription",
|
|
26547
|
+
componentId: "sc-172lyfr-14"
|
|
26548
|
+
})(["color:", ";font-size:", ";"], uiColors.gray, uiFonts.size.small);
|
|
26497
26549
|
|
|
26498
26550
|
var ChatRevamp = function ChatRevamp(_ref) {
|
|
26499
26551
|
var chatMessages = _ref.chatMessages,
|
|
@@ -26530,31 +26582,31 @@ var ChatRevamp = function ChatRevamp(_ref) {
|
|
|
26530
26582
|
onPreviousChatCharacterClick(character);
|
|
26531
26583
|
hideSearchCharacterUI();
|
|
26532
26584
|
};
|
|
26533
|
-
return React__default.createElement(
|
|
26585
|
+
return React__default.createElement(ChatContainer$1, null, React__default.createElement(TabContainer, null, tabs.map(function (tab, index) {
|
|
26534
26586
|
return React__default.createElement(Tab, {
|
|
26535
26587
|
key: tab.label + "_" + index,
|
|
26536
26588
|
active: tab.id === activeTab,
|
|
26537
|
-
|
|
26589
|
+
onClick: function onClick() {
|
|
26538
26590
|
return onChangeTab(tab.id);
|
|
26539
26591
|
}
|
|
26540
26592
|
}, tab.label);
|
|
26541
26593
|
})), React__default.createElement(PrivateChatContainer, {
|
|
26542
26594
|
width: (styles == null ? void 0 : styles.width) || '80%',
|
|
26543
26595
|
height: (styles == null ? void 0 : styles.height) || 'auto'
|
|
26544
|
-
}, React__default.createElement(RecentChatTabContainer, {
|
|
26596
|
+
}, isPrivate && React__default.createElement(RecentChatTabContainer, {
|
|
26545
26597
|
isPrivate: isPrivate,
|
|
26546
26598
|
isOpen: showRecentChats
|
|
26547
26599
|
}, React__default.createElement(RecentChatTopBar, {
|
|
26548
26600
|
isOpen: showRecentChats
|
|
26549
26601
|
}, React__default.createElement(BurgerIconContainer, {
|
|
26550
|
-
|
|
26602
|
+
onClick: function onClick() {
|
|
26551
26603
|
return setShowRecentChats(function (t) {
|
|
26552
26604
|
return !t;
|
|
26553
26605
|
});
|
|
26554
26606
|
},
|
|
26555
26607
|
hasUnseenMessages: (unseenMessageCharacterIds == null ? void 0 : unseenMessageCharacterIds.length) > 0 || false
|
|
26556
26608
|
}, React__default.createElement(BurgerLineIcon, null), React__default.createElement(BurgerLineIcon, null), React__default.createElement(BurgerLineIcon, null)), showRecentChats && React__default.createElement(SearchButton$1, {
|
|
26557
|
-
|
|
26609
|
+
onClick: function onClick() {
|
|
26558
26610
|
return showSearchCharacterUI();
|
|
26559
26611
|
}
|
|
26560
26612
|
}, React__default.createElement(rx.RxMagnifyingGlass, {
|
|
@@ -26565,15 +26617,18 @@ var ChatRevamp = function ChatRevamp(_ref) {
|
|
|
26565
26617
|
}, recentChatCharacters == null ? void 0 : recentChatCharacters.map(function (character) {
|
|
26566
26618
|
return React__default.createElement(ListElementContainer, {
|
|
26567
26619
|
key: character._id
|
|
26568
|
-
}, React__default.createElement(ListElement
|
|
26620
|
+
}, React__default.createElement(ListElement, {
|
|
26569
26621
|
active: character._id === recentSelectedChatCharacterId,
|
|
26570
|
-
|
|
26622
|
+
onClick: function onClick() {
|
|
26571
26623
|
return handlePreviousChatCharacterClick(character);
|
|
26572
26624
|
}
|
|
26573
26625
|
}, React__default.createElement(StatusDot, {
|
|
26574
26626
|
isUnseen: (unseenMessageCharacterIds == null ? void 0 : unseenMessageCharacterIds.includes(character._id)) || false
|
|
26575
|
-
}),
|
|
26576
|
-
|
|
26627
|
+
}), React__default.createElement(Ellipsis, {
|
|
26628
|
+
maxLines: 1,
|
|
26629
|
+
maxWidth: "140px"
|
|
26630
|
+
}, character.name)), React__default.createElement(CloseButton$1, {
|
|
26631
|
+
onClick: function onClick() {
|
|
26577
26632
|
return onRemoveRecentChatCharacter == null ? void 0 : onRemoveRecentChatCharacter(character);
|
|
26578
26633
|
}
|
|
26579
26634
|
}, React__default.createElement(rx.RxCross2, {
|
|
@@ -26597,24 +26652,30 @@ var ChatRevamp = function ChatRevamp(_ref) {
|
|
|
26597
26652
|
onBlur: onBlur
|
|
26598
26653
|
})));
|
|
26599
26654
|
};
|
|
26655
|
+
var ChatContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
26656
|
+
displayName: "ChatRevamp__ChatContainer",
|
|
26657
|
+
componentId: "sc-1sdiknw-0"
|
|
26658
|
+
})(["display:flex;flex-direction:column;gap:10px;max-width:1200px;margin:0 auto;"]);
|
|
26600
26659
|
var TabContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26601
26660
|
displayName: "ChatRevamp__TabContainer",
|
|
26602
|
-
componentId: "sc-1sdiknw-
|
|
26661
|
+
componentId: "sc-1sdiknw-1"
|
|
26603
26662
|
})(["width:100%;display:flex;gap:10px;"]);
|
|
26604
26663
|
var Tab = /*#__PURE__*/styled__default.button.withConfig({
|
|
26605
26664
|
displayName: "ChatRevamp__Tab",
|
|
26606
|
-
componentId: "sc-1sdiknw-
|
|
26607
|
-
})(["width:120px;color:white;font-size:0.8rem;all:unset;padding:0.6rem;font-size:0.8rem;border-radius:5px 5px 0 0;border-width:0.25rem 0.25rem 0 0.25rem;border-style:solid;border-color:", ";background-color:", ";color:", ";"], function (props) {
|
|
26665
|
+
componentId: "sc-1sdiknw-2"
|
|
26666
|
+
})(["width:120px;color:white;font-size:0.8rem;all:unset;padding:0.6rem;font-size:0.8rem;border-radius:5px 5px 0 0;border-width:0.25rem 0.25rem 0 0.25rem;border-style:solid;border-color:", ";background-color:", ";color:", ";transition:all 0.3s ease;cursor:pointer;&:hover{background-color:", ";}"], function (props) {
|
|
26608
26667
|
return props.active ? '#c65102' : uiColors.gray;
|
|
26609
26668
|
}, function (props) {
|
|
26610
26669
|
return props.active ? uiColors.orange : 'transparent';
|
|
26611
26670
|
}, function (props) {
|
|
26612
26671
|
return props.active ? 'white' : uiColors.raisinBlack;
|
|
26672
|
+
}, function (props) {
|
|
26673
|
+
return props.active ? uiColors.orange : uiColors.lightGray;
|
|
26613
26674
|
});
|
|
26614
26675
|
var PrivateChatContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26615
26676
|
displayName: "ChatRevamp__PrivateChatContainer",
|
|
26616
|
-
componentId: "sc-1sdiknw-
|
|
26617
|
-
})(["width:", ";min-height:", " !important;padding:10px;background-color:rgba(0,0,0,0.2);height:auto;display:flex;gap:10px;"], function (_ref2) {
|
|
26677
|
+
componentId: "sc-1sdiknw-3"
|
|
26678
|
+
})(["width:", ";min-height:", " !important;padding:10px;background-color:rgba(0,0,0,0.2);height:auto;display:flex;gap:10px;border-radius:0 0 10px 10px;box-shadow:0 4px 6px rgba(0,0,0,0.1);"], function (_ref2) {
|
|
26618
26679
|
var width = _ref2.width;
|
|
26619
26680
|
return width;
|
|
26620
26681
|
}, function (_ref3) {
|
|
@@ -26623,7 +26684,7 @@ var PrivateChatContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
26623
26684
|
});
|
|
26624
26685
|
var RecentChatTabContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26625
26686
|
displayName: "ChatRevamp__RecentChatTabContainer",
|
|
26626
|
-
componentId: "sc-1sdiknw-
|
|
26687
|
+
componentId: "sc-1sdiknw-4"
|
|
26627
26688
|
})(["display:", ";flex-direction:column;border-right:1px solid ", ";outline:none;width:", " !important;transition:width 0.3s ease-in-out;overflow:hidden;@media (max-width:768px){width:", " !important;}"], function (props) {
|
|
26628
26689
|
return props.isPrivate ? 'flex' : 'none';
|
|
26629
26690
|
}, uiColors.gray, function (props) {
|
|
@@ -26633,48 +26694,48 @@ var RecentChatTabContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
26633
26694
|
});
|
|
26634
26695
|
var RecentChatTopBar = /*#__PURE__*/styled__default.div.withConfig({
|
|
26635
26696
|
displayName: "ChatRevamp__RecentChatTopBar",
|
|
26636
|
-
componentId: "sc-1sdiknw-
|
|
26697
|
+
componentId: "sc-1sdiknw-5"
|
|
26637
26698
|
})(["display:flex;align-items:center;justify-content:space-between;height:30px;"]);
|
|
26638
26699
|
var SearchButton$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
26639
26700
|
displayName: "ChatRevamp__SearchButton",
|
|
26640
|
-
componentId: "sc-1sdiknw-
|
|
26701
|
+
componentId: "sc-1sdiknw-6"
|
|
26641
26702
|
})(["border:none;background-color:transparent;display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding:4px;position:relative;"]);
|
|
26642
26703
|
var BurgerIconContainer = /*#__PURE__*/styled__default.button.withConfig({
|
|
26643
26704
|
displayName: "ChatRevamp__BurgerIconContainer",
|
|
26644
|
-
componentId: "sc-1sdiknw-
|
|
26705
|
+
componentId: "sc-1sdiknw-7"
|
|
26645
26706
|
})(["border:none;background-color:transparent;display:flex;flex-direction:column;align-items:flex-end;padding:4px;gap:2px;position:relative;&:after{content:'';width:6px;height:6px;position:absolute;top:0;right:2px;border-radius:50%;background-color:", ";display:", ";}"], uiColors.lightGreen, function (props) {
|
|
26646
26707
|
return props.hasUnseenMessages ? 'block' : 'none';
|
|
26647
26708
|
});
|
|
26648
26709
|
var BurgerLineIcon = /*#__PURE__*/styled__default.span.withConfig({
|
|
26649
26710
|
displayName: "ChatRevamp__BurgerLineIcon",
|
|
26650
|
-
componentId: "sc-1sdiknw-
|
|
26711
|
+
componentId: "sc-1sdiknw-8"
|
|
26651
26712
|
})(["width:1rem;height:2px;background-color:#ffffff;"]);
|
|
26652
26713
|
var RecentChatLogContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26653
26714
|
displayName: "ChatRevamp__RecentChatLogContainer",
|
|
26654
|
-
componentId: "sc-1sdiknw-
|
|
26715
|
+
componentId: "sc-1sdiknw-9"
|
|
26655
26716
|
})(["border:none;list-style:none;display:flex;opacity:", ";flex-direction:column;gap:0.5rem;transition:opacity 0.3s ease-in-out;padding:0;margin:0;flex:1;"], function (props) {
|
|
26656
26717
|
return props.isOpen ? 1 : 0;
|
|
26657
26718
|
});
|
|
26658
26719
|
var ListElementContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
26659
26720
|
displayName: "ChatRevamp__ListElementContainer",
|
|
26660
|
-
componentId: "sc-1sdiknw-
|
|
26721
|
+
componentId: "sc-1sdiknw-10"
|
|
26661
26722
|
})(["display:flex;justify-content:space-between;align-items:center;"]);
|
|
26662
|
-
var ListElement
|
|
26723
|
+
var ListElement = /*#__PURE__*/styled__default.button.withConfig({
|
|
26663
26724
|
displayName: "ChatRevamp__ListElement",
|
|
26664
|
-
componentId: "sc-1sdiknw-
|
|
26665
|
-
})(["margin:0.5rem 0 !important;font-size:", " !important;padding:
|
|
26725
|
+
componentId: "sc-1sdiknw-11"
|
|
26726
|
+
})(["margin:0.5rem 0 !important;font-size:", " !important;padding:8px;border-radius:4px;all:unset;color:", ";width:100%;position:relative;display:flex;align-items:center;gap:4px;transition:all 0.2s ease;&:hover{background-color:rgba(255,255,255,0.1);}"], uiFonts.size.small, function (props) {
|
|
26666
26727
|
return props.active ? uiColors.yellow : uiColors.white;
|
|
26667
26728
|
});
|
|
26668
26729
|
var StatusDot = /*#__PURE__*/styled__default.span.withConfig({
|
|
26669
26730
|
displayName: "ChatRevamp__StatusDot",
|
|
26670
|
-
componentId: "sc-1sdiknw-
|
|
26731
|
+
componentId: "sc-1sdiknw-12"
|
|
26671
26732
|
})(["width:6px;height:6px;border-radius:50%;background-color:", ";display:inline-block;margin-right:6px;"], function (props) {
|
|
26672
26733
|
return props.isUnseen ? uiColors.lightGreen : uiColors.gray;
|
|
26673
26734
|
});
|
|
26674
26735
|
var CloseButton$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
26675
26736
|
displayName: "ChatRevamp__CloseButton",
|
|
26676
|
-
componentId: "sc-1sdiknw-
|
|
26677
|
-
})(["all:unset;font-size:", ";margin:0 0.5rem;transition:all 0.2s ease-in-out;background-color:", ";color:", ";&:hover{background-color:", ";color:", ";}"], uiFonts.size.xxsmall, uiColors.red, uiColors.white, uiColors.white, uiColors.red);
|
|
26737
|
+
componentId: "sc-1sdiknw-13"
|
|
26738
|
+
})(["all:unset;font-size:", ";margin:0 0.5rem;transition:all 0.2s ease-in-out;background-color:", ";color:", ";border-radius:50%;padding:4px;display:flex;align-items:center;justify-content:center;&:hover{background-color:", ";color:", ";}"], uiFonts.size.xxsmall, uiColors.red, uiColors.white, uiColors.white, uiColors.red);
|
|
26678
26739
|
|
|
26679
26740
|
var CheckButton = function CheckButton(_ref) {
|
|
26680
26741
|
var items = _ref.items,
|
|
@@ -27328,7 +27389,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
27328
27389
|
overflow: 'hidden'
|
|
27329
27390
|
}
|
|
27330
27391
|
}, options.map(function (params, index) {
|
|
27331
|
-
return React__default.createElement(ListElement$
|
|
27392
|
+
return React__default.createElement(ListElement$1, {
|
|
27332
27393
|
key: (params == null ? void 0 : params.id) || index,
|
|
27333
27394
|
onPointerDown: function onPointerDown() {
|
|
27334
27395
|
onSelected(params == null ? void 0 : params.id);
|
|
@@ -27346,7 +27407,7 @@ var Container$9 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
27346
27407
|
}, function (props) {
|
|
27347
27408
|
return props.fontSize;
|
|
27348
27409
|
});
|
|
27349
|
-
var ListElement$
|
|
27410
|
+
var ListElement$1 = /*#__PURE__*/styled__default.li.withConfig({
|
|
27350
27411
|
displayName: "RelativeListMenu__ListElement",
|
|
27351
27412
|
componentId: "sc-7hohf-1"
|
|
27352
27413
|
})(["margin-right:0.5rem;"]);
|
|
@@ -28853,7 +28914,7 @@ var SearchFriend = function SearchFriend(_ref) {
|
|
|
28853
28914
|
onSearch(characterName);
|
|
28854
28915
|
}
|
|
28855
28916
|
};
|
|
28856
|
-
var searchTabContent = React__default.createElement(ListContainer
|
|
28917
|
+
var searchTabContent = React__default.createElement(ListContainer, null, React__default.createElement(SearchForm, {
|
|
28857
28918
|
onSubmit: handleSubmit
|
|
28858
28919
|
}, React__default.createElement(SearchInput, {
|
|
28859
28920
|
value: characterName,
|
|
@@ -28872,7 +28933,7 @@ var SearchFriend = function SearchFriend(_ref) {
|
|
|
28872
28933
|
onAction: onSendFriendRequest,
|
|
28873
28934
|
actionLabel: "Add Friend"
|
|
28874
28935
|
}));
|
|
28875
|
-
var requestsTabContent = React__default.createElement(ListContainer
|
|
28936
|
+
var requestsTabContent = React__default.createElement(ListContainer, null, React__default.createElement(FriendRequestSection, {
|
|
28876
28937
|
friendRequests: friendRequests,
|
|
28877
28938
|
onAccept: onAcceptRequest,
|
|
28878
28939
|
onReject: onRejectRequest
|
|
@@ -28897,10 +28958,10 @@ var CharacterList = function CharacterList(_ref2) {
|
|
|
28897
28958
|
var characters = _ref2.characters,
|
|
28898
28959
|
onAction = _ref2.onAction,
|
|
28899
28960
|
actionLabel = _ref2.actionLabel;
|
|
28900
|
-
return React__default.createElement(ListContainer
|
|
28961
|
+
return React__default.createElement(ListContainer, null, characters.map(function (character) {
|
|
28901
28962
|
return React__default.createElement(ListItem, {
|
|
28902
28963
|
key: character._id
|
|
28903
|
-
}, React__default.createElement(CharacterName, null, character.name), React__default.createElement(UserActionLink, {
|
|
28964
|
+
}, React__default.createElement(CharacterName$1, null, character.name), React__default.createElement(UserActionLink, {
|
|
28904
28965
|
color: uiColors.lightGreen,
|
|
28905
28966
|
onClick: function onClick() {
|
|
28906
28967
|
return onAction(character);
|
|
@@ -28912,10 +28973,10 @@ var FriendRequestSection = function FriendRequestSection(_ref3) {
|
|
|
28912
28973
|
var friendRequests = _ref3.friendRequests,
|
|
28913
28974
|
onAccept = _ref3.onAccept,
|
|
28914
28975
|
onReject = _ref3.onReject;
|
|
28915
|
-
return React__default.createElement(React__default.Fragment, null, friendRequests.length > 0 && React__default.createElement(ListContainer
|
|
28976
|
+
return React__default.createElement(React__default.Fragment, null, friendRequests.length > 0 && React__default.createElement(ListContainer, null, friendRequests.map(function (character) {
|
|
28916
28977
|
return React__default.createElement(ListItem, {
|
|
28917
28978
|
key: character._id
|
|
28918
|
-
}, React__default.createElement(CharacterName, null, character.name), React__default.createElement(AcceptRejectActions, null, React__default.createElement(UserActionLink, {
|
|
28979
|
+
}, React__default.createElement(CharacterName$1, null, character.name), React__default.createElement(AcceptRejectActions, null, React__default.createElement(UserActionLink, {
|
|
28919
28980
|
color: uiColors.lightGreen,
|
|
28920
28981
|
onClick: function onClick() {
|
|
28921
28982
|
return onAccept(character);
|
|
@@ -28940,7 +29001,7 @@ var SearchInput = /*#__PURE__*/styled__default.input.withConfig({
|
|
|
28940
29001
|
displayName: "SearchFriend__SearchInput",
|
|
28941
29002
|
componentId: "sc-1lt1ols-2"
|
|
28942
29003
|
})(["width:100%;background-color:rgba(0,0,0,0.25);border:none;padding:0.5rem;font-size:", ";"], uiFonts.size.small);
|
|
28943
|
-
var ListContainer
|
|
29004
|
+
var ListContainer = /*#__PURE__*/styled__default.ul.withConfig({
|
|
28944
29005
|
displayName: "SearchFriend__ListContainer",
|
|
28945
29006
|
componentId: "sc-1lt1ols-3"
|
|
28946
29007
|
})(["list-style:none;padding:0;margin:0;width:100%;max-height:50vh;overflow-y:auto;@media (max-width:768px){max-height:90vh;}"]);
|
|
@@ -28948,7 +29009,7 @@ var ListItem = /*#__PURE__*/styled__default.li.withConfig({
|
|
|
28948
29009
|
displayName: "SearchFriend__ListItem",
|
|
28949
29010
|
componentId: "sc-1lt1ols-4"
|
|
28950
29011
|
})(["display:flex;align-items:center;justify-content:space-between;padding:0.5rem;border-bottom:1px solid rgba(255,255,255,0.1);"]);
|
|
28951
|
-
var CharacterName = /*#__PURE__*/styled__default.p.withConfig({
|
|
29012
|
+
var CharacterName$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
28952
29013
|
displayName: "SearchFriend__CharacterName",
|
|
28953
29014
|
componentId: "sc-1lt1ols-5"
|
|
28954
29015
|
})(["font-size:", ";margin:0;"], uiFonts.size.small);
|
|
@@ -30547,7 +30608,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
30547
30608
|
overflow: 'hidden'
|
|
30548
30609
|
}
|
|
30549
30610
|
}, options.map(function (params, index) {
|
|
30550
|
-
return React__default.createElement(ListElement$
|
|
30611
|
+
return React__default.createElement(ListElement$2, {
|
|
30551
30612
|
key: (params == null ? void 0 : params.id) || index,
|
|
30552
30613
|
onPointerDown: function onPointerDown() {
|
|
30553
30614
|
onSelected(params == null ? void 0 : params.id);
|
|
@@ -30563,7 +30624,7 @@ var Container$m = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30563
30624
|
}, function (props) {
|
|
30564
30625
|
return props.x || 0;
|
|
30565
30626
|
}, uiFonts.size.xsmall);
|
|
30566
|
-
var ListElement$
|
|
30627
|
+
var ListElement$2 = /*#__PURE__*/styled__default.li.withConfig({
|
|
30567
30628
|
displayName: "ListMenu__ListElement",
|
|
30568
30629
|
componentId: "sc-i9097t-1"
|
|
30569
30630
|
})(["margin-right:0.5rem;"]);
|
|
@@ -30822,7 +30883,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
30822
30883
|
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
30823
30884
|
},
|
|
30824
30885
|
message: "Are you sure to buy this item?"
|
|
30825
|
-
}), React__default.createElement(InputWrapper, null, React__default.createElement("p", null, "Search By Name"), React__default.createElement(Input, {
|
|
30886
|
+
}), React__default.createElement(InputWrapper$1, null, React__default.createElement("p", null, "Search By Name"), React__default.createElement(Input, {
|
|
30826
30887
|
onChange: function onChange(e) {
|
|
30827
30888
|
setName(e.target.value);
|
|
30828
30889
|
onChangeNameInput(e.target.value);
|
|
@@ -30925,7 +30986,7 @@ var BuyPanel = function BuyPanel(_ref) {
|
|
|
30925
30986
|
});
|
|
30926
30987
|
})));
|
|
30927
30988
|
};
|
|
30928
|
-
var InputWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
30989
|
+
var InputWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
30929
30990
|
displayName: "BuyPanel__InputWrapper",
|
|
30930
30991
|
componentId: "sc-1si8t7i-0"
|
|
30931
30992
|
})(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
|
|
@@ -31002,7 +31063,7 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
|
|
|
31002
31063
|
enableHotkeys == null ? void 0 : enableHotkeys();
|
|
31003
31064
|
},
|
|
31004
31065
|
message: "Are you sure to remove this item?"
|
|
31005
|
-
}), React__default.createElement(InputWrapper$
|
|
31066
|
+
}), React__default.createElement(InputWrapper$2, null, React__default.createElement("p", null, "Search By Name"), React__default.createElement(Input, {
|
|
31006
31067
|
onChange: function onChange(e) {
|
|
31007
31068
|
setName(e.target.value);
|
|
31008
31069
|
onChangeNameInput(e.target.value);
|
|
@@ -31069,7 +31130,7 @@ var Flex$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
31069
31130
|
displayName: "ManagmentPanel__Flex",
|
|
31070
31131
|
componentId: "sc-1yyi6jn-0"
|
|
31071
31132
|
})(["display:flex;gap:5px;align-items:center;"]);
|
|
31072
|
-
var InputWrapper$
|
|
31133
|
+
var InputWrapper$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31073
31134
|
displayName: "ManagmentPanel__InputWrapper",
|
|
31074
31135
|
componentId: "sc-1yyi6jn-1"
|
|
31075
31136
|
})(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
|