formanitor 0.2.5 → 0.2.7

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.cts CHANGED
@@ -482,6 +482,8 @@ interface UploadProps {
482
482
  className?: string;
483
483
  /** Shown under placeholder, e.g. "PDF, PNG, JPG" */
484
484
  formatsLabel?: string;
485
+ /** Primary drop-zone label from the field template (supports `\n` for line breaks). */
486
+ label?: string;
485
487
  placeholder?: string;
486
488
  beforeUploadContent?: React.ReactNode;
487
489
  id?: string;
@@ -490,7 +492,7 @@ interface UploadProps {
490
492
  */
491
493
  listLayout?: boolean;
492
494
  }
493
- declare function Upload({ value, accept, multiple, disabled, onChange, className, formatsLabel, placeholder, beforeUploadContent, id: idProp, listLayout, }: UploadProps): react_jsx_runtime.JSX.Element;
495
+ declare function Upload({ value, accept, multiple, disabled, onChange, className, formatsLabel, label, placeholder, beforeUploadContent, id: idProp, listLayout, }: UploadProps): react_jsx_runtime.JSX.Element;
494
496
 
495
497
  declare const FormFileUploadWidget: React.FC<{
496
498
  fieldId: string;
package/dist/index.d.ts CHANGED
@@ -482,6 +482,8 @@ interface UploadProps {
482
482
  className?: string;
483
483
  /** Shown under placeholder, e.g. "PDF, PNG, JPG" */
484
484
  formatsLabel?: string;
485
+ /** Primary drop-zone label from the field template (supports `\n` for line breaks). */
486
+ label?: string;
485
487
  placeholder?: string;
486
488
  beforeUploadContent?: React.ReactNode;
487
489
  id?: string;
@@ -490,7 +492,7 @@ interface UploadProps {
490
492
  */
491
493
  listLayout?: boolean;
492
494
  }
493
- declare function Upload({ value, accept, multiple, disabled, onChange, className, formatsLabel, placeholder, beforeUploadContent, id: idProp, listLayout, }: UploadProps): react_jsx_runtime.JSX.Element;
495
+ declare function Upload({ value, accept, multiple, disabled, onChange, className, formatsLabel, label, placeholder, beforeUploadContent, id: idProp, listLayout, }: UploadProps): react_jsx_runtime.JSX.Element;
494
496
 
495
497
  declare const FormFileUploadWidget: React.FC<{
496
498
  fieldId: string;
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import { Checkbox } from './chunk-GNZWSVTB.mjs';
10
10
  import { Slider } from './chunk-SCMXLRX5.mjs';
11
11
  import { AISuggestionsProvider } from './chunk-XDUVO3IZ.mjs';
12
12
  export { AddMedicationField } from './chunk-XDUVO3IZ.mjs';
13
- export { AddInvestigationField } from './chunk-B3GBIAHZ.mjs';
13
+ export { AddInvestigationField } from './chunk-MXY24ZHB.mjs';
14
14
  import './chunk-GZPCYSJK.mjs';
15
15
  export { DifferentialDiagnosis } from './chunk-BU4ZEAAP.mjs';
16
16
  import { fetchOptions } from './chunk-IFMQKLNW.mjs';
@@ -939,6 +939,7 @@ function Upload3({
939
939
  onChange,
940
940
  className,
941
941
  formatsLabel,
942
+ label,
942
943
  placeholder = "Upload File",
943
944
  beforeUploadContent,
944
945
  id: idProp,
@@ -993,11 +994,7 @@ function Upload3({
993
994
  count === 1 ? "" : "s",
994
995
  " selected"
995
996
  ] }) : beforeUploadContent ? beforeUploadContent : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center", children: [
996
- /* @__PURE__ */ jsxs("div", { className: "text-sm text-black font-normal leading-[120%] tracking-[-0.28px] text-center", children: [
997
- "Upload your surgery prescription",
998
- /* @__PURE__ */ jsx("br", {}),
999
- "and medical records"
1000
- ] }),
997
+ label ? /* @__PURE__ */ jsx("div", { className: "text-sm text-black font-normal leading-[120%] tracking-[-0.28px] text-center whitespace-pre-line", children: label }) : null,
1001
998
  /* @__PURE__ */ jsx(Upload, { size: 20, className: "text-[#727272] mt-4" }),
1002
999
  /* @__PURE__ */ jsx("div", { className: "text-xs mt-1 text-text-shades-2", children: placeholder }),
1003
1000
  /* @__PURE__ */ jsxs("div", { className: "mt-2 text-10px leading-[140%] text-[#989898]", children: [
@@ -1178,6 +1175,7 @@ var FormFileUploadWidget = ({
1178
1175
  onChange: handleChange,
1179
1176
  disabled: disabled || isUploading,
1180
1177
  listLayout,
1178
+ label: fieldDef.label,
1181
1179
  placeholder: isUploading ? "Uploading..." : def.uploadPlaceholder ?? "Upload File",
1182
1180
  formatsLabel: def.uploadFormats,
1183
1181
  className: fieldControlClass(
@@ -2178,8 +2176,8 @@ var DateTimeWidget = lazyNamed(() => import('./DateTimeWidget-KRX4O6OD.mjs'), "D
2178
2176
  var EditableTableWidget = lazyNamed(() => import('./EditableTable-VZ66IXYI.mjs'), "EditableTableWidget");
2179
2177
  var AddMedicationWidget = lazyNamed(() => import('./AddMedicationWidget-B5RXRYBK.mjs'), "AddMedicationWidget");
2180
2178
  var DischargeMedicationOrdersWidget = lazyNamed(() => import('./DischargeMedicationOrdersWidget-KA3HANHE.mjs'), "DischargeMedicationOrdersWidget");
2181
- var AddInvestigationWidget = lazyNamed(() => import('./AddInvestigationWidget-FABXZDEZ.mjs'), "AddInvestigationWidget");
2182
- var AddProcedureWidget = lazyNamed(() => import('./AddProcedureWidget-VJZ6NO4Q.mjs'), "AddProcedureWidget");
2179
+ var AddInvestigationWidget = lazyNamed(() => import('./AddInvestigationWidget-A2JS2ETO.mjs'), "AddInvestigationWidget");
2180
+ var AddProcedureWidget = lazyNamed(() => import('./AddProcedureWidget-YW4EV66W.mjs'), "AddProcedureWidget");
2183
2181
  var DifferentialDiagnosisWidget = lazyNamed(() => import('./DifferentialDiagnosisWidget-IZEZVW5F.mjs'), "DifferentialDiagnosisWidget");
2184
2182
  var VitalsWidget = lazyNamed(() => import('./VitalsWidget-63HTXK2M.mjs'), "VitalsWidget");
2185
2183
  var HiddenVitalsWidget = lazyNamed(() => import('./HiddenVitalsWidget-CIE3KERT.mjs'), "HiddenVitalsWidget");