@asdp/ferryui 0.1.7 → 0.1.9
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 +97 -1
- package/dist/index.d.ts +97 -1
- package/dist/index.js +271 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +82 -78
package/dist/index.d.mts
CHANGED
|
@@ -854,4 +854,100 @@ interface ModalTotalPassengersProps {
|
|
|
854
854
|
*/
|
|
855
855
|
declare const ModalTotalPassengers: React$1.FC<ModalTotalPassengersProps>;
|
|
856
856
|
|
|
857
|
-
|
|
857
|
+
/**
|
|
858
|
+
* Service type item structure
|
|
859
|
+
*/
|
|
860
|
+
interface TypeOfService {
|
|
861
|
+
id: number;
|
|
862
|
+
image: string;
|
|
863
|
+
title: string;
|
|
864
|
+
info: string;
|
|
865
|
+
price: number;
|
|
866
|
+
type: string;
|
|
867
|
+
parentId?: number;
|
|
868
|
+
parentTitle?: string;
|
|
869
|
+
child: TypeOfService[];
|
|
870
|
+
typeOfPassanger: string;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Props for ModalTypeOfService component
|
|
874
|
+
*/
|
|
875
|
+
interface ModalTypeOfServiceProps {
|
|
876
|
+
/**
|
|
877
|
+
* Whether the modal is open
|
|
878
|
+
*/
|
|
879
|
+
open: boolean;
|
|
880
|
+
/**
|
|
881
|
+
* Callback when modal should close
|
|
882
|
+
*/
|
|
883
|
+
onClose: () => void;
|
|
884
|
+
/**
|
|
885
|
+
* Modal title
|
|
886
|
+
* @default "Pilih Tipe Layanan"
|
|
887
|
+
*/
|
|
888
|
+
title?: string;
|
|
889
|
+
/**
|
|
890
|
+
* Array of service types
|
|
891
|
+
*/
|
|
892
|
+
serviceTypes: TypeOfService[];
|
|
893
|
+
/**
|
|
894
|
+
* Currently selected service
|
|
895
|
+
*/
|
|
896
|
+
selectedService?: TypeOfService | null;
|
|
897
|
+
/**
|
|
898
|
+
* Callback when save button is clicked
|
|
899
|
+
*/
|
|
900
|
+
onSave: (service: TypeOfService) => void;
|
|
901
|
+
/**
|
|
902
|
+
* Optional custom image renderer
|
|
903
|
+
* Useful for Next.js Image component or other custom renderers
|
|
904
|
+
*/
|
|
905
|
+
renderImage?: (props: {
|
|
906
|
+
src: string;
|
|
907
|
+
alt: string;
|
|
908
|
+
width: number;
|
|
909
|
+
height: number;
|
|
910
|
+
}) => ReactNode;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* ModalTypeOfService - A reusable modal component for selecting service types
|
|
914
|
+
*
|
|
915
|
+
* This component provides a service type selection modal with features like:
|
|
916
|
+
* - Accordion for categories with children (vehicles, goods, etc.)
|
|
917
|
+
* - Radio buttons for individual selections
|
|
918
|
+
* - Image display for each service type
|
|
919
|
+
* - Customizable image renderer for framework-specific components
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
* ```tsx
|
|
923
|
+
* <ModalTypeOfService
|
|
924
|
+
* open={isOpen}
|
|
925
|
+
* onClose={() => setIsOpen(false)}
|
|
926
|
+
* title="Pilih Tipe Layanan"
|
|
927
|
+
* serviceTypes={serviceTypes}
|
|
928
|
+
* selectedService={selectedService}
|
|
929
|
+
* onSave={handleSave}
|
|
930
|
+
* renderImage={(props) => <Image {...props} />}
|
|
931
|
+
* />
|
|
932
|
+
* ```
|
|
933
|
+
*/
|
|
934
|
+
declare const ModalTypeOfService: React$1.FC<ModalTypeOfServiceProps>;
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Default paths for vehicle icon images
|
|
938
|
+
* These images are bundled with the library in the assets directory
|
|
939
|
+
*/
|
|
940
|
+
declare const DEFAULT_VEHICLE_ICONS: {
|
|
941
|
+
readonly pedestrian: "/assets/images/icons/pedestrian.webp";
|
|
942
|
+
readonly roadbike: "/assets/images/icons/roadbike.webp";
|
|
943
|
+
readonly motorbike1: "/assets/images/icons/motorbike-1.webp";
|
|
944
|
+
readonly motorbike2: "/assets/images/icons/motorbike-2.svg";
|
|
945
|
+
readonly smallCar: "/assets/images/icons/small-car.webp";
|
|
946
|
+
readonly smallBus: "/assets/images/icons/small-bus.webp";
|
|
947
|
+
readonly bigBus: "/assets/images/icons/big-bus.webp";
|
|
948
|
+
readonly truck: "/assets/images/icons/truck.webp";
|
|
949
|
+
readonly bigTruck: "/assets/images/icons/big-truck.webp";
|
|
950
|
+
readonly looseLoad: "/assets/images/icons/loose-load.webp";
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
export { BackgroundTicketCard, BackgroundTicketCardVertical, CardBanner, type CardBannerProps, CardPromo, type CardPromoProps, CardServiceMenu, type CardServiceMenuProps, CardTicket, type CardTicketButton, type CardTicketProps, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, DEFAULT_COUNTRY_CODES, DEFAULT_SERVICE_CLASSES, DEFAULT_VEHICLE_ICONS, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type Passenger, type PassengerService, type PassengerServiceCode, type PassengerType, type RadioOption, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceItem, type ServiceMenuItem, type TabType, type TypeOfService, getModalPreset };
|
package/dist/index.d.ts
CHANGED
|
@@ -854,4 +854,100 @@ interface ModalTotalPassengersProps {
|
|
|
854
854
|
*/
|
|
855
855
|
declare const ModalTotalPassengers: React$1.FC<ModalTotalPassengersProps>;
|
|
856
856
|
|
|
857
|
-
|
|
857
|
+
/**
|
|
858
|
+
* Service type item structure
|
|
859
|
+
*/
|
|
860
|
+
interface TypeOfService {
|
|
861
|
+
id: number;
|
|
862
|
+
image: string;
|
|
863
|
+
title: string;
|
|
864
|
+
info: string;
|
|
865
|
+
price: number;
|
|
866
|
+
type: string;
|
|
867
|
+
parentId?: number;
|
|
868
|
+
parentTitle?: string;
|
|
869
|
+
child: TypeOfService[];
|
|
870
|
+
typeOfPassanger: string;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Props for ModalTypeOfService component
|
|
874
|
+
*/
|
|
875
|
+
interface ModalTypeOfServiceProps {
|
|
876
|
+
/**
|
|
877
|
+
* Whether the modal is open
|
|
878
|
+
*/
|
|
879
|
+
open: boolean;
|
|
880
|
+
/**
|
|
881
|
+
* Callback when modal should close
|
|
882
|
+
*/
|
|
883
|
+
onClose: () => void;
|
|
884
|
+
/**
|
|
885
|
+
* Modal title
|
|
886
|
+
* @default "Pilih Tipe Layanan"
|
|
887
|
+
*/
|
|
888
|
+
title?: string;
|
|
889
|
+
/**
|
|
890
|
+
* Array of service types
|
|
891
|
+
*/
|
|
892
|
+
serviceTypes: TypeOfService[];
|
|
893
|
+
/**
|
|
894
|
+
* Currently selected service
|
|
895
|
+
*/
|
|
896
|
+
selectedService?: TypeOfService | null;
|
|
897
|
+
/**
|
|
898
|
+
* Callback when save button is clicked
|
|
899
|
+
*/
|
|
900
|
+
onSave: (service: TypeOfService) => void;
|
|
901
|
+
/**
|
|
902
|
+
* Optional custom image renderer
|
|
903
|
+
* Useful for Next.js Image component or other custom renderers
|
|
904
|
+
*/
|
|
905
|
+
renderImage?: (props: {
|
|
906
|
+
src: string;
|
|
907
|
+
alt: string;
|
|
908
|
+
width: number;
|
|
909
|
+
height: number;
|
|
910
|
+
}) => ReactNode;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* ModalTypeOfService - A reusable modal component for selecting service types
|
|
914
|
+
*
|
|
915
|
+
* This component provides a service type selection modal with features like:
|
|
916
|
+
* - Accordion for categories with children (vehicles, goods, etc.)
|
|
917
|
+
* - Radio buttons for individual selections
|
|
918
|
+
* - Image display for each service type
|
|
919
|
+
* - Customizable image renderer for framework-specific components
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
* ```tsx
|
|
923
|
+
* <ModalTypeOfService
|
|
924
|
+
* open={isOpen}
|
|
925
|
+
* onClose={() => setIsOpen(false)}
|
|
926
|
+
* title="Pilih Tipe Layanan"
|
|
927
|
+
* serviceTypes={serviceTypes}
|
|
928
|
+
* selectedService={selectedService}
|
|
929
|
+
* onSave={handleSave}
|
|
930
|
+
* renderImage={(props) => <Image {...props} />}
|
|
931
|
+
* />
|
|
932
|
+
* ```
|
|
933
|
+
*/
|
|
934
|
+
declare const ModalTypeOfService: React$1.FC<ModalTypeOfServiceProps>;
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Default paths for vehicle icon images
|
|
938
|
+
* These images are bundled with the library in the assets directory
|
|
939
|
+
*/
|
|
940
|
+
declare const DEFAULT_VEHICLE_ICONS: {
|
|
941
|
+
readonly pedestrian: "/assets/images/icons/pedestrian.webp";
|
|
942
|
+
readonly roadbike: "/assets/images/icons/roadbike.webp";
|
|
943
|
+
readonly motorbike1: "/assets/images/icons/motorbike-1.webp";
|
|
944
|
+
readonly motorbike2: "/assets/images/icons/motorbike-2.svg";
|
|
945
|
+
readonly smallCar: "/assets/images/icons/small-car.webp";
|
|
946
|
+
readonly smallBus: "/assets/images/icons/small-bus.webp";
|
|
947
|
+
readonly bigBus: "/assets/images/icons/big-bus.webp";
|
|
948
|
+
readonly truck: "/assets/images/icons/truck.webp";
|
|
949
|
+
readonly bigTruck: "/assets/images/icons/big-truck.webp";
|
|
950
|
+
readonly looseLoad: "/assets/images/icons/loose-load.webp";
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
export { BackgroundTicketCard, BackgroundTicketCardVertical, CardBanner, type CardBannerProps, CardPromo, type CardPromoProps, CardServiceMenu, type CardServiceMenuProps, CardTicket, type CardTicketButton, type CardTicketProps, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, DEFAULT_COUNTRY_CODES, DEFAULT_SERVICE_CLASSES, DEFAULT_VEHICLE_ICONS, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type Passenger, type PassengerService, type PassengerServiceCode, type PassengerType, type RadioOption, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceItem, type ServiceMenuItem, type TabType, type TypeOfService, getModalPreset };
|
package/dist/index.js
CHANGED
|
@@ -3881,6 +3881,275 @@ var ModalTotalPassengers = ({
|
|
|
3881
3881
|
}
|
|
3882
3882
|
);
|
|
3883
3883
|
};
|
|
3884
|
+
var useStyles12 = reactComponents.makeStyles({
|
|
3885
|
+
dialogSurface: {
|
|
3886
|
+
maxWidth: "600px",
|
|
3887
|
+
width: "100%"
|
|
3888
|
+
},
|
|
3889
|
+
closeButton: {
|
|
3890
|
+
minWidth: "32px",
|
|
3891
|
+
minHeight: "32px"
|
|
3892
|
+
},
|
|
3893
|
+
passengerSection: {
|
|
3894
|
+
marginTop: reactComponents.tokens.spacingHorizontalM,
|
|
3895
|
+
display: "flex",
|
|
3896
|
+
flexDirection: "column"
|
|
3897
|
+
},
|
|
3898
|
+
accordionItem: {
|
|
3899
|
+
borderBottom: `1px solid ${reactComponents.tokens.colorNeutralStroke2}`,
|
|
3900
|
+
width: "100%"
|
|
3901
|
+
},
|
|
3902
|
+
accordionHeader: {
|
|
3903
|
+
fontSize: reactComponents.tokens.fontSizeBase300,
|
|
3904
|
+
fontWeight: reactComponents.tokens.fontWeightBold,
|
|
3905
|
+
display: "flex",
|
|
3906
|
+
alignItems: "center",
|
|
3907
|
+
justifyContent: "space-between",
|
|
3908
|
+
width: "100%"
|
|
3909
|
+
},
|
|
3910
|
+
accordionTitleAndInfo: {
|
|
3911
|
+
display: "flex",
|
|
3912
|
+
flexDirection: "column",
|
|
3913
|
+
gap: "2px",
|
|
3914
|
+
marginLeft: reactComponents.tokens.spacingHorizontalM,
|
|
3915
|
+
flex: 1
|
|
3916
|
+
},
|
|
3917
|
+
accordionBody: {
|
|
3918
|
+
marginLeft: "100px"
|
|
3919
|
+
},
|
|
3920
|
+
footer: {
|
|
3921
|
+
marginTop: reactComponents.tokens.spacingVerticalL,
|
|
3922
|
+
display: "flex",
|
|
3923
|
+
gap: reactComponents.tokens.spacingHorizontalM,
|
|
3924
|
+
justifyContent: "flex-end"
|
|
3925
|
+
}
|
|
3926
|
+
});
|
|
3927
|
+
var ModalTypeOfService = ({
|
|
3928
|
+
open,
|
|
3929
|
+
onClose,
|
|
3930
|
+
title = "Pilih Tipe Layanan",
|
|
3931
|
+
serviceTypes,
|
|
3932
|
+
selectedService,
|
|
3933
|
+
onSave,
|
|
3934
|
+
renderImage
|
|
3935
|
+
}) => {
|
|
3936
|
+
const styles = useStyles12();
|
|
3937
|
+
const [selectedServiceTitle, setSelectedServiceTitle] = React2.useState(
|
|
3938
|
+
selectedService?.title || ""
|
|
3939
|
+
);
|
|
3940
|
+
const [openItems, setOpenItems] = React2.useState(() => {
|
|
3941
|
+
if (!selectedService) return void 0;
|
|
3942
|
+
for (const item of serviceTypes) {
|
|
3943
|
+
if (item.type === "accordion" && item.child.length > 0) {
|
|
3944
|
+
const hasSelectedChild = item.child.some(
|
|
3945
|
+
(child) => child.title === selectedService.title
|
|
3946
|
+
);
|
|
3947
|
+
if (hasSelectedChild) {
|
|
3948
|
+
return item.id;
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
return void 0;
|
|
3953
|
+
});
|
|
3954
|
+
const defaultRenderImage = ({ src, alt, width, height }) => /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, width, height, style: { objectFit: "contain" } });
|
|
3955
|
+
const imageRenderer = renderImage || defaultRenderImage;
|
|
3956
|
+
React2.useEffect(() => {
|
|
3957
|
+
const newTitle = selectedService?.title || "";
|
|
3958
|
+
if (newTitle !== selectedServiceTitle) {
|
|
3959
|
+
setSelectedServiceTitle(newTitle);
|
|
3960
|
+
}
|
|
3961
|
+
if (selectedService) {
|
|
3962
|
+
for (const item of serviceTypes) {
|
|
3963
|
+
if (item.type === "accordion" && item.child.length > 0) {
|
|
3964
|
+
const hasSelectedChild = item.child.some(
|
|
3965
|
+
(child) => child.title === selectedService.title
|
|
3966
|
+
);
|
|
3967
|
+
if (hasSelectedChild && openItems !== item.id) {
|
|
3968
|
+
setOpenItems(item.id);
|
|
3969
|
+
break;
|
|
3970
|
+
}
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
} else if (openItems !== void 0) {
|
|
3974
|
+
setOpenItems(void 0);
|
|
3975
|
+
}
|
|
3976
|
+
}, [open, selectedService?.title]);
|
|
3977
|
+
const handleConfirm = () => {
|
|
3978
|
+
if (selectedServiceTitle) {
|
|
3979
|
+
let selectedItem = null;
|
|
3980
|
+
for (const item of serviceTypes) {
|
|
3981
|
+
if (item.title === selectedServiceTitle) {
|
|
3982
|
+
selectedItem = {
|
|
3983
|
+
id: item.id,
|
|
3984
|
+
image: item.image,
|
|
3985
|
+
title: item.title,
|
|
3986
|
+
info: item.info,
|
|
3987
|
+
price: item.price,
|
|
3988
|
+
parentTitle: "",
|
|
3989
|
+
parentId: 0,
|
|
3990
|
+
type: item.type,
|
|
3991
|
+
typeOfPassanger: item.typeOfPassanger,
|
|
3992
|
+
child: []
|
|
3993
|
+
};
|
|
3994
|
+
break;
|
|
3995
|
+
}
|
|
3996
|
+
if (item.child && item.child.length > 0) {
|
|
3997
|
+
const childItem = item.child.find((child) => child.title === selectedServiceTitle);
|
|
3998
|
+
if (childItem) {
|
|
3999
|
+
selectedItem = {
|
|
4000
|
+
id: childItem.id,
|
|
4001
|
+
image: childItem.image,
|
|
4002
|
+
title: childItem.title,
|
|
4003
|
+
info: childItem.info,
|
|
4004
|
+
price: childItem.price,
|
|
4005
|
+
parentTitle: childItem.parentTitle,
|
|
4006
|
+
parentId: childItem.parentId,
|
|
4007
|
+
type: childItem.type,
|
|
4008
|
+
typeOfPassanger: childItem.typeOfPassanger,
|
|
4009
|
+
child: []
|
|
4010
|
+
};
|
|
4011
|
+
break;
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
if (selectedItem) {
|
|
4016
|
+
onSave(selectedItem);
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
};
|
|
4020
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4021
|
+
reactComponents.Dialog,
|
|
4022
|
+
{
|
|
4023
|
+
open,
|
|
4024
|
+
onOpenChange: (_, data) => !data.open && onClose(),
|
|
4025
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogBody, { children: [
|
|
4026
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4027
|
+
reactComponents.DialogTitle,
|
|
4028
|
+
{
|
|
4029
|
+
action: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4030
|
+
reactComponents.Button,
|
|
4031
|
+
{
|
|
4032
|
+
appearance: "subtle",
|
|
4033
|
+
"aria-label": "close",
|
|
4034
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:dismiss-24-regular" }),
|
|
4035
|
+
onClick: onClose,
|
|
4036
|
+
className: styles.closeButton
|
|
4037
|
+
}
|
|
4038
|
+
),
|
|
4039
|
+
children: title
|
|
4040
|
+
}
|
|
4041
|
+
),
|
|
4042
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogContent, { children: [
|
|
4043
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4044
|
+
reactComponents.Accordion,
|
|
4045
|
+
{
|
|
4046
|
+
collapsible: true,
|
|
4047
|
+
openItems,
|
|
4048
|
+
onToggle: (_, data) => setOpenItems(data.openItems[0]),
|
|
4049
|
+
className: styles.passengerSection,
|
|
4050
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4051
|
+
reactComponents.RadioGroup,
|
|
4052
|
+
{
|
|
4053
|
+
value: selectedServiceTitle,
|
|
4054
|
+
onChange: (_, data) => setSelectedServiceTitle(data.value),
|
|
4055
|
+
children: serviceTypes.map((item, index) => {
|
|
4056
|
+
if (item.type === "accordion") {
|
|
4057
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.AccordionItem, { value: item.id, className: styles.accordionItem, children: [
|
|
4058
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4059
|
+
reactComponents.AccordionHeader,
|
|
4060
|
+
{
|
|
4061
|
+
className: styles.accordionHeader,
|
|
4062
|
+
expandIconPosition: "end",
|
|
4063
|
+
children: [
|
|
4064
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: imageRenderer({ src: item.image, alt: "vehicles", width: 74, height: 74 }) }),
|
|
4065
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.accordionTitleAndInfo, children: [
|
|
4066
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.title }),
|
|
4067
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: item.info })
|
|
4068
|
+
] })
|
|
4069
|
+
]
|
|
4070
|
+
}
|
|
4071
|
+
),
|
|
4072
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { className: styles.accordionBody, children: item.child.length > 0 && item.child.map((childItem, childIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4073
|
+
"div",
|
|
4074
|
+
{
|
|
4075
|
+
className: reactComponents.mergeClasses(
|
|
4076
|
+
styles.accordionHeader,
|
|
4077
|
+
styles.accordionItem
|
|
4078
|
+
),
|
|
4079
|
+
style: { padding: reactComponents.tokens.spacingHorizontalXS },
|
|
4080
|
+
children: [
|
|
4081
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: imageRenderer({
|
|
4082
|
+
src: childItem.image,
|
|
4083
|
+
alt: childItem.title,
|
|
4084
|
+
width: 48,
|
|
4085
|
+
height: 48
|
|
4086
|
+
}) }),
|
|
4087
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.accordionTitleAndInfo, children: [
|
|
4088
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: childItem.title }),
|
|
4089
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: childItem.info })
|
|
4090
|
+
] }),
|
|
4091
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: childItem.title })
|
|
4092
|
+
]
|
|
4093
|
+
},
|
|
4094
|
+
childIndex
|
|
4095
|
+
)) })
|
|
4096
|
+
] }, index);
|
|
4097
|
+
} else if (item.type === "radio") {
|
|
4098
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4099
|
+
"div",
|
|
4100
|
+
{
|
|
4101
|
+
className: reactComponents.mergeClasses(styles.accordionHeader, styles.accordionItem),
|
|
4102
|
+
style: { padding: reactComponents.tokens.spacingHorizontalXS },
|
|
4103
|
+
children: [
|
|
4104
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: 2 }, children: imageRenderer({ src: item.image, alt: item.title, width: 74, height: 74 }) }),
|
|
4105
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.accordionTitleAndInfo, style: { marginLeft: 18 }, children: [
|
|
4106
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.title }),
|
|
4107
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: item.info })
|
|
4108
|
+
] }),
|
|
4109
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: item.title })
|
|
4110
|
+
]
|
|
4111
|
+
},
|
|
4112
|
+
index
|
|
4113
|
+
);
|
|
4114
|
+
}
|
|
4115
|
+
return null;
|
|
4116
|
+
})
|
|
4117
|
+
}
|
|
4118
|
+
)
|
|
4119
|
+
}
|
|
4120
|
+
),
|
|
4121
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.footer, children: [
|
|
4122
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Button, { appearance: "secondary", shape: "circular", onClick: onClose, children: "Batal" }),
|
|
4123
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4124
|
+
reactComponents.Button,
|
|
4125
|
+
{
|
|
4126
|
+
appearance: "primary",
|
|
4127
|
+
shape: "circular",
|
|
4128
|
+
onClick: handleConfirm,
|
|
4129
|
+
disabled: !selectedServiceTitle,
|
|
4130
|
+
children: "Simpan"
|
|
4131
|
+
}
|
|
4132
|
+
)
|
|
4133
|
+
] })
|
|
4134
|
+
] })
|
|
4135
|
+
] }) })
|
|
4136
|
+
}
|
|
4137
|
+
);
|
|
4138
|
+
};
|
|
4139
|
+
|
|
4140
|
+
// src/components/ModalTypeOfService/constants.ts
|
|
4141
|
+
var DEFAULT_VEHICLE_ICONS = {
|
|
4142
|
+
pedestrian: "/assets/images/icons/pedestrian.webp",
|
|
4143
|
+
roadbike: "/assets/images/icons/roadbike.webp",
|
|
4144
|
+
motorbike1: "/assets/images/icons/motorbike-1.webp",
|
|
4145
|
+
motorbike2: "/assets/images/icons/motorbike-2.svg",
|
|
4146
|
+
smallCar: "/assets/images/icons/small-car.webp",
|
|
4147
|
+
smallBus: "/assets/images/icons/small-bus.webp",
|
|
4148
|
+
bigBus: "/assets/images/icons/big-bus.webp",
|
|
4149
|
+
truck: "/assets/images/icons/truck.webp",
|
|
4150
|
+
bigTruck: "/assets/images/icons/big-truck.webp",
|
|
4151
|
+
looseLoad: "/assets/images/icons/loose-load.webp"
|
|
4152
|
+
};
|
|
3884
4153
|
|
|
3885
4154
|
exports.BackgroundTicketCard = BackgroundTicketCard_default;
|
|
3886
4155
|
exports.BackgroundTicketCardVertical = BackgroundTicketCardVertical_default;
|
|
@@ -3891,6 +4160,7 @@ exports.CardTicket = CardTicket;
|
|
|
3891
4160
|
exports.CarouselWithCustomNav = CarouselWithCustomNav;
|
|
3892
4161
|
exports.DEFAULT_COUNTRY_CODES = DEFAULT_COUNTRY_CODES2;
|
|
3893
4162
|
exports.DEFAULT_SERVICE_CLASSES = DEFAULT_SERVICE_CLASSES;
|
|
4163
|
+
exports.DEFAULT_VEHICLE_ICONS = DEFAULT_VEHICLE_ICONS;
|
|
3894
4164
|
exports.InputDynamic = InputDynamic_default;
|
|
3895
4165
|
exports.MODAL_PRESETS = MODAL_PRESETS;
|
|
3896
4166
|
exports.ModalIllustration = ModalIllustration;
|
|
@@ -3898,6 +4168,7 @@ exports.ModalSearchHarbor = ModalSearchHarbor;
|
|
|
3898
4168
|
exports.ModalSelectDate = ModalSelectDate;
|
|
3899
4169
|
exports.ModalService = ModalService;
|
|
3900
4170
|
exports.ModalTotalPassengers = ModalTotalPassengers;
|
|
4171
|
+
exports.ModalTypeOfService = ModalTypeOfService;
|
|
3901
4172
|
exports.getModalPreset = getModalPreset;
|
|
3902
4173
|
//# sourceMappingURL=index.js.map
|
|
3903
4174
|
//# sourceMappingURL=index.js.map
|