@loafmarkets/ui 0.1.333 → 0.1.334

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/index.js CHANGED
@@ -13233,6 +13233,20 @@ var ChecklistDesc = styled9__default.default.div`
13233
13233
  color: rgba(255, 255, 255, 0.4);
13234
13234
  margin-top: 1px;
13235
13235
  `;
13236
+ var SKIP_IPO_CONFIRM_KEY = "loaf:skip-ipo-confirm";
13237
+ function getSkipIpoConfirm() {
13238
+ try {
13239
+ return localStorage.getItem(SKIP_IPO_CONFIRM_KEY) === "1";
13240
+ } catch {
13241
+ return false;
13242
+ }
13243
+ }
13244
+ function setSkipIpoConfirm(skip) {
13245
+ try {
13246
+ if (skip) localStorage.setItem(SKIP_IPO_CONFIRM_KEY, "1");
13247
+ } catch {
13248
+ }
13249
+ }
13236
13250
  function OrderConfirmationModal({
13237
13251
  open,
13238
13252
  onClose,
@@ -13248,6 +13262,7 @@ function OrderConfirmationModal({
13248
13262
  isPlacing = false,
13249
13263
  placingLabel = "Placing order\u2026"
13250
13264
  }) {
13265
+ const [dontShowAgain, setDontShowAgain] = React5.useState(false);
13251
13266
  if (!open) return null;
13252
13267
  const handleOverlayClose = () => {
13253
13268
  if (isPlacing) return;
@@ -13307,30 +13322,47 @@ function OrderConfirmationModal({
13307
13322
  ] }),
13308
13323
  "."
13309
13324
  ] }),
13310
- /* @__PURE__ */ jsxRuntime.jsxs(ButtonRow2, { children: [
13311
- /* @__PURE__ */ jsxRuntime.jsx(
13312
- "button",
13313
- {
13314
- type: "button",
13315
- onClick: onClose,
13316
- className: "secondary",
13317
- disabled: isPlacing,
13318
- children: "Cancel"
13319
- }
13320
- ),
13321
- !hasInsufficientFunds && /* @__PURE__ */ jsxRuntime.jsx(
13322
- "button",
13323
- {
13324
- type: "button",
13325
- onClick: onConfirm,
13326
- className: "primary",
13327
- disabled: isPlacing,
13328
- children: isPlacing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13329
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, { "aria-hidden": true }),
13330
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: placingLabel })
13331
- ] }) : "Place Order"
13332
- }
13333
- )
13325
+ /* @__PURE__ */ jsxRuntime.jsxs(ModalFooter, { children: [
13326
+ /* @__PURE__ */ jsxRuntime.jsxs(DontShowLabel, { children: [
13327
+ /* @__PURE__ */ jsxRuntime.jsx(
13328
+ "input",
13329
+ {
13330
+ type: "checkbox",
13331
+ checked: dontShowAgain,
13332
+ onChange: (e) => setDontShowAgain(e.target.checked),
13333
+ style: { accentColor: "#0ecb81" }
13334
+ }
13335
+ ),
13336
+ "Don't show again"
13337
+ ] }),
13338
+ /* @__PURE__ */ jsxRuntime.jsxs(ButtonRow2, { children: [
13339
+ /* @__PURE__ */ jsxRuntime.jsx(
13340
+ "button",
13341
+ {
13342
+ type: "button",
13343
+ onClick: onClose,
13344
+ className: "secondary",
13345
+ disabled: isPlacing,
13346
+ children: "Cancel"
13347
+ }
13348
+ ),
13349
+ !hasInsufficientFunds && /* @__PURE__ */ jsxRuntime.jsx(
13350
+ "button",
13351
+ {
13352
+ type: "button",
13353
+ onClick: () => {
13354
+ if (dontShowAgain) setSkipIpoConfirm(true);
13355
+ onConfirm();
13356
+ },
13357
+ className: "primary",
13358
+ disabled: isPlacing,
13359
+ children: isPlacing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13360
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { "aria-hidden": true }),
13361
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: placingLabel })
13362
+ ] }) : "Place Order"
13363
+ }
13364
+ )
13365
+ ] })
13334
13366
  ] })
13335
13367
  ] }) });
13336
13368
  }
@@ -13455,6 +13487,23 @@ var Spinner = styled9__default.default.span`
13455
13487
  margin-right: 0.5rem;
13456
13488
  vertical-align: -2px;
13457
13489
  `;
13490
+ var ModalFooter = styled9__default.default.div`
13491
+ display: flex;
13492
+ align-items: center;
13493
+ justify-content: space-between;
13494
+ gap: 1rem;
13495
+ `;
13496
+ var DontShowLabel = styled9__default.default.label`
13497
+ display: flex;
13498
+ align-items: center;
13499
+ gap: 0.4rem;
13500
+ font-size: 0.78rem;
13501
+ color: rgba(255, 255, 255, 0.5);
13502
+ cursor: pointer;
13503
+ user-select: none;
13504
+ white-space: nowrap;
13505
+ &:hover { color: rgba(255, 255, 255, 0.7); }
13506
+ `;
13458
13507
  var ButtonRow2 = styled9__default.default.div`
13459
13508
  display: flex;
13460
13509
  gap: 1rem;
@@ -14971,6 +15020,10 @@ function PropertyBuy({
14971
15020
  if (!ipoStarted || tokenQuantity === 0) {
14972
15021
  return;
14973
15022
  }
15023
+ if (getSkipIpoConfirm()) {
15024
+ void confirmOrder();
15025
+ return;
15026
+ }
14974
15027
  setShowOrderConfirmModal(true);
14975
15028
  };
14976
15029
  React5.useEffect(() => {