@asdp/ferryui 0.1.22-dev.8523 → 0.1.22-dev.8568

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,4 +1,4 @@
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, Subtitle1, Switch, Body1Stronger, Caption1Stronger, Display, Image, Title1, typographyStyles, Textarea, Link } 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, Subtitle1, Switch, Body1Stronger, Caption1Stronger, Display, Image, Title1, DialogTrigger, TabList, Tab, Body2, typographyStyles, Textarea, Link } from '@fluentui/react-components';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React5, { forwardRef, useState, useCallback, useRef, useEffect, useMemo, Fragment as Fragment$1 } from 'react';
4
4
  import { Row, Col, Visible } from 'react-grid-system';
@@ -8928,34 +8928,6 @@ var CardReview = ({
8928
8928
  ] })
8929
8929
  ] });
8930
8930
  };
8931
- var getBadgeConfig2 = (ticketClass) => {
8932
- const normalizedClass = ticketClass?.toUpperCase();
8933
- switch (normalizedClass) {
8934
- case "EKONOMI":
8935
- case "ECONOMY":
8936
- return {
8937
- color: "#A74109",
8938
- icon: "/assets/images/class/shield_badge_ekonomi.svg"
8939
- };
8940
- case "BISNIS":
8941
- case "BUSINESS":
8942
- return {
8943
- color: "#859599",
8944
- icon: "/assets/images/class/ribbon_badge_bisnis.svg"
8945
- };
8946
- case "EKSEKUTIF":
8947
- case "EXECUTIVE":
8948
- return {
8949
- color: "#C19C00",
8950
- icon: "/assets/images/class/crown_badge_eksekutif.svg"
8951
- };
8952
- default:
8953
- return {
8954
- color: tokens.colorNeutralBackground3,
8955
- icon: ""
8956
- };
8957
- }
8958
- };
8959
8931
  var useStyles30 = makeStyles({
8960
8932
  card: {
8961
8933
  padding: "1.5rem",
@@ -9059,7 +9031,7 @@ var CardReviewPassenger = ({
9059
9031
  /* @__PURE__ */ jsx("div", { className: styles.headerLine })
9060
9032
  ] }),
9061
9033
  /* @__PURE__ */ jsx("div", { className: styles.contentContainer, children: passengers.map((passenger, index) => {
9062
- const badgeConfig = getBadgeConfig2(passenger.serviceClass);
9034
+ const badgeConfig = getBadgeConfig(passenger.serviceClass);
9063
9035
  return /* @__PURE__ */ jsxs("div", { className: styles.passengerItem, children: [
9064
9036
  /* @__PURE__ */ jsxs("div", { className: styles.itemHeader, children: [
9065
9037
  /* @__PURE__ */ jsx(Subtitle2, { className: styles.name, children: passenger.name }),
@@ -9721,7 +9693,300 @@ var CardStatusOrder = ({
9721
9693
  ) }) })
9722
9694
  ] }) });
9723
9695
  };
9696
+ var useStyles37 = makeStyles({
9697
+ surface: {
9698
+ width: "680px",
9699
+ maxWidth: "90vw",
9700
+ ...shorthands.padding(tokens.spacingVerticalL, tokens.spacingHorizontalL),
9701
+ borderRadius: tokens.borderRadiusXLarge
9702
+ },
9703
+ dialogTitle: {
9704
+ "& h2": {
9705
+ fontSize: tokens.fontSizeBase600,
9706
+ fontWeight: tokens.fontWeightSemibold
9707
+ }
9708
+ },
9709
+ card: {
9710
+ backgroundColor: tokens.colorNeutralBackground1,
9711
+ ...shorthands.border("1px", "solid", tokens.colorNeutralStroke2),
9712
+ ...shorthands.padding(tokens.spacingVerticalXXL, tokens.spacingHorizontalXXL),
9713
+ boxShadow: "none"
9714
+ },
9715
+ content: {
9716
+ display: "flex",
9717
+ flexDirection: "column",
9718
+ gap: tokens.spacingVerticalL
9719
+ },
9720
+ section: {
9721
+ display: "flex",
9722
+ flexDirection: "column",
9723
+ gap: tokens.spacingVerticalS
9724
+ },
9725
+ row: {
9726
+ display: "flex",
9727
+ justifyContent: "space-between",
9728
+ alignItems: "center"
9729
+ },
9730
+ vehicleTitle: {
9731
+ fontSize: tokens.fontSizeBase500,
9732
+ fontWeight: tokens.fontWeightSemibold,
9733
+ color: tokens.colorNeutralForeground4
9734
+ },
9735
+ passengerDetail: {
9736
+ color: tokens.colorNeutralForeground4,
9737
+ fontSize: tokens.fontSizeBase200,
9738
+ marginTop: tokens.spacingVerticalXS
9739
+ },
9740
+ addonHeader: {
9741
+ fontSize: tokens.fontSizeBase500,
9742
+ fontWeight: tokens.fontWeightSemibold,
9743
+ color: tokens.colorNeutralForeground1,
9744
+ marginTop: tokens.spacingVerticalM
9745
+ },
9746
+ priceValue: {
9747
+ color: tokens.colorNeutralForeground4,
9748
+ fontSize: tokens.fontSizeBase300
9749
+ },
9750
+ itemLabel: {
9751
+ color: tokens.colorNeutralForeground4,
9752
+ fontSize: tokens.fontSizeBase300
9753
+ },
9754
+ totalLabel: {
9755
+ color: tokens.colorNeutralForeground4,
9756
+ fontSize: tokens.fontSizeBase400
9757
+ },
9758
+ totalValue: {
9759
+ color: tokens.colorNeutralForeground4,
9760
+ fontSize: tokens.fontSizeBase400
9761
+ },
9762
+ totalTagihanLabel: {
9763
+ color: tokens.colorNeutralForeground1,
9764
+ fontWeight: tokens.fontWeightSemibold,
9765
+ fontSize: tokens.fontSizeBase400
9766
+ },
9767
+ totalTagihanValue: {
9768
+ color: tokens.colorNeutralForeground1,
9769
+ fontWeight: tokens.fontWeightSemibold,
9770
+ fontSize: tokens.fontSizeBase400
9771
+ },
9772
+ ppnLabel: {
9773
+ color: tokens.colorNeutralForeground4,
9774
+ fontSize: tokens.fontSizeBase400
9775
+ },
9776
+ ppnValue: {
9777
+ color: tokens.colorNeutralForeground4,
9778
+ fontSize: tokens.fontSizeBase400
9779
+ },
9780
+ ppnNote: {
9781
+ color: tokens.colorNeutralForeground4,
9782
+ fontSize: tokens.fontSizeBase100,
9783
+ fontStyle: "italic",
9784
+ marginTop: tokens.spacingVerticalXS
9785
+ },
9786
+ grandTotalLabel: {
9787
+ color: "#D13438",
9788
+ fontSize: tokens.fontSizeHero700,
9789
+ fontWeight: tokens.fontWeightSemibold
9790
+ },
9791
+ grandTotalValue: {
9792
+ color: "#D13438",
9793
+ fontSize: tokens.fontSizeHero800,
9794
+ fontWeight: tokens.fontWeightSemibold
9795
+ },
9796
+ badge: {
9797
+ marginLeft: tokens.spacingHorizontalS,
9798
+ backgroundColor: "#107C10",
9799
+ color: "white"
9800
+ },
9801
+ divider: {
9802
+ margin: `${tokens.spacingVerticalL} 0`
9803
+ },
9804
+ closeButton: {
9805
+ color: tokens.colorNeutralForeground1
9806
+ }
9807
+ });
9808
+ var ModalPriceDetail = ({
9809
+ isOpen,
9810
+ onOpenChange,
9811
+ detailItems,
9812
+ addonItems,
9813
+ subTotal,
9814
+ taxAmount,
9815
+ grandTotal,
9816
+ ...props
9817
+ }) => {
9818
+ const styles = useStyles37();
9819
+ return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (_, data) => onOpenChange(data.open), ...props, children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.surface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
9820
+ /* @__PURE__ */ jsx(
9821
+ DialogTitle,
9822
+ {
9823
+ className: styles.dialogTitle,
9824
+ action: /* @__PURE__ */ jsx(DialogTrigger, { action: "close", children: /* @__PURE__ */ jsx(
9825
+ Button,
9826
+ {
9827
+ appearance: "subtle",
9828
+ "aria-label": "close",
9829
+ icon: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
9830
+ "path",
9831
+ {
9832
+ d: "M18 6L6 18M6 6L18 18",
9833
+ stroke: "currentColor",
9834
+ strokeWidth: "2",
9835
+ strokeLinecap: "round",
9836
+ strokeLinejoin: "round"
9837
+ }
9838
+ ) })
9839
+ }
9840
+ ) }),
9841
+ children: "Rincian Harga"
9842
+ }
9843
+ ),
9844
+ /* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: /* @__PURE__ */ jsx(Card, { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
9845
+ detailItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
9846
+ /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
9847
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
9848
+ /* @__PURE__ */ jsx("span", { className: styles.vehicleTitle, children: item.label }),
9849
+ item.badge && /* @__PURE__ */ jsx(Badge, { size: "medium", shape: "rounded", className: styles.badge, children: item.badge })
9850
+ ] }),
9851
+ /* @__PURE__ */ jsxs("span", { className: styles.priceValue, children: [
9852
+ "Rp. ",
9853
+ item.price.toLocaleString("id-ID")
9854
+ ] })
9855
+ ] }),
9856
+ item.list && item.list.map((subItem) => /* @__PURE__ */ jsxs("div", { className: styles.passengerDetail, children: [
9857
+ /* @__PURE__ */ jsx("span", { children: subItem.label }),
9858
+ /* @__PURE__ */ jsxs("span", { style: { float: "right" }, children: [
9859
+ "IDR. ",
9860
+ item.price.toLocaleString("id-ID")
9861
+ ] })
9862
+ ] }, subItem.key))
9863
+ ] }, item.key)),
9864
+ addonItems.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
9865
+ /* @__PURE__ */ jsx("div", { className: styles.addonHeader, children: "Add On" }),
9866
+ addonItems.map((item) => /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
9867
+ /* @__PURE__ */ jsx("span", { className: styles.itemLabel, children: item.label }),
9868
+ /* @__PURE__ */ jsxs("span", { className: styles.priceValue, children: [
9869
+ "IDR. ",
9870
+ item.price.toLocaleString("id-ID")
9871
+ ] })
9872
+ ] }, item.key))
9873
+ ] }),
9874
+ /* @__PURE__ */ jsx(Divider, { className: styles.divider }),
9875
+ /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
9876
+ /* @__PURE__ */ jsx("span", { className: styles.totalLabel, children: "Sub Tagihan" }),
9877
+ /* @__PURE__ */ jsxs("span", { className: styles.totalValue, children: [
9878
+ "IDR.",
9879
+ subTotal.toLocaleString("id-ID")
9880
+ ] })
9881
+ ] }),
9882
+ /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
9883
+ /* @__PURE__ */ jsx("span", { className: styles.totalTagihanLabel, children: "Total Tagihan" }),
9884
+ /* @__PURE__ */ jsxs("span", { className: styles.totalTagihanValue, children: [
9885
+ "IDR.",
9886
+ subTotal.toLocaleString("id-ID")
9887
+ ] })
9888
+ ] }),
9889
+ /* @__PURE__ */ jsxs("div", { style: { marginTop: tokens.spacingVerticalL }, children: [
9890
+ /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
9891
+ /* @__PURE__ */ jsx("span", { className: styles.ppnLabel, children: "PPN (Pajak Pertambahan Nilai) 11%" }),
9892
+ /* @__PURE__ */ jsxs("span", { className: styles.ppnValue, children: [
9893
+ "IDR.",
9894
+ taxAmount.toLocaleString("id-ID")
9895
+ ] })
9896
+ ] }),
9897
+ /* @__PURE__ */ jsx("div", { className: styles.ppnNote, children: "*PPN 11% dikenakan untuk biaya layanan dan biaya admin" })
9898
+ ] }),
9899
+ /* @__PURE__ */ jsxs("div", { className: styles.row, style: { marginTop: tokens.spacingVerticalXXL }, children: [
9900
+ /* @__PURE__ */ jsx("span", { className: styles.grandTotalLabel, children: "Total Pembayaran" }),
9901
+ /* @__PURE__ */ jsxs("span", { className: styles.grandTotalValue, children: [
9902
+ "Rp.",
9903
+ grandTotal.toLocaleString("id-ID")
9904
+ ] })
9905
+ ] })
9906
+ ] }) }) })
9907
+ ] }) }) });
9908
+ };
9909
+ var useStyles38 = makeStyles({
9910
+ container: {
9911
+ display: "flex",
9912
+ flexDirection: "column",
9913
+ backgroundColor: tokens.colorNeutralBackground1,
9914
+ ...shorthands.padding(tokens.spacingVerticalL),
9915
+ ...shorthands.border(tokens.strokeWidthThin, "solid", tokens.colorNeutralStroke1),
9916
+ borderRadius: tokens.borderRadiusXLarge,
9917
+ rowGap: tokens.spacingHorizontalXXL,
9918
+ width: "100%"
9919
+ },
9920
+ sectionList: {
9921
+ display: "flex",
9922
+ flexDirection: "column",
9923
+ rowGap: tokens.spacingHorizontalXXL
9924
+ },
9925
+ sectionGap: {
9926
+ display: "flex",
9927
+ flexDirection: "column",
9928
+ rowGap: tokens.spacingVerticalM
9929
+ },
9930
+ labelTab: {
9931
+ fontWeight: tokens.fontWeightMedium,
9932
+ paddingLeft: tokens.spacingHorizontalMNudge
9933
+ },
9934
+ tabItem: {
9935
+ '&[aria-selected="false"]': {
9936
+ backgroundColor: "transparent"
9937
+ },
9938
+ '&[aria-selected="true"]': {
9939
+ // brandColors[140] approx #EBF3FC (light blue)
9940
+ // brandColors[80] approx #0F6CBD (primary blue)
9941
+ // Using generic tokens or hardcoded fallback if brand tokens not available here
9942
+ backgroundColor: tokens.colorBrandBackground2,
9943
+ color: tokens.colorBrandForeground1
9944
+ },
9945
+ justifyContent: "flex-start"
9946
+ },
9947
+ tabItemLogout: {
9948
+ color: tokens.colorPaletteRedForeground1,
9949
+ backgroundColor: "transparent",
9950
+ justifyContent: "flex-start",
9951
+ "&:hover": {
9952
+ color: tokens.colorPaletteRedForeground1
9953
+ }
9954
+ }
9955
+ });
9956
+ var CardProfileMenu = ({
9957
+ sections,
9958
+ selectedValue,
9959
+ onTabSelect
9960
+ }) => {
9961
+ const styles = useStyles38();
9962
+ const handleTabSelect = (_, data) => {
9963
+ onTabSelect(data.value);
9964
+ };
9965
+ return /* @__PURE__ */ jsx("div", { className: styles.container, children: /* @__PURE__ */ jsx(
9966
+ TabList,
9967
+ {
9968
+ vertical: true,
9969
+ appearance: "filled-circular",
9970
+ selectedValue,
9971
+ onTabSelect: handleTabSelect,
9972
+ children: /* @__PURE__ */ jsx("div", { className: styles.sectionList, children: sections.map((section, sectionIndex) => /* @__PURE__ */ jsxs("div", { className: styles.sectionGap, children: [
9973
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Subtitle1, { className: styles.labelTab, children: section.sectionLabel }) }),
9974
+ section.tabs.map((tab) => /* @__PURE__ */ jsx(
9975
+ Tab,
9976
+ {
9977
+ id: tab.value,
9978
+ value: tab.value,
9979
+ icon: /* @__PURE__ */ jsx(Icon, { icon: tab.icon, width: 20, height: 20 }),
9980
+ className: tab.value === "/logout" ? styles.tabItemLogout : styles.tabItem,
9981
+ children: /* @__PURE__ */ jsx(Body2, { children: tab.label })
9982
+ },
9983
+ tab.value
9984
+ ))
9985
+ ] }, sectionIndex)) })
9986
+ }
9987
+ ) });
9988
+ };
9724
9989
 
9725
- export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS2 as CardTicketSearchSummaryDefaultLabels, CardVehicleDetail, CardVehicleOwnerForm, 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, ModalListPassenger, ModalPassengerForm, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, PriceDetailsTerms, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
9990
+ export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardProfileMenu, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS2 as CardTicketSearchSummaryDefaultLabels, CardVehicleDetail, CardVehicleOwnerForm, 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, ModalListPassenger, ModalPassengerForm, ModalPriceDetail, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
9726
9991
  //# sourceMappingURL=index.mjs.map
9727
9992
  //# sourceMappingURL=index.mjs.map