@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
|
@@ -26,6 +26,10 @@ export interface IStoreProps {
|
|
|
26
26
|
customHistoryContent?: React.ReactNode;
|
|
27
27
|
/** When true the store renders full-screen (useful on mobile). */
|
|
28
28
|
fullScreen?: boolean;
|
|
29
|
+
/** Override the DraggableContainer width (e.g. "90vw"). Defaults to "1000px". */
|
|
30
|
+
containerWidth?: string;
|
|
31
|
+
/** Override the DraggableContainer height (e.g. "80vh"). Defaults to "auto". */
|
|
32
|
+
containerHeight?: string;
|
|
29
33
|
packsBadge?: string;
|
|
30
34
|
featuredItems?: IFeaturedItem[];
|
|
31
35
|
onQuickBuy?: (item: IProductBlueprint, quantity?: number) => void;
|
|
@@ -39202,7 +39202,19 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
39202
39202
|
currencySymbol: currencySymbol
|
|
39203
39203
|
}, meta));
|
|
39204
39204
|
};
|
|
39205
|
-
|
|
39205
|
+
var _useState = React.useState(false),
|
|
39206
|
+
showFilters = _useState[0],
|
|
39207
|
+
setShowFilters = _useState[1];
|
|
39208
|
+
return React__default.createElement(StoreContainer, null, React__default.createElement(FilterBar, null, React__default.createElement(FilterToggle, {
|
|
39209
|
+
"$active": showFilters,
|
|
39210
|
+
onClick: function onClick() {
|
|
39211
|
+
return setShowFilters(function (prev) {
|
|
39212
|
+
return !prev;
|
|
39213
|
+
});
|
|
39214
|
+
}
|
|
39215
|
+
}, React__default.createElement(fa.FaFilter, {
|
|
39216
|
+
size: 12
|
|
39217
|
+
}), React__default.createElement("span", null, "Filter"))), showFilters && React__default.createElement(SearchHeader$2, null, React__default.createElement(SearchBarContainer$1, null, React__default.createElement(SearchBar, {
|
|
39206
39218
|
value: searchQuery,
|
|
39207
39219
|
onChange: setSearchQuery,
|
|
39208
39220
|
placeholder: "Search items..."
|
|
@@ -39222,7 +39234,7 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
|
|
|
39222
39234
|
renderItem: renderStoreItem,
|
|
39223
39235
|
emptyMessage: "No items match your filters.",
|
|
39224
39236
|
layout: "list",
|
|
39225
|
-
maxHeight: "
|
|
39237
|
+
maxHeight: "none"
|
|
39226
39238
|
}));
|
|
39227
39239
|
};
|
|
39228
39240
|
var StoreContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
@@ -39237,6 +39249,17 @@ var SearchBarContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
39237
39249
|
displayName: "StoreItemsSection__SearchBarContainer",
|
|
39238
39250
|
componentId: "sc-l6f466-2"
|
|
39239
39251
|
})(["flex:0.75;"]);
|
|
39252
|
+
var FilterBar = /*#__PURE__*/styled__default.div.withConfig({
|
|
39253
|
+
displayName: "StoreItemsSection__FilterBar",
|
|
39254
|
+
componentId: "sc-l6f466-3"
|
|
39255
|
+
})(["display:flex;padding-top:0.25rem;"]);
|
|
39256
|
+
var FilterToggle = /*#__PURE__*/styled__default.button.withConfig({
|
|
39257
|
+
displayName: "StoreItemsSection__FilterToggle",
|
|
39258
|
+
componentId: "sc-l6f466-4"
|
|
39259
|
+
})(["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) {
|
|
39260
|
+
var $active = _ref2.$active;
|
|
39261
|
+
return $active ? 'rgba(255,255,255,0.15)' : 'transparent';
|
|
39262
|
+
});
|
|
39240
39263
|
|
|
39241
39264
|
var usePackFiltering = function usePackFiltering(packs) {
|
|
39242
39265
|
var _useState = React.useState(''),
|
|
@@ -39710,6 +39733,8 @@ var Store = function Store(_ref) {
|
|
|
39710
39733
|
customHistoryContent = _ref.customHistoryContent,
|
|
39711
39734
|
_ref$fullScreen = _ref.fullScreen,
|
|
39712
39735
|
fullScreen = _ref$fullScreen === void 0 ? false : _ref$fullScreen,
|
|
39736
|
+
containerWidth = _ref.containerWidth,
|
|
39737
|
+
containerHeight = _ref.containerHeight,
|
|
39713
39738
|
_ref$packsTabLabel = _ref.packsTabLabel,
|
|
39714
39739
|
packsTabLabel = _ref$packsTabLabel === void 0 ? 'Packs' : _ref$packsTabLabel,
|
|
39715
39740
|
packsBadge = _ref.packsBadge,
|
|
@@ -40047,9 +40072,9 @@ var Store = function Store(_ref) {
|
|
|
40047
40072
|
return React__default.createElement(DraggableContainer, {
|
|
40048
40073
|
title: "Store",
|
|
40049
40074
|
onCloseButton: onClose,
|
|
40050
|
-
width: "1000px",
|
|
40075
|
+
width: containerWidth != null ? containerWidth : "1000px",
|
|
40051
40076
|
minWidth: "700px",
|
|
40052
|
-
height: "auto",
|
|
40077
|
+
height: containerHeight != null ? containerHeight : "auto",
|
|
40053
40078
|
type: exports.RPGUIContainerTypes.Framed,
|
|
40054
40079
|
cancelDrag: "[class*='Store__Container'], [class*='CartView'], [class*='StoreItemDetails'], .close-button",
|
|
40055
40080
|
isFullScreen: fullScreen
|