@asdp/ferryui 0.1.20 → 0.1.22-dev.8463

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,14 +1,15 @@
1
- import { makeStyles, tokens, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, createLightTheme, createDarkTheme, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, mergeClasses, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
1
+ import { makeStyles, tokens, shorthands, createLightTheme, createDarkTheme, Popover, PopoverTrigger, Input, PopoverSurface, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, mergeClasses, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, Menu, MenuTrigger, MenuPopover, MenuList, DialogActions, Caption2Strong, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React5, { forwardRef, useState, useCallback, useRef, useEffect, useMemo } from 'react';
4
4
  import { Row, Col, Visible } from 'react-grid-system';
5
+ import { Icon } from '@iconify/react';
5
6
  import { Icon as Icon$1 } from '@iconify/react/dist/iconify.js';
6
7
  import { Controller, useForm, useWatch } from 'react-hook-form';
7
- import { Icon } from '@iconify/react';
8
8
  import PhoneInputComponent from 'react-phone-input-2';
9
9
  import Select from 'react-select';
10
10
  import { Calendar } from '@fluentui/react-calendar-compat';
11
11
  import moment from 'moment';
12
+ import { Range } from 'react-range';
12
13
 
13
14
  var useStyles = makeStyles({
14
15
  dialogSurface: {
@@ -470,19 +471,155 @@ var CardBanner = ({
470
471
  }
471
472
  );
472
473
  };
473
- var useStyles5 = makeStyles({
474
- ticketWrapper: {
475
- borderRadius: tokens.borderRadiusXLarge,
476
- overflow: "visible",
477
- boxShadow: tokens.shadow4,
478
- display: "flex",
479
- width: "100%",
480
- marginBottom: "2rem",
481
- minHeight: "323px",
482
- padding: 0,
483
- "@media (max-width: 1200px)": {
484
- flexDirection: "column"
474
+ function useWindowSize() {
475
+ const [windowSize, setWindowSize] = useState({
476
+ width: 0,
477
+ height: 0
478
+ });
479
+ useEffect(() => {
480
+ function handleResize() {
481
+ setWindowSize({
482
+ width: window.innerWidth,
483
+ height: window.innerHeight
484
+ });
485
485
  }
486
+ window.addEventListener("resize", handleResize);
487
+ handleResize();
488
+ return () => window.removeEventListener("resize", handleResize);
489
+ }, []);
490
+ return windowSize;
491
+ }
492
+
493
+ // src/constants/generated/tokens.ts
494
+ var brandColors = {
495
+ "10": "#000000",
496
+ "20": "#03060e",
497
+ "30": "#060b1c",
498
+ "40": "#09112a",
499
+ "50": "#0c1738",
500
+ "60": "#122255",
501
+ "70": "#182e71",
502
+ "80": "#1e398d",
503
+ "90": "#4b60a4",
504
+ "100": "#7787bb",
505
+ "110": "#a4afd1",
506
+ "120": "#bac2dd",
507
+ "130": "#d0d6e8",
508
+ "140": "#e7e9f4",
509
+ "150": "#fdfdff",
510
+ "160": "#ffffff"
511
+ };
512
+
513
+ // src/constants/generated/tokensV2.ts
514
+ var brandColors2 = {
515
+ "10": "#001a1bff",
516
+ "20": "#02383bff",
517
+ "30": "#002426",
518
+ "40": "#004044",
519
+ "50": "#005D62",
520
+ "60": "#007A81",
521
+ "70": "#00969F",
522
+ "80": "#00B3BD",
523
+ "90": "#29BFC8",
524
+ "100": "#52CBD2",
525
+ "110": "#7AD7DD",
526
+ "120": "#A3E4E7",
527
+ "130": "#CCF0F2",
528
+ "140": "#E1F7F8",
529
+ "150": "#fdfdff",
530
+ "160": "#ffffff"
531
+ };
532
+ var fontWeight = {
533
+ "Medium": 500};
534
+ var sharedColors = {
535
+ "Shared_Cranberry_Primary": "#c50f1f",
536
+ "Shared_Red_Primary": "#d13438",
537
+ "Shared_Green_Primary": "#107c10"};
538
+ var lightModeColors2 = {
539
+ "Brand_Stroke_1_Rest": "#00B3BD"};
540
+ var tokensV2_default = {
541
+ lightModeColors: lightModeColors2};
542
+
543
+ // src/constants/brandColors.ts
544
+ var isV2Path = typeof window !== "undefined" && window.location.pathname.startsWith("/v2");
545
+ var brandColors3 = !isV2Path ? brandColors2 : brandColors;
546
+ var customBrand = {
547
+ 10: brandColors3["10"],
548
+ 20: brandColors3["20"],
549
+ 30: brandColors3["30"],
550
+ 40: brandColors3["40"],
551
+ 50: brandColors3["50"],
552
+ 60: brandColors3["60"],
553
+ 70: brandColors3["70"],
554
+ 80: brandColors3["80"],
555
+ 90: brandColors3["90"],
556
+ 100: brandColors3["100"],
557
+ 110: brandColors3["110"],
558
+ 120: brandColors3["120"],
559
+ 130: brandColors3["130"],
560
+ 140: brandColors3["140"],
561
+ 150: brandColors3["150"],
562
+ 160: brandColors3["160"]
563
+ };
564
+
565
+ // src/constants/designTokens.ts
566
+ typeof window !== "undefined" && window.location.pathname.startsWith("/v2");
567
+ var designTokens = {
568
+ // Breakpoints for responsive design
569
+ breakpoints: {
570
+ xs: "320px",
571
+ sm: "480px",
572
+ md: "768px",
573
+ lg: "1024px",
574
+ xl: "1200px",
575
+ xxl: "1440px",
576
+ xxxl: "1600px"
577
+ }};
578
+
579
+ // src/constants/themes.ts
580
+ var extendedTokens = {
581
+ breakpointXs: designTokens.breakpoints.xs,
582
+ breakpointSm: designTokens.breakpoints.sm,
583
+ breakpointMd: designTokens.breakpoints.md,
584
+ breakpointLg: designTokens.breakpoints.lg,
585
+ breakpointXl: designTokens.breakpoints.xl,
586
+ breakpointXxl: designTokens.breakpoints.xxl,
587
+ breakpointXxxl: designTokens.breakpoints.xxxl
588
+ };
589
+ ({
590
+ ...createLightTheme(customBrand),
591
+ // Brand colors from Figma
592
+ colorBrandBackground: customBrand[80],
593
+ colorBrandBackgroundHover: customBrand[70],
594
+ colorBrandBackgroundPressed: customBrand[60],
595
+ colorBrandBackgroundSelected: customBrand[80],
596
+ colorBrandForeground1: customBrand[80],
597
+ colorBrandForeground2: customBrand[70],
598
+ colorBrandForegroundLink: customBrand[70],
599
+ colorBrandForegroundLinkHover: customBrand[60],
600
+ colorBrandForegroundLinkPressed: customBrand[50],
601
+ colorBrandForegroundLinkSelected: customBrand[70]});
602
+ ({
603
+ ...createDarkTheme(customBrand),
604
+ // Brand colors from Figma (inverted for dark mode)
605
+ colorBrandBackground: customBrand[100],
606
+ colorBrandBackgroundHover: customBrand[110],
607
+ colorBrandBackgroundPressed: customBrand[120],
608
+ colorBrandBackgroundSelected: customBrand[100],
609
+ colorBrandForeground1: customBrand[100],
610
+ colorBrandForeground2: customBrand[110],
611
+ colorBrandForegroundLink: customBrand[110],
612
+ colorBrandForegroundLinkHover: customBrand[120],
613
+ colorBrandForegroundLinkPressed: customBrand[130],
614
+ colorBrandForegroundLinkSelected: customBrand[110]});
615
+ var useStyle = makeStyles({
616
+ dividerContainer: {
617
+ position: "relative",
618
+ display: "flex",
619
+ flexDirection: "column",
620
+ alignItems: "center",
621
+ justifyItems: "center",
622
+ width: "100%"
486
623
  },
487
624
  ticketLeftCard: {
488
625
  display: "flex",
@@ -494,24 +631,20 @@ var useStyles5 = makeStyles({
494
631
  boxShadow: "none",
495
632
  position: "relative",
496
633
  overflow: "visible",
497
- flexDirection: "column",
498
- "@media (min-width: 1200px)": {
499
- borderRight: `0.7em dashed ${tokens.colorNeutralBackground1Hover}`,
634
+ [`@media (min-width: ${extendedTokens.breakpointXl})`]: {
635
+ borderRight: "0.7em dashed " + tokens.colorNeutralBackground1Hover,
500
636
  borderEndEndRadius: 0,
501
637
  borderEndStartRadius: 0,
502
638
  borderTopLeftRadius: tokens.borderRadiusXLarge,
503
639
  borderBottomLeftRadius: tokens.borderRadiusXLarge
504
640
  },
505
- "@media (max-width: 1200px)": {
506
- borderBottom: `0.5em dashed ${tokens.colorNeutralBackground1Hover}`,
641
+ [`@media (max-width: ${extendedTokens.breakpointXl})`]: {
642
+ borderBottom: "0.5em dashed " + tokens.colorNeutralBackground1Hover,
507
643
  borderTopLeftRadius: tokens.borderRadiusXLarge,
508
644
  borderTopRightRadius: tokens.borderRadiusXLarge,
509
645
  borderEndEndRadius: 0,
510
646
  borderEndStartRadius: 0,
511
- gap: "1rem",
512
- flexDirection: "row",
513
- justifyContent: "space-around",
514
- padding: "2rem"
647
+ gap: "1rem"
515
648
  }
516
649
  },
517
650
  circularLeft: {
@@ -523,28 +656,6 @@ var useStyles5 = makeStyles({
523
656
  left: "-50px",
524
657
  boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)"
525
658
  },
526
- circularLeftMd: {
527
- position: "absolute",
528
- width: "50px",
529
- height: "30px",
530
- borderRadius: "50%",
531
- backgroundColor: tokens.colorNeutralBackground1Hover,
532
- left: "-25px",
533
- bottom: "-18px",
534
- zIndex: 2,
535
- boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)"
536
- },
537
- circularRightMd: {
538
- position: "absolute",
539
- width: "50px",
540
- height: "30px",
541
- borderRadius: "50%",
542
- backgroundColor: tokens.colorNeutralBackground1Hover,
543
- right: "-25px",
544
- bottom: "-18px",
545
- zIndex: 2,
546
- boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)"
547
- },
548
659
  ticketMiddleCard: {
549
660
  width: "100%",
550
661
  height: "100%",
@@ -554,7 +665,11 @@ var useStyles5 = makeStyles({
554
665
  display: "flex",
555
666
  flexDirection: "column",
556
667
  justifyContent: "space-between",
557
- "@media (max-width: 768px)": {
668
+ borderBottom: "none",
669
+ [`@media (max-width: ${extendedTokens.breakpointLg})`]: {
670
+ padding: "2rem"
671
+ },
672
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
558
673
  padding: "1rem"
559
674
  }
560
675
  },
@@ -577,21 +692,10 @@ var useStyles5 = makeStyles({
577
692
  justifyContent: "center",
578
693
  gap: "0.5rem"
579
694
  },
580
- dividerContainer: {
581
- position: "relative",
582
- display: "flex",
583
- flexDirection: "column",
584
- alignItems: "center",
585
- justifyItems: "center",
586
- width: "100%"
587
- },
588
695
  ticketButtons: {
589
696
  display: "flex",
590
697
  gap: "1rem",
591
- marginTop: "1rem",
592
- "@media (max-width: 768px)": {
593
- flexDirection: "column"
594
- }
698
+ marginTop: "1rem"
595
699
  },
596
700
  ticketRightCard: {
597
701
  width: "100%",
@@ -610,18 +714,20 @@ var useStyles5 = makeStyles({
610
714
  flexDirection: "column",
611
715
  justifyContent: "space-between",
612
716
  color: tokens.colorNeutralForegroundInverted,
613
- "@media (max-width: 1200px)": {
717
+ borderBottom: "none",
718
+ [`@media (max-width: ${extendedTokens.breakpointXl})`]: {
614
719
  padding: "2rem",
615
720
  borderTopRightRadius: 0,
616
- borderBottomLeftRadius: tokens.borderRadiusXLarge,
617
- borderBottomRightRadius: tokens.borderRadiusXLarge
721
+ borderBottomLeftRadius: tokens.borderRadiusXLarge
618
722
  },
619
- "@media (max-width: 768px)": {
620
- padding: "1rem"
723
+ [`@media (max-width: ${extendedTokens.breakpointLg})`]: {
724
+ padding: "1rem",
725
+ borderTopRightRadius: 0,
726
+ borderBottomLeftRadius: tokens.borderRadiusXLarge
621
727
  }
622
728
  },
623
729
  priceCard: {
624
- border: "1px solid #FFF",
730
+ border: " 1px solid #FFF",
625
731
  background: "rgba(255, 255, 255, 0.30)",
626
732
  backdropFilter: "blur(17.5px)",
627
733
  borderRadius: tokens.borderRadiusLarge,
@@ -631,7 +737,7 @@ var useStyles5 = makeStyles({
631
737
  justifyContent: "space-between",
632
738
  alignItems: "center",
633
739
  flexWrap: "wrap",
634
- "@media (max-width: 768px)": {
740
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
635
741
  padding: "1rem"
636
742
  }
637
743
  },
@@ -660,177 +766,359 @@ var useStyles5 = makeStyles({
660
766
  right: "-50px",
661
767
  boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)"
662
768
  },
769
+ ticketWrapper: {
770
+ borderRadius: tokens.borderRadiusXLarge,
771
+ overflow: "visible",
772
+ boxShadow: tokens.shadow4,
773
+ display: "flex",
774
+ boxSizing: "content-box",
775
+ width: "100%",
776
+ marginBottom: "2rem",
777
+ minHeight: "323px",
778
+ justifyContent: "center",
779
+ padding: 0,
780
+ transformOrigin: "center",
781
+ marginLeft: `0px !important`,
782
+ marginRight: `0px !important`
783
+ },
784
+ circularLeftMd: {
785
+ position: "absolute",
786
+ width: "50px",
787
+ height: "30px",
788
+ borderRadius: "50%",
789
+ backgroundColor: tokens.colorNeutralBackground1Hover,
790
+ left: "-25px",
791
+ bottom: "-18px",
792
+ zIndex: 2,
793
+ boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)"
794
+ },
795
+ circularRightMd: {
796
+ position: "absolute",
797
+ width: "50px",
798
+ height: "30px",
799
+ borderRadius: "50%",
800
+ backgroundColor: tokens.colorNeutralBackground1Hover,
801
+ right: "-25px",
802
+ bottom: "-18px",
803
+ zIndex: 2,
804
+ boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)"
805
+ },
663
806
  asdpLogo: {
664
807
  width: "clamp(50px, 20vw, 150px)"
665
808
  }
666
809
  });
667
810
  var CardTicket = ({
668
- shipType,
669
- logoSrc = "/assets/logo/asdp-default.svg",
811
+ id,
670
812
  shipName,
813
+ shipType,
814
+ shipTypeColor = "success",
815
+ tooltipCaption = "",
671
816
  availableSeats,
672
- departure,
673
- arrival,
817
+ departureDay,
818
+ departureTime,
819
+ departureLocation,
820
+ arrivalDay,
821
+ arrivalTime,
822
+ arrivalLocation,
674
823
  duration,
675
- actionButtons = [],
676
- price,
677
- primaryButton,
678
824
  facilities,
679
- shipIcon,
680
- facilityIcon
825
+ totalPrice,
826
+ buttonText = "Pilih Tiket",
827
+ onPriceDetailClick,
828
+ onPolicyClick,
829
+ onSelectTicket
681
830
  }) => {
682
- const styles = useStyles5();
683
- const threshold = availableSeats.threshold ?? 50;
684
- const isLowSeats = availableSeats.count <= threshold;
685
- return /* @__PURE__ */ jsxs("div", { className: styles.ticketWrapper, children: [
686
- /* @__PURE__ */ jsxs(Card, { className: styles.ticketLeftCard, children: [
687
- /* @__PURE__ */ jsx(
688
- Tooltip,
689
- {
690
- content: shipType.tooltip || shipType.label,
691
- relationship: "label",
692
- appearance: "inverted",
693
- children: /* @__PURE__ */ jsx(
694
- Badge,
831
+ const styles = useStyle();
832
+ const { width } = useWindowSize();
833
+ const getCircularVerticalConfig = () => {
834
+ if (width <= 1600) return { count: 6, spacing: 60, top: 10 };
835
+ return { count: 5, spacing: 60, top: 18 };
836
+ };
837
+ const circularVerticalConfig = getCircularVerticalConfig();
838
+ return /* @__PURE__ */ jsxs(Row, { className: styles.ticketWrapper, children: [
839
+ /* @__PURE__ */ jsx(
840
+ Col,
841
+ {
842
+ xs: 12,
843
+ sm: 12,
844
+ md: 12,
845
+ lg: 12,
846
+ xl: 3,
847
+ xxl: 3,
848
+ xxxl: 3,
849
+ style: { padding: 0, margin: 0 },
850
+ children: /* @__PURE__ */ jsxs(Card, { className: styles.ticketLeftCard, children: [
851
+ /* @__PURE__ */ jsxs(Row, { style: { height: "100%" }, children: [
852
+ /* @__PURE__ */ jsx(
853
+ Col,
854
+ {
855
+ xs: 5,
856
+ sm: 5,
857
+ md: 5,
858
+ lg: 5,
859
+ xl: 12,
860
+ xxl: 12,
861
+ xxxl: 12,
862
+ style: {
863
+ display: "flex",
864
+ justifyContent: "center",
865
+ alignItems: "center"
866
+ },
867
+ children: /* @__PURE__ */ jsx(
868
+ Tooltip,
869
+ {
870
+ content: tooltipCaption,
871
+ relationship: "label",
872
+ appearance: "inverted",
873
+ children: /* @__PURE__ */ jsx(
874
+ Badge,
875
+ {
876
+ size: "large",
877
+ appearance: "filled",
878
+ color: shipTypeColor,
879
+ iconPosition: "before",
880
+ shape: "rounded",
881
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:info-24-regular" }),
882
+ children: shipType
883
+ }
884
+ )
885
+ }
886
+ )
887
+ }
888
+ ),
889
+ /* @__PURE__ */ jsx(
890
+ Col,
891
+ {
892
+ xs: 2,
893
+ sm: 2,
894
+ md: 2,
895
+ lg: 2,
896
+ xl: 12,
897
+ xxl: 12,
898
+ xxxl: 12,
899
+ style: {
900
+ display: "flex",
901
+ justifyContent: "center",
902
+ alignItems: "center"
903
+ },
904
+ children: /* @__PURE__ */ jsx(
905
+ "img",
906
+ {
907
+ src: "/assets/logo/asdp-default.svg",
908
+ className: styles.asdpLogo,
909
+ alt: "asdp",
910
+ height: 56,
911
+ width: 82
912
+ }
913
+ )
914
+ }
915
+ ),
916
+ /* @__PURE__ */ jsx(Visible, { md: true, sm: true, xs: true, lg: true, children: /* @__PURE__ */ jsx(
917
+ Col,
918
+ {
919
+ xs: 5,
920
+ sm: 5,
921
+ md: 5,
922
+ lg: 5,
923
+ xl: 12,
924
+ xxl: 12,
925
+ xxxl: 12,
926
+ style: {
927
+ display: "flex",
928
+ justifyContent: "center",
929
+ alignItems: "center"
930
+ },
931
+ children: /* @__PURE__ */ jsxs(
932
+ Badge,
933
+ {
934
+ size: "large",
935
+ style: {
936
+ color: availableSeats > 50 ? sharedColors.Shared_Green_Primary : sharedColors.Shared_Red_Primary
937
+ },
938
+ appearance: "tint",
939
+ color: availableSeats > 50 ? "success" : "danger",
940
+ iconPosition: "after",
941
+ shape: "rounded",
942
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:ticket-diagonal-24-regular" }),
943
+ children: [
944
+ "Tersedia ",
945
+ availableSeats
946
+ ]
947
+ }
948
+ )
949
+ }
950
+ ) }),
951
+ /* @__PURE__ */ jsx(
952
+ Col,
953
+ {
954
+ style: { textAlign: "center" },
955
+ xs: 12,
956
+ sm: 12,
957
+ md: 12,
958
+ lg: 12,
959
+ xl: 12,
960
+ xxl: 12,
961
+ xxxl: 12,
962
+ children: /* @__PURE__ */ jsx(Subtitle2, { children: shipName })
963
+ }
964
+ )
965
+ ] }),
966
+ /* @__PURE__ */ jsxs(Visible, { md: true, sm: true, xs: true, lg: true, children: [
967
+ /* @__PURE__ */ jsx("div", { className: styles.circularLeftMd }),
968
+ /* @__PURE__ */ jsx("div", { className: styles.circularRightMd })
969
+ ] }),
970
+ /* @__PURE__ */ jsx(Visible, { xl: true, xxl: true, xxxl: true, children: Array.from({ length: circularVerticalConfig.count }).map((_, index) => /* @__PURE__ */ jsx(
971
+ "div",
695
972
  {
696
- size: "large",
697
- appearance: "filled",
698
- color: shipType.color,
699
- iconPosition: "before",
973
+ className: styles.circularLeft,
974
+ style: {
975
+ top: `${circularVerticalConfig.top + index * circularVerticalConfig.spacing}px`
976
+ }
977
+ },
978
+ index
979
+ )) })
980
+ ] })
981
+ }
982
+ ),
983
+ /* @__PURE__ */ jsx(
984
+ Col,
985
+ {
986
+ xs: 12,
987
+ sm: 12,
988
+ md: 12,
989
+ lg: 12,
990
+ xl: 4.5,
991
+ xxl: 4.5,
992
+ xxxl: 4.5,
993
+ style: { padding: 0, margin: 0 },
994
+ children: /* @__PURE__ */ jsxs(Card, { className: styles.ticketMiddleCard, children: [
995
+ /* @__PURE__ */ jsx(Visible, { lg: true, xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsxs(
996
+ Badge,
997
+ {
998
+ size: "extra-large",
999
+ style: {
1000
+ color: availableSeats > 50 ? sharedColors.Shared_Green_Primary : sharedColors.Shared_Red_Primary
1001
+ },
1002
+ appearance: "tint",
1003
+ color: availableSeats > 50 ? "success" : "danger",
1004
+ iconPosition: "after",
700
1005
  shape: "rounded",
701
- children: shipType.label
1006
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:ticket-diagonal-24-regular" }),
1007
+ children: [
1008
+ "Tersedia ",
1009
+ availableSeats
1010
+ ]
702
1011
  }
703
- )
704
- }
705
- ),
706
- /* @__PURE__ */ jsx(
707
- "img",
708
- {
709
- src: logoSrc,
710
- className: styles.asdpLogo,
711
- alt: "Logo"
712
- }
713
- ),
714
- /* @__PURE__ */ jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ jsxs(
715
- Badge,
716
- {
717
- size: "large",
718
- appearance: "tint",
719
- color: isLowSeats ? "danger" : "success",
720
- iconPosition: "after",
721
- shape: "rounded",
722
- children: [
723
- "Tersedia ",
724
- availableSeats.count
725
- ]
726
- }
727
- ) }),
728
- /* @__PURE__ */ jsx(Subtitle2, { children: shipName }),
729
- /* @__PURE__ */ jsx("div", { style: { display: "none" }, children: Array.from({ length: 5 }).map((_, index) => /* @__PURE__ */ jsx(
730
- "div",
731
- {
732
- className: styles.circularLeft,
733
- style: {
734
- top: `${18 + index * 60}px`
735
- }
736
- },
737
- index
738
- )) }),
739
- /* @__PURE__ */ jsx("div", { className: styles.circularLeftMd }),
740
- /* @__PURE__ */ jsx("div", { className: styles.circularRightMd })
741
- ] }),
742
- /* @__PURE__ */ jsxs(Card, { className: styles.ticketMiddleCard, children: [
743
- /* @__PURE__ */ jsxs(
744
- Badge,
745
- {
746
- size: "extra-large",
747
- appearance: "tint",
748
- color: isLowSeats ? "danger" : "success",
749
- iconPosition: "after",
750
- shape: "rounded",
751
- children: [
752
- "Tersedia ",
753
- availableSeats.count
754
- ]
755
- }
756
- ),
757
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: styles.ticketInfo, children: [
758
- /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
759
- /* @__PURE__ */ jsx(Caption1, { children: departure.day }),
760
- /* @__PURE__ */ jsx(Title2, { children: departure.time }),
761
- /* @__PURE__ */ jsx(Caption1, { children: departure.location })
762
- ] }),
763
- /* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
764
- /* @__PURE__ */ jsxs(Caption2, { children: [
765
- "Estimasi ",
766
- duration
1012
+ ) }),
1013
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: styles.ticketInfo, children: [
1014
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
1015
+ /* @__PURE__ */ jsx(Caption1, { children: departureDay }),
1016
+ /* @__PURE__ */ jsx(Title2, { children: departureTime }),
1017
+ /* @__PURE__ */ jsx(Caption1, { children: departureLocation })
1018
+ ] }),
1019
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
1020
+ /* @__PURE__ */ jsxs(Caption2, { children: [
1021
+ "Estimasi ",
1022
+ duration
1023
+ ] }),
1024
+ /* @__PURE__ */ jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsx(Divider, { children: /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-24-regular", height: 24 }) }) })
1025
+ ] }),
1026
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
1027
+ /* @__PURE__ */ jsx(Caption1, { children: arrivalDay }),
1028
+ /* @__PURE__ */ jsx(Title2, { children: arrivalTime }),
1029
+ /* @__PURE__ */ jsx(Caption1, { children: arrivalLocation })
1030
+ ] })
1031
+ ] }) }),
1032
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketButtons, children: [
1033
+ /* @__PURE__ */ jsx(
1034
+ Button,
1035
+ {
1036
+ appearance: "outline",
1037
+ shape: "circular",
1038
+ style: {
1039
+ flex: 1,
1040
+ borderColor: tokens.colorBrandBackground,
1041
+ color: tokens.colorBrandBackground
1042
+ },
1043
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:money-24-regular" }),
1044
+ size: "medium",
1045
+ onClick: onPriceDetailClick,
1046
+ children: "Rincian Harga"
1047
+ }
1048
+ ),
1049
+ /* @__PURE__ */ jsx(
1050
+ Button,
1051
+ {
1052
+ appearance: "outline",
1053
+ shape: "circular",
1054
+ style: {
1055
+ flex: 1,
1056
+ borderColor: tokens.colorBrandBackground,
1057
+ color: tokens.colorBrandBackground
1058
+ },
1059
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:document-bullet-list-24-regular" }),
1060
+ size: "medium",
1061
+ onClick: onPolicyClick,
1062
+ children: "Kebijakan"
1063
+ }
1064
+ )
1065
+ ] })
1066
+ ] })
1067
+ }
1068
+ ),
1069
+ /* @__PURE__ */ jsx(
1070
+ Col,
1071
+ {
1072
+ xs: 12,
1073
+ sm: 12,
1074
+ md: 12,
1075
+ lg: 12,
1076
+ xl: 4.5,
1077
+ xxl: 4.5,
1078
+ xxxl: 4.5,
1079
+ style: { padding: 0, margin: 0 },
1080
+ children: /* @__PURE__ */ jsxs(Card, { className: styles.ticketRightCard, children: [
1081
+ /* @__PURE__ */ jsxs("div", { className: styles.priceCard, children: [
1082
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.25rem" }, children: [
1083
+ /* @__PURE__ */ jsx(Subtitle2, { children: "Total harga" }),
1084
+ /* @__PURE__ */ jsxs(Title3, { style: { display: "flex", flex: "column", justifyContent: "end" }, children: [
1085
+ "IDR\xA0",
1086
+ totalPrice.toLocaleString("id-ID")
1087
+ ] })
1088
+ ] }),
1089
+ /* @__PURE__ */ jsx(
1090
+ Button,
1091
+ {
1092
+ onClick: onSelectTicket,
1093
+ appearance: "primary",
1094
+ style: { backgroundColor: brandColors2["60"] },
1095
+ size: "medium",
1096
+ shape: "circular",
1097
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:ticket-diagonal-24-filled" }),
1098
+ children: buttonText
1099
+ }
1100
+ )
767
1101
  ] }),
768
- /* @__PURE__ */ jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsx(Divider, { children: shipIcon || /* @__PURE__ */ jsx("span", { children: "\u{1F6A2}" }) }) })
769
- ] }),
770
- /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
771
- /* @__PURE__ */ jsx(Caption1, { children: arrival.day }),
772
- /* @__PURE__ */ jsx(Title2, { children: arrival.time }),
773
- /* @__PURE__ */ jsx(Caption1, { children: arrival.location })
1102
+ /* @__PURE__ */ jsxs("div", { className: styles.facilitiesSection, children: [
1103
+ /* @__PURE__ */ jsx(Subtitle2, { children: "Fasilitas" }),
1104
+ /* @__PURE__ */ jsx("div", { className: styles.facilitiesList, children: facilities.map((facility, idx) => /* @__PURE__ */ jsxs("div", { className: styles.facilityItem, children: [
1105
+ /* @__PURE__ */ jsx(Icon, { icon: "fluent:checkmark-circle-24-filled" }),
1106
+ /* @__PURE__ */ jsx(Caption1Strong, { children: facility })
1107
+ ] }, idx)) })
1108
+ ] }),
1109
+ /* @__PURE__ */ jsx(Visible, { xl: true, xxl: true, xxxl: true, children: Array.from({ length: circularVerticalConfig.count }).map((_, index) => /* @__PURE__ */ jsx(
1110
+ "div",
1111
+ {
1112
+ className: styles.circularRight,
1113
+ style: {
1114
+ top: `${circularVerticalConfig.top + index * circularVerticalConfig.spacing}px`
1115
+ }
1116
+ },
1117
+ index
1118
+ )) })
774
1119
  ] })
775
- ] }) }),
776
- actionButtons.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.ticketButtons, children: actionButtons.slice(0, 2).map((button, idx) => /* @__PURE__ */ jsx(
777
- Button,
778
- {
779
- appearance: "outline",
780
- shape: "circular",
781
- style: {
782
- flex: 1,
783
- borderColor: tokens.colorBrandBackground,
784
- color: tokens.colorBrandBackground
785
- },
786
- icon: button.icon,
787
- size: "medium",
788
- onClick: button.onClick,
789
- children: button.label
790
- },
791
- idx
792
- )) })
793
- ] }),
794
- /* @__PURE__ */ jsxs(Card, { className: styles.ticketRightCard, children: [
795
- /* @__PURE__ */ jsxs("div", { className: styles.priceCard, children: [
796
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.25rem" }, children: [
797
- /* @__PURE__ */ jsx(Subtitle2, { children: "Total harga" }),
798
- /* @__PURE__ */ jsxs(Title3, { style: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [
799
- "IDR ",
800
- price
801
- ] })
802
- ] }),
803
- /* @__PURE__ */ jsx(
804
- Button,
805
- {
806
- onClick: primaryButton.onClick,
807
- appearance: "primary",
808
- size: "medium",
809
- shape: "circular",
810
- icon: primaryButton.icon,
811
- style: { backgroundColor: "#58C91B" },
812
- children: primaryButton.label
813
- }
814
- )
815
- ] }),
816
- /* @__PURE__ */ jsxs("div", { className: styles.facilitiesSection, children: [
817
- /* @__PURE__ */ jsx(Subtitle2, { children: "Fasilitas" }),
818
- /* @__PURE__ */ jsx("div", { className: styles.facilitiesList, children: facilities.map((facility, idx) => /* @__PURE__ */ jsxs("div", { className: styles.facilityItem, children: [
819
- facilityIcon || /* @__PURE__ */ jsx("span", { children: "\u2713" }),
820
- /* @__PURE__ */ jsx(Caption1Strong, { children: facility })
821
- ] }, idx)) })
822
- ] }),
823
- /* @__PURE__ */ jsx("div", { style: { display: "none" }, children: Array.from({ length: 5 }).map((_, index) => /* @__PURE__ */ jsx(
824
- "div",
825
- {
826
- className: styles.circularRight,
827
- style: {
828
- top: `${18 + index * 60}px`
829
- }
830
- },
831
- index
832
- )) })
833
- ] })
1120
+ }
1121
+ )
834
1122
  ] });
835
1123
  };
836
1124
  var BackgroundTicketCard = (props) => /* @__PURE__ */ jsxs(
@@ -1010,7 +1298,7 @@ var BackgroundTicketCardVertical = (props) => /* @__PURE__ */ jsxs(
1010
1298
  }
1011
1299
  );
1012
1300
  var BackgroundTicketCardVertical_default = BackgroundTicketCardVertical;
1013
- var useStyles6 = makeStyles({
1301
+ var useStyles5 = makeStyles({
1014
1302
  card: {
1015
1303
  width: "100%",
1016
1304
  boxSizing: "border-box",
@@ -1151,7 +1439,7 @@ var CardServiceMenu = ({
1151
1439
  showDescriptions = true,
1152
1440
  className
1153
1441
  }) => {
1154
- const styles = useStyles6();
1442
+ const styles = useStyles5();
1155
1443
  const getMenuItemClass = (serviceId) => {
1156
1444
  const isActive = activeServiceId === serviceId;
1157
1445
  return mergeClasses(
@@ -1191,34 +1479,6 @@ var CardServiceMenu = ({
1191
1479
  ] }, item.id);
1192
1480
  }) }) });
1193
1481
  };
1194
-
1195
- // src/constants/generated/tokensV2.ts
1196
- var brandColors = {
1197
- "10": "#001a1bff",
1198
- "20": "#02383bff",
1199
- "30": "#002426",
1200
- "40": "#004044",
1201
- "50": "#005D62",
1202
- "60": "#007A81",
1203
- "70": "#00969F",
1204
- "80": "#00B3BD",
1205
- "90": "#29BFC8",
1206
- "100": "#52CBD2",
1207
- "110": "#7AD7DD",
1208
- "120": "#A3E4E7",
1209
- "130": "#CCF0F2",
1210
- "140": "#E1F7F8",
1211
- "150": "#fdfdff",
1212
- "160": "#ffffff"
1213
- };
1214
- var fontWeight = {
1215
- "Medium": 500};
1216
- var sharedColors = {
1217
- "Shared_Cranberry_Primary": "#c50f1f"};
1218
- var lightModeColors = {
1219
- "Brand_Stroke_1_Rest": "#00B3BD"};
1220
- var tokensV2_default = {
1221
- lightModeColors};
1222
1482
  var DatePickerInput = forwardRef(
1223
1483
  ({
1224
1484
  field,
@@ -1311,7 +1571,7 @@ var DatePickerInput = forwardRef(
1311
1571
  DatePickerInput.displayName = "DatePickerInput";
1312
1572
  var DatePickerInput_default = DatePickerInput;
1313
1573
  var PhoneInput = PhoneInputComponent.default || PhoneInputComponent;
1314
- var useStyles7 = makeStyles({
1574
+ var useStyles6 = makeStyles({
1315
1575
  field: {
1316
1576
  display: "flex",
1317
1577
  flexDirection: "column",
@@ -1554,7 +1814,7 @@ var InputDynamic = ({
1554
1814
  contentAfter,
1555
1815
  onChange
1556
1816
  }) => {
1557
- const styles = useStyles7();
1817
+ const styles = useStyles6();
1558
1818
  const [showPassword, setShowPassword] = useState(false);
1559
1819
  const [isPhoneMode, setIsPhoneMode] = useState(false);
1560
1820
  const [emailOrPhoneType, setEmailOrPhoneType] = useState("none");
@@ -2662,90 +2922,7 @@ var DEFAULT_LABELS = {
2662
2922
  placeholderPassenger: "Select Number of Passengers"
2663
2923
  }
2664
2924
  };
2665
-
2666
- // src/constants/generated/tokens.ts
2667
- var brandColors2 = {
2668
- "10": "#000000",
2669
- "20": "#03060e",
2670
- "30": "#060b1c",
2671
- "40": "#09112a",
2672
- "50": "#0c1738",
2673
- "60": "#122255",
2674
- "70": "#182e71",
2675
- "80": "#1e398d",
2676
- "90": "#4b60a4",
2677
- "100": "#7787bb",
2678
- "110": "#a4afd1",
2679
- "120": "#bac2dd",
2680
- "130": "#d0d6e8",
2681
- "140": "#e7e9f4",
2682
- "150": "#fdfdff",
2683
- "160": "#ffffff"
2684
- };
2685
-
2686
- // src/constants/brandColors.ts
2687
- var isV2Path = typeof window !== "undefined" && window.location.pathname.startsWith("/v2");
2688
- var brandColors3 = !isV2Path ? brandColors : brandColors2;
2689
- var customBrand = {
2690
- 10: brandColors3["10"],
2691
- 20: brandColors3["20"],
2692
- 30: brandColors3["30"],
2693
- 40: brandColors3["40"],
2694
- 50: brandColors3["50"],
2695
- 60: brandColors3["60"],
2696
- 70: brandColors3["70"],
2697
- 80: brandColors3["80"],
2698
- 90: brandColors3["90"],
2699
- 100: brandColors3["100"],
2700
- 110: brandColors3["110"],
2701
- 120: brandColors3["120"],
2702
- 130: brandColors3["130"],
2703
- 140: brandColors3["140"],
2704
- 150: brandColors3["150"],
2705
- 160: brandColors3["160"]
2706
- };
2707
-
2708
- // src/constants/designTokens.ts
2709
- typeof window !== "undefined" && window.location.pathname.startsWith("/v2");
2710
- var designTokens = {
2711
- // Breakpoints for responsive design
2712
- breakpoints: {
2713
- md: "768px",
2714
- lg: "1024px",
2715
- xl: "1200px"}};
2716
-
2717
- // src/constants/themes.ts
2718
- var extendedTokens = {
2719
- breakpointMd: designTokens.breakpoints.md,
2720
- breakpointLg: designTokens.breakpoints.lg,
2721
- breakpointXl: designTokens.breakpoints.xl};
2722
- ({
2723
- ...createLightTheme(customBrand),
2724
- // Brand colors from Figma
2725
- colorBrandBackground: customBrand[80],
2726
- colorBrandBackgroundHover: customBrand[70],
2727
- colorBrandBackgroundPressed: customBrand[60],
2728
- colorBrandBackgroundSelected: customBrand[80],
2729
- colorBrandForeground1: customBrand[80],
2730
- colorBrandForeground2: customBrand[70],
2731
- colorBrandForegroundLink: customBrand[70],
2732
- colorBrandForegroundLinkHover: customBrand[60],
2733
- colorBrandForegroundLinkPressed: customBrand[50],
2734
- colorBrandForegroundLinkSelected: customBrand[70]});
2735
- ({
2736
- ...createDarkTheme(customBrand),
2737
- // Brand colors from Figma (inverted for dark mode)
2738
- colorBrandBackground: customBrand[100],
2739
- colorBrandBackgroundHover: customBrand[110],
2740
- colorBrandBackgroundPressed: customBrand[120],
2741
- colorBrandBackgroundSelected: customBrand[100],
2742
- colorBrandForeground1: customBrand[100],
2743
- colorBrandForeground2: customBrand[110],
2744
- colorBrandForegroundLink: customBrand[110],
2745
- colorBrandForegroundLinkHover: customBrand[120],
2746
- colorBrandForegroundLinkPressed: customBrand[130],
2747
- colorBrandForegroundLinkSelected: customBrand[110]});
2748
- var useStyles8 = makeStyles({
2925
+ var useStyles7 = makeStyles({
2749
2926
  card: {
2750
2927
  position: "relative",
2751
2928
  width: "100%",
@@ -2880,7 +3057,7 @@ var CardTicketSearch = ({
2880
3057
  showPassengerField = false,
2881
3058
  showRoundTrip = true
2882
3059
  }) => {
2883
- const styles = useStyles8();
3060
+ const styles = useStyles7();
2884
3061
  const labels = React5.useMemo(
2885
3062
  () => ({ ...DEFAULT_LABELS[language], ...customLabels }),
2886
3063
  [language, customLabels]
@@ -3265,32 +3442,429 @@ var CardTicketSearch = ({
3265
3442
  )
3266
3443
  ] });
3267
3444
  };
3268
- var useStyles9 = makeStyles({
3269
- dialogTitle: {
3270
- display: "flex",
3271
- justifyContent: "space-between",
3272
- alignItems: "center",
3273
- paddingRight: "8px"
3274
- },
3275
- dialogSurface: {
3276
- maxWidth: "600px",
3277
- width: "100%"
3445
+
3446
+ // src/components/CardTicketSearchSummary/CardTicketSearchSummary.constants.ts
3447
+ var DEFAULT_LABELS2 = {
3448
+ originHarbor: "Pelabuhan Keberangkatan",
3449
+ destinationHarbor: "Pelabuhan Tujuan",
3450
+ departureDate: "Tanggal Keberangkatan",
3451
+ serviceClass: "Kelas Layanan",
3452
+ typeOfService: "Jenis Layanan",
3453
+ totalPassengers: "Jumlah Penumpang",
3454
+ changeSearchButton: "Ganti Pencarian"
3455
+ };
3456
+ var useStyles8 = makeStyles({
3457
+ cardSearchTicket: {
3458
+ borderRadius: "32px",
3459
+ // borderBottomLeftRadius: '0',
3460
+ // borderBottomRightRadius: '0',
3461
+ padding: "3rem",
3462
+ paddingBottom: "8rem",
3463
+ position: "relative",
3464
+ overflow: "visible",
3465
+ // boxShadow: '0 0 2px rgba(0,0,0,0.12), 0 -8px 16px rgba(0,0,0,0.14)',
3466
+ // boxShadow: 'none',
3467
+ borderBottom: "none",
3468
+ [`@media (max-width: ${extendedTokens.breakpointLg})`]: {
3469
+ padding: "2rem",
3470
+ paddingBottom: "6rem"
3471
+ },
3472
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
3473
+ padding: "1rem",
3474
+ paddingBottom: "5rem"
3475
+ }
3278
3476
  },
3279
- closeButton: {
3280
- minWidth: "32px",
3281
- minHeight: "32px"
3477
+ paddingResponsive: {
3478
+ [`@media (max-width: ${extendedTokens.breakpointXxxl})`]: {
3479
+ padding: "5px"
3480
+ }
3282
3481
  },
3283
- content: {
3482
+ formField: {
3483
+ padding: "12px",
3284
3484
  display: "flex",
3285
3485
  flexDirection: "column",
3286
3486
  gap: "0px",
3287
- paddingTop: "10px",
3288
- paddingLeft: "10px",
3289
- paddingRight: "10px"
3290
- },
3291
- searchInput: {
3292
- width: "100%",
3293
- marginBottom: "16px"
3487
+ borderRadius: tokens.borderRadiusXLarge,
3488
+ border: "1px solid " + tokens.colorNeutralStroke1,
3489
+ height: "100%"
3490
+ },
3491
+ field: {
3492
+ display: "flex",
3493
+ flexDirection: "column",
3494
+ gap: tokens.spacingVerticalXS
3495
+ },
3496
+ buttonSwitch: {
3497
+ background: tokens.colorNeutralBackground1,
3498
+ boxShadow: `0 1px 2px 0 ${tokens.colorNeutralShadowKey}, 0 0 2px 0 ${tokens.colorNeutralShadowAmbient}`
3499
+ },
3500
+ buttonSearchContainer: {
3501
+ display: "flex",
3502
+ justifyContent: "center",
3503
+ alignItems: "center",
3504
+ height: "100%",
3505
+ width: "100%"
3506
+ },
3507
+ filterButtonContainer: {
3508
+ marginTop: "1rem",
3509
+ display: "flex",
3510
+ gap: "1rem"
3511
+ // flexWrap: 'wrap',
3512
+ },
3513
+ circular: {
3514
+ position: "absolute",
3515
+ width: "clamp(40px, 7vw, 90px)",
3516
+ height: "clamp(40px, 7vw, 90px)",
3517
+ borderRadius: "50% 50% 0 0",
3518
+ backgroundColor: tokens.colorNeutralBackground1Hover,
3519
+ bottom: "-10px",
3520
+ boxShadow: "inset 0 2px 0px rgba(0, 0, 0, 0.1)"
3521
+ }
3522
+ });
3523
+ var CardTicketSearchSummary = ({
3524
+ originHarbor,
3525
+ destinationHarbor,
3526
+ departureDate,
3527
+ serviceClass,
3528
+ typeOfService,
3529
+ totalPassengers,
3530
+ onChangeSearch,
3531
+ labels,
3532
+ showSwapButton = false,
3533
+ children
3534
+ }) => {
3535
+ const styles = useStyles8();
3536
+ const mergedLabels = { ...DEFAULT_LABELS2, ...labels };
3537
+ const { width } = useWindowSize();
3538
+ const getCircularConfig = () => {
3539
+ if (width <= parseInt(extendedTokens.breakpointXs))
3540
+ return { count: 4, spacing: 65, size: 30, height: 30 };
3541
+ if (width <= parseInt(extendedTokens.breakpointSm))
3542
+ return { count: 5, spacing: 71, size: 40, height: 40 };
3543
+ if (width <= parseInt(extendedTokens.breakpointMd))
3544
+ return { count: 8, spacing: 87, size: 50, height: 50 };
3545
+ if (width <= parseInt(extendedTokens.breakpointLg))
3546
+ return { count: 9, spacing: 100, size: 60, height: 60 };
3547
+ if (width <= parseInt(extendedTokens.breakpointXl))
3548
+ return { count: 8, spacing: 115, size: 70, height: 70 };
3549
+ if (width <= parseInt(extendedTokens.breakpointXxl))
3550
+ return { count: 8, spacing: 136, size: 90, height: 90 };
3551
+ if (width <= parseInt(extendedTokens.breakpointXxxl))
3552
+ return { count: 8, spacing: 136, size: 90, height: 90 };
3553
+ return { count: 11, spacing: 136, size: 100, height: 90 };
3554
+ };
3555
+ const circularConfig = getCircularConfig();
3556
+ return /* @__PURE__ */ jsxs(Card, { className: styles.cardSearchTicket, children: [
3557
+ /* @__PURE__ */ jsxs(Row, { children: [
3558
+ /* @__PURE__ */ jsx(
3559
+ Col,
3560
+ {
3561
+ xs: 12,
3562
+ sm: 12,
3563
+ md: 12,
3564
+ lg: 12,
3565
+ xl: 12,
3566
+ xxl: 5,
3567
+ xxxl: 5,
3568
+ className: styles.paddingResponsive,
3569
+ children: /* @__PURE__ */ jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxs(Row, { style: { padding: "12px" }, children: [
3570
+ /* @__PURE__ */ jsx(
3571
+ Col,
3572
+ {
3573
+ xs: 12,
3574
+ sm: 12,
3575
+ md: 12,
3576
+ lg: 12,
3577
+ xl: 12,
3578
+ xxl: 5,
3579
+ xxxl: 5,
3580
+ className: styles.paddingResponsive,
3581
+ children: /* @__PURE__ */ jsx(Field, { label: mergedLabels.originHarbor, className: styles.field, children: /* @__PURE__ */ jsx(
3582
+ Input,
3583
+ {
3584
+ name: "from",
3585
+ disabled: true,
3586
+ type: "text",
3587
+ contentBefore: /* @__PURE__ */ jsx(
3588
+ Icon,
3589
+ {
3590
+ icon: "fluent:vehicle-ship-16-filled",
3591
+ color: tokens.colorNeutralForegroundDisabled
3592
+ }
3593
+ ),
3594
+ value: originHarbor,
3595
+ appearance: "outline",
3596
+ size: "medium"
3597
+ }
3598
+ ) })
3599
+ }
3600
+ ),
3601
+ /* @__PURE__ */ jsx(
3602
+ Col,
3603
+ {
3604
+ xs: 12,
3605
+ sm: 12,
3606
+ md: 12,
3607
+ lg: 12,
3608
+ xl: 12,
3609
+ xxl: 1,
3610
+ xxxl: 1,
3611
+ className: styles.paddingResponsive,
3612
+ style: {
3613
+ display: "flex",
3614
+ alignItems: "center",
3615
+ justifyContent: "center"
3616
+ },
3617
+ children: /* @__PURE__ */ jsx(Visible, { lg: true, xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsx(
3618
+ Button,
3619
+ {
3620
+ className: styles.buttonSwitch,
3621
+ shape: "circular",
3622
+ disabled: true,
3623
+ appearance: "secondary",
3624
+ size: "medium",
3625
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:arrow-swap-24-filled" })
3626
+ }
3627
+ ) })
3628
+ }
3629
+ ),
3630
+ /* @__PURE__ */ jsx(
3631
+ Col,
3632
+ {
3633
+ xs: 12,
3634
+ sm: 12,
3635
+ md: 12,
3636
+ lg: 12,
3637
+ xl: 12,
3638
+ xxl: 6,
3639
+ xxxl: 6,
3640
+ className: styles.paddingResponsive,
3641
+ children: /* @__PURE__ */ jsx(Field, { label: mergedLabels.destinationHarbor, className: styles.field, children: /* @__PURE__ */ jsx(
3642
+ Input,
3643
+ {
3644
+ name: "to",
3645
+ type: "text",
3646
+ contentBefore: /* @__PURE__ */ jsx(
3647
+ Icon,
3648
+ {
3649
+ icon: "fluent:location-24-filled",
3650
+ color: tokens.colorNeutralForegroundDisabled
3651
+ }
3652
+ ),
3653
+ disabled: true,
3654
+ appearance: "outline",
3655
+ size: "medium",
3656
+ value: destinationHarbor
3657
+ }
3658
+ ) })
3659
+ }
3660
+ )
3661
+ ] }) })
3662
+ }
3663
+ ),
3664
+ /* @__PURE__ */ jsx(
3665
+ Col,
3666
+ {
3667
+ xs: 12,
3668
+ sm: 12,
3669
+ md: 12,
3670
+ lg: 12,
3671
+ xl: 12,
3672
+ xxl: 5,
3673
+ xxxl: 5,
3674
+ className: styles.paddingResponsive,
3675
+ children: /* @__PURE__ */ jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxs(Row, { style: { height: "100%", alignItems: "center" }, children: [
3676
+ /* @__PURE__ */ jsx(
3677
+ Col,
3678
+ {
3679
+ xs: 12,
3680
+ sm: 12,
3681
+ md: 6,
3682
+ lg: 6,
3683
+ xl: 6,
3684
+ xxl: 3,
3685
+ xxxl: 3,
3686
+ className: styles.paddingResponsive,
3687
+ children: /* @__PURE__ */ jsx(Field, { className: styles.field, children: /* @__PURE__ */ jsx(
3688
+ Input,
3689
+ {
3690
+ name: "startDate",
3691
+ type: "text",
3692
+ contentBefore: /* @__PURE__ */ jsx(
3693
+ Icon,
3694
+ {
3695
+ icon: "fluent:calendar-24-regular",
3696
+ color: tokens.colorNeutralForegroundDisabled
3697
+ }
3698
+ ),
3699
+ disabled: true,
3700
+ appearance: "outline",
3701
+ size: "medium",
3702
+ value: departureDate
3703
+ }
3704
+ ) })
3705
+ }
3706
+ ),
3707
+ /* @__PURE__ */ jsx(
3708
+ Col,
3709
+ {
3710
+ xs: 12,
3711
+ sm: 12,
3712
+ md: 6,
3713
+ lg: 6,
3714
+ xl: 6,
3715
+ xxl: 3,
3716
+ xxxl: 3,
3717
+ className: styles.paddingResponsive,
3718
+ children: /* @__PURE__ */ jsx(Label, { className: styles.field, children: /* @__PURE__ */ jsx(
3719
+ Input,
3720
+ {
3721
+ name: "serviceClass",
3722
+ type: "text",
3723
+ contentBefore: /* @__PURE__ */ jsx(
3724
+ Icon,
3725
+ {
3726
+ icon: "fluent:ribbon-star-24-regular",
3727
+ color: tokens.colorNeutralForegroundDisabled
3728
+ }
3729
+ ),
3730
+ disabled: true,
3731
+ appearance: "outline",
3732
+ size: "medium",
3733
+ value: serviceClass
3734
+ }
3735
+ ) })
3736
+ }
3737
+ ),
3738
+ /* @__PURE__ */ jsx(
3739
+ Col,
3740
+ {
3741
+ xs: 12,
3742
+ sm: 12,
3743
+ md: 6,
3744
+ lg: 6,
3745
+ xl: 6,
3746
+ xxl: 3,
3747
+ xxxl: 3,
3748
+ className: styles.paddingResponsive,
3749
+ children: /* @__PURE__ */ jsx(Field, { className: styles.field, children: /* @__PURE__ */ jsx(
3750
+ Input,
3751
+ {
3752
+ type: "text",
3753
+ contentBefore: /* @__PURE__ */ jsx(
3754
+ Icon,
3755
+ {
3756
+ icon: "fluent:vehicle-car-24-regular",
3757
+ color: tokens.colorNeutralForegroundDisabled
3758
+ }
3759
+ ),
3760
+ disabled: true,
3761
+ appearance: "outline",
3762
+ size: "medium",
3763
+ value: typeOfService
3764
+ }
3765
+ ) })
3766
+ }
3767
+ ),
3768
+ /* @__PURE__ */ jsx(
3769
+ Col,
3770
+ {
3771
+ xs: 12,
3772
+ sm: 12,
3773
+ md: 6,
3774
+ lg: 6,
3775
+ xl: 6,
3776
+ xxl: 3,
3777
+ xxxl: 3,
3778
+ className: styles.paddingResponsive,
3779
+ children: /* @__PURE__ */ jsx(Field, { className: styles.field, children: /* @__PURE__ */ jsx(
3780
+ Input,
3781
+ {
3782
+ name: "passenger",
3783
+ type: "text",
3784
+ contentBefore: /* @__PURE__ */ jsx(
3785
+ Icon,
3786
+ {
3787
+ icon: "fluent:people-24-regular",
3788
+ color: tokens.colorNeutralForegroundDisabled
3789
+ }
3790
+ ),
3791
+ disabled: true,
3792
+ appearance: "outline",
3793
+ size: "medium",
3794
+ value: totalPassengers
3795
+ }
3796
+ ) })
3797
+ }
3798
+ )
3799
+ ] }) })
3800
+ }
3801
+ ),
3802
+ /* @__PURE__ */ jsx(
3803
+ Col,
3804
+ {
3805
+ xs: 12,
3806
+ sm: 12,
3807
+ md: 12,
3808
+ lg: 12,
3809
+ xl: 12,
3810
+ xxl: 2,
3811
+ xxxl: 2,
3812
+ className: styles.paddingResponsive,
3813
+ children: /* @__PURE__ */ jsx("div", { className: styles.buttonSearchContainer, children: /* @__PURE__ */ jsx(
3814
+ Button,
3815
+ {
3816
+ type: "button",
3817
+ appearance: "primary",
3818
+ size: "medium",
3819
+ style: { width: "100%", borderRadius: tokens.borderRadiusCircular },
3820
+ iconPosition: "before",
3821
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:search-24-filled" }),
3822
+ onClick: onChangeSearch,
3823
+ children: mergedLabels.changeSearchButton
3824
+ }
3825
+ ) })
3826
+ }
3827
+ )
3828
+ ] }),
3829
+ children && /* @__PURE__ */ jsx("div", { className: styles.filterButtonContainer, children }),
3830
+ Array.from({ length: circularConfig.count }).map((_, index) => /* @__PURE__ */ jsx(
3831
+ "div",
3832
+ {
3833
+ className: styles.circular,
3834
+ style: {
3835
+ left: `${30 + index * circularConfig.spacing}px`
3836
+ }
3837
+ },
3838
+ index
3839
+ ))
3840
+ ] });
3841
+ };
3842
+ var useStyles9 = makeStyles({
3843
+ dialogTitle: {
3844
+ display: "flex",
3845
+ justifyContent: "space-between",
3846
+ alignItems: "center",
3847
+ paddingRight: "8px"
3848
+ },
3849
+ dialogSurface: {
3850
+ maxWidth: "600px",
3851
+ width: "100%"
3852
+ },
3853
+ closeButton: {
3854
+ minWidth: "32px",
3855
+ minHeight: "32px"
3856
+ },
3857
+ content: {
3858
+ display: "flex",
3859
+ flexDirection: "column",
3860
+ gap: "0px",
3861
+ paddingTop: "10px",
3862
+ paddingLeft: "10px",
3863
+ paddingRight: "10px"
3864
+ },
3865
+ searchInput: {
3866
+ width: "100%",
3867
+ marginBottom: "16px"
3294
3868
  },
3295
3869
  resultList: {
3296
3870
  display: "flex",
@@ -3637,7 +4211,8 @@ var ModalSelectDate = ({
3637
4211
  onTabChange,
3638
4212
  minDate = /* @__PURE__ */ new Date(),
3639
4213
  maxDate,
3640
- dateFormat = "DD MMMM YYYY"
4214
+ dateFormat = "DD MMMM YYYY",
4215
+ showRoundtrip = true
3641
4216
  }) => {
3642
4217
  const styles = useStyles10();
3643
4218
  const [selectedDate, setSelectedDate] = useState(selectedDepartureDate);
@@ -3816,7 +4391,7 @@ var ModalSelectDate = ({
3816
4391
  children: "Sekali Jalan"
3817
4392
  }
3818
4393
  ),
3819
- /* @__PURE__ */ jsx(
4394
+ showRoundtrip && /* @__PURE__ */ jsx(
3820
4395
  "button",
3821
4396
  {
3822
4397
  className: `${styles.tab} ${activeTab === "round-trip" ? styles.tabActive : ""}`,
@@ -4628,6 +5203,1224 @@ var DEFAULT_VEHICLE_ICONS = {
4628
5203
  looseLoad: "/assets/images/icons/loose-load.webp"
4629
5204
  };
4630
5205
 
4631
- export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardBanner, CardPromo, CardServiceMenu, CardTicket, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, CarouselWithCustomNav, DEFAULT_COUNTRY_CODES, DEFAULT_SERVICE_CLASSES, DEFAULT_VEHICLE_ICONS, InputDynamic_default as InputDynamic, MODAL_PRESETS, ModalIllustration, ModalSearchHarbor, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, getModalPreset };
5206
+ // src/components/SortMenu/SortMenu.constants.ts
5207
+ var DEFAULT_SORT_OPTIONS = [
5208
+ { value: "rekomendasi", label: "Rekomendasi" },
5209
+ { value: "harga-tertinggi", label: "Harga Tertinggi" },
5210
+ { value: "harga-terendah", label: "Harga Terendah" },
5211
+ { value: "keberangkatan-paling-awal", label: "Keberangkatan Paling Awal" },
5212
+ { value: "keberangkatan-paling-akhir", label: "Keberangkatan Paling Akhir" }
5213
+ ];
5214
+ var getSortLabel = (value) => {
5215
+ const option = DEFAULT_SORT_OPTIONS.find((opt) => opt.value === value);
5216
+ return option?.label || "Rekomendasi";
5217
+ };
5218
+ var useStyles14 = makeStyles({
5219
+ container: {
5220
+ display: "flex",
5221
+ width: "100%",
5222
+ gap: tokens.spacingHorizontalM,
5223
+ "@media (max-width: 768px)": {
5224
+ flexDirection: "column",
5225
+ gap: tokens.spacingVerticalS
5226
+ }
5227
+ },
5228
+ divider: {
5229
+ width: "100%",
5230
+ maxWidth: "min-content",
5231
+ "@media (max-width: 768px)": {
5232
+ display: "none"
5233
+ }
5234
+ },
5235
+ button: {
5236
+ borderRadius: tokens.borderRadiusCircular,
5237
+ color: tokens.colorBrandBackground,
5238
+ border: "1px solid " + tokens.colorBrandBackground
5239
+ }
5240
+ });
5241
+ var SortMenu = ({
5242
+ value,
5243
+ onChange,
5244
+ totalActiveFilters = 0,
5245
+ onFilterClick,
5246
+ onClearFilters,
5247
+ sortOptions = DEFAULT_SORT_OPTIONS,
5248
+ filterButtonText = "Filter",
5249
+ sortButtonText = "Urutkan Berdasarkan",
5250
+ clearFiltersText = "{count} Filter Dipilih"
5251
+ }) => {
5252
+ const styles = useStyles14();
5253
+ const handleReset = () => {
5254
+ onChange("rekomendasi");
5255
+ };
5256
+ return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
5257
+ onFilterClick && /* @__PURE__ */ jsx(
5258
+ Button,
5259
+ {
5260
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:filter-16-regular" }),
5261
+ size: "medium",
5262
+ type: "button",
5263
+ appearance: "outline",
5264
+ shape: "circular",
5265
+ className: styles.button,
5266
+ onClick: onFilterClick,
5267
+ children: filterButtonText
5268
+ }
5269
+ ),
5270
+ /* @__PURE__ */ jsxs(Menu, { children: [
5271
+ /* @__PURE__ */ jsx(MenuTrigger, { disableButtonEnhancement: true, children: /* @__PURE__ */ jsx(
5272
+ Button,
5273
+ {
5274
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:arrow-sort-16-regular" }),
5275
+ size: "medium",
5276
+ type: "button",
5277
+ shape: "circular",
5278
+ className: styles.button,
5279
+ children: sortButtonText
5280
+ }
5281
+ ) }),
5282
+ /* @__PURE__ */ jsx(MenuPopover, { children: /* @__PURE__ */ jsx(MenuList, { children: /* @__PURE__ */ jsx(RadioGroup, { value, onChange: (_, data) => onChange(data.value), children: sortOptions.map((option) => /* @__PURE__ */ jsx(Radio, { value: option.value, label: option.label }, option.value)) }) }) })
5283
+ ] }),
5284
+ /* @__PURE__ */ jsx(Divider, { vertical: true, className: styles.divider }),
5285
+ /* @__PURE__ */ jsx(
5286
+ Button,
5287
+ {
5288
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-32-regular" }),
5289
+ size: "medium",
5290
+ iconPosition: "after",
5291
+ onClick: handleReset,
5292
+ type: "button",
5293
+ shape: "circular",
5294
+ className: styles.button,
5295
+ children: getSortLabel(value)
5296
+ }
5297
+ ),
5298
+ totalActiveFilters > 0 && onClearFilters && /* @__PURE__ */ jsxs(Fragment, { children: [
5299
+ /* @__PURE__ */ jsx(Divider, { vertical: true, className: styles.divider }),
5300
+ /* @__PURE__ */ jsx(
5301
+ Button,
5302
+ {
5303
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-32-regular" }),
5304
+ size: "medium",
5305
+ iconPosition: "after",
5306
+ type: "button",
5307
+ onClick: onClearFilters,
5308
+ shape: "circular",
5309
+ className: styles.button,
5310
+ children: clearFiltersText.replace("{count}", totalActiveFilters.toString())
5311
+ }
5312
+ )
5313
+ ] })
5314
+ ] });
5315
+ };
5316
+
5317
+ // src/components/ModalFilterTicket/ModalFilterTicket.constants.ts
5318
+ var DEFAULT_LABELS3 = {
5319
+ title: "Filter dengan",
5320
+ serviceTypeLabel: "Jenis Layanan",
5321
+ departureTimeLabel: "Waktu pergi",
5322
+ arrivalTimeLabel: "Waktu tiba",
5323
+ priceLabel: "Harga",
5324
+ priceRangeText: (min, max) => {
5325
+ const formatPrice = (price) => new Intl.NumberFormat("id-ID").format(price);
5326
+ return `Mulai dari IDR ${formatPrice(min)} - ${formatPrice(max)}`;
5327
+ },
5328
+ durationLabel: "Durasi perjalanan",
5329
+ durationRangeText: (min, max) => `Perjalanan ${min} - ${max} jam`,
5330
+ resetButton: "Reset",
5331
+ applyButton: "Terapkan"
5332
+ };
5333
+ var DEFAULT_SERVICE_TYPES = [
5334
+ { value: "ropax-regular", label: "Ropax Regular" },
5335
+ { value: "ropax-express", label: "Ropax Express" },
5336
+ { value: "fast-ferry", label: "Fast Ferry" },
5337
+ { value: "bus-air", label: "Bus Air" },
5338
+ { value: "water-taxi", label: "Water Taxi" },
5339
+ { value: "pctc", label: "PCTC" },
5340
+ { value: "pcc", label: "PCC" }
5341
+ ];
5342
+ var DEFAULT_TIME_SLOTS = [
5343
+ { value: "00:00 - 06:00", label: "00:00 - 06:00" },
5344
+ { value: "06:00 - 12:00", label: "06:00 - 12:00" },
5345
+ { value: "12:00 - 18:00", label: "12:00 - 18:00" },
5346
+ { value: "18:00 - 24:00", label: "18:00 - 24:00" }
5347
+ ];
5348
+ var DEFAULT_PRICE_RANGE = {
5349
+ min: 2e5,
5350
+ max: 8e5
5351
+ };
5352
+ var DEFAULT_DURATION_RANGE = {
5353
+ min: 0,
5354
+ max: 8
5355
+ };
5356
+ var useStyles15 = makeStyles({
5357
+ dialogSurface: {
5358
+ maxWidth: "600px",
5359
+ width: "100%"
5360
+ },
5361
+ content: {
5362
+ display: "flex",
5363
+ flexDirection: "column",
5364
+ gap: tokens.spacingHorizontalXXL,
5365
+ paddingTop: tokens.spacingVerticalMNudge,
5366
+ paddingLeft: tokens.spacingHorizontalSNudge,
5367
+ paddingRight: tokens.spacingHorizontalSNudge,
5368
+ paddingBottom: tokens.spacingHorizontalXL,
5369
+ maxHeight: "70vh",
5370
+ overflowY: "auto"
5371
+ },
5372
+ closeButton: {
5373
+ minWidth: "32px",
5374
+ minHeight: "32px"
5375
+ },
5376
+ section: {
5377
+ display: "flex",
5378
+ flexDirection: "column",
5379
+ gap: "12px"
5380
+ },
5381
+ containerRange: {
5382
+ display: "flex",
5383
+ flexDirection: "column",
5384
+ gap: tokens.spacingVerticalM
5385
+ },
5386
+ spaceText: {
5387
+ display: "flex",
5388
+ flexDirection: "column",
5389
+ gap: tokens.spacingHorizontalXXS
5390
+ },
5391
+ sliderContainer: {
5392
+ display: "flex",
5393
+ flexDirection: "column",
5394
+ gap: tokens.spacingVerticalS,
5395
+ ...shorthands.padding(tokens.spacingHorizontalNone, tokens.spacingHorizontalSNudge)
5396
+ },
5397
+ sliderValues: {
5398
+ display: "flex",
5399
+ justifyContent: "space-between",
5400
+ fontSize: tokens.fontSizeBase200,
5401
+ color: tokens.colorNeutralForeground2,
5402
+ marginTop: tokens.spacingVerticalXS
5403
+ },
5404
+ footerButtons: {
5405
+ display: "flex",
5406
+ gap: tokens.spacingVerticalM,
5407
+ justifyContent: "flex-end",
5408
+ paddingTop: tokens.spacingVerticalL
5409
+ },
5410
+ checkboxWrapper: {
5411
+ "& label": {
5412
+ whiteSpace: "nowrap"
5413
+ }
5414
+ },
5415
+ buttonGrid: {
5416
+ display: "grid",
5417
+ gridTemplateColumns: "repeat(2, 1fr)",
5418
+ gap: "0.5rem"
5419
+ },
5420
+ outlinePrimary: {
5421
+ color: tokens.colorBrandBackground,
5422
+ ...shorthands.border("1px", "solid", tokens.colorBrandBackground),
5423
+ ":hover": {
5424
+ backgroundColor: tokens.colorBrandBackgroundHover,
5425
+ ...shorthands.borderColor(tokens.colorBrandBackgroundHover),
5426
+ color: tokens.colorNeutralForegroundOnBrand
5427
+ }
5428
+ },
5429
+ outlineDanger: {
5430
+ color: tokens.colorPaletteRedForeground1,
5431
+ ...shorthands.border("1px", "solid", tokens.colorPaletteRedForeground1),
5432
+ ":hover": {
5433
+ backgroundColor: tokens.colorPaletteRedBackground1,
5434
+ ...shorthands.borderColor(tokens.colorPaletteRedForeground1)
5435
+ }
5436
+ }
5437
+ });
5438
+ var ModalFilterTicket = ({
5439
+ open,
5440
+ onOpenChange,
5441
+ selectedServiceTypes,
5442
+ onServiceTypesChange,
5443
+ departureTime,
5444
+ onDepartureTimeChange,
5445
+ arrivalTime,
5446
+ onArrivalTimeChange,
5447
+ priceRange,
5448
+ onPriceRangeChange,
5449
+ durationRange,
5450
+ onDurationRangeChange,
5451
+ onReset,
5452
+ onApply,
5453
+ labels,
5454
+ serviceTypes = DEFAULT_SERVICE_TYPES,
5455
+ timeSlots = DEFAULT_TIME_SLOTS,
5456
+ minPrice = DEFAULT_PRICE_RANGE.min,
5457
+ maxPrice = DEFAULT_PRICE_RANGE.max,
5458
+ minDuration = DEFAULT_DURATION_RANGE.min,
5459
+ maxDuration = DEFAULT_DURATION_RANGE.max
5460
+ }) => {
5461
+ const styles = useStyles15();
5462
+ const mergedLabels = { ...DEFAULT_LABELS3, ...labels };
5463
+ const [rangeReady, setRangeReady] = useState(false);
5464
+ useEffect(() => {
5465
+ if (open) {
5466
+ const timer = setTimeout(() => {
5467
+ setRangeReady(true);
5468
+ }, 200);
5469
+ return () => {
5470
+ clearTimeout(timer);
5471
+ setRangeReady(false);
5472
+ };
5473
+ }
5474
+ }, [open]);
5475
+ const handleServiceTypeToggle = (value) => {
5476
+ if (selectedServiceTypes.includes(value)) {
5477
+ onServiceTypesChange(selectedServiceTypes.filter((s) => s !== value));
5478
+ } else {
5479
+ onServiceTypesChange([...selectedServiceTypes, value]);
5480
+ }
5481
+ };
5482
+ const handleDepartureTimeChange = (value, checked) => {
5483
+ if (checked) {
5484
+ onDepartureTimeChange([...departureTime, value]);
5485
+ } else {
5486
+ onDepartureTimeChange(departureTime.filter((t) => t !== value));
5487
+ }
5488
+ };
5489
+ const handleArrivalTimeChange = (value, checked) => {
5490
+ if (checked) {
5491
+ onArrivalTimeChange([...arrivalTime, value]);
5492
+ } else {
5493
+ onArrivalTimeChange(arrivalTime.filter((t) => t !== value));
5494
+ }
5495
+ };
5496
+ const formatPrice = (price) => {
5497
+ return new Intl.NumberFormat("id-ID").format(price);
5498
+ };
5499
+ const renderPriceTrack = useCallback(
5500
+ ({ props, children }) => {
5501
+ const [value1, value2] = priceRange;
5502
+ const percent1 = (value1 - minPrice) / (maxPrice - minPrice) * 100;
5503
+ const percent2 = (value2 - minPrice) / (maxPrice - minPrice) * 100;
5504
+ return /* @__PURE__ */ jsxs(
5505
+ "div",
5506
+ {
5507
+ ...props,
5508
+ ref: props.ref,
5509
+ style: {
5510
+ ...props.style,
5511
+ height: "4px",
5512
+ width: "100%",
5513
+ backgroundColor: tokens.colorNeutralStroke2,
5514
+ borderRadius: tokens.borderRadiusSmall,
5515
+ position: "relative"
5516
+ },
5517
+ children: [
5518
+ /* @__PURE__ */ jsx(
5519
+ "div",
5520
+ {
5521
+ style: {
5522
+ position: "absolute",
5523
+ height: "100%",
5524
+ left: `${percent1}%`,
5525
+ right: `${100 - percent2}%`,
5526
+ backgroundColor: tokens.colorBrandBackground,
5527
+ borderRadius: tokens.borderRadiusSmall
5528
+ }
5529
+ }
5530
+ ),
5531
+ children
5532
+ ]
5533
+ }
5534
+ );
5535
+ },
5536
+ [priceRange, minPrice, maxPrice]
5537
+ );
5538
+ const renderDurationTrack = useCallback(
5539
+ ({ props, children }) => {
5540
+ const [value1, value2] = durationRange;
5541
+ const percent1 = (value1 - minDuration) / (maxDuration - minDuration) * 100;
5542
+ const percent2 = (value2 - minDuration) / (maxDuration - minDuration) * 100;
5543
+ return /* @__PURE__ */ jsxs(
5544
+ "div",
5545
+ {
5546
+ ...props,
5547
+ ref: props.ref,
5548
+ style: {
5549
+ ...props.style,
5550
+ height: "4px",
5551
+ width: "100%",
5552
+ backgroundColor: tokens.colorNeutralStroke2,
5553
+ borderRadius: tokens.borderRadiusSmall,
5554
+ position: "relative"
5555
+ },
5556
+ children: [
5557
+ /* @__PURE__ */ jsx(
5558
+ "div",
5559
+ {
5560
+ style: {
5561
+ position: "absolute",
5562
+ height: "100%",
5563
+ left: `${percent1}%`,
5564
+ right: `${100 - percent2}%`,
5565
+ backgroundColor: tokens.colorBrandBackground,
5566
+ borderRadius: tokens.borderRadiusSmall
5567
+ }
5568
+ }
5569
+ ),
5570
+ children
5571
+ ]
5572
+ }
5573
+ );
5574
+ },
5575
+ [durationRange, minDuration, maxDuration]
5576
+ );
5577
+ const renderThumb = ({ props }) => /* @__PURE__ */ jsx(
5578
+ "div",
5579
+ {
5580
+ ...props,
5581
+ ref: props.ref,
5582
+ style: {
5583
+ ...props.style,
5584
+ height: "15px",
5585
+ width: "15px",
5586
+ borderRadius: "50%",
5587
+ backgroundColor: tokens.colorBrandBackground,
5588
+ display: "flex",
5589
+ justifyContent: "center",
5590
+ alignItems: "center",
5591
+ boxShadow: tokens.shadow4
5592
+ }
5593
+ }
5594
+ );
5595
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (_, data) => onOpenChange(data.open), children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
5596
+ /* @__PURE__ */ jsx(
5597
+ DialogTitle,
5598
+ {
5599
+ action: /* @__PURE__ */ jsx(
5600
+ Button,
5601
+ {
5602
+ appearance: "subtle",
5603
+ "aria-label": "close",
5604
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
5605
+ className: styles.closeButton,
5606
+ onClick: () => onOpenChange(false)
5607
+ }
5608
+ ),
5609
+ children: mergedLabels.title
5610
+ }
5611
+ ),
5612
+ /* @__PURE__ */ jsxs(DialogContent, { className: styles.content, children: [
5613
+ /* @__PURE__ */ jsx(Divider, {}),
5614
+ /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
5615
+ /* @__PURE__ */ jsx(Body1, { children: mergedLabels.serviceTypeLabel }),
5616
+ /* @__PURE__ */ jsx("div", { className: styles.buttonGrid, children: serviceTypes.map((service) => {
5617
+ const isSelected = selectedServiceTypes.includes(service.value);
5618
+ return /* @__PURE__ */ jsx(
5619
+ Button,
5620
+ {
5621
+ appearance: isSelected ? "primary" : "outline",
5622
+ className: isSelected ? "" : styles.outlinePrimary,
5623
+ size: "large",
5624
+ onClick: () => handleServiceTypeToggle(service.value),
5625
+ style: { width: "100%" },
5626
+ children: service.label
5627
+ },
5628
+ service.value
5629
+ );
5630
+ }) })
5631
+ ] }),
5632
+ /* @__PURE__ */ jsx(Divider, {}),
5633
+ /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
5634
+ /* @__PURE__ */ jsx(Body1, { children: mergedLabels.departureTimeLabel }),
5635
+ /* @__PURE__ */ jsx(Row, { children: timeSlots.map((slot) => /* @__PURE__ */ jsx(Col, { xs: 6, sm: 6, md: 6, lg: 3, xl: 3, xxl: 3, xxxl: 3, children: /* @__PURE__ */ jsx("div", { className: styles.checkboxWrapper, children: /* @__PURE__ */ jsx(
5636
+ Checkbox,
5637
+ {
5638
+ label: slot.label,
5639
+ checked: departureTime.includes(slot.value),
5640
+ onChange: (_, data) => handleDepartureTimeChange(slot.value, data.checked)
5641
+ }
5642
+ ) }) }, slot.value)) })
5643
+ ] }),
5644
+ /* @__PURE__ */ jsx(Divider, {}),
5645
+ /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
5646
+ /* @__PURE__ */ jsx(Body1, { children: mergedLabels.arrivalTimeLabel }),
5647
+ /* @__PURE__ */ jsx(Row, { children: timeSlots.map((slot) => /* @__PURE__ */ jsx(Col, { xs: 6, sm: 6, md: 6, lg: 3, xl: 3, xxl: 3, xxxl: 3, children: /* @__PURE__ */ jsx("div", { className: styles.checkboxWrapper, children: /* @__PURE__ */ jsx(
5648
+ Checkbox,
5649
+ {
5650
+ label: slot.label,
5651
+ checked: arrivalTime.includes(slot.value),
5652
+ onChange: (_, data) => handleArrivalTimeChange(slot.value, data.checked)
5653
+ }
5654
+ ) }) }, slot.value)) })
5655
+ ] }),
5656
+ /* @__PURE__ */ jsx(Divider, {}),
5657
+ /* @__PURE__ */ jsxs("div", { className: styles.containerRange, children: [
5658
+ /* @__PURE__ */ jsxs("div", { className: styles.spaceText, children: [
5659
+ /* @__PURE__ */ jsx(Subtitle2, { children: mergedLabels.priceLabel }),
5660
+ /* @__PURE__ */ jsx(Body1, { children: mergedLabels.priceRangeText(priceRange[0], priceRange[1]) })
5661
+ ] }),
5662
+ /* @__PURE__ */ jsxs("div", { className: styles.sliderContainer, children: [
5663
+ rangeReady && /* @__PURE__ */ jsx(
5664
+ Range,
5665
+ {
5666
+ min: minPrice,
5667
+ max: maxPrice,
5668
+ values: priceRange,
5669
+ onChange: (values) => onPriceRangeChange(values),
5670
+ renderTrack: renderPriceTrack,
5671
+ renderThumb
5672
+ },
5673
+ open ? "open" : "closed"
5674
+ ),
5675
+ /* @__PURE__ */ jsxs("div", { className: styles.sliderValues, children: [
5676
+ /* @__PURE__ */ jsx("span", { children: formatPrice(minPrice) }),
5677
+ /* @__PURE__ */ jsx("span", { children: formatPrice(maxPrice) })
5678
+ ] })
5679
+ ] })
5680
+ ] }),
5681
+ /* @__PURE__ */ jsx(Divider, {}),
5682
+ /* @__PURE__ */ jsxs("div", { className: styles.containerRange, children: [
5683
+ /* @__PURE__ */ jsxs("div", { className: styles.spaceText, children: [
5684
+ /* @__PURE__ */ jsx(Subtitle2, { children: mergedLabels.durationLabel }),
5685
+ /* @__PURE__ */ jsx(Body1, { children: mergedLabels.durationRangeText(durationRange[0], durationRange[1]) })
5686
+ ] }),
5687
+ /* @__PURE__ */ jsxs("div", { className: styles.sliderContainer, children: [
5688
+ rangeReady && /* @__PURE__ */ jsx(
5689
+ Range,
5690
+ {
5691
+ step: 1,
5692
+ min: minDuration,
5693
+ max: maxDuration,
5694
+ values: durationRange,
5695
+ onChange: (values) => onDurationRangeChange(values),
5696
+ renderTrack: renderDurationTrack,
5697
+ renderThumb
5698
+ },
5699
+ open ? "open" : "closed"
5700
+ ),
5701
+ /* @__PURE__ */ jsxs("div", { className: styles.sliderValues, children: [
5702
+ /* @__PURE__ */ jsxs("span", { children: [
5703
+ minDuration,
5704
+ " jam"
5705
+ ] }),
5706
+ /* @__PURE__ */ jsxs("span", { children: [
5707
+ maxDuration,
5708
+ " jam"
5709
+ ] })
5710
+ ] })
5711
+ ] })
5712
+ ] })
5713
+ ] }),
5714
+ /* @__PURE__ */ jsxs(DialogActions, { className: styles.footerButtons, children: [
5715
+ /* @__PURE__ */ jsx(
5716
+ Button,
5717
+ {
5718
+ className: styles.outlineDanger,
5719
+ appearance: "outline",
5720
+ shape: "circular",
5721
+ onClick: onReset,
5722
+ children: mergedLabels.resetButton
5723
+ }
5724
+ ),
5725
+ /* @__PURE__ */ jsx(Button, { appearance: "primary", onClick: onApply, shape: "circular", children: mergedLabels.applyButton })
5726
+ ] })
5727
+ ] }) }) });
5728
+ };
5729
+
5730
+ // src/components/DateFilter/DateFilter.constants.ts
5731
+ var DEFAULT_LABELS4 = {
5732
+ prevButtonAriaLabel: "Previous dates",
5733
+ nextButtonAriaLabel: "Next dates",
5734
+ calendarButtonAriaLabel: "Open calendar"
5735
+ };
5736
+ var DEFAULT_SCROLL_AMOUNT = 150;
5737
+ var useStyles16 = makeStyles({
5738
+ container: {
5739
+ display: "flex",
5740
+ alignItems: "stretch",
5741
+ gap: "8px",
5742
+ overflowX: "auto",
5743
+ maxWidth: "95vw",
5744
+ boxSizing: "border-box"
5745
+ },
5746
+ compoundHeight: {
5747
+ // height: '63px',
5748
+ },
5749
+ item: {
5750
+ minWidth: "clamp(50px, 10vw, 140px)",
5751
+ scrollSnapAlign: "start",
5752
+ flexShrink: 0,
5753
+ display: "flex",
5754
+ flexDirection: "column",
5755
+ justifyContent: "center",
5756
+ height: "63px",
5757
+ "@media (min-width: 1600px)": {
5758
+ flexGrow: 1,
5759
+ flexShrink: 1,
5760
+ minWidth: "120px"
5761
+ }
5762
+ },
5763
+ scrollContainer: {
5764
+ display: "flex",
5765
+ overflowX: "auto",
5766
+ scrollSnapType: "x mandatory",
5767
+ gap: "12px",
5768
+ scrollbarWidth: "none",
5769
+ msOverflowStyle: "none",
5770
+ minWidth: 0,
5771
+ flexGrow: 1,
5772
+ "@media (min-width: 1600px)": {
5773
+ overflowX: "visible",
5774
+ justifyContent: "stretch"
5775
+ },
5776
+ "::-webkit-scrollbar": {
5777
+ display: "none"
5778
+ }
5779
+ },
5780
+ compoundButton: {
5781
+ width: "100%",
5782
+ textAlign: "center",
5783
+ height: "100%",
5784
+ display: "flex",
5785
+ flexDirection: "column",
5786
+ justifyContent: "center",
5787
+ gap: "4px",
5788
+ backgroundColor: "white"
5789
+ },
5790
+ button: {
5791
+ minWidth: "48px",
5792
+ height: "100%"
5793
+ },
5794
+ buttonCalendar: {
5795
+ minWidth: "65px",
5796
+ height: "100%"
5797
+ },
5798
+ selected: {
5799
+ color: tokens.colorBrandBackground,
5800
+ ...shorthands.borderColor(tokens.colorBrandBackground),
5801
+ ":hover": {
5802
+ backgroundColor: tokens.colorBrandBackgroundHover,
5803
+ ...shorthands.borderColor(tokens.colorBrandBackgroundHover),
5804
+ color: tokens.colorNeutralForegroundOnBrand
5805
+ }
5806
+ }
5807
+ });
5808
+ var DateFilter = ({
5809
+ dates,
5810
+ selectedDate,
5811
+ onDateClick,
5812
+ onCalendarClick,
5813
+ showNavigation = true,
5814
+ showCalendarButton = true,
5815
+ scrollAmount = DEFAULT_SCROLL_AMOUNT,
5816
+ labels
5817
+ }) => {
5818
+ const styles = useStyles16();
5819
+ const scrollRef = useRef(null);
5820
+ const mergedLabels = { ...DEFAULT_LABELS4, ...labels };
5821
+ const handlePrev = () => {
5822
+ scrollRef.current?.scrollBy({ left: -scrollAmount, behavior: "smooth" });
5823
+ };
5824
+ const handleNext = () => {
5825
+ scrollRef.current?.scrollBy({ left: scrollAmount, behavior: "smooth" });
5826
+ };
5827
+ return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
5828
+ showNavigation && /* @__PURE__ */ jsx(Visible, { lg: true, xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsx("div", { className: styles.compoundHeight, children: /* @__PURE__ */ jsx(
5829
+ Button,
5830
+ {
5831
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-left-32-regular" }),
5832
+ size: "small",
5833
+ onClick: handlePrev,
5834
+ className: styles.button,
5835
+ "aria-label": mergedLabels.prevButtonAriaLabel
5836
+ }
5837
+ ) }) }),
5838
+ /* @__PURE__ */ jsx("div", { ref: scrollRef, className: styles.scrollContainer, children: dates.map((date, index) => /* @__PURE__ */ jsx("div", { className: styles.item, children: /* @__PURE__ */ jsxs(
5839
+ Button,
5840
+ {
5841
+ appearance: "outline",
5842
+ type: "button",
5843
+ className: mergeClasses(
5844
+ styles.compoundButton,
5845
+ selectedDate === date.label ? styles.selected : ""
5846
+ ),
5847
+ onClick: () => onDateClick(date.label),
5848
+ children: [
5849
+ /* @__PURE__ */ jsx(Caption2Strong, { truncate: true, children: date.label }),
5850
+ /* @__PURE__ */ jsx(Caption2Strong, { truncate: true, children: date.price })
5851
+ ]
5852
+ }
5853
+ ) }, index)) }),
5854
+ showNavigation && /* @__PURE__ */ jsx(Visible, { lg: true, xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsx("div", { className: styles.compoundHeight, children: /* @__PURE__ */ jsx(
5855
+ Button,
5856
+ {
5857
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-right-32-filled" }),
5858
+ onClick: handleNext,
5859
+ className: styles.button,
5860
+ size: "small",
5861
+ "aria-label": mergedLabels.nextButtonAriaLabel
5862
+ }
5863
+ ) }) }),
5864
+ showCalendarButton && /* @__PURE__ */ jsx("div", { className: styles.compoundHeight, children: /* @__PURE__ */ jsx(
5865
+ Button,
5866
+ {
5867
+ size: "small",
5868
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:calendar-32-regular" }),
5869
+ className: styles.buttonCalendar,
5870
+ onClick: onCalendarClick,
5871
+ "aria-label": mergedLabels.calendarButtonAriaLabel
5872
+ }
5873
+ ) })
5874
+ ] });
5875
+ };
5876
+
5877
+ // src/components/ModalSearchTicket/ModalSearchTicket.constants.ts
5878
+ var DEFAULT_FORM_VALUES = {
5879
+ from: "",
5880
+ to: "",
5881
+ startDate: "",
5882
+ roundTrip: false,
5883
+ endDate: "",
5884
+ serviceClass: "",
5885
+ typeOfService: "",
5886
+ passenger: ""
5887
+ };
5888
+ var useStyles17 = makeStyles({
5889
+ dialogSurface: {
5890
+ maxWidth: "900px",
5891
+ width: "100%"
5892
+ },
5893
+ closeButton: {
5894
+ minWidth: "32px",
5895
+ minHeight: "32px"
5896
+ },
5897
+ content: {
5898
+ display: "flex",
5899
+ flexDirection: "column",
5900
+ gap: "24px",
5901
+ paddingTop: "10px",
5902
+ paddingLeft: "10px",
5903
+ paddingRight: "10px",
5904
+ paddingBottom: "20px"
5905
+ },
5906
+ formInnerRow: {
5907
+ [`@media (max-width: ${extendedTokens.breakpointXl})`]: {
5908
+ margin: "0 !important"
5909
+ }
5910
+ },
5911
+ formFieldRow: {
5912
+ [`@media (max-width: ${extendedTokens.breakpointXl})`]: {
5913
+ gap: "12px !important"
5914
+ }
5915
+ },
5916
+ formField: {
5917
+ padding: "16px",
5918
+ display: "flex",
5919
+ flexDirection: "column",
5920
+ gap: "8px",
5921
+ borderRadius: tokens.borderRadiusXLarge,
5922
+ border: "1px solid " + tokens.colorNeutralStroke1,
5923
+ height: "100%",
5924
+ [`@media (max-width: ${extendedTokens.breakpointXl})`]: {
5925
+ padding: "20px",
5926
+ borderRadius: tokens.borderRadiusXLarge
5927
+ }
5928
+ },
5929
+ deviderButton: {
5930
+ display: "flex",
5931
+ justifyContent: "center",
5932
+ position: "absolute",
5933
+ left: "18px",
5934
+ bottom: "-10px",
5935
+ width: "90%"
5936
+ },
5937
+ serviceCol: {
5938
+ [`@media (max-width: ${extendedTokens.breakpointXl})`]: {
5939
+ paddingLeft: "15px !important",
5940
+ paddingRight: "15px !important",
5941
+ marginTop: "16px"
5942
+ }
5943
+ },
5944
+ searchButton: {
5945
+ width: "100%",
5946
+ borderRadius: tokens.borderRadiusCircular
5947
+ },
5948
+ buttonSwitch: {
5949
+ background: tokens.colorNeutralBackground1,
5950
+ boxShadow: `0 1px 2px 0 ${tokens.colorNeutralShadowKey}, 0 0 2px 0 ${tokens.colorNeutralShadowAmbient}`
5951
+ },
5952
+ switchIcon: {
5953
+ display: "inline-flex",
5954
+ transition: "transform 0.3s ease"
5955
+ },
5956
+ switchIconRotate: {
5957
+ transform: "rotate(180deg)"
5958
+ }
5959
+ });
5960
+ var ModalSearchTicket = ({
5961
+ open,
5962
+ onClose,
5963
+ defaultValues,
5964
+ onSelectOrigin,
5965
+ onSelectDestination,
5966
+ onFromChange,
5967
+ onSelectDepartureDate,
5968
+ onSelectReturnDate,
5969
+ onSelectServiceClass,
5970
+ onSelectTypeOfService,
5971
+ onSelectPassenger,
5972
+ onSwitchHarbor,
5973
+ onSwitchClick,
5974
+ onRoundTripChange,
5975
+ onSubmit,
5976
+ toDisabled = false,
5977
+ endDateDisabled = false,
5978
+ serviceClassDisabled = false,
5979
+ typeOfServiceDisabled = false,
5980
+ roundTripDisabled = false,
5981
+ isSubmitDisabled = false,
5982
+ switchDisabled = false,
5983
+ isRotating = false,
5984
+ showPassengerField = false,
5985
+ showRoundTrip = true,
5986
+ ...props
5987
+ }) => {
5988
+ const styles = useStyles17();
5989
+ const { control, setValue, handleSubmit, watch } = useForm({
5990
+ defaultValues: {
5991
+ ...DEFAULT_FORM_VALUES,
5992
+ ...defaultValues
5993
+ }
5994
+ });
5995
+ const roundTripValue = useWatch({
5996
+ control,
5997
+ name: "roundTrip",
5998
+ defaultValue: defaultValues?.roundTrip || false
5999
+ });
6000
+ const isUpdatingFromProps = useRef(false);
6001
+ useEffect(() => {
6002
+ if (defaultValues) {
6003
+ isUpdatingFromProps.current = true;
6004
+ Object.entries(defaultValues).forEach(([key, value]) => {
6005
+ setValue(key, value);
6006
+ });
6007
+ setTimeout(() => {
6008
+ isUpdatingFromProps.current = false;
6009
+ }, 0);
6010
+ }
6011
+ }, [defaultValues, setValue]);
6012
+ useEffect(() => {
6013
+ if (onRoundTripChange && !isUpdatingFromProps.current) {
6014
+ onRoundTripChange(roundTripValue);
6015
+ }
6016
+ }, [roundTripValue, onRoundTripChange]);
6017
+ const handleFromChange = () => {
6018
+ setValue("to", "");
6019
+ if (onFromChange) {
6020
+ onFromChange();
6021
+ }
6022
+ };
6023
+ const onFormSubmit = (data) => {
6024
+ if (onSubmit) {
6025
+ onSubmit(data);
6026
+ }
6027
+ };
6028
+ return /* @__PURE__ */ jsx(
6029
+ Dialog,
6030
+ {
6031
+ open,
6032
+ onOpenChange: (_, data) => !data.open && onClose(),
6033
+ ...props,
6034
+ children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
6035
+ /* @__PURE__ */ jsx(
6036
+ DialogTitle,
6037
+ {
6038
+ action: /* @__PURE__ */ jsx(
6039
+ Button,
6040
+ {
6041
+ appearance: "subtle",
6042
+ "aria-label": "close",
6043
+ className: styles.closeButton,
6044
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
6045
+ onClick: onClose
6046
+ }
6047
+ ),
6048
+ children: "Cari Jadwal Lainnya"
6049
+ }
6050
+ ),
6051
+ /* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: /* @__PURE__ */ jsx("form", { onSubmit: handleSubmit(onFormSubmit), children: /* @__PURE__ */ jsxs(Row, { style: { width: "100%" }, className: styles.formInnerRow, children: [
6052
+ /* @__PURE__ */ jsx(Col, { xs: 12, sm: 12, lg: 12, xl: 6, xxl: 6, xxxl: 6, children: /* @__PURE__ */ jsxs(Row, { style: { gap: "16px" }, className: styles.formFieldRow, children: [
6053
+ /* @__PURE__ */ jsx(Col, { xs: 12, sm: 12, lg: 12, xl: 12, xxl: 12, xxxl: 12, children: /* @__PURE__ */ jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxs(Row, { children: [
6054
+ /* @__PURE__ */ jsxs(
6055
+ Col,
6056
+ {
6057
+ xs: 12,
6058
+ sm: 12,
6059
+ md: 12,
6060
+ lg: 12,
6061
+ xl: 12,
6062
+ xxl: 12,
6063
+ xxxl: 12,
6064
+ children: [
6065
+ /* @__PURE__ */ jsx(
6066
+ InputDynamic_default,
6067
+ {
6068
+ name: "from",
6069
+ label: "Dari",
6070
+ control,
6071
+ type: "text",
6072
+ contentBefore: /* @__PURE__ */ jsx(
6073
+ Icon,
6074
+ {
6075
+ icon: "fluent:vehicle-ship-16-filled",
6076
+ color: tokens.colorBrandBackground
6077
+ }
6078
+ ),
6079
+ appearance: "filled-lighter",
6080
+ size: "medium",
6081
+ placeholder: "Pilih pelabuhan asal",
6082
+ onClick: onSelectOrigin,
6083
+ onChange: handleFromChange,
6084
+ validationRules: {
6085
+ required: "Pelabuhan asal wajib diisi"
6086
+ },
6087
+ required: true
6088
+ }
6089
+ ),
6090
+ /* @__PURE__ */ jsxs("div", { className: styles.deviderButton, children: [
6091
+ /* @__PURE__ */ jsx(Divider, {}),
6092
+ " ",
6093
+ /* @__PURE__ */ jsx(
6094
+ Button,
6095
+ {
6096
+ onClick: onSwitchClick,
6097
+ className: styles.buttonSwitch,
6098
+ shape: "circular",
6099
+ appearance: "secondary",
6100
+ size: "large",
6101
+ disabled: switchDisabled,
6102
+ icon: /* @__PURE__ */ jsx(
6103
+ "div",
6104
+ {
6105
+ className: `${styles.switchIcon} ${isRotating ? styles.switchIconRotate : ""}`,
6106
+ children: /* @__PURE__ */ jsx(
6107
+ "img",
6108
+ {
6109
+ src: "/assets/images/icons/switch.svg",
6110
+ alt: "Switch",
6111
+ width: 26,
6112
+ height: 26
6113
+ }
6114
+ )
6115
+ }
6116
+ )
6117
+ }
6118
+ )
6119
+ ] })
6120
+ ]
6121
+ }
6122
+ ),
6123
+ /* @__PURE__ */ jsx(
6124
+ Col,
6125
+ {
6126
+ xs: 12,
6127
+ sm: 12,
6128
+ md: 12,
6129
+ lg: 12,
6130
+ xl: 12,
6131
+ xxl: 12,
6132
+ xxxl: 12,
6133
+ children: /* @__PURE__ */ jsx(
6134
+ InputDynamic_default,
6135
+ {
6136
+ name: "to",
6137
+ label: "Ke",
6138
+ control,
6139
+ type: "text",
6140
+ contentBefore: /* @__PURE__ */ jsx(
6141
+ Icon,
6142
+ {
6143
+ icon: "fluent:location-24-filled",
6144
+ color: tokens.colorBrandBackground
6145
+ }
6146
+ ),
6147
+ disabled: toDisabled,
6148
+ appearance: "filled-lighter",
6149
+ size: "medium",
6150
+ placeholder: "Pilih pelabuhan tujuan",
6151
+ onClick: onSelectDestination,
6152
+ validationRules: {
6153
+ required: "Pelabuhan tujuan wajib diisi"
6154
+ },
6155
+ required: true
6156
+ }
6157
+ )
6158
+ }
6159
+ )
6160
+ ] }) }) }),
6161
+ /* @__PURE__ */ jsx(Col, { xs: 12, sm: 12, lg: 12, xl: 12, xxl: 12, xxxl: 12, children: /* @__PURE__ */ jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxs(Row, { style: { height: "100%" }, children: [
6162
+ /* @__PURE__ */ jsx(
6163
+ Col,
6164
+ {
6165
+ xs: 6,
6166
+ sm: 6,
6167
+ md: 6,
6168
+ lg: 6,
6169
+ xl: 6,
6170
+ xxl: 6,
6171
+ xxxl: 6,
6172
+ children: /* @__PURE__ */ jsx("div", { style: { position: "relative", zIndex: 2 }, children: /* @__PURE__ */ jsx(
6173
+ InputDynamic_default,
6174
+ {
6175
+ name: "startDate",
6176
+ label: "Tanggal Berangkat",
6177
+ control,
6178
+ type: "text",
6179
+ contentBefore: /* @__PURE__ */ jsx(
6180
+ Icon,
6181
+ {
6182
+ icon: "fluent:calendar-24-filled",
6183
+ color: tokens.colorBrandBackground
6184
+ }
6185
+ ),
6186
+ appearance: "filled-lighter",
6187
+ size: "medium",
6188
+ placeholder: "Pilih Tanggal Berangkat",
6189
+ onClick: onSelectDepartureDate,
6190
+ required: true,
6191
+ validationRules: {
6192
+ required: "Tanggal Berangkat wajib diisi"
6193
+ }
6194
+ }
6195
+ ) })
6196
+ }
6197
+ ),
6198
+ showRoundTrip && /* @__PURE__ */ jsx(
6199
+ Col,
6200
+ {
6201
+ xs: 6,
6202
+ sm: 6,
6203
+ md: 6,
6204
+ lg: 6,
6205
+ xl: 6,
6206
+ xxl: 6,
6207
+ xxxl: 6,
6208
+ style: { display: "flex", justifyContent: "end" },
6209
+ children: /* @__PURE__ */ jsx(
6210
+ InputDynamic_default,
6211
+ {
6212
+ name: "roundTrip",
6213
+ label: "Pulang Pergi",
6214
+ control,
6215
+ type: "switch",
6216
+ disabled: roundTripDisabled,
6217
+ size: "medium"
6218
+ }
6219
+ )
6220
+ }
6221
+ ),
6222
+ roundTripValue && /* @__PURE__ */ jsx(
6223
+ Col,
6224
+ {
6225
+ xs: 12,
6226
+ sm: 12,
6227
+ md: 12,
6228
+ lg: 12,
6229
+ xl: 12,
6230
+ xxl: 12,
6231
+ xxxl: 12,
6232
+ children: /* @__PURE__ */ jsx(
6233
+ InputDynamic_default,
6234
+ {
6235
+ name: "endDate",
6236
+ label: "Tanggal Pulang",
6237
+ control,
6238
+ type: "text",
6239
+ contentBefore: /* @__PURE__ */ jsx(
6240
+ Icon,
6241
+ {
6242
+ icon: "fluent:calendar-24-filled",
6243
+ color: tokens.colorBrandBackground
6244
+ }
6245
+ ),
6246
+ appearance: "filled-lighter",
6247
+ size: "medium",
6248
+ placeholder: "Pilih Tanggal Pulang",
6249
+ onClick: onSelectReturnDate,
6250
+ disabled: endDateDisabled,
6251
+ style: { borderColor: "transparent" },
6252
+ required: roundTripValue,
6253
+ validationRules: {
6254
+ required: "Tanggal Pulang wajib diisi"
6255
+ }
6256
+ }
6257
+ )
6258
+ }
6259
+ )
6260
+ ] }) }) })
6261
+ ] }) }),
6262
+ /* @__PURE__ */ jsx(Visible, { xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsx(
6263
+ Col,
6264
+ {
6265
+ xs: 12,
6266
+ sm: 12,
6267
+ lg: 12,
6268
+ xl: 1,
6269
+ xxl: 1,
6270
+ xxxl: 1,
6271
+ style: {
6272
+ display: "flex",
6273
+ alignItems: "center",
6274
+ justifyContent: "center"
6275
+ },
6276
+ children: /* @__PURE__ */ jsx(Divider, { vertical: true, style: { height: "100%" } })
6277
+ }
6278
+ ) }),
6279
+ /* @__PURE__ */ jsx(
6280
+ Col,
6281
+ {
6282
+ xs: 12,
6283
+ sm: 12,
6284
+ lg: 12,
6285
+ xl: 5,
6286
+ xxl: 5,
6287
+ xxxl: 5,
6288
+ className: styles.serviceCol,
6289
+ children: /* @__PURE__ */ jsx(Row, { style: { height: "100%", gap: "16px" }, children: /* @__PURE__ */ jsx(Col, { xs: 12, sm: 12, lg: 12, xl: 12, xxl: 12, xxxl: 12, children: /* @__PURE__ */ jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxs(Row, { style: { height: "100%", gap: "16px" }, children: [
6290
+ /* @__PURE__ */ jsx(
6291
+ Col,
6292
+ {
6293
+ xs: 12,
6294
+ sm: 12,
6295
+ md: 12,
6296
+ lg: 12,
6297
+ xl: 12,
6298
+ xxl: 12,
6299
+ xxxl: 12,
6300
+ children: /* @__PURE__ */ jsx(
6301
+ InputDynamic_default,
6302
+ {
6303
+ name: "serviceClass",
6304
+ label: "Kelas Layanan",
6305
+ control,
6306
+ type: "text",
6307
+ contentBefore: /* @__PURE__ */ jsx(
6308
+ Icon,
6309
+ {
6310
+ icon: "fluent:ribbon-star-24-filled",
6311
+ color: tokens.colorBrandBackground
6312
+ }
6313
+ ),
6314
+ appearance: "filled-lighter",
6315
+ size: "medium",
6316
+ placeholder: "Pilih Kelas Layanan",
6317
+ onClick: onSelectServiceClass,
6318
+ required: true,
6319
+ disabled: serviceClassDisabled
6320
+ }
6321
+ )
6322
+ }
6323
+ ),
6324
+ /* @__PURE__ */ jsx(
6325
+ Col,
6326
+ {
6327
+ xs: 12,
6328
+ sm: 12,
6329
+ md: 12,
6330
+ lg: 12,
6331
+ xl: 12,
6332
+ xxl: 12,
6333
+ xxxl: 12,
6334
+ children: /* @__PURE__ */ jsx(
6335
+ InputDynamic_default,
6336
+ {
6337
+ name: "typeOfService",
6338
+ label: "Jenis penumpang",
6339
+ control,
6340
+ type: "text",
6341
+ contentBefore: /* @__PURE__ */ jsx(
6342
+ Icon,
6343
+ {
6344
+ icon: "fluent:apps-list-24-filled",
6345
+ color: tokens.colorBrandBackground
6346
+ }
6347
+ ),
6348
+ appearance: "filled-lighter",
6349
+ size: "medium",
6350
+ placeholder: "Pilih Jenis penumpang",
6351
+ onClick: onSelectTypeOfService,
6352
+ required: true,
6353
+ disabled: typeOfServiceDisabled
6354
+ }
6355
+ )
6356
+ }
6357
+ ),
6358
+ showPassengerField && /* @__PURE__ */ jsx(
6359
+ Col,
6360
+ {
6361
+ xs: 12,
6362
+ sm: 12,
6363
+ md: 12,
6364
+ lg: 12,
6365
+ xl: 12,
6366
+ xxl: 12,
6367
+ xxxl: 12,
6368
+ children: /* @__PURE__ */ jsx(
6369
+ InputDynamic_default,
6370
+ {
6371
+ required: true,
6372
+ name: "passenger",
6373
+ label: "Penumpang",
6374
+ control,
6375
+ type: "text",
6376
+ contentBefore: /* @__PURE__ */ jsx(
6377
+ Icon,
6378
+ {
6379
+ icon: "fluent:people-24-filled",
6380
+ color: tokens.colorBrandBackground
6381
+ }
6382
+ ),
6383
+ appearance: "filled-lighter",
6384
+ size: "medium",
6385
+ placeholder: "Pilih Penumpang",
6386
+ onClick: onSelectPassenger
6387
+ }
6388
+ )
6389
+ }
6390
+ )
6391
+ ] }) }) }) })
6392
+ }
6393
+ ),
6394
+ /* @__PURE__ */ jsx(
6395
+ Col,
6396
+ {
6397
+ xs: 12,
6398
+ sm: 12,
6399
+ lg: 12,
6400
+ xl: 12,
6401
+ xxl: 12,
6402
+ xxxl: 12,
6403
+ style: { paddingTop: "2rem" },
6404
+ children: /* @__PURE__ */ jsx(
6405
+ Button,
6406
+ {
6407
+ className: styles.searchButton,
6408
+ appearance: "primary",
6409
+ size: "large",
6410
+ type: "submit",
6411
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-20-filled" }),
6412
+ disabled: isSubmitDisabled,
6413
+ children: "Cari Tiket"
6414
+ }
6415
+ )
6416
+ }
6417
+ )
6418
+ ] }) }) })
6419
+ ] }) })
6420
+ }
6421
+ );
6422
+ };
6423
+
6424
+ export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardBanner, CardPromo, CardServiceMenu, CardTicket, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS2 as CardTicketSearchSummaryDefaultLabels, CarouselWithCustomNav, DEFAULT_COUNTRY_CODES, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_CLASSES, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS4 as DateFilterDefaultLabels, InputDynamic_default as InputDynamic, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS3 as ModalFilterTicketDefaultLabels, ModalIllustration, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, SortMenu, getModalPreset, getSortLabel };
4632
6425
  //# sourceMappingURL=index.mjs.map
4633
6426
  //# sourceMappingURL=index.mjs.map