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