@asdp/ferryui 0.1.22-dev.10079 → 0.1.22-dev.10158

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
@@ -10793,6 +10793,8 @@ var ModalListPassenger = ({
10793
10793
  children: [
10794
10794
  /* @__PURE__ */ jsxs("div", { children: [
10795
10795
  /* @__PURE__ */ jsxs(Subtitle2, { children: [
10796
+ passenger.titleName,
10797
+ " ",
10796
10798
  passenger.fullName,
10797
10799
  " ",
10798
10800
  passenger.isAccountOwner && /* @__PURE__ */ jsx(
@@ -11245,14 +11247,6 @@ var ModalPassengerForm = ({
11245
11247
  );
11246
11248
  const idRuleLengthMatch = selectedIdentityType?.rule?.match(/\{(\d+)(?:,\d+)?\}/);
11247
11249
  const dynamicMinLengthId = idRuleLengthMatch ? parseInt(idRuleLengthMatch[1], 10) : 6;
11248
- useEffect(() => {
11249
- const subscription = watch((value, { name, type }) => {
11250
- console.log("Changed field:", name);
11251
- console.log("Change type:", type);
11252
- onChange(value);
11253
- });
11254
- return () => subscription.unsubscribe();
11255
- }, [watch, onChange]);
11256
11250
  useEffect(() => {
11257
11251
  reset(defaultValues);
11258
11252
  }, [defaultValues, reset]);
@@ -12055,7 +12049,10 @@ var useStyles25 = makeStyles({
12055
12049
  },
12056
12050
  passengerList: {
12057
12051
  display: "flex",
12058
- flexDirection: "column"
12052
+ flexDirection: "column",
12053
+ maxHeight: "400px",
12054
+ overflowY: "auto",
12055
+ paddingRight: "0.5rem"
12059
12056
  },
12060
12057
  passengerItem: {
12061
12058
  display: "flex",
@@ -12393,7 +12390,7 @@ var DEFAULT_LABELS26 = {
12393
12390
  cargoQuantityLabel: "Jumlah Muatan",
12394
12391
  priceLabel: "Harga",
12395
12392
  industryTypeLabel: "Data Jenis Industri",
12396
- industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.',
12393
+ industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis industrinya.',
12397
12394
  cargoCategoryLabel: "Kategori Muatan",
12398
12395
  cargoCategoryHelperTextPrefix: "Pahami definisi, jenis dan contoh kategori muatan",
12399
12396
  deleteCargoButton: "Hapus Muatan",
@@ -13248,7 +13245,7 @@ var CardVehicleOwnerForm = ({
13248
13245
  `owners.${index}.cargo.${cargoIndex}.quantity`
13249
13246
  ) || 0;
13250
13247
  const currentQty = Number(currentVal);
13251
- if (currentQty > 0) {
13248
+ if (currentQty > 1) {
13252
13249
  const newVal = currentQty - 1;
13253
13250
  setValue(
13254
13251
  `owners.${index}.cargo.${cargoIndex}.quantity`,
@@ -13278,6 +13275,7 @@ var CardVehicleOwnerForm = ({
13278
13275
  {
13279
13276
  ...field,
13280
13277
  min: 1,
13278
+ step: "1",
13281
13279
  type: "number",
13282
13280
  style: {
13283
13281
  border: "none",
@@ -13289,6 +13287,21 @@ var CardVehicleOwnerForm = ({
13289
13287
  fontSize: tokens.fontSizeBase400,
13290
13288
  fontFamily: tokens.fontFamilyBase
13291
13289
  },
13290
+ onKeyDown: (e) => {
13291
+ if (["e", "E", "+", "-", ".", ","].includes(
13292
+ e.key
13293
+ )) {
13294
+ e.preventDefault();
13295
+ }
13296
+ },
13297
+ onPaste: (e) => {
13298
+ const paste = e.clipboardData.getData(
13299
+ "text"
13300
+ );
13301
+ if (!/^\d+$/.test(paste)) {
13302
+ e.preventDefault();
13303
+ }
13304
+ },
13292
13305
  onWheel: (e) => e.target.blur(),
13293
13306
  onChange: (e) => {
13294
13307
  const newVal = Number(
@@ -13305,7 +13318,7 @@ var CardVehicleOwnerForm = ({
13305
13318
  ),
13306
13319
  rules: {
13307
13320
  required: true,
13308
- min: 1
13321
+ validate: (val) => Number(val) > 0
13309
13322
  }
13310
13323
  }
13311
13324
  ) }),