@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.
Files changed (372) hide show
  1. package/dist/lib/browser/index.mjs +2337 -1919
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +2337 -1919
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/annotations.d.ts +47 -0
  8. package/dist/types/src/annotations.d.ts.map +1 -0
  9. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +3 -3
  10. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  11. package/dist/types/src/components/Form/Form.d.ts +23 -110
  12. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  13. package/dist/types/src/components/Form/Form.stories.d.ts +48 -101
  14. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  15. package/dist/types/src/components/Form/Form.theme.d.ts +252 -0
  16. package/dist/types/src/components/Form/Form.theme.d.ts.map +1 -0
  17. package/dist/types/src/components/Form/Form.theme.test.d.ts +2 -0
  18. package/dist/types/src/components/Form/Form.theme.test.d.ts.map +1 -0
  19. package/dist/types/src/components/Form/FormControls.d.ts +75 -0
  20. package/dist/types/src/components/Form/FormControls.d.ts.map +1 -0
  21. package/dist/types/src/components/Form/FormField/FormField.d.ts +44 -0
  22. package/dist/types/src/components/Form/FormField/FormField.d.ts.map +1 -0
  23. package/dist/types/src/components/Form/FormField/FormFieldHeader.d.ts +27 -0
  24. package/dist/types/src/components/Form/FormField/FormFieldHeader.d.ts.map +1 -0
  25. package/dist/types/src/components/Form/FormField/FormRow.d.ts +85 -0
  26. package/dist/types/src/components/Form/FormField/FormRow.d.ts.map +1 -0
  27. package/dist/types/src/components/Form/{FormFieldComponent.stories.d.ts → FormField/FormRow.stories.d.ts} +6 -3
  28. package/dist/types/src/components/Form/FormField/FormRow.stories.d.ts.map +1 -0
  29. package/dist/types/src/components/Form/{fields → FormField/fields/ArrayField}/ArrayField.d.ts +2 -2
  30. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.d.ts.map +1 -0
  31. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts +88 -0
  32. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts +2 -0
  34. package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts.map +1 -0
  35. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.d.ts +12 -0
  36. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.d.ts.map +1 -0
  37. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/index.d.ts +2 -0
  38. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/index.d.ts.map +1 -0
  39. package/dist/types/src/components/Form/FormField/fields/AutofillField/AutofillField.d.ts +12 -0
  40. package/dist/types/src/components/Form/FormField/fields/AutofillField/AutofillField.d.ts.map +1 -0
  41. package/dist/types/src/components/Form/FormField/fields/AutofillField/index.d.ts +2 -0
  42. package/dist/types/src/components/Form/FormField/fields/AutofillField/index.d.ts.map +1 -0
  43. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts +4 -0
  44. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts.map +1 -0
  45. package/dist/types/src/components/{Settings/Settings.stories.d.ts → Form/FormField/fields/BooleanField/BooleanField.stories.d.ts} +1 -2
  46. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts.map +1 -0
  47. package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts +2 -0
  48. package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts.map +1 -0
  49. package/dist/types/src/components/Form/FormField/fields/ComboboxField/ComboboxField.d.ts +12 -0
  50. package/dist/types/src/components/Form/FormField/fields/ComboboxField/ComboboxField.d.ts.map +1 -0
  51. package/dist/types/src/components/Form/FormField/fields/ComboboxField/index.d.ts +2 -0
  52. package/dist/types/src/components/Form/FormField/fields/ComboboxField/index.d.ts.map +1 -0
  53. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts +4 -0
  54. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts.map +1 -0
  55. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts +88 -0
  56. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts.map +1 -0
  57. package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts +2 -0
  58. package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts.map +1 -0
  59. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts +5 -0
  60. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts.map +1 -0
  61. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts +88 -0
  62. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts.map +1 -0
  63. package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts +2 -0
  64. package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts.map +1 -0
  65. package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.d.ts +2 -2
  66. package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.d.ts.map +1 -0
  67. package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.stories.d.ts.map +1 -0
  68. package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts +2 -0
  69. package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts.map +1 -0
  70. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts +15 -0
  71. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts.map +1 -0
  72. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts +88 -0
  73. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts.map +1 -0
  74. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.test.d.ts +2 -0
  75. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.test.d.ts.map +1 -0
  76. package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts +2 -0
  77. package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts.map +1 -0
  78. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.d.ts +4 -0
  79. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.d.ts.map +1 -0
  80. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.d.ts +88 -0
  81. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.d.ts.map +1 -0
  82. package/dist/types/src/components/Form/FormField/fields/PasswordField/index.d.ts +2 -0
  83. package/dist/types/src/components/Form/FormField/fields/PasswordField/index.d.ts.map +1 -0
  84. package/dist/types/src/components/Form/FormField/fields/RefField/InlineRefField.d.ts.map +1 -0
  85. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts +16 -0
  86. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts.map +1 -0
  87. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts +92 -0
  88. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts.map +1 -0
  89. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.test.d.ts.map +1 -0
  90. package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts +3 -0
  91. package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts.map +1 -0
  92. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts +29 -0
  93. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts.map +1 -0
  94. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts +88 -0
  95. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts.map +1 -0
  96. package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts +2 -0
  97. package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts.map +1 -0
  98. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts +5 -0
  99. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts.map +1 -0
  100. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.stories.d.ts.map +1 -0
  101. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts +2 -0
  102. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts.map +1 -0
  103. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts +4 -0
  104. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts.map +1 -0
  105. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts +88 -0
  106. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts.map +1 -0
  107. package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts +2 -0
  108. package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts.map +1 -0
  109. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts +4 -0
  110. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts.map +1 -0
  111. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts +88 -0
  112. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts.map +1 -0
  113. package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts +2 -0
  114. package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts.map +1 -0
  115. package/dist/types/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.d.ts +2 -2
  116. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.d.ts.map +1 -0
  117. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts +88 -0
  118. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts.map +1 -0
  119. package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts +2 -0
  120. package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts.map +1 -0
  121. package/dist/types/src/components/Form/{fields → FormField/fields}/index.d.ts +4 -1
  122. package/dist/types/src/components/Form/FormField/fields/index.d.ts.map +1 -0
  123. package/dist/types/src/components/Form/FormField/index.d.ts +6 -0
  124. package/dist/types/src/components/Form/FormField/index.d.ts.map +1 -0
  125. package/dist/types/src/components/Form/FormField/presentation.d.ts +22 -0
  126. package/dist/types/src/components/Form/FormField/presentation.d.ts.map +1 -0
  127. package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts +30 -0
  128. package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts.map +1 -0
  129. package/dist/types/src/components/Form/FormFieldSet/FormFieldSetContainer.d.ts +22 -0
  130. package/dist/types/src/components/Form/FormFieldSet/FormFieldSetContainer.d.ts.map +1 -0
  131. package/dist/types/src/components/Form/FormFieldSet/index.d.ts +3 -0
  132. package/dist/types/src/components/Form/FormFieldSet/index.d.ts.map +1 -0
  133. package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.d.ts +2 -0
  134. package/dist/types/src/components/Form/FormLayout/FormLayout.d.ts.map +1 -0
  135. package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.d.ts +5 -5
  136. package/dist/types/src/components/Form/FormLayout/FormLayout.stories.d.ts.map +1 -0
  137. package/dist/types/src/components/Form/FormLayout/FormLayout.stories.test.d.ts.map +1 -0
  138. package/dist/types/src/components/Form/FormLayout/FormLayout.test.d.ts.map +1 -0
  139. package/dist/types/src/components/Form/FormLayout/index.d.ts +3 -0
  140. package/dist/types/src/components/Form/FormLayout/index.d.ts.map +1 -0
  141. package/dist/types/src/components/Form/FormLayout/parser.d.ts.map +1 -0
  142. package/dist/types/src/components/Form/FormLayout/parser.test.d.ts.map +1 -0
  143. package/dist/types/src/components/Form/index.d.ts +3 -5
  144. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  145. package/dist/types/src/components/Form/meta-tags.d.ts +1 -12
  146. package/dist/types/src/components/Form/meta-tags.d.ts.map +1 -1
  147. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -1
  148. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +6 -23
  149. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
  150. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +2 -1
  151. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -1
  152. package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts +2 -2
  153. package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts.map +1 -1
  154. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +1 -1
  155. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  156. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +2 -2
  157. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  158. package/dist/types/src/components/index.d.ts +0 -1
  159. package/dist/types/src/components/index.d.ts.map +1 -1
  160. package/dist/types/src/hooks/index.d.ts +2 -0
  161. package/dist/types/src/hooks/index.d.ts.map +1 -1
  162. package/dist/types/src/hooks/useAsyncFieldEffect.d.ts +24 -0
  163. package/dist/types/src/hooks/useAsyncFieldEffect.d.ts.map +1 -0
  164. package/dist/types/src/hooks/useFormContext.d.ts +42 -0
  165. package/dist/types/src/hooks/useFormContext.d.ts.map +1 -0
  166. package/dist/types/src/hooks/useFormHandler.d.ts +9 -6
  167. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
  168. package/dist/types/src/index.d.ts +2 -0
  169. package/dist/types/src/index.d.ts.map +1 -1
  170. package/dist/types/src/{components/testing.d.ts → testing/TestLayout.d.ts} +2 -2
  171. package/dist/types/src/testing/TestLayout.d.ts.map +1 -0
  172. package/dist/types/src/testing/index.d.ts +3 -0
  173. package/dist/types/src/testing/index.d.ts.map +1 -0
  174. package/dist/types/src/testing/schema.d.ts +40 -0
  175. package/dist/types/src/testing/schema.d.ts.map +1 -0
  176. package/dist/types/src/types.d.ts +161 -0
  177. package/dist/types/src/types.d.ts.map +1 -0
  178. package/dist/types/src/util/index.d.ts +1 -1
  179. package/dist/types/src/util/index.d.ts.map +1 -1
  180. package/dist/types/src/util/omit.d.ts +12 -0
  181. package/dist/types/src/util/omit.d.ts.map +1 -0
  182. package/dist/types/tsconfig.tsbuildinfo +1 -1
  183. package/package.json +43 -41
  184. package/src/annotations.ts +63 -0
  185. package/src/components/FieldEditor/FieldEditor.stories.tsx +1 -1
  186. package/src/components/FieldEditor/FieldEditor.test.tsx +1 -1
  187. package/src/components/FieldEditor/FieldEditor.tsx +10 -6
  188. package/src/components/Form/DESIGN.md +24 -0
  189. package/src/components/Form/Form.stories.tsx +260 -61
  190. package/src/components/Form/Form.theme.test.ts +33 -0
  191. package/src/components/Form/Form.theme.ts +86 -0
  192. package/src/components/Form/Form.tsx +30 -453
  193. package/src/components/Form/FormControls.tsx +377 -0
  194. package/src/components/Form/{FormField.tsx → FormField/FormField.tsx} +98 -71
  195. package/src/components/Form/FormField/FormFieldHeader.tsx +68 -0
  196. package/src/components/Form/FormField/FormRow.stories.tsx +97 -0
  197. package/src/components/Form/FormField/FormRow.tsx +298 -0
  198. package/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.tsx +119 -0
  199. package/src/components/Form/FormField/fields/ArrayField/ArrayField.tsx +328 -0
  200. package/src/components/Form/FormField/fields/ArrayField/index.ts +5 -0
  201. package/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.tsx +59 -0
  202. package/src/components/Form/FormField/fields/AsyncSelectField/index.ts +5 -0
  203. package/src/components/Form/FormField/fields/AutofillField/AutofillField.tsx +67 -0
  204. package/src/components/Form/FormField/fields/AutofillField/index.ts +5 -0
  205. package/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.tsx +52 -0
  206. package/src/components/Form/FormField/fields/BooleanField/BooleanField.tsx +28 -0
  207. package/src/components/Form/FormField/fields/BooleanField/index.ts +5 -0
  208. package/src/components/Form/FormField/fields/ComboboxField/ComboboxField.tsx +104 -0
  209. package/src/components/Form/FormField/fields/ComboboxField/index.ts +5 -0
  210. package/src/components/Form/FormField/fields/DateField/DateField.stories.tsx +60 -0
  211. package/src/components/Form/{fields → FormField/fields/DateField}/DateField.tsx +12 -10
  212. package/src/components/Form/FormField/fields/DateField/index.ts +5 -0
  213. package/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.tsx +53 -0
  214. package/src/components/Form/{fields → FormField/fields/GeoPointField}/GeoPointField.tsx +19 -21
  215. package/src/components/Form/FormField/fields/GeoPointField/index.ts +5 -0
  216. package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.tsx +8 -8
  217. package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.tsx +41 -41
  218. package/src/components/Form/FormField/fields/MarkdownField/index.ts +5 -0
  219. package/src/components/Form/FormField/fields/NumberField/NumberField.stories.tsx +52 -0
  220. package/src/components/Form/FormField/fields/NumberField/NumberField.test.ts +29 -0
  221. package/src/components/Form/FormField/fields/NumberField/NumberField.tsx +140 -0
  222. package/src/components/Form/FormField/fields/NumberField/index.ts +5 -0
  223. package/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.tsx +53 -0
  224. package/src/components/Form/FormField/fields/PasswordField/PasswordField.tsx +41 -0
  225. package/src/components/Form/FormField/fields/PasswordField/index.ts +5 -0
  226. package/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.tsx +21 -14
  227. package/src/components/Form/FormField/fields/RefField/RefField.stories.tsx +97 -0
  228. package/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.ts +10 -1
  229. package/src/components/Form/{fields → FormField/fields/RefField}/RefField.tsx +55 -47
  230. package/src/components/Form/FormField/fields/RefField/index.ts +6 -0
  231. package/src/components/Form/FormField/fields/SelectField/SelectField.stories.tsx +53 -0
  232. package/src/components/Form/FormField/fields/SelectField/SelectField.tsx +136 -0
  233. package/src/components/Form/FormField/fields/SelectField/index.ts +5 -0
  234. package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.tsx +5 -5
  235. package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.tsx +56 -54
  236. package/src/components/Form/FormField/fields/SelectOptionField/index.ts +5 -0
  237. package/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.tsx +53 -0
  238. package/src/components/Form/{fields → FormField/fields/TextAreaField}/TextAreaField.tsx +6 -4
  239. package/src/components/Form/FormField/fields/TextAreaField/index.ts +5 -0
  240. package/src/components/Form/FormField/fields/TextField/TextField.stories.tsx +52 -0
  241. package/src/components/Form/{fields → FormField/fields/TextField}/TextField.tsx +6 -4
  242. package/src/components/Form/FormField/fields/TextField/index.ts +5 -0
  243. package/src/components/Form/FormField/fields/TupleField/TupleField.stories.tsx +55 -0
  244. package/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.tsx +4 -2
  245. package/src/components/Form/FormField/fields/TupleField/index.ts +5 -0
  246. package/src/components/Form/{fields → FormField/fields}/index.ts +4 -1
  247. package/src/components/Form/FormField/index.ts +10 -0
  248. package/src/components/Form/FormField/presentation.tsx +32 -0
  249. package/src/components/Form/{FormFieldSet.tsx → FormFieldSet/FormFieldSet.tsx} +53 -90
  250. package/src/components/Form/FormFieldSet/FormFieldSetContainer.tsx +93 -0
  251. package/src/components/Form/FormFieldSet/index.ts +6 -0
  252. package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.tsx +11 -9
  253. package/src/components/Form/{Layout → FormLayout}/FormLayout.tsx +29 -18
  254. package/src/components/Form/FormLayout/index.ts +6 -0
  255. package/src/components/Form/index.ts +3 -5
  256. package/src/components/Form/meta-tags.test.ts +1 -1
  257. package/src/components/Form/meta-tags.ts +1 -1
  258. package/src/components/ObjectForm/ObjectForm.tsx +15 -14
  259. package/src/components/ObjectPicker/ObjectPicker.tsx +20 -27
  260. package/src/components/ObjectProperties/ObjectProperties.stories.tsx +2 -2
  261. package/src/components/ObjectProperties/ObjectProperties.test.tsx +1 -1
  262. package/src/components/ObjectProperties/ObjectProperties.tsx +13 -8
  263. package/src/components/RefEditor/RefEditor.stories.tsx +2 -3
  264. package/src/components/RefEditor/RefEditor.tsx +1 -1
  265. package/src/components/ViewEditor/ViewEditor.stories.tsx +6 -7
  266. package/src/components/ViewEditor/ViewEditor.test.tsx +9 -3
  267. package/src/components/ViewEditor/ViewEditor.tsx +98 -128
  268. package/src/components/index.ts +0 -1
  269. package/src/hooks/index.ts +2 -0
  270. package/src/hooks/useAsyncFieldEffect.ts +81 -0
  271. package/src/hooks/useFormContext.ts +89 -0
  272. package/src/hooks/useFormHandler.ts +12 -10
  273. package/src/index.ts +2 -0
  274. package/src/{components/testing.tsx → testing/TestLayout.tsx} +16 -13
  275. package/src/testing/index.ts +7 -0
  276. package/src/testing/schema.ts +59 -0
  277. package/src/types.ts +186 -0
  278. package/src/util/index.ts +1 -1
  279. package/src/util/omit.ts +61 -0
  280. package/src/util/properties.test.ts +110 -28
  281. package/src/util/refs.ts +1 -1
  282. package/src/vitest-setup.ts +40 -0
  283. package/dist/types/src/components/Form/FormField.d.ts +0 -52
  284. package/dist/types/src/components/Form/FormField.d.ts.map +0 -1
  285. package/dist/types/src/components/Form/FormFieldComponent.d.ts +0 -98
  286. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +0 -1
  287. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +0 -1
  288. package/dist/types/src/components/Form/FormFieldSet.d.ts +0 -26
  289. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +0 -1
  290. package/dist/types/src/components/Form/FormTooltipsContext.d.ts +0 -19
  291. package/dist/types/src/components/Form/FormTooltipsContext.d.ts.map +0 -1
  292. package/dist/types/src/components/Form/Layout/FormLayout.d.ts.map +0 -1
  293. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts.map +0 -1
  294. package/dist/types/src/components/Form/Layout/FormLayout.stories.test.d.ts.map +0 -1
  295. package/dist/types/src/components/Form/Layout/FormLayout.test.d.ts.map +0 -1
  296. package/dist/types/src/components/Form/Layout/annotation.d.ts +0 -30
  297. package/dist/types/src/components/Form/Layout/annotation.d.ts.map +0 -1
  298. package/dist/types/src/components/Form/Layout/index.d.ts +0 -4
  299. package/dist/types/src/components/Form/Layout/index.d.ts.map +0 -1
  300. package/dist/types/src/components/Form/Layout/parser.d.ts.map +0 -1
  301. package/dist/types/src/components/Form/Layout/parser.test.d.ts.map +0 -1
  302. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +0 -1
  303. package/dist/types/src/components/Form/fields/BooleanField.d.ts +0 -4
  304. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +0 -1
  305. package/dist/types/src/components/Form/fields/DateField.d.ts +0 -4
  306. package/dist/types/src/components/Form/fields/DateField.d.ts.map +0 -1
  307. package/dist/types/src/components/Form/fields/GeoPointField.d.ts +0 -5
  308. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +0 -1
  309. package/dist/types/src/components/Form/fields/InlineRefField.d.ts.map +0 -1
  310. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +0 -1
  311. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +0 -1
  312. package/dist/types/src/components/Form/fields/NumberField.d.ts +0 -4
  313. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +0 -1
  314. package/dist/types/src/components/Form/fields/RefField.d.ts +0 -34
  315. package/dist/types/src/components/Form/fields/RefField.d.ts.map +0 -1
  316. package/dist/types/src/components/Form/fields/RefField.test.d.ts.map +0 -1
  317. package/dist/types/src/components/Form/fields/SelectField.d.ts +0 -13
  318. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +0 -1
  319. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +0 -5
  320. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +0 -1
  321. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +0 -1
  322. package/dist/types/src/components/Form/fields/TextAreaField.d.ts +0 -4
  323. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +0 -1
  324. package/dist/types/src/components/Form/fields/TextField.d.ts +0 -4
  325. package/dist/types/src/components/Form/fields/TextField.d.ts.map +0 -1
  326. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +0 -1
  327. package/dist/types/src/components/Form/fields/index.d.ts.map +0 -1
  328. package/dist/types/src/components/Settings/Settings.d.ts +0 -51
  329. package/dist/types/src/components/Settings/Settings.d.ts.map +0 -1
  330. package/dist/types/src/components/Settings/Settings.stories.d.ts.map +0 -1
  331. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +0 -43
  332. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +0 -1
  333. package/dist/types/src/components/Settings/SettingsItem.d.ts +0 -16
  334. package/dist/types/src/components/Settings/SettingsItem.d.ts.map +0 -1
  335. package/dist/types/src/components/Settings/SettingsSelectField.d.ts +0 -18
  336. package/dist/types/src/components/Settings/SettingsSelectField.d.ts.map +0 -1
  337. package/dist/types/src/components/Settings/index.d.ts +0 -4
  338. package/dist/types/src/components/Settings/index.d.ts.map +0 -1
  339. package/dist/types/src/components/testing.d.ts.map +0 -1
  340. package/dist/types/src/util/field-type.d.ts +0 -19
  341. package/dist/types/src/util/field-type.d.ts.map +0 -1
  342. package/src/components/Form/AUDIT.md +0 -17
  343. package/src/components/Form/FormFieldComponent.stories.tsx +0 -65
  344. package/src/components/Form/FormFieldComponent.tsx +0 -253
  345. package/src/components/Form/FormTooltipsContext.ts +0 -25
  346. package/src/components/Form/Layout/annotation.ts +0 -38
  347. package/src/components/Form/Layout/index.ts +0 -7
  348. package/src/components/Form/README.md +0 -3
  349. package/src/components/Form/fields/ArrayField.tsx +0 -173
  350. package/src/components/Form/fields/BooleanField.tsx +0 -22
  351. package/src/components/Form/fields/NumberField.tsx +0 -76
  352. package/src/components/Form/fields/SelectField.tsx +0 -77
  353. package/src/components/Settings/AUDIT.md +0 -51
  354. package/src/components/Settings/Settings.stories.tsx +0 -104
  355. package/src/components/Settings/Settings.tsx +0 -81
  356. package/src/components/Settings/SettingsFieldSet.tsx +0 -257
  357. package/src/components/Settings/SettingsItem.tsx +0 -58
  358. package/src/components/Settings/SettingsSelectField.tsx +0 -59
  359. package/src/components/Settings/index.ts +0 -7
  360. package/src/util/field-type.ts +0 -60
  361. /package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.d.ts +0 -0
  362. /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.d.ts +0 -0
  363. /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.d.ts +0 -0
  364. /package/dist/types/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.d.ts +0 -0
  365. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.d.ts +0 -0
  366. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.test.d.ts +0 -0
  367. /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.d.ts +0 -0
  368. /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.test.d.ts +0 -0
  369. /package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.tsx +0 -0
  370. /package/src/components/Form/{Layout → FormLayout}/FormLayout.test.ts +0 -0
  371. /package/src/components/Form/{Layout → FormLayout}/parser.test.ts +0 -0
  372. /package/src/components/Form/{Layout → FormLayout}/parser.ts +0 -0
@@ -1,137 +1,50 @@
1
- import * as Schema from 'effect/Schema';
2
- import React, { type PropsWithChildren } from 'react';
3
- import { Type } from '@dxos/echo';
4
- import { type AnyProperties } from '@dxos/echo/internal';
5
- import { type ColumnRootProps, type IconButtonProps, type ThemedClassName } from '@dxos/react-ui';
6
- import { type FormHandler, type FormHandlerProps, type FormUpdateMeta } from '../../hooks';
7
- import { type FormFieldLabelProps, type FormFieldStateProps } from './FormFieldComponent';
8
- import { type FormFieldSetProps as NaturalFormFieldSetProps } from './FormFieldSet';
9
- import { type FormLayoutProps as NaturalFormLayoutProps } from './Layout/FormLayout';
10
- export type ExcludeId<S extends Schema.Schema.AnyNoContext | Type.AnyEntity> = Omit<S extends Type.AnyEntity ? Type.InstanceType<S> : S extends Schema.Schema.AnyNoContext ? Schema.Schema.Type<S> : never, 'id'>;
11
- export declare const omitId: <S extends Schema.Schema.AnyNoContext | Type.AnyEntity>(schemaOrType: S) => Schema.Schema<ExcludeId<S>, ExcludeId<S>>;
12
- /**
13
- * Drop fields annotated with `FormInputAnnotation.set(false)` from a schema so
14
- * the form's validator doesn't trip on required-but-hidden fields. Used by
15
- * the picker's inline create form, where a `FactoryAnnotation` typically
16
- * supplies the hidden values (e.g. a backing-object Ref) outside the form.
17
- */
18
- export declare const omitHiddenFormFields: <S extends Schema.Schema.AnyNoContext>(schema: S) => S;
19
- type FormContextValue<T extends AnyProperties = any> = {
20
- /**
21
- * Form handler.
22
- */
23
- form: FormHandler<T>;
24
- /**
25
- * Show field tooltips (currently: JSON path on each label). Defaults to
26
- * `true`; pass `false` to suppress.
27
- */
28
- tooltips?: boolean;
29
- /**
30
- * Testing.
31
- */
32
- testId?: string;
33
- } & Pick<NaturalFormFieldSetProps<T>, 'readonly' | 'layout' | 'fieldMap' | 'fieldProvider' | 'projection' | 'createTypename' | 'createFieldMap' | 'db'>;
34
- declare const useFormContext: (consumerName: string) => FormContextValue<any>;
35
- /**
36
- * Get the current form values.
37
- */
38
- declare const useFormValues: {
39
- <T extends AnyProperties>(componentName: string, path?: (string | number)[]): T;
40
- <T extends AnyProperties>(componentName: string, path: (string | number)[] | undefined, defaultValue: () => T): T | undefined;
41
- };
42
- /**
43
- * Get the state props for the given field.
44
- */
45
- declare const useFormFieldState: (componentName: string, path?: (string | number)[]) => FormFieldStateProps;
46
- type FormRootProps<T extends AnyProperties = AnyProperties> = PropsWithChildren<{
47
- /**
48
- * Called when the form is submitted and passes validation.
49
- */
50
- onSave?: (values: T, meta: FormUpdateMeta<T>) => void;
51
- /**
52
- * Called when the form is canceled to abandon/undo any pending changes.
53
- */
54
- onCancel?: () => void;
55
- } & Omit<FormContextValue<T>, 'form'> & Pick<FormHandlerProps<T>, 'schema' | 'autoSave' | 'values' | 'defaultValues' | 'onValidate' | 'onValuesChanged'> & Omit<NaturalFormFieldSetProps<T>, 'schema' | 'path'>>;
56
- declare function FormRoot<T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
57
- declare namespace FormRoot {
58
- var displayName: string;
59
- }
60
- type FormViewportProps = {
61
- scroll?: boolean;
62
- gutter?: ColumnRootProps['gutter'];
63
- };
64
- type FormContentProps = ThemedClassName<PropsWithChildren<{}>>;
65
- type FormFieldSetProps = ThemedClassName<NaturalFormFieldSetProps<any>>;
66
- declare function FormFieldSet(props: FormFieldSetProps): React.JSX.Element;
67
- declare namespace FormFieldSet {
68
- var displayName: string;
69
- }
70
- type FormLayoutProps = Omit<NaturalFormLayoutProps, 'schema'> & {
71
- schema?: NaturalFormLayoutProps['schema'];
72
- };
73
- declare function FormLayout({ schema, ...props }: FormLayoutProps): React.JSX.Element | null;
74
- declare namespace FormLayout {
75
- var displayName: string;
76
- }
77
- type FormActionsProps = ThemedClassName<{}>;
78
- declare function FormActions({ classNames }: FormActionsProps): React.JSX.Element | null;
79
- declare namespace FormActions {
80
- var displayName: string;
81
- }
82
- type FormSectionProps = ThemedClassName<{
83
- label?: string;
84
- description?: string;
85
- }>;
86
- type FormSubmitProps = ThemedClassName<Partial<Pick<IconButtonProps, 'icon' | 'label' | 'disabled'>>>;
87
- declare function FormSubmit({ classNames, label, icon, disabled }: FormSubmitProps): React.JSX.Element | null;
88
- declare namespace FormSubmit {
89
- var displayName: string;
90
- }
91
- type FormErrorProps = ThemedClassName<PropsWithChildren>;
92
- declare function FormError({ children, classNames }: FormErrorProps): React.JSX.Element | null;
93
- declare namespace FormError {
94
- var displayName: string;
95
- }
1
+ import { type FormActionsProps, type FormContentProps, type FormGroupProps, type FormLayoutProps, type FormRootProps, type FormSectionProps, type FormSubmitProps, type FormViewportProps } from './FormControls';
2
+ import { type FormRowProps } from './FormField';
96
3
  export declare const Form: {
97
4
  Root: {
98
- <T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
5
+ <T extends import("@dxos/echo/internal").AnyProperties = import("@dxos/echo/internal").AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): import("react").JSX.Element;
99
6
  displayName: string;
100
7
  };
101
- Viewport: React.ForwardRefExoticComponent<Omit<FormViewportProps, "className"> & {
8
+ Viewport: import("react").ForwardRefExoticComponent<Omit<FormViewportProps, "className"> & {
102
9
  classNames?: import("@dxos/ui-types").ClassNameValue;
103
- } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
104
- Content: React.ForwardRefExoticComponent<Omit<FormContentProps, "className"> & {
10
+ } & Pick<import("react").HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ Content: import("react").ForwardRefExoticComponent<Omit<FormContentProps, "className"> & {
105
12
  classNames?: import("@dxos/ui-types").ClassNameValue;
106
- } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
107
- Section: React.ForwardRefExoticComponent<Omit<FormSectionProps, "className"> & {
13
+ } & Pick<import("react").HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
14
+ Section: import("react").ForwardRefExoticComponent<Omit<FormSectionProps, "className"> & {
108
15
  classNames?: import("@dxos/ui-types").ClassNameValue;
109
- } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
16
+ } & Pick<import("react").HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
17
+ Group: import("react").ForwardRefExoticComponent<Omit<FormGroupProps, "className"> & {
18
+ classNames?: import("@dxos/ui-types").ClassNameValue;
19
+ } & Pick<import("react").HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
110
20
  FieldSet: {
111
- (props: FormFieldSetProps): React.JSX.Element;
21
+ ({ classNames, ...props }: import("./FormControls").FormFieldSetControllerProps): import("react").JSX.Element;
112
22
  displayName: string;
113
23
  };
114
24
  Layout: {
115
- ({ schema, ...props }: FormLayoutProps): React.JSX.Element | null;
25
+ ({ schema, ...props }: FormLayoutProps): import("react").JSX.Element | null;
116
26
  displayName: string;
117
27
  };
118
28
  Label: {
119
- ({ classNames, label, error, readonly, asChild, path, button, onClick, }: FormFieldLabelProps): React.JSX.Element;
29
+ ({ classNames, labelClassName, variant, label, error, readonly, required, standalone, button, onClick, }: import("./FormField").FormFieldLabelProps): import("react").JSX.Element;
30
+ displayName: string;
31
+ };
32
+ Row: {
33
+ <T>({ classNames, children, readonly, presentation, label, description, jsonPath, format, required, standalone, renderStatic, validation, getStatus, getValue, rootRef, }: FormRowProps<T>): import("react").JSX.Element | null;
120
34
  displayName: string;
121
35
  };
122
36
  Actions: {
123
- ({ classNames }: FormActionsProps): React.JSX.Element | null;
37
+ ({ classNames }: FormActionsProps): import("react").JSX.Element | null;
124
38
  displayName: string;
125
39
  };
126
40
  Submit: {
127
- ({ classNames, label, icon, disabled }: FormSubmitProps): React.JSX.Element | null;
41
+ ({ classNames, label, icon, disabled }: FormSubmitProps): import("react").JSX.Element | null;
128
42
  displayName: string;
129
43
  };
130
44
  Error: {
131
- ({ children, classNames }: FormErrorProps): React.JSX.Element | null;
45
+ ({ children, classNames }: import("./FormControls").FormErrorProps): import("react").JSX.Element | null;
132
46
  displayName: string;
133
47
  };
134
48
  };
135
- export { useFormContext, useFormValues, useFormFieldState };
136
- export type { FormRootProps, FormViewportProps, FormContentProps, FormSectionProps, FormFieldSetProps, FormLayoutProps, FormFieldLabelProps, FormActionsProps, FormSubmitProps, };
49
+ export type { FormActionsProps, FormContentProps, FormGroupProps, FormLayoutProps, FormRootProps, FormRowProps, FormSectionProps, FormSubmitProps, FormViewportProps, };
137
50
  //# sourceMappingURL=Form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAElF,OAAO,EAAgC,IAAI,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,eAAe,EAGpB,KAAK,eAAe,EAGrB,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAGpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAkB,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAEL,KAAK,iBAAiB,IAAI,wBAAwB,EACnD,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,eAAe,IAAI,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAKrF,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CACjF,CAAC,SAAS,IAAI,CAAC,SAAS,GACpB,IA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AAgB,EAChB,eAAe,GAChB,CAAC"}
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,cAAc,EAEnB,KAAK,eAAe,EAEpB,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAErB,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,IAAI;IACf,IAAI;;;;IACJ,QAAQ;;;IACR,OAAO;;;IACP,OAAO;;;IACP,KAAK;;;IACL,QAAQ;;;;IACR,MAAM;;;;IACN,KAAK;;;;IACL,GAAG;;;;IACH,OAAO;;;;IACP,MAAM;;;;IACN,KAAK;;;;CACN,CAAC;AAEF,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,CAAC"}
@@ -1,54 +1,20 @@
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, Type } from '@dxos/echo';
5
4
  import { type AnyProperties } from '@dxos/echo/internal';
6
- import { type ExcludeId, type FormRootProps } from './Form';
7
- declare const Organization: Type.Obj<{
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>;
42
- type DefaultStoryProps<T extends AnyProperties> = {
43
- schema?: Schema.Schema<T>;
44
- } & FormRootProps<T>;
5
+ import { Person } from '../../testing';
6
+ import { type ExcludeId } from '../../util';
7
+ import { type FormRootProps } from './Form';
8
+ type StoryArgs<T extends AnyProperties> = FormRootProps<T> & {
9
+ json?: boolean;
10
+ };
45
11
  declare const meta: {
46
12
  title: string;
47
13
  component: {
48
14
  <T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
49
15
  displayName: string;
50
16
  };
51
- render: <T extends AnyProperties = AnyProperties>({ schema, values: valuesProp, ...props }: DefaultStoryProps<T>) => React.JSX.Element;
17
+ render: <T extends AnyProperties = AnyProperties>({ schema, values: valuesProp, json, ...props }: StoryArgs<T>) => React.JSX.Element;
52
18
  decorators: import("@storybook/react").Decorator[];
53
19
  parameters: {
54
20
  layout: string;
@@ -129,66 +95,8 @@ declare const meta: {
129
95
  };
130
96
  };
131
97
  export default meta;
132
- type Story<T extends AnyProperties> = StoryObj<DefaultStoryProps<T>>;
133
- declare const PersonSchema: Schema.Schema<{
134
- readonly name: string;
135
- readonly ignore?: string | undefined;
136
- readonly active?: boolean | undefined;
137
- readonly address?: {
138
- readonly street: string;
139
- readonly city: string;
140
- readonly state: string;
141
- readonly zip: number;
142
- } | undefined;
143
- readonly employer?: import("@dxos/echo/internal").Ref<{
144
- readonly name: string;
145
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
146
- readonly tags?: readonly import("@dxos/echo/internal").Ref<{
147
- readonly label: string;
148
- readonly hue?: string | undefined;
149
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[] | undefined;
150
- readonly status?: "active" | "inactive" | undefined;
151
- readonly notes?: string | undefined;
152
- readonly location?: readonly [number, number, (number | undefined)?] | undefined;
153
- readonly birthday?: string | undefined;
154
- readonly meetingAt?: string | undefined;
155
- readonly reminderAt?: string | undefined;
156
- readonly tasks?: readonly string[] | undefined;
157
- readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
158
- readonly identities?: readonly {
159
- readonly type: string;
160
- readonly value: string;
161
- }[] | undefined;
162
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>, {
163
- readonly name: string;
164
- readonly ignore?: string | undefined;
165
- readonly active?: boolean | undefined;
166
- readonly address?: {
167
- readonly street: string;
168
- readonly city: string;
169
- readonly state: string;
170
- readonly zip: number;
171
- } | undefined;
172
- readonly employer?: import("@dxos/echo/internal").Ref<{
173
- readonly name: string;
174
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
175
- readonly tags?: readonly import("@dxos/echo/internal").Ref<{
176
- readonly label: string;
177
- readonly hue?: string | undefined;
178
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[] | undefined;
179
- readonly status?: "active" | "inactive" | undefined;
180
- readonly notes?: string | undefined;
181
- readonly location?: readonly [number, number, (number | undefined)?] | undefined;
182
- readonly birthday?: string | undefined;
183
- readonly meetingAt?: string | undefined;
184
- readonly reminderAt?: string | undefined;
185
- readonly tasks?: readonly string[] | undefined;
186
- readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
187
- readonly identities?: readonly {
188
- readonly type: string;
189
- readonly value: string;
190
- }[] | undefined;
191
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>, never>;
98
+ declare const PersonSchema: Schema.Schema<Person & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>, Person & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>, never>;
99
+ type Story<T extends AnyProperties> = StoryObj<StoryArgs<T>>;
192
100
  /**
193
101
  * Build a data-entry surface by handing an Effect schema to `Form.Root` — the form derives its fields,
194
102
  * types, validation, and selects from the schema, so you don't hand-wire one control per property.
@@ -205,5 +113,44 @@ declare const PersonSchema: Schema.Schema<{
205
113
  export declare const Default: Story<ExcludeId<typeof PersonSchema>>;
206
114
  export declare const Readonly: Story<ExcludeId<typeof PersonSchema>>;
207
115
  export declare const Static: Story<ExcludeId<typeof PersonSchema>>;
116
+ declare const SettingsSchema: Schema.mutable<Schema.Struct<{
117
+ viewMode: Schema.Literal<["preview", "readonly", "source"]>;
118
+ toolbar: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
119
+ fontSize: Schema.optional<Schema.SchemaClass<number, number, never>>;
120
+ }>>;
121
+ export declare const Variants: Story<Schema.Schema.Type<typeof SettingsSchema>>;
122
+ /**
123
+ * Exercises a `Ref<Text>` field carrying both `Format.TypeFormat.Markdown` and
124
+ * `FormInlineAnnotation` — the markdown editor should render inline rather than
125
+ * opening a ref picker or nested struct form.
126
+ */
127
+ export declare const InlineMarkdownText: Story<any>;
208
128
  export declare const Empty: Story<ExcludeId<typeof PersonSchema>>;
129
+ declare const DynamicFieldsSchema: Schema.mutable<Schema.Struct<{
130
+ query: Schema.SchemaClass<string, string, never>;
131
+ url: Schema.refine<string, typeof Schema.String>;
132
+ choice: Schema.optional<Schema.SchemaClass<string, string, never>>;
133
+ tag: Schema.optional<Schema.SchemaClass<string, string, never>>;
134
+ name: Schema.optional<Schema.SchemaClass<string, string, never>>;
135
+ }>>;
136
+ /**
137
+ * Exercises the dynamic-field annotations: `OptionsLookupAnnotation` (select options loaded from a
138
+ * sibling) and `AutofillAnnotation` (value derived from a sibling, gated on validity and delayed). Each
139
+ * runs a self-contained Effect from the current form values.
140
+ */
141
+ export declare const DynamicFields: Story<Schema.Schema.Type<typeof DynamicFieldsSchema>>;
142
+ declare const CreateFeedSchema: Schema.Union<[Schema.Struct<{
143
+ type: Schema.Literal<["standard-site"]>;
144
+ handle: Schema.SchemaClass<string, string, never>;
145
+ publication: Schema.SchemaClass<string, string, never>;
146
+ }>, Schema.Struct<{
147
+ type: Schema.Literal<["rss"]>;
148
+ url: Schema.refine<string, typeof Schema.String>;
149
+ name: Schema.optional<Schema.SchemaClass<string, string, never>>;
150
+ }>]>;
151
+ /**
152
+ * A discriminated-union create form: selecting `type` reveals that member's fields (combobox + select for
153
+ * `standard-site`, URL + autofill for `rss`). Mirrors the magazine create-feed schema.
154
+ */
155
+ export declare const DiscriminatedUnion: Story<Schema.Schema.Type<typeof CreateFeedSchema>>;
209
156
  //# sourceMappingURL=Form.stories.d.ts.map
@@ -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,EAA2B,GAAG,EAAY,IAAI,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUzD,OAAO,EAAE,KAAK,SA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CAMxD,CAAC;AAEF,QAAA,MAAM,cAAc;;;;GAgBnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAgBrE,CAAC;AAoCF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,GAAG,CAKzC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAEvD,CAAC;AAqBF,QAAA,MAAM,mBAAmB;;;;;;GAgDxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAK/E,CAAC;AAkEF,QAAA,MAAM,gBAAgB;;;;;;;;IAA8C,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAKjF,CAAC"}
@@ -0,0 +1,252 @@
1
+ import { type VariantProps } from '@dxos/ui-theme';
2
+ /** Visual variants for {@link Form}. `settings` is the bordered two-column settings-panel look. */
3
+ export type FormVariant = NonNullable<VariantProps<typeof formStyles>['variant']>;
4
+ /** Non-className behavior flags, keyed by {@link FormVariant}. */
5
+ export type FormBehavior = {
6
+ showDescription: boolean;
7
+ };
8
+ declare const formStyles: import("tailwind-variants").TVReturnType<{
9
+ variant: {
10
+ default: {};
11
+ settings: {
12
+ content: string;
13
+ section: string;
14
+ sectionHeader: string;
15
+ sectionTitle: string;
16
+ sectionDescription: string;
17
+ fieldSet: string;
18
+ field: string;
19
+ fieldLabel: string;
20
+ fieldLabelText: string;
21
+ fieldDescription: string;
22
+ fieldControl: string;
23
+ fieldValidation: string;
24
+ };
25
+ };
26
+ }, {
27
+ viewport: string;
28
+ content: string;
29
+ section: string;
30
+ group: string;
31
+ sectionHeader: string;
32
+ sectionTitle: string;
33
+ sectionDescription: string;
34
+ fieldSet: string;
35
+ field: string;
36
+ fieldLabel: string;
37
+ fieldLabelText: string;
38
+ fieldDescription: string;
39
+ fieldControl: string;
40
+ fieldValidation: string;
41
+ actions: string;
42
+ submit: string;
43
+ fieldSetBody: string;
44
+ fieldSetBox: string;
45
+ fieldSetBoxOuter: string;
46
+ }, undefined, {
47
+ variant: {
48
+ default: {};
49
+ settings: {
50
+ content: string;
51
+ section: string;
52
+ sectionHeader: string;
53
+ sectionTitle: string;
54
+ sectionDescription: string;
55
+ fieldSet: string;
56
+ field: string;
57
+ fieldLabel: string;
58
+ fieldLabelText: string;
59
+ fieldDescription: string;
60
+ fieldControl: string;
61
+ fieldValidation: string;
62
+ };
63
+ };
64
+ }, {
65
+ viewport: string;
66
+ content: string;
67
+ section: string;
68
+ group: string;
69
+ sectionHeader: string;
70
+ sectionTitle: string;
71
+ sectionDescription: string;
72
+ fieldSet: string;
73
+ field: string;
74
+ fieldLabel: string;
75
+ fieldLabelText: string;
76
+ fieldDescription: string;
77
+ fieldControl: string;
78
+ fieldValidation: string;
79
+ actions: string;
80
+ submit: string;
81
+ fieldSetBody: string;
82
+ fieldSetBox: string;
83
+ fieldSetBoxOuter: string;
84
+ }, import("tailwind-variants").TVReturnType<{
85
+ variant: {
86
+ default: {};
87
+ settings: {
88
+ content: string;
89
+ section: string;
90
+ sectionHeader: string;
91
+ sectionTitle: string;
92
+ sectionDescription: string;
93
+ fieldSet: string;
94
+ field: string;
95
+ fieldLabel: string;
96
+ fieldLabelText: string;
97
+ fieldDescription: string;
98
+ fieldControl: string;
99
+ fieldValidation: string;
100
+ };
101
+ };
102
+ }, {
103
+ viewport: string;
104
+ content: string;
105
+ section: string;
106
+ group: string;
107
+ sectionHeader: string;
108
+ sectionTitle: string;
109
+ sectionDescription: string;
110
+ fieldSet: string;
111
+ field: string;
112
+ fieldLabel: string;
113
+ fieldLabelText: string;
114
+ fieldDescription: string;
115
+ fieldControl: string;
116
+ fieldValidation: string;
117
+ actions: string;
118
+ submit: string;
119
+ fieldSetBody: string;
120
+ fieldSetBox: string;
121
+ fieldSetBoxOuter: string;
122
+ }, undefined, unknown, unknown, undefined>>;
123
+ /** {@link Form} theme template: a tailwind-variants recipe (`styles`) plus non-class `behavior`. */
124
+ export declare const formTheme: {
125
+ styles: import("tailwind-variants").TVReturnType<{
126
+ variant: {
127
+ default: {};
128
+ settings: {
129
+ content: string;
130
+ section: string;
131
+ sectionHeader: string;
132
+ sectionTitle: string;
133
+ sectionDescription: string;
134
+ fieldSet: string;
135
+ field: string;
136
+ fieldLabel: string;
137
+ fieldLabelText: string;
138
+ fieldDescription: string;
139
+ fieldControl: string;
140
+ fieldValidation: string;
141
+ };
142
+ };
143
+ }, {
144
+ viewport: string;
145
+ content: string;
146
+ section: string;
147
+ group: string;
148
+ sectionHeader: string;
149
+ sectionTitle: string;
150
+ sectionDescription: string;
151
+ fieldSet: string;
152
+ field: string;
153
+ fieldLabel: string;
154
+ fieldLabelText: string;
155
+ fieldDescription: string;
156
+ fieldControl: string;
157
+ fieldValidation: string;
158
+ actions: string;
159
+ submit: string;
160
+ fieldSetBody: string;
161
+ fieldSetBox: string;
162
+ fieldSetBoxOuter: string;
163
+ }, undefined, {
164
+ variant: {
165
+ default: {};
166
+ settings: {
167
+ content: string;
168
+ section: string;
169
+ sectionHeader: string;
170
+ sectionTitle: string;
171
+ sectionDescription: string;
172
+ fieldSet: string;
173
+ field: string;
174
+ fieldLabel: string;
175
+ fieldLabelText: string;
176
+ fieldDescription: string;
177
+ fieldControl: string;
178
+ fieldValidation: string;
179
+ };
180
+ };
181
+ }, {
182
+ viewport: string;
183
+ content: string;
184
+ section: string;
185
+ group: string;
186
+ sectionHeader: string;
187
+ sectionTitle: string;
188
+ sectionDescription: string;
189
+ fieldSet: string;
190
+ field: string;
191
+ fieldLabel: string;
192
+ fieldLabelText: string;
193
+ fieldDescription: string;
194
+ fieldControl: string;
195
+ fieldValidation: string;
196
+ actions: string;
197
+ submit: string;
198
+ fieldSetBody: string;
199
+ fieldSetBox: string;
200
+ fieldSetBoxOuter: string;
201
+ }, import("tailwind-variants").TVReturnType<{
202
+ variant: {
203
+ default: {};
204
+ settings: {
205
+ content: string;
206
+ section: string;
207
+ sectionHeader: string;
208
+ sectionTitle: string;
209
+ sectionDescription: string;
210
+ fieldSet: string;
211
+ field: string;
212
+ fieldLabel: string;
213
+ fieldLabelText: string;
214
+ fieldDescription: string;
215
+ fieldControl: string;
216
+ fieldValidation: string;
217
+ };
218
+ };
219
+ }, {
220
+ viewport: string;
221
+ content: string;
222
+ section: string;
223
+ group: string;
224
+ sectionHeader: string;
225
+ sectionTitle: string;
226
+ sectionDescription: string;
227
+ fieldSet: string;
228
+ field: string;
229
+ fieldLabel: string;
230
+ fieldLabelText: string;
231
+ fieldDescription: string;
232
+ fieldControl: string;
233
+ fieldValidation: string;
234
+ actions: string;
235
+ submit: string;
236
+ fieldSetBody: string;
237
+ fieldSetBox: string;
238
+ fieldSetBoxOuter: string;
239
+ }, undefined, unknown, unknown, undefined>>;
240
+ behavior: {
241
+ default: {
242
+ showDescription: false;
243
+ };
244
+ settings: {
245
+ showDescription: true;
246
+ };
247
+ };
248
+ };
249
+ /** Slot names of {@link formTheme.styles}, for `bridgeTv` registration. */
250
+ export declare const formSlots: Array<keyof ReturnType<typeof formTheme.styles>>;
251
+ export {};
252
+ //# sourceMappingURL=Form.theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.theme.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,gBAAgB,CAAC;AAE3D,mGAAmG;AACnG,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAElF,kEAAkE;AAClE,MAAM,MAAM,YAAY,GAAG;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC;AAExD,QAAA,MAAM,UAAU;;QA4BV,OAAO;QACP,QAAQ;YACN,OAAO;YAGP,OAAO;YACP,aAAa;YACb,YAAY;YACZ,kBAAkB;YAElB,QAAQ;YACR,KAAK;YAML,UAAU;YACV,cAAc;YACd,gBAAgB;YAChB,YAAY;YACZ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAOrB,CAAC;AAEH,oGAAoG;AACpG,eAAO,MAAM,SAAS;;;YA/BhB,OAAO;YACP,QAAQ;gBACN,OAAO;gBAGP,OAAO;gBACP,aAAa;gBACb,YAAY;gBACZ,kBAAkB;gBAElB,QAAQ;gBACR,KAAK;gBAML,UAAU;gBACV,cAAc;gBACd,gBAAgB;gBAChB,YAAY;gBACZ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBtB,CAAC;AAEF,2EAA2E;AAE3E,eAAO,MAAM,SAAS,EAAsC,KAAK,CAAC,MAAM,UAAU,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Form.theme.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.theme.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.theme.test.ts"],"names":[],"mappings":""}