@rpg-engine/long-bow 0.8.131 → 0.8.134
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.
- package/dist/components/Store/PaymentMethodModal.d.ts +8 -0
- package/dist/components/Store/Store.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +122 -8
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +122 -9
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/PaymentMethodModal.tsx +219 -0
- package/src/components/Store/Store.tsx +3 -1
- package/src/components/Store/StoreItemDetails.tsx +1 -0
- package/src/components/Store/StoreItemRow.tsx +4 -1
- package/src/index.tsx +1 -0
- package/src/stories/Features/store/Store.stories.tsx +2 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -58644,7 +58644,7 @@ var StoreItemRow = function StoreItemRow(_ref) {
|
|
|
58644
58644
|
height: 32,
|
|
58645
58645
|
imgScale: 2,
|
|
58646
58646
|
centered: true
|
|
58647
|
-
})), React.createElement(ItemDetails$2, null, React.createElement(ItemName$2, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price), React.createElement(ItemDescription, null, item.description)), React.createElement(Controls$1, null, showTextInput ? React.createElement(TextInput, {
|
|
58647
|
+
})), React.createElement(ItemDetails$2, null, React.createElement(ItemName$2, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(ItemDescription, null, item.description)), React.createElement(Controls$1, null, showTextInput ? React.createElement(TextInput, {
|
|
58648
58648
|
type: "text",
|
|
58649
58649
|
value: textInputValue,
|
|
58650
58650
|
placeholder: textInputPlaceholder,
|
|
@@ -58950,7 +58950,7 @@ var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
|
58950
58950
|
}, React.createElement(FaArrowLeft, null), React.createElement("span", null, "Back"))), React.createElement(Content$5, null, React.createElement(DetailsGrid, null, React.createElement(ItemIcon, null, React.createElement("img", {
|
|
58951
58951
|
src: getImageSrc(),
|
|
58952
58952
|
alt: item.name
|
|
58953
|
-
})), React.createElement(ItemInfo$2, null, React.createElement(ItemName$3, null, item.name), React.createElement(ItemPrice$2, null, "$", 'priceUSD' in item ? item.priceUSD : item.price), React.createElement(Description$6, null, item.description))), React.createElement(Actions, null, React.createElement(CTAButton, {
|
|
58953
|
+
})), React.createElement(ItemInfo$2, null, React.createElement(ItemName$3, null, item.name), React.createElement(ItemPrice$2, null, "$", 'priceUSD' in item ? item.priceUSD : item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(Description$6, null, item.description))), React.createElement(Actions, null, React.createElement(CTAButton, {
|
|
58954
58954
|
icon: React.createElement(FaCartPlus, null),
|
|
58955
58955
|
label: "Add to Cart",
|
|
58956
58956
|
onClick: function onClick() {
|
|
@@ -59026,7 +59026,9 @@ var Store = function Store(_ref) {
|
|
|
59026
59026
|
_ref$textInputItemKey = _ref.textInputItemKeys,
|
|
59027
59027
|
textInputItemKeys = _ref$textInputItemKey === void 0 ? [] : _ref$textInputItemKey,
|
|
59028
59028
|
customPacksContent = _ref.customPacksContent,
|
|
59029
|
-
customWalletContent = _ref.customWalletContent
|
|
59029
|
+
customWalletContent = _ref.customWalletContent,
|
|
59030
|
+
_ref$packsTabLabel = _ref.packsTabLabel,
|
|
59031
|
+
packsTabLabel = _ref$packsTabLabel === void 0 ? 'Packs' : _ref$packsTabLabel;
|
|
59030
59032
|
var _useState = useState(null),
|
|
59031
59033
|
selectedPack = _useState[0],
|
|
59032
59034
|
setSelectedPack = _useState[1];
|
|
@@ -59150,7 +59152,7 @@ var Store = function Store(_ref) {
|
|
|
59150
59152
|
},
|
|
59151
59153
|
packs: {
|
|
59152
59154
|
id: 'packs',
|
|
59153
|
-
title:
|
|
59155
|
+
title: packsTabLabel,
|
|
59154
59156
|
content: customPacksContent != null ? customPacksContent : React.createElement(StorePacksSection, {
|
|
59155
59157
|
packs: packs.filter(function (pack) {
|
|
59156
59158
|
return pack.priceUSD < 9.99;
|
|
@@ -59302,6 +59304,117 @@ var ErrorMessage$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
59302
59304
|
componentId: "sc-64dj00-9"
|
|
59303
59305
|
})(["text-align:center;color:", ";padding:2rem;"], uiColors.red);
|
|
59304
59306
|
|
|
59307
|
+
var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
59308
|
+
var dcBalance = _ref.dcBalance,
|
|
59309
|
+
onPayWithDC = _ref.onPayWithDC,
|
|
59310
|
+
onPayWithCard = _ref.onPayWithCard,
|
|
59311
|
+
onClose = _ref.onClose;
|
|
59312
|
+
var _useState = useState('card'),
|
|
59313
|
+
selected = _useState[0],
|
|
59314
|
+
setSelected = _useState[1];
|
|
59315
|
+
var stopPropagation = useCallback(function (e) {
|
|
59316
|
+
e.stopPropagation();
|
|
59317
|
+
}, []);
|
|
59318
|
+
var handleConfirm = useCallback(function () {
|
|
59319
|
+
if (selected === 'dc') {
|
|
59320
|
+
onPayWithDC();
|
|
59321
|
+
} else {
|
|
59322
|
+
onPayWithCard();
|
|
59323
|
+
}
|
|
59324
|
+
}, [selected, onPayWithDC, onPayWithCard]);
|
|
59325
|
+
return React.createElement(ModalPortal, null, React.createElement(Overlay$4, {
|
|
59326
|
+
onPointerDown: onClose
|
|
59327
|
+
}), React.createElement(ModalContainer$1, null, React.createElement(ModalContent$1, {
|
|
59328
|
+
onClick: stopPropagation,
|
|
59329
|
+
onTouchStart: stopPropagation,
|
|
59330
|
+
onPointerDown: stopPropagation
|
|
59331
|
+
}, React.createElement(Header$a, null, React.createElement(Title$f, null, "How would you like to pay?"), React.createElement(CloseButton$a, {
|
|
59332
|
+
onPointerDown: onClose,
|
|
59333
|
+
"aria-label": "Close"
|
|
59334
|
+
}, React.createElement(FaTimes, null))), React.createElement(Options, null, React.createElement(RadioOption, {
|
|
59335
|
+
"$selected": selected === 'card',
|
|
59336
|
+
onPointerDown: function onPointerDown() {
|
|
59337
|
+
return setSelected('card');
|
|
59338
|
+
}
|
|
59339
|
+
}, React.createElement(RadioCircle, {
|
|
59340
|
+
"$selected": selected === 'card'
|
|
59341
|
+
}), React.createElement(OptionText, null, React.createElement(OptionLabel, null, "Credit Card"), React.createElement(OptionSub, null, "Stripe secure checkout"))), React.createElement(RadioOption, {
|
|
59342
|
+
"$selected": selected === 'dc',
|
|
59343
|
+
onPointerDown: function onPointerDown() {
|
|
59344
|
+
return setSelected('dc');
|
|
59345
|
+
}
|
|
59346
|
+
}, React.createElement(RadioCircle, {
|
|
59347
|
+
"$selected": selected === 'dc'
|
|
59348
|
+
}), React.createElement(OptionText, null, React.createElement(OptionLabel, null, "Definya Coin"), React.createElement(OptionSub, null, dcBalance.toLocaleString(), " DC available")))), React.createElement(ConfirmRow, null, React.createElement(Button, {
|
|
59349
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
59350
|
+
onPointerDown: handleConfirm
|
|
59351
|
+
}, "Confirm")))));
|
|
59352
|
+
};
|
|
59353
|
+
var Overlay$4 = /*#__PURE__*/styled.div.withConfig({
|
|
59354
|
+
displayName: "PaymentMethodModal__Overlay",
|
|
59355
|
+
componentId: "sc-1dxy6lr-0"
|
|
59356
|
+
})(["position:fixed;inset:0;background:rgba(0,0,0,0.65);z-index:1000;"]);
|
|
59357
|
+
var ModalContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
59358
|
+
displayName: "PaymentMethodModal__ModalContainer",
|
|
59359
|
+
componentId: "sc-1dxy6lr-1"
|
|
59360
|
+
})(["position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1001;pointer-events:none;"]);
|
|
59361
|
+
var ModalContent$1 = /*#__PURE__*/styled.div.withConfig({
|
|
59362
|
+
displayName: "PaymentMethodModal__ModalContent",
|
|
59363
|
+
componentId: "sc-1dxy6lr-2"
|
|
59364
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 24px;min-width:300px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:scaleIn 0.15s ease-out;@keyframes scaleIn{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}"]);
|
|
59365
|
+
var Header$a = /*#__PURE__*/styled.div.withConfig({
|
|
59366
|
+
displayName: "PaymentMethodModal__Header",
|
|
59367
|
+
componentId: "sc-1dxy6lr-3"
|
|
59368
|
+
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
59369
|
+
var Title$f = /*#__PURE__*/styled.h3.withConfig({
|
|
59370
|
+
displayName: "PaymentMethodModal__Title",
|
|
59371
|
+
componentId: "sc-1dxy6lr-4"
|
|
59372
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
59373
|
+
var CloseButton$a = /*#__PURE__*/styled.button.withConfig({
|
|
59374
|
+
displayName: "PaymentMethodModal__CloseButton",
|
|
59375
|
+
componentId: "sc-1dxy6lr-5"
|
|
59376
|
+
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;&:hover{color:#ffffff;}"]);
|
|
59377
|
+
var Options = /*#__PURE__*/styled.div.withConfig({
|
|
59378
|
+
displayName: "PaymentMethodModal__Options",
|
|
59379
|
+
componentId: "sc-1dxy6lr-6"
|
|
59380
|
+
})(["display:flex;flex-direction:column;gap:8px;"]);
|
|
59381
|
+
var RadioOption = /*#__PURE__*/styled.div.withConfig({
|
|
59382
|
+
displayName: "PaymentMethodModal__RadioOption",
|
|
59383
|
+
componentId: "sc-1dxy6lr-7"
|
|
59384
|
+
})(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:pointer;transition:border-color 0.15s,background 0.15s;&:hover{border-color:#f59e0b;}"], function (_ref2) {
|
|
59385
|
+
var $selected = _ref2.$selected;
|
|
59386
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
59387
|
+
}, function (_ref3) {
|
|
59388
|
+
var $selected = _ref3.$selected;
|
|
59389
|
+
return $selected ? 'rgba(245,158,11,0.1)' : 'transparent';
|
|
59390
|
+
});
|
|
59391
|
+
var RadioCircle = /*#__PURE__*/styled.div.withConfig({
|
|
59392
|
+
displayName: "PaymentMethodModal__RadioCircle",
|
|
59393
|
+
componentId: "sc-1dxy6lr-8"
|
|
59394
|
+
})(["width:16px;height:16px;border-radius:50%;border:2px solid ", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;&::after{content:'';width:8px;height:8px;border-radius:50%;background:#f59e0b;opacity:", ";transition:opacity 0.15s;}"], function (_ref4) {
|
|
59395
|
+
var $selected = _ref4.$selected;
|
|
59396
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
|
|
59397
|
+
}, function (_ref5) {
|
|
59398
|
+
var $selected = _ref5.$selected;
|
|
59399
|
+
return $selected ? 1 : 0;
|
|
59400
|
+
});
|
|
59401
|
+
var OptionText = /*#__PURE__*/styled.div.withConfig({
|
|
59402
|
+
displayName: "PaymentMethodModal__OptionText",
|
|
59403
|
+
componentId: "sc-1dxy6lr-9"
|
|
59404
|
+
})(["display:flex;flex-direction:column;gap:3px;"]);
|
|
59405
|
+
var OptionLabel = /*#__PURE__*/styled.span.withConfig({
|
|
59406
|
+
displayName: "PaymentMethodModal__OptionLabel",
|
|
59407
|
+
componentId: "sc-1dxy6lr-10"
|
|
59408
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
|
|
59409
|
+
var OptionSub = /*#__PURE__*/styled.span.withConfig({
|
|
59410
|
+
displayName: "PaymentMethodModal__OptionSub",
|
|
59411
|
+
componentId: "sc-1dxy6lr-11"
|
|
59412
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.55);"]);
|
|
59413
|
+
var ConfirmRow = /*#__PURE__*/styled.div.withConfig({
|
|
59414
|
+
displayName: "PaymentMethodModal__ConfirmRow",
|
|
59415
|
+
componentId: "sc-1dxy6lr-12"
|
|
59416
|
+
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
59417
|
+
|
|
59305
59418
|
var TextArea = function TextArea(_ref) {
|
|
59306
59419
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
59307
59420
|
return React.createElement("textarea", Object.assign({}, props));
|
|
@@ -59336,7 +59449,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
59336
59449
|
return React.createElement(Draggable, {
|
|
59337
59450
|
scale: scale,
|
|
59338
59451
|
cancel: ".time-widget-close,.time-widget-container,.time-widget-container *"
|
|
59339
|
-
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$
|
|
59452
|
+
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$b, {
|
|
59340
59453
|
onPointerDown: onClose,
|
|
59341
59454
|
className: "time-widget-close"
|
|
59342
59455
|
}, "X"), React.createElement(DayNightContainer, {
|
|
@@ -59353,7 +59466,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
|
|
|
59353
59466
|
displayName: "TimeWidget__Time",
|
|
59354
59467
|
componentId: "sc-1ja236h-1"
|
|
59355
59468
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
59356
|
-
var CloseButton$
|
|
59469
|
+
var CloseButton$b = /*#__PURE__*/styled.p.withConfig({
|
|
59357
59470
|
displayName: "TimeWidget__CloseButton",
|
|
59358
59471
|
componentId: "sc-1ja236h-2"
|
|
59359
59472
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|
|
@@ -59632,7 +59745,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
59632
59745
|
width: "500px",
|
|
59633
59746
|
cancelDrag: "#TraderContainer",
|
|
59634
59747
|
scale: scale
|
|
59635
|
-
}, React.createElement(Container$O, null, React.createElement(Title$
|
|
59748
|
+
}, React.createElement(Container$O, null, React.createElement(Title$g, null, type.charAt(0).toUpperCase() + type.slice(1), " Menu"), React.createElement("hr", {
|
|
59636
59749
|
className: "golden"
|
|
59637
59750
|
}), React.createElement(ScrollWrapper, {
|
|
59638
59751
|
id: "TraderContainer"
|
|
@@ -59664,7 +59777,7 @@ var Container$O = /*#__PURE__*/styled.div.withConfig({
|
|
|
59664
59777
|
displayName: "TradingMenu__Container",
|
|
59665
59778
|
componentId: "sc-1wjsz1l-0"
|
|
59666
59779
|
})(["width:100%;"]);
|
|
59667
|
-
var Title$
|
|
59780
|
+
var Title$g = /*#__PURE__*/styled.h1.withConfig({
|
|
59668
59781
|
displayName: "TradingMenu__Title",
|
|
59669
59782
|
componentId: "sc-1wjsz1l-1"
|
|
59670
59783
|
})(["font-size:0.7rem !important;color:yellow !important;text-align:center;"]);
|
|
@@ -59844,5 +59957,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
59844
59957
|
componentId: "sc-7tgzv2-6"
|
|
59845
59958
|
})(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
|
|
59846
59959
|
|
|
59847
|
-
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, HistoryDialog, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, LoginStreakPanel, Marketplace, MarketplaceRows, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
|
|
59960
|
+
export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, HistoryDialog, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, LoginStreakPanel, Marketplace, MarketplaceRows, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PaymentMethodModal, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
|
|
59848
59961
|
//# sourceMappingURL=long-bow.esm.js.map
|