@rpg-engine/long-bow 0.5.77 → 0.5.78
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/Abstractions/SlotsContainer.d.ts +2 -0
- package/dist/components/DraggableContainer.d.ts +2 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +48 -11
- 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 +49 -12
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Abstractions/SlotsContainer.tsx +6 -0
- package/src/components/AsyncDropdown.tsx +5 -7
- package/src/components/DraggableContainer.tsx +29 -1
- package/src/components/Dropdown.tsx +3 -5
- package/src/components/Item/Inventory/ItemContainer.tsx +18 -3
- package/src/components/Shortcuts/ShortcutsSetter.tsx +6 -0
|
@@ -29,5 +29,7 @@ export interface IItemContainerProps {
|
|
|
29
29
|
isDepotSystem?: boolean;
|
|
30
30
|
onPositionChangeEnd?: (position: IPosition) => void;
|
|
31
31
|
onPositionChangeStart?: (position: IPosition) => void;
|
|
32
|
+
isFullScreen?: boolean;
|
|
33
|
+
opacity?: number;
|
|
32
34
|
}
|
|
33
35
|
export declare const ItemContainer: React.FC<IItemContainerProps>;
|
|
@@ -13473,8 +13473,14 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13473
13473
|
} : _ref$initialPosition,
|
|
13474
13474
|
scale = _ref.scale,
|
|
13475
13475
|
_ref$dragDisabled = _ref.dragDisabled,
|
|
13476
|
-
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled
|
|
13476
|
+
dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled,
|
|
13477
|
+
isFullScreen = _ref.isFullScreen,
|
|
13478
|
+
opacity = _ref.opacity;
|
|
13477
13479
|
var draggableRef = React.useRef(null);
|
|
13480
|
+
if (isFullScreen) {
|
|
13481
|
+
width = '100%';
|
|
13482
|
+
height = '100%';
|
|
13483
|
+
}
|
|
13478
13484
|
useOutsideClick(draggableRef, 'item-container');
|
|
13479
13485
|
React.useEffect(function () {
|
|
13480
13486
|
document.addEventListener('clickOutside', function (event) {
|
|
@@ -13522,7 +13528,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13522
13528
|
ref: draggableRef,
|
|
13523
13529
|
width: width,
|
|
13524
13530
|
height: height || 'auto',
|
|
13525
|
-
className: "rpgui-container " + type + " " + className
|
|
13531
|
+
className: "rpgui-container " + type + " " + className,
|
|
13532
|
+
isFullScreen: isFullScreen,
|
|
13533
|
+
opacity: opacity
|
|
13526
13534
|
}, title && React__default.createElement(TitleContainer, {
|
|
13527
13535
|
className: "drag-handler"
|
|
13528
13536
|
}, React__default.createElement(Title, null, imgSrc && React__default.createElement(Icon, {
|
|
@@ -13536,11 +13544,17 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13536
13544
|
var Container$7 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13537
13545
|
displayName: "DraggableContainer__Container",
|
|
13538
13546
|
componentId: "sc-184mpyl-0"
|
|
13539
|
-
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated
|
|
13547
|
+
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
13540
13548
|
return props.height;
|
|
13541
13549
|
}, function (_ref2) {
|
|
13542
13550
|
var width = _ref2.width;
|
|
13543
13551
|
return width;
|
|
13552
|
+
}, function (_ref3) {
|
|
13553
|
+
var opacity = _ref3.opacity;
|
|
13554
|
+
return opacity && styled.css(["opacity:", ";"], opacity);
|
|
13555
|
+
}, function (_ref4) {
|
|
13556
|
+
var isFullScreen = _ref4.isFullScreen;
|
|
13557
|
+
return isFullScreen && styled.css(["justify-content:center;align-items:flex-start;align-content:flex-start;"]);
|
|
13544
13558
|
});
|
|
13545
13559
|
var CloseButton$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13546
13560
|
displayName: "DraggableContainer__CloseButton",
|
|
@@ -13549,7 +13563,7 @@ var CloseButton$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
13549
13563
|
var TitleContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
13550
13564
|
displayName: "DraggableContainer__TitleContainer",
|
|
13551
13565
|
componentId: "sc-184mpyl-2"
|
|
13552
|
-
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;"]);
|
|
13566
|
+
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;max-height:42px;"]);
|
|
13553
13567
|
var Title = /*#__PURE__*/styled__default.h1.withConfig({
|
|
13554
13568
|
displayName: "DraggableContainer__Title",
|
|
13555
13569
|
componentId: "sc-184mpyl-3"
|
|
@@ -16120,8 +16134,12 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
16120
16134
|
onOutsideClick = _ref.onOutsideClick,
|
|
16121
16135
|
initialPosition = _ref.initialPosition,
|
|
16122
16136
|
scale = _ref.scale,
|
|
16123
|
-
width = _ref.width
|
|
16137
|
+
width = _ref.width,
|
|
16138
|
+
isFullScreen = _ref.isFullScreen,
|
|
16139
|
+
opacity = _ref.opacity;
|
|
16124
16140
|
return React__default.createElement(DraggableContainer, {
|
|
16141
|
+
isFullScreen: isFullScreen,
|
|
16142
|
+
opacity: opacity,
|
|
16125
16143
|
title: title,
|
|
16126
16144
|
type: exports.RPGUIContainerTypes.Framed,
|
|
16127
16145
|
onCloseButton: function onCloseButton() {
|
|
@@ -16215,6 +16233,8 @@ var useScrollOnDrag = function useScrollOnDrag(_ref) {
|
|
|
16215
16233
|
};
|
|
16216
16234
|
};
|
|
16217
16235
|
|
|
16236
|
+
var UI_BREAKPOINT_MOBILE = '950px';
|
|
16237
|
+
|
|
16218
16238
|
var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
16219
16239
|
var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
|
|
16220
16240
|
settingShortcutIndex = _ref.settingShortcutIndex,
|
|
@@ -16285,7 +16305,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
16285
16305
|
var Container$k = /*#__PURE__*/styled__default.div.withConfig({
|
|
16286
16306
|
displayName: "ShortcutsSetter__Container",
|
|
16287
16307
|
componentId: "sc-xuouuf-0"
|
|
16288
|
-
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100
|
|
16308
|
+
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;@media screen and (max-width:", "){max-height:80px;}"], UI_BREAKPOINT_MOBILE);
|
|
16289
16309
|
var Shortcut = /*#__PURE__*/styled__default.button.withConfig({
|
|
16290
16310
|
displayName: "ShortcutsSetter__Shortcut",
|
|
16291
16311
|
componentId: "sc-xuouuf-1"
|
|
@@ -16506,7 +16526,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16506
16526
|
equipmentSet = _ref.equipmentSet,
|
|
16507
16527
|
isDepotSystem = _ref.isDepotSystem,
|
|
16508
16528
|
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
16509
|
-
onPositionChangeStart = _ref.onPositionChangeStart
|
|
16529
|
+
onPositionChangeStart = _ref.onPositionChangeStart,
|
|
16530
|
+
isFullScreen = _ref.isFullScreen,
|
|
16531
|
+
opacity = _ref.opacity;
|
|
16510
16532
|
var _useState = React.useState({
|
|
16511
16533
|
isOpen: false,
|
|
16512
16534
|
maxQuantity: 1,
|
|
@@ -16626,7 +16648,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16626
16648
|
initialPosition: initialPosition,
|
|
16627
16649
|
scale: scale,
|
|
16628
16650
|
onPositionChangeEnd: onPositionChangeEnd,
|
|
16629
|
-
onPositionChangeStart: onPositionChangeStart
|
|
16651
|
+
onPositionChangeStart: onPositionChangeStart,
|
|
16652
|
+
isFullScreen: isFullScreen,
|
|
16653
|
+
opacity: opacity
|
|
16630
16654
|
}, type === shared.ItemContainerType.Inventory && shortcuts && removeShortcut && React__default.createElement(ShortcutsSetter, {
|
|
16631
16655
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16632
16656
|
settingShortcutIndex: settingShortcutIndex,
|
|
@@ -16637,7 +16661,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16637
16661
|
}), React__default.createElement(ItemsContainer, {
|
|
16638
16662
|
className: "item-container-body",
|
|
16639
16663
|
ref: containerRef,
|
|
16640
|
-
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL
|
|
16664
|
+
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL,
|
|
16665
|
+
isFullScreen: isFullScreen
|
|
16641
16666
|
}, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(ItemQuantitySelectorModal, {
|
|
16642
16667
|
quantitySelect: quantitySelect,
|
|
16643
16668
|
setQuantitySelect: setQuantitySelect
|
|
@@ -16646,9 +16671,21 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16646
16671
|
var ItemsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
16647
16672
|
displayName: "ItemContainer__ItemsContainer",
|
|
16648
16673
|
componentId: "sc-15y5p9l-0"
|
|
16649
|
-
})(["display:flex;justify-content:
|
|
16650
|
-
var
|
|
16674
|
+
})(["display:flex;justify-content:", ";flex-wrap:wrap;max-height:", ";overflow-y:", ";overflow-x:hidden;width:", ";margin-top:", ";"], function (_ref2) {
|
|
16675
|
+
var isFullScreen = _ref2.isFullScreen;
|
|
16676
|
+
return isFullScreen ? 'flex-start' : 'center';
|
|
16677
|
+
}, function (_ref3) {
|
|
16678
|
+
var isFullScreen = _ref3.isFullScreen;
|
|
16679
|
+
return isFullScreen ? '100vh' : '270px';
|
|
16680
|
+
}, function (_ref4) {
|
|
16681
|
+
var isScrollable = _ref4.isScrollable;
|
|
16651
16682
|
return isScrollable ? 'scroll' : 'hidden';
|
|
16683
|
+
}, function (_ref5) {
|
|
16684
|
+
var isFullScreen = _ref5.isFullScreen;
|
|
16685
|
+
return isFullScreen ? '100vw' : '415px';
|
|
16686
|
+
}, function (_ref6) {
|
|
16687
|
+
var isFullScreen = _ref6.isFullScreen;
|
|
16688
|
+
return isFullScreen ? '1rem' : '0';
|
|
16652
16689
|
});
|
|
16653
16690
|
|
|
16654
16691
|
var LeaderboardTable = function LeaderboardTable(props) {
|