@dxos/react-ui-form 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112
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 +2221 -2147
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +2221 -2147
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- 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 +15 -110
- package/dist/types/src/components/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/Form/Form.stories.d.ts +3 -37
- package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
- package/dist/types/src/components/Form/FormControls.d.ts +66 -0
- package/dist/types/src/components/Form/FormControls.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/FieldHeader.d.ts +19 -0
- package/dist/types/src/components/Form/FormField/FieldHeader.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/FormField.d.ts +30 -0
- package/dist/types/src/components/Form/FormField/FormField.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormField/FormFieldWrapper.d.ts +47 -0
- package/dist/types/src/components/Form/FormField/FormFieldWrapper.d.ts.map +1 -0
- package/dist/types/src/components/Form/{FormFieldComponent.stories.d.ts → FormField/FormFieldWrapper.stories.d.ts} +3 -3
- package/dist/types/src/components/Form/FormField/FormFieldWrapper.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 +87 -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/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/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts +88 -0
- 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/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/{fields → FormField/fields/GeoPointField}/GeoPointField.d.ts +2 -2
- 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 +4 -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/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/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/{fields → FormField/fields/SelectField}/SelectField.d.ts +2 -2
- 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 +0 -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 +5 -0
- package/dist/types/src/components/Form/FormField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/{FormFieldSet.d.ts → FormFieldSet/FormFieldSet.d.ts} +4 -3
- package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormFieldSet/index.d.ts +2 -0
- package/dist/types/src/components/Form/FormFieldSet/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/FormLayout/FormLayout.d.ts.map +1 -0
- 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 +2 -2
- 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.map +1 -1
- 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.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useFormContext.d.ts +37 -0
- package/dist/types/src/hooks/useFormContext.d.ts.map +1 -0
- package/dist/types/src/hooks/useFormHandler.d.ts +1 -4
- package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/{components/testing.d.ts → testing/TestLayout.d.ts} +1 -1
- 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 +43 -0
- package/dist/types/src/testing/schema.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +112 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +1 -0
- 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 +35 -34
- package/src/components/FieldEditor/FieldEditor.stories.tsx +1 -1
- package/src/components/FieldEditor/FieldEditor.test.tsx +1 -1
- package/src/components/FieldEditor/FieldEditor.tsx +5 -4
- package/src/components/Form/Form.stories.tsx +4 -49
- package/src/components/Form/Form.tsx +18 -447
- package/src/components/Form/FormControls.tsx +320 -0
- package/src/components/Form/FormField/FieldHeader.tsx +36 -0
- package/src/components/Form/{FormField.tsx → FormField/FormField.tsx} +35 -59
- package/src/components/Form/{FormFieldComponent.stories.tsx → FormField/FormFieldWrapper.stories.tsx} +24 -17
- package/src/components/Form/{FormFieldComponent.tsx → FormField/FormFieldWrapper.tsx} +21 -95
- package/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.tsx +103 -0
- package/src/components/Form/FormField/fields/ArrayField/ArrayField.tsx +269 -0
- package/src/components/Form/FormField/fields/ArrayField/index.ts +5 -0
- package/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.tsx +52 -0
- package/src/components/Form/{fields → FormField/fields/BooleanField}/BooleanField.tsx +10 -3
- package/src/components/Form/FormField/fields/BooleanField/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 +4 -2
- 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 +4 -3
- package/src/components/Form/FormField/fields/GeoPointField/index.ts +5 -0
- package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.tsx +6 -6
- package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.tsx +3 -2
- 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/{fields → FormField/fields/NumberField}/NumberField.tsx +27 -2
- package/src/components/Form/FormField/fields/NumberField/index.ts +5 -0
- package/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.tsx +8 -7
- package/src/components/Form/FormField/fields/RefField/RefField.stories.tsx +97 -0
- package/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.ts +2 -1
- package/src/components/Form/{fields → FormField/fields/RefField}/RefField.tsx +6 -25
- 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/{fields → FormField/fields/SelectField}/SelectField.tsx +4 -2
- 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 +55 -53
- 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 +4 -2
- 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 +4 -2
- 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 +0 -1
- package/src/components/Form/FormField/index.ts +8 -0
- package/src/components/Form/{FormFieldSet.tsx → FormFieldSet/FormFieldSet.tsx} +16 -32
- package/src/components/Form/FormFieldSet/index.ts +5 -0
- package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.tsx +4 -4
- package/src/components/Form/{Layout → FormLayout}/FormLayout.tsx +7 -6
- package/src/components/Form/{Layout → FormLayout}/index.ts +1 -2
- package/src/components/Form/index.ts +3 -5
- package/src/components/Form/meta-tags.ts +1 -1
- package/src/components/ObjectForm/ObjectForm.tsx +15 -14
- package/src/components/ObjectPicker/ObjectPicker.tsx +19 -27
- package/src/components/ObjectProperties/ObjectProperties.stories.tsx +1 -1
- package/src/components/ObjectProperties/ObjectProperties.test.tsx +1 -1
- package/src/components/ObjectProperties/ObjectProperties.tsx +2 -1
- package/src/components/RefEditor/RefEditor.stories.tsx +0 -1
- package/src/components/ViewEditor/ViewEditor.stories.tsx +4 -5
- package/src/components/ViewEditor/ViewEditor.test.tsx +1 -1
- package/src/components/ViewEditor/ViewEditor.tsx +98 -128
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useFormContext.ts +86 -0
- package/src/hooks/useFormHandler.ts +1 -4
- package/src/index.ts +1 -0
- package/src/{components/testing.tsx → testing/TestLayout.tsx} +1 -1
- package/src/testing/index.ts +7 -0
- package/src/testing/schema.ts +59 -0
- package/src/types.ts +134 -0
- package/src/util/index.ts +1 -0
- package/src/util/omit.ts +47 -0
- 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.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.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.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/testing.d.ts.map +0 -1
- package/src/components/Form/AUDIT.md +0 -17
- package/src/components/Form/FormTooltipsContext.ts +0 -25
- package/src/components/Form/Layout/annotation.ts +0 -38
- package/src/components/Form/README.md +0 -3
- package/src/components/Form/fields/ArrayField.tsx +0 -173
- /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.d.ts +0 -0
- /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,eAAe,EAEpB,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAErB,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,IAAI;IACf,IAAI;;;;IACJ,QAAQ;;;IACR,OAAO;;;IACP,OAAO;;;IACP,QAAQ;;;;IACR,MAAM;;;;IACN,KAAK;;;;IACL,OAAO;;;;IACP,MAAM;;;;IACN,KAAK;;;;CACN,CAAC;AAEF,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
|
|
@@ -1,44 +1,10 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import * as Schema from 'effect/Schema';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Obj
|
|
4
|
+
import { Obj } from '@dxos/echo';
|
|
5
5
|
import { type AnyProperties } from '@dxos/echo/internal';
|
|
6
|
-
import { type ExcludeId
|
|
7
|
-
|
|
8
|
-
readonly name: string;
|
|
9
|
-
}, Schema.Struct.Fields>;
|
|
10
|
-
export type Organization = Type.InstanceType<typeof Organization>;
|
|
11
|
-
declare const Person: Type.Obj<{
|
|
12
|
-
readonly name: string;
|
|
13
|
-
readonly ignore?: string | undefined;
|
|
14
|
-
readonly active?: boolean | undefined;
|
|
15
|
-
readonly address?: {
|
|
16
|
-
readonly street: string;
|
|
17
|
-
readonly city: string;
|
|
18
|
-
readonly state: string;
|
|
19
|
-
readonly zip: number;
|
|
20
|
-
} | undefined;
|
|
21
|
-
readonly employer?: import("@dxos/echo/internal").Ref<{
|
|
22
|
-
readonly name: string;
|
|
23
|
-
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
24
|
-
readonly tags?: readonly import("@dxos/echo/internal").Ref<{
|
|
25
|
-
readonly label: string;
|
|
26
|
-
readonly hue?: string | undefined;
|
|
27
|
-
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[] | undefined;
|
|
28
|
-
readonly status?: "active" | "inactive" | undefined;
|
|
29
|
-
readonly notes?: string | undefined;
|
|
30
|
-
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
31
|
-
readonly birthday?: string | undefined;
|
|
32
|
-
readonly meetingAt?: string | undefined;
|
|
33
|
-
readonly reminderAt?: string | undefined;
|
|
34
|
-
readonly tasks?: readonly string[] | undefined;
|
|
35
|
-
readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
|
|
36
|
-
readonly identities?: readonly {
|
|
37
|
-
readonly type: string;
|
|
38
|
-
readonly value: string;
|
|
39
|
-
}[] | undefined;
|
|
40
|
-
}, Schema.Struct.Fields>;
|
|
41
|
-
export type Person = Type.InstanceType<typeof Person>;
|
|
6
|
+
import { type ExcludeId } from '../../util';
|
|
7
|
+
import { type FormRootProps } from './Form';
|
|
42
8
|
type DefaultStoryProps<T extends AnyProperties> = {
|
|
43
9
|
schema?: Schema.Schema<T>;
|
|
44
10
|
} & FormRootProps<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,
|
|
1
|
+
{"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,GAAG,EAAa,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUzD,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,YAAY,CAAC;AACpD,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAElD,KAAK,iBAAiB,CAAC,CAAC,SAAS,aAAa,IAAI;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3B,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAgDrB,QAAA,MAAM,IAAI;;;;;;aA9CY,CAAC,SAAS,aAAa,4DAI1C,iBAAiB,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEiB,CAAC;eAE1B,IAAI;AAEnB,KAAK,KAAK,CAAC,CAAC,SAAS,aAAa,IAAI,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAErE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+FAAyB,CAAC;AAW5C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAMzD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAM1D,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAMxD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAEvD,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type AnyProperties } from '@dxos/echo/internal';
|
|
3
|
+
import { type ColumnRootProps, type IconButtonProps, type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
+
import { type FormContextValue, type FormHandlerProps, type FormUpdateMeta } from '../../hooks';
|
|
5
|
+
import { type FormFieldSetProps as NaturalFormFieldSetProps } from './FormFieldSet';
|
|
6
|
+
import { type FormLayoutProps as NaturalFormLayoutProps } from './FormLayout';
|
|
7
|
+
export type FormRootProps<T extends AnyProperties = AnyProperties> = PropsWithChildren<{
|
|
8
|
+
/**
|
|
9
|
+
* Called when the form is submitted and passes validation.
|
|
10
|
+
*/
|
|
11
|
+
onSave?: (values: T, meta: FormUpdateMeta<T>) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Called when the form is canceled to abandon/undo any pending changes.
|
|
14
|
+
*/
|
|
15
|
+
onCancel?: () => void;
|
|
16
|
+
} & Omit<FormContextValue<T>, 'form'> & Pick<FormHandlerProps<T>, 'schema' | 'autoSave' | 'values' | 'defaultValues' | 'onValidate' | 'onValuesChanged'> & Omit<NaturalFormFieldSetProps<T>, 'schema' | 'path'>>;
|
|
17
|
+
export declare function FormRoot<T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
|
|
18
|
+
export declare namespace FormRoot {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
export type FormViewportProps = {
|
|
22
|
+
scroll?: boolean;
|
|
23
|
+
gutter?: ColumnRootProps['gutter'];
|
|
24
|
+
};
|
|
25
|
+
export declare const FormViewport: React.ForwardRefExoticComponent<Omit<FormViewportProps, "className"> & {
|
|
26
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
27
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export type FormContentProps = ThemedClassName<PropsWithChildren<{}>>;
|
|
29
|
+
export declare const FormContent: React.ForwardRefExoticComponent<Omit<FormContentProps, "className"> & {
|
|
30
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
31
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
export type FormFieldSetProps = ThemedClassName<NaturalFormFieldSetProps<any>>;
|
|
33
|
+
export declare function FormFieldSet(props: FormFieldSetProps): React.JSX.Element;
|
|
34
|
+
export declare namespace FormFieldSet {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export type FormLayoutProps = Omit<NaturalFormLayoutProps, 'schema'> & {
|
|
38
|
+
schema?: NaturalFormLayoutProps['schema'];
|
|
39
|
+
};
|
|
40
|
+
export declare function FormLayout({ schema, ...props }: FormLayoutProps): React.JSX.Element | null;
|
|
41
|
+
export declare namespace FormLayout {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
44
|
+
export type FormActionsProps = ThemedClassName<{}>;
|
|
45
|
+
export declare function FormActions({ classNames }: FormActionsProps): React.JSX.Element | null;
|
|
46
|
+
export declare namespace FormActions {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
49
|
+
export type FormSectionProps = ThemedClassName<{
|
|
50
|
+
label?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const FormSection: React.ForwardRefExoticComponent<Omit<FormSectionProps, "className"> & {
|
|
54
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
55
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
export type FormSubmitProps = ThemedClassName<Partial<Pick<IconButtonProps, 'icon' | 'label' | 'disabled'>>>;
|
|
57
|
+
export declare function FormSubmit({ classNames, label, icon, disabled }: FormSubmitProps): React.JSX.Element | null;
|
|
58
|
+
export declare namespace FormSubmit {
|
|
59
|
+
var displayName: string;
|
|
60
|
+
}
|
|
61
|
+
export type FormErrorProps = ThemedClassName<PropsWithChildren>;
|
|
62
|
+
export declare function FormError({ children, classNames }: FormErrorProps): React.JSX.Element | null;
|
|
63
|
+
export declare namespace FormError {
|
|
64
|
+
var displayName: string;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=FormControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormControls.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,eAAe,EAGpB,KAAK,eAAe,EAMrB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAIpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,iBAAiB,IAAI,wBAAwB,EACnD,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAmC,KAAK,eAAe,IAAI,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAM/G,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,iBAAiB,CACpF;IACE;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GACnC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,GAAG,YAAY,GAAG,iBAAiB,CAAC,GAChH,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,CACvD,CAAC;iCAEuB,CAAC,SAAS,aAAa,GAAG,aAAa,EAAE,EAChE,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,CAAC,CAAC;;;;AAkBnB,MAAM,MAAM,iBAAiB,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAA;CAAE,CAAC;AAIzF,eAAO,MAAM,YAAY;;2HAqBxB,CAAC;AAUF,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;AAGtE,eAAO,MAAM,WAAW;;2HAkBtB,CAAC;AAUH,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC;qCAElD,KAAK,EAAE,iBAAiB;;;;AAcrD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAA;CAAE,CAAC;mCAE1F,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe;;;;AAkBhE,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,EAAE,CAAC,CAAC;oCAEvB,EAAE,UAAU,EAAE,EAAE,gBAAgB;;;;AAoD5D,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEzF,eAAO,MAAM,WAAW;;2HAavB,CAAC;AAUF,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;mCAElF,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,eAAe;;;;AAoCjF,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;kCAGtC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,cAAc"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type FieldHeaderProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
/** JSON path forwarded to the label as field metadata. */
|
|
5
|
+
path?: string;
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
/** Trailing inline add affordance; omit to hide it. */
|
|
8
|
+
add?: {
|
|
9
|
+
icon?: string;
|
|
10
|
+
label: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Header row for an array/list field: a label with an optional inline add button.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FieldHeader: ({ label, path, readonly, add }: FieldHeaderProps) => React.JSX.Element;
|
|
19
|
+
//# sourceMappingURL=FieldHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FieldHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,GAAG,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CACjF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,mCAAoC,gBAAgB,sBAc3E,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as SchemaAST from 'effect/SchemaAST';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconButtonProps } from '@dxos/react-ui';
|
|
4
|
+
import { type CreateOptions, type FormFieldOptions, type RefFieldDataProps } from '#types';
|
|
5
|
+
export type FormFieldProps = {
|
|
6
|
+
/**
|
|
7
|
+
* AST of the property to render.
|
|
8
|
+
*/
|
|
9
|
+
type: SchemaAST.AST;
|
|
10
|
+
/**
|
|
11
|
+
* Name of the property. Used to derive a default label
|
|
12
|
+
* (`title ?? capitalize(name)`) and as the projection lookup key. Pass
|
|
13
|
+
* `null` to suppress the header label entirely -- the form still renders
|
|
14
|
+
* the field/struct, but `FormFieldSet`'s top-level `<FormFieldLabel>` is
|
|
15
|
+
* skipped. Used by `ArrayField` for object-array items, where every item
|
|
16
|
+
* would otherwise repeat the array's parent name.
|
|
17
|
+
*/
|
|
18
|
+
name: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Path to the current object from the root. Used with nested forms.
|
|
21
|
+
*/
|
|
22
|
+
path?: (string | number)[];
|
|
23
|
+
autoFocus?: boolean;
|
|
24
|
+
} & FormFieldOptions & Pick<RefFieldDataProps, 'getOptions' | 'onCreate' | 'useType'> & CreateOptions;
|
|
25
|
+
export declare function FormField(props: FormFieldProps): React.JSX.Element | null;
|
|
26
|
+
export declare namespace FormField {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const CompactIconButton: (props: IconButtonProps) => React.JSX.Element;
|
|
30
|
+
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FormField.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAyB,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAGxF,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAGrB,KAAK,iBAAiB,EACvB,MAAM,QAAQ,CAAC;AAmBhB,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;IAEpB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,gBAAgB,GAClB,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC,GAC9D,aAAa,CAAC;kCAEU,KAAK,EAAE,cAAc;;;;AAiM/C,eAAO,MAAM,iBAAiB,UAAW,eAAe,sBAOvD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { Component, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
+
import { ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type FormFieldRendererProps } from '#types';
|
|
4
|
+
export type FormFieldLabelProps = ThemedClassName<{
|
|
5
|
+
/** Render a plain `<span>` instead of an input-associated `Input.Label`, for labels used outside an `Input.Root` (e.g. section/group headers). */
|
|
6
|
+
standalone?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
/**
|
|
9
|
+
* JSON path of the field this label describes (e.g. `runtime.client.storage.persistent`).
|
|
10
|
+
* Field metadata; accepted by callers but not currently rendered.
|
|
11
|
+
*/
|
|
12
|
+
path?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Trailing button rendered at the end of the label row (third grid column).
|
|
15
|
+
* Used by nested-object field sets to surface a collapse toggle.
|
|
16
|
+
*/
|
|
17
|
+
button?: ReactNode;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
} & Pick<FormFieldRendererProps, 'label' | 'readonly'>>;
|
|
20
|
+
export declare function FormFieldLabel({ classNames, label, error, readonly, standalone, button, onClick }: FormFieldLabelProps): React.JSX.Element;
|
|
21
|
+
export declare namespace FormFieldLabel {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export type FormFieldWrapperProps<T = any> = Pick<FormFieldRendererProps, 'readonly' | 'label' | 'layout' | 'getStatus' | 'getValue' | 'jsonPath' | 'format'> & {
|
|
25
|
+
children?: (props: {
|
|
26
|
+
value: T;
|
|
27
|
+
}) => ReactNode;
|
|
28
|
+
};
|
|
29
|
+
export declare const FormFieldWrapper: <T>(props: FormFieldWrapperProps<T>) => React.JSX.Element | null;
|
|
30
|
+
type FormFieldErrorState = {
|
|
31
|
+
error: Error | undefined;
|
|
32
|
+
};
|
|
33
|
+
type FormFieldErrorBoundaryProps = PropsWithChildren<{
|
|
34
|
+
path?: (string | number)[];
|
|
35
|
+
}>;
|
|
36
|
+
export declare class FormFieldErrorBoundary extends Component<FormFieldErrorBoundaryProps, FormFieldErrorState> {
|
|
37
|
+
static getDerivedStateFromError(error: Error): {
|
|
38
|
+
error: Error;
|
|
39
|
+
};
|
|
40
|
+
state: {
|
|
41
|
+
error: undefined;
|
|
42
|
+
};
|
|
43
|
+
componentDidUpdate(prevProps: FormFieldErrorBoundaryProps): void;
|
|
44
|
+
render(): string | number | bigint | boolean | React.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | null | undefined;
|
|
45
|
+
private resetError;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=FormFieldWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FormFieldWrapper.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjF,OAAO,EAA+B,eAAe,EAAW,MAAM,gBAAgB,CAAC;AAGvF,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAMrD,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,kJAAkJ;IAClJ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,UAAU,CAAC,CACvD,CAAC;uCAE6B,EAC7B,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,OAAO,EACR,EAAE,mBAAmB;;;;AAsDtB,MAAM,MAAM,qBAAqB,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,CAC/C,sBAAsB,EACtB,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CACnF,GAAG;IACF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,CAAC,CAAA;KAAE,KAAK,SAAS,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAU,qBAAqB,CAAC,CAAC,CAAC,6BA8BnE,CAAC;AAMF,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,KAAK,2BAA2B,GAAG,iBAAiB,CAAC;IACnD,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,qBAAa,sBAAuB,SAAQ,SAAS,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;IACrG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAE9D;IAEQ,KAAK;QAAK,KAAK;MAAc;IAE7B,kBAAkB,CAAC,SAAS,EAAE,2BAA2B,QAIjE;IAEQ,MAAM,wRAWd;IAED,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type
|
|
4
|
-
declare const DefaultStory: ({ type, placeholder, readonly, onBlur, onValueChange, ...props }:
|
|
3
|
+
import { type FormFieldRendererProps } from '#types';
|
|
4
|
+
declare const DefaultStory: ({ type, placeholder, readonly, onBlur, onValueChange, ...props }: FormFieldRendererProps<string>) => React.JSX.Element;
|
|
5
5
|
declare const meta: Meta<typeof DefaultStory>;
|
|
6
6
|
export default meta;
|
|
7
7
|
type Story = StoryObj<typeof meta>;
|
|
8
8
|
export declare const Default: Story;
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=FormFieldWrapper.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldWrapper.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FormFieldWrapper.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAwC,MAAM,OAAO,CAAC;AAK7D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAKrD,QAAA,MAAM,YAAY,qEAOf,sBAAsB,CAAC,MAAM,CAAC,sBA0BhC,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAOnC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
|
package/dist/types/src/components/Form/{fields → FormField/fields/ArrayField}/ArrayField.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as SchemaAST from 'effect/SchemaAST';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type
|
|
4
|
-
import { type
|
|
3
|
+
import { type FormFieldStateProps } from '#types';
|
|
4
|
+
import { type FormFieldProps } from '../../FormField';
|
|
5
5
|
export type ArrayFieldProps = {
|
|
6
6
|
label: string;
|
|
7
7
|
fieldProps: FormFieldStateProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/ArrayField/ArrayField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAA8C,MAAM,OAAO,CAAC;AASnE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAKlD,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAmBpF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,mBAAmB,CAAC;CACjC,GAAG,cAAc,CAAC;mCAEQ,EACzB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EAAE,UAAU,EACtB,GAAG,KAAK,EACT,EAAE,eAAe;;;;AAoLlB;;;GAGG;AAEH,eAAO,MAAM,eAAe,SAAU,SAAS,CAAC,GAAG,KAAG,GA+BrD,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
decorators: import("@storybook/react").Decorator[];
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
translations: [{
|
|
8
|
+
readonly 'en-US': {
|
|
9
|
+
readonly "@dxos/react-ui-form": {
|
|
10
|
+
readonly 'ref-editor.placeholder': "Type '@' to add a reference, or enter a value";
|
|
11
|
+
readonly 'ref-editor-auto.placeholder': 'Search by name, or enter a value';
|
|
12
|
+
readonly 'fields.label': 'Fields';
|
|
13
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
14
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
15
|
+
readonly 'field-property.label': 'Property';
|
|
16
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
17
|
+
readonly 'field-format.label': 'Type';
|
|
18
|
+
readonly 'field-path.label': 'Field path';
|
|
19
|
+
readonly 'remove-item.button': 'Delete item';
|
|
20
|
+
readonly 'add-item.button': 'Add item';
|
|
21
|
+
readonly 'add-property-button.label': 'Add property';
|
|
22
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
23
|
+
readonly 'boolean-input-false.value': 'No';
|
|
24
|
+
readonly 'show-field.label': 'Show field';
|
|
25
|
+
readonly 'hide-field.label': 'Hide field';
|
|
26
|
+
readonly 'expand-fields.label': 'Expand';
|
|
27
|
+
readonly 'collapse-fields.label': 'Collapse';
|
|
28
|
+
readonly 'delete-field.label': 'Delete field';
|
|
29
|
+
readonly 'create-option.label': 'Create';
|
|
30
|
+
readonly 'add-tag.label': 'Add tag';
|
|
31
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
32
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
33
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
34
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
35
|
+
readonly 'example.placeholder': 'Example';
|
|
36
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
37
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
38
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
39
|
+
readonly 'save-button.label': 'Save';
|
|
40
|
+
readonly 'create-text.label': 'Create text';
|
|
41
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
42
|
+
readonly 'format.currency.label': 'Currency';
|
|
43
|
+
readonly 'format.date.label': 'Date';
|
|
44
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
45
|
+
readonly 'format.did.label': 'DID';
|
|
46
|
+
readonly 'format.duration.label': 'Duration';
|
|
47
|
+
readonly 'format.dxn.label': 'DXN';
|
|
48
|
+
readonly 'format.email.label': 'Email';
|
|
49
|
+
readonly 'format.formula.label': 'Formula';
|
|
50
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
51
|
+
readonly 'format.integer.label': 'Integer';
|
|
52
|
+
readonly 'format.json.label': 'JSON';
|
|
53
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
54
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
55
|
+
readonly 'format.percent.label': 'Percent';
|
|
56
|
+
readonly 'format.ref.label': 'Reference';
|
|
57
|
+
readonly 'format.regex.label': 'RegExp';
|
|
58
|
+
readonly 'format.string.label': 'String';
|
|
59
|
+
readonly 'format.single-select.label': 'Select';
|
|
60
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
61
|
+
readonly 'format.text.label': 'Long text';
|
|
62
|
+
readonly 'format.time.label': 'Time';
|
|
63
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
64
|
+
readonly 'format.user.label': 'User';
|
|
65
|
+
readonly 'format.number.label': 'Number';
|
|
66
|
+
readonly 'format.uri.label': 'URI';
|
|
67
|
+
readonly 'format.url.label': 'URL';
|
|
68
|
+
readonly 'format.uuid.label': 'UUID';
|
|
69
|
+
readonly 'latitude.label': 'Latitude';
|
|
70
|
+
readonly 'longitude.label': 'Longitude';
|
|
71
|
+
readonly 'select-option.label': 'Label';
|
|
72
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
73
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
74
|
+
readonly 'select-option-add.button': 'Add option';
|
|
75
|
+
readonly 'system-schema.title': 'System type';
|
|
76
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
77
|
+
readonly 'remove.button': 'Delete';
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
}];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default meta;
|
|
84
|
+
type Story = StoryObj<typeof meta>;
|
|
85
|
+
export declare const Default: Story;
|
|
86
|
+
export declare const Ordered: Story;
|
|
87
|
+
//# sourceMappingURL=ArrayField.stories.d.ts.map
|
package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/ArrayField/ArrayField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA+EjE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO6B,CAAC;eAEzB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/ArrayField/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/BooleanField/BooleanField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAIrD,eAAO,MAAM,YAAY,gDAAiD,sBAAsB,CAAC,OAAO,CAAC,sBAgBxG,CAAC"}
|
package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.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=BooleanField.stories.d.ts.map
|
package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/BooleanField/BooleanField.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/BooleanField/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormFieldRendererProps } from '#types';
|
|
3
|
+
export declare const DateField: ({ type, format, readonly, placeholder: _placeholder, onValueChange, onBlur: _onBlur, ...props }: FormFieldRendererProps<string>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=DateField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/DateField/DateField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAsCrD,eAAO,MAAM,SAAS,oGAQnB,sBAAsB,CAAC,MAAM,CAAC,sBA8ChC,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=DateField.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/DateField/DateField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AA0CxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|