@asdp/ferryui 0.1.22-dev.10593 → 0.1.22-dev.10665
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 +32 -3
- package/dist/index.d.ts +32 -3
- package/dist/index.js +179 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, InfoLabel, Body1, Body1Strong, Caption1, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Spinner, Label, Text, Subtitle1, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Menu, MenuTrigger, MenuPopover, MenuList, Radio, DialogActions, Caption2Strong, Body2, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, typographyStyles, Switch, Textarea
|
|
1
|
+
import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, InfoLabel, Body1, Body1Strong, Caption1, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Spinner, Label, Text, Subtitle1, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Menu, MenuTrigger, MenuPopover, MenuList, Radio, DialogActions, Caption2Strong, Link, Body2, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React, { forwardRef, useState, useRef, useEffect, useCallback, useMemo, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { ArrowDownloadRegular, Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular, SearchRegular } from '@fluentui/react-icons';
|
|
@@ -10777,13 +10777,27 @@ var DEFAULT_LABELS21 = {
|
|
|
10777
10777
|
title: "Informasi Pemesan",
|
|
10778
10778
|
ordererName: "Nama Pemesan",
|
|
10779
10779
|
phoneNumber: "Nomor Handphone",
|
|
10780
|
-
email: "Email"
|
|
10780
|
+
email: "Email",
|
|
10781
|
+
addCcEmail: "Tambahkan Cc Email",
|
|
10782
|
+
ccEmail: "CC Email",
|
|
10783
|
+
ccEmailPlaceholder: "Masukkan email",
|
|
10784
|
+
ccEmailHint: "E-Tiket akan di kirim ke email ini",
|
|
10785
|
+
notificationLabel: "Pilih pengiriman notifkasi",
|
|
10786
|
+
whatsapp: "WhatsApp",
|
|
10787
|
+
sms: "SMS"
|
|
10781
10788
|
},
|
|
10782
10789
|
en: {
|
|
10783
10790
|
title: "Orderer Information",
|
|
10784
10791
|
ordererName: "Orderer Name",
|
|
10785
10792
|
phoneNumber: "Phone Number",
|
|
10786
|
-
email: "Email"
|
|
10793
|
+
email: "Email",
|
|
10794
|
+
addCcEmail: "Add Cc Email",
|
|
10795
|
+
ccEmail: "CC Email",
|
|
10796
|
+
ccEmailPlaceholder: "Enter email",
|
|
10797
|
+
ccEmailHint: "E-Ticket will be sent to this email",
|
|
10798
|
+
notificationLabel: "Select notification delivery",
|
|
10799
|
+
whatsapp: "WhatsApp",
|
|
10800
|
+
sms: "SMS"
|
|
10787
10801
|
}
|
|
10788
10802
|
};
|
|
10789
10803
|
var useStyles22 = makeStyles({
|
|
@@ -10793,46 +10807,169 @@ var useStyles22 = makeStyles({
|
|
|
10793
10807
|
boxShadow: tokens.shadow4,
|
|
10794
10808
|
zIndex: 3
|
|
10795
10809
|
},
|
|
10796
|
-
|
|
10810
|
+
header: {
|
|
10797
10811
|
display: "flex",
|
|
10798
|
-
|
|
10799
|
-
|
|
10812
|
+
alignItems: "center",
|
|
10813
|
+
gap: "1rem",
|
|
10814
|
+
marginBottom: "1.25rem"
|
|
10815
|
+
},
|
|
10816
|
+
title: {
|
|
10817
|
+
flexShrink: 0
|
|
10818
|
+
},
|
|
10819
|
+
divider: {
|
|
10820
|
+
flexGrow: 1
|
|
10800
10821
|
},
|
|
10801
10822
|
fieldGroup: {
|
|
10802
10823
|
display: "flex",
|
|
10803
10824
|
flexDirection: "column",
|
|
10804
|
-
gap: "0.25rem"
|
|
10825
|
+
gap: "0.25rem",
|
|
10826
|
+
flex: 1
|
|
10805
10827
|
},
|
|
10806
10828
|
label: {
|
|
10807
10829
|
color: tokens.colorNeutralForeground2
|
|
10808
10830
|
},
|
|
10809
10831
|
value: {
|
|
10810
10832
|
color: tokensV2_default.lightModeColors.Neutral_Foreground_Disabled_Rest
|
|
10833
|
+
},
|
|
10834
|
+
addCcLink: {
|
|
10835
|
+
marginTop: "0.375rem"
|
|
10836
|
+
},
|
|
10837
|
+
bottomRow: {
|
|
10838
|
+
display: "flex",
|
|
10839
|
+
flexDirection: "row",
|
|
10840
|
+
gap: "2rem",
|
|
10841
|
+
marginTop: "1.25rem",
|
|
10842
|
+
alignItems: "flex-start"
|
|
10843
|
+
},
|
|
10844
|
+
// Notification section aligns under the first column (Nama Pemesan)
|
|
10845
|
+
notificationSection: {
|
|
10846
|
+
flex: 1,
|
|
10847
|
+
display: "flex",
|
|
10848
|
+
flexDirection: "column"
|
|
10849
|
+
},
|
|
10850
|
+
notificationLabel: {
|
|
10851
|
+
color: tokens.colorNeutralForeground2,
|
|
10852
|
+
display: "block",
|
|
10853
|
+
marginBottom: "0.5rem"
|
|
10854
|
+
},
|
|
10855
|
+
// CC section spans the remaining two columns (Phone + Email)
|
|
10856
|
+
ccSection: {
|
|
10857
|
+
flex: 1,
|
|
10858
|
+
display: "flex",
|
|
10859
|
+
flexDirection: "column",
|
|
10860
|
+
gap: "0.375rem"
|
|
10861
|
+
},
|
|
10862
|
+
ccLabel: {
|
|
10863
|
+
color: tokens.colorNeutralForeground2
|
|
10864
|
+
},
|
|
10865
|
+
ccInputRow: {
|
|
10866
|
+
display: "flex",
|
|
10867
|
+
alignItems: "center"
|
|
10868
|
+
},
|
|
10869
|
+
ccInput: {
|
|
10870
|
+
flex: 1
|
|
10871
|
+
},
|
|
10872
|
+
deleteButton: {
|
|
10873
|
+
color: tokens.colorStatusDangerForeground1,
|
|
10874
|
+
minWidth: "unset",
|
|
10875
|
+
padding: "0 0.5rem"
|
|
10876
|
+
},
|
|
10877
|
+
ccHint: {
|
|
10878
|
+
color: tokensV2_default.lightModeColors.Neutral_Foreground_Disabled_Rest
|
|
10811
10879
|
}
|
|
10812
10880
|
});
|
|
10813
10881
|
var CardOrdererInfo = ({
|
|
10814
10882
|
language = "id",
|
|
10815
10883
|
orderer,
|
|
10816
10884
|
labels,
|
|
10817
|
-
className
|
|
10885
|
+
className,
|
|
10886
|
+
ccEmail,
|
|
10887
|
+
onCcEmailChange,
|
|
10888
|
+
onCcEmailRemove,
|
|
10889
|
+
notificationType: notificationTypeProp = "whatsapp",
|
|
10890
|
+
onNotificationTypeChange
|
|
10818
10891
|
}) => {
|
|
10819
10892
|
const styles = useStyles22();
|
|
10820
10893
|
const mergedLabels = { ...DEFAULT_LABELS21[language], ...labels };
|
|
10894
|
+
const [showCcForm, setShowCcForm] = useState(false);
|
|
10895
|
+
const [notificationType, setNotificationType] = useState(notificationTypeProp);
|
|
10896
|
+
const handleNotificationChange = (_e, data) => {
|
|
10897
|
+
const value = data.value;
|
|
10898
|
+
setNotificationType(value);
|
|
10899
|
+
onNotificationTypeChange?.(value);
|
|
10900
|
+
};
|
|
10901
|
+
const handleAddCcClick = () => {
|
|
10902
|
+
setShowCcForm(true);
|
|
10903
|
+
};
|
|
10904
|
+
const handleRemoveCc = () => {
|
|
10905
|
+
setShowCcForm(false);
|
|
10906
|
+
onCcEmailChange?.("");
|
|
10907
|
+
onCcEmailRemove?.();
|
|
10908
|
+
};
|
|
10821
10909
|
return /* @__PURE__ */ jsxs(Card, { className: className || styles.card, children: [
|
|
10822
|
-
/* @__PURE__ */
|
|
10823
|
-
|
|
10824
|
-
/* @__PURE__ */
|
|
10825
|
-
|
|
10910
|
+
/* @__PURE__ */ jsxs("div", { className: styles.header, children: [
|
|
10911
|
+
/* @__PURE__ */ jsx(Title3, { className: styles.title, children: mergedLabels.title }),
|
|
10912
|
+
/* @__PURE__ */ jsx(Divider, { className: styles.divider })
|
|
10913
|
+
] }),
|
|
10914
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
10915
|
+
/* @__PURE__ */ jsx(Col, { md: 4, children: /* @__PURE__ */ jsxs("div", { className: styles.fieldGroup, children: [
|
|
10916
|
+
/* @__PURE__ */ jsx(Caption1, { className: styles.label, children: mergedLabels.ordererName }),
|
|
10826
10917
|
/* @__PURE__ */ jsx(Body1, { className: styles.value, children: orderer?.name || "-" })
|
|
10827
|
-
] }),
|
|
10828
|
-
/* @__PURE__ */ jsxs("div", { className: styles.fieldGroup, children: [
|
|
10829
|
-
/* @__PURE__ */ jsx(
|
|
10918
|
+
] }) }),
|
|
10919
|
+
/* @__PURE__ */ jsx(Col, { md: 4, children: /* @__PURE__ */ jsxs("div", { className: styles.fieldGroup, children: [
|
|
10920
|
+
/* @__PURE__ */ jsx(Caption1, { className: styles.label, children: mergedLabels.phoneNumber }),
|
|
10830
10921
|
/* @__PURE__ */ jsx(Body1, { className: styles.value, children: orderer?.phoneNumber || "-" })
|
|
10831
|
-
] }),
|
|
10832
|
-
/* @__PURE__ */ jsxs("div", { className: styles.fieldGroup, children: [
|
|
10833
|
-
/* @__PURE__ */ jsx(
|
|
10834
|
-
/* @__PURE__ */ jsx(Body1, { className: styles.value, children: orderer?.email || "-" })
|
|
10835
|
-
|
|
10922
|
+
] }) }),
|
|
10923
|
+
/* @__PURE__ */ jsx(Col, { md: 4, children: /* @__PURE__ */ jsxs("div", { className: styles.fieldGroup, children: [
|
|
10924
|
+
/* @__PURE__ */ jsx(Caption1, { className: styles.label, children: mergedLabels.email }),
|
|
10925
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.value, children: orderer?.email || "-" }),
|
|
10926
|
+
!showCcForm && /* @__PURE__ */ jsx(Link, { className: styles.addCcLink, onClick: handleAddCcClick, children: mergedLabels.addCcEmail })
|
|
10927
|
+
] }) }),
|
|
10928
|
+
/* @__PURE__ */ jsx(Col, { md: 4, children: /* @__PURE__ */ jsxs("div", { className: styles.notificationSection, children: [
|
|
10929
|
+
/* @__PURE__ */ jsx(Body2, { className: styles.notificationLabel, children: mergedLabels.notificationLabel }),
|
|
10930
|
+
/* @__PURE__ */ jsxs(
|
|
10931
|
+
RadioGroup,
|
|
10932
|
+
{
|
|
10933
|
+
layout: "horizontal",
|
|
10934
|
+
value: notificationType,
|
|
10935
|
+
onChange: handleNotificationChange,
|
|
10936
|
+
children: [
|
|
10937
|
+
/* @__PURE__ */ jsx(Radio, { value: "whatsapp", label: mergedLabels.whatsapp }),
|
|
10938
|
+
/* @__PURE__ */ jsx(Radio, { value: "sms", label: mergedLabels.sms })
|
|
10939
|
+
]
|
|
10940
|
+
}
|
|
10941
|
+
)
|
|
10942
|
+
] }) }),
|
|
10943
|
+
/* @__PURE__ */ jsx(Col, { md: 4, children: /* @__PURE__ */ jsx("div", { className: styles.ccSection, children: showCcForm && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10944
|
+
/* @__PURE__ */ jsx(Caption1, { className: styles.ccLabel, children: mergedLabels.ccEmail }),
|
|
10945
|
+
/* @__PURE__ */ jsx("div", { className: styles.ccInputRow, children: /* @__PURE__ */ jsx(
|
|
10946
|
+
Input,
|
|
10947
|
+
{
|
|
10948
|
+
className: styles.ccInput,
|
|
10949
|
+
type: "email",
|
|
10950
|
+
placeholder: mergedLabels.ccEmailPlaceholder,
|
|
10951
|
+
value: ccEmail ?? "",
|
|
10952
|
+
onChange: (_e, data) => onCcEmailChange?.(data.value),
|
|
10953
|
+
contentAfter: /* @__PURE__ */ jsx(
|
|
10954
|
+
Button,
|
|
10955
|
+
{
|
|
10956
|
+
appearance: "transparent",
|
|
10957
|
+
className: styles.deleteButton,
|
|
10958
|
+
onClick: handleRemoveCc,
|
|
10959
|
+
icon: /* @__PURE__ */ jsx(
|
|
10960
|
+
Icon,
|
|
10961
|
+
{
|
|
10962
|
+
icon: "fluent:delete-24-regular",
|
|
10963
|
+
color: tokens.colorStatusDangerForeground1,
|
|
10964
|
+
width: 18
|
|
10965
|
+
}
|
|
10966
|
+
)
|
|
10967
|
+
}
|
|
10968
|
+
)
|
|
10969
|
+
}
|
|
10970
|
+
) }),
|
|
10971
|
+
/* @__PURE__ */ jsx(Caption2, { className: styles.ccHint, children: mergedLabels.ccEmailHint })
|
|
10972
|
+
] }) }) })
|
|
10836
10973
|
] })
|
|
10837
10974
|
] });
|
|
10838
10975
|
};
|
|
@@ -14509,22 +14646,22 @@ var CardBookingAddOn = ({
|
|
|
14509
14646
|
const styles = useStyles29();
|
|
14510
14647
|
const mergedLabels = { ...DEFAULT_LABELS28[language], ...labels };
|
|
14511
14648
|
const addOnRows = [
|
|
14512
|
-
{
|
|
14649
|
+
addOnData?.lounge && {
|
|
14513
14650
|
key: "lounge",
|
|
14514
|
-
label: addOnData
|
|
14515
|
-
price: addOnData
|
|
14651
|
+
label: addOnData.lounge.label || mergedLabels.loungeLabel,
|
|
14652
|
+
price: addOnData.lounge.price
|
|
14516
14653
|
},
|
|
14517
|
-
{
|
|
14654
|
+
addOnData?.assurance && {
|
|
14518
14655
|
key: "assurance",
|
|
14519
|
-
label: addOnData
|
|
14520
|
-
price: addOnData
|
|
14656
|
+
label: addOnData.assurance.label || mergedLabels.assuranceLabel,
|
|
14657
|
+
price: addOnData.assurance.price
|
|
14521
14658
|
},
|
|
14522
|
-
{
|
|
14659
|
+
addOnData?.meal && {
|
|
14523
14660
|
key: "meal",
|
|
14524
|
-
label: addOnData
|
|
14525
|
-
price: addOnData
|
|
14661
|
+
label: addOnData.meal.label || mergedLabels.mealLabel,
|
|
14662
|
+
price: addOnData.meal.price
|
|
14526
14663
|
}
|
|
14527
|
-
];
|
|
14664
|
+
].filter(Boolean);
|
|
14528
14665
|
return /* @__PURE__ */ jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.bookingDetail, children: [
|
|
14529
14666
|
/* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailTop, children: [
|
|
14530
14667
|
/* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.bookingDetails }),
|
|
@@ -15543,6 +15680,16 @@ var useStyles34 = makeStyles({
|
|
|
15543
15680
|
flexDirection: "column",
|
|
15544
15681
|
rowGap: tokens.spacingVerticalL
|
|
15545
15682
|
},
|
|
15683
|
+
passengerList: {
|
|
15684
|
+
display: "flex",
|
|
15685
|
+
flexDirection: "column",
|
|
15686
|
+
rowGap: tokens.spacingVerticalL
|
|
15687
|
+
},
|
|
15688
|
+
passengerListScrollable: {
|
|
15689
|
+
maxHeight: "560px",
|
|
15690
|
+
overflowY: "auto",
|
|
15691
|
+
paddingRight: tokens.spacingHorizontalXS
|
|
15692
|
+
},
|
|
15546
15693
|
passengerCard: {
|
|
15547
15694
|
boxShadow: "none",
|
|
15548
15695
|
border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
|
|
@@ -15601,12 +15748,13 @@ var CardReviewPassenger = ({
|
|
|
15601
15748
|
const styles = useStyles34();
|
|
15602
15749
|
const mergedLabels = { ...DEFAULT_LABELS33[language], ...labels };
|
|
15603
15750
|
const displayTitle = title || mergedLabels.title;
|
|
15751
|
+
const isScrollable = !isLoading && passengers.length > 5;
|
|
15604
15752
|
return /* @__PURE__ */ jsx(Card, { className: `${styles.card} ${className || ""}`, children: /* @__PURE__ */ jsxs(Row, { direction: "column", nogutter: true, className: styles.list, children: [
|
|
15605
15753
|
/* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.titleRow, children: [
|
|
15606
15754
|
/* @__PURE__ */ jsx(Subtitle1, { children: displayTitle }),
|
|
15607
15755
|
/* @__PURE__ */ jsx(Divider, { className: styles.titleDivider })
|
|
15608
15756
|
] }) }),
|
|
15609
|
-
isLoading ? Array.from({ length: 2 }).map((_, index) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Card, { className: styles.passengerCard, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.passengerRow, children: [
|
|
15757
|
+
/* @__PURE__ */ jsx("div", { className: `${styles.passengerList} ${isScrollable ? styles.passengerListScrollable : ""}`, children: isLoading ? Array.from({ length: 2 }).map((_, index) => /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Card, { className: styles.passengerCard, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.passengerRow, children: [
|
|
15610
15758
|
/* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsxs(Skeleton, { children: [
|
|
15611
15759
|
/* @__PURE__ */ jsx(SkeletonItem, { style: { width: "180px", height: "18px", marginBottom: "8px" } }),
|
|
15612
15760
|
/* @__PURE__ */ jsx(SkeletonItem, { style: { width: "220px", height: "16px" } })
|
|
@@ -15644,7 +15792,7 @@ var CardReviewPassenger = ({
|
|
|
15644
15792
|
}
|
|
15645
15793
|
) })
|
|
15646
15794
|
] }) }) }, passenger.id || index);
|
|
15647
|
-
})
|
|
15795
|
+
}) })
|
|
15648
15796
|
] }) });
|
|
15649
15797
|
};
|
|
15650
15798
|
|