@asdp/ferryui 0.1.22-dev.10229 → 0.1.22-dev.10231

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.d.mts CHANGED
@@ -3384,7 +3384,7 @@ declare const CardFAQ: React$1.FC<CardFAQProps>;
3384
3384
 
3385
3385
  interface AddonFooterData {
3386
3386
  priceLabel: string;
3387
- price: number;
3387
+ price?: number;
3388
3388
  priceUnit?: string;
3389
3389
  actionLabel?: string;
3390
3390
  onActionClick?: () => void;
@@ -3602,6 +3602,11 @@ interface CardReviewProps {
3602
3602
  * Optional action in the header (e.g. Ubah button) - though not present in current designs, good for extensibility
3603
3603
  */
3604
3604
  headerAction?: React$1.ReactNode;
3605
+ /**
3606
+ * Loading state for skeleton display
3607
+ * @default false
3608
+ */
3609
+ isLoading?: boolean;
3605
3610
  }
3606
3611
 
3607
3612
  declare const CardReview: React$1.FC<CardReviewProps>;
@@ -3641,10 +3646,41 @@ interface CardReviewPassengerProps {
3641
3646
  * Optional class name
3642
3647
  */
3643
3648
  className?: string;
3649
+ /**
3650
+ * Loading state for skeleton display
3651
+ * @default false
3652
+ */
3653
+ isLoading?: boolean;
3644
3654
  }
3645
3655
 
3646
3656
  declare const CardReviewPassenger: React$1.FC<CardReviewPassengerProps>;
3647
3657
 
3658
+ interface TripData {
3659
+ /**
3660
+ * Origin location (e.g., "Merak, Banten")
3661
+ */
3662
+ from: string;
3663
+ /**
3664
+ * Destination location (e.g., "Bakehuni, Lampung")
3665
+ */
3666
+ to: string;
3667
+ /**
3668
+ * Schedule entry time (e.g., "Kam, 27 Nov 2025, 18:15")
3669
+ */
3670
+ scheduleTime: string;
3671
+ /**
3672
+ * Booking name
3673
+ */
3674
+ bookingName: string;
3675
+ /**
3676
+ * Passenger type/vehicle info (e.g., "Golongan VIB • Mobil Pickup • B 1234 CD")
3677
+ */
3678
+ passengerType: string;
3679
+ /**
3680
+ * Number of add-ons/services
3681
+ */
3682
+ addOnsCount: number;
3683
+ }
3648
3684
  interface CardReviewDetailLabels {
3649
3685
  title: string;
3650
3686
  fromLabel: string;
@@ -3656,6 +3692,8 @@ interface CardReviewDetailLabels {
3656
3692
  viewDetail: string;
3657
3693
  noAddOnsLabel: string;
3658
3694
  serviceLabel: string;
3695
+ departureLabel: string;
3696
+ returnLabel: string;
3659
3697
  }
3660
3698
  interface CardReviewDetailProps {
3661
3699
  /**
@@ -3668,29 +3706,13 @@ interface CardReviewDetailProps {
3668
3706
  */
3669
3707
  labels?: Partial<CardReviewDetailLabels>;
3670
3708
  /**
3671
- * Origin location (e.g., "Merak, Banten")
3672
- */
3673
- from: string;
3674
- /**
3675
- * Destination location (e.g., "Bakehuni, Lampung")
3676
- */
3677
- to: string;
3678
- /**
3679
- * Schedule entry time (e.g., "Kam, 27 Nov 2025, 18:15")
3680
- */
3681
- scheduleTime: string;
3682
- /**
3683
- * Booking name
3684
- */
3685
- bookingName: string;
3686
- /**
3687
- * Passenger type/vehicle info (e.g., "Golongan VIB • Mobil Pickup • B 1234 CD")
3709
+ * Departure trip data
3688
3710
  */
3689
- passengerType: string;
3711
+ departureData: TripData;
3690
3712
  /**
3691
- * Number of add-ons/services
3713
+ * Return trip data (only used when isRoundTrip is true)
3692
3714
  */
3693
- addOnsCount: number;
3715
+ returnData?: TripData;
3694
3716
  /**
3695
3717
  * Callback when "View Detail" button is clicked
3696
3718
  */
@@ -3699,6 +3721,16 @@ interface CardReviewDetailProps {
3699
3721
  * Optional class name
3700
3722
  */
3701
3723
  className?: string;
3724
+ /**
3725
+ * Loading state for skeleton display
3726
+ * @default false
3727
+ */
3728
+ isLoading?: boolean;
3729
+ /**
3730
+ * Indicate if the trip is round-trip, which will conditionally render return badge and section
3731
+ * @default false
3732
+ */
3733
+ isRoundTrip?: boolean;
3702
3734
  }
3703
3735
 
3704
3736
  declare const CardReviewDetail: React$1.FC<CardReviewDetailProps>;
package/dist/index.d.ts CHANGED
@@ -3384,7 +3384,7 @@ declare const CardFAQ: React$1.FC<CardFAQProps>;
3384
3384
 
3385
3385
  interface AddonFooterData {
3386
3386
  priceLabel: string;
3387
- price: number;
3387
+ price?: number;
3388
3388
  priceUnit?: string;
3389
3389
  actionLabel?: string;
3390
3390
  onActionClick?: () => void;
@@ -3602,6 +3602,11 @@ interface CardReviewProps {
3602
3602
  * Optional action in the header (e.g. Ubah button) - though not present in current designs, good for extensibility
3603
3603
  */
3604
3604
  headerAction?: React$1.ReactNode;
3605
+ /**
3606
+ * Loading state for skeleton display
3607
+ * @default false
3608
+ */
3609
+ isLoading?: boolean;
3605
3610
  }
3606
3611
 
3607
3612
  declare const CardReview: React$1.FC<CardReviewProps>;
@@ -3641,10 +3646,41 @@ interface CardReviewPassengerProps {
3641
3646
  * Optional class name
3642
3647
  */
3643
3648
  className?: string;
3649
+ /**
3650
+ * Loading state for skeleton display
3651
+ * @default false
3652
+ */
3653
+ isLoading?: boolean;
3644
3654
  }
3645
3655
 
3646
3656
  declare const CardReviewPassenger: React$1.FC<CardReviewPassengerProps>;
3647
3657
 
3658
+ interface TripData {
3659
+ /**
3660
+ * Origin location (e.g., "Merak, Banten")
3661
+ */
3662
+ from: string;
3663
+ /**
3664
+ * Destination location (e.g., "Bakehuni, Lampung")
3665
+ */
3666
+ to: string;
3667
+ /**
3668
+ * Schedule entry time (e.g., "Kam, 27 Nov 2025, 18:15")
3669
+ */
3670
+ scheduleTime: string;
3671
+ /**
3672
+ * Booking name
3673
+ */
3674
+ bookingName: string;
3675
+ /**
3676
+ * Passenger type/vehicle info (e.g., "Golongan VIB • Mobil Pickup • B 1234 CD")
3677
+ */
3678
+ passengerType: string;
3679
+ /**
3680
+ * Number of add-ons/services
3681
+ */
3682
+ addOnsCount: number;
3683
+ }
3648
3684
  interface CardReviewDetailLabels {
3649
3685
  title: string;
3650
3686
  fromLabel: string;
@@ -3656,6 +3692,8 @@ interface CardReviewDetailLabels {
3656
3692
  viewDetail: string;
3657
3693
  noAddOnsLabel: string;
3658
3694
  serviceLabel: string;
3695
+ departureLabel: string;
3696
+ returnLabel: string;
3659
3697
  }
3660
3698
  interface CardReviewDetailProps {
3661
3699
  /**
@@ -3668,29 +3706,13 @@ interface CardReviewDetailProps {
3668
3706
  */
3669
3707
  labels?: Partial<CardReviewDetailLabels>;
3670
3708
  /**
3671
- * Origin location (e.g., "Merak, Banten")
3672
- */
3673
- from: string;
3674
- /**
3675
- * Destination location (e.g., "Bakehuni, Lampung")
3676
- */
3677
- to: string;
3678
- /**
3679
- * Schedule entry time (e.g., "Kam, 27 Nov 2025, 18:15")
3680
- */
3681
- scheduleTime: string;
3682
- /**
3683
- * Booking name
3684
- */
3685
- bookingName: string;
3686
- /**
3687
- * Passenger type/vehicle info (e.g., "Golongan VIB • Mobil Pickup • B 1234 CD")
3709
+ * Departure trip data
3688
3710
  */
3689
- passengerType: string;
3711
+ departureData: TripData;
3690
3712
  /**
3691
- * Number of add-ons/services
3713
+ * Return trip data (only used when isRoundTrip is true)
3692
3714
  */
3693
- addOnsCount: number;
3715
+ returnData?: TripData;
3694
3716
  /**
3695
3717
  * Callback when "View Detail" button is clicked
3696
3718
  */
@@ -3699,6 +3721,16 @@ interface CardReviewDetailProps {
3699
3721
  * Optional class name
3700
3722
  */
3701
3723
  className?: string;
3724
+ /**
3725
+ * Loading state for skeleton display
3726
+ * @default false
3727
+ */
3728
+ isLoading?: boolean;
3729
+ /**
3730
+ * Indicate if the trip is round-trip, which will conditionally render return badge and section
3731
+ * @default false
3732
+ */
3733
+ isRoundTrip?: boolean;
3702
3734
  }
3703
3735
 
3704
3736
  declare const CardReviewDetail: React$1.FC<CardReviewDetailProps>;
package/dist/index.js CHANGED
@@ -284,7 +284,10 @@ var sharedColors = {
284
284
  "Shared_Red_Primary": "#d13438",
285
285
  "Shared_Orange_Shade_20": "#bc4b09",
286
286
  "Shared_Orange_Tint_60": "#fff9f5",
287
- "Shared_Green_Primary": "#107c10"};
287
+ "Shared_Green_Primary": "#107c10",
288
+ "Shared_Lilac_Primary": "#b146c2",
289
+ "Shared_Lilac_Tint_40": "#e6bfed",
290
+ "Shared_Lilac_Tint_60": "#fcf6fd"};
288
291
  var foundationColors = {
289
292
  "Foundation_Danger_error": "#FD3A3A"
290
293
  };
@@ -14868,7 +14871,7 @@ var CardAddon = ({
14868
14871
  /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption1Stronger, { children: [
14869
14872
  mergedLabels.currencySymbol,
14870
14873
  " ",
14871
- footerData.price.toLocaleString(
14874
+ footerData.price?.toLocaleString(
14872
14875
  language === "id" ? "id-ID" : "en-US"
14873
14876
  ),
14874
14877
  footerData.priceUnit
@@ -15019,7 +15022,7 @@ var CardAddon = ({
15019
15022
  /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle1, { style: { fontSize: reactComponents.tokens.fontSizeBase600 }, children: [
15020
15023
  mergedLabels.currencySymbol,
15021
15024
  " ",
15022
- footerData.price.toLocaleString(
15025
+ footerData.price?.toLocaleString(
15023
15026
  language === "id" ? "id-ID" : "en-US"
15024
15027
  )
15025
15028
  ] })
@@ -15369,7 +15372,8 @@ var CardReview = ({
15369
15372
  items,
15370
15373
  children,
15371
15374
  className,
15372
- headerAction
15375
+ headerAction,
15376
+ isLoading = false
15373
15377
  }) => {
15374
15378
  const styles = useStyles33();
15375
15379
  const mergedLabels = { ...DEFAULT_LABELS32[language], ...labels };
@@ -15380,39 +15384,60 @@ var CardReview = ({
15380
15384
  headerAction && /* @__PURE__ */ jsxRuntime.jsx("div", { children: headerAction })
15381
15385
  ] }),
15382
15386
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.contentContainer, children: [
15383
- items?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles.row} ${item.className || ""}`, children: [
15384
- typeof item.label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
15385
- reactComponents.Caption1,
15386
- {
15387
- className: `${styles.defaultLabel} ${item.labelClassName || ""}`,
15388
- children: item.label
15389
- }
15390
- ) : (
15391
- // Clone element to append className if it's a valid React element
15392
- React__default.default.isValidElement(item.label) ? React__default.default.cloneElement(item.label, {
15393
- className: `${styles.defaultLabel} ${item.labelClassName || ""}${item.label.props.className ? " " + item.label.props.className : ""}`
15394
- }) : /* @__PURE__ */ jsxRuntime.jsx(
15395
- "div",
15396
- {
15397
- className: `${styles.defaultLabel} ${item.labelClassName || ""}`,
15398
- children: item.label
15399
- }
15400
- )
15401
- ),
15402
- typeof item.value === "string" || typeof item.value === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
15403
- reactComponents.Body1,
15404
- {
15405
- className: `${styles.defaultValue} ${item.valueClassName || ""}`,
15406
- children: item.value
15407
- }
15408
- ) : /* @__PURE__ */ jsxRuntime.jsx(
15409
- "div",
15410
- {
15411
- className: `${styles.defaultValue} ${item.valueClassName || ""}`,
15412
- children: item.value
15413
- }
15414
- )
15415
- ] }, index)),
15387
+ isLoading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.row, children: /* @__PURE__ */ jsxRuntime.jsxs(
15388
+ reactComponents.Skeleton,
15389
+ {
15390
+ style: { width: "100%", display: "flex", gap: "1rem" },
15391
+ children: [
15392
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "40%", height: "16px" } }),
15393
+ /* @__PURE__ */ jsxRuntime.jsx(
15394
+ reactComponents.SkeletonItem,
15395
+ {
15396
+ style: { width: "30%", height: "16px", marginLeft: "auto" }
15397
+ }
15398
+ )
15399
+ ]
15400
+ }
15401
+ ) }, index)) }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: items?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
15402
+ "div",
15403
+ {
15404
+ className: `${styles.row} ${item.className || ""}`,
15405
+ children: [
15406
+ typeof item.label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
15407
+ reactComponents.Caption1,
15408
+ {
15409
+ className: `${styles.defaultLabel} ${item.labelClassName || ""}`,
15410
+ children: item.label
15411
+ }
15412
+ ) : (
15413
+ // Clone element to append className if it's a valid React element
15414
+ React__default.default.isValidElement(item.label) ? React__default.default.cloneElement(item.label, {
15415
+ className: `${styles.defaultLabel} ${item.labelClassName || ""}${item.label.props.className ? " " + item.label.props.className : ""}`
15416
+ }) : /* @__PURE__ */ jsxRuntime.jsx(
15417
+ "div",
15418
+ {
15419
+ className: `${styles.defaultLabel} ${item.labelClassName || ""}`,
15420
+ children: item.label
15421
+ }
15422
+ )
15423
+ ),
15424
+ typeof item.value === "string" || typeof item.value === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
15425
+ reactComponents.Body1,
15426
+ {
15427
+ className: `${styles.defaultValue} ${item.valueClassName || ""}`,
15428
+ children: item.value
15429
+ }
15430
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
15431
+ "div",
15432
+ {
15433
+ className: `${styles.defaultValue} ${item.valueClassName || ""}`,
15434
+ children: item.value
15435
+ }
15436
+ )
15437
+ ]
15438
+ },
15439
+ index
15440
+ )) }),
15416
15441
  children
15417
15442
  ] })
15418
15443
  ] });
@@ -15501,7 +15526,8 @@ var CardReviewPassenger = ({
15501
15526
  labels,
15502
15527
  title,
15503
15528
  passengers,
15504
- className
15529
+ className,
15530
+ isLoading = false
15505
15531
  }) => {
15506
15532
  const styles = useStyles34();
15507
15533
  const mergedLabels = { ...DEFAULT_LABELS33[language], ...labels };
@@ -15511,7 +15537,13 @@ var CardReviewPassenger = ({
15511
15537
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: displayTitle }),
15512
15538
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { className: styles.titleDivider })
15513
15539
  ] }) }),
15514
- passengers.map((passenger, index) => {
15540
+ isLoading ? Array.from({ length: 2 }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: styles.passengerCard, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.passengerRow, children: [
15541
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15542
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "180px", height: "18px", marginBottom: "8px" } }),
15543
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "220px", height: "16px" } })
15544
+ ] }) }),
15545
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Skeleton, { children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "90px", height: "32px" } }) }) })
15546
+ ] }) }) }, index)) : passengers.map((passenger, index) => {
15515
15547
  const badgeConfig = getBadgeConfig(passenger.serviceClass);
15516
15548
  const passengerMeta = `${passenger.ageLabel} \xB7 ${mergedLabels.idNumber} ${passenger.identityNumber}`;
15517
15549
  return /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: styles.passengerCard, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.passengerRow, children: [
@@ -15554,7 +15586,9 @@ var DEFAULT_LABELS34 = {
15554
15586
  addOnLabel: "Add On",
15555
15587
  viewDetail: "Lihat Detail",
15556
15588
  noAddOnsLabel: "Tidak ada layanan",
15557
- serviceLabel: "Layanan"
15589
+ serviceLabel: "Layanan",
15590
+ departureLabel: "Pulang Pergi (Keberangkatan)",
15591
+ returnLabel: "Pulang Pergi (Kepulangan)"
15558
15592
  },
15559
15593
  en: {
15560
15594
  title: "Booking Details",
@@ -15566,7 +15600,9 @@ var DEFAULT_LABELS34 = {
15566
15600
  addOnLabel: "Add On",
15567
15601
  viewDetail: "View Details",
15568
15602
  noAddOnsLabel: "No services",
15569
- serviceLabel: "Service"
15603
+ serviceLabel: "Service",
15604
+ departureLabel: "Round Trip (Departure)",
15605
+ returnLabel: "Round Trip (Return)"
15570
15606
  }
15571
15607
  };
15572
15608
  var useStyles35 = reactComponents.makeStyles({
@@ -15589,59 +15625,211 @@ var useStyles35 = reactComponents.makeStyles({
15589
15625
  alignItems: "center",
15590
15626
  justifyContent: "space-between",
15591
15627
  width: "100%"
15628
+ },
15629
+ badgeLilac: {
15630
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
15631
+ border: `0px solid ${sharedColors.Shared_Lilac_Tint_40}`,
15632
+ color: sharedColors.Shared_Lilac_Primary,
15633
+ backgroundColor: sharedColors.Shared_Lilac_Tint_60
15634
+ },
15635
+ badgeOrange: {
15636
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
15637
+ border: `0px solid ${reactComponents.tokens.colorStatusWarningForeground2}`,
15638
+ color: reactComponents.tokens.colorStatusWarningForeground2,
15639
+ backgroundColor: sharedColors.Shared_Orange_Tint_60
15592
15640
  }
15593
15641
  });
15642
+ var TripSection = ({ data, label, badgeClassName, mergedLabels, onViewAddOns }) => {
15643
+ const styles = useStyles35();
15644
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, direction: "column", style: { gap: reactComponents.tokens.spacingHorizontalL }, children: [
15645
+ label && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
15646
+ reactComponents.Badge,
15647
+ {
15648
+ size: "extra-large",
15649
+ appearance: "tint",
15650
+ shape: "circular",
15651
+ className: badgeClassName,
15652
+ children: label
15653
+ }
15654
+ ) }),
15655
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: styles.fieldRow, children: [
15656
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.fromLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: data.from }) }) }),
15657
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.toLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: data.to }) }) })
15658
+ ] }) }),
15659
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: styles.fieldRow, children: [
15660
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.scheduleLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: data.scheduleTime }) }) }),
15661
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.bookingNameLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: data.bookingName }) }) })
15662
+ ] }) }),
15663
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: styles.fieldRow, children: [
15664
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.passengerTypeLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: data.passengerType }) }) }),
15665
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.addOnLabel, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.addOnRow, children: [
15666
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: data.addOnsCount === 0 ? mergedLabels.noAddOnsLabel : `${data.addOnsCount} ${data.addOnsCount === 1 ? mergedLabels.serviceLabel : mergedLabels.serviceLabel}` }),
15667
+ data.addOnsCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
15668
+ reactComponents.Button,
15669
+ {
15670
+ appearance: "transparent",
15671
+ onClick: onViewAddOns,
15672
+ style: { color: brandColors[80] },
15673
+ children: mergedLabels.viewDetail
15674
+ }
15675
+ )
15676
+ ] }) }) })
15677
+ ] }) })
15678
+ ] });
15679
+ };
15594
15680
  var CardReviewDetail = ({
15595
15681
  language = "id",
15596
15682
  labels,
15597
- from,
15598
- to,
15599
- scheduleTime,
15600
- bookingName,
15601
- passengerType,
15602
- addOnsCount,
15683
+ departureData,
15684
+ returnData,
15603
15685
  onViewAddOns,
15604
- className
15686
+ className,
15687
+ isLoading = false,
15688
+ isRoundTrip = false
15605
15689
  }) => {
15606
15690
  const styles = useStyles35();
15607
15691
  const mergedLabels = { ...DEFAULT_LABELS34[language], ...labels };
15608
- return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: `${styles.card} ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs(
15692
+ return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: `${styles.card} ${className || ""}`, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(
15609
15693
  reactGridSystem.Row,
15610
15694
  {
15611
15695
  nogutter: true,
15612
15696
  direction: "column",
15613
15697
  style: { gap: reactComponents.tokens.spacingHorizontalL },
15614
15698
  children: [
15615
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.titleRow, children: [
15616
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: mergedLabels.title }),
15617
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { style: { width: 0 } })
15618
- ] }) }),
15699
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Skeleton, { children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "30%", height: "24px" } }) }) }),
15619
15700
  /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: styles.fieldRow, children: [
15620
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.fromLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: from }) }) }),
15621
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.toLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: to }) }) })
15701
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15702
+ /* @__PURE__ */ jsxRuntime.jsx(
15703
+ reactComponents.SkeletonItem,
15704
+ {
15705
+ style: {
15706
+ width: "100%",
15707
+ height: "20px",
15708
+ marginBottom: "8px"
15709
+ }
15710
+ }
15711
+ ),
15712
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "80%", height: "20px" } })
15713
+ ] }) }),
15714
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15715
+ /* @__PURE__ */ jsxRuntime.jsx(
15716
+ reactComponents.SkeletonItem,
15717
+ {
15718
+ style: {
15719
+ width: "100%",
15720
+ height: "20px",
15721
+ marginBottom: "8px"
15722
+ }
15723
+ }
15724
+ ),
15725
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "80%", height: "20px" } })
15726
+ ] }) })
15622
15727
  ] }) }),
15623
15728
  /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: styles.fieldRow, children: [
15624
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.scheduleLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: scheduleTime }) }) }),
15625
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.bookingNameLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: bookingName }) }) })
15729
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15730
+ /* @__PURE__ */ jsxRuntime.jsx(
15731
+ reactComponents.SkeletonItem,
15732
+ {
15733
+ style: {
15734
+ width: "100%",
15735
+ height: "20px",
15736
+ marginBottom: "8px"
15737
+ }
15738
+ }
15739
+ ),
15740
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "80%", height: "20px" } })
15741
+ ] }) }),
15742
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15743
+ /* @__PURE__ */ jsxRuntime.jsx(
15744
+ reactComponents.SkeletonItem,
15745
+ {
15746
+ style: {
15747
+ width: "100%",
15748
+ height: "20px",
15749
+ marginBottom: "8px"
15750
+ }
15751
+ }
15752
+ ),
15753
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "80%", height: "20px" } })
15754
+ ] }) })
15626
15755
  ] }) }),
15627
15756
  /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: styles.fieldRow, children: [
15628
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.passengerTypeLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: passengerType }) }) }),
15629
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: mergedLabels.addOnLabel, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.addOnRow, children: [
15630
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: addOnsCount === 0 ? mergedLabels.noAddOnsLabel : `${addOnsCount} ${addOnsCount === 1 ? mergedLabels.serviceLabel : mergedLabels.serviceLabel}` }),
15631
- addOnsCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
15632
- reactComponents.Button,
15757
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15758
+ /* @__PURE__ */ jsxRuntime.jsx(
15759
+ reactComponents.SkeletonItem,
15633
15760
  {
15634
- appearance: "transparent",
15635
- onClick: onViewAddOns,
15636
- style: { color: brandColors[80] },
15637
- children: mergedLabels.viewDetail
15761
+ style: {
15762
+ width: "100%",
15763
+ height: "20px",
15764
+ marginBottom: "8px"
15765
+ }
15638
15766
  }
15639
- )
15640
- ] }) }) })
15767
+ ),
15768
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "80%", height: "20px" } })
15769
+ ] }) }),
15770
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, md: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
15771
+ /* @__PURE__ */ jsxRuntime.jsx(
15772
+ reactComponents.SkeletonItem,
15773
+ {
15774
+ style: {
15775
+ width: "100%",
15776
+ height: "20px",
15777
+ marginBottom: "8px"
15778
+ }
15779
+ }
15780
+ ),
15781
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "80%", height: "20px" } })
15782
+ ] }) })
15641
15783
  ] }) })
15642
15784
  ]
15643
15785
  }
15644
- ) });
15786
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15787
+ /* @__PURE__ */ jsxRuntime.jsxs(
15788
+ reactGridSystem.Row,
15789
+ {
15790
+ nogutter: true,
15791
+ direction: "column",
15792
+ style: { gap: reactComponents.tokens.spacingHorizontalL },
15793
+ children: [
15794
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.titleRow, children: [
15795
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: mergedLabels.title }),
15796
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { style: { width: 0 } })
15797
+ ] }) }),
15798
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
15799
+ TripSection,
15800
+ {
15801
+ data: departureData,
15802
+ label: isRoundTrip ? mergedLabels.departureLabel : void 0,
15803
+ badgeClassName: isRoundTrip ? styles.badgeLilac : void 0,
15804
+ mergedLabels,
15805
+ onViewAddOns
15806
+ }
15807
+ ) })
15808
+ ]
15809
+ }
15810
+ ),
15811
+ isRoundTrip && returnData && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15812
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { style: { margin: `${reactComponents.tokens.spacingHorizontalL} 0` } }),
15813
+ /* @__PURE__ */ jsxRuntime.jsx(
15814
+ reactGridSystem.Row,
15815
+ {
15816
+ nogutter: true,
15817
+ direction: "column",
15818
+ style: { gap: reactComponents.tokens.spacingHorizontalL },
15819
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
15820
+ TripSection,
15821
+ {
15822
+ data: returnData,
15823
+ label: mergedLabels.returnLabel,
15824
+ badgeClassName: styles.badgeOrange,
15825
+ mergedLabels,
15826
+ onViewAddOns
15827
+ }
15828
+ ) })
15829
+ }
15830
+ )
15831
+ ] })
15832
+ ] }) });
15645
15833
  };
15646
15834
 
15647
15835
  // src/components/CardPriceDetails/CardPriceDetails.constants.ts