@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
@@ -0,0 +1,75 @@
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 Merge } from '@dxos/util';
5
+ import { type FormContextValue, type FormHandlerProps, type FormUpdateMeta } from '../../hooks';
6
+ import { type FormFieldSetProps as NaturalFormFieldSetProps } from './FormFieldSet';
7
+ import { type FormLayoutProps as NaturalFormLayoutProps } from './FormLayout';
8
+ export type FormRootProps<T extends AnyProperties = AnyProperties> = Merge<PropsWithChildren<{
9
+ /**
10
+ * Called when the form is submitted and passes validation.
11
+ */
12
+ onSave?: (values: T, meta: FormUpdateMeta<T>) => void;
13
+ /**
14
+ * Called when the form is canceled to abandon/undo any pending changes.
15
+ */
16
+ onCancel?: () => void;
17
+ }>, Omit<FormContextValue<T>, 'form'>, Pick<FormHandlerProps<T>, 'schema' | 'autoSave' | 'values' | 'defaultValues' | 'onValidate' | 'onValuesChanged'>, Omit<NaturalFormFieldSetProps<T>, 'schema' | 'path'>>;
18
+ export declare function FormRoot<T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
19
+ export declare namespace FormRoot {
20
+ var displayName: string;
21
+ }
22
+ export type FormViewportProps = {
23
+ scroll?: boolean;
24
+ gutter?: ColumnRootProps['gutter'];
25
+ };
26
+ export declare const FormViewport: React.ForwardRefExoticComponent<Omit<FormViewportProps, "className"> & {
27
+ classNames?: import("@dxos/ui-types").ClassNameValue;
28
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
29
+ export type FormContentProps = ThemedClassName<PropsWithChildren<{}>>;
30
+ export declare const FormContent: React.ForwardRefExoticComponent<Omit<FormContentProps, "className"> & {
31
+ classNames?: import("@dxos/ui-types").ClassNameValue;
32
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
33
+ export type FormFieldSetControllerProps = ThemedClassName<NaturalFormFieldSetProps<any>>;
34
+ export declare function FormFieldSetController({ classNames, ...props }: FormFieldSetControllerProps): React.JSX.Element;
35
+ export declare namespace FormFieldSetController {
36
+ var displayName: string;
37
+ }
38
+ export type FormLayoutProps = Omit<NaturalFormLayoutProps, 'schema'> & {
39
+ schema?: NaturalFormLayoutProps['schema'];
40
+ };
41
+ export declare function FormLayoutController({ schema, ...props }: FormLayoutProps): React.JSX.Element | null;
42
+ export declare namespace FormLayoutController {
43
+ var displayName: string;
44
+ }
45
+ export type FormActionsProps = ThemedClassName<{}>;
46
+ export declare function FormActions({ classNames }: FormActionsProps): React.JSX.Element | null;
47
+ export declare namespace FormActions {
48
+ var displayName: string;
49
+ }
50
+ export type FormSectionProps = ThemedClassName<{
51
+ title?: string;
52
+ description?: string;
53
+ }>;
54
+ export declare const FormSection: React.ForwardRefExoticComponent<Omit<FormSectionProps, "className"> & {
55
+ classNames?: import("@dxos/ui-types").ClassNameValue;
56
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
57
+ export type FormGroupProps = ThemedClassName<PropsWithChildren>;
58
+ /**
59
+ * A bordered card grouping related rows/controls (e.g. an entity card in a list).
60
+ * Layout-only and context-free — unlike `Form.FieldSet` it is not schema-driven.
61
+ */
62
+ export declare const FormGroup: React.ForwardRefExoticComponent<Omit<FormGroupProps, "className"> & {
63
+ classNames?: import("@dxos/ui-types").ClassNameValue;
64
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
65
+ export type FormSubmitProps = ThemedClassName<Partial<Pick<IconButtonProps, 'icon' | 'label' | 'disabled'>>>;
66
+ export declare function FormSubmit({ classNames, label, icon, disabled }: FormSubmitProps): React.JSX.Element | null;
67
+ export declare namespace FormSubmit {
68
+ var displayName: string;
69
+ }
70
+ export type FormErrorProps = ThemedClassName<PropsWithChildren>;
71
+ export declare function FormError({ children, classNames }: FormErrorProps): React.JSX.Element | null;
72
+ export declare namespace FormError {
73
+ var displayName: string;
74
+ }
75
+ //# sourceMappingURL=FormControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormControls.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,44 @@
1
+ import * as SchemaAST from 'effect/SchemaAST';
2
+ import React from 'react';
3
+ import { IconButtonProps } from '@dxos/react-ui';
4
+ import { type FieldContext } 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
+ * Explicit label, overriding the `title ?? capitalize(name)` derivation. Used by `ArrayField` to
21
+ * give scalar/ref items the array's resolved title (e.g. `Tags`) rather than re-capitalizing the
22
+ * raw array property name (e.g. `_tags`), since the element type carries no title of its own.
23
+ */
24
+ label?: string;
25
+ /**
26
+ * Path to the current object from the root. Used with nested forms.
27
+ */
28
+ path?: (string | number)[];
29
+ autoFocus?: boolean;
30
+ /** Whether the field is required (non-optional in the schema). Drives the label asterisk. */
31
+ required?: boolean;
32
+ /**
33
+ * Force a `Ref` field to render its target inline (a nested form) instead of the picker.
34
+ * Set by `ArrayField` for owned-ref arrays (`FormCreateAnnotation`); equivalent to
35
+ * `FormInlineAnnotation` but driven by the parent array rather than the element's own AST.
36
+ */
37
+ refInline?: boolean;
38
+ } & FieldContext;
39
+ export declare function FormField(props: FormFieldProps): React.JSX.Element | null;
40
+ export declare namespace FormField {
41
+ var displayName: string;
42
+ }
43
+ export declare const CompactIconButton: (props: IconButtonProps) => React.JSX.Element;
44
+ //# 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,EAAc,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAG7E,OAAO,EAAE,KAAK,YAAY,EAAuD,MAAM,QAAQ,CAAC;AAwBhG,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;IAEpB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,YAAY,CAAC;kCAES,KAAK,EAAE,cAAc;;;;AA0O/C,eAAO,MAAM,iBAAiB,UAAW,eAAe,sBAEvD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export type FormFieldHeaderProps = {
3
+ label: string;
4
+ /** JSON path forwarded to the label as field metadata. */
5
+ path?: string;
6
+ required?: boolean;
7
+ readonly?: boolean;
8
+ classNames?: string;
9
+ /** Trailing inline add affordance; omit to hide it. */
10
+ add?: {
11
+ icon?: string;
12
+ label: string;
13
+ disabled?: boolean;
14
+ onClick: () => void;
15
+ };
16
+ /** Extra trailing controls placed after the add affordance (e.g. a collapse toggle). */
17
+ actions?: ReactNode;
18
+ /** Header row click (e.g. toggle collapse). The add affordance stops propagation so it doesn't trigger this. */
19
+ onClick?: () => void;
20
+ };
21
+ /**
22
+ * Header row for a labelled group or list: a label with optional trailing controls (an inline add
23
+ * affordance and/or arbitrary `actions`). Shared by array/list fields ({@link ArrayField}, the view
24
+ * editor) and {@link FormFieldSetContainer}'s collapse header, so all group/list headers render identically.
25
+ */
26
+ export declare const FormFieldHeader: ({ label, path, required, readonly, classNames, add, actions, onClick, }: FormFieldHeaderProps) => React.JSX.Element;
27
+ //# sourceMappingURL=FormFieldHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFieldHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FormFieldHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK9C,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,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;IAChF,wFAAwF;IACxF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gHAAgH;IAChH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,4EASzB,oBAAoB,sBA6BtB,CAAC"}
@@ -0,0 +1,85 @@
1
+ import React, { Component, type PropsWithChildren, type ReactNode, type Ref } from 'react';
2
+ import { type ThemedClassName } from '@dxos/react-ui';
3
+ import { type FormFieldRendererProps } from '#types';
4
+ import { type FormVariant } from '../Form.theme';
5
+ import { type FormFieldPresentation } from './presentation';
6
+ export type FormFieldLabelProps = ThemedClassName<{
7
+ /** Render a plain `<span>` instead of an input-associated `Input.Label`, for labels used outside an `Input.Root` (e.g. section/group headers). */
8
+ standalone?: boolean;
9
+ /** Class applied to the inner label text node, overriding the default size/color (e.g. `text-lg`). */
10
+ labelClassName?: string;
11
+ /** Form variant; selects the label's chrome (e.g. `settings` enlarges the text and places it in the field grid). */
12
+ variant?: FormVariant;
13
+ error?: string;
14
+ /**
15
+ * JSON path of the field this label describes (e.g. `runtime.client.storage.persistent`).
16
+ * Field metadata; accepted by callers but not currently rendered.
17
+ */
18
+ path?: string;
19
+ /**
20
+ * Trailing button rendered at the end of the label row (third grid column).
21
+ * Used by nested-object field sets to surface a collapse toggle.
22
+ */
23
+ button?: ReactNode;
24
+ onClick?: () => void;
25
+ } & Pick<FormFieldRendererProps, 'label' | 'readonly' | 'required'>>;
26
+ export declare function FormFieldLabel({ classNames, labelClassName, variant, label, error, readonly, required, standalone, button, onClick }: FormFieldLabelProps): React.JSX.Element;
27
+ export declare namespace FormFieldLabel {
28
+ var displayName: string;
29
+ }
30
+ export type FormRowProps<T = any> = ThemedClassName<Pick<FormFieldRendererProps<T>, 'readonly' | 'label' | 'description' | 'presentation' | 'required'> & Partial<Pick<FormFieldRendererProps<T>, 'getStatus' | 'getValue' | 'jsonPath' | 'format'>> & {
31
+ /**
32
+ * Ref to the row's outer element. Enables measurement/positioning (e.g. a future virtualized
33
+ * field set) without forwarding through the generic component.
34
+ */
35
+ rootRef?: Ref<HTMLDivElement>;
36
+ /**
37
+ * Render the label as a standalone `<span>` (group/multi-input fields with no single associated control).
38
+ */
39
+ standalone?: boolean;
40
+ /**
41
+ * Override the read-only/`static` rendering of the value. Fields whose value is not plain text
42
+ * (refs, selects, markdown) supply this; the default formats scalars/dates via `formatStaticValue`.
43
+ * Return `null` to render nothing (e.g. an empty/unresolved value).
44
+ */
45
+ renderStatic?: (value: T | undefined) => ReactNode;
46
+ /**
47
+ * Validation/error content rendered in the validation slot. Supplied directly in action mode; in
48
+ * field mode it is derived from `getStatus`.
49
+ */
50
+ validation?: ReactNode;
51
+ /**
52
+ * The control. A render-prop binds to the form value (field mode: `Input.Root` validation, static
53
+ * rendering, value via `getValue`). Plain nodes render an arbitrary control with no value wiring
54
+ * (action mode, e.g. a button) — the labeled-card escape hatch for an arbitrary control.
55
+ *
56
+ * `value` is `T | undefined` because `getValue()` returns no value when the field is unset (optional
57
+ * schema properties, freshly-added array items); renderers default it (e.g. `{ value = '' }`).
58
+ */
59
+ children?: ReactNode | ((props: {
60
+ value: T | undefined;
61
+ presentation: FormFieldPresentation;
62
+ }) => ReactNode);
63
+ }>;
64
+ export declare function FormRow<T>({ classNames, children, readonly, presentation, label, description, jsonPath, format, required, standalone, renderStatic, validation, getStatus, getValue, rootRef }: FormRowProps<T>): React.JSX.Element | null;
65
+ export declare namespace FormRow {
66
+ var displayName: string;
67
+ }
68
+ type FormFieldErrorState = {
69
+ error: Error | undefined;
70
+ };
71
+ type FormFieldErrorBoundaryProps = PropsWithChildren<{
72
+ path?: (string | number)[];
73
+ }>;
74
+ export declare class FormFieldErrorBoundary extends Component<FormFieldErrorBoundaryProps, FormFieldErrorState> {
75
+ static getDerivedStateFromError(error: Error): {
76
+ error: Error;
77
+ };
78
+ state: {
79
+ error: undefined;
80
+ };
81
+ componentDidUpdate(prevProps: FormFieldErrorBoundaryProps): void;
82
+ 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;
83
+ private resetError;
84
+ }
85
+ //# sourceMappingURL=FormRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FormRow.tsx"],"names":[],"mappings":"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"}
@@ -1,9 +1,12 @@
1
1
  import { type Meta, type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- import { type FormFieldComponentProps } from './FormFieldComponent';
4
- declare const DefaultStory: ({ type, placeholder, readonly, onBlur, onValueChange, ...props }: FormFieldComponentProps<string>) => React.JSX.Element;
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=FormFieldComponent.stories.d.ts.map
9
+ export declare const Compact: Story;
10
+ export declare const Inline: Story;
11
+ export declare const Static: Story;
12
+ //# sourceMappingURL=FormRow.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormRow.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormField/FormRow.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;AASnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import * as SchemaAST from 'effect/SchemaAST';
2
2
  import React from 'react';
3
- import { type FormFieldProps } from '../FormField';
4
- import { type FormFieldStateProps } from '../FormFieldComponent';
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;AAanE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAIlD,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAoBpF,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;;;;AA2OlB;;;GAGG;AAEH,eAAO,MAAM,eAAe,SAAU,SAAS,CAAC,GAAG,KAAG,GA+BrD,CAAC"}
@@ -0,0 +1,88 @@
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
+ export declare const Simple: Story;
88
+ //# sourceMappingURL=ArrayField.stories.d.ts.map
@@ -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;AA2FjE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO2B,CAAC;eAEvB,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;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ArrayField';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,12 @@
1
+ import React from 'react';
2
+ import { type FormFieldRendererProps } from '#types';
3
+ import { type OptionsLookup } from '../../../../../annotations';
4
+ export type AsyncSelectFieldProps = FormFieldRendererProps<string> & {
5
+ /** Loads the selectable options from the lookup's declared dependency fields. */
6
+ lookup: OptionsLookup;
7
+ };
8
+ export declare function AsyncSelectField({ lookup, ...fieldProps }: AsyncSelectFieldProps): React.JSX.Element;
9
+ export declare namespace AsyncSelectField {
10
+ var displayName: string;
11
+ }
12
+ //# sourceMappingURL=AsyncSelectField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncSelectField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,EAAE,KAAK,aAAa,EAA2B,MAAM,4BAA4B,CAAC;AAIzF,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC,MAAM,CAAC,GAAG;IACnE,iFAAiF;IACjF,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;yCAO+B,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,EAAE,qBAAqB"}
@@ -0,0 +1,2 @@
1
+ export * from './AsyncSelectField';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/AsyncSelectField/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { type FormFieldRendererProps } from '#types';
3
+ import { type Autofill } from '../../../../../annotations';
4
+ export type AutofillFieldProps = FormFieldRendererProps<string> & {
5
+ /** Derives this field's value from the autofill's declared dependency fields (e.g. a sibling URL). */
6
+ autofill: Autofill;
7
+ };
8
+ export declare function AutofillField({ autofill, ...fieldProps }: AutofillFieldProps): React.JSX.Element;
9
+ export declare namespace AutofillField {
10
+ var displayName: string;
11
+ }
12
+ //# sourceMappingURL=AutofillField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutofillField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/AutofillField/AutofillField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAI3D,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,MAAM,CAAC,GAAG;IAChE,sGAAsG;IACtG,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;sCAQ4B,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAAE,kBAAkB"}
@@ -0,0 +1,2 @@
1
+ export * from './AutofillField';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/AutofillField/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type FormFieldRendererProps } from '#types';
3
+ export declare const BooleanField: ({ type, readonly, onValueChange, ...props }: FormFieldRendererProps<boolean>) => React.JSX.Element;
4
+ //# sourceMappingURL=BooleanField.d.ts.map
@@ -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,sBAexG,CAAC"}
@@ -85,5 +85,4 @@ declare const meta: {
85
85
  export default meta;
86
86
  type Story = StoryObj<typeof meta>;
87
87
  export declare const Default: Story;
88
- export declare const FieldSet: Story;
89
- //# sourceMappingURL=Settings.stories.d.ts.map
88
+ //# sourceMappingURL=BooleanField.stories.d.ts.map
@@ -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,2 @@
1
+ export * from './BooleanField';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,12 @@
1
+ import React from 'react';
2
+ import { type FormFieldRendererProps } from '#types';
3
+ import { type OptionsLookup } from '../../../../../annotations';
4
+ export type ComboboxFieldProps = FormFieldRendererProps<string> & {
5
+ /** Loads suggestions from the lookup's declared dependency fields (typically the field's own value). */
6
+ lookup: OptionsLookup;
7
+ };
8
+ export declare function ComboboxField({ lookup, type, readonly, placeholder, onValueChange, ...props }: ComboboxFieldProps): React.JSX.Element;
9
+ export declare namespace ComboboxField {
10
+ var displayName: string;
11
+ }
12
+ //# sourceMappingURL=ComboboxField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComboboxField.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/ComboboxField/ComboboxField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAK9D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,EAAE,KAAK,aAAa,EAA2B,MAAM,4BAA4B,CAAC;AAIzF,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,MAAM,CAAC,GAAG;IAChE,wGAAwG;IACxG,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;sCAS4B,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB"}
@@ -0,0 +1,2 @@
1
+ export * from './ComboboxField';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Form/FormField/fields/ComboboxField/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type FormFieldRendererProps } from '#types';
3
+ export declare const 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"}
@@ -0,0 +1,2 @@
1
+ export * from './DateField';
2
+ //# sourceMappingURL=index.d.ts.map