@rpg-engine/long-bow 0.5.76 → 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/AsyncDropdown.d.ts +1 -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 +58 -14
- 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 +59 -15
- 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 +12 -1
- 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>;
|
|
@@ -50,7 +50,9 @@ var AsyncDropdown = function AsyncDropdown(_ref) {
|
|
|
50
50
|
var options = _ref.options,
|
|
51
51
|
width = _ref.width,
|
|
52
52
|
onChange = _ref.onChange,
|
|
53
|
-
defaultValue = _ref.defaultValue
|
|
53
|
+
defaultValue = _ref.defaultValue,
|
|
54
|
+
_ref$opensUp = _ref.opensUp,
|
|
55
|
+
opensUp = _ref$opensUp === void 0 ? false : _ref$opensUp;
|
|
54
56
|
var dropdownId = uuid.v4();
|
|
55
57
|
var _useState = React.useState(defaultValue || (options == null ? void 0 : (_options$ = options[0]) == null ? void 0 : _options$.value)),
|
|
56
58
|
selectedValue = _useState[0],
|
|
@@ -101,7 +103,8 @@ var AsyncDropdown = function AsyncDropdown(_ref) {
|
|
|
101
103
|
color: uiColors.white
|
|
102
104
|
}))), React__default.createElement(DropdownOptions, {
|
|
103
105
|
className: "rpgui-dropdown-imp",
|
|
104
|
-
opened: opened
|
|
106
|
+
opened: opened,
|
|
107
|
+
opensUp: opensUp
|
|
105
108
|
}, options == null ? void 0 : options.map(function (option) {
|
|
106
109
|
return React__default.createElement("li", {
|
|
107
110
|
key: option.id,
|
|
@@ -133,8 +136,12 @@ var DropdownSelect = /*#__PURE__*/styled__default.p.withConfig({
|
|
|
133
136
|
var DropdownOptions = /*#__PURE__*/styled__default.ul.withConfig({
|
|
134
137
|
displayName: "AsyncDropdown__DropdownOptions",
|
|
135
138
|
componentId: "sc-lk409c-4"
|
|
136
|
-
})(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
139
|
+
})(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;bottom:", ";top:", ";margin:0;padding:0;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
137
140
|
return props.opened ? 'block' : 'none';
|
|
141
|
+
}, function (props) {
|
|
142
|
+
return props.opensUp ? '100%' : 'auto';
|
|
143
|
+
}, function (props) {
|
|
144
|
+
return props.opensUp ? 'auto' : '100%';
|
|
138
145
|
});
|
|
139
146
|
|
|
140
147
|
function _extends() {
|
|
@@ -13466,8 +13473,14 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13466
13473
|
} : _ref$initialPosition,
|
|
13467
13474
|
scale = _ref.scale,
|
|
13468
13475
|
_ref$dragDisabled = _ref.dragDisabled,
|
|
13469
|
-
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;
|
|
13470
13479
|
var draggableRef = React.useRef(null);
|
|
13480
|
+
if (isFullScreen) {
|
|
13481
|
+
width = '100%';
|
|
13482
|
+
height = '100%';
|
|
13483
|
+
}
|
|
13471
13484
|
useOutsideClick(draggableRef, 'item-container');
|
|
13472
13485
|
React.useEffect(function () {
|
|
13473
13486
|
document.addEventListener('clickOutside', function (event) {
|
|
@@ -13515,7 +13528,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13515
13528
|
ref: draggableRef,
|
|
13516
13529
|
width: width,
|
|
13517
13530
|
height: height || 'auto',
|
|
13518
|
-
className: "rpgui-container " + type + " " + className
|
|
13531
|
+
className: "rpgui-container " + type + " " + className,
|
|
13532
|
+
isFullScreen: isFullScreen,
|
|
13533
|
+
opacity: opacity
|
|
13519
13534
|
}, title && React__default.createElement(TitleContainer, {
|
|
13520
13535
|
className: "drag-handler"
|
|
13521
13536
|
}, React__default.createElement(Title, null, imgSrc && React__default.createElement(Icon, {
|
|
@@ -13529,11 +13544,17 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
13529
13544
|
var Container$7 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13530
13545
|
displayName: "DraggableContainer__Container",
|
|
13531
13546
|
componentId: "sc-184mpyl-0"
|
|
13532
|
-
})(["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) {
|
|
13533
13548
|
return props.height;
|
|
13534
13549
|
}, function (_ref2) {
|
|
13535
13550
|
var width = _ref2.width;
|
|
13536
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;"]);
|
|
13537
13558
|
});
|
|
13538
13559
|
var CloseButton$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13539
13560
|
displayName: "DraggableContainer__CloseButton",
|
|
@@ -13542,7 +13563,7 @@ var CloseButton$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
13542
13563
|
var TitleContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
13543
13564
|
displayName: "DraggableContainer__TitleContainer",
|
|
13544
13565
|
componentId: "sc-184mpyl-2"
|
|
13545
|
-
})(["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;"]);
|
|
13546
13567
|
var Title = /*#__PURE__*/styled__default.h1.withConfig({
|
|
13547
13568
|
displayName: "DraggableContainer__Title",
|
|
13548
13569
|
componentId: "sc-184mpyl-3"
|
|
@@ -16113,8 +16134,12 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
16113
16134
|
onOutsideClick = _ref.onOutsideClick,
|
|
16114
16135
|
initialPosition = _ref.initialPosition,
|
|
16115
16136
|
scale = _ref.scale,
|
|
16116
|
-
width = _ref.width
|
|
16137
|
+
width = _ref.width,
|
|
16138
|
+
isFullScreen = _ref.isFullScreen,
|
|
16139
|
+
opacity = _ref.opacity;
|
|
16117
16140
|
return React__default.createElement(DraggableContainer, {
|
|
16141
|
+
isFullScreen: isFullScreen,
|
|
16142
|
+
opacity: opacity,
|
|
16118
16143
|
title: title,
|
|
16119
16144
|
type: exports.RPGUIContainerTypes.Framed,
|
|
16120
16145
|
onCloseButton: function onCloseButton() {
|
|
@@ -16208,6 +16233,8 @@ var useScrollOnDrag = function useScrollOnDrag(_ref) {
|
|
|
16208
16233
|
};
|
|
16209
16234
|
};
|
|
16210
16235
|
|
|
16236
|
+
var UI_BREAKPOINT_MOBILE = '950px';
|
|
16237
|
+
|
|
16211
16238
|
var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
16212
16239
|
var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
|
|
16213
16240
|
settingShortcutIndex = _ref.settingShortcutIndex,
|
|
@@ -16278,7 +16305,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
16278
16305
|
var Container$k = /*#__PURE__*/styled__default.div.withConfig({
|
|
16279
16306
|
displayName: "ShortcutsSetter__Container",
|
|
16280
16307
|
componentId: "sc-xuouuf-0"
|
|
16281
|
-
})(["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);
|
|
16282
16309
|
var Shortcut = /*#__PURE__*/styled__default.button.withConfig({
|
|
16283
16310
|
displayName: "ShortcutsSetter__Shortcut",
|
|
16284
16311
|
componentId: "sc-xuouuf-1"
|
|
@@ -16499,7 +16526,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16499
16526
|
equipmentSet = _ref.equipmentSet,
|
|
16500
16527
|
isDepotSystem = _ref.isDepotSystem,
|
|
16501
16528
|
onPositionChangeEnd = _ref.onPositionChangeEnd,
|
|
16502
|
-
onPositionChangeStart = _ref.onPositionChangeStart
|
|
16529
|
+
onPositionChangeStart = _ref.onPositionChangeStart,
|
|
16530
|
+
isFullScreen = _ref.isFullScreen,
|
|
16531
|
+
opacity = _ref.opacity;
|
|
16503
16532
|
var _useState = React.useState({
|
|
16504
16533
|
isOpen: false,
|
|
16505
16534
|
maxQuantity: 1,
|
|
@@ -16619,7 +16648,9 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16619
16648
|
initialPosition: initialPosition,
|
|
16620
16649
|
scale: scale,
|
|
16621
16650
|
onPositionChangeEnd: onPositionChangeEnd,
|
|
16622
|
-
onPositionChangeStart: onPositionChangeStart
|
|
16651
|
+
onPositionChangeStart: onPositionChangeStart,
|
|
16652
|
+
isFullScreen: isFullScreen,
|
|
16653
|
+
opacity: opacity
|
|
16623
16654
|
}, type === shared.ItemContainerType.Inventory && shortcuts && removeShortcut && React__default.createElement(ShortcutsSetter, {
|
|
16624
16655
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
16625
16656
|
settingShortcutIndex: settingShortcutIndex,
|
|
@@ -16630,7 +16661,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16630
16661
|
}), React__default.createElement(ItemsContainer, {
|
|
16631
16662
|
className: "item-container-body",
|
|
16632
16663
|
ref: containerRef,
|
|
16633
|
-
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL
|
|
16664
|
+
isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL,
|
|
16665
|
+
isFullScreen: isFullScreen
|
|
16634
16666
|
}, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(ItemQuantitySelectorModal, {
|
|
16635
16667
|
quantitySelect: quantitySelect,
|
|
16636
16668
|
setQuantitySelect: setQuantitySelect
|
|
@@ -16639,9 +16671,21 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
16639
16671
|
var ItemsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
16640
16672
|
displayName: "ItemContainer__ItemsContainer",
|
|
16641
16673
|
componentId: "sc-15y5p9l-0"
|
|
16642
|
-
})(["display:flex;justify-content:
|
|
16643
|
-
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;
|
|
16644
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';
|
|
16645
16689
|
});
|
|
16646
16690
|
|
|
16647
16691
|
var LeaderboardTable = function LeaderboardTable(props) {
|