@rpg-engine/long-bow 0.5.77 → 0.5.79
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 +45 -10
- 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 +46 -11
- 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/stories/ItemContainer.stories.tsx +3 -3
|
@@ -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() {
|
|
@@ -16506,7 +16524,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16506
16524
|
equipmentSet = _ref.equipmentSet,
|
|
16507
16525
|
isDepotSystem = _ref.isDepotSystem,
|
|
16508
16526
|
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
16509
|
-
onPositionChangeStart = _ref.onPositionChangeStart
|
|
16527
|
+
onPositionChangeStart = _ref.onPositionChangeStart,
|
|
16528
|
+
isFullScreen = _ref.isFullScreen,
|
|
16529
|
+
opacity = _ref.opacity;
|
|
16510
16530
|
var _useState = React.useState({
|
|
16511
16531
|
isOpen: false,
|
|
16512
16532
|
maxQuantity: 1,
|
|
@@ -16626,7 +16646,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16626
16646
|
initialPosition: initialPosition,
|
|
16627
16647
|
scale: scale,
|
|
16628
16648
|
onPositionChangeEnd: onPositionChangeEnd,
|
|
16629
|
-
onPositionChangeStart: onPositionChangeStart
|
|
16649
|
+
onPositionChangeStart: onPositionChangeStart,
|
|
16650
|
+
isFullScreen: isFullScreen,
|
|
16651
|
+
opacity: opacity
|
|
16630
16652
|
}, type === shared.ItemContainerType.Inventory && shortcuts && removeShortcut && React__default.createElement(ShortcutsSetter, {
|
|
16631
16653
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16632
16654
|
settingShortcutIndex: settingShortcutIndex,
|
|
@@ -16637,7 +16659,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16637
16659
|
}), React__default.createElement(ItemsContainer, {
|
|
16638
16660
|
className: "item-container-body",
|
|
16639
16661
|
ref: containerRef,
|
|
16640
|
-
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL
|
|
16662
|
+
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL,
|
|
16663
|
+
isFullScreen: isFullScreen
|
|
16641
16664
|
}, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(ItemQuantitySelectorModal, {
|
|
16642
16665
|
quantitySelect: quantitySelect,
|
|
16643
16666
|
setQuantitySelect: setQuantitySelect
|
|
@@ -16646,9 +16669,21 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16646
16669
|
var ItemsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
16647
16670
|
displayName: "ItemContainer__ItemsContainer",
|
|
16648
16671
|
componentId: "sc-15y5p9l-0"
|
|
16649
|
-
})(["display:flex;justify-content:
|
|
16650
|
-
var
|
|
16672
|
+
})(["display:flex;justify-content:", ";flex-wrap:wrap;max-height:", ";overflow-y:", ";overflow-x:hidden;width:", ";margin-top:", ";"], function (_ref2) {
|
|
16673
|
+
var isFullScreen = _ref2.isFullScreen;
|
|
16674
|
+
return isFullScreen ? 'flex-start' : 'center';
|
|
16675
|
+
}, function (_ref3) {
|
|
16676
|
+
var isFullScreen = _ref3.isFullScreen;
|
|
16677
|
+
return isFullScreen ? '100vh' : '270px';
|
|
16678
|
+
}, function (_ref4) {
|
|
16679
|
+
var isScrollable = _ref4.isScrollable;
|
|
16651
16680
|
return isScrollable ? 'scroll' : 'hidden';
|
|
16681
|
+
}, function (_ref5) {
|
|
16682
|
+
var isFullScreen = _ref5.isFullScreen;
|
|
16683
|
+
return isFullScreen ? '100vw' : '415px';
|
|
16684
|
+
}, function (_ref6) {
|
|
16685
|
+
var isFullScreen = _ref6.isFullScreen;
|
|
16686
|
+
return isFullScreen ? '1rem' : '0';
|
|
16652
16687
|
});
|
|
16653
16688
|
|
|
16654
16689
|
var LeaderboardTable = function LeaderboardTable(props) {
|