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

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import React$1, { ReactNode } from 'react';
2
2
  import { CarouselAnnouncerFunction, DialogProps } from '@fluentui/react-components';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { FieldValues, Path } from 'react-hook-form';
4
+ import { FieldValues, Path, Control, UseFormWatch, UseFormSetValue, UseFormGetValues } from 'react-hook-form';
5
5
 
6
6
  interface ModalIllustrationButton {
7
7
  /**
@@ -2000,4 +2000,516 @@ declare const CardPassengerList: React$1.FC<CardPassengerListProps>;
2000
2000
  */
2001
2001
  declare const getBadgeConfig: (ticketClass?: string) => BadgeConfig;
2002
2002
 
2003
- export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardBanner, type CardBannerProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPromo, type CardPromoProps, CardServiceMenu, type CardServiceMenuProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, 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_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type RadioOption, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, getBadgeConfig, getModalPreset, getSortLabel };
2003
+ interface CardVehicleDetailProps {
2004
+ /**
2005
+ * Title of the vehicle service type
2006
+ */
2007
+ serviceTitle: string;
2008
+ /**
2009
+ * Image URL for the vehicle service
2010
+ */
2011
+ serviceImage: string;
2012
+ /**
2013
+ * React Hook Form control
2014
+ */
2015
+ control: Control<any>;
2016
+ /**
2017
+ * Name of the form field for vehicle number
2018
+ * @default "vehicleNumber"
2019
+ */
2020
+ vehicleNumberName?: string;
2021
+ /**
2022
+ * Whether to show the "Has Load" radio option
2023
+ * @default false
2024
+ */
2025
+ showLoadOption?: boolean;
2026
+ /**
2027
+ * Current value of "Has Load" option
2028
+ */
2029
+ hasLoad?: 'true' | 'false';
2030
+ /**
2031
+ * Callback when "Has Load" option changes
2032
+ */
2033
+ onHasLoadChange?: (value: 'true' | 'false') => void;
2034
+ }
2035
+
2036
+ declare const CardVehicleDetail: React$1.FC<CardVehicleDetailProps>;
2037
+
2038
+ interface CargoItem {
2039
+ id: number;
2040
+ commodity?: string;
2041
+ cargoType?: string;
2042
+ quantity?: number | string;
2043
+ industryType?: string;
2044
+ cargoCategory?: string;
2045
+ }
2046
+ interface VehicleOwner {
2047
+ id: number;
2048
+ senderType?: 'Perusahaan' | 'Perseorangan';
2049
+ senderName?: string;
2050
+ estimatedWeight?: number | string;
2051
+ originCity?: string;
2052
+ destinationCity?: string;
2053
+ cargoOwnerType?: 'Perusahaan' | 'Perseorangan';
2054
+ cargoOwnerName?: string;
2055
+ logisticsCompanyType?: 'Perusahaan' | 'Perseorangan';
2056
+ logisticsCompanyName?: string;
2057
+ cargoReceiverType?: 'Perusahaan' | 'Perseorangan';
2058
+ cargoReceiverName?: string;
2059
+ cargoWeight?: number | string;
2060
+ cargoItems?: CargoItem[];
2061
+ price?: number;
2062
+ [key: string]: any;
2063
+ }
2064
+ interface CardVehicleOwnerFormProps {
2065
+ /**
2066
+ * List of owners to display
2067
+ */
2068
+ owners: VehicleOwner[];
2069
+ /**
2070
+ * Whether the vehicle has load/cargo
2071
+ */
2072
+ hasLoad: boolean;
2073
+ /**
2074
+ * React Hook Form control
2075
+ */
2076
+ control: Control<any>;
2077
+ /**
2078
+ * React Hook Form watch function
2079
+ */
2080
+ watch: UseFormWatch<any>;
2081
+ /**
2082
+ * React Hook Form setValue function
2083
+ */
2084
+ setValue: UseFormSetValue<any>;
2085
+ /**
2086
+ * React Hook Form getValues function
2087
+ */
2088
+ getValues: UseFormGetValues<any>;
2089
+ /**
2090
+ * Callback to add a new owner
2091
+ */
2092
+ onAddOwner: () => void;
2093
+ /**
2094
+ * Callback to delete an owner
2095
+ */
2096
+ onDeleteOwner: (id: number) => void;
2097
+ /**
2098
+ * Callback to update an owner's data
2099
+ */
2100
+ onUpdateOwner: (id: number, data: Partial<VehicleOwner>) => void;
2101
+ /**
2102
+ * Callback to add a cargo item to an owner
2103
+ */
2104
+ onAddCargo: (ownerId: number) => void;
2105
+ /**
2106
+ * Callback to delete a cargo item
2107
+ */
2108
+ onDeleteCargo: (ownerId: number, cargoId: number) => void;
2109
+ /**
2110
+ * Callback to update cargo quantity
2111
+ */
2112
+ onUpdateCargoQuantity: (ownerId: number, cargoId: number, quantity: number) => void;
2113
+ /**
2114
+ * Options for company select inputs
2115
+ */
2116
+ companyOptions?: SelectOption[];
2117
+ /**
2118
+ * Options for city select inputs
2119
+ * @default [] */
2120
+ cityOptions?: SelectOption[];
2121
+ }
2122
+
2123
+ declare const CardVehicleOwnerForm: React$1.FC<CardVehicleOwnerFormProps>;
2124
+
2125
+ type ReservationStep = 'manifest' | 'addon' | 'meals' | 'review' | 'payment' | 'eticket' | string;
2126
+ type PaymentStep = 'method' | 'pay' | string;
2127
+ interface CardBookingTicketProps {
2128
+ /**
2129
+ * Ship Name (e.g. KMP PORTLINK)
2130
+ */
2131
+ shipName?: string;
2132
+ /**
2133
+ * Ship Type (e.g. Executive, Reguler)
2134
+ */
2135
+ shipType?: string;
2136
+ /**
2137
+ * Badge color for ship type
2138
+ */
2139
+ shipTypeColor?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';
2140
+ /**
2141
+ * Departure Day (e.g. Kamis, 25 Sep)
2142
+ */
2143
+ departureDay?: string;
2144
+ /**
2145
+ * Departure Time (e.g. 18:15)
2146
+ */
2147
+ departureTime?: string;
2148
+ /**
2149
+ * Departure Location (e.g. Merak, Banten)
2150
+ */
2151
+ departureLocation?: string;
2152
+ /**
2153
+ * Arrival Day (e.g. Jumat, 26 Sep)
2154
+ */
2155
+ arrivalDay?: string;
2156
+ /**
2157
+ * Arrival Time (e.g. 19:25)
2158
+ */
2159
+ arrivalTime?: string;
2160
+ /**
2161
+ * Arrival Location (e.g. Bakauheni, Lampung)
2162
+ */
2163
+ arrivalLocation?: string;
2164
+ /**
2165
+ * Duration string (e.g. 1 jam 10 menit)
2166
+ */
2167
+ duration?: string;
2168
+ /**
2169
+ * Total price formatted string (e.g. 50.000)
2170
+ */
2171
+ totalPrice: string;
2172
+ /**
2173
+ * Current Reservation Step
2174
+ */
2175
+ reservationStep: ReservationStep;
2176
+ /**
2177
+ * Current Payment Step
2178
+ */
2179
+ paymentStep: PaymentStep;
2180
+ /**
2181
+ * Callback for price detail click
2182
+ */
2183
+ onPriceDetailClick: () => void;
2184
+ /**
2185
+ * Callback for Next button (Lanjutkan / Lihat Pemesanan)
2186
+ */
2187
+ onNext: () => void;
2188
+ /**
2189
+ * Callback for Previous button (Sebelumnya / Ubah Metode Pembayaran)
2190
+ */
2191
+ onPrevious: () => void;
2192
+ /**
2193
+ * Whether to show or hide the card (though usually handled by parent)
2194
+ */
2195
+ className?: string;
2196
+ }
2197
+
2198
+ declare const CardBookingTicket: React$1.FC<CardBookingTicketProps>;
2199
+
2200
+ interface CardFAQProps {
2201
+ /**
2202
+ * Optional class name for the container
2203
+ */
2204
+ className?: string;
2205
+ }
2206
+
2207
+ declare const CardFAQ: React$1.FC<CardFAQProps>;
2208
+
2209
+ interface AddonFooterData {
2210
+ priceLabel: string;
2211
+ price: number;
2212
+ priceUnit?: string;
2213
+ actionLabel?: string;
2214
+ onActionClick?: () => void;
2215
+ actionType: 'detail-link' | 'primary-button';
2216
+ }
2217
+ interface AssuranceItem {
2218
+ label: string;
2219
+ priceDetails: string;
2220
+ totalPrice: number;
2221
+ }
2222
+ interface AssuranceData {
2223
+ totalPassenger: number;
2224
+ items: AssuranceItem[];
2225
+ totalPrice: number;
2226
+ }
2227
+ interface MealItem$1 {
2228
+ id: number;
2229
+ name: string;
2230
+ image: string;
2231
+ description: string;
2232
+ price: number;
2233
+ quantity: number;
2234
+ }
2235
+ interface MealData {
2236
+ items: MealItem$1[];
2237
+ onUpdateQuantity: (id: number, delta: number) => void;
2238
+ onDelete: (id: number) => void;
2239
+ }
2240
+ interface CardAddonProps {
2241
+ /**
2242
+ * Main title of the card header
2243
+ */
2244
+ title: string;
2245
+ /**
2246
+ * Title of the content item
2247
+ */
2248
+ itemTitle: string;
2249
+ /**
2250
+ * Subtitle of the content item
2251
+ */
2252
+ itemSubtitle: string;
2253
+ /**
2254
+ * URL of the icon image
2255
+ */
2256
+ iconUrl?: string;
2257
+ /**
2258
+ * Description text displayed below the item content
2259
+ */
2260
+ description?: string;
2261
+ /**
2262
+ * Action element displayed on the right side of the item content (e.g. Switch)
2263
+ */
2264
+ rightAction?: React$1.ReactNode;
2265
+ /**
2266
+ * Data driven footer configuration
2267
+ */
2268
+ footerData?: AddonFooterData;
2269
+ /**
2270
+ * Data for Assurance breakdown view
2271
+ */
2272
+ assuranceData?: AssuranceData;
2273
+ /**
2274
+ * Data for Meal list view
2275
+ */
2276
+ mealData?: MealData;
2277
+ /**
2278
+ * Optional custom children (fallback)
2279
+ */
2280
+ children?: React$1.ReactNode;
2281
+ /**
2282
+ * Optional class name
2283
+ */
2284
+ className?: string;
2285
+ }
2286
+
2287
+ declare const CardAddon: React$1.FC<CardAddonProps>;
2288
+
2289
+ interface MealItem {
2290
+ id: number;
2291
+ name: string;
2292
+ description?: string;
2293
+ price: number;
2294
+ image: string;
2295
+ quantity: number;
2296
+ [key: string]: any;
2297
+ }
2298
+ interface MealCategory {
2299
+ category: string;
2300
+ list: MealItem[];
2301
+ }
2302
+ interface CardMealCatalogProps {
2303
+ /**
2304
+ * Configuration for the top banner
2305
+ */
2306
+ banner: {
2307
+ imageUrl: string;
2308
+ title: string;
2309
+ subtitle: string;
2310
+ };
2311
+ /**
2312
+ * Text displayed in the disclaimer box
2313
+ */
2314
+ disclaimerText: string;
2315
+ /**
2316
+ * List of meal categories and their items
2317
+ */
2318
+ categories: MealCategory[];
2319
+ /**
2320
+ * Callback when "Tambah" button is clicked
2321
+ */
2322
+ onAdd: (item: MealItem) => void;
2323
+ /**
2324
+ * Callback when quantity is updated (+ or -)
2325
+ */
2326
+ onUpdateQuantity: (itemId: number, delta: number) => void;
2327
+ /**
2328
+ * Optional class name
2329
+ */
2330
+ className?: string;
2331
+ }
2332
+
2333
+ declare const CardMealCatalog: React$1.FC<CardMealCatalogProps>;
2334
+
2335
+ interface ReviewItem {
2336
+ label: React$1.ReactNode;
2337
+ value: React$1.ReactNode;
2338
+ /**
2339
+ * Optional class name for the row container
2340
+ */
2341
+ className?: string;
2342
+ /**
2343
+ * Optional class name for the label
2344
+ */
2345
+ labelClassName?: string;
2346
+ /**
2347
+ * Optional class name for the value
2348
+ */
2349
+ valueClassName?: string;
2350
+ }
2351
+ interface CardReviewProps {
2352
+ /**
2353
+ * Title of the section (e.g. "Detail Pemesan")
2354
+ */
2355
+ title: string;
2356
+ /**
2357
+ * Optional items to display as list rows
2358
+ */
2359
+ items?: ReviewItem[];
2360
+ /**
2361
+ * Custom children content (will be rendered after items if both exist)
2362
+ */
2363
+ children?: React$1.ReactNode;
2364
+ /**
2365
+ * Optional class name for the card
2366
+ */
2367
+ className?: string;
2368
+ /**
2369
+ * Optional action in the header (e.g. Ubah button) - though not present in current designs, good for extensibility
2370
+ */
2371
+ headerAction?: React$1.ReactNode;
2372
+ }
2373
+
2374
+ declare const CardReview: React$1.FC<CardReviewProps>;
2375
+
2376
+ interface ReviewPassengerItem {
2377
+ id: string | number;
2378
+ name: string;
2379
+ identityNumber: string;
2380
+ ageLabel: string;
2381
+ ageValue: string;
2382
+ ticketClass: string;
2383
+ serviceClass?: string;
2384
+ }
2385
+ interface CardReviewPassengerProps {
2386
+ /**
2387
+ * Title of the card section, defaults to "Penumpang"
2388
+ */
2389
+ title?: string;
2390
+ /**
2391
+ * List of passengers to display
2392
+ */
2393
+ passengers: ReviewPassengerItem[];
2394
+ /**
2395
+ * Optional class name
2396
+ */
2397
+ className?: string;
2398
+ }
2399
+
2400
+ declare const CardReviewPassenger: React$1.FC<CardReviewPassengerProps>;
2401
+
2402
+ interface PriceItem {
2403
+ name: string;
2404
+ price: number;
2405
+ /**
2406
+ * If true, the value will be displayed with a minus sign or specific style (e.g. discount)
2407
+ */
2408
+ isRedeem?: boolean;
2409
+ /**
2410
+ * Variant for the text color
2411
+ */
2412
+ variant?: 'default' | 'danger' | 'muted';
2413
+ /**
2414
+ * Optional description helper text (e.g. for tax explanation)
2415
+ */
2416
+ description?: string;
2417
+ }
2418
+ interface PriceSection {
2419
+ category?: string;
2420
+ title?: string;
2421
+ detail: PriceItem[];
2422
+ }
2423
+ interface CardPriceDetailsProps {
2424
+ /**
2425
+ * Title of the card, defaults to "Rincian Harga"
2426
+ */
2427
+ title?: string;
2428
+ /**
2429
+ * Sections of price details
2430
+ */
2431
+ sections: PriceSection[];
2432
+ /**
2433
+ * Total payment details
2434
+ */
2435
+ total: number;
2436
+ }
2437
+
2438
+ declare const CardPriceDetails: React$1.FC<CardPriceDetailsProps>;
2439
+
2440
+ declare const PriceDetailsTerms: React$1.FC;
2441
+
2442
+ interface PaymentOption {
2443
+ label: string;
2444
+ value: string;
2445
+ image: string;
2446
+ }
2447
+ interface PaymentMethodCategory {
2448
+ title: string;
2449
+ value: string;
2450
+ options: PaymentOption[];
2451
+ }
2452
+ interface CardPaymentMethodListProps {
2453
+ methods: PaymentMethodCategory[];
2454
+ selectedValue?: string;
2455
+ onSelect: (value: string) => void;
2456
+ }
2457
+
2458
+ declare const CardPaymentMethodList: React$1.FC<CardPaymentMethodListProps>;
2459
+
2460
+ interface PaymentGuideStep {
2461
+ title: string;
2462
+ value: string;
2463
+ steps: string[];
2464
+ }
2465
+ interface CardPaymentGuideProps {
2466
+ title?: string;
2467
+ guides: PaymentGuideStep[];
2468
+ className?: string;
2469
+ }
2470
+
2471
+ declare const CardPaymentGuide: React$1.FC<CardPaymentGuideProps>;
2472
+
2473
+ interface BankInfo {
2474
+ name: string;
2475
+ icon: string;
2476
+ }
2477
+ interface CardPaymentInfoProps {
2478
+ expiryDate: string;
2479
+ bank: BankInfo;
2480
+ virtualAccount: string;
2481
+ totalAmount: number;
2482
+ guides: PaymentGuideStep[];
2483
+ onCopyVA?: () => void;
2484
+ onCheckStatus?: () => void;
2485
+ }
2486
+
2487
+ declare const CardPaymentInfo: React$1.FC<CardPaymentInfoProps>;
2488
+
2489
+ interface CardStatusOrderProps {
2490
+ bookingCode: string;
2491
+ departureDate: string;
2492
+ departureTime: string;
2493
+ arrivalDate: string;
2494
+ arrivalTime: string;
2495
+ origin: string;
2496
+ destination: string;
2497
+ duration?: string;
2498
+ vehicleClass: string;
2499
+ serviceType: string;
2500
+ vehicleNumber?: string;
2501
+ shipType?: string;
2502
+ statusLabel?: string;
2503
+ statusIcon?: JSX.Element;
2504
+ statusColor?: 'success' | 'danger' | 'warning' | 'brand' | 'important' | 'informative' | 'severe' | 'subtle';
2505
+ illustrationUrl?: string;
2506
+ title?: string;
2507
+ description?: string;
2508
+ onClickViewTicket?: () => void;
2509
+ isLoading?: boolean;
2510
+ className?: string;
2511
+ }
2512
+
2513
+ declare const CardStatusOrder: React$1.FC<CardStatusOrderProps>;
2514
+
2515
+ export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BankInfo, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, 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_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentOption, type PaymentStep, PriceDetailsTerms, type PriceItem, type PriceSection, type RadioOption, type ReservationStep, type ReviewItem, type ReviewPassengerItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, getBadgeConfig, getModalPreset, getSortLabel };