@asdp/ferryui 0.1.22-dev.10601 → 0.1.22-dev.10685

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
@@ -1,7 +1,7 @@
1
1
  import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, InfoLabel, Body1, Body1Strong, Caption1, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Spinner, Label, Text, Subtitle1, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Menu, MenuTrigger, MenuPopover, MenuList, Radio, DialogActions, Caption2Strong, Link, Body2, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React, { forwardRef, useState, useRef, useEffect, useCallback, useMemo, Fragment as Fragment$1 } from 'react';
4
- import { ArrowDownloadRegular, Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular, SearchRegular } from '@fluentui/react-icons';
4
+ import { ArrowDownloadRegular, Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular, SearchRegular, ArrowRightRegular } from '@fluentui/react-icons';
5
5
  import { Container, Row, Col, Visible } from 'react-grid-system';
6
6
  import { Icon } from '@iconify/react';
7
7
  import { Controller, useForm, useWatch } from 'react-hook-form';
@@ -283,6 +283,7 @@ var foundationColors = {
283
283
  "Foundation_Danger_error": "#FD3A3A"
284
284
  };
285
285
  var lightModeColors = {
286
+ "Neutral_Background_1_Hover": "#f5f5f5",
286
287
  "Neutral_Background_2_Hover": "#f0f0f0",
287
288
  "Neutral_Background_3_Pressed": "#d6d6d6",
288
289
  "Neutral_Foreground_Disabled_Rest": "#bdbdbd",
@@ -14646,22 +14647,22 @@ var CardBookingAddOn = ({
14646
14647
  const styles = useStyles29();
14647
14648
  const mergedLabels = { ...DEFAULT_LABELS28[language], ...labels };
14648
14649
  const addOnRows = [
14649
- {
14650
+ addOnData?.lounge && {
14650
14651
  key: "lounge",
14651
- label: addOnData?.lounge?.label || mergedLabels.loungeLabel,
14652
- price: addOnData?.lounge?.price || mergedLabels.addOnPrice
14652
+ label: addOnData.lounge.label || mergedLabels.loungeLabel,
14653
+ price: addOnData.lounge.price
14653
14654
  },
14654
- {
14655
+ addOnData?.assurance && {
14655
14656
  key: "assurance",
14656
- label: addOnData?.assurance?.label || mergedLabels.assuranceLabel,
14657
- price: addOnData?.assurance?.price || mergedLabels.addOnPrice
14657
+ label: addOnData.assurance.label || mergedLabels.assuranceLabel,
14658
+ price: addOnData.assurance.price
14658
14659
  },
14659
- {
14660
+ addOnData?.meal && {
14660
14661
  key: "meal",
14661
- label: addOnData?.meal?.label || mergedLabels.mealLabel,
14662
- price: addOnData?.meal?.price || mergedLabels.addOnPrice
14662
+ label: addOnData.meal.label || mergedLabels.mealLabel,
14663
+ price: addOnData.meal.price
14663
14664
  }
14664
- ];
14665
+ ].filter(Boolean);
14665
14666
  return /* @__PURE__ */ jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.bookingDetail, children: [
14666
14667
  /* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailTop, children: [
14667
14668
  /* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.bookingDetails }),
@@ -15680,6 +15681,16 @@ var useStyles34 = makeStyles({
15680
15681
  flexDirection: "column",
15681
15682
  rowGap: tokens.spacingVerticalL
15682
15683
  },
15684
+ passengerList: {
15685
+ display: "flex",
15686
+ flexDirection: "column",
15687
+ rowGap: tokens.spacingVerticalL
15688
+ },
15689
+ passengerListScrollable: {
15690
+ maxHeight: "560px",
15691
+ overflowY: "auto",
15692
+ paddingRight: tokens.spacingHorizontalXS
15693
+ },
15683
15694
  passengerCard: {
15684
15695
  boxShadow: "none",
15685
15696
  border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
@@ -15738,12 +15749,13 @@ var CardReviewPassenger = ({
15738
15749
  const styles = useStyles34();
15739
15750
  const mergedLabels = { ...DEFAULT_LABELS33[language], ...labels };
15740
15751
  const displayTitle = title || mergedLabels.title;
15752
+ const isScrollable = !isLoading && passengers.length > 5;
15741
15753
  return /* @__PURE__ */ jsx(Card, { className: `${styles.card} ${className || ""}`, children: /* @__PURE__ */ jsxs(Row, { direction: "column", nogutter: true, className: styles.list, children: [
15742
15754
  /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.titleRow, children: [
15743
15755
  /* @__PURE__ */ jsx(Subtitle1, { children: displayTitle }),
15744
15756
  /* @__PURE__ */ jsx(Divider, { className: styles.titleDivider })
15745
15757
  ] }) }),
15746
- isLoading ? Array.from({ length: 2 }).map((_, index) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Card, { className: styles.passengerCard, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.passengerRow, children: [
15758
+ /* @__PURE__ */ jsx("div", { className: `${styles.passengerList} ${isScrollable ? styles.passengerListScrollable : ""}`, children: isLoading ? Array.from({ length: 2 }).map((_, index) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Card, { className: styles.passengerCard, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.passengerRow, children: [
15747
15759
  /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsxs(Skeleton, { children: [
15748
15760
  /* @__PURE__ */ jsx(SkeletonItem, { style: { width: "180px", height: "18px", marginBottom: "8px" } }),
15749
15761
  /* @__PURE__ */ jsx(SkeletonItem, { style: { width: "220px", height: "16px" } })
@@ -15781,7 +15793,7 @@ var CardReviewPassenger = ({
15781
15793
  }
15782
15794
  ) })
15783
15795
  ] }) }) }, passenger.id || index);
15784
- })
15796
+ }) })
15785
15797
  ] }) });
15786
15798
  };
15787
15799
 
@@ -16827,10 +16839,13 @@ var CardStatusOrder = ({
16827
16839
  var DEFAULT_LABELS40 = {
16828
16840
  id: {
16829
16841
  title: "Rincian Harga",
16842
+ passengerDetailHeader: "Detail Penumpang",
16830
16843
  addonHeader: "Add On",
16844
+ departureFareHeader: "Tarif Keberangkatan",
16831
16845
  subTotalLabel: "Sub Tagihan",
16832
- totalTagihanLabel: "Total Tagihan",
16833
- ppnLabel: "PPN (Pajak Pertambahan Nilai) 11%",
16846
+ discountLabel: "Discount Reduksi",
16847
+ totalTagihanLabel: "Total Tagihan (Subtotal - Reduksi)",
16848
+ ppnLabel: "PPN 11%",
16834
16849
  ppnNote: "*PPN 11% dikenakan untuk biaya layanan dan biaya admin",
16835
16850
  grandTotalLabel: "Total Pembayaran",
16836
16851
  currencyPrefix: "Rp.",
@@ -16839,10 +16854,13 @@ var DEFAULT_LABELS40 = {
16839
16854
  },
16840
16855
  en: {
16841
16856
  title: "Price Details",
16857
+ passengerDetailHeader: "Passenger Details",
16842
16858
  addonHeader: "Add On",
16859
+ departureFareHeader: "Departure Fare",
16843
16860
  subTotalLabel: "Sub Total",
16844
- totalTagihanLabel: "Total Bill",
16845
- ppnLabel: "VAT (Value Added Tax) 11%",
16861
+ discountLabel: "Discount Reduction",
16862
+ totalTagihanLabel: "Total Bill (Subtotal - Reduction)",
16863
+ ppnLabel: "VAT 11%",
16846
16864
  ppnNote: "*VAT 11% is charged for service fees and admin fees",
16847
16865
  grandTotalLabel: "Total Payment",
16848
16866
  currencyPrefix: "Rp.",
@@ -16863,24 +16881,26 @@ var useStyles42 = makeStyles({
16863
16881
  fontWeight: tokens.fontWeightSemibold
16864
16882
  }
16865
16883
  },
16884
+ cardScrollWrapper: {
16885
+ height: "500px",
16886
+ overflowY: "auto"
16887
+ },
16866
16888
  card: {
16867
16889
  backgroundColor: tokens.colorNeutralBackground1,
16868
- ...shorthands.border("1px", "solid", tokens.colorNeutralStroke2),
16869
- ...shorthands.padding(
16870
- tokens.spacingVerticalXXL,
16871
- tokens.spacingHorizontalXXL
16872
- ),
16873
- boxShadow: "none"
16890
+ ...shorthands.border("1px", "solid", tokens.colorNeutralStroke1),
16891
+ padding: tokens.spacingVerticalL,
16892
+ boxShadow: "none",
16893
+ borderRadius: tokens.borderRadiusXLarge
16874
16894
  },
16875
16895
  content: {
16876
16896
  display: "flex",
16877
16897
  flexDirection: "column",
16878
- gap: tokens.spacingVerticalL
16898
+ gap: tokens.spacingVerticalS
16879
16899
  },
16880
16900
  section: {
16881
16901
  display: "flex",
16882
16902
  flexDirection: "column",
16883
- gap: tokens.spacingVerticalS
16903
+ gap: tokens.spacingVerticalL
16884
16904
  },
16885
16905
  row: {
16886
16906
  display: "flex",
@@ -16945,13 +16965,13 @@ var useStyles42 = makeStyles({
16945
16965
  },
16946
16966
  grandTotalLabel: {
16947
16967
  color: "#D13438",
16948
- fontSize: tokens.fontSizeHero700,
16949
- fontWeight: tokens.fontWeightSemibold
16968
+ fontSize: tokens.fontSizeBase300,
16969
+ fontWeight: fontWeight.Medium
16950
16970
  },
16951
16971
  grandTotalValue: {
16952
16972
  color: "#D13438",
16953
- fontSize: tokens.fontSizeHero800,
16954
- fontWeight: tokens.fontWeightSemibold
16973
+ fontSize: tokens.fontSizeBase500,
16974
+ fontWeight: fontWeight.Medium
16955
16975
  },
16956
16976
  badge: {
16957
16977
  marginLeft: tokens.spacingHorizontalS,
@@ -16959,10 +16979,27 @@ var useStyles42 = makeStyles({
16959
16979
  color: "white"
16960
16980
  },
16961
16981
  divider: {
16962
- margin: `${tokens.spacingVerticalL} 0`
16982
+ // margin: `${tokens.spacingVerticalL} 0`,
16963
16983
  },
16964
16984
  closeButton: {
16965
16985
  color: tokens.colorNeutralForeground1
16986
+ },
16987
+ headerCard: {
16988
+ backgroundColor: lightModeColors.Neutral_Background_1_Hover,
16989
+ borderRadius: tokens.borderRadiusXLarge,
16990
+ gap: tokens.spacingVerticalMNudge,
16991
+ padding: tokens.spacingVerticalMNudge
16992
+ },
16993
+ badgeRoundTripLilac: {
16994
+ borderRadius: tokens.borderRadiusXLarge,
16995
+ border: `0px solid ${sharedColors.Shared_Lilac_Tint_40}`,
16996
+ backgroundColor: sharedColors.Shared_Lilac_Tint_60,
16997
+ color: sharedColors.Shared_Lilac_Primary
16998
+ },
16999
+ badgeRoundTripOrange: {
17000
+ borderRadius: tokens.borderRadiusXLarge,
17001
+ border: `0px solid ${tokens.colorStatusWarningForeground2}`,
17002
+ color: tokens.colorStatusWarningForeground2
16966
17003
  }
16967
17004
  });
16968
17005
  var ModalPriceDetail = ({
@@ -16970,15 +17007,67 @@ var ModalPriceDetail = ({
16970
17007
  labels,
16971
17008
  isOpen,
16972
17009
  onOpenChange,
17010
+ isRoundTrip = false,
17011
+ vesselType,
17012
+ vesselTypeColor,
16973
17013
  detailItems,
17014
+ departureItems = [],
16974
17015
  addonItems,
16975
17016
  subTotal,
17017
+ discountAmount = 0,
16976
17018
  taxAmount,
16977
17019
  grandTotal,
17020
+ headerInfo,
17021
+ roundTripHeaderInfo,
17022
+ roundTripDetailItems,
17023
+ roundTripDepartureItems,
17024
+ roundTripAddonItems,
17025
+ roundTripSubTotal,
17026
+ roundTripDiscountAmount,
17027
+ roundTripTaxAmount,
17028
+ roundTripGrandTotal,
16978
17029
  ...props
16979
17030
  }) => {
16980
17031
  const styles = useStyles42();
16981
17032
  const mergedLabels = { ...DEFAULT_LABELS40[language], ...labels };
17033
+ const locale = language === "id" ? "id-ID" : "en-US";
17034
+ const formatCurrency = (value) => `${mergedLabels.currencyCode} ${value.toLocaleString(locale)}`;
17035
+ const passengerItemsFromNested = detailItems.flatMap(
17036
+ (item) => item.list ?? []
17037
+ );
17038
+ const passengerItems = passengerItemsFromNested.length > 0 ? passengerItemsFromNested : detailItems;
17039
+ const finalDepartureItems = departureItems.length > 0 ? departureItems : detailItems;
17040
+ const roundTripDetailSource = roundTripDetailItems ?? detailItems;
17041
+ const roundTripPassengerItemsFromNested = roundTripDetailSource.flatMap(
17042
+ (item) => item.list ?? []
17043
+ );
17044
+ const roundTripPassengerItems = roundTripPassengerItemsFromNested.length > 0 ? roundTripPassengerItemsFromNested : roundTripDetailSource;
17045
+ const roundTripFinalDepartureItems = roundTripDepartureItems?.length ? roundTripDepartureItems : roundTripDetailSource;
17046
+ const roundTripAddonSource = roundTripAddonItems ?? addonItems;
17047
+ const totalTagihan = subTotal - discountAmount;
17048
+ const roundTripTotalTagihan = (roundTripSubTotal ?? subTotal) - (roundTripDiscountAmount ?? discountAmount);
17049
+ const modalHeaderInfo = {
17050
+ logoUrl: headerInfo?.logoUrl ?? "/assets/logo/asdp-default.svg",
17051
+ logoAlt: headerInfo?.logoAlt ?? "asdp",
17052
+ vesselName: headerInfo?.vesselName ?? "KMP PORTLINK",
17053
+ vesselType: vesselType ?? headerInfo?.vesselType ?? "Water Taxi",
17054
+ vesselTypeColor: vesselTypeColor ?? headerInfo?.vesselTypeColor ?? "#107C10",
17055
+ departureHarbor: headerInfo?.departureHarbor ?? "Merak, Banten",
17056
+ arrivalHarbor: headerInfo?.arrivalHarbor ?? "Bakauheni, Lampung",
17057
+ vehicleGroupLabel: headerInfo?.vehicleGroupLabel ?? "Golongan IV \u2022 Mobil Penumpang"
17058
+ };
17059
+ const roundTripModalHeaderInfo = {
17060
+ logoUrl: roundTripHeaderInfo?.logoUrl ?? modalHeaderInfo.logoUrl,
17061
+ logoAlt: roundTripHeaderInfo?.logoAlt ?? modalHeaderInfo.logoAlt,
17062
+ vesselName: roundTripHeaderInfo?.vesselName ?? modalHeaderInfo.vesselName,
17063
+ vesselType: roundTripHeaderInfo?.vesselType ?? modalHeaderInfo.vesselType,
17064
+ vesselTypeColor: roundTripHeaderInfo?.vesselTypeColor ?? modalHeaderInfo.vesselTypeColor,
17065
+ departureHarbor: roundTripHeaderInfo?.departureHarbor ?? modalHeaderInfo.departureHarbor,
17066
+ arrivalHarbor: roundTripHeaderInfo?.arrivalHarbor ?? modalHeaderInfo.arrivalHarbor,
17067
+ vehicleGroupLabel: roundTripHeaderInfo?.vehicleGroupLabel ?? modalHeaderInfo.vehicleGroupLabel
17068
+ };
17069
+ const roundTripTaxValue = roundTripTaxAmount ?? taxAmount;
17070
+ const roundTripGrandTotalValue = roundTripGrandTotal ?? grandTotal;
16982
17071
  return /* @__PURE__ */ jsx(
16983
17072
  Dialog,
16984
17073
  {
@@ -17007,111 +17096,460 @@ var ModalPriceDetail = ({
17007
17096
  ) })
17008
17097
  }
17009
17098
  ) }),
17010
- children: mergedLabels.title
17099
+ children: /* @__PURE__ */ jsx(Subtitle1, { style: { fontWeight: fontWeight.Medium }, children: mergedLabels.title })
17011
17100
  }
17012
17101
  ),
17013
- /* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: /* @__PURE__ */ jsx(Card, { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
17014
- detailItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
17015
- /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
17016
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
17017
- /* @__PURE__ */ jsx("span", { className: styles.vehicleTitle, children: item.label }),
17018
- item.badge && /* @__PURE__ */ jsx(
17019
- Badge,
17102
+ /* @__PURE__ */ jsxs(DialogContent, { className: styles.content, children: [
17103
+ /* @__PURE__ */ jsxs("div", { className: styles.cardScrollWrapper, children: [
17104
+ !isRoundTrip && /* @__PURE__ */ jsx(Card, { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
17105
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.headerCard, children: [
17106
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { children: [
17107
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
17108
+ "img",
17109
+ {
17110
+ src: modalHeaderInfo.logoUrl,
17111
+ width: 35,
17112
+ height: 24,
17113
+ alt: modalHeaderInfo.logoAlt
17114
+ }
17115
+ ) }),
17116
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
17117
+ Subtitle2,
17118
+ {
17119
+ style: { fontWeight: fontWeight.Medium },
17120
+ children: modalHeaderInfo.vesselName
17121
+ }
17122
+ ) }),
17123
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
17124
+ Badge,
17125
+ {
17126
+ size: "medium",
17127
+ appearance: "filled",
17128
+ iconPosition: "before",
17129
+ shape: "rounded",
17130
+ style: {
17131
+ backgroundColor: modalHeaderInfo.vesselTypeColor,
17132
+ borderRadius: tokens.borderRadiusXLarge
17133
+ },
17134
+ children: modalHeaderInfo.vesselType
17135
+ }
17136
+ ) })
17137
+ ] }) }),
17138
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(
17139
+ Row,
17020
17140
  {
17021
- size: "medium",
17022
- shape: "rounded",
17023
- className: styles.badge,
17024
- children: item.badge
17141
+ nogutter: true,
17142
+ align: "center",
17143
+ style: { gap: tokens.spacingHorizontalSNudge },
17144
+ children: [
17145
+ /* @__PURE__ */ jsx(
17146
+ Body1Stronger,
17147
+ {
17148
+ style: {
17149
+ color: tokens.colorNeutralStrokeAccessible
17150
+ },
17151
+ children: modalHeaderInfo.departureHarbor
17152
+ }
17153
+ ),
17154
+ /* @__PURE__ */ jsx(ArrowRightRegular, {}),
17155
+ /* @__PURE__ */ jsx(
17156
+ Body1Stronger,
17157
+ {
17158
+ style: {
17159
+ color: tokens.colorNeutralStrokeAccessible
17160
+ },
17161
+ children: modalHeaderInfo.arrivalHarbor
17162
+ }
17163
+ )
17164
+ ]
17025
17165
  }
17026
- )
17166
+ ) }),
17167
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(
17168
+ Body1,
17169
+ {
17170
+ style: { color: tokens.colorNeutralStrokeAccessible },
17171
+ children: modalHeaderInfo.vehicleGroupLabel
17172
+ }
17173
+ ) })
17027
17174
  ] }),
17028
- /* @__PURE__ */ jsxs("span", { className: styles.priceValue, children: [
17029
- mergedLabels.currencyPrefix,
17030
- " ",
17031
- item.price.toLocaleString(
17032
- language === "id" ? "id-ID" : "en-US"
17033
- )
17175
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, style: { gap: tokens.spacingVerticalMNudge }, children: [
17176
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.passengerDetailHeader }) }),
17177
+ passengerItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17178
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17179
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17180
+ ] }) }, item.key))
17181
+ ] }),
17182
+ /* @__PURE__ */ jsx(Divider, {}),
17183
+ addonItems.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
17184
+ /* @__PURE__ */ jsxs(
17185
+ Row,
17186
+ {
17187
+ nogutter: true,
17188
+ style: { gap: tokens.spacingVerticalMNudge },
17189
+ children: [
17190
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.addonHeader }) }),
17191
+ addonItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17192
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17193
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17194
+ ] }) }, item.key))
17195
+ ]
17196
+ }
17197
+ ),
17198
+ /* @__PURE__ */ jsx(Divider, {})
17199
+ ] }),
17200
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, style: { gap: tokens.spacingVerticalMNudge }, children: [
17201
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.departureFareHeader }) }),
17202
+ finalDepartureItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17203
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17204
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17205
+ ] }) }, item.key))
17206
+ ] }),
17207
+ /* @__PURE__ */ jsx(Divider, {}),
17208
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17209
+ /* @__PURE__ */ jsx(Body1Strong, { children: mergedLabels.subTotalLabel }),
17210
+ /* @__PURE__ */ jsx(Body1Stronger, { children: formatCurrency(subTotal) })
17211
+ ] }),
17212
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, style: { gap: tokens.spacingVerticalS }, children: [
17213
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17214
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.discountLabel }),
17215
+ /* @__PURE__ */ jsxs(Body1, { children: [
17216
+ "(-) ",
17217
+ formatCurrency(discountAmount)
17218
+ ] })
17219
+ ] }) }),
17220
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17221
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.totalTagihanLabel }),
17222
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(totalTagihan) })
17223
+ ] }) }),
17224
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17225
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.ppnLabel }),
17226
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(taxAmount) })
17227
+ ] }) })
17034
17228
  ] })
17035
- ] }),
17036
- item.list && item.list.map((subItem) => /* @__PURE__ */ jsxs(
17037
- "div",
17038
- {
17039
- className: styles.passengerDetail,
17040
- children: [
17041
- /* @__PURE__ */ jsx("span", { children: subItem.label }),
17042
- /* @__PURE__ */ jsxs("span", { style: { float: "right" }, children: [
17043
- mergedLabels.currencyCode,
17044
- " ",
17045
- item.price.toLocaleString(
17046
- language === "id" ? "id-ID" : "en-US"
17229
+ ] }) }),
17230
+ isRoundTrip && /* @__PURE__ */ jsxs(Fragment, { children: [
17231
+ /* @__PURE__ */ jsx(Card, { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
17232
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.headerCard, children: [
17233
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { children: [
17234
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
17235
+ "img",
17236
+ {
17237
+ src: roundTripModalHeaderInfo.logoUrl,
17238
+ width: 35,
17239
+ height: 24,
17240
+ alt: roundTripModalHeaderInfo.logoAlt
17241
+ }
17242
+ ) }),
17243
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
17244
+ Subtitle2,
17245
+ {
17246
+ style: { fontWeight: fontWeight.Medium },
17247
+ children: roundTripModalHeaderInfo.vesselName
17248
+ }
17249
+ ) }),
17250
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
17251
+ Badge,
17252
+ {
17253
+ size: "medium",
17254
+ appearance: "filled",
17255
+ iconPosition: "before",
17256
+ shape: "rounded",
17257
+ style: {
17258
+ backgroundColor: roundTripModalHeaderInfo.vesselTypeColor,
17259
+ borderRadius: tokens.borderRadiusXLarge
17260
+ },
17261
+ children: roundTripModalHeaderInfo.vesselType
17262
+ }
17263
+ ) })
17264
+ ] }) }),
17265
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(
17266
+ Row,
17267
+ {
17268
+ nogutter: true,
17269
+ align: "center",
17270
+ style: { gap: tokens.spacingHorizontalSNudge },
17271
+ children: [
17272
+ /* @__PURE__ */ jsx(
17273
+ Body1Stronger,
17274
+ {
17275
+ style: {
17276
+ color: tokens.colorNeutralStrokeAccessible
17277
+ },
17278
+ children: roundTripModalHeaderInfo.departureHarbor
17279
+ }
17280
+ ),
17281
+ /* @__PURE__ */ jsx(ArrowRightRegular, {}),
17282
+ /* @__PURE__ */ jsx(
17283
+ Body1Stronger,
17284
+ {
17285
+ style: {
17286
+ color: tokens.colorNeutralStrokeAccessible
17287
+ },
17288
+ children: roundTripModalHeaderInfo.arrivalHarbor
17289
+ }
17290
+ )
17291
+ ]
17292
+ }
17293
+ ) }),
17294
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(
17295
+ Body1,
17296
+ {
17297
+ style: {
17298
+ color: tokens.colorNeutralStrokeAccessible
17299
+ },
17300
+ children: roundTripModalHeaderInfo.vehicleGroupLabel
17301
+ }
17302
+ ) })
17303
+ ] }),
17304
+ /* @__PURE__ */ jsx(Row, { nogutter: true, children: /* @__PURE__ */ jsx(
17305
+ Badge,
17306
+ {
17307
+ size: "extra-large",
17308
+ appearance: "tint",
17309
+ shape: "circular",
17310
+ className: styles.badgeRoundTripLilac,
17311
+ children: "Pulang Pergi (Keberangkatan)"
17312
+ }
17313
+ ) }),
17314
+ /* @__PURE__ */ jsxs(
17315
+ Row,
17316
+ {
17317
+ nogutter: true,
17318
+ style: { gap: tokens.spacingVerticalMNudge },
17319
+ children: [
17320
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.passengerDetailHeader }) }),
17321
+ roundTripPassengerItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17322
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17323
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17324
+ ] }) }, item.key))
17325
+ ]
17326
+ }
17327
+ ),
17328
+ /* @__PURE__ */ jsx(Divider, {}),
17329
+ addonItems.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
17330
+ /* @__PURE__ */ jsxs(
17331
+ Row,
17332
+ {
17333
+ nogutter: true,
17334
+ style: { gap: tokens.spacingVerticalMNudge },
17335
+ children: [
17336
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.addonHeader }) }),
17337
+ addonItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17338
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17339
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17340
+ ] }) }, item.key))
17341
+ ]
17342
+ }
17343
+ ),
17344
+ /* @__PURE__ */ jsx(Divider, {})
17345
+ ] }),
17346
+ /* @__PURE__ */ jsxs(
17347
+ Row,
17348
+ {
17349
+ nogutter: true,
17350
+ style: { gap: tokens.spacingVerticalMNudge },
17351
+ children: [
17352
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.departureFareHeader }) }),
17353
+ finalDepartureItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17354
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17355
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17356
+ ] }) }, item.key))
17357
+ ]
17358
+ }
17359
+ )
17360
+ ] }) }),
17361
+ /* @__PURE__ */ jsx(
17362
+ Card,
17363
+ {
17364
+ className: styles.card,
17365
+ style: { marginTop: tokens.spacingVerticalL },
17366
+ children: /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
17367
+ /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.headerCard, children: [
17368
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { children: [
17369
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
17370
+ "img",
17371
+ {
17372
+ src: roundTripModalHeaderInfo.logoUrl,
17373
+ width: 35,
17374
+ height: 24,
17375
+ alt: roundTripModalHeaderInfo.logoAlt
17376
+ }
17377
+ ) }),
17378
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
17379
+ Subtitle2,
17380
+ {
17381
+ style: { fontWeight: fontWeight.Medium },
17382
+ children: roundTripModalHeaderInfo.vesselName
17383
+ }
17384
+ ) }),
17385
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
17386
+ Badge,
17387
+ {
17388
+ size: "medium",
17389
+ appearance: "filled",
17390
+ iconPosition: "before",
17391
+ shape: "rounded",
17392
+ style: {
17393
+ borderRadius: tokens.borderRadiusXLarge,
17394
+ backgroundColor: roundTripModalHeaderInfo.vesselTypeColor
17395
+ },
17396
+ children: roundTripModalHeaderInfo.vesselType
17397
+ }
17398
+ ) })
17399
+ ] }) }),
17400
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(
17401
+ Row,
17402
+ {
17403
+ nogutter: true,
17404
+ align: "center",
17405
+ style: { gap: tokens.spacingHorizontalSNudge },
17406
+ children: [
17407
+ /* @__PURE__ */ jsx(
17408
+ Body1Stronger,
17409
+ {
17410
+ style: {
17411
+ color: tokens.colorNeutralStrokeAccessible
17412
+ },
17413
+ children: roundTripModalHeaderInfo.departureHarbor
17414
+ }
17415
+ ),
17416
+ /* @__PURE__ */ jsx(ArrowRightRegular, {}),
17417
+ /* @__PURE__ */ jsx(
17418
+ Body1Stronger,
17419
+ {
17420
+ style: {
17421
+ color: tokens.colorNeutralStrokeAccessible
17422
+ },
17423
+ children: roundTripModalHeaderInfo.arrivalHarbor
17424
+ }
17425
+ )
17426
+ ]
17427
+ }
17428
+ ) }),
17429
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(
17430
+ Body1,
17431
+ {
17432
+ style: {
17433
+ color: tokens.colorNeutralStrokeAccessible
17434
+ },
17435
+ children: roundTripModalHeaderInfo.vehicleGroupLabel
17436
+ }
17437
+ ) })
17438
+ ] }),
17439
+ /* @__PURE__ */ jsx(Row, { nogutter: true, children: /* @__PURE__ */ jsx(
17440
+ Badge,
17441
+ {
17442
+ size: "extra-large",
17443
+ appearance: "outline",
17444
+ shape: "circular",
17445
+ color: "warning",
17446
+ className: styles.badgeRoundTripOrange,
17447
+ children: "Pulang Pergi (Kepulangan)"
17448
+ }
17449
+ ) }),
17450
+ /* @__PURE__ */ jsxs(
17451
+ Row,
17452
+ {
17453
+ nogutter: true,
17454
+ style: { gap: tokens.spacingVerticalMNudge },
17455
+ children: [
17456
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.passengerDetailHeader }) }),
17457
+ roundTripPassengerItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17458
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17459
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17460
+ ] }) }, item.key))
17461
+ ]
17462
+ }
17463
+ ),
17464
+ /* @__PURE__ */ jsx(Divider, {}),
17465
+ roundTripAddonSource.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
17466
+ /* @__PURE__ */ jsxs(
17467
+ Row,
17468
+ {
17469
+ nogutter: true,
17470
+ style: { gap: tokens.spacingVerticalMNudge },
17471
+ children: [
17472
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.addonHeader }) }),
17473
+ roundTripAddonSource.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17474
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17475
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17476
+ ] }) }, item.key))
17477
+ ]
17478
+ }
17479
+ ),
17480
+ /* @__PURE__ */ jsx(Divider, {})
17481
+ ] }),
17482
+ /* @__PURE__ */ jsxs(
17483
+ Row,
17484
+ {
17485
+ nogutter: true,
17486
+ style: { gap: tokens.spacingVerticalMNudge },
17487
+ children: [
17488
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1Stronger, { children: mergedLabels.departureFareHeader }) }),
17489
+ roundTripFinalDepartureItems.map((item) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17490
+ /* @__PURE__ */ jsx(Body1, { children: item.label }),
17491
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(item.price) })
17492
+ ] }) }, item.key))
17493
+ ]
17494
+ }
17047
17495
  )
17048
17496
  ] })
17049
- ]
17050
- },
17051
- subItem.key
17052
- ))
17053
- ] }, item.key)),
17054
- addonItems.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
17055
- /* @__PURE__ */ jsx("div", { className: styles.addonHeader, children: mergedLabels.addonHeader }),
17056
- addonItems.map((item) => /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
17057
- /* @__PURE__ */ jsx("span", { className: styles.itemLabel, children: item.label }),
17058
- /* @__PURE__ */ jsxs("span", { className: styles.priceValue, children: [
17059
- mergedLabels.currencyCode,
17060
- " ",
17061
- item.price.toLocaleString(
17062
- language === "id" ? "id-ID" : "en-US"
17063
- )
17064
- ] })
17065
- ] }, item.key))
17066
- ] }),
17067
- /* @__PURE__ */ jsx(Divider, { className: styles.divider }),
17068
- /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
17069
- /* @__PURE__ */ jsx("span", { className: styles.totalLabel, children: mergedLabels.subTotalLabel }),
17070
- /* @__PURE__ */ jsxs("span", { className: styles.totalValue, children: [
17071
- mergedLabels.currencyCode,
17072
- subTotal.toLocaleString(
17073
- language === "id" ? "id-ID" : "en-US"
17074
- )
17075
- ] })
17076
- ] }),
17077
- /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
17078
- /* @__PURE__ */ jsx("span", { className: styles.totalTagihanLabel, children: mergedLabels.totalTagihanLabel }),
17079
- /* @__PURE__ */ jsxs("span", { className: styles.totalTagihanValue, children: [
17080
- mergedLabels.currencyCode,
17081
- subTotal.toLocaleString(
17082
- language === "id" ? "id-ID" : "en-US"
17497
+ }
17498
+ ),
17499
+ /* @__PURE__ */ jsxs(
17500
+ Row,
17501
+ {
17502
+ nogutter: true,
17503
+ style: {
17504
+ gap: tokens.spacingVerticalL,
17505
+ marginTop: tokens.spacingVerticalL
17506
+ },
17507
+ children: [
17508
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17509
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.subTotalLabel }),
17510
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(roundTripSubTotal ?? subTotal) })
17511
+ ] }) }),
17512
+ /* @__PURE__ */ jsx(Divider, {}),
17513
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, style: { gap: tokens.spacingVerticalS }, children: [
17514
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17515
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.discountLabel }),
17516
+ /* @__PURE__ */ jsxs(Body1, { children: [
17517
+ "(-)",
17518
+ " ",
17519
+ formatCurrency(
17520
+ roundTripDiscountAmount ?? discountAmount
17521
+ )
17522
+ ] })
17523
+ ] }) }),
17524
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17525
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.totalTagihanLabel }),
17526
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(roundTripTotalTagihan) })
17527
+ ] }) }),
17528
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, justify: "between", children: [
17529
+ /* @__PURE__ */ jsx(Caption1, { children: mergedLabels.ppnLabel }),
17530
+ /* @__PURE__ */ jsx(Body1, { children: formatCurrency(roundTripTaxValue) })
17531
+ ] }) })
17532
+ ] }) })
17533
+ ]
17534
+ }
17083
17535
  )
17084
17536
  ] })
17085
17537
  ] }),
17086
- /* @__PURE__ */ jsxs("div", { style: { marginTop: tokens.spacingVerticalL }, children: [
17087
- /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
17088
- /* @__PURE__ */ jsx("span", { className: styles.ppnLabel, children: mergedLabels.ppnLabel }),
17089
- /* @__PURE__ */ jsxs("span", { className: styles.ppnValue, children: [
17090
- mergedLabels.currencyCode,
17091
- taxAmount.toLocaleString(
17092
- language === "id" ? "id-ID" : "en-US"
17093
- )
17094
- ] })
17095
- ] }),
17096
- /* @__PURE__ */ jsx("div", { className: styles.ppnNote, children: mergedLabels.ppnNote })
17097
- ] }),
17098
17538
  /* @__PURE__ */ jsxs(
17099
17539
  "div",
17100
17540
  {
17101
17541
  className: styles.row,
17102
17542
  style: { marginTop: tokens.spacingVerticalXXL },
17103
17543
  children: [
17104
- /* @__PURE__ */ jsx("span", { className: styles.grandTotalLabel, children: mergedLabels.grandTotalLabel }),
17105
- /* @__PURE__ */ jsxs("span", { className: styles.grandTotalValue, children: [
17544
+ /* @__PURE__ */ jsx(Body1Strong, { className: styles.grandTotalLabel, children: mergedLabels.grandTotalLabel }),
17545
+ /* @__PURE__ */ jsxs(Subtitle1, { className: styles.grandTotalValue, children: [
17106
17546
  mergedLabels.currencyPrefix,
17107
- grandTotal.toLocaleString(
17108
- language === "id" ? "id-ID" : "en-US"
17109
- )
17547
+ (isRoundTrip ? roundTripGrandTotalValue : grandTotal).toLocaleString(locale)
17110
17548
  ] })
17111
17549
  ]
17112
17550
  }
17113
17551
  )
17114
- ] }) }) })
17552
+ ] })
17115
17553
  ] }) })
17116
17554
  }
17117
17555
  );