@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/README.md CHANGED
@@ -50,13 +50,14 @@ npm run typecheck
50
50
 
51
51
  We use **yalc** to simulate package publishing locally.
52
52
 
53
- 1. **Install yalc globally** (if not already installed):
53
+ 1. **Install yalc globally** (if not already installed):
54
54
 
55
55
  ```bash
56
56
  npm install -g yalc
57
57
  ```
58
58
 
59
- 2. **In `ferryui` directory:**
59
+ 2. **In `ferryui` directory:**
60
+
60
61
  After making changes, publish them locally:
61
62
 
62
63
  ```bash
@@ -65,8 +66,10 @@ We use **yalc** to simulate package publishing locally.
65
66
 
66
67
  _`--push` will automatically update projects that have added this package via yalc._
67
68
 
68
- 3. **In Consumer Project (e.g., ferizy):**
69
+ 3. **In Consumer Project (e.g., ferizy):**
70
+
69
71
  If the package doesn't update automatically, run:
72
+
70
73
  ```bash
71
74
  yalc update
72
75
  ```
package/dist/index.js CHANGED
@@ -10802,6 +10802,8 @@ var ModalListPassenger = ({
10802
10802
  children: [
10803
10803
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
10804
10804
  /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle2, { children: [
10805
+ passenger.titleName,
10806
+ " ",
10805
10807
  passenger.fullName,
10806
10808
  " ",
10807
10809
  passenger.isAccountOwner && /* @__PURE__ */ jsxRuntime.jsx(
@@ -11254,14 +11256,6 @@ var ModalPassengerForm = ({
11254
11256
  );
11255
11257
  const idRuleLengthMatch = selectedIdentityType?.rule?.match(/\{(\d+)(?:,\d+)?\}/);
11256
11258
  const dynamicMinLengthId = idRuleLengthMatch ? parseInt(idRuleLengthMatch[1], 10) : 6;
11257
- React.useEffect(() => {
11258
- const subscription = watch((value, { name, type }) => {
11259
- console.log("Changed field:", name);
11260
- console.log("Change type:", type);
11261
- onChange(value);
11262
- });
11263
- return () => subscription.unsubscribe();
11264
- }, [watch, onChange]);
11265
11259
  React.useEffect(() => {
11266
11260
  reset(defaultValues);
11267
11261
  }, [defaultValues, reset]);
@@ -12064,7 +12058,10 @@ var useStyles25 = reactComponents.makeStyles({
12064
12058
  },
12065
12059
  passengerList: {
12066
12060
  display: "flex",
12067
- flexDirection: "column"
12061
+ flexDirection: "column",
12062
+ maxHeight: "400px",
12063
+ overflowY: "auto",
12064
+ paddingRight: "0.5rem"
12068
12065
  },
12069
12066
  passengerItem: {
12070
12067
  display: "flex",
@@ -12402,7 +12399,7 @@ var DEFAULT_LABELS26 = {
12402
12399
  cargoQuantityLabel: "Jumlah Muatan",
12403
12400
  priceLabel: "Harga",
12404
12401
  industryTypeLabel: "Data Jenis Industri",
12405
- industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.',
12402
+ industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis industrinya.',
12406
12403
  cargoCategoryLabel: "Kategori Muatan",
12407
12404
  cargoCategoryHelperTextPrefix: "Pahami definisi, jenis dan contoh kategori muatan",
12408
12405
  deleteCargoButton: "Hapus Muatan",
@@ -13257,7 +13254,7 @@ var CardVehicleOwnerForm = ({
13257
13254
  `owners.${index}.cargo.${cargoIndex}.quantity`
13258
13255
  ) || 0;
13259
13256
  const currentQty = Number(currentVal);
13260
- if (currentQty > 0) {
13257
+ if (currentQty > 1) {
13261
13258
  const newVal = currentQty - 1;
13262
13259
  setValue(
13263
13260
  `owners.${index}.cargo.${cargoIndex}.quantity`,
@@ -13287,6 +13284,7 @@ var CardVehicleOwnerForm = ({
13287
13284
  {
13288
13285
  ...field,
13289
13286
  min: 1,
13287
+ step: "1",
13290
13288
  type: "number",
13291
13289
  style: {
13292
13290
  border: "none",
@@ -13298,6 +13296,21 @@ var CardVehicleOwnerForm = ({
13298
13296
  fontSize: reactComponents.tokens.fontSizeBase400,
13299
13297
  fontFamily: reactComponents.tokens.fontFamilyBase
13300
13298
  },
13299
+ onKeyDown: (e) => {
13300
+ if (["e", "E", "+", "-", ".", ","].includes(
13301
+ e.key
13302
+ )) {
13303
+ e.preventDefault();
13304
+ }
13305
+ },
13306
+ onPaste: (e) => {
13307
+ const paste = e.clipboardData.getData(
13308
+ "text"
13309
+ );
13310
+ if (!/^\d+$/.test(paste)) {
13311
+ e.preventDefault();
13312
+ }
13313
+ },
13301
13314
  onWheel: (e) => e.target.blur(),
13302
13315
  onChange: (e) => {
13303
13316
  const newVal = Number(
@@ -13314,7 +13327,7 @@ var CardVehicleOwnerForm = ({
13314
13327
  ),
13315
13328
  rules: {
13316
13329
  required: true,
13317
- min: 1
13330
+ validate: (val) => Number(val) > 0
13318
13331
  }
13319
13332
  }
13320
13333
  ) }),