@asdp/ferryui 0.1.22-dev.9767 → 0.1.22-dev.9789
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.js +43 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1700,7 +1700,7 @@ var CardTicket = ({
|
|
|
1700
1700
|
},
|
|
1701
1701
|
children: [
|
|
1702
1702
|
/* @__PURE__ */ jsx(Subtitle2, { children: mergedLabels.totalPriceLabel }),
|
|
1703
|
-
/* @__PURE__ */
|
|
1703
|
+
/* @__PURE__ */ jsx(
|
|
1704
1704
|
Title3,
|
|
1705
1705
|
{
|
|
1706
1706
|
style: {
|
|
@@ -1708,11 +1708,7 @@ var CardTicket = ({
|
|
|
1708
1708
|
flex: "column",
|
|
1709
1709
|
justifyContent: "end"
|
|
1710
1710
|
},
|
|
1711
|
-
children:
|
|
1712
|
-
mergedLabels.currencySymbol,
|
|
1713
|
-
"\xA0",
|
|
1714
|
-
departureItem?.billingDetail?.total?.formatted
|
|
1715
|
-
]
|
|
1711
|
+
children: departureItem?.billingDetail?.total?.formatted
|
|
1716
1712
|
}
|
|
1717
1713
|
)
|
|
1718
1714
|
]
|
|
@@ -4251,14 +4247,29 @@ var InputDynamic = ({
|
|
|
4251
4247
|
const shouldFocusRef = useRef(false);
|
|
4252
4248
|
const isBackspaceNavigationRef = useRef(false);
|
|
4253
4249
|
const rawEmailOrPhoneInputRef = useRef("");
|
|
4250
|
+
const wrapperRef = useRef(null);
|
|
4254
4251
|
const [selectPortalTarget, setSelectPortalTarget] = useState(null);
|
|
4252
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
4253
|
+
const [isInsideDialog, setIsInsideDialog] = useState(false);
|
|
4255
4254
|
useEffect(() => {
|
|
4256
|
-
if (typeof document
|
|
4257
|
-
|
|
4258
|
-
|
|
4255
|
+
if (typeof document === "undefined" || typeof window === "undefined") return;
|
|
4256
|
+
const provider = document.querySelector(
|
|
4257
|
+
".fui-FluentProvider"
|
|
4258
|
+
);
|
|
4259
|
+
setSelectPortalTarget(provider ?? document.body);
|
|
4260
|
+
const MOBILE_BREAKPOINT = 768;
|
|
4261
|
+
const checkMobile = () => setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4262
|
+
checkMobile();
|
|
4263
|
+
window.addEventListener("resize", checkMobile);
|
|
4264
|
+
if (wrapperRef.current) {
|
|
4265
|
+
const dialog = wrapperRef.current.closest(
|
|
4266
|
+
".fui-DialogBody, [role='dialog']"
|
|
4259
4267
|
);
|
|
4260
|
-
|
|
4268
|
+
setIsInsideDialog(!!dialog);
|
|
4261
4269
|
}
|
|
4270
|
+
return () => {
|
|
4271
|
+
window.removeEventListener("resize", checkMobile);
|
|
4272
|
+
};
|
|
4262
4273
|
}, []);
|
|
4263
4274
|
const getPhoneInputValue = (val) => {
|
|
4264
4275
|
let cleaned = val.startsWith("+") ? stripNonDigits(val.substring(1)) : stripNonDigits(val);
|
|
@@ -4362,7 +4373,9 @@ var InputDynamic = ({
|
|
|
4362
4373
|
menuList: (provided) => ({
|
|
4363
4374
|
...provided,
|
|
4364
4375
|
padding: 0,
|
|
4365
|
-
|
|
4376
|
+
// On mobile inside a Dialog: limit height to 200px to prevent viewport overflow.
|
|
4377
|
+
// Otherwise keep 300px. Breakpoint: designTokens.breakpoints.md = 768px.
|
|
4378
|
+
maxHeight: isMobile && isInsideDialog ? "180px" : "300px",
|
|
4366
4379
|
/* Targetkan Webkit Scrollbar di menuList */
|
|
4367
4380
|
"&::-webkit-scrollbar": {
|
|
4368
4381
|
width: "8px",
|
|
@@ -5382,7 +5395,7 @@ var InputDynamic = ({
|
|
|
5382
5395
|
}
|
|
5383
5396
|
return rules;
|
|
5384
5397
|
};
|
|
5385
|
-
return /* @__PURE__ */ jsx(
|
|
5398
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: { display: "contents" }, children: /* @__PURE__ */ jsx(
|
|
5386
5399
|
Controller,
|
|
5387
5400
|
{
|
|
5388
5401
|
name,
|
|
@@ -5442,7 +5455,7 @@ var InputDynamic = ({
|
|
|
5442
5455
|
}
|
|
5443
5456
|
)
|
|
5444
5457
|
}
|
|
5445
|
-
);
|
|
5458
|
+
) });
|
|
5446
5459
|
};
|
|
5447
5460
|
var InputDynamic_default = InputDynamic;
|
|
5448
5461
|
|
|
@@ -5454,7 +5467,7 @@ var DEFAULT_LABELS8 = {
|
|
|
5454
5467
|
departureDateLabel: "Tanggal Berangkat",
|
|
5455
5468
|
returnDateLabel: "Tanggal Pulang",
|
|
5456
5469
|
serviceClassLabel: "Kelas Layanan",
|
|
5457
|
-
typeOfServiceLabel: "Jenis
|
|
5470
|
+
typeOfServiceLabel: "Jenis Penumpang",
|
|
5458
5471
|
passengerLabel: "Penumpang",
|
|
5459
5472
|
roundTripLabel: "Pulang Pergi",
|
|
5460
5473
|
searchButton: "Cari Tiket",
|
|
@@ -5463,7 +5476,7 @@ var DEFAULT_LABELS8 = {
|
|
|
5463
5476
|
placeholderDepartureDate: "Pilih Tanggal Keberangkatan",
|
|
5464
5477
|
placeholderReturnDate: "Pilih Tanggal Kepulangan",
|
|
5465
5478
|
placeholderTypeClass: "Pilih Kelas Layanan",
|
|
5466
|
-
placeholderTypeService: "Pilih Jenis
|
|
5479
|
+
placeholderTypeService: "Pilih Jenis Penumpang",
|
|
5467
5480
|
placeholderPassenger: "Pilih Jumlah Penumpang",
|
|
5468
5481
|
errorOriginRequired: "Pelabuhan asal wajib diisi",
|
|
5469
5482
|
errorDestinationRequired: "Pelabuhan tujuan wajib diisi",
|
|
@@ -5482,7 +5495,7 @@ var DEFAULT_LABELS8 = {
|
|
|
5482
5495
|
departureDateLabel: "Departure Date",
|
|
5483
5496
|
returnDateLabel: "Return Date",
|
|
5484
5497
|
serviceClassLabel: "Service Class",
|
|
5485
|
-
typeOfServiceLabel: "
|
|
5498
|
+
typeOfServiceLabel: "Type Of Passenger",
|
|
5486
5499
|
passengerLabel: "Passenger",
|
|
5487
5500
|
roundTripLabel: "Round Trip",
|
|
5488
5501
|
searchButton: "Search Ticket",
|
|
@@ -6159,7 +6172,7 @@ var DEFAULT_LABELS9 = {
|
|
|
6159
6172
|
destinationHarbor: "Pelabuhan Tujuan",
|
|
6160
6173
|
departureDate: "Tanggal Keberangkatan",
|
|
6161
6174
|
serviceClass: "Kelas Layanan",
|
|
6162
|
-
typeOfService: "Jenis
|
|
6175
|
+
typeOfService: "Jenis Penumpang",
|
|
6163
6176
|
totalPassengers: "Jumlah Penumpang",
|
|
6164
6177
|
changeSearchButton: "Ganti Pencarian",
|
|
6165
6178
|
swapAriaLabel: "Tukar asal dan tujuan"
|
|
@@ -6169,7 +6182,7 @@ var DEFAULT_LABELS9 = {
|
|
|
6169
6182
|
destinationHarbor: "Destination Port",
|
|
6170
6183
|
departureDate: "Departure Date",
|
|
6171
6184
|
serviceClass: "Service Class",
|
|
6172
|
-
typeOfService: "
|
|
6185
|
+
typeOfService: "Type Of Passenger",
|
|
6173
6186
|
totalPassengers: "Total Passengers",
|
|
6174
6187
|
changeSearchButton: "Change Search",
|
|
6175
6188
|
swapAriaLabel: "Swap origin and destination"
|
|
@@ -8285,20 +8298,20 @@ var ModalTotalPassengers = ({
|
|
|
8285
8298
|
// src/components/ModalTypeOfService/ModalTypeOfService.constants.ts
|
|
8286
8299
|
var DEFAULT_LABELS15 = {
|
|
8287
8300
|
id: {
|
|
8288
|
-
title: "Pilih Jenis
|
|
8301
|
+
title: "Pilih Jenis Penumpang",
|
|
8289
8302
|
cancelButton: "Batal",
|
|
8290
8303
|
saveButton: "Simpan",
|
|
8291
8304
|
vehiclesAlt: "kendaraan",
|
|
8292
8305
|
closeAriaLabel: "Tutup",
|
|
8293
|
-
emptyContent: "Jenis
|
|
8306
|
+
emptyContent: "Jenis Penumpang"
|
|
8294
8307
|
},
|
|
8295
8308
|
en: {
|
|
8296
|
-
title: "Select
|
|
8309
|
+
title: "Select Type Of Passenger",
|
|
8297
8310
|
cancelButton: "Cancel",
|
|
8298
8311
|
saveButton: "Save",
|
|
8299
8312
|
vehiclesAlt: "vehicles",
|
|
8300
8313
|
closeAriaLabel: "Close",
|
|
8301
|
-
emptyContent: "
|
|
8314
|
+
emptyContent: "Type Of Passenger"
|
|
8302
8315
|
}
|
|
8303
8316
|
};
|
|
8304
8317
|
var DEFAULT_VEHICLE_ICONS = {
|
|
@@ -8493,7 +8506,8 @@ var HoverableRadioItem = ({
|
|
|
8493
8506
|
item,
|
|
8494
8507
|
imageRenderer,
|
|
8495
8508
|
styles,
|
|
8496
|
-
isChild = false
|
|
8509
|
+
isChild = false,
|
|
8510
|
+
onClick
|
|
8497
8511
|
}) => {
|
|
8498
8512
|
const [isHovered, setIsHovered] = useState(false);
|
|
8499
8513
|
return /* @__PURE__ */ jsxs(
|
|
@@ -8503,6 +8517,7 @@ var HoverableRadioItem = ({
|
|
|
8503
8517
|
style: { padding: tokens.spacingHorizontalXS, cursor: "pointer" },
|
|
8504
8518
|
onMouseEnter: () => setIsHovered(true),
|
|
8505
8519
|
onMouseLeave: () => setIsHovered(false),
|
|
8520
|
+
onClick,
|
|
8506
8521
|
children: [
|
|
8507
8522
|
/* @__PURE__ */ jsx("div", { style: isChild ? void 0 : { marginLeft: 2 }, children: imageRenderer({
|
|
8508
8523
|
src: item.image,
|
|
@@ -8723,7 +8738,8 @@ var ModalTypeOfService = ({
|
|
|
8723
8738
|
item: childItem,
|
|
8724
8739
|
imageRenderer,
|
|
8725
8740
|
styles,
|
|
8726
|
-
isChild: true
|
|
8741
|
+
isChild: true,
|
|
8742
|
+
onClick: () => setSelectedServiceId(childItem.id)
|
|
8727
8743
|
},
|
|
8728
8744
|
childIndex
|
|
8729
8745
|
)) })
|
|
@@ -8738,7 +8754,8 @@ var ModalTypeOfService = ({
|
|
|
8738
8754
|
item,
|
|
8739
8755
|
imageRenderer,
|
|
8740
8756
|
styles,
|
|
8741
|
-
isChild: false
|
|
8757
|
+
isChild: false,
|
|
8758
|
+
onClick: () => setSelectedServiceId(item.id)
|
|
8742
8759
|
},
|
|
8743
8760
|
index
|
|
8744
8761
|
);
|
|
@@ -8975,7 +8992,7 @@ var SortMenu = ({
|
|
|
8975
8992
|
var DEFAULT_LABELS17 = {
|
|
8976
8993
|
id: {
|
|
8977
8994
|
title: "Filter dengan",
|
|
8978
|
-
serviceTypeLabel: "Jenis
|
|
8995
|
+
serviceTypeLabel: "Jenis Penumpang",
|
|
8979
8996
|
departureTimeLabel: "Waktu pergi",
|
|
8980
8997
|
arrivalTimeLabel: "Waktu tiba",
|
|
8981
8998
|
priceLabel: "Harga",
|