@asdp/ferryui 0.1.22-dev.9417 → 0.1.22-dev.9474

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
@@ -2496,6 +2496,7 @@ var DatePickerInput = forwardRef(
2496
2496
  min,
2497
2497
  max,
2498
2498
  disablePastDates = false,
2499
+ disableFutureDates = false,
2499
2500
  ...restProps
2500
2501
  }, ref) => {
2501
2502
  const [isOpen, setIsOpen] = useState(false);
@@ -2530,6 +2531,7 @@ var DatePickerInput = forwardRef(
2530
2531
  return today;
2531
2532
  };
2532
2533
  const minDate = min ? new Date(min) : disablePastDates ? getStartOfToday() : void 0;
2534
+ const maxDate = max ? new Date(max) : disableFutureDates ? getStartOfToday() : void 0;
2533
2535
  return /* @__PURE__ */ jsxs(
2534
2536
  Popover,
2535
2537
  {
@@ -2581,7 +2583,7 @@ var DatePickerInput = forwardRef(
2581
2583
  highlightSelectedMonth: true,
2582
2584
  showMonthPickerAsOverlay: false,
2583
2585
  minDate,
2584
- maxDate: max ? new Date(max) : void 0
2586
+ maxDate
2585
2587
  }
2586
2588
  ) })
2587
2589
  ]
@@ -4180,7 +4182,8 @@ var InputDynamic = ({
4180
4182
  language = "id",
4181
4183
  labels,
4182
4184
  menuPlacement,
4183
- disablePastDates = false
4185
+ disablePastDates = false,
4186
+ disableFutureDates = false
4184
4187
  }) => {
4185
4188
  const styles = useStyles8();
4186
4189
  const mergedLabels = { ...DEFAULT_LABELS7[language], ...labels };
@@ -4947,7 +4950,8 @@ var InputDynamic = ({
4947
4950
  style: inputStyle,
4948
4951
  max: max ? String(max) : void 0,
4949
4952
  min: min ? String(min) : void 0,
4950
- disablePastDates
4953
+ disablePastDates,
4954
+ disableFutureDates
4951
4955
  }
4952
4956
  );
4953
4957
  }
@@ -6683,14 +6687,26 @@ var useStyles12 = makeStyles({
6683
6687
  display: "flex",
6684
6688
  gap: "1rem",
6685
6689
  marginBottom: "1rem",
6686
- flexWrap: "wrap",
6687
- marginTop: "1rem"
6690
+ flexWrap: "nowrap",
6691
+ marginTop: "1rem",
6692
+ overflowX: "auto",
6693
+ width: "100%",
6694
+ paddingBottom: "8px",
6695
+ paddingTop: "4px",
6696
+ alignItems: "center",
6697
+ flexShrink: 0,
6698
+ "&::-webkit-scrollbar": {
6699
+ display: "none"
6700
+ },
6701
+ msOverflowStyle: "none",
6702
+ scrollbarWidth: "none"
6688
6703
  },
6689
6704
  circularButton: {
6690
6705
  borderRadius: tokens.borderRadius3XLarge,
6691
6706
  border: `1px solid ${tokens.colorBrandBackground}`,
6692
6707
  backgroundColor: brandColors["140"],
6693
- gap: "5px"
6708
+ gap: "5px",
6709
+ flexShrink: 0
6694
6710
  },
6695
6711
  buttonContent: {
6696
6712
  display: "flex",
@@ -6951,7 +6967,8 @@ var ModalSearchHarbor = ({
6951
6967
  }
6952
6968
  )
6953
6969
  ] }),
6954
- favoriteHarbors.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.buttonContainer, children: favoriteHarbors.map((harbor) => /* @__PURE__ */ jsxs(
6970
+ favoriteHarbors.length > 0 && //Make Favorite scroll to vertical
6971
+ /* @__PURE__ */ jsx("div", { className: styles.buttonContainer, children: favoriteHarbors.map((harbor) => /* @__PURE__ */ jsxs(
6955
6972
  Button,
6956
6973
  {
6957
6974
  onClick: () => handleSelect(harbor),
@@ -7488,7 +7505,7 @@ var useStyles14 = makeStyles({
7488
7505
  display: "flex",
7489
7506
  flexDirection: "column",
7490
7507
  gap: "12px",
7491
- // maxHeight: "400px",
7508
+ maxHeight: "700px",
7492
7509
  overflowY: "auto",
7493
7510
  padding: "2px"
7494
7511
  },
@@ -7685,54 +7702,56 @@ var ModalService = ({
7685
7702
  actionButton: reloadButton,
7686
7703
  imageSrc: emptyImageSrc
7687
7704
  }
7688
- ) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: styles.serviceList, children: [
7689
- /* @__PURE__ */ jsx("div", { className: styles.headerRow, children: /* @__PURE__ */ jsx(
7690
- Checkbox,
7691
- {
7692
- label: mergedLabels.selectAll,
7693
- checked: selectedServices.length === services.length,
7694
- onChange: handleToggleAll
7695
- }
7696
- ) }),
7697
- /* @__PURE__ */ jsx(Divider, {}),
7698
- services.map((service) => /* @__PURE__ */ jsxs(
7699
- "div",
7700
- {
7701
- className: styles.serviceItem,
7702
- onClick: () => handleToggleService(service.serviceTypeId),
7703
- children: [
7704
- /* @__PURE__ */ jsxs("div", { className: styles.serviceContent, children: [
7705
- /* @__PURE__ */ jsx(Body1, { className: styles.serviceName, children: service.serviceTypeName }),
7706
- /* @__PURE__ */ jsx("div", { style: { alignSelf: "flex-start" }, children: /* @__PURE__ */ jsx(
7707
- Badge,
7705
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
7706
+ /* @__PURE__ */ jsxs("div", { className: styles.serviceList, children: [
7707
+ /* @__PURE__ */ jsx("div", { className: styles.headerRow, children: /* @__PURE__ */ jsx(
7708
+ Checkbox,
7709
+ {
7710
+ label: mergedLabels.selectAll,
7711
+ checked: selectedServices.length === services.length,
7712
+ onChange: handleToggleAll
7713
+ }
7714
+ ) }),
7715
+ /* @__PURE__ */ jsx(Divider, {}),
7716
+ services.map((service) => /* @__PURE__ */ jsxs(
7717
+ "div",
7718
+ {
7719
+ className: styles.serviceItem,
7720
+ onClick: () => handleToggleService(service.serviceTypeId),
7721
+ children: [
7722
+ /* @__PURE__ */ jsxs("div", { className: styles.serviceContent, children: [
7723
+ /* @__PURE__ */ jsx(Body1, { className: styles.serviceName, children: service.serviceShortDescription }),
7724
+ /* @__PURE__ */ jsx("div", { style: { alignSelf: "flex-start" }, children: /* @__PURE__ */ jsx(
7725
+ Badge,
7726
+ {
7727
+ appearance: "ghost",
7728
+ style: {
7729
+ backgroundColor: service.serviceTypeColor,
7730
+ color: "#ffffff",
7731
+ border: "none",
7732
+ padding: "4px 10px",
7733
+ height: "auto",
7734
+ borderRadius: "100px"
7735
+ },
7736
+ children: service.serviceTypeName
7737
+ }
7738
+ ) }),
7739
+ /* @__PURE__ */ jsx(Caption1, { className: styles.serviceDescription, children: service.serviceDescription })
7740
+ ] }),
7741
+ /* @__PURE__ */ jsx(
7742
+ Checkbox,
7708
7743
  {
7709
- appearance: "ghost",
7710
- style: {
7711
- backgroundColor: service.serviceTypeColor,
7712
- color: "#ffffff",
7713
- border: "none",
7714
- padding: "4px 10px",
7715
- height: "auto",
7716
- borderRadius: "100px"
7717
- },
7718
- children: service.serviceTypeCode
7744
+ checked: selectedServices.includes(service.serviceTypeId),
7745
+ onChange: () => handleToggleService(service.serviceTypeId),
7746
+ onClick: (e) => e.stopPropagation()
7719
7747
  }
7720
- ) }),
7721
- /* @__PURE__ */ jsx(Caption1, { className: styles.serviceDescription, children: service.serviceDescription })
7722
- ] }),
7723
- /* @__PURE__ */ jsx(
7724
- Checkbox,
7725
- {
7726
- checked: selectedServices.includes(service.serviceTypeId),
7727
- onChange: () => handleToggleService(service.serviceTypeId),
7728
- onClick: (e) => e.stopPropagation()
7729
- }
7730
- )
7731
- ]
7732
- },
7733
- service.serviceTypeId
7734
- )),
7735
- /* @__PURE__ */ jsx(Divider, {}),
7748
+ )
7749
+ ]
7750
+ },
7751
+ service.serviceTypeId
7752
+ )),
7753
+ /* @__PURE__ */ jsx(Divider, {})
7754
+ ] }),
7736
7755
  /* @__PURE__ */ jsx("div", { className: styles.footer, children: /* @__PURE__ */ jsx(
7737
7756
  Button,
7738
7757
  {
@@ -7744,7 +7763,7 @@ var ModalService = ({
7744
7763
  children: mergedLabels.saveButton
7745
7764
  }
7746
7765
  ) })
7747
- ] }) }) })
7766
+ ] }) })
7748
7767
  ] }) }) });
7749
7768
  };
7750
7769
 
@@ -11493,6 +11512,7 @@ var ModalPassengerForm = ({
11493
11512
  placeholder: mergedLabels.datePlaceholder,
11494
11513
  size: "large",
11495
11514
  required: true,
11515
+ disableFutureDates: true,
11496
11516
  validationRules: {
11497
11517
  required: mergedErrors.requiredDate,
11498
11518
  validate: (value) => {
@@ -11535,22 +11555,7 @@ var ModalPassengerForm = ({
11535
11555
  }
11536
11556
  }
11537
11557
  ),
11538
- watchIdentityTypeId ? watchIdentityTypeId === "lainnya" ? /* @__PURE__ */ jsx(
11539
- InputDynamic_default,
11540
- {
11541
- name: "identityId",
11542
- control,
11543
- type: "date",
11544
- label: mergedLabels.idTypeOtherLabel,
11545
- placeholder: mergedLabels.idTypeOtherPlaceholder,
11546
- size: "large",
11547
- required: true,
11548
- max: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
11549
- validationRules: {
11550
- required: mergedErrors.requiredDate
11551
- }
11552
- }
11553
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
11558
+ watchIdentityTypeId ? watchIdentityTypeId !== IDENTITY_TYPE.TGL.toString() && /* @__PURE__ */ jsxs(Fragment, { children: [
11554
11559
  watchIdentityTypeId === IDENTITY_TYPE.PSP.toString() && /* @__PURE__ */ jsx(
11555
11560
  InputDynamic_default,
11556
11561
  {