@asdp/ferryui 0.1.22-dev.9610 → 0.1.22-dev.9698

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.d.mts CHANGED
@@ -3051,8 +3051,12 @@ interface CardVehicleOwnerFormProps {
3051
3051
  /**
3052
3052
  * Options for load type select inputs
3053
3053
  */
3054
- loadTypeOptions?: SelectOption[];
3055
- loadTypes?: LoadType[];
3054
+ loadTypeOptions?: (LoadType & {
3055
+ commodityId: number;
3056
+ })[];
3057
+ loadTypes?: (LoadType & {
3058
+ commodityId: number;
3059
+ })[];
3056
3060
  /**
3057
3061
  * Options for industry select inputs
3058
3062
  */
@@ -3790,6 +3794,12 @@ interface FileUploadProps<T extends FieldValues = FieldValues> {
3790
3794
  */
3791
3795
  pdfIcon?: string;
3792
3796
  downloadTemplateDocument?: boolean;
3797
+ /**
3798
+ * Optional info label text to display with an info icon next to the label.
3799
+ * When not provided, no info label is displayed.
3800
+ * Example: 'Maximum file size is 10MB'
3801
+ */
3802
+ infoLabel?: string;
3793
3803
  }
3794
3804
 
3795
3805
  declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -3051,8 +3051,12 @@ interface CardVehicleOwnerFormProps {
3051
3051
  /**
3052
3052
  * Options for load type select inputs
3053
3053
  */
3054
- loadTypeOptions?: SelectOption[];
3055
- loadTypes?: LoadType[];
3054
+ loadTypeOptions?: (LoadType & {
3055
+ commodityId: number;
3056
+ })[];
3057
+ loadTypes?: (LoadType & {
3058
+ commodityId: number;
3059
+ })[];
3056
3060
  /**
3057
3061
  * Options for industry select inputs
3058
3062
  */
@@ -3790,6 +3794,12 @@ interface FileUploadProps<T extends FieldValues = FieldValues> {
3790
3794
  */
3791
3795
  pdfIcon?: string;
3792
3796
  downloadTemplateDocument?: boolean;
3797
+ /**
3798
+ * Optional info label text to display with an info icon next to the label.
3799
+ * When not provided, no info label is displayed.
3800
+ * Example: 'Maximum file size is 10MB'
3801
+ */
3802
+ infoLabel?: string;
3793
3803
  }
3794
3804
 
3795
3805
  declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
package/dist/index.js CHANGED
@@ -4242,7 +4242,8 @@ var InputDynamic = ({
4242
4242
  ...provided,
4243
4243
  minHeight: "40px",
4244
4244
  // fontSize: tokens.fontSizeBase400,
4245
- transition: "all 0.2s ease"
4245
+ transition: "all 0.2s ease",
4246
+ cursor: disabled ? "not-allowed" : "pointer"
4246
4247
  };
4247
4248
  if (currentAppearance === "outline") {
4248
4249
  return {
@@ -12794,6 +12795,7 @@ var CardVehicleOwnerForm = ({
12794
12795
  onUpdateOwner(owner.id, {
12795
12796
  cargoItems: updatedCargoItems
12796
12797
  });
12798
+ setValue(`owners.${index}.cargo.${cargoIndex}.cargoType`, "");
12797
12799
  },
12798
12800
  options: commodityOptions,
12799
12801
  placeholder: mergedLabels.selectPlaceholder,
@@ -12844,7 +12846,12 @@ var CardVehicleOwnerForm = ({
12844
12846
  cargoItems: updatedCargoItems
12845
12847
  });
12846
12848
  },
12847
- options: loadTypeOptions,
12849
+ options: loadTypeOptions.filter((lt) => lt.commodityId === (getValues(
12850
+ `owners.${index}.cargo.${cargoIndex}.commodity`
12851
+ ) || "")).map((lt) => ({
12852
+ value: lt.id.toString(),
12853
+ label: `${lt.name} (${lt.unit?.name})`
12854
+ })),
12848
12855
  placeholder: mergedLabels.selectPlaceholder,
12849
12856
  required: true,
12850
12857
  size: "large",
@@ -15892,8 +15899,8 @@ var uploadStyles = reactComponents.makeStyles({
15892
15899
  pointerEvents: "none"
15893
15900
  },
15894
15901
  filePreviewImage: {
15895
- width: "48px",
15896
- height: "48px",
15902
+ width: "32px",
15903
+ height: "32px",
15897
15904
  borderRadius: reactComponents.tokens.borderRadiusSmall,
15898
15905
  objectFit: "cover"
15899
15906
  },
@@ -15901,6 +15908,18 @@ var uploadStyles = reactComponents.makeStyles({
15901
15908
  maxWidth: "100%",
15902
15909
  maxHeight: "70vh",
15903
15910
  objectFit: "contain"
15911
+ },
15912
+ infoLabel: {
15913
+ '& [role="note"]': {
15914
+ backgroundColor: "black",
15915
+ color: "white"
15916
+ }
15917
+ },
15918
+ label: {
15919
+ whiteSpace: "nowrap",
15920
+ overflow: "hidden",
15921
+ textOverflow: "ellipsis",
15922
+ display: "block"
15904
15923
  }
15905
15924
  });
15906
15925
  var FileUpload = React__default.default.forwardRef(
@@ -15916,7 +15935,8 @@ var FileUpload = React__default.default.forwardRef(
15916
15935
  language = "id",
15917
15936
  labels: customLabels,
15918
15937
  pdfIcon,
15919
- downloadTemplateDocument = false
15938
+ downloadTemplateDocument = false,
15939
+ infoLabel
15920
15940
  }, ref) => {
15921
15941
  const mergedLabels = { ...DEFAULT_LABELS39[language], ...customLabels };
15922
15942
  const styles = uploadStyles();
@@ -16049,8 +16069,11 @@ var FileUpload = React__default.default.forwardRef(
16049
16069
  return /* @__PURE__ */ jsxRuntime.jsxs(
16050
16070
  reactComponents.Field,
16051
16071
  {
16072
+ ref,
16052
16073
  required,
16053
- label: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: label }),
16074
+ label: {
16075
+ children: (_, slotProps) => infoLabel ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.InfoLabel, { ...slotProps, info: infoLabel, className: styles.infoLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label }) }) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label })
16076
+ },
16054
16077
  className: styles.fieldContainer,
16055
16078
  children: [
16056
16079
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16130,8 +16153,10 @@ var FileUpload = React__default.default.forwardRef(
16130
16153
  {
16131
16154
  ref,
16132
16155
  required,
16133
- label: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: label }),
16134
16156
  className: styles.fieldContainer,
16157
+ label: {
16158
+ children: (_, slotProps) => infoLabel ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.InfoLabel, { ...slotProps, info: infoLabel, className: styles.infoLabel, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label }) }) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: label })
16159
+ },
16135
16160
  children: [
16136
16161
  /* @__PURE__ */ jsxRuntime.jsxs(
16137
16162
  reactGridSystem.Container,