@rpg-engine/long-bow 0.5.95 → 0.5.97

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.
@@ -18959,6 +18959,69 @@ var SpellList = /*#__PURE__*/styled.div.withConfig({
18959
18959
  componentId: "sc-r02nfq-2"
18960
18960
  })(["width:100%;min-height:0;flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:1.5rem;margin-top:1rem;"]);
18961
18961
 
18962
+ var Stepper = function Stepper(_ref) {
18963
+ var _steps$currentStep;
18964
+ var steps = _ref.steps,
18965
+ finalCTAButton = _ref.finalCTAButton;
18966
+ var _useState = useState(0),
18967
+ currentStep = _useState[0],
18968
+ setCurrentStep = _useState[1];
18969
+ var currentComponent = (_steps$currentStep = steps[currentStep]) == null ? void 0 : _steps$currentStep.component;
18970
+ var totalSteps = steps.length;
18971
+ var onStepChange = function onStepChange(step) {
18972
+ setCurrentStep(step);
18973
+ };
18974
+ return React.createElement(StepperContainer, null, React.createElement(StepperTop, null, Array.from({
18975
+ length: totalSteps
18976
+ }, function (_, i) {
18977
+ return React.createElement(ProgressIndicator, {
18978
+ key: i,
18979
+ isActive: i <= currentStep
18980
+ });
18981
+ })), React.createElement(StepperBody, null, currentComponent), React.createElement(StepperFooter, null, currentStep > 0 && React.createElement(SelectArrow, {
18982
+ direction: "left",
18983
+ onPointerDown: function onPointerDown() {
18984
+ return onStepChange(Math.max(0, currentStep - 1));
18985
+ }
18986
+ }), currentStep < totalSteps - 1 && React.createElement(SelectArrow, {
18987
+ direction: "right",
18988
+ onPointerDown: function onPointerDown() {
18989
+ return onStepChange(Math.min(totalSteps - 1, currentStep + 1));
18990
+ }
18991
+ }), currentStep === totalSteps - 1 && finalCTAButton && React.createElement(Button, {
18992
+ buttonType: ButtonTypes.RPGUIButton,
18993
+ onPointerDown: function onPointerDown() {
18994
+ return finalCTAButton.onClick;
18995
+ }
18996
+ }, finalCTAButton.label)));
18997
+ };
18998
+ var StepperContainer = /*#__PURE__*/styled.div.withConfig({
18999
+ displayName: "Stepper__StepperContainer",
19000
+ componentId: "sc-13obf1-0"
19001
+ })(["display:flex;flex-direction:column;height:100%;"]);
19002
+ var StepperTop = /*#__PURE__*/styled.div.withConfig({
19003
+ displayName: "Stepper__StepperTop",
19004
+ componentId: "sc-13obf1-1"
19005
+ })(["flex:1;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;"]);
19006
+ var StepperBody = /*#__PURE__*/styled.div.withConfig({
19007
+ displayName: "Stepper__StepperBody",
19008
+ componentId: "sc-13obf1-2"
19009
+ })(["flex:8;"]);
19010
+ var StepperFooter = /*#__PURE__*/styled.div.withConfig({
19011
+ displayName: "Stepper__StepperFooter",
19012
+ componentId: "sc-13obf1-3"
19013
+ })(["flex:1;display:flex;justify-content:flex-end;"]);
19014
+ var ProgressIndicator = /*#__PURE__*/styled.div.withConfig({
19015
+ displayName: "Stepper__ProgressIndicator",
19016
+ componentId: "sc-13obf1-4"
19017
+ })(["width:20px;height:20px;border-radius:50%;background-color:", ";margin:0 5px;transition:background-color 0.3s;opacity:", ";border:1px solid ", ";"], function (_ref2) {
19018
+ var isActive = _ref2.isActive;
19019
+ return isActive ? uiColors.orange : uiColors.lightGray;
19020
+ }, function (_ref3) {
19021
+ var isActive = _ref3.isActive;
19022
+ return isActive ? 1 : 0.25;
19023
+ }, uiColors.raisinBlack);
19024
+
18962
19025
  var TextArea = function TextArea(_ref) {
18963
19026
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
18964
19027
  return React.createElement("textarea", Object.assign({}, props));
@@ -19393,5 +19456,5 @@ var ButtonWrapper$3 = /*#__PURE__*/styled.div.withConfig({
19393
19456
  componentId: "sc-gptoxp-5"
19394
19457
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
19395
19458
 
19396
- export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
19459
+ export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
19397
19460
  //# sourceMappingURL=long-bow.esm.js.map