@rpg-engine/long-bow 0.4.97 → 0.4.99

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.
@@ -15136,6 +15136,92 @@ var DialogContainer = /*#__PURE__*/styled.div.withConfig({
15136
15136
  componentId: "sc-u6oe75-1"
15137
15137
  })(["display:flex;justify-content:center;padding-top:200px;"]);
15138
15138
 
15139
+ var ImageCarousel = function ImageCarousel(_ref) {
15140
+ var _textImageSelected$te, _textImageSelected$te2;
15141
+ var textImage = _ref.textImage,
15142
+ isTextFixed = _ref.isTextFixed;
15143
+ var _useState = useState(textImage[0]),
15144
+ textImageSelected = _useState[0],
15145
+ setTextImageSelected = _useState[1];
15146
+ var goToPreviousImage = function goToPreviousImage() {
15147
+ var currentIndex = textImage.indexOf(textImageSelected);
15148
+ if (currentIndex > 0) {
15149
+ setTextImageSelected(textImage[currentIndex - 1]);
15150
+ }
15151
+ };
15152
+ var goToNextImage = function goToNextImage() {
15153
+ var currentIndex = textImage.indexOf(textImageSelected);
15154
+ if (currentIndex < textImage.length - 1) {
15155
+ setTextImageSelected(textImage[currentIndex + 1]);
15156
+ }
15157
+ };
15158
+ return React.createElement(CarouselWrapper, {
15159
+ type: RPGUIContainerTypes.Framed
15160
+ }, isTextFixed ? React.createElement(React.Fragment, null, React.createElement(BackgroundImage, {
15161
+ imagePath: textImageSelected.image,
15162
+ isTextFixed: isTextFixed
15163
+ }, React.createElement(ArrowContainer, null, textImageSelected !== textImage[0] && React.createElement(SelectArrow, {
15164
+ direction: "left",
15165
+ onPointerDown: function onPointerDown() {
15166
+ return goToPreviousImage();
15167
+ }
15168
+ }), textImageSelected !== textImage[textImage.length - 1] && React.createElement(SelectArrow, {
15169
+ direction: "right",
15170
+ onPointerDown: function onPointerDown() {
15171
+ return goToNextImage();
15172
+ }
15173
+ }))), React.createElement(Description$1, {
15174
+ textPosition: (_textImageSelected$te = textImageSelected.textPosition) != null ? _textImageSelected$te : 'flex-start',
15175
+ isTextFixed: isTextFixed
15176
+ }, React.createElement(DynamicText, {
15177
+ text: textImageSelected.text
15178
+ }))) : React.createElement(BackgroundImage, {
15179
+ imagePath: textImageSelected.image,
15180
+ isTextFixed: isTextFixed
15181
+ }, React.createElement(ArrowContainer, null, textImageSelected !== textImage[0] && React.createElement(SelectArrow, {
15182
+ direction: "left",
15183
+ onPointerDown: function onPointerDown() {
15184
+ return goToPreviousImage();
15185
+ }
15186
+ }), React.createElement(Description$1, {
15187
+ textPosition: (_textImageSelected$te2 = textImageSelected.textPosition) != null ? _textImageSelected$te2 : 'flex-start',
15188
+ isTextFixed: isTextFixed
15189
+ }, React.createElement(DynamicText, {
15190
+ text: textImageSelected.text
15191
+ })), textImageSelected !== textImage[textImage.length - 1] && React.createElement(SelectArrow, {
15192
+ direction: "right",
15193
+ onPointerDown: function onPointerDown() {
15194
+ return goToNextImage();
15195
+ }
15196
+ }))));
15197
+ };
15198
+ var CarouselWrapper = /*#__PURE__*/styled(DraggableContainer).withConfig({
15199
+ displayName: "ImageCarousel__CarouselWrapper",
15200
+ componentId: "sc-jl6f8-0"
15201
+ })(["width:100%;height:100%;"]);
15202
+ var ArrowContainer = /*#__PURE__*/styled.span.withConfig({
15203
+ displayName: "ImageCarousel__ArrowContainer",
15204
+ componentId: "sc-jl6f8-1"
15205
+ })(["display:flex;height:100%;align-items:center;"]);
15206
+ var BackgroundImage = /*#__PURE__*/styled.div.withConfig({
15207
+ displayName: "ImageCarousel__BackgroundImage",
15208
+ componentId: "sc-jl6f8-2"
15209
+ })(["background-image:url(", ");background-repeat:no-repeat;background-attachment:fixed;background-size:cover;width:100%;height:", ";"], function (props) {
15210
+ return props.imagePath;
15211
+ }, function (props) {
15212
+ return props.isTextFixed ? '80%' : '100%';
15213
+ });
15214
+ var Description$1 = /*#__PURE__*/styled.div.withConfig({
15215
+ displayName: "ImageCarousel__Description",
15216
+ componentId: "sc-jl6f8-3"
15217
+ })(["width:100%;height:", ";display:flex;align-items:", ";p{background-color:", ";border-radius:5px;text-align:justify;height:auto;}"], function (props) {
15218
+ return props.isTextFixed ? 'auto' : '100%';
15219
+ }, function (props) {
15220
+ return props.textPosition;
15221
+ }, function (props) {
15222
+ return props.isTextFixed ? 'none' : 'rgba(0, 0, 0, 0.6)';
15223
+ });
15224
+
15139
15225
  var SlotsContainer = function SlotsContainer(_ref) {
15140
15226
  var children = _ref.children,
15141
15227
  title = _ref.title,
@@ -17300,7 +17386,7 @@ var SpellInfo = function SpellInfo(_ref) {
17300
17386
  className: "label"
17301
17387
  }, "Required Item:"), React.createElement("div", {
17302
17388
  className: "value"
17303
- }, requiredItem))), React.createElement(Description$1, null, description));
17389
+ }, requiredItem))), React.createElement(Description$2, null, description));
17304
17390
  };
17305
17391
  var Container$o = /*#__PURE__*/styled.div.withConfig({
17306
17392
  displayName: "SpellInfo__Container",
@@ -17314,7 +17400,7 @@ var Type$1 = /*#__PURE__*/styled.div.withConfig({
17314
17400
  displayName: "SpellInfo__Type",
17315
17401
  componentId: "sc-4hbw3q-2"
17316
17402
  })(["font-size:", ";margin-top:0.2rem;color:", ";"], uiFonts.size.small, uiColors.lightGray);
17317
- var Description$1 = /*#__PURE__*/styled.div.withConfig({
17403
+ var Description$2 = /*#__PURE__*/styled.div.withConfig({
17318
17404
  displayName: "SpellInfo__Description",
17319
17405
  componentId: "sc-4hbw3q-3"
17320
17406
  })(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
@@ -17490,7 +17576,7 @@ var Spell = function Spell(_ref) {
17490
17576
  return word[0];
17491
17577
  })), React.createElement(Info, null, React.createElement(Title$a, null, React.createElement("span", null, name), React.createElement("span", {
17492
17578
  className: "spell"
17493
- }, "(", magicWords, ")")), React.createElement(Description$2, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
17579
+ }, "(", magicWords, ")")), React.createElement(Description$3, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
17494
17580
  className: "mana"
17495
17581
  }, manaCost))));
17496
17582
  };
@@ -17513,7 +17599,7 @@ var Title$a = /*#__PURE__*/styled.p.withConfig({
17513
17599
  displayName: "Spell__Title",
17514
17600
  componentId: "sc-j96fa2-3"
17515
17601
  })(["display:flex;flex-wrap:wrap;align-items:center;margin-bottom:5px;margin:0;span{font-size:", " !important;font-weight:bold !important;color:", " !important;margin-right:0.5rem;}.spell{font-size:", " !important;font-weight:normal !important;color:", " !important;}"], uiFonts.size.medium, uiColors.yellow, uiFonts.size.small, uiColors.lightGray);
17516
- var Description$2 = /*#__PURE__*/styled.div.withConfig({
17602
+ var Description$3 = /*#__PURE__*/styled.div.withConfig({
17517
17603
  displayName: "Spell__Description",
17518
17604
  componentId: "sc-j96fa2-4"
17519
17605
  })(["font-size:", " !important;line-height:1.1 !important;"], uiFonts.size.small);
@@ -18003,5 +18089,5 @@ var ButtonWrapper$3 = /*#__PURE__*/styled.div.withConfig({
18003
18089
  componentId: "sc-gptoxp-5"
18004
18090
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
18005
18091
 
18006
- export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, rarityColor, useEventListener };
18092
+ export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, rarityColor, useEventListener };
18007
18093
  //# sourceMappingURL=long-bow.esm.js.map