@rpg-engine/long-bow 0.6.66 → 0.6.68
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/Friends/FriendList.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +72 -56
- 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 +68 -57
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Friends/FriendList.tsx +86 -94
- package/src/components/Table/Table.tsx +33 -0
- package/src/index.tsx +2 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -28781,6 +28781,27 @@ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
|
28781
28781
|
componentId: "sc-1wuddg2-1"
|
|
28782
28782
|
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
28783
28783
|
|
|
28784
|
+
var Table = /*#__PURE__*/styled.table.withConfig({
|
|
28785
|
+
displayName: "Table",
|
|
28786
|
+
componentId: "sc-1c24pcj-0"
|
|
28787
|
+
})(["width:100%;border-collapse:collapse;margin-top:1rem;"]);
|
|
28788
|
+
var TableRow = /*#__PURE__*/styled.tr.withConfig({
|
|
28789
|
+
displayName: "Table__TableRow",
|
|
28790
|
+
componentId: "sc-1c24pcj-1"
|
|
28791
|
+
})(["&:nth-child(even){background-color:rgba(255,255,255,0.05) !important;}"]);
|
|
28792
|
+
var TableHeader = /*#__PURE__*/styled.th.withConfig({
|
|
28793
|
+
displayName: "Table__TableHeader",
|
|
28794
|
+
componentId: "sc-1c24pcj-2"
|
|
28795
|
+
})(["text-align:left;padding:0.5rem;color:", " !important;border-bottom:1px solid ", ";"], uiColors.yellow, uiColors.lightGray);
|
|
28796
|
+
var TableCell = /*#__PURE__*/styled.td.withConfig({
|
|
28797
|
+
displayName: "Table__TableCell",
|
|
28798
|
+
componentId: "sc-1c24pcj-3"
|
|
28799
|
+
})(["padding:0.5rem;color:", ";border-bottom:1px solid ", ";"], uiColors.white, uiColors.lightGray);
|
|
28800
|
+
var ActionButtons = /*#__PURE__*/styled.div.withConfig({
|
|
28801
|
+
displayName: "Table__ActionButtons",
|
|
28802
|
+
componentId: "sc-1c24pcj-4"
|
|
28803
|
+
})(["display:flex;gap:10px;align-items:center;"]);
|
|
28804
|
+
|
|
28784
28805
|
var SearchFriend = function SearchFriend(props) {
|
|
28785
28806
|
var searchedCharacters = props.searchedCharacters,
|
|
28786
28807
|
friendRequests = props.friendRequests,
|
|
@@ -28871,32 +28892,22 @@ var AcceptRejectButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
28871
28892
|
componentId: "sc-1lt1ols-5"
|
|
28872
28893
|
})(["display:flex;justify-content:space-between;gap:0.5rem;"]);
|
|
28873
28894
|
|
|
28874
|
-
var FriendList = function FriendList(
|
|
28895
|
+
var FriendList = function FriendList(_ref) {
|
|
28896
|
+
var friends = _ref.friends,
|
|
28897
|
+
friendRequests = _ref.friendRequests,
|
|
28898
|
+
searchedCharacters = _ref.searchedCharacters,
|
|
28899
|
+
onFocus = _ref.onFocus,
|
|
28900
|
+
onBlur = _ref.onBlur,
|
|
28901
|
+
onSearch = _ref.onSearch,
|
|
28902
|
+
onAcceptRequest = _ref.onAcceptRequest,
|
|
28903
|
+
onSendFriendRequest = _ref.onSendFriendRequest,
|
|
28904
|
+
onRemoveFriend = _ref.onRemoveFriend,
|
|
28905
|
+
onOpenPrivateMessage = _ref.onOpenPrivateMessage,
|
|
28906
|
+
onRejectRequest = _ref.onRejectRequest;
|
|
28875
28907
|
var _useState = useState(false),
|
|
28876
28908
|
isAddFriendUI = _useState[0],
|
|
28877
28909
|
setIsAddFriendUI = _useState[1];
|
|
28878
|
-
|
|
28879
|
-
friends = props.friends,
|
|
28880
|
-
friendRequests = props.friendRequests,
|
|
28881
|
-
searchedCharacters = props.searchedCharacters,
|
|
28882
|
-
onBlur = props.onBlur,
|
|
28883
|
-
onFocus = props.onFocus,
|
|
28884
|
-
onClose = props.onClose,
|
|
28885
|
-
onSearch = props.onSearch,
|
|
28886
|
-
onAcceptRequest = props.onAcceptRequest,
|
|
28887
|
-
onSendFriendRequest = props.onSendFriendRequest,
|
|
28888
|
-
onRemoveFriend = props.onRemoveFriend,
|
|
28889
|
-
onOpenPrivateMessage = props.onOpenPrivateMessage,
|
|
28890
|
-
onRejectRequest = props.onRejectRequest;
|
|
28891
|
-
return React.createElement(DraggableContainer, {
|
|
28892
|
-
type: RPGUIContainerTypes.Framed,
|
|
28893
|
-
onCloseButton: function onCloseButton() {
|
|
28894
|
-
if (onClose) onClose();
|
|
28895
|
-
},
|
|
28896
|
-
width: "800px",
|
|
28897
|
-
cancelDrag: "#FriendListContainer, .rpgui-dropdown-imp, input, .empty-slot, button",
|
|
28898
|
-
scale: scale
|
|
28899
|
-
}, isAddFriendUI ? React.createElement(SearchFriend, {
|
|
28910
|
+
return React.createElement(ListWrapper, null, isAddFriendUI ? React.createElement(SearchFriend, {
|
|
28900
28911
|
searchedCharacters: searchedCharacters,
|
|
28901
28912
|
onSendFriendRequest: onSendFriendRequest,
|
|
28902
28913
|
onAcceptRequest: onAcceptRequest,
|
|
@@ -28905,58 +28916,58 @@ var FriendList = function FriendList(props) {
|
|
|
28905
28916
|
onSearch: onSearch,
|
|
28906
28917
|
onBlur: onBlur,
|
|
28907
28918
|
onFocus: onFocus
|
|
28908
|
-
}) : React.createElement(
|
|
28909
|
-
return React.createElement(
|
|
28919
|
+
}) : React.createElement(React.Fragment, null, React.createElement(ScrollableArea, null, React.createElement(Table, null, React.createElement("thead", null, React.createElement(TableRow, null, React.createElement(TableHeader, null, "Online"), React.createElement(TableHeader, null, "Name"), React.createElement(TableHeader, null, "Actions"))), React.createElement("tbody", null, friends.map(function (friend) {
|
|
28920
|
+
return React.createElement(TableRow, {
|
|
28910
28921
|
key: friend._id
|
|
28911
|
-
}, React.createElement(
|
|
28922
|
+
}, React.createElement(TableCell, null, React.createElement(IsOnlineBadge, {
|
|
28912
28923
|
"$isOnline": friend.isOnline
|
|
28913
|
-
}), friend.name), React.createElement(
|
|
28914
|
-
|
|
28915
|
-
|
|
28924
|
+
})), React.createElement(TableCell, null, friend.name), React.createElement(TableCell, null, React.createElement(ActionButtons, null, React.createElement(UserAction, {
|
|
28925
|
+
color: uiColors.yellow,
|
|
28926
|
+
onClick: function onClick() {
|
|
28916
28927
|
return onOpenPrivateMessage(friend);
|
|
28917
28928
|
}
|
|
28918
|
-
}, "
|
|
28919
|
-
|
|
28920
|
-
|
|
28929
|
+
}, "Chat"), React.createElement(UserAction, {
|
|
28930
|
+
color: uiColors.red,
|
|
28931
|
+
onClick: function onClick() {
|
|
28921
28932
|
return onRemoveFriend(friend);
|
|
28922
28933
|
}
|
|
28923
|
-
}, "Remove")));
|
|
28924
|
-
})), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
|
|
28934
|
+
}, "Remove"))));
|
|
28935
|
+
}))))), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
|
|
28925
28936
|
buttonType: ButtonTypes.RPGUIButton,
|
|
28926
28937
|
onClick: function onClick() {
|
|
28927
|
-
return setIsAddFriendUI(function (
|
|
28928
|
-
return !
|
|
28938
|
+
return setIsAddFriendUI(function (prev) {
|
|
28939
|
+
return !prev;
|
|
28929
28940
|
});
|
|
28930
28941
|
}
|
|
28931
28942
|
}, isAddFriendUI ? 'Back' : 'Add New Friend')));
|
|
28932
28943
|
};
|
|
28933
|
-
|
|
28934
|
-
|
|
28944
|
+
// Styled components for FriendList UI
|
|
28945
|
+
var ListWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
28946
|
+
displayName: "FriendList__ListWrapper",
|
|
28935
28947
|
componentId: "sc-3jf9vt-0"
|
|
28936
|
-
})(["
|
|
28937
|
-
var
|
|
28938
|
-
displayName: "
|
|
28948
|
+
})(["margin-top:1rem;max-height:350px;display:flex;flex-direction:column;"]);
|
|
28949
|
+
var ScrollableArea = /*#__PURE__*/styled.div.withConfig({
|
|
28950
|
+
displayName: "FriendList__ScrollableArea",
|
|
28939
28951
|
componentId: "sc-3jf9vt-1"
|
|
28940
|
-
})(["
|
|
28941
|
-
var ListElement$4 = /*#__PURE__*/styled.li.withConfig({
|
|
28942
|
-
displayName: "FriendList__ListElement",
|
|
28943
|
-
componentId: "sc-3jf9vt-2"
|
|
28944
|
-
})(["margin:0.5rem 0 !important;font-size:", ";padding:0.5rem 4px;display:flex;align-items:center;justify-content:space-between;border-radius:4px;& div{display:flex;align-items:center;}"], uiFonts.size.small);
|
|
28952
|
+
})(["overflow-y:auto;max-height:300px;"]);
|
|
28945
28953
|
var IsOnlineBadge = /*#__PURE__*/styled.div.withConfig({
|
|
28946
28954
|
displayName: "FriendList__IsOnlineBadge",
|
|
28947
|
-
componentId: "sc-3jf9vt-
|
|
28948
|
-
})(["width:10px;height:10px;border-radius:50%;background-color:", ";margin-right:1rem;"], function (
|
|
28949
|
-
var $isOnline =
|
|
28955
|
+
componentId: "sc-3jf9vt-2"
|
|
28956
|
+
})(["width:10px;height:10px;border-radius:50%;background-color:", ";margin-right:1rem;"], function (_ref2) {
|
|
28957
|
+
var $isOnline = _ref2.$isOnline;
|
|
28950
28958
|
return $isOnline ? uiColors.lightGreen : uiColors.red;
|
|
28951
28959
|
});
|
|
28952
28960
|
var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
28953
28961
|
displayName: "FriendList__ButtonContainer",
|
|
28954
|
-
componentId: "sc-3jf9vt-
|
|
28962
|
+
componentId: "sc-3jf9vt-3"
|
|
28955
28963
|
})(["display:flex;justify-content:center;align-items:center;width:100%;margin-top:1rem;"]);
|
|
28956
|
-
var
|
|
28957
|
-
displayName: "
|
|
28958
|
-
componentId: "sc-3jf9vt-
|
|
28959
|
-
})(["
|
|
28964
|
+
var UserAction = /*#__PURE__*/styled.span.withConfig({
|
|
28965
|
+
displayName: "FriendList__UserAction",
|
|
28966
|
+
componentId: "sc-3jf9vt-4"
|
|
28967
|
+
})(["color:", " !important;cursor:pointer;margin-right:0.5rem;&:hover{text-decoration:underline;}"], function (_ref3) {
|
|
28968
|
+
var color = _ref3.color;
|
|
28969
|
+
return color;
|
|
28970
|
+
});
|
|
28960
28971
|
|
|
28961
28972
|
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
28962
28973
|
|
|
@@ -30472,7 +30483,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
30472
30483
|
overflow: 'hidden'
|
|
30473
30484
|
}
|
|
30474
30485
|
}, options.map(function (params, index) {
|
|
30475
|
-
return React.createElement(ListElement$
|
|
30486
|
+
return React.createElement(ListElement$4, {
|
|
30476
30487
|
key: (params == null ? void 0 : params.id) || index,
|
|
30477
30488
|
onPointerDown: function onPointerDown() {
|
|
30478
30489
|
onSelected(params == null ? void 0 : params.id);
|
|
@@ -30488,7 +30499,7 @@ var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
|
30488
30499
|
}, function (props) {
|
|
30489
30500
|
return props.x || 0;
|
|
30490
30501
|
}, uiFonts.size.xsmall);
|
|
30491
|
-
var ListElement$
|
|
30502
|
+
var ListElement$4 = /*#__PURE__*/styled.li.withConfig({
|
|
30492
30503
|
displayName: "ListMenu__ListElement",
|
|
30493
30504
|
componentId: "sc-i9097t-1"
|
|
30494
30505
|
})(["margin-right:0.5rem;"]);
|
|
@@ -33426,5 +33437,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
33426
33437
|
componentId: "sc-7tgzv2-6"
|
|
33427
33438
|
})(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
|
|
33428
33439
|
|
|
33429
|
-
export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, _RPGUI, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
33440
|
+
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, Table, TableCell, TableHeader, TableRow, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, _RPGUI, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
33430
33441
|
//# sourceMappingURL=long-bow.esm.js.map
|