formanitor 0.0.42 → 0.0.44

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
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | string;
3
+ type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | 'urology_smart_history' | 'urology_examination' | 'urology_pathway' | string;
4
4
  interface ValidationRule {
5
5
  min?: number;
6
6
  max?: number;
@@ -274,10 +274,10 @@ interface DiagnosisTextareaFieldDef extends BaseFieldDef {
274
274
  }
275
275
  /**
276
276
  * Reusable **textarea** with optional **suggestion chips** (schema `options` or `dataSource`).
277
- * - Value is a **single string** (same as `textarea`); chip clicks append or remove that option’s
278
- * `value` as a commaseparated token (default `", "`; override with `meta.appendSeparator`).
277
+ * - Value is a **single string**; chip clicks toggle option `value` tokens. With schema `options`,
278
+ * chip slugs are written on the **last line** (comma-separated); prose above stays on earlier lines.
279
279
  * - Schema `rules` with `op: "contains"` on this field match **token equality** after splitting
280
- * on commas (see `evaluateRules` / `suggestion_textarea` docs).
280
+ * on commas and newlines (see `evaluateRules` / `suggestion_textarea` docs).
281
281
  * - Optionally set **`meta.parallelChipFieldId`** to the id of a **`multiselect`** field (often
282
282
  * `hidden`) with the same `options`; that field’s array value is derived from chip tokens in
283
283
  * the textarea string so APIs can read a structured list without parsing commas.
@@ -295,7 +295,7 @@ interface SuggestionTextareaFieldDef extends BaseFieldDef {
295
295
  suggestionsAriaLabel?: string;
296
296
  /**
297
297
  * ID of a sibling **`multiselect`** field (usually `hidden: true`). Its value is kept in sync
298
- * as an array of selected chip values derived from the comma-separated textarea string.
298
+ * as an array of selected chip values derived from the comma- and newline-separated textarea string.
299
299
  */
300
300
  parallelChipFieldId?: string;
301
301
  /**
@@ -395,6 +395,21 @@ interface SurgicalRiskFlagsFieldDef extends BaseFieldDef {
395
395
  cardTitle?: string;
396
396
  } & Record<string, unknown>;
397
397
  }
398
+ /** Urology OPD: dynamic smart history (SOCRATES, IPSS, haematuria, sexual). */
399
+ interface UrologySmartHistoryFieldDef extends BaseFieldDef {
400
+ type: 'urology_smart_history';
401
+ }
402
+ /** Urology OPD: structured examination (general, abdomen, GU, DRE). */
403
+ interface UrologyExaminationFieldDef extends BaseFieldDef {
404
+ type: 'urology_examination';
405
+ }
406
+ /** Urology OPD: objective pathway metrics and risk toggles (maps to `uro_pathway`). */
407
+ interface UrologyPathwayFieldDef extends BaseFieldDef {
408
+ type: 'urology_pathway';
409
+ meta?: {
410
+ subtitle?: string;
411
+ } & Record<string, unknown>;
412
+ }
398
413
  /** General surgery OPD: structured smart history (SOCRATES, swelling, GI, breast, anorectal, thyroid); HOPC is template field `symptoms` embedded in the widget. */
399
414
  interface GeneralSurgerySmartHistoryFieldDef extends BaseFieldDef {
400
415
  type: 'general_surgery_smart_history';
@@ -473,7 +488,7 @@ interface DiagnosticPackage {
473
488
  department?: string;
474
489
  tests: DiagnosticPackageTest[];
475
490
  }
476
- type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SliderFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | GeneralSurgerySmartHistoryFieldDef | GeneralSurgeryExaminationFieldDef | GeneralSurgeryGradingFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
491
+ type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SliderFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | GeneralSurgerySmartHistoryFieldDef | GeneralSurgeryExaminationFieldDef | GeneralSurgeryGradingFieldDef | UrologySmartHistoryFieldDef | UrologyExaminationFieldDef | UrologyPathwayFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
477
492
  /** Boolean switch; value is `true` | `false`. */
478
493
  interface ToggleFieldDef extends BaseFieldDef {
479
494
  type: 'toggle';
@@ -488,8 +503,8 @@ interface Condition {
488
503
  /**
489
504
  * For `op: "contains"`:
490
505
  * - If the field value is an **array**, checks `value.includes(condition.value)` (e.g. multiselect).
491
- * - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas, trims
492
- * tokens, and checks that one token equals `String(condition.value)` (chip values in text).
506
+ * - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas and/or line
507
+ * breaks, trims tokens, and checks that one token equals `String(condition.value)` (chip values in text).
493
508
  */
494
509
  value: any;
495
510
  }
@@ -841,6 +856,25 @@ declare function useField(fieldId: string): {
841
856
 
842
857
  declare const DynamicForm: React.FC;
843
858
 
859
+ type DynamicFormV2SectionMode = "accordion" | "plain";
860
+ interface DynamicFormV2Props {
861
+ /** When true, renders `schema.title` as the page heading. Default true. */
862
+ showTitle?: boolean;
863
+ /**
864
+ * `accordion` — bordered collapsible sections (same as DynamicForm).
865
+ * `plain` — simple vertical stack, no card/accordion chrome.
866
+ */
867
+ sectionMode?: DynamicFormV2SectionMode;
868
+ /** In `plain` mode, show the section title above fields. Default true. Ignored for accordion. */
869
+ showSectionTitles?: boolean;
870
+ className?: string;
871
+ }
872
+ /**
873
+ * Alternate layout shell for alternative designs (e.g. marketing / minimal flows).
874
+ * Same schema traversal as {@link DynamicForm}; configurable title and section chrome.
875
+ */
876
+ declare const DynamicFormV2: React.FC<DynamicFormV2Props>;
877
+
844
878
  /** Shape of one differential diagnosis item from AI (must match form field value) */
845
879
  type AIDifferentialDiagnosisItem = {
846
880
  category: string;
@@ -911,6 +945,24 @@ declare const ReadOnlyForm: React.FC<ReadOnlyFormProps>;
911
945
 
912
946
  interface FormControlsProps {
913
947
  className?: string;
948
+ containerStyle?: React.CSSProperties;
949
+ /**
950
+ * When false, hides workflow state + valid/invalid text. Buttons stay right-aligned unless
951
+ * `actionsFullWidth` is used. Default true (existing behaviour).
952
+ */
953
+ showWorkflowStatus?: boolean;
954
+ statusClassName?: string;
955
+ statusStyle?: React.CSSProperties;
956
+ /** Classes for the buttons row wrapper. */
957
+ actionsClassName?: string;
958
+ actionsStyle?: React.CSSProperties;
959
+ /**
960
+ * When workflow status is hidden, make action buttons stretch (column on small screens;
961
+ * on `sm+` submit row grows with flex). Ignored while `showWorkflowStatus` is true.
962
+ */
963
+ actionsFullWidth?: boolean;
964
+ /** Applied to both Save Draft and Submit buttons. */
965
+ buttonClassName?: string;
914
966
  onSaveDraft?: () => void;
915
967
  onSubmit?: (to: string) => void;
916
968
  }
@@ -1121,4 +1173,4 @@ declare const SmartTextareaWidget: React.FC<{
1121
1173
  fieldId: string;
1122
1174
  }>;
1123
1175
 
1124
- export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type GeneralSurgeryExaminationFieldDef, type GeneralSurgeryGradingFieldDef, type GeneralSurgerySmartHistoryFieldDef, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type PainScaleFlagsFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, type SliderFieldDef, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
1176
+ export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, DynamicFormV2, type DynamicFormV2Props, type DynamicFormV2SectionMode, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type GeneralSurgeryExaminationFieldDef, type GeneralSurgeryGradingFieldDef, type GeneralSurgerySmartHistoryFieldDef, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type PainScaleFlagsFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, type SliderFieldDef, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type UrologyExaminationFieldDef, type UrologyPathwayFieldDef, type UrologySmartHistoryFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | string;
3
+ type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | 'urology_smart_history' | 'urology_examination' | 'urology_pathway' | string;
4
4
  interface ValidationRule {
5
5
  min?: number;
6
6
  max?: number;
@@ -274,10 +274,10 @@ interface DiagnosisTextareaFieldDef extends BaseFieldDef {
274
274
  }
275
275
  /**
276
276
  * Reusable **textarea** with optional **suggestion chips** (schema `options` or `dataSource`).
277
- * - Value is a **single string** (same as `textarea`); chip clicks append or remove that option’s
278
- * `value` as a commaseparated token (default `", "`; override with `meta.appendSeparator`).
277
+ * - Value is a **single string**; chip clicks toggle option `value` tokens. With schema `options`,
278
+ * chip slugs are written on the **last line** (comma-separated); prose above stays on earlier lines.
279
279
  * - Schema `rules` with `op: "contains"` on this field match **token equality** after splitting
280
- * on commas (see `evaluateRules` / `suggestion_textarea` docs).
280
+ * on commas and newlines (see `evaluateRules` / `suggestion_textarea` docs).
281
281
  * - Optionally set **`meta.parallelChipFieldId`** to the id of a **`multiselect`** field (often
282
282
  * `hidden`) with the same `options`; that field’s array value is derived from chip tokens in
283
283
  * the textarea string so APIs can read a structured list without parsing commas.
@@ -295,7 +295,7 @@ interface SuggestionTextareaFieldDef extends BaseFieldDef {
295
295
  suggestionsAriaLabel?: string;
296
296
  /**
297
297
  * ID of a sibling **`multiselect`** field (usually `hidden: true`). Its value is kept in sync
298
- * as an array of selected chip values derived from the comma-separated textarea string.
298
+ * as an array of selected chip values derived from the comma- and newline-separated textarea string.
299
299
  */
300
300
  parallelChipFieldId?: string;
301
301
  /**
@@ -395,6 +395,21 @@ interface SurgicalRiskFlagsFieldDef extends BaseFieldDef {
395
395
  cardTitle?: string;
396
396
  } & Record<string, unknown>;
397
397
  }
398
+ /** Urology OPD: dynamic smart history (SOCRATES, IPSS, haematuria, sexual). */
399
+ interface UrologySmartHistoryFieldDef extends BaseFieldDef {
400
+ type: 'urology_smart_history';
401
+ }
402
+ /** Urology OPD: structured examination (general, abdomen, GU, DRE). */
403
+ interface UrologyExaminationFieldDef extends BaseFieldDef {
404
+ type: 'urology_examination';
405
+ }
406
+ /** Urology OPD: objective pathway metrics and risk toggles (maps to `uro_pathway`). */
407
+ interface UrologyPathwayFieldDef extends BaseFieldDef {
408
+ type: 'urology_pathway';
409
+ meta?: {
410
+ subtitle?: string;
411
+ } & Record<string, unknown>;
412
+ }
398
413
  /** General surgery OPD: structured smart history (SOCRATES, swelling, GI, breast, anorectal, thyroid); HOPC is template field `symptoms` embedded in the widget. */
399
414
  interface GeneralSurgerySmartHistoryFieldDef extends BaseFieldDef {
400
415
  type: 'general_surgery_smart_history';
@@ -473,7 +488,7 @@ interface DiagnosticPackage {
473
488
  department?: string;
474
489
  tests: DiagnosticPackageTest[];
475
490
  }
476
- type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SliderFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | GeneralSurgerySmartHistoryFieldDef | GeneralSurgeryExaminationFieldDef | GeneralSurgeryGradingFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
491
+ type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SliderFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | GeneralSurgerySmartHistoryFieldDef | GeneralSurgeryExaminationFieldDef | GeneralSurgeryGradingFieldDef | UrologySmartHistoryFieldDef | UrologyExaminationFieldDef | UrologyPathwayFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
477
492
  /** Boolean switch; value is `true` | `false`. */
478
493
  interface ToggleFieldDef extends BaseFieldDef {
479
494
  type: 'toggle';
@@ -488,8 +503,8 @@ interface Condition {
488
503
  /**
489
504
  * For `op: "contains"`:
490
505
  * - If the field value is an **array**, checks `value.includes(condition.value)` (e.g. multiselect).
491
- * - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas, trims
492
- * tokens, and checks that one token equals `String(condition.value)` (chip values in text).
506
+ * - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas and/or line
507
+ * breaks, trims tokens, and checks that one token equals `String(condition.value)` (chip values in text).
493
508
  */
494
509
  value: any;
495
510
  }
@@ -841,6 +856,25 @@ declare function useField(fieldId: string): {
841
856
 
842
857
  declare const DynamicForm: React.FC;
843
858
 
859
+ type DynamicFormV2SectionMode = "accordion" | "plain";
860
+ interface DynamicFormV2Props {
861
+ /** When true, renders `schema.title` as the page heading. Default true. */
862
+ showTitle?: boolean;
863
+ /**
864
+ * `accordion` — bordered collapsible sections (same as DynamicForm).
865
+ * `plain` — simple vertical stack, no card/accordion chrome.
866
+ */
867
+ sectionMode?: DynamicFormV2SectionMode;
868
+ /** In `plain` mode, show the section title above fields. Default true. Ignored for accordion. */
869
+ showSectionTitles?: boolean;
870
+ className?: string;
871
+ }
872
+ /**
873
+ * Alternate layout shell for alternative designs (e.g. marketing / minimal flows).
874
+ * Same schema traversal as {@link DynamicForm}; configurable title and section chrome.
875
+ */
876
+ declare const DynamicFormV2: React.FC<DynamicFormV2Props>;
877
+
844
878
  /** Shape of one differential diagnosis item from AI (must match form field value) */
845
879
  type AIDifferentialDiagnosisItem = {
846
880
  category: string;
@@ -911,6 +945,24 @@ declare const ReadOnlyForm: React.FC<ReadOnlyFormProps>;
911
945
 
912
946
  interface FormControlsProps {
913
947
  className?: string;
948
+ containerStyle?: React.CSSProperties;
949
+ /**
950
+ * When false, hides workflow state + valid/invalid text. Buttons stay right-aligned unless
951
+ * `actionsFullWidth` is used. Default true (existing behaviour).
952
+ */
953
+ showWorkflowStatus?: boolean;
954
+ statusClassName?: string;
955
+ statusStyle?: React.CSSProperties;
956
+ /** Classes for the buttons row wrapper. */
957
+ actionsClassName?: string;
958
+ actionsStyle?: React.CSSProperties;
959
+ /**
960
+ * When workflow status is hidden, make action buttons stretch (column on small screens;
961
+ * on `sm+` submit row grows with flex). Ignored while `showWorkflowStatus` is true.
962
+ */
963
+ actionsFullWidth?: boolean;
964
+ /** Applied to both Save Draft and Submit buttons. */
965
+ buttonClassName?: string;
914
966
  onSaveDraft?: () => void;
915
967
  onSubmit?: (to: string) => void;
916
968
  }
@@ -1121,4 +1173,4 @@ declare const SmartTextareaWidget: React.FC<{
1121
1173
  fieldId: string;
1122
1174
  }>;
1123
1175
 
1124
- export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type GeneralSurgeryExaminationFieldDef, type GeneralSurgeryGradingFieldDef, type GeneralSurgerySmartHistoryFieldDef, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type PainScaleFlagsFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, type SliderFieldDef, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
1176
+ export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, DynamicFormV2, type DynamicFormV2Props, type DynamicFormV2SectionMode, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type GeneralSurgeryExaminationFieldDef, type GeneralSurgeryGradingFieldDef, type GeneralSurgerySmartHistoryFieldDef, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type PainScaleFlagsFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, type SliderFieldDef, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type UrologyExaminationFieldDef, type UrologyPathwayFieldDef, type UrologySmartHistoryFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };