@rpg-engine/long-bow 0.2.46 → 0.2.47

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.
@@ -27354,7 +27354,7 @@ var Ellipsis = function Ellipsis(_ref) {
27354
27354
  return React__default.createElement(Container$1, {
27355
27355
  maxWidth: maxWidth,
27356
27356
  fontSize: fontSize
27357
- }, React__default.createElement("p", {
27357
+ }, React__default.createElement("div", {
27358
27358
  className: "ellipsis-" + maxLines + "-lines"
27359
27359
  }, children));
27360
27360
  };
@@ -28051,17 +28051,19 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
28051
28051
  setContextActions(generateContextMenu(item, containerType));
28052
28052
  }
28053
28053
  }, [item]);
28054
- var getLeftPositionValue = function getLeftPositionValue(quantity) {
28055
- if (quantity > 0 && quantity < 10) return '2.5rem';else if (quantity > 9 && quantity < 100) return '2.0rem';else if (quantity > 99) return '1rem';
28056
- return '2.5rem';
28057
- };
28058
28054
  var getStackInfo = function getStackInfo(itemId, stackQty) {
28059
28055
  // if (itemToRender?.isStackable && itemToRender?.stackQty) {
28056
+ var isFractionalStackQty = stackQty % 1 !== 0;
28057
+ var isLargerThan999 = stackQty > 999;
28060
28058
  if (stackQty > 1) {
28061
- return React__default.createElement(ItemQty, {
28062
- left: getLeftPositionValue(stackQty),
28059
+ return React__default.createElement(ItemQtyContainer, {
28063
28060
  key: "qty-" + itemId
28064
- }, ' ', stackQty, ' ');
28061
+ }, React__default.createElement(Ellipsis, {
28062
+ maxLines: 1,
28063
+ maxWidth: 48
28064
+ }, React__default.createElement(ItemQty, {
28065
+ className: isFractionalStackQty || isLargerThan999 ? 'small' : 'regular'
28066
+ }, ' ', stackQty, ' ')));
28065
28067
  }
28066
28068
  return undefined;
28067
28069
  };
@@ -28168,12 +28170,14 @@ var Container$9 = /*#__PURE__*/styled.div.withConfig({
28168
28170
  displayName: "ItemSlot__Container",
28169
28171
  componentId: "sc-l2j5ef-0"
28170
28172
  })(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;}position:relative;"]);
28173
+ var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
28174
+ displayName: "ItemSlot__ItemQtyContainer",
28175
+ componentId: "sc-l2j5ef-1"
28176
+ })(["position:relative;width:85%;height:16px;top:25px;left:2px;display:flex;justify-content:flex-end;"]);
28171
28177
  var ItemQty = /*#__PURE__*/styled.span.withConfig({
28172
28178
  displayName: "ItemSlot__ItemQty",
28173
- componentId: "sc-l2j5ef-1"
28174
- })(["position:relative;top:1.5rem;left:", ";"], function (props) {
28175
- return props.left;
28176
- });
28179
+ componentId: "sc-l2j5ef-2"
28180
+ })(["&.regular{font-size:", ";}&.small{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall);
28177
28181
 
28178
28182
  var EquipmentSet = function EquipmentSet(_ref) {
28179
28183
  var equipmentSet = _ref.equipmentSet,