@wordpress/dataviews 11.3.1-next.v.0 → 12.0.0

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 (444) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/README.md +44 -2
  3. package/build/components/dataform-controls/adaptive-select.cjs +52 -0
  4. package/build/components/dataform-controls/adaptive-select.cjs.map +7 -0
  5. package/build/components/dataform-controls/array.cjs +2 -0
  6. package/build/components/dataform-controls/array.cjs.map +2 -2
  7. package/build/components/dataform-controls/checkbox.cjs +2 -0
  8. package/build/components/dataform-controls/checkbox.cjs.map +2 -2
  9. package/build/components/dataform-controls/color.cjs +21 -30
  10. package/build/components/dataform-controls/color.cjs.map +3 -3
  11. package/build/components/dataform-controls/combobox.cjs +80 -0
  12. package/build/components/dataform-controls/combobox.cjs.map +7 -0
  13. package/build/components/dataform-controls/date.cjs +58 -19
  14. package/build/components/dataform-controls/date.cjs.map +2 -2
  15. package/build/components/dataform-controls/datetime.cjs +11 -3
  16. package/build/components/dataform-controls/datetime.cjs.map +2 -2
  17. package/build/components/dataform-controls/email.cjs +2 -0
  18. package/build/components/dataform-controls/email.cjs.map +2 -2
  19. package/build/components/dataform-controls/index.cjs +5 -1
  20. package/build/components/dataform-controls/index.cjs.map +3 -3
  21. package/build/components/dataform-controls/password.cjs +2 -0
  22. package/build/components/dataform-controls/password.cjs.map +2 -2
  23. package/build/components/dataform-controls/radio.cjs +2 -0
  24. package/build/components/dataform-controls/radio.cjs.map +2 -2
  25. package/build/components/dataform-controls/select.cjs +2 -0
  26. package/build/components/dataform-controls/select.cjs.map +2 -2
  27. package/build/components/dataform-controls/telephone.cjs +2 -0
  28. package/build/components/dataform-controls/telephone.cjs.map +2 -2
  29. package/build/components/dataform-controls/text.cjs +2 -0
  30. package/build/components/dataform-controls/text.cjs.map +2 -2
  31. package/build/components/dataform-controls/textarea.cjs +2 -0
  32. package/build/components/dataform-controls/textarea.cjs.map +2 -2
  33. package/build/components/dataform-controls/toggle-group.cjs +2 -0
  34. package/build/components/dataform-controls/toggle-group.cjs.map +2 -2
  35. package/build/components/dataform-controls/toggle.cjs +2 -0
  36. package/build/components/dataform-controls/toggle.cjs.map +2 -2
  37. package/build/components/dataform-controls/url.cjs +2 -0
  38. package/build/components/dataform-controls/url.cjs.map +2 -2
  39. package/build/components/dataform-controls/utils/relative-date-control.cjs +1 -1
  40. package/build/components/dataform-controls/utils/relative-date-control.cjs.map +1 -1
  41. package/build/components/dataform-controls/utils/validated-input.cjs +2 -0
  42. package/build/components/dataform-controls/utils/validated-input.cjs.map +2 -2
  43. package/build/components/dataform-controls/utils/validated-number.cjs +2 -0
  44. package/build/components/dataform-controls/utils/validated-number.cjs.map +2 -2
  45. package/build/components/dataform-layouts/card/index.cjs +28 -3
  46. package/build/components/dataform-layouts/card/index.cjs.map +3 -3
  47. package/build/components/dataform-layouts/data-form-layout.cjs +11 -2
  48. package/build/components/dataform-layouts/data-form-layout.cjs.map +2 -2
  49. package/build/components/dataform-layouts/details/index.cjs +69 -12
  50. package/build/components/dataform-layouts/details/index.cjs.map +3 -3
  51. package/build/components/dataform-layouts/index.cjs +5 -5
  52. package/build/components/dataform-layouts/index.cjs.map +1 -1
  53. package/build/components/dataform-layouts/normalize-form.cjs +2 -1
  54. package/build/components/dataform-layouts/normalize-form.cjs.map +2 -2
  55. package/build/components/dataform-layouts/panel/dropdown.cjs +88 -63
  56. package/build/components/dataform-layouts/panel/dropdown.cjs.map +3 -3
  57. package/build/components/dataform-layouts/panel/index.cjs +13 -175
  58. package/build/components/dataform-layouts/panel/index.cjs.map +3 -3
  59. package/build/components/dataform-layouts/panel/modal.cjs +28 -18
  60. package/build/components/dataform-layouts/panel/modal.cjs.map +3 -3
  61. package/build/components/dataform-layouts/panel/summary-button.cjs +125 -56
  62. package/build/components/dataform-layouts/panel/summary-button.cjs.map +3 -3
  63. package/build/components/dataform-layouts/panel/utils/get-first-validation-error.cjs +59 -0
  64. package/build/components/dataform-layouts/panel/utils/get-first-validation-error.cjs.map +7 -0
  65. package/build/components/dataform-layouts/panel/utils/get-label-classname.cjs +45 -0
  66. package/build/components/dataform-layouts/panel/utils/get-label-classname.cjs.map +7 -0
  67. package/build/components/dataform-layouts/panel/utils/get-label-content.cjs +36 -0
  68. package/build/components/dataform-layouts/panel/utils/get-label-content.cjs.map +7 -0
  69. package/build/components/dataform-layouts/panel/utils/use-field-from-form-field.cjs +77 -0
  70. package/build/components/dataform-layouts/panel/utils/use-field-from-form-field.cjs.map +7 -0
  71. package/build/components/dataform-layouts/regular/index.cjs +6 -3
  72. package/build/components/dataform-layouts/regular/index.cjs.map +2 -2
  73. package/build/components/dataform-layouts/row/index.cjs +5 -2
  74. package/build/components/dataform-layouts/row/index.cjs.map +2 -2
  75. package/build/components/dataform-layouts/validation-badge.cjs +67 -0
  76. package/build/components/dataform-layouts/validation-badge.cjs.map +7 -0
  77. package/build/components/dataviews-bulk-actions/index.cjs +4 -4
  78. package/build/components/dataviews-bulk-actions/index.cjs.map +2 -2
  79. package/build/components/dataviews-context/index.cjs.map +2 -2
  80. package/build/components/dataviews-filters/filter.cjs +1 -1
  81. package/build/components/dataviews-filters/filter.cjs.map +1 -1
  82. package/build/components/dataviews-filters/filters.cjs +1 -1
  83. package/build/components/dataviews-filters/filters.cjs.map +1 -1
  84. package/build/components/dataviews-filters/search-widget.cjs +25 -11
  85. package/build/components/dataviews-filters/search-widget.cjs.map +2 -2
  86. package/build/components/dataviews-filters/toggle.cjs.map +1 -1
  87. package/build/components/dataviews-footer/index.cjs +1 -1
  88. package/build/components/dataviews-footer/index.cjs.map +1 -1
  89. package/build/components/dataviews-layouts/activity/activity-item.cjs +4 -4
  90. package/build/components/dataviews-layouts/activity/activity-item.cjs.map +1 -1
  91. package/build/components/dataviews-layouts/activity/index.cjs +1 -1
  92. package/build/components/dataviews-layouts/activity/index.cjs.map +1 -1
  93. package/build/components/dataviews-layouts/grid/composite-grid.cjs +27 -38
  94. package/build/components/dataviews-layouts/grid/composite-grid.cjs.map +2 -2
  95. package/build/components/dataviews-layouts/grid/index.cjs +2 -2
  96. package/build/components/dataviews-layouts/grid/index.cjs.map +1 -1
  97. package/build/components/dataviews-layouts/list/index.cjs +7 -8
  98. package/build/components/dataviews-layouts/list/index.cjs.map +2 -2
  99. package/build/components/dataviews-layouts/picker-grid/index.cjs +5 -5
  100. package/build/components/dataviews-layouts/picker-grid/index.cjs.map +2 -2
  101. package/build/components/dataviews-layouts/picker-table/index.cjs +1 -1
  102. package/build/components/dataviews-layouts/picker-table/index.cjs.map +2 -2
  103. package/build/components/dataviews-layouts/table/column-primary.cjs +1 -1
  104. package/build/components/dataviews-layouts/table/column-primary.cjs.map +1 -1
  105. package/build/components/dataviews-layouts/table/index.cjs +1 -1
  106. package/build/components/dataviews-layouts/table/index.cjs.map +2 -2
  107. package/build/components/dataviews-layouts/utils/item-click-wrapper.cjs.map +2 -2
  108. package/build/components/dataviews-pagination/index.cjs +3 -3
  109. package/build/components/dataviews-pagination/index.cjs.map +2 -2
  110. package/build/components/dataviews-picker-footer/index.cjs +3 -3
  111. package/build/components/dataviews-picker-footer/index.cjs.map +2 -2
  112. package/build/components/dataviews-view-config/index.cjs +74 -57
  113. package/build/components/dataviews-view-config/index.cjs.map +3 -3
  114. package/build/components/dataviews-view-config/properties-section.cjs +1 -1
  115. package/build/components/dataviews-view-config/properties-section.cjs.map +1 -1
  116. package/build/dataviews/index.cjs +7 -5
  117. package/build/dataviews/index.cjs.map +2 -2
  118. package/build/dataviews-picker/index.cjs +3 -3
  119. package/build/dataviews-picker/index.cjs.map +2 -2
  120. package/build/hooks/use-form-validity.cjs +61 -28
  121. package/build/hooks/use-form-validity.cjs.map +2 -2
  122. package/build/hooks/use-report-validity.cjs +39 -0
  123. package/build/hooks/use-report-validity.cjs.map +7 -0
  124. package/build/types/dataform.cjs.map +1 -1
  125. package/build/types/field-api.cjs.map +1 -1
  126. package/build-module/components/dataform-controls/adaptive-select.mjs +21 -0
  127. package/build-module/components/dataform-controls/adaptive-select.mjs.map +7 -0
  128. package/build-module/components/dataform-controls/array.mjs +2 -0
  129. package/build-module/components/dataform-controls/array.mjs.map +2 -2
  130. package/build-module/components/dataform-controls/checkbox.mjs +2 -0
  131. package/build-module/components/dataform-controls/checkbox.mjs.map +2 -2
  132. package/build-module/components/dataform-controls/color.mjs +26 -31
  133. package/build-module/components/dataform-controls/color.mjs.map +2 -2
  134. package/build-module/components/dataform-controls/combobox.mjs +49 -0
  135. package/build-module/components/dataform-controls/combobox.mjs.map +7 -0
  136. package/build-module/components/dataform-controls/date.mjs +58 -19
  137. package/build-module/components/dataform-controls/date.mjs.map +2 -2
  138. package/build-module/components/dataform-controls/datetime.mjs +11 -3
  139. package/build-module/components/dataform-controls/datetime.mjs.map +2 -2
  140. package/build-module/components/dataform-controls/email.mjs +2 -0
  141. package/build-module/components/dataform-controls/email.mjs.map +2 -2
  142. package/build-module/components/dataform-controls/index.mjs +5 -1
  143. package/build-module/components/dataform-controls/index.mjs.map +2 -2
  144. package/build-module/components/dataform-controls/password.mjs +2 -0
  145. package/build-module/components/dataform-controls/password.mjs.map +2 -2
  146. package/build-module/components/dataform-controls/radio.mjs +2 -0
  147. package/build-module/components/dataform-controls/radio.mjs.map +2 -2
  148. package/build-module/components/dataform-controls/select.mjs +2 -0
  149. package/build-module/components/dataform-controls/select.mjs.map +2 -2
  150. package/build-module/components/dataform-controls/telephone.mjs +2 -0
  151. package/build-module/components/dataform-controls/telephone.mjs.map +2 -2
  152. package/build-module/components/dataform-controls/text.mjs +2 -0
  153. package/build-module/components/dataform-controls/text.mjs.map +2 -2
  154. package/build-module/components/dataform-controls/textarea.mjs +2 -0
  155. package/build-module/components/dataform-controls/textarea.mjs.map +2 -2
  156. package/build-module/components/dataform-controls/toggle-group.mjs +2 -0
  157. package/build-module/components/dataform-controls/toggle-group.mjs.map +2 -2
  158. package/build-module/components/dataform-controls/toggle.mjs +2 -0
  159. package/build-module/components/dataform-controls/toggle.mjs.map +2 -2
  160. package/build-module/components/dataform-controls/url.mjs +2 -0
  161. package/build-module/components/dataform-controls/url.mjs.map +2 -2
  162. package/build-module/components/dataform-controls/utils/relative-date-control.mjs +1 -1
  163. package/build-module/components/dataform-controls/utils/relative-date-control.mjs.map +1 -1
  164. package/build-module/components/dataform-controls/utils/validated-input.mjs +2 -0
  165. package/build-module/components/dataform-controls/utils/validated-input.mjs.map +2 -2
  166. package/build-module/components/dataform-controls/utils/validated-number.mjs +2 -0
  167. package/build-module/components/dataform-controls/utils/validated-number.mjs.map +2 -2
  168. package/build-module/components/dataform-layouts/card/index.mjs +29 -3
  169. package/build-module/components/dataform-layouts/card/index.mjs.map +2 -2
  170. package/build-module/components/dataform-layouts/data-form-layout.mjs +12 -3
  171. package/build-module/components/dataform-layouts/data-form-layout.mjs.map +2 -2
  172. package/build-module/components/dataform-layouts/details/index.mjs +77 -13
  173. package/build-module/components/dataform-layouts/details/index.mjs.map +2 -2
  174. package/build-module/components/dataform-layouts/index.mjs +5 -5
  175. package/build-module/components/dataform-layouts/index.mjs.map +1 -1
  176. package/build-module/components/dataform-layouts/normalize-form.mjs +2 -1
  177. package/build-module/components/dataform-layouts/normalize-form.mjs.map +2 -2
  178. package/build-module/components/dataform-layouts/panel/dropdown.mjs +91 -66
  179. package/build-module/components/dataform-layouts/panel/dropdown.mjs.map +2 -2
  180. package/build-module/components/dataform-layouts/panel/index.mjs +14 -176
  181. package/build-module/components/dataform-layouts/panel/index.mjs.map +2 -2
  182. package/build-module/components/dataform-layouts/panel/modal.mjs +30 -20
  183. package/build-module/components/dataform-layouts/panel/modal.mjs.map +2 -2
  184. package/build-module/components/dataform-layouts/panel/summary-button.mjs +117 -58
  185. package/build-module/components/dataform-layouts/panel/summary-button.mjs.map +2 -2
  186. package/build-module/components/dataform-layouts/panel/utils/get-first-validation-error.mjs +38 -0
  187. package/build-module/components/dataform-layouts/panel/utils/get-first-validation-error.mjs.map +7 -0
  188. package/build-module/components/dataform-layouts/panel/utils/get-label-classname.mjs +14 -0
  189. package/build-module/components/dataform-layouts/panel/utils/get-label-classname.mjs.map +7 -0
  190. package/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs +15 -0
  191. package/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs.map +7 -0
  192. package/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs +46 -0
  193. package/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs.map +7 -0
  194. package/build-module/components/dataform-layouts/regular/index.mjs +6 -3
  195. package/build-module/components/dataform-layouts/regular/index.mjs.map +2 -2
  196. package/build-module/components/dataform-layouts/row/index.mjs +5 -2
  197. package/build-module/components/dataform-layouts/row/index.mjs.map +2 -2
  198. package/build-module/components/dataform-layouts/validation-badge.mjs +46 -0
  199. package/build-module/components/dataform-layouts/validation-badge.mjs.map +7 -0
  200. package/build-module/components/dataviews-bulk-actions/index.mjs +4 -4
  201. package/build-module/components/dataviews-bulk-actions/index.mjs.map +2 -2
  202. package/build-module/components/dataviews-context/index.mjs.map +2 -2
  203. package/build-module/components/dataviews-filters/filter.mjs +1 -1
  204. package/build-module/components/dataviews-filters/filter.mjs.map +1 -1
  205. package/build-module/components/dataviews-filters/filters.mjs +1 -1
  206. package/build-module/components/dataviews-filters/filters.mjs.map +1 -1
  207. package/build-module/components/dataviews-filters/search-widget.mjs +25 -11
  208. package/build-module/components/dataviews-filters/search-widget.mjs.map +2 -2
  209. package/build-module/components/dataviews-filters/toggle.mjs.map +1 -1
  210. package/build-module/components/dataviews-footer/index.mjs +1 -1
  211. package/build-module/components/dataviews-footer/index.mjs.map +1 -1
  212. package/build-module/components/dataviews-layouts/activity/activity-item.mjs +4 -4
  213. package/build-module/components/dataviews-layouts/activity/activity-item.mjs.map +1 -1
  214. package/build-module/components/dataviews-layouts/activity/index.mjs +1 -1
  215. package/build-module/components/dataviews-layouts/activity/index.mjs.map +1 -1
  216. package/build-module/components/dataviews-layouts/grid/composite-grid.mjs +27 -38
  217. package/build-module/components/dataviews-layouts/grid/composite-grid.mjs.map +2 -2
  218. package/build-module/components/dataviews-layouts/grid/index.mjs +2 -2
  219. package/build-module/components/dataviews-layouts/grid/index.mjs.map +1 -1
  220. package/build-module/components/dataviews-layouts/list/index.mjs +7 -8
  221. package/build-module/components/dataviews-layouts/list/index.mjs.map +2 -2
  222. package/build-module/components/dataviews-layouts/picker-grid/index.mjs +5 -5
  223. package/build-module/components/dataviews-layouts/picker-grid/index.mjs.map +2 -2
  224. package/build-module/components/dataviews-layouts/picker-table/index.mjs +1 -1
  225. package/build-module/components/dataviews-layouts/picker-table/index.mjs.map +2 -2
  226. package/build-module/components/dataviews-layouts/table/column-primary.mjs +1 -1
  227. package/build-module/components/dataviews-layouts/table/column-primary.mjs.map +1 -1
  228. package/build-module/components/dataviews-layouts/table/index.mjs +1 -1
  229. package/build-module/components/dataviews-layouts/table/index.mjs.map +2 -2
  230. package/build-module/components/dataviews-layouts/utils/item-click-wrapper.mjs.map +2 -2
  231. package/build-module/components/dataviews-pagination/index.mjs +3 -3
  232. package/build-module/components/dataviews-pagination/index.mjs.map +2 -2
  233. package/build-module/components/dataviews-picker-footer/index.mjs +3 -3
  234. package/build-module/components/dataviews-picker-footer/index.mjs.map +2 -2
  235. package/build-module/components/dataviews-view-config/index.mjs +74 -59
  236. package/build-module/components/dataviews-view-config/index.mjs.map +2 -2
  237. package/build-module/components/dataviews-view-config/properties-section.mjs +1 -1
  238. package/build-module/components/dataviews-view-config/properties-section.mjs.map +1 -1
  239. package/build-module/dataviews/index.mjs +7 -5
  240. package/build-module/dataviews/index.mjs.map +2 -2
  241. package/build-module/dataviews-picker/index.mjs +3 -3
  242. package/build-module/dataviews-picker/index.mjs.map +2 -2
  243. package/build-module/hooks/use-form-validity.mjs +61 -28
  244. package/build-module/hooks/use-form-validity.mjs.map +2 -2
  245. package/build-module/hooks/use-report-validity.mjs +18 -0
  246. package/build-module/hooks/use-report-validity.mjs.map +7 -0
  247. package/build-style/style-rtl.css +149 -217
  248. package/build-style/style.css +149 -217
  249. package/build-types/components/dataform-controls/adaptive-select.d.ts +6 -0
  250. package/build-types/components/dataform-controls/adaptive-select.d.ts.map +1 -0
  251. package/build-types/components/dataform-controls/array.d.ts +1 -1
  252. package/build-types/components/dataform-controls/array.d.ts.map +1 -1
  253. package/build-types/components/dataform-controls/checkbox.d.ts +1 -1
  254. package/build-types/components/dataform-controls/checkbox.d.ts.map +1 -1
  255. package/build-types/components/dataform-controls/color.d.ts +1 -1
  256. package/build-types/components/dataform-controls/color.d.ts.map +1 -1
  257. package/build-types/components/dataform-controls/combobox.d.ts +6 -0
  258. package/build-types/components/dataform-controls/combobox.d.ts.map +1 -0
  259. package/build-types/components/dataform-controls/date.d.ts +1 -1
  260. package/build-types/components/dataform-controls/date.d.ts.map +1 -1
  261. package/build-types/components/dataform-controls/datetime.d.ts +1 -1
  262. package/build-types/components/dataform-controls/datetime.d.ts.map +1 -1
  263. package/build-types/components/dataform-controls/email.d.ts +1 -1
  264. package/build-types/components/dataform-controls/email.d.ts.map +1 -1
  265. package/build-types/components/dataform-controls/index.d.ts.map +1 -1
  266. package/build-types/components/dataform-controls/password.d.ts +1 -1
  267. package/build-types/components/dataform-controls/password.d.ts.map +1 -1
  268. package/build-types/components/dataform-controls/radio.d.ts +1 -1
  269. package/build-types/components/dataform-controls/radio.d.ts.map +1 -1
  270. package/build-types/components/dataform-controls/select.d.ts +1 -1
  271. package/build-types/components/dataform-controls/select.d.ts.map +1 -1
  272. package/build-types/components/dataform-controls/telephone.d.ts +1 -1
  273. package/build-types/components/dataform-controls/telephone.d.ts.map +1 -1
  274. package/build-types/components/dataform-controls/text.d.ts +1 -1
  275. package/build-types/components/dataform-controls/text.d.ts.map +1 -1
  276. package/build-types/components/dataform-controls/textarea.d.ts +1 -1
  277. package/build-types/components/dataform-controls/textarea.d.ts.map +1 -1
  278. package/build-types/components/dataform-controls/toggle-group.d.ts +1 -1
  279. package/build-types/components/dataform-controls/toggle-group.d.ts.map +1 -1
  280. package/build-types/components/dataform-controls/toggle.d.ts +1 -1
  281. package/build-types/components/dataform-controls/toggle.d.ts.map +1 -1
  282. package/build-types/components/dataform-controls/url.d.ts +1 -1
  283. package/build-types/components/dataform-controls/url.d.ts.map +1 -1
  284. package/build-types/components/dataform-controls/utils/validated-input.d.ts +1 -1
  285. package/build-types/components/dataform-controls/utils/validated-input.d.ts.map +1 -1
  286. package/build-types/components/dataform-controls/utils/validated-number.d.ts +1 -1
  287. package/build-types/components/dataform-controls/utils/validated-number.d.ts.map +1 -1
  288. package/build-types/components/dataform-layouts/card/index.d.ts +3 -1
  289. package/build-types/components/dataform-layouts/card/index.d.ts.map +1 -1
  290. package/build-types/components/dataform-layouts/data-form-layout.d.ts +2 -1
  291. package/build-types/components/dataform-layouts/data-form-layout.d.ts.map +1 -1
  292. package/build-types/components/dataform-layouts/details/index.d.ts +1 -1
  293. package/build-types/components/dataform-layouts/details/index.d.ts.map +1 -1
  294. package/build-types/components/dataform-layouts/normalize-form.d.ts.map +1 -1
  295. package/build-types/components/dataform-layouts/panel/dropdown.d.ts +2 -12
  296. package/build-types/components/dataform-layouts/panel/dropdown.d.ts.map +1 -1
  297. package/build-types/components/dataform-layouts/panel/index.d.ts +1 -1
  298. package/build-types/components/dataform-layouts/panel/index.d.ts.map +1 -1
  299. package/build-types/components/dataform-layouts/panel/modal.d.ts +2 -10
  300. package/build-types/components/dataform-layouts/panel/modal.d.ts.map +1 -1
  301. package/build-types/components/dataform-layouts/panel/summary-button.d.ts +6 -5
  302. package/build-types/components/dataform-layouts/panel/summary-button.d.ts.map +1 -1
  303. package/build-types/components/dataform-layouts/panel/utils/get-first-validation-error.d.ts +4 -0
  304. package/build-types/components/dataform-layouts/panel/utils/get-first-validation-error.d.ts.map +1 -0
  305. package/build-types/components/dataform-layouts/panel/utils/get-label-classname.d.ts +4 -0
  306. package/build-types/components/dataform-layouts/panel/utils/get-label-classname.d.ts.map +1 -0
  307. package/build-types/components/dataform-layouts/panel/utils/get-label-content.d.ts +3 -0
  308. package/build-types/components/dataform-layouts/panel/utils/get-label-content.d.ts.map +1 -0
  309. package/build-types/components/dataform-layouts/panel/utils/use-field-from-form-field.d.ts +23 -0
  310. package/build-types/components/dataform-layouts/panel/utils/use-field-from-form-field.d.ts.map +1 -0
  311. package/build-types/components/dataform-layouts/regular/index.d.ts +1 -1
  312. package/build-types/components/dataform-layouts/regular/index.d.ts.map +1 -1
  313. package/build-types/components/dataform-layouts/row/index.d.ts +1 -1
  314. package/build-types/components/dataform-layouts/row/index.d.ts.map +1 -1
  315. package/build-types/components/dataform-layouts/validation-badge.d.ts +8 -0
  316. package/build-types/components/dataform-layouts/validation-badge.d.ts.map +1 -0
  317. package/build-types/components/dataviews-context/index.d.ts +1 -0
  318. package/build-types/components/dataviews-context/index.d.ts.map +1 -1
  319. package/build-types/components/dataviews-filters/filter.d.ts +1 -1
  320. package/build-types/components/dataviews-filters/filter.d.ts.map +1 -1
  321. package/build-types/components/dataviews-filters/search-widget.d.ts.map +1 -1
  322. package/build-types/components/dataviews-layouts/list/index.d.ts.map +1 -1
  323. package/build-types/components/dataviews-layouts/utils/item-click-wrapper.d.ts +1 -0
  324. package/build-types/components/dataviews-layouts/utils/item-click-wrapper.d.ts.map +1 -1
  325. package/build-types/components/dataviews-view-config/index.d.ts.map +1 -1
  326. package/build-types/dataform/stories/content.story.d.ts +14 -0
  327. package/build-types/dataform/stories/content.story.d.ts.map +1 -0
  328. package/build-types/dataform/stories/index.story.d.ts +10 -2
  329. package/build-types/dataform/stories/index.story.d.ts.map +1 -1
  330. package/build-types/dataform/stories/layout-panel.d.ts +3 -1
  331. package/build-types/dataform/stories/layout-panel.d.ts.map +1 -1
  332. package/build-types/dataform/stories/validation.d.ts +1 -1
  333. package/build-types/dataform/stories/validation.d.ts.map +1 -1
  334. package/build-types/dataviews/index.d.ts +2 -1
  335. package/build-types/dataviews/index.d.ts.map +1 -1
  336. package/build-types/dataviews/stories/fixtures.d.ts +1 -0
  337. package/build-types/dataviews/stories/fixtures.d.ts.map +1 -1
  338. package/build-types/dataviews/stories/index.story.d.ts +14 -2
  339. package/build-types/dataviews/stories/index.story.d.ts.map +1 -1
  340. package/build-types/dataviews/stories/layout-activity.d.ts +2 -1
  341. package/build-types/dataviews/stories/layout-activity.d.ts.map +1 -1
  342. package/build-types/dataviews/stories/layout-list.d.ts +2 -1
  343. package/build-types/dataviews/stories/layout-list.d.ts.map +1 -1
  344. package/build-types/field-types/stories/index.story.d.ts +42 -16
  345. package/build-types/field-types/stories/index.story.d.ts.map +1 -1
  346. package/build-types/hooks/use-form-validity.d.ts.map +1 -1
  347. package/build-types/hooks/use-report-validity.d.ts +14 -0
  348. package/build-types/hooks/use-report-validity.d.ts.map +1 -0
  349. package/build-types/types/dataform.d.ts +4 -0
  350. package/build-types/types/dataform.d.ts.map +1 -1
  351. package/build-types/types/field-api.d.ts +4 -0
  352. package/build-types/types/field-api.d.ts.map +1 -1
  353. package/build-wp/index.js +3749 -2632
  354. package/package.json +22 -21
  355. package/src/components/dataform-controls/adaptive-select.tsx +23 -0
  356. package/src/components/dataform-controls/array.tsx +2 -0
  357. package/src/components/dataform-controls/checkbox.tsx +2 -0
  358. package/src/components/dataform-controls/color.tsx +31 -36
  359. package/src/components/dataform-controls/combobox.tsx +58 -0
  360. package/src/components/dataform-controls/date.tsx +69 -26
  361. package/src/components/dataform-controls/datetime.tsx +16 -6
  362. package/src/components/dataform-controls/email.tsx +2 -0
  363. package/src/components/dataform-controls/index.tsx +5 -1
  364. package/src/components/dataform-controls/password.tsx +2 -0
  365. package/src/components/dataform-controls/radio.tsx +2 -0
  366. package/src/components/dataform-controls/select.tsx +2 -0
  367. package/src/components/dataform-controls/style.scss +4 -0
  368. package/src/components/dataform-controls/telephone.tsx +2 -0
  369. package/src/components/dataform-controls/text.tsx +2 -0
  370. package/src/components/dataform-controls/textarea.tsx +2 -0
  371. package/src/components/dataform-controls/toggle-group.tsx +2 -0
  372. package/src/components/dataform-controls/toggle.tsx +2 -0
  373. package/src/components/dataform-controls/url.tsx +2 -0
  374. package/src/components/dataform-controls/utils/relative-date-control.tsx +1 -1
  375. package/src/components/dataform-controls/utils/validated-input.tsx +2 -0
  376. package/src/components/dataform-controls/utils/validated-number.tsx +2 -0
  377. package/src/components/dataform-layouts/card/index.tsx +40 -3
  378. package/src/components/dataform-layouts/data-form-layout.tsx +18 -4
  379. package/src/components/dataform-layouts/details/index.tsx +66 -4
  380. package/src/components/dataform-layouts/details/style.scss +5 -0
  381. package/src/components/dataform-layouts/index.tsx +5 -5
  382. package/src/components/dataform-layouts/normalize-form.ts +1 -0
  383. package/src/components/dataform-layouts/panel/dropdown.tsx +110 -94
  384. package/src/components/dataform-layouts/panel/index.tsx +10 -243
  385. package/src/components/dataform-layouts/panel/modal.tsx +43 -29
  386. package/src/components/dataform-layouts/panel/style.scss +109 -27
  387. package/src/components/dataform-layouts/panel/summary-button.tsx +140 -62
  388. package/src/components/dataform-layouts/panel/utils/get-first-validation-error.ts +47 -0
  389. package/src/components/dataform-layouts/panel/utils/get-label-classname.ts +18 -0
  390. package/src/components/dataform-layouts/panel/utils/get-label-content.tsx +26 -0
  391. package/src/components/dataform-layouts/panel/utils/use-field-from-form-field.ts +78 -0
  392. package/src/components/dataform-layouts/regular/index.tsx +8 -3
  393. package/src/components/dataform-layouts/regular/style.scss +10 -0
  394. package/src/components/dataform-layouts/row/index.tsx +5 -2
  395. package/src/components/dataform-layouts/test/normalize-form.ts +5 -0
  396. package/src/components/dataform-layouts/validation-badge.tsx +63 -0
  397. package/src/components/dataviews-bulk-actions/index.tsx +4 -4
  398. package/src/components/dataviews-context/index.ts +1 -0
  399. package/src/components/dataviews-filters/filter.tsx +2 -2
  400. package/src/components/dataviews-filters/filters.tsx +1 -1
  401. package/src/components/dataviews-filters/search-widget.tsx +10 -2
  402. package/src/components/dataviews-filters/style.scss +8 -0
  403. package/src/components/dataviews-filters/toggle.tsx +1 -1
  404. package/src/components/dataviews-footer/index.tsx +1 -1
  405. package/src/components/dataviews-layouts/activity/activity-item.tsx +4 -4
  406. package/src/components/dataviews-layouts/activity/index.tsx +1 -1
  407. package/src/components/dataviews-layouts/grid/composite-grid.tsx +35 -35
  408. package/src/components/dataviews-layouts/grid/index.tsx +2 -2
  409. package/src/components/dataviews-layouts/grid/style.scss +15 -1
  410. package/src/components/dataviews-layouts/list/index.tsx +7 -8
  411. package/src/components/dataviews-layouts/list/style.scss +1 -0
  412. package/src/components/dataviews-layouts/picker-grid/index.tsx +5 -5
  413. package/src/components/dataviews-layouts/picker-table/index.tsx +1 -1
  414. package/src/components/dataviews-layouts/table/column-primary.tsx +1 -1
  415. package/src/components/dataviews-layouts/table/index.tsx +1 -1
  416. package/src/components/dataviews-layouts/utils/item-click-wrapper.tsx +1 -0
  417. package/src/components/dataviews-pagination/index.tsx +3 -3
  418. package/src/components/dataviews-picker-footer/index.tsx +3 -3
  419. package/src/components/dataviews-view-config/index.tsx +61 -50
  420. package/src/components/dataviews-view-config/properties-section.tsx +1 -1
  421. package/src/components/dataviews-view-config/style.scss +21 -0
  422. package/src/dataform/stories/content.story.mdx +159 -0
  423. package/src/dataform/stories/content.story.tsx +390 -0
  424. package/src/dataform/stories/index.story.tsx +14 -2
  425. package/src/dataform/stories/layout-panel.tsx +19 -2
  426. package/src/dataform/stories/validation.tsx +100 -7
  427. package/src/dataform/test/dataform.tsx +2 -2
  428. package/src/dataviews/index.tsx +7 -4
  429. package/src/dataviews/stories/empty.tsx +1 -1
  430. package/src/dataviews/stories/fixtures.tsx +93 -4
  431. package/src/dataviews/stories/free-composition.tsx +6 -6
  432. package/src/dataviews/stories/index.story.tsx +12 -0
  433. package/src/dataviews/stories/layout-activity.tsx +6 -3
  434. package/src/dataviews/stories/layout-list.tsx +3 -0
  435. package/src/dataviews-picker/index.tsx +4 -4
  436. package/src/dataviews-picker/stories/fixtures.tsx +2 -2
  437. package/src/dataviews-picker/stories/index.story.tsx +1 -1
  438. package/src/field-types/stories/index.story.tsx +101 -5
  439. package/src/hooks/test/use-form-validity.ts +303 -178
  440. package/src/hooks/use-form-validity.ts +85 -36
  441. package/src/hooks/use-report-validity.ts +32 -0
  442. package/src/style.scss +0 -2
  443. package/src/types/dataform.ts +5 -0
  444. package/src/types/field-api.ts +4 -0
@@ -66,6 +66,7 @@ type DataViewsProps< Item > = {
66
66
  perPageSizes: number[];
67
67
  };
68
68
  empty?: ReactNode;
69
+ onReset?: ( () => void ) | false;
69
70
  } & ( Item extends ItemWithId
70
71
  ? { getItemId?: ( item: Item ) => string }
71
72
  : { getItemId: ( item: Item ) => string } );
@@ -95,18 +96,18 @@ function DefaultUI( {
95
96
  align="top"
96
97
  justify="space-between"
97
98
  className="dataviews__view-actions"
98
- gap="2xs"
99
+ gap="xs"
99
100
  >
100
101
  <Stack
101
102
  direction="row"
102
103
  justify="start"
103
- gap="xs"
104
+ gap="sm"
104
105
  className="dataviews__search"
105
106
  >
106
107
  { search && <DataViewsSearch label={ searchLabel } /> }
107
108
  <FiltersToggle />
108
109
  </Stack>
109
- <Stack direction="row" gap="2xs" style={ { flexShrink: 0 } }>
110
+ <Stack direction="row" gap="xs" style={ { flexShrink: 0 } }>
110
111
  <DataViewsViewConfig />
111
112
  { header }
112
113
  </Stack>
@@ -140,9 +141,10 @@ function DataViews< Item >( {
140
141
  children,
141
142
  config = { perPageSizes: [ 10, 20, 50, 100 ] },
142
143
  empty,
144
+ onReset,
143
145
  }: DataViewsProps< Item > ) {
144
146
  const { infiniteScrollHandler } = paginationInfo;
145
- const containerRef = useRef< HTMLDivElement | null >( null );
147
+ const containerRef = useRef< HTMLDivElement >( null );
146
148
  const [ containerWidth, setContainerWidth ] = useState( 0 );
147
149
  const resizeObserverRef = useResizeObserver(
148
150
  ( resizeObserverEntries: any ) => {
@@ -267,6 +269,7 @@ function DataViews< Item >( {
267
269
  config,
268
270
  empty,
269
271
  hasInfiniteScrollHandler: !! infiniteScrollHandler,
272
+ onReset,
270
273
  } }
271
274
  >
272
275
  <div className="dataviews-wrapper" ref={ containerRef }>
@@ -39,7 +39,7 @@ const PlanetIllustration = () => (
39
39
  </svg>
40
40
  );
41
41
  const CustomEmptyComponent = () => (
42
- <Stack direction="column" align="center" justify="center" gap="sm">
42
+ <Stack direction="column" align="center" justify="center" gap="md">
43
43
  <PlanetIllustration />
44
44
  <Text>No celestial bodies found</Text>
45
45
  </Stack>
@@ -24,6 +24,7 @@ export type SpaceObject = {
24
24
  date: string;
25
25
  datetime: string;
26
26
  email: string;
27
+ author: string;
27
28
  };
28
29
 
29
30
  export const data: SpaceObject[] = [
@@ -42,6 +43,7 @@ export const data: SpaceObject[] = [
42
43
  date: '2021-01-01',
43
44
  datetime: '2021-01-01T14:30:00Z',
44
45
  email: 'moon@example.com',
46
+ author: 'lunarian_observer',
45
47
  },
46
48
  {
47
49
  id: 2,
@@ -57,6 +59,7 @@ export const data: SpaceObject[] = [
57
59
  date: '2019-01-02',
58
60
  datetime: '2019-01-02T09:15:00Z',
59
61
  email: 'io@example.com',
62
+ author: 'galilean_moon_enthusiast_supreme',
60
63
  },
61
64
  {
62
65
  id: 3,
@@ -72,6 +75,7 @@ export const data: SpaceObject[] = [
72
75
  date: '2025-01-03',
73
76
  datetime: '2025-01-03T16:45:30Z',
74
77
  email: 'europa@example.com',
78
+ author: 'icy_ocean_explorer',
75
79
  },
76
80
  {
77
81
  id: 4,
@@ -87,6 +91,7 @@ export const data: SpaceObject[] = [
87
91
  date: '2022-01-04',
88
92
  datetime: '2022-01-04T12:30:00Z',
89
93
  email: 'ganymede@example.com',
94
+ author: 'jovian_satellite_researcher',
90
95
  },
91
96
  {
92
97
  id: 5,
@@ -102,6 +107,7 @@ export const data: SpaceObject[] = [
102
107
  date: '2021-01-05',
103
108
  datetime: '2021-01-05T14:15:30Z',
104
109
  email: 'callisto@example.com',
110
+ author: 'crater_cartography_specialist',
105
111
  },
106
112
  {
107
113
  id: 6,
@@ -117,6 +123,7 @@ export const data: SpaceObject[] = [
117
123
  date: '2020-01-06',
118
124
  datetime: '2020-01-06T10:45:15Z',
119
125
  email: 'amalthea@example.com',
126
+ author: 'astro_photographer',
120
127
  },
121
128
  {
122
129
  id: 7,
@@ -132,6 +139,7 @@ export const data: SpaceObject[] = [
132
139
  date: '2019-01-07',
133
140
  datetime: '2019-01-07T16:20:45Z',
134
141
  email: 'himalia@example.com',
142
+ author: 'irregular_orbit_analyst',
135
143
  },
136
144
  {
137
145
  id: 8,
@@ -147,6 +155,7 @@ export const data: SpaceObject[] = [
147
155
  date: '2020-01-01',
148
156
  datetime: '2020-01-01T11:22:15Z',
149
157
  email: 'neptune@example.com',
158
+ author: 'neptunian_dynamics_professor',
150
159
  },
151
160
  {
152
161
  id: 9,
@@ -162,6 +171,7 @@ export const data: SpaceObject[] = [
162
171
  date: '2021-02-01',
163
172
  datetime: '2021-02-01T11:30:00Z',
164
173
  email: 'triton@example.com',
174
+ author: 'retrograde_orbit_specialist',
165
175
  },
166
176
  {
167
177
  id: 10,
@@ -177,6 +187,7 @@ export const data: SpaceObject[] = [
177
187
  date: '2020-02-02',
178
188
  datetime: '2020-02-02T15:45:30Z',
179
189
  email: 'nereid@example.com',
190
+ author: 'outer_solar_system_voyager_mission_director',
180
191
  },
181
192
  {
182
193
  id: 11,
@@ -192,6 +203,7 @@ export const data: SpaceObject[] = [
192
203
  date: '2019-02-03',
193
204
  datetime: '2019-02-03T09:20:15Z',
194
205
  email: 'proteus@example.com',
206
+ author: 'space_observer',
195
207
  },
196
208
  {
197
209
  id: 12,
@@ -207,6 +219,7 @@ export const data: SpaceObject[] = [
207
219
  date: '2020-01-02',
208
220
  datetime: '2020-01-02T13:05:45Z',
209
221
  email: 'mercury@example.com',
222
+ author: 'solar_wind_scientist',
210
223
  },
211
224
  {
212
225
  id: 13,
@@ -222,6 +235,7 @@ export const data: SpaceObject[] = [
222
235
  date: '2020-01-02',
223
236
  datetime: '2020-01-02T08:30:12Z',
224
237
  email: 'venus@example.com',
238
+ author: 'atmospheric_chemistry_expert',
225
239
  },
226
240
  {
227
241
  id: 14,
@@ -237,6 +251,7 @@ export const data: SpaceObject[] = [
237
251
  date: '2023-01-03',
238
252
  datetime: '2023-01-03T18:15:30Z',
239
253
  email: 'earth@example.com',
254
+ author: 'planetary_geologist',
240
255
  },
241
256
  {
242
257
  id: 15,
@@ -252,6 +267,7 @@ export const data: SpaceObject[] = [
252
267
  date: '2020-01-01',
253
268
  datetime: '2020-01-01T20:45:00Z',
254
269
  email: 'mars@example.com',
270
+ author: 'red_planet_explorer',
255
271
  },
256
272
  {
257
273
  id: 16,
@@ -267,6 +283,7 @@ export const data: SpaceObject[] = [
267
283
  date: '2017-01-01',
268
284
  datetime: '2017-01-01T00:01:00Z',
269
285
  email: 'jupiter@example.com',
286
+ author: 'gas_giant_meteorologist',
270
287
  },
271
288
  {
272
289
  id: 17,
@@ -282,6 +299,7 @@ export const data: SpaceObject[] = [
282
299
  date: '2020-02-01',
283
300
  datetime: '2020-02-01T00:02:00Z',
284
301
  email: 'saturn@example.com',
302
+ author: 'ring_system_analyst',
285
303
  },
286
304
  {
287
305
  id: 18,
@@ -297,6 +315,7 @@ export const data: SpaceObject[] = [
297
315
  date: '2020-03-01',
298
316
  datetime: '2020-03-01T10:15:20Z',
299
317
  email: 'uranus@example.com',
318
+ author: 'axial_tilt_researcher',
300
319
  },
301
320
  {
302
321
  id: 19,
@@ -312,6 +331,7 @@ export const data: SpaceObject[] = [
312
331
  date: '2020-03-01',
313
332
  datetime: '2020-03-01T10:15:20Z',
314
333
  email: 'thessalonikopolymnianebuchodonossarinacharybdis@example.com',
334
+ author: 'interstellar_nomadic_planetary_body_tracking_specialist',
315
335
  },
316
336
  ];
317
337
 
@@ -333,9 +353,9 @@ export const actions: Action< SpaceObject >[] = [
333
353
  ? `Are you sure you want to delete ${ items.length } items?`
334
354
  : `Are you sure you want to delete "${ items[ 0 ].name.title }"?`;
335
355
  return (
336
- <Stack direction="column" gap="lg">
356
+ <Stack direction="column" gap="xl">
337
357
  <Text>{ label }</Text>
338
- <Stack direction="row" gap="xs" justify="right">
358
+ <Stack direction="row" gap="sm" justify="right">
339
359
  <Button
340
360
  __next40pxDefaultSize
341
361
  variant="tertiary"
@@ -371,7 +391,7 @@ export const fields: Field< SpaceObject >[] = [
371
391
  id: 'image',
372
392
  type: 'media',
373
393
  header: (
374
- <Stack direction="row" gap="2xs" justify="start" align="center">
394
+ <Stack direction="row" gap="xs" justify="start" align="center">
375
395
  <Icon icon={ image } />
376
396
  <span style={ { minWidth: 0 } }>Image</span>
377
397
  </Stack>
@@ -429,6 +449,10 @@ export const fields: Field< SpaceObject >[] = [
429
449
  value: 'Trans-Neptunian object',
430
450
  label: 'Trans-Neptunian object',
431
451
  },
452
+ {
453
+ value: 'Extreme Trans-Neptunian Scattered Disc Object',
454
+ label: 'Extreme Trans-Neptunian Scattered Disc Object',
455
+ },
432
456
  ],
433
457
  filterBy: {
434
458
  operators: [ 'is', 'isNot' ],
@@ -477,7 +501,7 @@ export const fields: Field< SpaceObject >[] = [
477
501
  label: 'Categories',
478
502
  id: 'categories',
479
503
  header: (
480
- <Stack direction="row" gap="2xs" justify="start" align="center">
504
+ <Stack direction="row" gap="xs" justify="start" align="center">
481
505
  <Icon icon={ category } />
482
506
  <span style={ { minWidth: 0 } }>Categories</span>
483
507
  </Stack>
@@ -492,8 +516,73 @@ export const fields: Field< SpaceObject >[] = [
492
516
  { value: 'Ice giant', label: 'Ice giant' },
493
517
  { value: 'Terrestrial', label: 'Terrestrial' },
494
518
  { value: 'Gas giant', label: 'Gas giant' },
519
+ {
520
+ value: 'Extreme Outer Solar System Trans-Neptunian Region',
521
+ label: 'Extreme Outer Solar System Trans-Neptunian Region',
522
+ },
495
523
  ],
496
524
  type: 'array',
497
525
  enableGlobalSearch: true,
498
526
  },
527
+ {
528
+ label: 'Author',
529
+ id: 'author',
530
+ type: 'text',
531
+ enableHiding: false,
532
+ enableGlobalSearch: true,
533
+ elements: [
534
+ { value: 'lunarian_observer', label: 'lunarian_observer' },
535
+ {
536
+ value: 'galilean_moon_enthusiast_supreme',
537
+ label: 'galilean_moon_enthusiast_supreme',
538
+ },
539
+ { value: 'icy_ocean_explorer', label: 'icy_ocean_explorer' },
540
+ {
541
+ value: 'jovian_satellite_researcher',
542
+ label: 'jovian_satellite_researcher',
543
+ },
544
+ {
545
+ value: 'crater_cartography_specialist',
546
+ label: 'crater_cartography_specialist',
547
+ },
548
+ { value: 'astro_photographer', label: 'astro_photographer' },
549
+ {
550
+ value: 'irregular_orbit_analyst',
551
+ label: 'irregular_orbit_analyst',
552
+ },
553
+ {
554
+ value: 'neptunian_dynamics_professor',
555
+ label: 'neptunian_dynamics_professor',
556
+ },
557
+ {
558
+ value: 'retrograde_orbit_specialist',
559
+ label: 'retrograde_orbit_specialist',
560
+ },
561
+ {
562
+ value: 'outer_solar_system_voyager_mission_director',
563
+ label: 'outer_solar_system_voyager_mission_director',
564
+ },
565
+ { value: 'space_observer', label: 'space_observer' },
566
+ { value: 'solar_wind_scientist', label: 'solar_wind_scientist' },
567
+ {
568
+ value: 'atmospheric_chemistry_expert',
569
+ label: 'atmospheric_chemistry_expert',
570
+ },
571
+ { value: 'planetary_geologist', label: 'planetary_geologist' },
572
+ { value: 'red_planet_explorer', label: 'red_planet_explorer' },
573
+ {
574
+ value: 'gas_giant_meteorologist',
575
+ label: 'gas_giant_meteorologist',
576
+ },
577
+ { value: 'ring_system_analyst', label: 'ring_system_analyst' },
578
+ { value: 'axial_tilt_researcher', label: 'axial_tilt_researcher' },
579
+ {
580
+ value: 'interstellar_nomadic_planetary_body_tracking_specialist',
581
+ label: 'interstellar_nomadic_planetary_body_tracking_specialist',
582
+ },
583
+ ],
584
+ filterBy: {
585
+ operators: [ 'isAny', 'isNone' ],
586
+ },
587
+ },
499
588
  ];
@@ -37,14 +37,14 @@ function PlanetOverview( { planets }: { planets: SpaceObject[] } ) {
37
37
  { __( 'Solar System numbers' ) }
38
38
  </Heading>
39
39
  <div className="free-composition-header">
40
- <Stack direction="column" gap="md">
41
- <Stack direction="row" justify="start" gap="xs">
40
+ <Stack direction="column" gap="lg">
41
+ <Stack direction="row" justify="start" gap="sm">
42
42
  <DataViews.Search label={ __( 'Search content' ) } />
43
43
  <DataViews.FiltersToggle />
44
44
  <Stack
45
45
  direction="row"
46
46
  justify="end"
47
- gap="xs"
47
+ gap="sm"
48
48
  style={ { flex: 1 } }
49
49
  >
50
50
  <DataViews.ViewConfig />
@@ -54,7 +54,7 @@ function PlanetOverview( { planets }: { planets: SpaceObject[] } ) {
54
54
  <DataViews.FiltersToggled />
55
55
  <Card variant="secondary">
56
56
  <CardBody>
57
- <Stack direction="column" gap="xs">
57
+ <Stack direction="column" gap="sm">
58
58
  <Text size={ 18 } as="p">
59
59
  { createInterpolateElement(
60
60
  _n(
@@ -95,7 +95,7 @@ function PlanetOverview( { planets }: { planets: SpaceObject[] } ) {
95
95
  direction="row"
96
96
  justify="space-between"
97
97
  align="center"
98
- gap="xs"
98
+ gap="sm"
99
99
  >
100
100
  <DataViews.BulkActionToolbar />
101
101
  <DataViews.Pagination />
@@ -173,7 +173,7 @@ export const FreeCompositionComponent = () => {
173
173
  empty={
174
174
  <Stack
175
175
  direction="column"
176
- gap="xs"
176
+ gap="sm"
177
177
  justify="space-around"
178
178
  align="center"
179
179
  className="free-composition-dataviews-empty"
@@ -119,6 +119,7 @@ export const LayoutGrid = {
119
119
  export const LayoutList = {
120
120
  render: LayoutListComponent,
121
121
  args: {
122
+ fullWidth: false,
122
123
  groupBy: false,
123
124
  groupByLabel: true,
124
125
  hasClickableItems: true,
@@ -130,6 +131,11 @@ export const LayoutList = {
130
131
  control: 'color',
131
132
  description: 'Background color of the DataViews component',
132
133
  },
134
+ fullWidth: {
135
+ control: 'boolean',
136
+ description:
137
+ 'Whether to use full width or a contained layout (400px)',
138
+ },
133
139
  groupBy: {
134
140
  control: 'boolean',
135
141
  description: 'Whether items are grouped by field',
@@ -157,6 +163,7 @@ export const LayoutList = {
157
163
  export const LayoutActivity = {
158
164
  render: LayoutActivityComponent,
159
165
  args: {
166
+ fullWidth: false,
160
167
  groupBy: false,
161
168
  groupByLabel: true,
162
169
  hasClickableItems: true,
@@ -168,6 +175,11 @@ export const LayoutActivity = {
168
175
  control: 'color',
169
176
  description: 'Background color of the DataViews component',
170
177
  },
178
+ fullWidth: {
179
+ control: 'boolean',
180
+ description:
181
+ 'Whether to use full width or a contained layout (400px)',
182
+ },
171
183
  groupBy: {
172
184
  control: 'boolean',
173
185
  description: 'Whether items are grouped by field',
@@ -484,7 +484,7 @@ export const orderEventFields: Field< OrderEvent >[] = [
484
484
  label: 'Categories',
485
485
  id: 'categories',
486
486
  header: (
487
- <Stack direction="row" gap="2xs" justify="start" align="center">
487
+ <Stack direction="row" gap="sm" justify="start" align="center">
488
488
  <Icon icon={ category } />
489
489
  <span style={ { minWidth: 0 } }>Categories</span>
490
490
  </Stack>
@@ -554,9 +554,9 @@ export const orderEventActions: Action< OrderEvent >[] = [
554
554
  closeModal?.();
555
555
  };
556
556
  return (
557
- <Stack direction="column" gap="lg">
557
+ <Stack direction="column" gap="xl">
558
558
  <Text>{ label }</Text>
559
- <Stack direction="row" gap="xs" justify="right">
559
+ <Stack direction="row" gap="sm" justify="right">
560
560
  <Button
561
561
  __next40pxDefaultSize
562
562
  variant="tertiary"
@@ -580,6 +580,7 @@ export const orderEventActions: Action< OrderEvent >[] = [
580
580
 
581
581
  const LayoutActivityComponent = ( {
582
582
  backgroundColor,
583
+ fullWidth = false,
583
584
  hasClickableItems = true,
584
585
  groupBy = true,
585
586
  groupByLabel = true,
@@ -587,6 +588,7 @@ const LayoutActivityComponent = ( {
587
588
  showMedia = true,
588
589
  }: {
589
590
  backgroundColor?: string;
591
+ fullWidth?: boolean;
590
592
  hasClickableItems?: boolean;
591
593
  groupBy?: boolean;
592
594
  groupByLabel?: boolean;
@@ -640,6 +642,7 @@ const LayoutActivityComponent = ( {
640
642
  <div
641
643
  style={
642
644
  {
645
+ maxWidth: fullWidth ? undefined : '400px',
643
646
  '--wp-dataviews-color-background': backgroundColor,
644
647
  } as React.CSSProperties
645
648
  }
@@ -14,6 +14,7 @@ import { actions, data, fields, type SpaceObject } from './fixtures';
14
14
 
15
15
  export const LayoutTableComponent = ( {
16
16
  backgroundColor,
17
+ fullWidth = false,
17
18
  hasClickableItems = true,
18
19
  groupBy = false,
19
20
  groupByLabel = true,
@@ -21,6 +22,7 @@ export const LayoutTableComponent = ( {
21
22
  showMedia = true,
22
23
  }: {
23
24
  backgroundColor?: string;
25
+ fullWidth?: boolean;
24
26
  hasClickableItems?: boolean;
25
27
  groupBy?: boolean;
26
28
  groupByLabel?: boolean;
@@ -63,6 +65,7 @@ export const LayoutTableComponent = ( {
63
65
  <div
64
66
  style={
65
67
  {
68
+ maxWidth: fullWidth ? undefined : '400px',
66
69
  '--wp-dataviews-color-background': backgroundColor,
67
70
  } as React.CSSProperties
68
71
  }
@@ -86,18 +86,18 @@ function DefaultUI( {
86
86
  align="top"
87
87
  justify="space-between"
88
88
  className="dataviews__view-actions"
89
- gap="2xs"
89
+ gap="xs"
90
90
  >
91
91
  <Stack
92
92
  direction="row"
93
- gap="xs"
93
+ gap="sm"
94
94
  justify="start"
95
95
  className="dataviews__search"
96
96
  >
97
97
  { search && <DataViewsSearch label={ searchLabel } /> }
98
98
  <FiltersToggle />
99
99
  </Stack>
100
- <Stack direction="row" gap="2xs" style={ { flexShrink: 0 } }>
100
+ <Stack direction="row" gap="xs" style={ { flexShrink: 0 } }>
101
101
  <DataViewsViewConfig />
102
102
  </Stack>
103
103
  </Stack>
@@ -128,7 +128,7 @@ function DataViewsPicker< Item >( {
128
128
  empty,
129
129
  }: DataViewsPickerProps< Item > ) {
130
130
  const { infiniteScrollHandler } = paginationInfo;
131
- const containerRef = useRef< HTMLDivElement | null >( null );
131
+ const containerRef = useRef< HTMLDivElement >( null );
132
132
  const [ containerWidth, setContainerWidth ] = useState( 0 );
133
133
  const resizeObserverRef = useResizeObserver(
134
134
  ( resizeObserverEntries: any ) => {
@@ -320,7 +320,7 @@ export const fields: Field< SpaceObject >[] = [
320
320
  id: 'image',
321
321
  type: 'media',
322
322
  header: (
323
- <Stack direction="row" gap="2xs" justify="start" align="center">
323
+ <Stack direction="row" gap="xs" justify="start" align="center">
324
324
  <Icon icon={ image } />
325
325
  <span style={ { minWidth: 0 } }>Image</span>
326
326
  </Stack>
@@ -426,7 +426,7 @@ export const fields: Field< SpaceObject >[] = [
426
426
  label: 'Categories',
427
427
  id: 'categories',
428
428
  header: (
429
- <Stack direction="row" gap="2xs" justify="start" align="center">
429
+ <Stack direction="row" gap="xs" justify="start" align="center">
430
430
  <Icon icon={ category } />
431
431
  <span style={ { minWidth: 0 } }>Categories</span>
432
432
  </Stack>
@@ -238,7 +238,7 @@ export const WithModal = ( {
238
238
 
239
239
  return (
240
240
  <>
241
- <Stack direction="row" justify="left" gap="xs">
241
+ <Stack direction="row" justify="left" gap="sm">
242
242
  <Button
243
243
  variant="primary"
244
244
  onClick={ () => setIsModalOpen( true ) }