@rpg-engine/long-bow 0.8.133 → 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/long-bow.cjs.development.js +79 -27
- 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 +80 -28
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/PaymentMethodModal.tsx +130 -51
|
@@ -25,7 +25,6 @@ var ai = require('react-icons/ai');
|
|
|
25
25
|
var reactColorful = require('react-colorful');
|
|
26
26
|
require('rpgui/rpgui.css');
|
|
27
27
|
require('rpgui/rpgui.min.js');
|
|
28
|
-
var gi = require('react-icons/gi');
|
|
29
28
|
var capitalize = _interopDefault(require('lodash/capitalize'));
|
|
30
29
|
|
|
31
30
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
@@ -59313,25 +59312,46 @@ var PaymentMethodModal = function PaymentMethodModal(_ref) {
|
|
|
59313
59312
|
onPayWithDC = _ref.onPayWithDC,
|
|
59314
59313
|
onPayWithCard = _ref.onPayWithCard,
|
|
59315
59314
|
onClose = _ref.onClose;
|
|
59315
|
+
var _useState = React.useState('card'),
|
|
59316
|
+
selected = _useState[0],
|
|
59317
|
+
setSelected = _useState[1];
|
|
59316
59318
|
var stopPropagation = React.useCallback(function (e) {
|
|
59317
59319
|
e.stopPropagation();
|
|
59318
59320
|
}, []);
|
|
59321
|
+
var handleConfirm = React.useCallback(function () {
|
|
59322
|
+
if (selected === 'dc') {
|
|
59323
|
+
onPayWithDC();
|
|
59324
|
+
} else {
|
|
59325
|
+
onPayWithCard();
|
|
59326
|
+
}
|
|
59327
|
+
}, [selected, onPayWithDC, onPayWithCard]);
|
|
59319
59328
|
return React__default.createElement(ModalPortal, null, React__default.createElement(Overlay$4, {
|
|
59320
59329
|
onPointerDown: onClose
|
|
59321
59330
|
}), React__default.createElement(ModalContainer$1, null, React__default.createElement(ModalContent$1, {
|
|
59322
59331
|
onClick: stopPropagation,
|
|
59323
59332
|
onTouchStart: stopPropagation,
|
|
59324
59333
|
onPointerDown: stopPropagation
|
|
59325
|
-
}, React__default.createElement(Title$f, null, "How would you like to pay?"), React__default.createElement(
|
|
59326
|
-
|
|
59327
|
-
|
|
59328
|
-
}, React__default.createElement(
|
|
59329
|
-
|
|
59330
|
-
|
|
59331
|
-
|
|
59334
|
+
}, React__default.createElement(Header$a, null, React__default.createElement(Title$f, null, "How would you like to pay?"), React__default.createElement(CloseButton$a, {
|
|
59335
|
+
onPointerDown: onClose,
|
|
59336
|
+
"aria-label": "Close"
|
|
59337
|
+
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(Options, null, React__default.createElement(RadioOption, {
|
|
59338
|
+
"$selected": selected === 'card',
|
|
59339
|
+
onPointerDown: function onPointerDown() {
|
|
59340
|
+
return setSelected('card');
|
|
59341
|
+
}
|
|
59342
|
+
}, React__default.createElement(RadioCircle, {
|
|
59343
|
+
"$selected": selected === 'card'
|
|
59344
|
+
}), React__default.createElement(OptionText, null, React__default.createElement(OptionLabel, null, "Credit Card"), React__default.createElement(OptionSub, null, "Stripe secure checkout"))), React__default.createElement(RadioOption, {
|
|
59345
|
+
"$selected": selected === 'dc',
|
|
59346
|
+
onPointerDown: function onPointerDown() {
|
|
59347
|
+
return setSelected('dc');
|
|
59348
|
+
}
|
|
59349
|
+
}, React__default.createElement(RadioCircle, {
|
|
59350
|
+
"$selected": selected === 'dc'
|
|
59351
|
+
}), React__default.createElement(OptionText, null, React__default.createElement(OptionLabel, null, "Definya Coin"), React__default.createElement(OptionSub, null, dcBalance.toLocaleString(), " DC available")))), React__default.createElement(ConfirmRow, null, React__default.createElement(Button, {
|
|
59332
59352
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
59333
|
-
onPointerDown:
|
|
59334
|
-
}, "
|
|
59353
|
+
onPointerDown: handleConfirm
|
|
59354
|
+
}, "Confirm")))));
|
|
59335
59355
|
};
|
|
59336
59356
|
var Overlay$4 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59337
59357
|
displayName: "PaymentMethodModal__Overlay",
|
|
@@ -59344,27 +59364,59 @@ var ModalContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
59344
59364
|
var ModalContent$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
59345
59365
|
displayName: "PaymentMethodModal__ModalContent",
|
|
59346
59366
|
componentId: "sc-1dxy6lr-2"
|
|
59347
|
-
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:24px;min-width:
|
|
59367
|
+
})(["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;}}"]);
|
|
59368
|
+
var Header$a = /*#__PURE__*/styled__default.div.withConfig({
|
|
59369
|
+
displayName: "PaymentMethodModal__Header",
|
|
59370
|
+
componentId: "sc-1dxy6lr-3"
|
|
59371
|
+
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
59348
59372
|
var Title$f = /*#__PURE__*/styled__default.h3.withConfig({
|
|
59349
59373
|
displayName: "PaymentMethodModal__Title",
|
|
59350
|
-
componentId: "sc-1dxy6lr-3"
|
|
59351
|
-
})(["margin:0 0 8px;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#fef08a;text-align:center;"]);
|
|
59352
|
-
var OptionButton = /*#__PURE__*/styled__default.button.withConfig({
|
|
59353
|
-
displayName: "PaymentMethodModal__OptionButton",
|
|
59354
59374
|
componentId: "sc-1dxy6lr-4"
|
|
59355
|
-
})(["
|
|
59356
|
-
var
|
|
59357
|
-
displayName: "
|
|
59375
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
59376
|
+
var CloseButton$a = /*#__PURE__*/styled__default.button.withConfig({
|
|
59377
|
+
displayName: "PaymentMethodModal__CloseButton",
|
|
59358
59378
|
componentId: "sc-1dxy6lr-5"
|
|
59359
|
-
})(["
|
|
59360
|
-
var
|
|
59361
|
-
displayName: "
|
|
59379
|
+
})(["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;}"]);
|
|
59380
|
+
var Options = /*#__PURE__*/styled__default.div.withConfig({
|
|
59381
|
+
displayName: "PaymentMethodModal__Options",
|
|
59362
59382
|
componentId: "sc-1dxy6lr-6"
|
|
59363
|
-
})(["
|
|
59364
|
-
var
|
|
59365
|
-
displayName: "
|
|
59383
|
+
})(["display:flex;flex-direction:column;gap:8px;"]);
|
|
59384
|
+
var RadioOption = /*#__PURE__*/styled__default.div.withConfig({
|
|
59385
|
+
displayName: "PaymentMethodModal__RadioOption",
|
|
59366
59386
|
componentId: "sc-1dxy6lr-7"
|
|
59367
|
-
})(["display:flex;
|
|
59387
|
+
})(["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) {
|
|
59388
|
+
var $selected = _ref2.$selected;
|
|
59389
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.15)';
|
|
59390
|
+
}, function (_ref3) {
|
|
59391
|
+
var $selected = _ref3.$selected;
|
|
59392
|
+
return $selected ? 'rgba(245,158,11,0.1)' : 'transparent';
|
|
59393
|
+
});
|
|
59394
|
+
var RadioCircle = /*#__PURE__*/styled__default.div.withConfig({
|
|
59395
|
+
displayName: "PaymentMethodModal__RadioCircle",
|
|
59396
|
+
componentId: "sc-1dxy6lr-8"
|
|
59397
|
+
})(["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) {
|
|
59398
|
+
var $selected = _ref4.$selected;
|
|
59399
|
+
return $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
|
|
59400
|
+
}, function (_ref5) {
|
|
59401
|
+
var $selected = _ref5.$selected;
|
|
59402
|
+
return $selected ? 1 : 0;
|
|
59403
|
+
});
|
|
59404
|
+
var OptionText = /*#__PURE__*/styled__default.div.withConfig({
|
|
59405
|
+
displayName: "PaymentMethodModal__OptionText",
|
|
59406
|
+
componentId: "sc-1dxy6lr-9"
|
|
59407
|
+
})(["display:flex;flex-direction:column;gap:3px;"]);
|
|
59408
|
+
var OptionLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
59409
|
+
displayName: "PaymentMethodModal__OptionLabel",
|
|
59410
|
+
componentId: "sc-1dxy6lr-10"
|
|
59411
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
|
|
59412
|
+
var OptionSub = /*#__PURE__*/styled__default.span.withConfig({
|
|
59413
|
+
displayName: "PaymentMethodModal__OptionSub",
|
|
59414
|
+
componentId: "sc-1dxy6lr-11"
|
|
59415
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.55);"]);
|
|
59416
|
+
var ConfirmRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
59417
|
+
displayName: "PaymentMethodModal__ConfirmRow",
|
|
59418
|
+
componentId: "sc-1dxy6lr-12"
|
|
59419
|
+
})(["display:flex;justify-content:center;margin-top:4px;"]);
|
|
59368
59420
|
|
|
59369
59421
|
var TextArea = function TextArea(_ref) {
|
|
59370
59422
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
@@ -59400,7 +59452,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
59400
59452
|
return React__default.createElement(Draggable, {
|
|
59401
59453
|
scale: scale,
|
|
59402
59454
|
cancel: ".time-widget-close,.time-widget-container,.time-widget-container *"
|
|
59403
|
-
}, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$
|
|
59455
|
+
}, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$b, {
|
|
59404
59456
|
onPointerDown: onClose,
|
|
59405
59457
|
className: "time-widget-close"
|
|
59406
59458
|
}, "X"), React__default.createElement(DayNightContainer, {
|
|
@@ -59417,7 +59469,7 @@ var Time = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
59417
59469
|
displayName: "TimeWidget__Time",
|
|
59418
59470
|
componentId: "sc-1ja236h-1"
|
|
59419
59471
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
59420
|
-
var CloseButton$
|
|
59472
|
+
var CloseButton$b = /*#__PURE__*/styled__default.p.withConfig({
|
|
59421
59473
|
displayName: "TimeWidget__CloseButton",
|
|
59422
59474
|
componentId: "sc-1ja236h-2"
|
|
59423
59475
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|