@rpg-engine/long-bow 0.8.218 → 0.8.219
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/DraggableContainer.d.ts +6 -0
- package/dist/components/Store/Store.d.ts +7 -1
- package/dist/long-bow.cjs.development.js +22 -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 +22 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DraggableContainer.tsx +24 -0
- package/src/components/Store/Store.tsx +14 -2
|
@@ -7,6 +7,12 @@ export interface IDraggableContainerProps {
|
|
|
7
7
|
height?: string;
|
|
8
8
|
minWidth?: string;
|
|
9
9
|
minHeight?: string;
|
|
10
|
+
/** CSS override for width applied below `mobileBreakpoint`. Useful for responsive sizing without JS detection. */
|
|
11
|
+
mobileWidth?: string;
|
|
12
|
+
/** CSS override for height applied below `mobileBreakpoint`. Useful for responsive sizing without JS detection. */
|
|
13
|
+
mobileHeight?: string;
|
|
14
|
+
/** Viewport width in px under which mobile overrides apply. Defaults to 768. */
|
|
15
|
+
mobileBreakpoint?: number;
|
|
10
16
|
className?: string;
|
|
11
17
|
type?: RPGUIContainerTypes;
|
|
12
18
|
title?: string;
|
|
@@ -28,8 +28,14 @@ export interface IStoreProps {
|
|
|
28
28
|
fullScreen?: boolean;
|
|
29
29
|
/** Override the DraggableContainer width (e.g. "90vw"). Defaults to "1000px". */
|
|
30
30
|
containerWidth?: string;
|
|
31
|
-
/** Override the DraggableContainer height (e.g. "80vh"). Defaults to "
|
|
31
|
+
/** Override the DraggableContainer height (e.g. "80vh"). Defaults to "min(85vh, 900px)" so the inner scroll area is bounded. */
|
|
32
32
|
containerHeight?: string;
|
|
33
|
+
/** Width applied below `mobileBreakpoint` (e.g. "95vw"). Defaults to "95vw". */
|
|
34
|
+
mobileContainerWidth?: string;
|
|
35
|
+
/** Height applied below `mobileBreakpoint` (e.g. "95vh"). Defaults to "95vh" so mobile fills the viewport. */
|
|
36
|
+
mobileContainerHeight?: string;
|
|
37
|
+
/** Viewport px under which mobile overrides apply. Defaults to 768. */
|
|
38
|
+
mobileBreakpoint?: number;
|
|
33
39
|
packsBadge?: string;
|
|
34
40
|
featuredItems?: IFeaturedItem[];
|
|
35
41
|
onQuickBuy?: (item: IProductBlueprint, quantity?: number) => void;
|
|
@@ -2474,6 +2474,10 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
2474
2474
|
height = _ref.height,
|
|
2475
2475
|
minHeight = _ref.minHeight,
|
|
2476
2476
|
minWidth = _ref.minWidth,
|
|
2477
|
+
mobileWidth = _ref.mobileWidth,
|
|
2478
|
+
mobileHeight = _ref.mobileHeight,
|
|
2479
|
+
_ref$mobileBreakpoint = _ref.mobileBreakpoint,
|
|
2480
|
+
mobileBreakpoint = _ref$mobileBreakpoint === void 0 ? 768 : _ref$mobileBreakpoint,
|
|
2477
2481
|
className = _ref.className,
|
|
2478
2482
|
_ref$type = _ref.type,
|
|
2479
2483
|
type = _ref$type === void 0 ? exports.RPGUIContainerTypes.FramedGold : _ref$type,
|
|
@@ -2550,6 +2554,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
2550
2554
|
height: height || 'auto',
|
|
2551
2555
|
minWidth: minWidth,
|
|
2552
2556
|
minHeight: minHeight,
|
|
2557
|
+
mobileWidth: mobileWidth,
|
|
2558
|
+
mobileHeight: mobileHeight,
|
|
2559
|
+
mobileBreakpoint: mobileBreakpoint,
|
|
2553
2560
|
className: "rpgui-container " + type + " " + className,
|
|
2554
2561
|
isFullScreen: isFullScreen,
|
|
2555
2562
|
opacity: opacity
|
|
@@ -2566,7 +2573,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
2566
2573
|
var Container$a = /*#__PURE__*/styled__default.div.withConfig({
|
|
2567
2574
|
displayName: "DraggableContainer__Container",
|
|
2568
2575
|
componentId: "sc-184mpyl-0"
|
|
2569
|
-
})(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
2576
|
+
})(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
2570
2577
|
return props.height;
|
|
2571
2578
|
}, function (_ref2) {
|
|
2572
2579
|
var width = _ref2.width;
|
|
@@ -2583,6 +2590,11 @@ var Container$a = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
2583
2590
|
}, function (_ref6) {
|
|
2584
2591
|
var isFullScreen = _ref6.isFullScreen;
|
|
2585
2592
|
return isFullScreen && styled.css(["justify-content:center;align-items:flex-start;align-content:flex-start;"]);
|
|
2593
|
+
}, function (_ref7) {
|
|
2594
|
+
var mobileWidth = _ref7.mobileWidth,
|
|
2595
|
+
mobileHeight = _ref7.mobileHeight,
|
|
2596
|
+
mobileBreakpoint = _ref7.mobileBreakpoint;
|
|
2597
|
+
return (mobileWidth || mobileHeight) && styled.css(["@media (max-width:", "px){", " ", "}"], mobileBreakpoint != null ? mobileBreakpoint : 768, mobileWidth && "width: " + mobileWidth + "; min-width: unset;", mobileHeight && "height: " + mobileHeight + "; min-height: unset;");
|
|
2586
2598
|
});
|
|
2587
2599
|
var CloseButton$4 = /*#__PURE__*/styled__default.div.withConfig({
|
|
2588
2600
|
displayName: "DraggableContainer__CloseButton",
|
|
@@ -2599,8 +2611,8 @@ var Title$1 = /*#__PURE__*/styled__default.h1.withConfig({
|
|
|
2599
2611
|
var Icon = /*#__PURE__*/styled__default.img.withConfig({
|
|
2600
2612
|
displayName: "DraggableContainer__Icon",
|
|
2601
2613
|
componentId: "sc-184mpyl-4"
|
|
2602
|
-
})(["color:white;z-index:22;font-size:", ";width:", ";margin-right:0.5rem;"], uiFonts.size.xsmall, function (
|
|
2603
|
-
var width =
|
|
2614
|
+
})(["color:white;z-index:22;font-size:", ";width:", ";margin-right:0.5rem;"], uiFonts.size.xsmall, function (_ref8) {
|
|
2615
|
+
var width = _ref8.width;
|
|
2604
2616
|
return width;
|
|
2605
2617
|
});
|
|
2606
2618
|
|
|
@@ -39735,6 +39747,9 @@ var Store = function Store(_ref) {
|
|
|
39735
39747
|
fullScreen = _ref$fullScreen === void 0 ? false : _ref$fullScreen,
|
|
39736
39748
|
containerWidth = _ref.containerWidth,
|
|
39737
39749
|
containerHeight = _ref.containerHeight,
|
|
39750
|
+
mobileContainerWidth = _ref.mobileContainerWidth,
|
|
39751
|
+
mobileContainerHeight = _ref.mobileContainerHeight,
|
|
39752
|
+
mobileBreakpoint = _ref.mobileBreakpoint,
|
|
39738
39753
|
_ref$packsTabLabel = _ref.packsTabLabel,
|
|
39739
39754
|
packsTabLabel = _ref$packsTabLabel === void 0 ? 'Packs' : _ref$packsTabLabel,
|
|
39740
39755
|
packsBadge = _ref.packsBadge,
|
|
@@ -40074,7 +40089,10 @@ var Store = function Store(_ref) {
|
|
|
40074
40089
|
onCloseButton: onClose,
|
|
40075
40090
|
width: containerWidth != null ? containerWidth : "1000px",
|
|
40076
40091
|
minWidth: "700px",
|
|
40077
|
-
height: containerHeight != null ? containerHeight : "
|
|
40092
|
+
height: containerHeight != null ? containerHeight : "min(85vh, 900px)",
|
|
40093
|
+
mobileWidth: mobileContainerWidth != null ? mobileContainerWidth : "95vw",
|
|
40094
|
+
mobileHeight: mobileContainerHeight != null ? mobileContainerHeight : "95vh",
|
|
40095
|
+
mobileBreakpoint: mobileBreakpoint,
|
|
40078
40096
|
type: exports.RPGUIContainerTypes.Framed,
|
|
40079
40097
|
cancelDrag: "[class*='Store__Container'], [class*='CartView'], [class*='StoreItemDetails'], .close-button",
|
|
40080
40098
|
isFullScreen: fullScreen
|