@rpg-engine/long-bow 0.8.213 → 0.8.215
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/Store/Store.d.ts +4 -0
- package/dist/long-bow.cjs.development.js +29 -4
- 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 +30 -5
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/Store.tsx +8 -2
- package/src/components/Store/sections/StoreItemsSection.tsx +50 -15
package/dist/long-bow.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemConta
|
|
|
6
6
|
export { MarketplaceAcceptedCurrency } from '@rpg-engine/shared';
|
|
7
7
|
import dayjs from 'dayjs';
|
|
8
8
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
9
|
-
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaShoppingCart, FaChevronUp, FaChevronDown, FaReddit, FaLock, FaRocket, FaHeadset, FaStar, FaShoppingBag, FaTrash, FaCoins, FaInfoCircle, FaBolt, FaCartPlus, FaCheckCircle, FaTicketAlt, FaExclamationCircle, FaArrowLeft, FaUsers, FaWallet, FaHistory } from 'react-icons/fa';
|
|
9
|
+
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaShoppingCart, FaChevronUp, FaChevronDown, FaReddit, FaLock, FaRocket, FaHeadset, FaStar, FaShoppingBag, FaTrash, FaCoins, FaInfoCircle, FaBolt, FaCartPlus, FaFilter, FaCheckCircle, FaTicketAlt, FaExclamationCircle, FaArrowLeft, FaUsers, FaWallet, FaHistory } from 'react-icons/fa';
|
|
10
10
|
import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
|
|
11
11
|
import { IoMdContract, IoMdExpand } from 'react-icons/io';
|
|
12
12
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
@@ -39200,7 +39200,19 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
39200
39200
|
currencySymbol: currencySymbol
|
|
39201
39201
|
}, meta));
|
|
39202
39202
|
};
|
|
39203
|
-
|
|
39203
|
+
var _useState = useState(false),
|
|
39204
|
+
showFilters = _useState[0],
|
|
39205
|
+
setShowFilters = _useState[1];
|
|
39206
|
+
return React.createElement(StoreContainer, null, React.createElement(FilterBar, null, React.createElement(FilterToggle, {
|
|
39207
|
+
"$active": showFilters,
|
|
39208
|
+
onClick: function onClick() {
|
|
39209
|
+
return setShowFilters(function (prev) {
|
|
39210
|
+
return !prev;
|
|
39211
|
+
});
|
|
39212
|
+
}
|
|
39213
|
+
}, React.createElement(FaFilter, {
|
|
39214
|
+
size: 12
|
|
39215
|
+
}), React.createElement("span", null, "Filter"))), showFilters && React.createElement(SearchHeader$2, null, React.createElement(SearchBarContainer$1, null, React.createElement(SearchBar, {
|
|
39204
39216
|
value: searchQuery,
|
|
39205
39217
|
onChange: setSearchQuery,
|
|
39206
39218
|
placeholder: "Search items..."
|
|
@@ -39220,7 +39232,7 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
39220
39232
|
renderItem: renderStoreItem,
|
|
39221
39233
|
emptyMessage: "No items match your filters.",
|
|
39222
39234
|
layout: "list",
|
|
39223
|
-
maxHeight: "
|
|
39235
|
+
maxHeight: "none"
|
|
39224
39236
|
}));
|
|
39225
39237
|
};
|
|
39226
39238
|
var StoreContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -39235,6 +39247,17 @@ var SearchBarContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
39235
39247
|
displayName: "StoreItemsSection__SearchBarContainer",
|
|
39236
39248
|
componentId: "sc-l6f466-2"
|
|
39237
39249
|
})(["flex:0.75;"]);
|
|
39250
|
+
var FilterBar = /*#__PURE__*/styled.div.withConfig({
|
|
39251
|
+
displayName: "StoreItemsSection__FilterBar",
|
|
39252
|
+
componentId: "sc-l6f466-3"
|
|
39253
|
+
})(["display:flex;padding-top:0.25rem;"]);
|
|
39254
|
+
var FilterToggle = /*#__PURE__*/styled.button.withConfig({
|
|
39255
|
+
displayName: "StoreItemsSection__FilterToggle",
|
|
39256
|
+
componentId: "sc-l6f466-4"
|
|
39257
|
+
})(["display:flex;align-items:center;gap:0.4rem;background:", ";border:1px solid rgba(255,255,255,0.3);color:#fff;padding:0.3rem 0.6rem;border-radius:4px;cursor:pointer;font-family:'Press Start 2P',cursive;font-size:0.55rem;&:hover{background:rgba(255,255,255,0.1);}"], function (_ref2) {
|
|
39258
|
+
var $active = _ref2.$active;
|
|
39259
|
+
return $active ? 'rgba(255,255,255,0.15)' : 'transparent';
|
|
39260
|
+
});
|
|
39238
39261
|
|
|
39239
39262
|
var usePackFiltering = function usePackFiltering(packs) {
|
|
39240
39263
|
var _useState = useState(''),
|
|
@@ -39708,6 +39731,8 @@ var Store = function Store(_ref) {
|
|
|
39708
39731
|
customHistoryContent = _ref.customHistoryContent,
|
|
39709
39732
|
_ref$fullScreen = _ref.fullScreen,
|
|
39710
39733
|
fullScreen = _ref$fullScreen === void 0 ? false : _ref$fullScreen,
|
|
39734
|
+
containerWidth = _ref.containerWidth,
|
|
39735
|
+
containerHeight = _ref.containerHeight,
|
|
39711
39736
|
_ref$packsTabLabel = _ref.packsTabLabel,
|
|
39712
39737
|
packsTabLabel = _ref$packsTabLabel === void 0 ? 'Packs' : _ref$packsTabLabel,
|
|
39713
39738
|
packsBadge = _ref.packsBadge,
|
|
@@ -40045,9 +40070,9 @@ var Store = function Store(_ref) {
|
|
|
40045
40070
|
return React.createElement(DraggableContainer, {
|
|
40046
40071
|
title: "Store",
|
|
40047
40072
|
onCloseButton: onClose,
|
|
40048
|
-
width: "1000px",
|
|
40073
|
+
width: containerWidth != null ? containerWidth : "1000px",
|
|
40049
40074
|
minWidth: "700px",
|
|
40050
|
-
height: "auto",
|
|
40075
|
+
height: containerHeight != null ? containerHeight : "auto",
|
|
40051
40076
|
type: RPGUIContainerTypes.Framed,
|
|
40052
40077
|
cancelDrag: "[class*='Store__Container'], [class*='CartView'], [class*='StoreItemDetails'], .close-button",
|
|
40053
40078
|
isFullScreen: fullScreen
|