@dxos/react-ui-form 0.9.0 → 0.9.1-staging.ee54ba693a
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/lib/browser/index.mjs +2337 -1919
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +2337 -1919
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/annotations.d.ts +47 -0
- package/dist/types/src/annotations.d.ts.map +1 -0
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +3 -3
- package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.d.ts +23 -110
- package/dist/types/src/components/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.stories.d.ts +48 -101
- package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.theme.d.ts +252 -0
- package/dist/types/src/components/Form/Form.theme.d.ts.map +1 -0
- package/dist/types/src/components/Form/Form.theme.test.d.ts +2 -0
- package/dist/types/src/components/Form/Form.theme.test.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormControls.d.ts +75 -0
- package/dist/types/src/components/Form/FormControls.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/FormField.d.ts +44 -0
- package/dist/types/src/components/Form/FormField/FormField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/FormFieldHeader.d.ts +27 -0
- package/dist/types/src/components/Form/FormField/FormFieldHeader.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/FormRow.d.ts +85 -0
- package/dist/types/src/components/Form/FormField/FormRow.d.ts.map +1 -0
- package/dist/types/src/components/Form/{FormFieldComponent.stories.d.ts → FormField/FormRow.stories.d.ts} +6 -3
- package/dist/types/src/components/Form/FormField/FormRow.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/{fields → FormField/fields/ArrayField}/ArrayField.d.ts +2 -2
- package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.d.ts +12 -0
- package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/AutofillField/AutofillField.d.ts +12 -0
- package/dist/types/src/components/Form/FormField/fields/AutofillField/AutofillField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/AutofillField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/AutofillField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts +4 -0
- package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts.map +1 -0
- package/dist/types/src/components/{Settings/Settings.stories.d.ts → Form/FormField/fields/BooleanField/BooleanField.stories.d.ts} +1 -2
- package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/ComboboxField/ComboboxField.d.ts +12 -0
- package/dist/types/src/components/Form/FormField/fields/ComboboxField/ComboboxField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/ComboboxField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/ComboboxField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts +4 -0
- package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts +5 -0
- package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.d.ts +2 -2
- package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts +15 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.test.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.test.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.d.ts +4 -0
- package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/PasswordField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/PasswordField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/InlineRefField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts +16 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts +92 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/RefField.test.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts +3 -0
- package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts +29 -0
- package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts +5 -0
- package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts +4 -0
- package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts +4 -0
- package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.d.ts +2 -2
- package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts +88 -0
- package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/{fields → FormField/fields}/index.d.ts +4 -1
- package/dist/types/src/components/Form/FormField/fields/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/index.d.ts +6 -0
- package/dist/types/src/components/Form/FormField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/presentation.d.ts +22 -0
- package/dist/types/src/components/Form/FormField/presentation.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts +30 -0
- package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldSet/FormFieldSetContainer.d.ts +22 -0
- package/dist/types/src/components/Form/FormFieldSet/FormFieldSetContainer.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldSet/index.d.ts +3 -0
- package/dist/types/src/components/Form/FormFieldSet/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.d.ts +2 -0
- package/dist/types/src/components/Form/FormLayout/FormLayout.d.ts.map +1 -0
- package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.d.ts +5 -5
- package/dist/types/src/components/Form/FormLayout/FormLayout.stories.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormLayout/FormLayout.stories.test.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormLayout/FormLayout.test.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormLayout/index.d.ts +3 -0
- package/dist/types/src/components/Form/FormLayout/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormLayout/parser.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormLayout/parser.test.d.ts.map +1 -0
- package/dist/types/src/components/Form/index.d.ts +3 -5
- package/dist/types/src/components/Form/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/meta-tags.d.ts +1 -12
- package/dist/types/src/components/Form/meta-tags.d.ts.map +1 -1
- package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -1
- package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +6 -23
- package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
- package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +2 -1
- package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -1
- package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts +2 -2
- package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +1 -1
- package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +2 -2
- package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useAsyncFieldEffect.d.ts +24 -0
- package/dist/types/src/hooks/useAsyncFieldEffect.d.ts.map +1 -0
- package/dist/types/src/hooks/useFormContext.d.ts +42 -0
- package/dist/types/src/hooks/useFormContext.d.ts.map +1 -0
- package/dist/types/src/hooks/useFormHandler.d.ts +9 -6
- package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/{components/testing.d.ts → testing/TestLayout.d.ts} +2 -2
- package/dist/types/src/testing/TestLayout.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/schema.d.ts +40 -0
- package/dist/types/src/testing/schema.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +161 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +1 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/omit.d.ts +12 -0
- package/dist/types/src/util/omit.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -41
- package/src/annotations.ts +63 -0
- package/src/components/FieldEditor/FieldEditor.stories.tsx +1 -1
- package/src/components/FieldEditor/FieldEditor.test.tsx +1 -1
- package/src/components/FieldEditor/FieldEditor.tsx +10 -6
- package/src/components/Form/DESIGN.md +24 -0
- package/src/components/Form/Form.stories.tsx +260 -61
- package/src/components/Form/Form.theme.test.ts +33 -0
- package/src/components/Form/Form.theme.ts +86 -0
- package/src/components/Form/Form.tsx +30 -453
- package/src/components/Form/FormControls.tsx +377 -0
- package/src/components/Form/{FormField.tsx → FormField/FormField.tsx} +98 -71
- package/src/components/Form/FormField/FormFieldHeader.tsx +68 -0
- package/src/components/Form/FormField/FormRow.stories.tsx +97 -0
- package/src/components/Form/FormField/FormRow.tsx +298 -0
- package/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.tsx +119 -0
- package/src/components/Form/FormField/fields/ArrayField/ArrayField.tsx +328 -0
- package/src/components/Form/FormField/fields/ArrayField/index.ts +5 -0
- package/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.tsx +59 -0
- package/src/components/Form/FormField/fields/AsyncSelectField/index.ts +5 -0
- package/src/components/Form/FormField/fields/AutofillField/AutofillField.tsx +67 -0
- package/src/components/Form/FormField/fields/AutofillField/index.ts +5 -0
- package/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.tsx +52 -0
- package/src/components/Form/FormField/fields/BooleanField/BooleanField.tsx +28 -0
- package/src/components/Form/FormField/fields/BooleanField/index.ts +5 -0
- package/src/components/Form/FormField/fields/ComboboxField/ComboboxField.tsx +104 -0
- package/src/components/Form/FormField/fields/ComboboxField/index.ts +5 -0
- package/src/components/Form/FormField/fields/DateField/DateField.stories.tsx +60 -0
- package/src/components/Form/{fields → FormField/fields/DateField}/DateField.tsx +12 -10
- package/src/components/Form/FormField/fields/DateField/index.ts +5 -0
- package/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.tsx +53 -0
- package/src/components/Form/{fields → FormField/fields/GeoPointField}/GeoPointField.tsx +19 -21
- package/src/components/Form/FormField/fields/GeoPointField/index.ts +5 -0
- package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.tsx +8 -8
- package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.tsx +41 -41
- package/src/components/Form/FormField/fields/MarkdownField/index.ts +5 -0
- package/src/components/Form/FormField/fields/NumberField/NumberField.stories.tsx +52 -0
- package/src/components/Form/FormField/fields/NumberField/NumberField.test.ts +29 -0
- package/src/components/Form/FormField/fields/NumberField/NumberField.tsx +140 -0
- package/src/components/Form/FormField/fields/NumberField/index.ts +5 -0
- package/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.tsx +53 -0
- package/src/components/Form/FormField/fields/PasswordField/PasswordField.tsx +41 -0
- package/src/components/Form/FormField/fields/PasswordField/index.ts +5 -0
- package/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.tsx +21 -14
- package/src/components/Form/FormField/fields/RefField/RefField.stories.tsx +97 -0
- package/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.ts +10 -1
- package/src/components/Form/{fields → FormField/fields/RefField}/RefField.tsx +55 -47
- package/src/components/Form/FormField/fields/RefField/index.ts +6 -0
- package/src/components/Form/FormField/fields/SelectField/SelectField.stories.tsx +53 -0
- package/src/components/Form/FormField/fields/SelectField/SelectField.tsx +136 -0
- package/src/components/Form/FormField/fields/SelectField/index.ts +5 -0
- package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.tsx +5 -5
- package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.tsx +56 -54
- package/src/components/Form/FormField/fields/SelectOptionField/index.ts +5 -0
- package/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.tsx +53 -0
- package/src/components/Form/{fields → FormField/fields/TextAreaField}/TextAreaField.tsx +6 -4
- package/src/components/Form/FormField/fields/TextAreaField/index.ts +5 -0
- package/src/components/Form/FormField/fields/TextField/TextField.stories.tsx +52 -0
- package/src/components/Form/{fields → FormField/fields/TextField}/TextField.tsx +6 -4
- package/src/components/Form/FormField/fields/TextField/index.ts +5 -0
- package/src/components/Form/FormField/fields/TupleField/TupleField.stories.tsx +55 -0
- package/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.tsx +4 -2
- package/src/components/Form/FormField/fields/TupleField/index.ts +5 -0
- package/src/components/Form/{fields → FormField/fields}/index.ts +4 -1
- package/src/components/Form/FormField/index.ts +10 -0
- package/src/components/Form/FormField/presentation.tsx +32 -0
- package/src/components/Form/{FormFieldSet.tsx → FormFieldSet/FormFieldSet.tsx} +53 -90
- package/src/components/Form/FormFieldSet/FormFieldSetContainer.tsx +93 -0
- package/src/components/Form/FormFieldSet/index.ts +6 -0
- package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.tsx +11 -9
- package/src/components/Form/{Layout → FormLayout}/FormLayout.tsx +29 -18
- package/src/components/Form/FormLayout/index.ts +6 -0
- package/src/components/Form/index.ts +3 -5
- package/src/components/Form/meta-tags.test.ts +1 -1
- package/src/components/Form/meta-tags.ts +1 -1
- package/src/components/ObjectForm/ObjectForm.tsx +15 -14
- package/src/components/ObjectPicker/ObjectPicker.tsx +20 -27
- package/src/components/ObjectProperties/ObjectProperties.stories.tsx +2 -2
- package/src/components/ObjectProperties/ObjectProperties.test.tsx +1 -1
- package/src/components/ObjectProperties/ObjectProperties.tsx +13 -8
- package/src/components/RefEditor/RefEditor.stories.tsx +2 -3
- package/src/components/RefEditor/RefEditor.tsx +1 -1
- package/src/components/ViewEditor/ViewEditor.stories.tsx +6 -7
- package/src/components/ViewEditor/ViewEditor.test.tsx +9 -3
- package/src/components/ViewEditor/ViewEditor.tsx +98 -128
- package/src/components/index.ts +0 -1
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useAsyncFieldEffect.ts +81 -0
- package/src/hooks/useFormContext.ts +89 -0
- package/src/hooks/useFormHandler.ts +12 -10
- package/src/index.ts +2 -0
- package/src/{components/testing.tsx → testing/TestLayout.tsx} +16 -13
- package/src/testing/index.ts +7 -0
- package/src/testing/schema.ts +59 -0
- package/src/types.ts +186 -0
- package/src/util/index.ts +1 -1
- package/src/util/omit.ts +61 -0
- package/src/util/properties.test.ts +110 -28
- package/src/util/refs.ts +1 -1
- package/src/vitest-setup.ts +40 -0
- package/dist/types/src/components/Form/FormField.d.ts +0 -52
- package/dist/types/src/components/Form/FormField.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormFieldComponent.d.ts +0 -98
- package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormFieldSet.d.ts +0 -26
- package/dist/types/src/components/Form/FormFieldSet.d.ts.map +0 -1
- package/dist/types/src/components/Form/FormTooltipsContext.d.ts +0 -19
- package/dist/types/src/components/Form/FormTooltipsContext.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/FormLayout.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/FormLayout.stories.test.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/FormLayout.test.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/annotation.d.ts +0 -30
- package/dist/types/src/components/Form/Layout/annotation.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/index.d.ts +0 -4
- package/dist/types/src/components/Form/Layout/index.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/parser.d.ts.map +0 -1
- package/dist/types/src/components/Form/Layout/parser.test.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/BooleanField.d.ts +0 -4
- package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/DateField.d.ts +0 -4
- package/dist/types/src/components/Form/fields/DateField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/GeoPointField.d.ts +0 -5
- package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/InlineRefField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/NumberField.d.ts +0 -4
- package/dist/types/src/components/Form/fields/NumberField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/RefField.d.ts +0 -34
- package/dist/types/src/components/Form/fields/RefField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/RefField.test.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/SelectField.d.ts +0 -13
- package/dist/types/src/components/Form/fields/SelectField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +0 -5
- package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/TextAreaField.d.ts +0 -4
- package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/TextField.d.ts +0 -4
- package/dist/types/src/components/Form/fields/TextField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/TupleField.d.ts.map +0 -1
- package/dist/types/src/components/Form/fields/index.d.ts.map +0 -1
- package/dist/types/src/components/Settings/Settings.d.ts +0 -51
- package/dist/types/src/components/Settings/Settings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/Settings.stories.d.ts.map +0 -1
- package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +0 -43
- package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +0 -1
- package/dist/types/src/components/Settings/SettingsItem.d.ts +0 -16
- package/dist/types/src/components/Settings/SettingsItem.d.ts.map +0 -1
- package/dist/types/src/components/Settings/SettingsSelectField.d.ts +0 -18
- package/dist/types/src/components/Settings/SettingsSelectField.d.ts.map +0 -1
- package/dist/types/src/components/Settings/index.d.ts +0 -4
- package/dist/types/src/components/Settings/index.d.ts.map +0 -1
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/util/field-type.d.ts +0 -19
- package/dist/types/src/util/field-type.d.ts.map +0 -1
- package/src/components/Form/AUDIT.md +0 -17
- package/src/components/Form/FormFieldComponent.stories.tsx +0 -65
- package/src/components/Form/FormFieldComponent.tsx +0 -253
- package/src/components/Form/FormTooltipsContext.ts +0 -25
- package/src/components/Form/Layout/annotation.ts +0 -38
- package/src/components/Form/Layout/index.ts +0 -7
- package/src/components/Form/README.md +0 -3
- package/src/components/Form/fields/ArrayField.tsx +0 -173
- package/src/components/Form/fields/BooleanField.tsx +0 -22
- package/src/components/Form/fields/NumberField.tsx +0 -76
- package/src/components/Form/fields/SelectField.tsx +0 -77
- package/src/components/Settings/AUDIT.md +0 -51
- package/src/components/Settings/Settings.stories.tsx +0 -104
- package/src/components/Settings/Settings.tsx +0 -81
- package/src/components/Settings/SettingsFieldSet.tsx +0 -257
- package/src/components/Settings/SettingsItem.tsx +0 -58
- package/src/components/Settings/SettingsSelectField.tsx +0 -59
- package/src/components/Settings/index.ts +0 -7
- package/src/util/field-type.ts +0 -60
- /package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.d.ts +0 -0
- /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.d.ts +0 -0
- /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.d.ts +0 -0
- /package/dist/types/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.d.ts +0 -0
- /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.d.ts +0 -0
- /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.test.d.ts +0 -0
- /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.d.ts +0 -0
- /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.test.d.ts +0 -0
- /package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.tsx +0 -0
- /package/src/components/Form/{Layout → FormLayout}/FormLayout.test.ts +0 -0
- /package/src/components/Form/{Layout → FormLayout}/parser.test.ts +0 -0
- /package/src/components/Form/{Layout → FormLayout}/parser.ts +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: () => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
translations: [{
|
|
10
|
+
readonly 'en-US': {
|
|
11
|
+
readonly "@dxos/react-ui-form": {
|
|
12
|
+
readonly 'ref-editor.placeholder': "Type '@' to add a reference, or enter a value";
|
|
13
|
+
readonly 'ref-editor-auto.placeholder': 'Search by name, or enter a value';
|
|
14
|
+
readonly 'fields.label': 'Fields';
|
|
15
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
16
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
17
|
+
readonly 'field-property.label': 'Property';
|
|
18
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
19
|
+
readonly 'field-format.label': 'Type';
|
|
20
|
+
readonly 'field-path.label': 'Field path';
|
|
21
|
+
readonly 'remove-item.button': 'Delete item';
|
|
22
|
+
readonly 'add-item.button': 'Add item';
|
|
23
|
+
readonly 'add-property-button.label': 'Add property';
|
|
24
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
25
|
+
readonly 'boolean-input-false.value': 'No';
|
|
26
|
+
readonly 'show-field.label': 'Show field';
|
|
27
|
+
readonly 'hide-field.label': 'Hide field';
|
|
28
|
+
readonly 'expand-fields.label': 'Expand';
|
|
29
|
+
readonly 'collapse-fields.label': 'Collapse';
|
|
30
|
+
readonly 'delete-field.label': 'Delete field';
|
|
31
|
+
readonly 'create-option.label': 'Create';
|
|
32
|
+
readonly 'add-tag.label': 'Add tag';
|
|
33
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
34
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
35
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
36
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
37
|
+
readonly 'example.placeholder': 'Example';
|
|
38
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
39
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
40
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
41
|
+
readonly 'save-button.label': 'Save';
|
|
42
|
+
readonly 'create-text.label': 'Create text';
|
|
43
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
44
|
+
readonly 'format.currency.label': 'Currency';
|
|
45
|
+
readonly 'format.date.label': 'Date';
|
|
46
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
47
|
+
readonly 'format.did.label': 'DID';
|
|
48
|
+
readonly 'format.duration.label': 'Duration';
|
|
49
|
+
readonly 'format.dxn.label': 'DXN';
|
|
50
|
+
readonly 'format.email.label': 'Email';
|
|
51
|
+
readonly 'format.formula.label': 'Formula';
|
|
52
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
53
|
+
readonly 'format.integer.label': 'Integer';
|
|
54
|
+
readonly 'format.json.label': 'JSON';
|
|
55
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
56
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
57
|
+
readonly 'format.percent.label': 'Percent';
|
|
58
|
+
readonly 'format.ref.label': 'Reference';
|
|
59
|
+
readonly 'format.regex.label': 'RegExp';
|
|
60
|
+
readonly 'format.string.label': 'String';
|
|
61
|
+
readonly 'format.single-select.label': 'Select';
|
|
62
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
63
|
+
readonly 'format.text.label': 'Long text';
|
|
64
|
+
readonly 'format.time.label': 'Time';
|
|
65
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
66
|
+
readonly 'format.user.label': 'User';
|
|
67
|
+
readonly 'format.number.label': 'Number';
|
|
68
|
+
readonly 'format.uri.label': 'URI';
|
|
69
|
+
readonly 'format.url.label': 'URL';
|
|
70
|
+
readonly 'format.uuid.label': 'UUID';
|
|
71
|
+
readonly 'latitude.label': 'Latitude';
|
|
72
|
+
readonly 'longitude.label': 'Longitude';
|
|
73
|
+
readonly 'select-option.label': 'Label';
|
|
74
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
75
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
76
|
+
readonly 'select-option-add.button': 'Add option';
|
|
77
|
+
readonly 'system-schema.title': 'System type';
|
|
78
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
79
|
+
readonly 'remove.button': 'Delete';
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default meta;
|
|
86
|
+
type Story = StoryObj<typeof meta>;
|
|
87
|
+
export declare const Default: Story;
|
|
88
|
+
//# sourceMappingURL=SelectField.stories.d.ts.map
|
package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/SelectField/SelectField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAmCxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/SelectField/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
|
package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SelectOption } from '@dxos/echo/Format';
|
|
3
|
+
import { type FormFieldRendererProps } from '#types';
|
|
4
|
+
export declare const SelectOptionField: ({ type, readonly, label, jsonPath, getStatus, getValue, onValueChange, }: FormFieldRendererProps<SelectOption[] | undefined>) => React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=SelectOptionField.d.ts.map
|
package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyF,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQtD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAIrD,eAAO,MAAM,iBAAiB,6EAQ3B,sBAAsB,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,sBA6KpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOptionField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AA4CxC,QAAA,MAAM,IAAI;;eAEwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOA,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/SelectOptionField/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldRendererProps } from '#types';
|
|
3
|
+
export declare const TextAreaField: ({ type, readonly, placeholder, onValueChange, onBlur, ...props }: FormFieldRendererProps<string>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=TextAreaField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TextAreaField/TextAreaField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAIrD,eAAO,MAAM,aAAa,qEAOvB,sBAAsB,CAAC,MAAM,CAAC,sBAoBhC,CAAC"}
|
package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: () => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
translations: [{
|
|
10
|
+
readonly 'en-US': {
|
|
11
|
+
readonly "@dxos/react-ui-form": {
|
|
12
|
+
readonly 'ref-editor.placeholder': "Type '@' to add a reference, or enter a value";
|
|
13
|
+
readonly 'ref-editor-auto.placeholder': 'Search by name, or enter a value';
|
|
14
|
+
readonly 'fields.label': 'Fields';
|
|
15
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
16
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
17
|
+
readonly 'field-property.label': 'Property';
|
|
18
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
19
|
+
readonly 'field-format.label': 'Type';
|
|
20
|
+
readonly 'field-path.label': 'Field path';
|
|
21
|
+
readonly 'remove-item.button': 'Delete item';
|
|
22
|
+
readonly 'add-item.button': 'Add item';
|
|
23
|
+
readonly 'add-property-button.label': 'Add property';
|
|
24
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
25
|
+
readonly 'boolean-input-false.value': 'No';
|
|
26
|
+
readonly 'show-field.label': 'Show field';
|
|
27
|
+
readonly 'hide-field.label': 'Hide field';
|
|
28
|
+
readonly 'expand-fields.label': 'Expand';
|
|
29
|
+
readonly 'collapse-fields.label': 'Collapse';
|
|
30
|
+
readonly 'delete-field.label': 'Delete field';
|
|
31
|
+
readonly 'create-option.label': 'Create';
|
|
32
|
+
readonly 'add-tag.label': 'Add tag';
|
|
33
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
34
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
35
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
36
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
37
|
+
readonly 'example.placeholder': 'Example';
|
|
38
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
39
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
40
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
41
|
+
readonly 'save-button.label': 'Save';
|
|
42
|
+
readonly 'create-text.label': 'Create text';
|
|
43
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
44
|
+
readonly 'format.currency.label': 'Currency';
|
|
45
|
+
readonly 'format.date.label': 'Date';
|
|
46
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
47
|
+
readonly 'format.did.label': 'DID';
|
|
48
|
+
readonly 'format.duration.label': 'Duration';
|
|
49
|
+
readonly 'format.dxn.label': 'DXN';
|
|
50
|
+
readonly 'format.email.label': 'Email';
|
|
51
|
+
readonly 'format.formula.label': 'Formula';
|
|
52
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
53
|
+
readonly 'format.integer.label': 'Integer';
|
|
54
|
+
readonly 'format.json.label': 'JSON';
|
|
55
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
56
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
57
|
+
readonly 'format.percent.label': 'Percent';
|
|
58
|
+
readonly 'format.ref.label': 'Reference';
|
|
59
|
+
readonly 'format.regex.label': 'RegExp';
|
|
60
|
+
readonly 'format.string.label': 'String';
|
|
61
|
+
readonly 'format.single-select.label': 'Select';
|
|
62
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
63
|
+
readonly 'format.text.label': 'Long text';
|
|
64
|
+
readonly 'format.time.label': 'Time';
|
|
65
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
66
|
+
readonly 'format.user.label': 'User';
|
|
67
|
+
readonly 'format.number.label': 'Number';
|
|
68
|
+
readonly 'format.uri.label': 'URI';
|
|
69
|
+
readonly 'format.url.label': 'URL';
|
|
70
|
+
readonly 'format.uuid.label': 'UUID';
|
|
71
|
+
readonly 'latitude.label': 'Latitude';
|
|
72
|
+
readonly 'longitude.label': 'Longitude';
|
|
73
|
+
readonly 'select-option.label': 'Label';
|
|
74
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
75
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
76
|
+
readonly 'select-option-add.button': 'Add option';
|
|
77
|
+
readonly 'system-schema.title': 'System type';
|
|
78
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
79
|
+
readonly 'remove.button': 'Delete';
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default meta;
|
|
86
|
+
type Story = StoryObj<typeof meta>;
|
|
87
|
+
export declare const Default: Story;
|
|
88
|
+
//# sourceMappingURL=TextAreaField.stories.d.ts.map
|
package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAmCxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TextAreaField/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldRendererProps } from '#types';
|
|
3
|
+
export declare const TextField: ({ type, readonly, placeholder, onBlur, onValueChange, ...props }: FormFieldRendererProps<string>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TextField/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAIrD,eAAO,MAAM,SAAS,qEAOnB,sBAAsB,CAAC,MAAM,CAAC,sBAoBhC,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: () => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
translations: [{
|
|
10
|
+
readonly 'en-US': {
|
|
11
|
+
readonly "@dxos/react-ui-form": {
|
|
12
|
+
readonly 'ref-editor.placeholder': "Type '@' to add a reference, or enter a value";
|
|
13
|
+
readonly 'ref-editor-auto.placeholder': 'Search by name, or enter a value';
|
|
14
|
+
readonly 'fields.label': 'Fields';
|
|
15
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
16
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
17
|
+
readonly 'field-property.label': 'Property';
|
|
18
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
19
|
+
readonly 'field-format.label': 'Type';
|
|
20
|
+
readonly 'field-path.label': 'Field path';
|
|
21
|
+
readonly 'remove-item.button': 'Delete item';
|
|
22
|
+
readonly 'add-item.button': 'Add item';
|
|
23
|
+
readonly 'add-property-button.label': 'Add property';
|
|
24
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
25
|
+
readonly 'boolean-input-false.value': 'No';
|
|
26
|
+
readonly 'show-field.label': 'Show field';
|
|
27
|
+
readonly 'hide-field.label': 'Hide field';
|
|
28
|
+
readonly 'expand-fields.label': 'Expand';
|
|
29
|
+
readonly 'collapse-fields.label': 'Collapse';
|
|
30
|
+
readonly 'delete-field.label': 'Delete field';
|
|
31
|
+
readonly 'create-option.label': 'Create';
|
|
32
|
+
readonly 'add-tag.label': 'Add tag';
|
|
33
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
34
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
35
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
36
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
37
|
+
readonly 'example.placeholder': 'Example';
|
|
38
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
39
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
40
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
41
|
+
readonly 'save-button.label': 'Save';
|
|
42
|
+
readonly 'create-text.label': 'Create text';
|
|
43
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
44
|
+
readonly 'format.currency.label': 'Currency';
|
|
45
|
+
readonly 'format.date.label': 'Date';
|
|
46
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
47
|
+
readonly 'format.did.label': 'DID';
|
|
48
|
+
readonly 'format.duration.label': 'Duration';
|
|
49
|
+
readonly 'format.dxn.label': 'DXN';
|
|
50
|
+
readonly 'format.email.label': 'Email';
|
|
51
|
+
readonly 'format.formula.label': 'Formula';
|
|
52
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
53
|
+
readonly 'format.integer.label': 'Integer';
|
|
54
|
+
readonly 'format.json.label': 'JSON';
|
|
55
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
56
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
57
|
+
readonly 'format.percent.label': 'Percent';
|
|
58
|
+
readonly 'format.ref.label': 'Reference';
|
|
59
|
+
readonly 'format.regex.label': 'RegExp';
|
|
60
|
+
readonly 'format.string.label': 'String';
|
|
61
|
+
readonly 'format.single-select.label': 'Select';
|
|
62
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
63
|
+
readonly 'format.text.label': 'Long text';
|
|
64
|
+
readonly 'format.time.label': 'Time';
|
|
65
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
66
|
+
readonly 'format.user.label': 'User';
|
|
67
|
+
readonly 'format.number.label': 'Number';
|
|
68
|
+
readonly 'format.uri.label': 'URI';
|
|
69
|
+
readonly 'format.url.label': 'URL';
|
|
70
|
+
readonly 'format.uuid.label': 'UUID';
|
|
71
|
+
readonly 'latitude.label': 'Latitude';
|
|
72
|
+
readonly 'longitude.label': 'Longitude';
|
|
73
|
+
readonly 'select-option.label': 'Label';
|
|
74
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
75
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
76
|
+
readonly 'select-option-add.button': 'Add option';
|
|
77
|
+
readonly 'system-schema.title': 'System type';
|
|
78
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
79
|
+
readonly 'remove.button': 'Delete';
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default meta;
|
|
86
|
+
type Story = StoryObj<typeof meta>;
|
|
87
|
+
export declare const Default: Story;
|
|
88
|
+
//# sourceMappingURL=TextField.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TextField/TextField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAkCxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TextField/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
|
package/dist/types/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const TupleField: ({ binding, type, readonly, label, jsonPath, getStatus, getValue, onValueChange, onBlur, }:
|
|
2
|
+
import { type FormFieldRendererProps } from '#types';
|
|
3
|
+
export declare const TupleField: ({ binding, type, readonly, label, jsonPath, getStatus, getValue, onValueChange, onBlur, }: FormFieldRendererProps<Record<string, number>> & {
|
|
4
4
|
binding: string[];
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
6
|
//# sourceMappingURL=TupleField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TupleField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TupleField/TupleField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAMrD,eAAO,MAAM,UAAU,8FAUpB,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG;IAClD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,sBA4BA,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: () => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
translations: [{
|
|
10
|
+
readonly 'en-US': {
|
|
11
|
+
readonly "@dxos/react-ui-form": {
|
|
12
|
+
readonly 'ref-editor.placeholder': "Type '@' to add a reference, or enter a value";
|
|
13
|
+
readonly 'ref-editor-auto.placeholder': 'Search by name, or enter a value';
|
|
14
|
+
readonly 'fields.label': 'Fields';
|
|
15
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
16
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
17
|
+
readonly 'field-property.label': 'Property';
|
|
18
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
19
|
+
readonly 'field-format.label': 'Type';
|
|
20
|
+
readonly 'field-path.label': 'Field path';
|
|
21
|
+
readonly 'remove-item.button': 'Delete item';
|
|
22
|
+
readonly 'add-item.button': 'Add item';
|
|
23
|
+
readonly 'add-property-button.label': 'Add property';
|
|
24
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
25
|
+
readonly 'boolean-input-false.value': 'No';
|
|
26
|
+
readonly 'show-field.label': 'Show field';
|
|
27
|
+
readonly 'hide-field.label': 'Hide field';
|
|
28
|
+
readonly 'expand-fields.label': 'Expand';
|
|
29
|
+
readonly 'collapse-fields.label': 'Collapse';
|
|
30
|
+
readonly 'delete-field.label': 'Delete field';
|
|
31
|
+
readonly 'create-option.label': 'Create';
|
|
32
|
+
readonly 'add-tag.label': 'Add tag';
|
|
33
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
34
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
35
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
36
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
37
|
+
readonly 'example.placeholder': 'Example';
|
|
38
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
39
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
40
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
41
|
+
readonly 'save-button.label': 'Save';
|
|
42
|
+
readonly 'create-text.label': 'Create text';
|
|
43
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
44
|
+
readonly 'format.currency.label': 'Currency';
|
|
45
|
+
readonly 'format.date.label': 'Date';
|
|
46
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
47
|
+
readonly 'format.did.label': 'DID';
|
|
48
|
+
readonly 'format.duration.label': 'Duration';
|
|
49
|
+
readonly 'format.dxn.label': 'DXN';
|
|
50
|
+
readonly 'format.email.label': 'Email';
|
|
51
|
+
readonly 'format.formula.label': 'Formula';
|
|
52
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
53
|
+
readonly 'format.integer.label': 'Integer';
|
|
54
|
+
readonly 'format.json.label': 'JSON';
|
|
55
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
56
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
57
|
+
readonly 'format.percent.label': 'Percent';
|
|
58
|
+
readonly 'format.ref.label': 'Reference';
|
|
59
|
+
readonly 'format.regex.label': 'RegExp';
|
|
60
|
+
readonly 'format.string.label': 'String';
|
|
61
|
+
readonly 'format.single-select.label': 'Select';
|
|
62
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
63
|
+
readonly 'format.text.label': 'Long text';
|
|
64
|
+
readonly 'format.time.label': 'Time';
|
|
65
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
66
|
+
readonly 'format.user.label': 'User';
|
|
67
|
+
readonly 'format.number.label': 'Number';
|
|
68
|
+
readonly 'format.uri.label': 'URI';
|
|
69
|
+
readonly 'format.url.label': 'URL';
|
|
70
|
+
readonly 'format.uuid.label': 'UUID';
|
|
71
|
+
readonly 'latitude.label': 'Latitude';
|
|
72
|
+
readonly 'longitude.label': 'Longitude';
|
|
73
|
+
readonly 'select-option.label': 'Label';
|
|
74
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
75
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
76
|
+
readonly 'select-option-add.button': 'Add option';
|
|
77
|
+
readonly 'system-schema.title': 'System type';
|
|
78
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
79
|
+
readonly 'remove.button': 'Delete';
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default meta;
|
|
86
|
+
type Story = StoryObj<typeof meta>;
|
|
87
|
+
export declare const Default: Story;
|
|
88
|
+
//# sourceMappingURL=TupleField.stories.d.ts.map
|
package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TupleField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TupleField/TupleField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAqCxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/TupleField/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export * from './ArrayField';
|
|
2
|
+
export * from './AsyncSelectField';
|
|
3
|
+
export * from './AutofillField';
|
|
2
4
|
export * from './BooleanField';
|
|
5
|
+
export * from './ComboboxField';
|
|
3
6
|
export * from './DateField';
|
|
4
7
|
export * from './GeoPointField';
|
|
5
|
-
export * from './InlineRefField';
|
|
6
8
|
export * from './MarkdownField';
|
|
7
9
|
export * from './NumberField';
|
|
10
|
+
export * from './PasswordField';
|
|
8
11
|
export * from './RefField';
|
|
9
12
|
export * from './SelectField';
|
|
10
13
|
export * from './SelectOptionField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Form/FormField/fields/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type FormPresentation } from '#types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolved presentation strategy for a field — which parts render, derived from {@link FormPresentation}.
|
|
4
|
+
* Visual chrome (borders, grid, spacing) is owned by the Form theme recipe, not here.
|
|
5
|
+
*/
|
|
6
|
+
export type FormFieldPresentation = {
|
|
7
|
+
layout?: FormPresentation;
|
|
8
|
+
/** Render the value as read-only plain DOM rather than an editable control. */
|
|
9
|
+
isStatic: boolean;
|
|
10
|
+
/** Render the field's label row. */
|
|
11
|
+
showLabel: boolean;
|
|
12
|
+
/** Render the inline validation/error block beneath the control. */
|
|
13
|
+
showError: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Derive the {@link FormFieldPresentation} for a layout.
|
|
17
|
+
* - `static` renders read-only plain DOM.
|
|
18
|
+
* - `inline` drops the label (the control stands alone, e.g. an array row).
|
|
19
|
+
* - `full` adds the inline error block.
|
|
20
|
+
*/
|
|
21
|
+
export declare const presentationFor: (layout?: FormPresentation) => FormFieldPresentation;
|
|
22
|
+
//# sourceMappingURL=presentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/presentation.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YAAa,gBAAgB,KAAG,qBAK1D,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AnyProperties } from '@dxos/echo/internal';
|
|
3
|
+
import { SchemaEx } from '@dxos/effect';
|
|
4
|
+
import { type Merge } from '@dxos/util';
|
|
5
|
+
import { type FieldContext } from '#types';
|
|
6
|
+
import { type FormHandlerProps } from '../../../hooks';
|
|
7
|
+
import { type FormFieldProps } from '../FormField';
|
|
8
|
+
export type FormFieldSetProps<T extends AnyProperties> = Merge<{
|
|
9
|
+
/** Applied to the field set's container (the bordered box when collapsible). */
|
|
10
|
+
classNames?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
sort?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* When set, renders a toggle button at the end of the label row that
|
|
15
|
+
* shows/hides the field set body. Used for nested objects.
|
|
16
|
+
*/
|
|
17
|
+
collapsible?: boolean;
|
|
18
|
+
filter?: (props: SchemaEx.SchemaProperty[]) => SchemaEx.SchemaProperty[];
|
|
19
|
+
/**
|
|
20
|
+
* Picks a named layout out of `FormLayoutAnnotation` when present.
|
|
21
|
+
* Falls back to `'default'`. Ignored when the schema has no annotation
|
|
22
|
+
* (linear rendering then takes over).
|
|
23
|
+
*/
|
|
24
|
+
layoutName?: string;
|
|
25
|
+
}, Pick<FormHandlerProps<T>, 'schema'>, Pick<FormFieldProps, 'path' | 'autoFocus'>, FieldContext>;
|
|
26
|
+
export declare function FormFieldSet({ classNames, label, schema, readonly, path, sort, collapsible, filter, projection, layout, layoutName, ...props }: FormFieldSetProps<any>): React.JSX.Element | null;
|
|
27
|
+
export declare namespace FormFieldSet {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=FormFieldSet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldSet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormFieldSet/FormFieldSet.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAqC,KAAK,cAAc,EAAmB,MAAM,cAAc,CAAC;AAMvG,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,aAAa,IAAI,KAAK,CAC5D;IACE,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,EAAE,KAAK,QAAQ,CAAC,cAAc,EAAE,CAAC;IACzE;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,EACD,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACnC,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,CAAC,EAC1C,YAAY,CACb,CAAC;qCAK2B,EAC3B,UAAU,EACV,KAAK,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAgC,EAChC,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,GAAG,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type FormFieldPresentation } from '../FormField/presentation';
|
|
4
|
+
export type FormFieldSetContainerProps = ThemedClassName<PropsWithChildren<{
|
|
5
|
+
label?: string;
|
|
6
|
+
/** JSON path of the group, forwarded to the label as field metadata. */
|
|
7
|
+
path?: string;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
presentation: FormFieldPresentation;
|
|
10
|
+
/**
|
|
11
|
+
* Render a collapse toggle in the header and wrap the body in an indented, bordered box.
|
|
12
|
+
* Used for nested objects (struct fields, object-array items, inline refs).
|
|
13
|
+
*/
|
|
14
|
+
collapsible?: boolean;
|
|
15
|
+
}>>;
|
|
16
|
+
/**
|
|
17
|
+
* Shared chrome for a labelled group of sub-fields: an optional header (label + collapse toggle) and,
|
|
18
|
+
* when collapsible, an indented bordered container around the body. Nested structs, object-array items,
|
|
19
|
+
* and inline refs all reach this via `FormFieldSet`, so their visual containment is identical.
|
|
20
|
+
*/
|
|
21
|
+
export declare const FormFieldSetContainer: ({ classNames, label, path, readonly, presentation, collapsible, children, }: FormFieldSetContainerProps) => React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=FormFieldSetContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldSetContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormFieldSet/FormFieldSetContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,KAAK,eAAe,EAAoC,MAAM,gBAAgB,CAAC;AAOxF,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIvE,MAAM,MAAM,0BAA0B,GAAG,eAAe,CACtD,iBAAiB,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,qBAAqB,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC,CACH,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,gFAQ/B,0BAA0B,sBA+C5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormFieldSet/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
|
@@ -38,6 +38,8 @@ export type ResolvedLayoutField = {
|
|
|
38
38
|
* sub-fields. Undefined for ordinary (non-auto-labelled) fields.
|
|
39
39
|
*/
|
|
40
40
|
labelType?: SchemaAST.AST;
|
|
41
|
+
/** Whether the resolved property is required (non-optional). */
|
|
42
|
+
required: boolean;
|
|
41
43
|
};
|
|
42
44
|
/**
|
|
43
45
|
* Resolves a (possibly dotted) layout field name against a schema.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/FormLayout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQzD,OAAO,EAAqD,KAAK,cAAc,EAAmB,MAAM,cAAc,CAAC;AAKvH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC;AAEtH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,cAAc,EACd,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,eAAe,CAC7E,GAAG;IACF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;CACtC,CAAC;mCAcyB,EACzB,MAAM,EACN,QAAQ,EACR,IAAqC,EACrC,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,UAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe;;;;AAyElB,MAAM,MAAM,mBAAmB,GAAG;IAChC,4CAA4C;IAC5C,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;IACpB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,6FAA6F;IAC7F,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC;IAC1B,gEAAgE;IAChE,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AA4BF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,WAAY,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,MAAM,KAAG,mBAAmB,GAAG,SA+BnG,CAAC"}
|