@asdp/ferryui 0.1.22-dev.10153 → 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
@@ -12049,7 +12049,10 @@ var useStyles25 = makeStyles({
12049
12049
  },
12050
12050
  passengerList: {
12051
12051
  display: "flex",
12052
- flexDirection: "column"
12052
+ flexDirection: "column",
12053
+ maxHeight: "400px",
12054
+ overflowY: "auto",
12055
+ paddingRight: "0.5rem"
12053
12056
  },
12054
12057
  passengerItem: {
12055
12058
  display: "flex",
@@ -12387,7 +12390,7 @@ var DEFAULT_LABELS26 = {
12387
12390
  cargoQuantityLabel: "Jumlah Muatan",
12388
12391
  priceLabel: "Harga",
12389
12392
  industryTypeLabel: "Data Jenis Industri",
12390
- 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.',
12391
12394
  cargoCategoryLabel: "Kategori Muatan",
12392
12395
  cargoCategoryHelperTextPrefix: "Pahami definisi, jenis dan contoh kategori muatan",
12393
12396
  deleteCargoButton: "Hapus Muatan",
@@ -13242,7 +13245,7 @@ var CardVehicleOwnerForm = ({
13242
13245
  `owners.${index}.cargo.${cargoIndex}.quantity`
13243
13246
  ) || 0;
13244
13247
  const currentQty = Number(currentVal);
13245
- if (currentQty > 0) {
13248
+ if (currentQty > 1) {
13246
13249
  const newVal = currentQty - 1;
13247
13250
  setValue(
13248
13251
  `owners.${index}.cargo.${cargoIndex}.quantity`,
@@ -13272,6 +13275,7 @@ var CardVehicleOwnerForm = ({
13272
13275
  {
13273
13276
  ...field,
13274
13277
  min: 1,
13278
+ step: "1",
13275
13279
  type: "number",
13276
13280
  style: {
13277
13281
  border: "none",
@@ -13283,6 +13287,21 @@ var CardVehicleOwnerForm = ({
13283
13287
  fontSize: tokens.fontSizeBase400,
13284
13288
  fontFamily: tokens.fontFamilyBase
13285
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
+ },
13286
13305
  onWheel: (e) => e.target.blur(),
13287
13306
  onChange: (e) => {
13288
13307
  const newVal = Number(
@@ -13299,7 +13318,7 @@ var CardVehicleOwnerForm = ({
13299
13318
  ),
13300
13319
  rules: {
13301
13320
  required: true,
13302
- min: 1
13321
+ validate: (val) => Number(val) > 0
13303
13322
  }
13304
13323
  }
13305
13324
  ) }),