@rpg-engine/long-bow 0.3.35 → 0.3.37

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.
@@ -1,6 +1,6 @@
1
1
  import React, { Component, useState, useEffect, useRef, useMemo, Fragment } from 'react';
2
2
  import styled from 'styled-components';
3
- import { GRID_WIDTH, GRID_HEIGHT, ItemSubType, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, getItemTextureKeyPath, ItemSlotType, getSPForLevel, PeriodOfDay } from '@rpg-engine/shared';
3
+ import { GRID_WIDTH, GRID_HEIGHT, ItemSubType, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, getItemTextureKeyPath, ItemSlotType, getSPForLevel, PeriodOfDay } from '@rpg-engine/shared';
4
4
  import dayjs from 'dayjs';
5
5
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
6
6
  import { RxPaperPlane } from 'react-icons/rx';
@@ -33779,6 +33779,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33779
33779
  }
33780
33780
  };
33781
33781
  return React.createElement(Container$a, {
33782
+ item: item,
33782
33783
  className: "rpgui-icon empty-slot",
33783
33784
  onMouseUp: function onMouseUp() {
33784
33785
  var data = item ? item : null;
@@ -33886,10 +33887,33 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33886
33887
  }
33887
33888
  }));
33888
33889
  });
33890
+ var rarityColor = function rarityColor(item) {
33891
+ switch (item == null ? void 0 : item.rarity) {
33892
+ case ItemRarities.Uncommon:
33893
+ return 'rgba(13, 193, 13, 0.6)';
33894
+ case ItemRarities.Rare:
33895
+ return 'rgba(8, 104, 187, 0.6)';
33896
+ case ItemRarities.Epic:
33897
+ return 'rgba(191, 0, 255, 0.6)';
33898
+ case ItemRarities.Legendary:
33899
+ return 'rgba(255, 191, 0,0.6)';
33900
+ default:
33901
+ return 'unset';
33902
+ }
33903
+ };
33889
33904
  var Container$a = /*#__PURE__*/styled.div.withConfig({
33890
33905
  displayName: "ItemSlot__Container",
33891
33906
  componentId: "sc-l2j5ef-0"
33892
- })(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;}position:relative;"]);
33907
+ })(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;"], function (_ref2) {
33908
+ var item = _ref2.item;
33909
+ return rarityColor(item);
33910
+ }, function (_ref3) {
33911
+ var item = _ref3.item;
33912
+ return "0 0 5px 2px " + rarityColor(item);
33913
+ }, function (_ref4) {
33914
+ var item = _ref4.item;
33915
+ return "0 0 4px 3px " + rarityColor(item);
33916
+ });
33893
33917
  var ItemContainer = /*#__PURE__*/styled.div.withConfig({
33894
33918
  displayName: "ItemSlot__ItemContainer",
33895
33919
  componentId: "sc-l2j5ef-1"