@asdp/ferryui 0.1.22-dev.8653 → 0.1.22-dev.8663

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
@@ -3,7 +3,6 @@ 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';
5
5
  import { Icon } from '@iconify/react';
6
- import { Icon as Icon$1 } from '@iconify/react/dist/iconify.js';
7
6
  import { Controller, useForm, useWatch } from 'react-hook-form';
8
7
  import PhoneInputComponent from 'react-phone-input-2';
9
8
  import Select from 'react-select';
@@ -353,11 +352,17 @@ var CarouselWithCustomNav = ({
353
352
  var DEFAULT_LABELS3 = {
354
353
  id: {
355
354
  defaultImageAlt: "Gambar Promo",
356
- defaultButtonText: "Lihat Detail"
355
+ defaultButtonText: "Lihat Detail",
356
+ promoAriaLabel: "Promo {index} dari {total}",
357
+ promoAriaLabelSingle: "Promo {index}",
358
+ loadingContent: "Memuat konten"
357
359
  },
358
360
  en: {
359
361
  defaultImageAlt: "Promo Image",
360
- defaultButtonText: "View Details"
362
+ defaultButtonText: "View Details",
363
+ promoAriaLabel: "Promo {index} of {total}",
364
+ promoAriaLabelSingle: "Promo {index}",
365
+ loadingContent: "Loading content"
361
366
  }
362
367
  };
363
368
  var useStyles3 = makeStyles({
@@ -464,7 +469,10 @@ var CardPromo = ({
464
469
  const mergedLabels = { ...DEFAULT_LABELS3[language], ...labels };
465
470
  const displayImageAlt = imageAlt || mergedLabels.defaultImageAlt;
466
471
  const displayButtonText = buttonText || mergedLabels.defaultButtonText;
467
- const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
472
+ const ariaLabel = totalCards ? mergedLabels.promoAriaLabel.replace("{index}", (index + 1).toString()).replace("{total}", totalCards.toString()) : mergedLabels.promoAriaLabelSingle.replace(
473
+ "{index}",
474
+ (index + 1).toString()
475
+ );
468
476
  if (isLoading) {
469
477
  return /* @__PURE__ */ jsx(
470
478
  CarouselCard,
@@ -472,7 +480,7 @@ var CardPromo = ({
472
480
  autoSize: true,
473
481
  className: mergeClasses(classes.actionCard, className),
474
482
  style: { cursor: "default" },
475
- children: /* @__PURE__ */ jsxs(Skeleton, { "aria-label": "Loading content", children: [
483
+ children: /* @__PURE__ */ jsxs(Skeleton, { "aria-label": mergedLabels.loadingContent, children: [
476
484
  /* @__PURE__ */ jsx("div", { className: mergeClasses(classes.imageContainer, imageClassName), children: /* @__PURE__ */ jsx(
477
485
  SkeletonItem,
478
486
  {
@@ -800,7 +808,8 @@ var DEFAULT_LABELS5 = {
800
808
  facilitiesLabel: "Fasilitas",
801
809
  selectTicketButton: "Pilih Tiket",
802
810
  timezoneLabel: "WIB",
803
- currencySymbol: "IDR"
811
+ currencySymbol: "IDR",
812
+ logoAlt: "Logo ASDP"
804
813
  },
805
814
  en: {
806
815
  availableSeatsLabel: "Available",
@@ -811,7 +820,8 @@ var DEFAULT_LABELS5 = {
811
820
  facilitiesLabel: "Facilities",
812
821
  selectTicketButton: "Select Ticket",
813
822
  timezoneLabel: "WIB",
814
- currencySymbol: "IDR"
823
+ currencySymbol: "IDR",
824
+ logoAlt: "ASDP Logo"
815
825
  }
816
826
  };
817
827
  var useStyles5 = makeStyles({
@@ -1111,7 +1121,7 @@ var CardTicket = ({
1111
1121
  {
1112
1122
  src: "/assets/logo/asdp-default.svg",
1113
1123
  className: styles.asdpLogo,
1114
- alt: "asdp",
1124
+ alt: mergedLabels.logoAlt,
1115
1125
  height: 56,
1116
1126
  width: 82
1117
1127
  }
@@ -1554,7 +1564,8 @@ var DEFAULT_LABELS6 = {
1554
1564
  hotelLabel: "Hotel",
1555
1565
  hotelDescription: "Layanan pemesanan hotel",
1556
1566
  otherLabel: "Lainnya",
1557
- otherDescription: "Layanan lainnya"
1567
+ otherDescription: "Layanan lainnya",
1568
+ serviceAriaLabel: "Layanan"
1558
1569
  },
1559
1570
  en: {
1560
1571
  ferryLabel: "Ferry",
@@ -1566,7 +1577,8 @@ var DEFAULT_LABELS6 = {
1566
1577
  hotelLabel: "Hotel",
1567
1578
  hotelDescription: "Hotel Booking Service",
1568
1579
  otherLabel: "Other",
1569
- otherDescription: "Other Services"
1580
+ otherDescription: "Other Services",
1581
+ serviceAriaLabel: "Service"
1570
1582
  }
1571
1583
  };
1572
1584
  var ALIAS_MENU_ITEMS = {
@@ -1709,6 +1721,7 @@ var CardServiceMenu = ({
1709
1721
  {
1710
1722
  className: getMenuItemClass(item.id),
1711
1723
  onClick: () => onServiceClick?.(item.id),
1724
+ "aria-label": `${mergedLabels.serviceAriaLabel} ${label}`,
1712
1725
  children: [
1713
1726
  /* @__PURE__ */ jsx("img", { src: item.logo, alt: label, className: styles.logo }),
1714
1727
  /* @__PURE__ */ jsxs("div", { className: styles.textContent, children: [
@@ -1764,54 +1777,62 @@ var DatePickerInput = forwardRef(
1764
1777
  }
1765
1778
  onClick?.(e);
1766
1779
  };
1767
- return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: (_, data) => setIsOpen(data.open), trapFocus: true, children: [
1768
- /* @__PURE__ */ jsx(PopoverTrigger, { disableButtonEnhancement: true, children: /* @__PURE__ */ jsx(
1769
- Input,
1770
- {
1771
- ...restProps,
1772
- value: formatDate(field.value),
1773
- readOnly: true,
1774
- placeholder: placeholder || "Pilih tanggal",
1775
- disabled,
1776
- appearance,
1777
- size,
1778
- contentBefore,
1779
- onClick: handleInputClick,
1780
- style: {
1781
- cursor: disabled ? "not-allowed" : "pointer",
1782
- ...style
1783
- },
1784
- contentAfter: /* @__PURE__ */ jsx(
1785
- "div",
1780
+ return /* @__PURE__ */ jsxs(
1781
+ Popover,
1782
+ {
1783
+ open: isOpen,
1784
+ onOpenChange: (_, data) => setIsOpen(data.open),
1785
+ trapFocus: true,
1786
+ children: [
1787
+ /* @__PURE__ */ jsx(PopoverTrigger, { disableButtonEnhancement: true, children: /* @__PURE__ */ jsx(
1788
+ Input,
1786
1789
  {
1787
- onClick: (e) => {
1788
- e.stopPropagation();
1789
- if (!disabled) {
1790
- setIsOpen(!isOpen);
1791
- }
1792
- },
1790
+ ...restProps,
1791
+ value: formatDate(field.value),
1792
+ readOnly: true,
1793
+ placeholder,
1794
+ disabled,
1795
+ appearance,
1796
+ size,
1797
+ contentBefore,
1798
+ onClick: handleInputClick,
1793
1799
  style: {
1794
1800
  cursor: disabled ? "not-allowed" : "pointer",
1795
- display: "flex",
1796
- alignItems: "center"
1801
+ ...style
1797
1802
  },
1798
- children: /* @__PURE__ */ jsx(Icon, { icon: "fluent:calendar-24-regular" })
1803
+ contentAfter: /* @__PURE__ */ jsx(
1804
+ "div",
1805
+ {
1806
+ onClick: (e) => {
1807
+ e.stopPropagation();
1808
+ if (!disabled) {
1809
+ setIsOpen(!isOpen);
1810
+ }
1811
+ },
1812
+ style: {
1813
+ cursor: disabled ? "not-allowed" : "pointer",
1814
+ display: "flex",
1815
+ alignItems: "center"
1816
+ },
1817
+ children: /* @__PURE__ */ jsx(Icon, { icon: "fluent:calendar-24-regular" })
1818
+ }
1819
+ )
1799
1820
  }
1800
- )
1801
- }
1802
- ) }),
1803
- /* @__PURE__ */ jsx(PopoverSurface, { tabIndex: -1, style: { maxWidth: "530px" }, children: /* @__PURE__ */ jsx(
1804
- Calendar,
1805
- {
1806
- value: dateValue,
1807
- onSelectDate,
1808
- showGoToToday: true,
1809
- highlightSelectedMonth: true,
1810
- showMonthPickerAsOverlay: false,
1811
- maxDate: max ? new Date(max) : void 0
1812
- }
1813
- ) })
1814
- ] });
1821
+ ) }),
1822
+ /* @__PURE__ */ jsx(PopoverSurface, { tabIndex: -1, style: { maxWidth: "530px" }, children: /* @__PURE__ */ jsx(
1823
+ Calendar,
1824
+ {
1825
+ value: dateValue,
1826
+ onSelectDate,
1827
+ showGoToToday: true,
1828
+ highlightSelectedMonth: true,
1829
+ showMonthPickerAsOverlay: false,
1830
+ maxDate: max ? new Date(max) : void 0
1831
+ }
1832
+ ) })
1833
+ ]
1834
+ }
1835
+ );
1815
1836
  }
1816
1837
  );
1817
1838
  DatePickerInput.displayName = "DatePickerInput";
@@ -1825,7 +1846,14 @@ var DEFAULT_LABELS7 = {
1825
1846
  phonePlaceholder: "Nomor HP",
1826
1847
  identityPlaceholder: "Email, KTP, SIM, Passport, atau Nomor Telepon",
1827
1848
  identityPhonePlaceholder: "Nomor telepon",
1828
- identityIdPlaceholder: "KTP, SIM, atau Passport"
1849
+ identityIdPlaceholder: "KTP, SIM, atau Passport",
1850
+ showPasswordAriaLabel: "Tampilkan kata sandi",
1851
+ hidePasswordAriaLabel: "Sembunyikan kata sandi",
1852
+ datePickerPlaceholder: "Pilih tanggal",
1853
+ phoneDefaultPlaceholder: "Nomor telepon",
1854
+ requiredFieldError: "Field ini wajib diisi",
1855
+ invalidEmailError: "Email tidak valid",
1856
+ emailOrPhoneRequiredError: "Email atau nomor HP wajib diisi"
1829
1857
  },
1830
1858
  en: {
1831
1859
  emailOrPhonePlaceholder: "Email or Phone Number",
@@ -1833,7 +1861,14 @@ var DEFAULT_LABELS7 = {
1833
1861
  phonePlaceholder: "Phone Number",
1834
1862
  identityPlaceholder: "Email, ID Card, Driving License, Passport, or Phone Number",
1835
1863
  identityPhonePlaceholder: "Phone Number",
1836
- identityIdPlaceholder: "ID Card, Driving License, or Passport"
1864
+ identityIdPlaceholder: "ID Card, Driving License, or Passport",
1865
+ showPasswordAriaLabel: "Show password",
1866
+ hidePasswordAriaLabel: "Hide password",
1867
+ datePickerPlaceholder: "Select date",
1868
+ phoneDefaultPlaceholder: "Phone number",
1869
+ requiredFieldError: "This field is required",
1870
+ invalidEmailError: "Invalid email",
1871
+ emailOrPhoneRequiredError: "Email or phone number is required"
1837
1872
  }
1838
1873
  };
1839
1874
  var PhoneInput = PhoneInputComponent.default || PhoneInputComponent;
@@ -2516,7 +2551,7 @@ var InputDynamic = ({
2516
2551
  const cleanedValue = cleanPhoneValue(value || "");
2517
2552
  field.onChange(cleanedValue);
2518
2553
  },
2519
- placeholder: placeholder || "Nomor telepon",
2554
+ placeholder: placeholder || mergedLabels.phoneDefaultPlaceholder,
2520
2555
  disabled,
2521
2556
  enableSearch: true,
2522
2557
  disableSearchIcon: true
@@ -2557,7 +2592,7 @@ var InputDynamic = ({
2557
2592
  DatePickerInput_default,
2558
2593
  {
2559
2594
  field,
2560
- placeholder,
2595
+ placeholder: placeholder || mergedLabels.datePickerPlaceholder,
2561
2596
  disabled,
2562
2597
  appearance: error ? "outline" : appearance,
2563
2598
  size,
@@ -2652,7 +2687,7 @@ var InputDynamic = ({
2652
2687
  {
2653
2688
  appearance: "transparent",
2654
2689
  icon: showPassword ? /* @__PURE__ */ jsx(Icon, { icon: "fluent:eye-off-24-filled" }) : /* @__PURE__ */ jsx(Icon, { icon: "fluent:eye-24-filled" }),
2655
- "aria-label": showPassword ? "Hide password" : "Show password",
2690
+ "aria-label": showPassword ? mergedLabels.hidePasswordAriaLabel : mergedLabels.showPasswordAriaLabel,
2656
2691
  onClick: () => setShowPassword(!showPassword),
2657
2692
  tabIndex: -1,
2658
2693
  type: "button"
@@ -2817,7 +2852,7 @@ var InputDynamic = ({
2817
2852
  const getValidationRules = () => {
2818
2853
  const rules = {};
2819
2854
  if (required) {
2820
- rules.required = validationRules?.required || "Field ini wajib diisi";
2855
+ rules.required = validationRules?.required || mergedLabels.requiredFieldError;
2821
2856
  }
2822
2857
  if (validationRules?.minLength) {
2823
2858
  rules.minLength = validationRules.minLength;
@@ -2840,13 +2875,13 @@ var InputDynamic = ({
2840
2875
  if (type === "email") {
2841
2876
  rules.pattern = {
2842
2877
  value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
2843
- message: "Email tidak valid"
2878
+ message: mergedLabels.invalidEmailError
2844
2879
  };
2845
2880
  }
2846
2881
  if (type === "emailOrPhone") {
2847
2882
  rules.validate = (value) => {
2848
2883
  if (required && !value) {
2849
- return "Email atau nomor HP wajib diisi";
2884
+ return mergedLabels.emailOrPhoneRequiredError;
2850
2885
  }
2851
2886
  const stringValue = typeof value === "string" ? value : "";
2852
2887
  if (!stringValue) return true;
@@ -3202,7 +3237,13 @@ var DEFAULT_LABELS8 = {
3202
3237
  errorOriginRequired: "Pelabuhan asal wajib diisi",
3203
3238
  errorDestinationRequired: "Pelabuhan tujuan wajib diisi",
3204
3239
  errorDepartureDateRequired: "Tanggal Berangkat wajib diisi",
3205
- errorReturnDateRequired: "Tanggal Pulang wajib diisi"
3240
+ errorReturnDateRequired: "Tanggal Pulang wajib diisi",
3241
+ switchAriaLabel: "Tukar asal dan tujuan",
3242
+ ferryDescription: "Layanan Penyeberangan Ferry ASDP",
3243
+ ifcsDescription: "Sistem Kontrol Ferry Terintegrasi",
3244
+ skptDescription: "Sistem Tiket Penumpang Terintegrasi",
3245
+ hotelDescription: "Layanan Pemesanan Hotel",
3246
+ otherDescription: "Layanan Lainnya"
3206
3247
  },
3207
3248
  en: {
3208
3249
  fromLabel: "From",
@@ -3224,7 +3265,13 @@ var DEFAULT_LABELS8 = {
3224
3265
  errorOriginRequired: "Origin port is required",
3225
3266
  errorDestinationRequired: "Destination port is required",
3226
3267
  errorDepartureDateRequired: "Departure date is required",
3227
- errorReturnDateRequired: "Return date is required"
3268
+ errorReturnDateRequired: "Return date is required",
3269
+ switchAriaLabel: "Swap origin and destination",
3270
+ ferryDescription: "ASDP Ferry Crossing Service",
3271
+ ifcsDescription: "Integrated Ferry Control System",
3272
+ skptDescription: "Integrated Passenger Ticketing System",
3273
+ hotelDescription: "Hotel Booking Service",
3274
+ otherDescription: "Other Services"
3228
3275
  }
3229
3276
  };
3230
3277
  var useStyles8 = makeStyles({
@@ -3500,7 +3547,7 @@ var CardTicketSearch = ({
3500
3547
  control,
3501
3548
  type: "text",
3502
3549
  contentBefore: /* @__PURE__ */ jsx(
3503
- Icon$1,
3550
+ Icon,
3504
3551
  {
3505
3552
  icon: "fluent:vehicle-ship-16-filled",
3506
3553
  color: tokens.colorBrandBackground
@@ -3529,6 +3576,7 @@ var CardTicketSearch = ({
3529
3576
  appearance: "secondary",
3530
3577
  size: "large",
3531
3578
  disabled: switchDisabled,
3579
+ "aria-label": labels.switchAriaLabel,
3532
3580
  icon: /* @__PURE__ */ jsx(
3533
3581
  "div",
3534
3582
  {
@@ -3537,7 +3585,7 @@ var CardTicketSearch = ({
3537
3585
  "img",
3538
3586
  {
3539
3587
  src: "/assets/images/icons/switch.svg",
3540
- alt: "Switch",
3588
+ alt: labels.switchAriaLabel,
3541
3589
  width: 26,
3542
3590
  height: 26
3543
3591
  }
@@ -3568,7 +3616,7 @@ var CardTicketSearch = ({
3568
3616
  control,
3569
3617
  type: "text",
3570
3618
  contentBefore: /* @__PURE__ */ jsx(
3571
- Icon$1,
3619
+ Icon,
3572
3620
  {
3573
3621
  icon: "fluent:location-24-filled",
3574
3622
  color: tokens.colorBrandBackground
@@ -3607,7 +3655,7 @@ var CardTicketSearch = ({
3607
3655
  control,
3608
3656
  type: "text",
3609
3657
  contentBefore: /* @__PURE__ */ jsx(
3610
- Icon$1,
3658
+ Icon,
3611
3659
  {
3612
3660
  icon: "fluent:calendar-24-filled",
3613
3661
  color: tokens.colorBrandBackground
@@ -3667,7 +3715,7 @@ var CardTicketSearch = ({
3667
3715
  control,
3668
3716
  type: "text",
3669
3717
  contentBefore: /* @__PURE__ */ jsx(
3670
- Icon$1,
3718
+ Icon,
3671
3719
  {
3672
3720
  icon: "fluent:calendar-24-filled",
3673
3721
  color: tokens.colorBrandBackground
@@ -3740,7 +3788,7 @@ var CardTicketSearch = ({
3740
3788
  control,
3741
3789
  type: "text",
3742
3790
  contentBefore: /* @__PURE__ */ jsx(
3743
- Icon$1,
3791
+ Icon,
3744
3792
  {
3745
3793
  icon: "fluent:ribbon-star-24-filled",
3746
3794
  color: tokens.colorBrandBackground
@@ -3774,7 +3822,7 @@ var CardTicketSearch = ({
3774
3822
  control,
3775
3823
  type: "text",
3776
3824
  contentBefore: /* @__PURE__ */ jsx(
3777
- Icon$1,
3825
+ Icon,
3778
3826
  {
3779
3827
  icon: "fluent:apps-list-24-filled",
3780
3828
  color: tokens.colorBrandBackground
@@ -3809,7 +3857,7 @@ var CardTicketSearch = ({
3809
3857
  control,
3810
3858
  type: "text",
3811
3859
  contentBefore: /* @__PURE__ */ jsx(
3812
- Icon$1,
3860
+ Icon,
3813
3861
  {
3814
3862
  icon: "fluent:people-24-filled",
3815
3863
  color: tokens.colorBrandBackground
@@ -3831,7 +3879,7 @@ var CardTicketSearch = ({
3831
3879
  appearance: "primary",
3832
3880
  size: "large",
3833
3881
  type: "submit",
3834
- icon: /* @__PURE__ */ jsx(Icon$1, { icon: "fluent:vehicle-ship-20-filled" }),
3882
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-20-filled" }),
3835
3883
  disabled: submitDisabled,
3836
3884
  children: labels.searchButton
3837
3885
  }
@@ -3857,7 +3905,8 @@ var DEFAULT_LABELS9 = {
3857
3905
  serviceClass: "Kelas Layanan",
3858
3906
  typeOfService: "Jenis Layanan",
3859
3907
  totalPassengers: "Jumlah Penumpang",
3860
- changeSearchButton: "Ganti Pencarian"
3908
+ changeSearchButton: "Ganti Pencarian",
3909
+ swapAriaLabel: "Tukar asal dan tujuan"
3861
3910
  },
3862
3911
  en: {
3863
3912
  originHarbor: "Departure Port",
@@ -3866,7 +3915,8 @@ var DEFAULT_LABELS9 = {
3866
3915
  serviceClass: "Service Class",
3867
3916
  typeOfService: "Service Type",
3868
3917
  totalPassengers: "Total Passengers",
3869
- changeSearchButton: "Change Search"
3918
+ changeSearchButton: "Change Search",
3919
+ swapAriaLabel: "Swap origin and destination"
3870
3920
  }
3871
3921
  };
3872
3922
  var useStyles9 = makeStyles({
@@ -4046,7 +4096,8 @@ var CardTicketSearchSummary = ({
4046
4096
  disabled: true,
4047
4097
  appearance: "secondary",
4048
4098
  size: "medium",
4049
- icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:arrow-swap-24-filled" })
4099
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:arrow-swap-24-filled" }),
4100
+ "aria-label": mergedLabels.swapAriaLabel
4050
4101
  }
4051
4102
  ) })
4052
4103
  }
@@ -4283,7 +4334,8 @@ var DEFAULT_LABELS10 = {
4283
4334
  clearAllButton: "Hapus Semua",
4284
4335
  allHarborsHeader: "Semua Pelabuhan",
4285
4336
  loadingData: "Memuat data...",
4286
- harborNotFound: "Pelabuhan tidak ditemukan"
4337
+ harborNotFound: "Pelabuhan tidak ditemukan",
4338
+ closeAriaLabel: "Tutup"
4287
4339
  },
4288
4340
  en: {
4289
4341
  title: "Select Harbor",
@@ -4292,7 +4344,8 @@ var DEFAULT_LABELS10 = {
4292
4344
  clearAllButton: "Clear All",
4293
4345
  allHarborsHeader: "All Harbors",
4294
4346
  loadingData: "Loading data...",
4295
- harborNotFound: "Harbor not found"
4347
+ harborNotFound: "Harbor not found",
4348
+ closeAriaLabel: "Close"
4296
4349
  }
4297
4350
  };
4298
4351
  var useStyles10 = makeStyles({
@@ -4454,7 +4507,7 @@ var ModalSearchHarbor = ({
4454
4507
  Button,
4455
4508
  {
4456
4509
  appearance: "subtle",
4457
- "aria-label": "close",
4510
+ "aria-label": mergedLabels.closeAriaLabel,
4458
4511
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
4459
4512
  onClick: handleClose,
4460
4513
  className: styles.closeButton
@@ -4579,12 +4632,14 @@ var DEFAULT_LABELS11 = {
4579
4632
  id: {
4580
4633
  title: "Pilih Tanggal",
4581
4634
  oneWay: "Sekali Jalan",
4582
- roundTrip: "Pulang Pergi"
4635
+ roundTrip: "Pulang Pergi",
4636
+ closeAriaLabel: "Tutup"
4583
4637
  },
4584
4638
  en: {
4585
4639
  title: "Select Date",
4586
4640
  oneWay: "One Way",
4587
- roundTrip: "Round Trip"
4641
+ roundTrip: "Round Trip",
4642
+ closeAriaLabel: "Close"
4588
4643
  }
4589
4644
  };
4590
4645
  var useStyles11 = makeStyles({
@@ -4872,7 +4927,7 @@ var ModalSelectDate = ({
4872
4927
  Button,
4873
4928
  {
4874
4929
  appearance: "subtle",
4875
- "aria-label": "close",
4930
+ "aria-label": mergedLabels.closeAriaLabel,
4876
4931
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
4877
4932
  onClick: handleClose,
4878
4933
  className: styles.closeButton
@@ -4937,14 +4992,16 @@ var DEFAULT_LABELS12 = {
4937
4992
  loading: "Memuat...",
4938
4993
  error: "Gagal memuat layanan",
4939
4994
  selectAll: "Pilih Semua",
4940
- saveButton: "Simpan"
4995
+ saveButton: "Simpan",
4996
+ closeAriaLabel: "Tutup"
4941
4997
  },
4942
4998
  en: {
4943
4999
  title: "Select Service Class",
4944
5000
  loading: "Loading...",
4945
5001
  error: "Error loading services",
4946
5002
  selectAll: "Select All",
4947
- saveButton: "Save"
5003
+ saveButton: "Save",
5004
+ closeAriaLabel: "Close"
4948
5005
  }
4949
5006
  };
4950
5007
  var useStyles12 = makeStyles({
@@ -5079,7 +5136,7 @@ var ModalService = ({
5079
5136
  Button,
5080
5137
  {
5081
5138
  appearance: "subtle",
5082
- "aria-label": "close",
5139
+ "aria-label": mergedLabels.closeAriaLabel,
5083
5140
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
5084
5141
  onClick: handleClose,
5085
5142
  className: styles.closeButton
@@ -5147,7 +5204,8 @@ var DEFAULT_LABELS13 = {
5147
5204
  saveButton: "Simpan",
5148
5205
  economy: "Ekonomi",
5149
5206
  business: "Bisnis",
5150
- executive: "Eksekutif"
5207
+ executive: "Eksekutif",
5208
+ closeAriaLabel: "Tutup"
5151
5209
  },
5152
5210
  en: {
5153
5211
  title: "Select Total Passengers",
@@ -5156,7 +5214,8 @@ var DEFAULT_LABELS13 = {
5156
5214
  saveButton: "Save",
5157
5215
  economy: "Economy",
5158
5216
  business: "Business",
5159
- executive: "Executive"
5217
+ executive: "Executive",
5218
+ closeAriaLabel: "Close"
5160
5219
  }
5161
5220
  };
5162
5221
  var DEFAULT_SERVICE_CLASSES = [
@@ -5397,7 +5456,7 @@ var ModalTotalPassengers = ({
5397
5456
  Button,
5398
5457
  {
5399
5458
  appearance: "subtle",
5400
- "aria-label": "close",
5459
+ "aria-label": mergedLabels.closeAriaLabel,
5401
5460
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-12-regular" }),
5402
5461
  onClick: onClose
5403
5462
  }
@@ -5516,13 +5575,15 @@ var DEFAULT_LABELS14 = {
5516
5575
  title: "Pilih Tipe Layanan",
5517
5576
  cancelButton: "Batal",
5518
5577
  saveButton: "Simpan",
5519
- vehiclesAlt: "kendaraan"
5578
+ vehiclesAlt: "kendaraan",
5579
+ closeAriaLabel: "Tutup"
5520
5580
  },
5521
5581
  en: {
5522
5582
  title: "Select Service Type",
5523
5583
  cancelButton: "Cancel",
5524
5584
  saveButton: "Save",
5525
- vehiclesAlt: "vehicles"
5585
+ vehiclesAlt: "vehicles",
5586
+ closeAriaLabel: "Close"
5526
5587
  }
5527
5588
  };
5528
5589
  var DEFAULT_VEHICLE_ICONS = {
@@ -5700,7 +5761,7 @@ var ModalTypeOfService = ({
5700
5761
  Button,
5701
5762
  {
5702
5763
  appearance: "subtle",
5703
- "aria-label": "close",
5764
+ "aria-label": mergedLabels.closeAriaLabel,
5704
5765
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
5705
5766
  onClick: onClose,
5706
5767
  className: styles.closeButton
@@ -5843,7 +5904,8 @@ var DEFAULT_LABELS15 = {
5843
5904
  highestPrice: "Harga Tertinggi",
5844
5905
  lowestPrice: "Harga Terendah",
5845
5906
  earliestDeparture: "Keberangkatan Paling Awal",
5846
- latestDeparture: "Keberangkatan Paling Akhir"
5907
+ latestDeparture: "Keberangkatan Paling Akhir",
5908
+ resetSortAriaLabel: "Hapus pengurutan"
5847
5909
  },
5848
5910
  en: {
5849
5911
  filterButtonText: "Filter",
@@ -5853,7 +5915,8 @@ var DEFAULT_LABELS15 = {
5853
5915
  highestPrice: "Highest Price",
5854
5916
  lowestPrice: "Lowest Price",
5855
5917
  earliestDeparture: "Earliest Departure",
5856
- latestDeparture: "Latest Departure"
5918
+ latestDeparture: "Latest Departure",
5919
+ resetSortAriaLabel: "Clear sort"
5857
5920
  }
5858
5921
  };
5859
5922
  var getSortOptions = (labels) => [
@@ -5998,6 +6061,7 @@ var SortMenu = ({
5998
6061
  type: "button",
5999
6062
  shape: "circular",
6000
6063
  className: styles.button,
6064
+ "aria-label": labels.resetSortAriaLabel,
6001
6065
  children: currentSortLabel
6002
6066
  }
6003
6067
  ),
@@ -6040,7 +6104,8 @@ var DEFAULT_LABELS16 = {
6040
6104
  resetButton: "Reset",
6041
6105
  applyButton: "Terapkan",
6042
6106
  hourUnit: "jam",
6043
- currencySymbol: "IDR"
6107
+ currencySymbol: "IDR",
6108
+ closeAriaLabel: "Tutup"
6044
6109
  },
6045
6110
  en: {
6046
6111
  title: "Filter by",
@@ -6057,7 +6122,8 @@ var DEFAULT_LABELS16 = {
6057
6122
  resetButton: "Reset",
6058
6123
  applyButton: "Apply",
6059
6124
  hourUnit: "hours",
6060
- currencySymbol: "IDR"
6125
+ currencySymbol: "IDR",
6126
+ closeAriaLabel: "Close"
6061
6127
  }
6062
6128
  };
6063
6129
  var DEFAULT_SERVICE_TYPES = [
@@ -6336,7 +6402,7 @@ var ModalFilterTicket = ({
6336
6402
  Button,
6337
6403
  {
6338
6404
  appearance: "subtle",
6339
- "aria-label": "close",
6405
+ "aria-label": mergedLabels.closeAriaLabel,
6340
6406
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
6341
6407
  className: styles.closeButton,
6342
6408
  onClick: () => onOpenChange(false)
@@ -6683,7 +6749,8 @@ var DEFAULT_LABELS18 = {
6683
6749
  typeOfServicePlaceholder: "Pilih Jenis penumpang",
6684
6750
  passengerLabel: "Penumpang",
6685
6751
  passengerPlaceholder: "Pilih Penumpang",
6686
- searchButton: "Cari Tiket"
6752
+ searchButton: "Cari Tiket",
6753
+ closeAriaLabel: "Tutup"
6687
6754
  },
6688
6755
  en: {
6689
6756
  title: "Search Other Schedules",
@@ -6706,7 +6773,8 @@ var DEFAULT_LABELS18 = {
6706
6773
  typeOfServicePlaceholder: "Select Type of Passenger",
6707
6774
  passengerLabel: "Passenger",
6708
6775
  passengerPlaceholder: "Select Passenger",
6709
- searchButton: "Search Ticket"
6776
+ searchButton: "Search Ticket",
6777
+ closeAriaLabel: "Close"
6710
6778
  }
6711
6779
  };
6712
6780
  var DEFAULT_FORM_VALUES = {
@@ -6876,7 +6944,7 @@ var ModalSearchTicket = ({
6876
6944
  Button,
6877
6945
  {
6878
6946
  appearance: "subtle",
6879
- "aria-label": "close",
6947
+ "aria-label": mergedLabels.closeAriaLabel,
6880
6948
  className: styles.closeButton,
6881
6949
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
6882
6950
  onClick: onClose
@@ -7523,14 +7591,28 @@ var DEFAULT_LABELS21 = {
7523
7591
  sameAsOrderer: "Sama Dengan Pemesan",
7524
7592
  searchPlaceholder: "Cari Penumpang",
7525
7593
  addPassengerButton: "Tambah Penumpang",
7526
- cancelButton: "Batal"
7594
+ cancelButton: "Batal",
7595
+ editPassengerAriaLabel: "Edit data penumpang",
7596
+ categories: {
7597
+ adult: "Dewasa",
7598
+ child: "Anak",
7599
+ infant: "Bayi",
7600
+ elderly: "Lansia"
7601
+ }
7527
7602
  },
7528
7603
  en: {
7529
7604
  title: "Passenger Details",
7530
7605
  sameAsOrderer: "Same as Orderer",
7531
7606
  searchPlaceholder: "Search Passenger",
7532
7607
  addPassengerButton: "Add Passenger",
7533
- cancelButton: "Cancel"
7608
+ cancelButton: "Cancel",
7609
+ editPassengerAriaLabel: "Edit passenger data",
7610
+ categories: {
7611
+ adult: "Adult",
7612
+ child: "Child",
7613
+ infant: "Infant",
7614
+ elderly: "Elderly"
7615
+ }
7534
7616
  }
7535
7617
  };
7536
7618
  var useStyles21 = makeStyles({
@@ -7657,20 +7739,31 @@ var ModalListPassenger = ({
7657
7739
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Subtitle2, { children: [
7658
7740
  passenger.name,
7659
7741
  " (",
7660
- passenger.category,
7742
+ (() => {
7743
+ const cat = passenger.category?.toUpperCase();
7744
+ if (cat === "ADULT")
7745
+ return mergedLabels.categories.adult;
7746
+ if (cat === "CHILD")
7747
+ return mergedLabels.categories.child;
7748
+ if (cat === "INFANT")
7749
+ return mergedLabels.categories.infant;
7750
+ if (cat === "ELDERLY")
7751
+ return mergedLabels.categories.elderly;
7752
+ return passenger.category;
7753
+ })(),
7661
7754
  ")"
7662
7755
  ] }) }),
7663
7756
  /* @__PURE__ */ jsx(
7664
- Icon,
7757
+ Button,
7665
7758
  {
7666
- icon: "fluent:chevron-right-24-regular",
7759
+ appearance: "transparent",
7760
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-right-24-regular" }),
7667
7761
  onClick: (e) => {
7668
7762
  e.preventDefault();
7669
7763
  e.stopPropagation();
7670
7764
  onEditPassenger(passenger);
7671
7765
  },
7672
- width: 20,
7673
- height: 20
7766
+ "aria-label": mergedLabels.editPassengerAriaLabel
7674
7767
  }
7675
7768
  )
7676
7769
  ]
@@ -8371,7 +8464,10 @@ var DEFAULT_LABELS25 = {
8371
8464
  unit: "Unit"
8372
8465
  },
8373
8466
  pricePlaceholder: "Rp. 0",
8374
- currencySymbol: "Rp."
8467
+ currencySymbol: "Rp.",
8468
+ deleteOwnerAriaLabel: "Hapus pemilik",
8469
+ decrementQuantityAriaLabel: "Kurangi jumlah",
8470
+ incrementQuantityAriaLabel: "Tambah jumlah"
8375
8471
  },
8376
8472
  en: {
8377
8473
  title: "Owner & Cargo Information",
@@ -8421,7 +8517,10 @@ var DEFAULT_LABELS25 = {
8421
8517
  unit: "Unit"
8422
8518
  },
8423
8519
  pricePlaceholder: "Rp. 0",
8424
- currencySymbol: "Rp."
8520
+ currencySymbol: "Rp.",
8521
+ deleteOwnerAriaLabel: "Delete owner",
8522
+ decrementQuantityAriaLabel: "Decrease quantity",
8523
+ incrementQuantityAriaLabel: "Increase quantity"
8425
8524
  }
8426
8525
  };
8427
8526
  var useStyles25 = makeStyles({
@@ -8538,6 +8637,7 @@ var CardVehicleOwnerForm = ({
8538
8637
  {
8539
8638
  appearance: "transparent",
8540
8639
  icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
8640
+ "aria-label": mergedLabels.deleteOwnerAriaLabel,
8541
8641
  onClick: (e) => {
8542
8642
  e.stopPropagation();
8543
8643
  onDeleteOwner(owner.id);
@@ -9004,6 +9104,7 @@ var CardVehicleOwnerForm = ({
9004
9104
  }
9005
9105
  }
9006
9106
  ),
9107
+ "aria-label": mergedLabels.decrementQuantityAriaLabel,
9007
9108
  size: "small",
9008
9109
  onClick: () => {
9009
9110
  const currentVal = getValues(
@@ -9068,6 +9169,7 @@ var CardVehicleOwnerForm = ({
9068
9169
  }
9069
9170
  }
9070
9171
  ),
9172
+ "aria-label": mergedLabels.incrementQuantityAriaLabel,
9071
9173
  size: "small",
9072
9174
  onClick: () => {
9073
9175
  const currentVal = getValues(
@@ -10076,11 +10178,15 @@ var CardAddon = ({
10076
10178
  var DEFAULT_LABELS29 = {
10077
10179
  id: {
10078
10180
  addButton: "Tambah",
10079
- currencySymbol: "Rp"
10181
+ currencySymbol: "Rp",
10182
+ decrementAriaLabel: "Kurangi jumlah",
10183
+ incrementAriaLabel: "Tambah jumlah"
10080
10184
  },
10081
10185
  en: {
10082
10186
  addButton: "Add",
10083
- currencySymbol: "Rp"
10187
+ currencySymbol: "Rp",
10188
+ decrementAriaLabel: "Decrease quantity",
10189
+ incrementAriaLabel: "Increase quantity"
10084
10190
  }
10085
10191
  };
10086
10192
  var useStyles29 = makeStyles({
@@ -10284,16 +10390,18 @@ var CardMealCatalog = ({
10284
10390
  {
10285
10391
  size: "small",
10286
10392
  shape: "circular",
10393
+ "aria-label": mergedLabels.decrementAriaLabel,
10287
10394
  icon: /* @__PURE__ */ jsx(SubtractRegular, {}),
10288
10395
  onClick: () => onUpdateQuantity(item.id, -1)
10289
10396
  }
10290
10397
  ),
10291
- /* @__PURE__ */ jsx(Body1, { children: item.quantity }),
10398
+ /* @__PURE__ */ jsx(Body1, { "aria-live": "polite", children: item.quantity }),
10292
10399
  /* @__PURE__ */ jsx(
10293
10400
  Button,
10294
10401
  {
10295
10402
  size: "small",
10296
10403
  shape: "circular",
10404
+ "aria-label": mergedLabels.incrementAriaLabel,
10297
10405
  icon: /* @__PURE__ */ jsx(AddRegular, {}),
10298
10406
  onClick: () => onUpdateQuantity(item.id, 1)
10299
10407
  }
@@ -10317,8 +10425,12 @@ var CardMealCatalog = ({
10317
10425
 
10318
10426
  // src/components/CardReview/CardReview.constants.ts
10319
10427
  var DEFAULT_LABELS30 = {
10320
- id: {},
10321
- en: {}
10428
+ id: {
10429
+ defaultTitle: "Tinjauan"
10430
+ },
10431
+ en: {
10432
+ defaultTitle: "Review"
10433
+ }
10322
10434
  };
10323
10435
  var useStyles30 = makeStyles({
10324
10436
  card: {
@@ -10372,10 +10484,10 @@ var CardReview = ({
10372
10484
  headerAction
10373
10485
  }) => {
10374
10486
  const styles = useStyles30();
10375
- ({ ...DEFAULT_LABELS30[language], ...labels });
10487
+ const mergedLabels = { ...DEFAULT_LABELS30[language], ...labels };
10376
10488
  return /* @__PURE__ */ jsxs(Card, { className: `${styles.card} ${className || ""}`, children: [
10377
10489
  /* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
10378
- /* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: title }),
10490
+ /* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: title || mergedLabels.defaultTitle }),
10379
10491
  /* @__PURE__ */ jsx("div", { className: styles.headerLine }),
10380
10492
  headerAction && /* @__PURE__ */ jsx("div", { children: headerAction })
10381
10493
  ] }),
@@ -10787,8 +10899,12 @@ var CardPriceDetails = ({
10787
10899
 
10788
10900
  // src/components/CardPaymentMethodList/CardPaymentMethodList.constants.ts
10789
10901
  var DEFAULT_LABELS33 = {
10790
- id: {},
10791
- en: {}
10902
+ id: {
10903
+ selectAriaLabel: "Pilih metode pembayaran"
10904
+ },
10905
+ en: {
10906
+ selectAriaLabel: "Select payment method"
10907
+ }
10792
10908
  };
10793
10909
  var useStyles34 = makeStyles({
10794
10910
  container: {
@@ -10851,7 +10967,7 @@ var CardPaymentMethodList = ({
10851
10967
  onSelect
10852
10968
  }) => {
10853
10969
  const styles = useStyles34();
10854
- ({ ...DEFAULT_LABELS33[language], ...labels });
10970
+ const mergedLabels = { ...DEFAULT_LABELS33[language], ...labels };
10855
10971
  return /* @__PURE__ */ jsx("div", { className: styles.card, children: /* @__PURE__ */ jsx("div", { className: `${styles.container}`, children: methods.map((category, index) => /* @__PURE__ */ jsxs("div", { children: [
10856
10972
  index > 0 && /* @__PURE__ */ jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsx(Divider, {}) }),
10857
10973
  /* @__PURE__ */ jsx(Accordion, { multiple: true, collapsible: true, children: /* @__PURE__ */ jsxs(AccordionItem, { value: category.value, children: [
@@ -10887,7 +11003,8 @@ var CardPaymentMethodList = ({
10887
11003
  onChange: () => onSelect(option.value),
10888
11004
  value: option.value,
10889
11005
  name: "payment-method",
10890
- disabled: option.disabled
11006
+ disabled: option.disabled,
11007
+ "aria-label": `${mergedLabels.selectAriaLabel} ${option.label}`
10891
11008
  }
10892
11009
  )
10893
11010
  ]
@@ -11138,7 +11255,8 @@ var DEFAULT_LABELS36 = {
11138
11255
  viewTicketButton: "Lihat E-Tiket",
11139
11256
  defaultStatus: "Sudah Dibayar",
11140
11257
  defaultTitle: "Pembayaran berhasil",
11141
- defaultDescription: "Tiket Anda aktif dan siap digunakan."
11258
+ defaultDescription: "Tiket Anda aktif dan siap digunakan.",
11259
+ illustrationAlt: "Ilustrasi E-Tiket"
11142
11260
  },
11143
11261
  en: {
11144
11262
  detailTitle: "Booking Details",
@@ -11151,7 +11269,8 @@ var DEFAULT_LABELS36 = {
11151
11269
  viewTicketButton: "View E-Ticket",
11152
11270
  defaultStatus: "Paid",
11153
11271
  defaultTitle: "Payment successful",
11154
- defaultDescription: "Your ticket is active and ready to use."
11272
+ defaultDescription: "Your ticket is active and ready to use.",
11273
+ illustrationAlt: "E-Ticket Illustration"
11155
11274
  }
11156
11275
  };
11157
11276
  var useStyles37 = makeStyles({
@@ -11235,7 +11354,7 @@ var CardStatusOrder = ({
11235
11354
  "img",
11236
11355
  {
11237
11356
  src: illustrationUrl,
11238
- alt: "E-Ticket",
11357
+ alt: mergedLabels.illustrationAlt,
11239
11358
  width: 406,
11240
11359
  height: 266
11241
11360
  }
@@ -11332,7 +11451,8 @@ var DEFAULT_LABELS37 = {
11332
11451
  ppnNote: "*PPN 11% dikenakan untuk biaya layanan dan biaya admin",
11333
11452
  grandTotalLabel: "Total Pembayaran",
11334
11453
  currencyPrefix: "Rp.",
11335
- currencyCode: "IDR."
11454
+ currencyCode: "IDR.",
11455
+ closeAriaLabel: "Tutup"
11336
11456
  },
11337
11457
  en: {
11338
11458
  title: "Price Details",
@@ -11343,7 +11463,8 @@ var DEFAULT_LABELS37 = {
11343
11463
  ppnNote: "*VAT 11% is charged for service fees and admin fees",
11344
11464
  grandTotalLabel: "Total Payment",
11345
11465
  currencyPrefix: "Rp.",
11346
- currencyCode: "IDR."
11466
+ currencyCode: "IDR.",
11467
+ closeAriaLabel: "Close"
11347
11468
  }
11348
11469
  };
11349
11470
  var useStyles38 = makeStyles({
@@ -11490,7 +11611,7 @@ var ModalPriceDetail = ({
11490
11611
  Button,
11491
11612
  {
11492
11613
  appearance: "subtle",
11493
- "aria-label": "close",
11614
+ "aria-label": mergedLabels.closeAriaLabel,
11494
11615
  icon: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
11495
11616
  "path",
11496
11617
  {