@asdp/ferryui 0.1.22-dev.10407 → 0.1.22-dev.10508

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.mjs CHANGED
@@ -13896,7 +13896,8 @@ var DEFAULT_LABELS27 = {
13896
13896
  cancelDialogTitle: "Buang perubahan?",
13897
13897
  cancelDialogBody: "Perubahan belum disimpan dan akan hilang jika Anda melanjutkan.",
13898
13898
  cancelDialogConfirm: "Buang Perubahan",
13899
- cancelDialogDismiss: "Batal"
13899
+ cancelDialogDismiss: "Batal",
13900
+ nextPaymentButton: "Lanjut ke Pembayaran"
13900
13901
  },
13901
13902
  en: {
13902
13903
  bookingDetails: "Booking Details",
@@ -13916,7 +13917,8 @@ var DEFAULT_LABELS27 = {
13916
13917
  cancelDialogTitle: "Discard changes?",
13917
13918
  cancelDialogBody: "Changes have not been saved and will be lost if you continue.",
13918
13919
  cancelDialogConfirm: "Discard Changes",
13919
- cancelDialogDismiss: "Cancel"
13920
+ cancelDialogDismiss: "Cancel",
13921
+ nextPaymentButton: "Proceed to Payment"
13920
13922
  }
13921
13923
  };
13922
13924
  var useStyles28 = makeStyles({
@@ -13991,6 +13993,12 @@ var useStyles28 = makeStyles({
13991
13993
  gap: "1rem"
13992
13994
  },
13993
13995
  ticketInfo: {
13996
+ display: "flex",
13997
+ justifyContent: "space-between",
13998
+ alignItems: "center",
13999
+ gap: "0.5em"
14000
+ },
14001
+ ticketinfoCard: {
13994
14002
  display: "flex",
13995
14003
  justifyContent: "space-between",
13996
14004
  alignItems: "center",
@@ -14095,9 +14103,11 @@ var CardBookingTicket = ({
14095
14103
  const styles = useStyles28();
14096
14104
  const mergedLabels = { ...DEFAULT_LABELS27[language], ...labels };
14097
14105
  const [cancelDialogOpen, setCancelDialogOpen] = useState(false);
14106
+ const [isTermsAccepted, setIsTermsAccepted] = useState(false);
14098
14107
  const handleTermsAndConditionsClick = () => {
14099
14108
  onTermsAndConditionsClick?.();
14100
14109
  };
14110
+ const isNextButtonDisabled = disableNextButton || reservationStep === "review" && !isTermsAccepted;
14101
14111
  return /* @__PURE__ */ jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.bookingDetail, children: [
14102
14112
  /* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailTop, children: [
14103
14113
  /* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.bookingDetails }),
@@ -14151,26 +14161,32 @@ var CardBookingTicket = ({
14151
14161
  }
14152
14162
  ),
14153
14163
  /* @__PURE__ */ jsx(Body1Strong, { children: mergedLabels.routeTitle }),
14154
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: styles.ticketInfo, children: [
14155
- /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
14156
- /* @__PURE__ */ jsx(Caption2, { children: departureDay }),
14157
- /* @__PURE__ */ jsx(Body1Stronger, { children: departureTime }),
14158
- /* @__PURE__ */ jsx(Caption2, { children: departureLocation })
14159
- ] }),
14160
- /* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
14161
- /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-24-regular" }),
14162
- /* @__PURE__ */ jsxs(Caption2, { children: [
14163
- mergedLabels.estimationPrefix,
14164
- " ",
14165
- formatDuration(duration)
14166
- ] })
14167
- ] }),
14168
- /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
14169
- /* @__PURE__ */ jsx(Caption2, { children: arrivalDay }),
14170
- /* @__PURE__ */ jsx(Body1Stronger, { children: arrivalTime }),
14171
- /* @__PURE__ */ jsx(Caption2, { children: arrivalLocation })
14172
- ] })
14173
- ] }) }),
14164
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
14165
+ "div",
14166
+ {
14167
+ className: reservationStep === "review" ? styles.ticketinfoCard : styles.ticketInfo,
14168
+ children: [
14169
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
14170
+ /* @__PURE__ */ jsx(Caption2, { children: departureDay }),
14171
+ /* @__PURE__ */ jsx(Body1Stronger, { children: departureTime }),
14172
+ /* @__PURE__ */ jsx(Caption2, { children: departureLocation })
14173
+ ] }),
14174
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
14175
+ /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-24-regular" }),
14176
+ /* @__PURE__ */ jsxs(Caption2, { children: [
14177
+ mergedLabels.estimationPrefix,
14178
+ " ",
14179
+ formatDuration(duration)
14180
+ ] })
14181
+ ] }),
14182
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
14183
+ /* @__PURE__ */ jsx(Caption2, { children: arrivalDay }),
14184
+ /* @__PURE__ */ jsx(Body1Stronger, { children: arrivalTime }),
14185
+ /* @__PURE__ */ jsx(Caption2, { children: arrivalLocation })
14186
+ ] })
14187
+ ]
14188
+ }
14189
+ ) }),
14174
14190
  /* @__PURE__ */ jsx("div", { className: styles.circularLeft }),
14175
14191
  /* @__PURE__ */ jsx("div", { className: styles.circularRight })
14176
14192
  ] }),
@@ -14206,6 +14222,8 @@ var CardBookingTicket = ({
14206
14222
  reservationStep === "review" && /* @__PURE__ */ jsx(
14207
14223
  Checkbox,
14208
14224
  {
14225
+ checked: isTermsAccepted,
14226
+ onChange: (_, data) => setIsTermsAccepted(!!data.checked),
14209
14227
  label: /* @__PURE__ */ jsxs(Body1, { children: [
14210
14228
  mergedLabels.agreementPrefix,
14211
14229
  " ",
@@ -14234,17 +14252,17 @@ var CardBookingTicket = ({
14234
14252
  Button,
14235
14253
  {
14236
14254
  appearance: "primary",
14237
- disabled: disableNextButton,
14255
+ disabled: isNextButtonDisabled,
14238
14256
  onClick: onNext,
14239
14257
  shape: "circular",
14240
14258
  size: "large",
14241
14259
  style: { width: "100%" },
14242
14260
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-right-20-regular" }),
14243
14261
  iconPosition: "after",
14244
- children: mergedLabels.nextButton
14262
+ children: reservationStep === "review" ? mergedLabels.nextPaymentButton : mergedLabels.nextButton
14245
14263
  }
14246
14264
  ),
14247
- ["addon", "meals", "review", "payment", "eticket"].includes(
14265
+ ["addon", "meals", "review", "eticket"].includes(
14248
14266
  reservationStep
14249
14267
  ) && !["pay"].includes(paymentStep) && /* @__PURE__ */ jsx(
14250
14268
  Button,
@@ -14259,31 +14277,18 @@ var CardBookingTicket = ({
14259
14277
  children: mergedLabels.previousButton
14260
14278
  }
14261
14279
  ),
14262
- paymentStep === "pay" && /* @__PURE__ */ jsxs(Fragment, { children: [
14263
- /* @__PURE__ */ jsx(
14264
- Button,
14265
- {
14266
- appearance: "primary",
14267
- disabled: disableNextButton,
14268
- onClick: onNext,
14269
- shape: "circular",
14270
- size: "large",
14271
- style: { width: "100%" },
14272
- children: mergedLabels.viewBookingButton
14273
- }
14274
- ),
14275
- /* @__PURE__ */ jsx(
14276
- Button,
14277
- {
14278
- appearance: "secondary",
14279
- shape: "circular",
14280
- size: "large",
14281
- className: styles.secondaryButton,
14282
- onClick: onPrevious,
14283
- children: mergedLabels.changePaymentButton
14284
- }
14285
- )
14286
- ] }),
14280
+ paymentStep === "pay" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
14281
+ Button,
14282
+ {
14283
+ appearance: "primary",
14284
+ disabled: disableNextButton,
14285
+ onClick: onNext,
14286
+ shape: "circular",
14287
+ size: "large",
14288
+ style: { width: "100%" },
14289
+ children: mergedLabels.viewBookingButton
14290
+ }
14291
+ ) }),
14287
14292
  reservationStep === "manifest" && /* @__PURE__ */ jsxs(Fragment, { children: [
14288
14293
  /* @__PURE__ */ jsx(
14289
14294
  Button,