@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
@@ -22,7 +22,7 @@ function Header( { title }: { title: string } ) {
22
22
  <Stack
23
23
  direction="column"
24
24
  className="dataforms-layouts-row__header"
25
- gap="md"
25
+ gap="lg"
26
26
  >
27
27
  <Stack direction="row" align="center">
28
28
  <Heading level={ 2 } size={ 13 }>
@@ -42,6 +42,7 @@ export default function FormRowField< Item >( {
42
42
  field,
43
43
  onChange,
44
44
  hideLabelFromVision,
45
+ markWhenOptional,
45
46
  validity,
46
47
  }: FieldLayoutProps< Item > ) {
47
48
  const layout = field.layout as NormalizedRowLayout;
@@ -57,7 +58,7 @@ export default function FormRowField< Item >( {
57
58
  { ! hideLabelFromVision && field.label && (
58
59
  <Header title={ field.label } />
59
60
  ) }
60
- <Stack direction="row" align={ layout.alignment } gap="md">
61
+ <Stack direction="row" align={ layout.alignment } gap="lg">
61
62
  <DataFormLayout
62
63
  data={ data }
63
64
  form={ form }
@@ -76,6 +77,7 @@ export default function FormRowField< Item >( {
76
77
  field={ childField }
77
78
  onChange={ onChange }
78
79
  hideLabelFromVision={ hideLabelFromVision }
80
+ markWhenOptional={ markWhenOptional }
79
81
  validity={ childFieldValidity }
80
82
  />
81
83
  </div>
@@ -98,6 +100,7 @@ export default function FormRowField< Item >( {
98
100
  data={ data }
99
101
  field={ field }
100
102
  onChange={ onChange }
103
+ markWhenOptional={ markWhenOptional }
101
104
  validity={ validity }
102
105
  />
103
106
  </div>
@@ -139,6 +139,7 @@ describe( 'normalizeFormFields', () => {
139
139
  type: 'panel',
140
140
  openAs: 'dropdown',
141
141
  summary: [],
142
+ editVisibility: 'on-hover',
142
143
  },
143
144
  fields: [
144
145
  {
@@ -148,6 +149,7 @@ describe( 'normalizeFormFields', () => {
148
149
  labelPosition: 'side',
149
150
  openAs: 'dropdown',
150
151
  summary: [],
152
+ editVisibility: 'on-hover',
151
153
  },
152
154
  },
153
155
  ],
@@ -166,6 +168,7 @@ describe( 'normalizeFormFields', () => {
166
168
  type: 'panel',
167
169
  openAs: 'dropdown',
168
170
  summary: [],
171
+ editVisibility: 'on-hover',
169
172
  },
170
173
  fields: [
171
174
  {
@@ -175,6 +178,7 @@ describe( 'normalizeFormFields', () => {
175
178
  labelPosition: 'top',
176
179
  openAs: 'dropdown',
177
180
  summary: [],
181
+ editVisibility: 'on-hover',
178
182
  },
179
183
  },
180
184
  ],
@@ -358,6 +362,7 @@ describe( 'normalizeFormFields', () => {
358
362
  labelPosition: 'side',
359
363
  openAs: 'dropdown',
360
364
  summary: [],
365
+ editVisibility: 'on-hover',
361
366
  },
362
367
  },
363
368
  ],
@@ -0,0 +1,63 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { Badge } from '@wordpress/ui';
5
+ import { sprintf, _n } from '@wordpress/i18n';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import type { FieldValidity } from '../../types';
11
+
12
+ function countInvalidFields( validity: FieldValidity | undefined ): number {
13
+ if ( ! validity ) {
14
+ return 0;
15
+ }
16
+
17
+ let count = 0;
18
+ const validityRules = Object.keys( validity ).filter(
19
+ ( key ) => key !== 'children'
20
+ );
21
+
22
+ for ( const key of validityRules ) {
23
+ const rule = validity[ key as keyof Omit< FieldValidity, 'children' > ];
24
+ if ( rule?.type === 'invalid' ) {
25
+ count++;
26
+ }
27
+ }
28
+
29
+ // Count children recursively
30
+ if ( validity.children ) {
31
+ for ( const childValidity of Object.values( validity.children ) ) {
32
+ count += countInvalidFields( childValidity );
33
+ }
34
+ }
35
+
36
+ return count;
37
+ }
38
+
39
+ export default function ValidationBadge( {
40
+ validity,
41
+ }: {
42
+ validity: FieldValidity | undefined;
43
+ } ) {
44
+ const invalidCount = countInvalidFields( validity );
45
+
46
+ if ( invalidCount === 0 ) {
47
+ return null;
48
+ }
49
+
50
+ return (
51
+ <Badge intent="high">
52
+ { sprintf(
53
+ /* translators: %d: Number of fields that need attention */
54
+ _n(
55
+ '%d field needs attention',
56
+ '%d fields need attention',
57
+ invalidCount
58
+ ),
59
+ invalidCount
60
+ ) }
61
+ </Badge>
62
+ );
63
+ }
@@ -261,7 +261,7 @@ function renderFooterContent< Item >(
261
261
  <Stack
262
262
  direction="row"
263
263
  className="dataviews-bulk-actions-footer__container"
264
- gap="sm"
264
+ gap="md"
265
265
  align="center"
266
266
  >
267
267
  <BulkSelectionCheckbox
@@ -277,7 +277,7 @@ function renderFooterContent< Item >(
277
277
  <Stack
278
278
  direction="row"
279
279
  className="dataviews-bulk-actions-footer__action-buttons"
280
- gap="2xs"
280
+ gap="xs"
281
281
  >
282
282
  { actionsToShow.map( ( action ) => {
283
283
  return (
@@ -320,7 +320,7 @@ function FooterContent< Item >( {
320
320
  const [ actionInProgress, setActionInProgress ] = useState< string | null >(
321
321
  null
322
322
  );
323
- const footerContentRef = useRef< JSX.Element | null >( null );
323
+ const footerContentRef = useRef< React.JSX.Element >( undefined );
324
324
  const isMobile = useViewportMatch( 'medium', '<' );
325
325
 
326
326
  const bulkActions = useMemo(
@@ -359,7 +359,7 @@ function FooterContent< Item >( {
359
359
  );
360
360
  if ( ! actionInProgress ) {
361
361
  if ( footerContentRef.current ) {
362
- footerContentRef.current = null;
362
+ footerContentRef.current = undefined;
363
363
  }
364
364
  return renderFooterContent(
365
365
  data,
@@ -58,6 +58,7 @@ type DataViewsContextType< Item > = {
58
58
  empty?: ReactNode;
59
59
  hasInfiniteScrollHandler: boolean;
60
60
  itemListLabel?: string;
61
+ onReset?: ( () => void ) | false;
61
62
  };
62
63
 
63
64
  const DataViewsContext = createContext< DataViewsContextType< any > >( {
@@ -51,7 +51,7 @@ interface OperatorSelectorProps {
51
51
  }
52
52
 
53
53
  interface FilterProps extends OperatorSelectorProps {
54
- addFilterRef: RefObject< HTMLButtonElement >;
54
+ addFilterRef: RefObject< HTMLButtonElement | null >;
55
55
  openedFilter: string | null;
56
56
  fields: NormalizedField< any >[];
57
57
  }
@@ -94,7 +94,7 @@ function OperatorSelector( {
94
94
  operatorOptions.length > 1 && (
95
95
  <Stack
96
96
  direction="row"
97
- gap="xs"
97
+ gap="sm"
98
98
  justify="flex-start"
99
99
  className="dataviews-filters__summary-operators-container"
100
100
  align="center"
@@ -62,7 +62,7 @@ function Filters( { className }: { className?: string } ) {
62
62
  <Stack
63
63
  direction="row"
64
64
  justify="flex-start"
65
- gap="xs"
65
+ gap="sm"
66
66
  style={ { width: 'fit-content' } }
67
67
  wrap="wrap"
68
68
  className={ className }
@@ -206,7 +206,12 @@ function ListBox( { view, filter, onChangeView }: SearchWidgetProps ) {
206
206
  selected={ currentValue.includes( element.value ) }
207
207
  />
208
208
  ) }
209
- <span>{ element.label }</span>
209
+ <span
210
+ className="dataviews-filters__search-widget-listitem-value"
211
+ title={ element.label }
212
+ >
213
+ { element.label }
214
+ </span>
210
215
  </Composite.Hover>
211
216
  ) ) }
212
217
  </Composite>
@@ -307,7 +312,10 @@ function ComboboxList( { view, filter, onChangeView }: SearchWidgetProps ) {
307
312
  ) }
308
313
  />
309
314
  ) }
310
- <span>
315
+ <span
316
+ className="dataviews-filters__search-widget-listitem-value"
317
+ title={ element.label }
318
+ >
311
319
  <Ariakit.ComboboxItemValue
312
320
  className="dataviews-filters__search-widget-filter-combobox-item-value"
313
321
  value={ element.label }
@@ -231,6 +231,13 @@
231
231
  }
232
232
  }
233
233
 
234
+ .dataviews-filters__search-widget-listitem-value {
235
+ overflow: hidden;
236
+ text-overflow: ellipsis;
237
+ white-space: nowrap;
238
+ min-width: 0;
239
+ }
240
+
234
241
  .dataviews-filters__search-widget-listitem-description {
235
242
  display: block;
236
243
  overflow: hidden;
@@ -275,6 +282,7 @@
275
282
 
276
283
  .dataviews-filters__search-widget-listitem-multi-selection {
277
284
  --checkbox-size: 24px; // Width & height for small viewports.
285
+ flex-shrink: 0;
278
286
 
279
287
  @include checkbox-control;
280
288
  position: relative;
@@ -92,7 +92,7 @@ function FilterVisibilityToggle( {
92
92
  filtersCount,
93
93
  children,
94
94
  }: {
95
- buttonRef: React.RefObject< HTMLButtonElement >;
95
+ buttonRef: React.RefObject< HTMLButtonElement | null >;
96
96
  filtersCount?: number;
97
97
  children: React.ReactNode;
98
98
  } ) {
@@ -42,7 +42,7 @@ export default function DataViewsFooter() {
42
42
  justify="end"
43
43
  align="center"
44
44
  className="dataviews-footer"
45
- gap="xs"
45
+ gap="sm"
46
46
  >
47
47
  { hasBulkActions && <BulkActionsFooter /> }
48
48
  <DataViewsPagination />
@@ -100,9 +100,9 @@ function ActivityItem< Item >(
100
100
  const verticalGap = useMemo( () => {
101
101
  switch ( density ) {
102
102
  case 'comfortable':
103
- return 'sm';
103
+ return 'md';
104
104
  default:
105
- return 'xs';
105
+ return 'sm';
106
106
  }
107
107
  }, [ density ] );
108
108
 
@@ -121,10 +121,10 @@ function ActivityItem< Item >(
121
121
  density === 'comfortable' && 'is-comfortable'
122
122
  ) }
123
123
  >
124
- <Stack direction="row" gap="md" justify="start" align="flex-start">
124
+ <Stack direction="row" gap="lg" justify="start" align="flex-start">
125
125
  <Stack
126
126
  direction="column"
127
- gap="2xs"
127
+ gap="xs"
128
128
  align="center"
129
129
  className="dataviews-view-activity__item-type"
130
130
  >
@@ -60,7 +60,7 @@ export default function ViewActivity< Item >(
60
60
  // Render grouped activity
61
61
  if ( hasData && groupField && dataByGroup ) {
62
62
  return (
63
- <Stack direction="column" gap="xs" className={ wrapperClassName }>
63
+ <Stack direction="column" gap="sm" className={ wrapperClassName }>
64
64
  { groupedEntries.map(
65
65
  ( [ groupName, groupData ]: [ string, Item[] ] ) => (
66
66
  <ActivityGroup< Item >
@@ -101,19 +101,23 @@ const GridItem = forwardRef( function GridItem< Item >(
101
101
  const id = getItemId( item );
102
102
  const instanceId = useInstanceId( GridItem );
103
103
  const isSelected = selection.includes( id );
104
- const renderedMediaField = mediaField?.render ? (
104
+ const mediaPlaceholder = (
105
+ <span className="dataviews-view-grid__media-placeholder" />
106
+ );
107
+ const rendersMediaField = showMedia && mediaField?.render;
108
+ const renderedMediaField = rendersMediaField ? (
105
109
  <mediaField.render
106
110
  item={ item }
107
111
  field={ mediaField }
108
112
  config={ config }
109
113
  />
110
- ) : null;
114
+ ) : (
115
+ mediaPlaceholder
116
+ );
111
117
  const renderedTitleField =
112
118
  showTitle && titleField?.render ? (
113
119
  <titleField.render item={ item } field={ titleField } />
114
120
  ) : null;
115
- const shouldRenderMedia = showMedia && renderedMediaField;
116
-
117
121
  let mediaA11yProps;
118
122
  let titleA11yProps;
119
123
  if ( isItemClickable( item ) && onClickItem ) {
@@ -159,19 +163,20 @@ const GridItem = forwardRef( function GridItem< Item >(
159
163
  }
160
164
  } }
161
165
  >
162
- { shouldRenderMedia && (
163
- <ItemClickWrapper
164
- item={ item }
165
- isItemClickable={ isItemClickable }
166
- onClickItem={ onClickItem }
167
- renderItemLink={ renderItemLink }
168
- className="dataviews-view-grid__media"
169
- { ...mediaA11yProps }
170
- >
171
- { renderedMediaField }
172
- </ItemClickWrapper>
173
- ) }
174
- { hasBulkActions && shouldRenderMedia && (
166
+ <ItemClickWrapper
167
+ item={ item }
168
+ isItemClickable={ isItemClickable }
169
+ onClickItem={ onClickItem }
170
+ renderItemLink={ renderItemLink }
171
+ className={ clsx( 'dataviews-view-grid__media', {
172
+ 'dataviews-view-grid__media--placeholder':
173
+ ! rendersMediaField,
174
+ } ) }
175
+ { ...mediaA11yProps }
176
+ >
177
+ { renderedMediaField }
178
+ </ItemClickWrapper>
179
+ { hasBulkActions && (
175
180
  <DataViewsSelectionCheckbox
176
181
  item={ item }
177
182
  selection={ selection }
@@ -181,17 +186,13 @@ const GridItem = forwardRef( function GridItem< Item >(
181
186
  disabled={ ! hasBulkAction }
182
187
  />
183
188
  ) }
184
- { ! showTitle && shouldRenderMedia && !! actions?.length && (
189
+ { !! actions?.length && (
185
190
  <div className="dataviews-view-grid__media-actions">
186
191
  <ItemActions item={ item } actions={ actions } isCompact />
187
192
  </div>
188
193
  ) }
189
194
  { showTitle && (
190
- <Stack
191
- direction="row"
192
- gap="xs"
193
- className="dataviews-view-grid__title-actions"
194
- >
195
+ <div className="dataviews-view-grid__title">
195
196
  <ItemClickWrapper
196
197
  item={ item }
197
198
  isItemClickable={ isItemClickable }
@@ -199,19 +200,18 @@ const GridItem = forwardRef( function GridItem< Item >(
199
200
  renderItemLink={ renderItemLink }
200
201
  className="dataviews-view-grid__title-field dataviews-title-field"
201
202
  { ...titleA11yProps }
203
+ title={
204
+ titleField?.getValueFormatted( {
205
+ item,
206
+ field: titleField,
207
+ } ) || undefined
208
+ }
202
209
  >
203
210
  { renderedTitleField }
204
211
  </ItemClickWrapper>
205
- { !! actions?.length && (
206
- <ItemActions
207
- item={ item }
208
- actions={ actions }
209
- isCompact
210
- />
211
- ) }
212
- </Stack>
212
+ </div>
213
213
  ) }
214
- <Stack direction="column" gap="2xs">
214
+ <Stack direction="column" gap="xs">
215
215
  { showDescription && descriptionField?.render && (
216
216
  <descriptionField.render
217
217
  item={ item }
@@ -222,7 +222,7 @@ const GridItem = forwardRef( function GridItem< Item >(
222
222
  <Stack
223
223
  direction="row"
224
224
  className="dataviews-view-grid__badge-fields"
225
- gap="xs"
225
+ gap="sm"
226
226
  wrap="wrap"
227
227
  align="top"
228
228
  justify="flex-start"
@@ -246,7 +246,7 @@ const GridItem = forwardRef( function GridItem< Item >(
246
246
  <Stack
247
247
  direction="column"
248
248
  className="dataviews-view-grid__fields"
249
- gap="2xs"
249
+ gap="xs"
250
250
  >
251
251
  { regularFields.map( ( field ) => {
252
252
  return (
@@ -287,7 +287,7 @@ const GridItem = forwardRef( function GridItem< Item >(
287
287
  props: GridItemProps< Item > & {
288
288
  ref?: React.ForwardedRef< HTMLDivElement >;
289
289
  }
290
- ) => JSX.Element;
290
+ ) => React.ReactNode;
291
291
 
292
292
  interface CompositeGridProps< Item > {
293
293
  data: Item[];
@@ -56,13 +56,13 @@ function ViewGrid< Item >( {
56
56
  {
57
57
  // Render multiple groups.
58
58
  hasData && groupField && dataByGroup && (
59
- <Stack direction="column" gap="md">
59
+ <Stack direction="column" gap="lg">
60
60
  { Array.from( dataByGroup.entries() ).map(
61
61
  ( [ groupName, groupItems ] ) => (
62
62
  <Stack
63
63
  direction="column"
64
64
  key={ groupName }
65
- gap="xs"
65
+ gap="sm"
66
66
  >
67
67
  <h3 className="dataviews-view-grid__group-header">
68
68
  { view.groupBy?.showLabel === false
@@ -46,7 +46,7 @@
46
46
  justify-content: flex-start;
47
47
  position: relative;
48
48
 
49
- .dataviews-view-grid__title-actions {
49
+ .dataviews-view-grid__title {
50
50
  padding: $grid-unit-10 0 $grid-unit-05;
51
51
  }
52
52
 
@@ -87,6 +87,10 @@
87
87
  overflow: hidden;
88
88
  position: relative;
89
89
 
90
+ &.dataviews-view-grid__media--placeholder {
91
+ aspect-ratio: 3/1;
92
+ }
93
+
90
94
  img {
91
95
  object-fit: cover;
92
96
  width: 100%;
@@ -104,6 +108,15 @@
104
108
  border-radius: $grid-unit-05;
105
109
  pointer-events: none;
106
110
  }
111
+
112
+ .dataviews-view-grid__media-placeholder {
113
+ width: 100%;
114
+ height: 100%;
115
+ display: block;
116
+ border-radius: $radius-medium;
117
+ box-shadow: none;
118
+ background: $gray-100;
119
+ }
107
120
  }
108
121
 
109
122
  .dataviews-view-grid__fields {
@@ -185,6 +198,7 @@
185
198
 
186
199
  .dataviews-view-grid__card .dataviews-view-grid__media-actions {
187
200
  position: absolute;
201
+ z-index: 1;
188
202
  top: $grid-unit-05;
189
203
  opacity: 0;
190
204
  right: $grid-unit-05;
@@ -219,7 +219,7 @@ function ListItem< Item >( {
219
219
  const usedActions = eligibleActions?.length > 0 && (
220
220
  <Stack
221
221
  direction="row"
222
- gap="sm"
222
+ gap="md"
223
223
  className="dataviews-view-list__item-actions"
224
224
  >
225
225
  { primaryAction && (
@@ -312,22 +312,21 @@ function ListItem< Item >( {
312
312
  </div>
313
313
  <Stack
314
314
  direction="row"
315
- gap="sm"
315
+ gap="md"
316
316
  justify="start"
317
317
  align="flex-start"
318
- style={ { flex: 1 } }
318
+ style={ { flex: 1, minWidth: 0 } }
319
319
  >
320
320
  { renderedMediaField }
321
321
  <Stack
322
322
  direction="column"
323
- gap="2xs"
323
+ gap="xs"
324
324
  className="dataviews-view-list__field-wrapper"
325
325
  >
326
326
  <Stack direction="row" align="center">
327
327
  <div
328
- className="dataviews-title-field"
328
+ className="dataviews-title-field dataviews-view-list__title-field"
329
329
  id={ labelId }
330
- style={ { flex: 1 } }
331
330
  >
332
331
  { renderedTitleField }
333
332
  </div>
@@ -551,7 +550,7 @@ export default function ViewList< Item >( props: ViewListProps< Item > ) {
551
550
  >
552
551
  <Stack
553
552
  direction="column"
554
- gap="md"
553
+ gap="lg"
555
554
  className={ clsx( 'dataviews-view-list', className ) }
556
555
  >
557
556
  { Array.from( dataByGroup.entries() ).map(
@@ -559,7 +558,7 @@ export default function ViewList< Item >( props: ViewListProps< Item > ) {
559
558
  <Stack
560
559
  direction="column"
561
560
  key={ groupName }
562
- gap="xs"
561
+ gap="sm"
563
562
  >
564
563
  <h3 className="dataviews-view-list__group-header">
565
564
  { view.groupBy?.showLabel === false
@@ -171,6 +171,7 @@ div.dataviews-view-list {
171
171
  .dataviews-view-list__field-wrapper {
172
172
  min-height: $grid-unit-05 * 13; // Ensures title is centrally aligned when all fields are hidden
173
173
  flex-grow: 1;
174
+ min-width: 0;
174
175
  }
175
176
 
176
177
  .dataviews-view-list__field {
@@ -145,7 +145,7 @@ function GridItem< Item >( {
145
145
  </div>
146
146
  </Stack>
147
147
  ) }
148
- <Stack direction="column" gap="2xs">
148
+ <Stack direction="column" gap="xs">
149
149
  { showDescription && descriptionField?.render && (
150
150
  <descriptionField.render
151
151
  item={ item }
@@ -156,7 +156,7 @@ function GridItem< Item >( {
156
156
  <Stack
157
157
  direction="row"
158
158
  className="dataviews-view-picker-grid__badge-fields"
159
- gap="xs"
159
+ gap="sm"
160
160
  wrap="wrap"
161
161
  align="top"
162
162
  justify="flex-start"
@@ -180,7 +180,7 @@ function GridItem< Item >( {
180
180
  <Stack
181
181
  direction="column"
182
182
  className="dataviews-view-picker-grid__fields"
183
- gap="2xs"
183
+ gap="xs"
184
184
  >
185
185
  { regularFields.map( ( field ) => {
186
186
  return (
@@ -236,7 +236,7 @@ function GridGroup< Item >( {
236
236
  <Stack
237
237
  direction="column"
238
238
  key={ groupName }
239
- gap="xs"
239
+ gap="sm"
240
240
  role="group"
241
241
  aria-labelledby={ headerId }
242
242
  >
@@ -342,7 +342,7 @@ function ViewPickerGrid< Item >( {
342
342
  render={ ( { children, ...props } ) => (
343
343
  <Stack
344
344
  direction="column"
345
- gap="md"
345
+ gap="lg"
346
346
  children={ children }
347
347
  { ...props }
348
348
  />
@@ -224,7 +224,7 @@ function ViewPickerTable< Item >( {
224
224
  const headerMenuRefs = useRef<
225
225
  Map< string, { node: HTMLButtonElement; fallback: string } >
226
226
  >( new Map() );
227
- const headerMenuToFocusRef = useRef< HTMLButtonElement >();
227
+ const headerMenuToFocusRef = useRef< HTMLButtonElement >( undefined );
228
228
  const [ nextHeaderMenuToFocus, setNextHeaderMenuToFocus ] =
229
229
  useState< HTMLButtonElement >();
230
230
  const isMultiselect = useIsMultiselectPicker( actions ) ?? false;
@@ -38,7 +38,7 @@ function ColumnPrimary< Item >( {
38
38
  isItemClickable: ( item: Item ) => boolean;
39
39
  } ) {
40
40
  return (
41
- <Stack direction="row" gap="sm" align="flex-start" justify="flex-start">
41
+ <Stack direction="row" gap="md" align="flex-start" justify="flex-start">
42
42
  { mediaField && (
43
43
  <ItemClickWrapper
44
44
  item={ item }
@@ -290,7 +290,7 @@ function ViewTable< Item >( {
290
290
  const headerMenuRefs = useRef<
291
291
  Map< string, { node: HTMLButtonElement; fallback: string } >
292
292
  >( new Map() );
293
- const headerMenuToFocusRef = useRef< HTMLButtonElement >();
293
+ const headerMenuToFocusRef = useRef< HTMLButtonElement >( undefined );
294
294
  const [ nextHeaderMenuToFocus, setNextHeaderMenuToFocus ] =
295
295
  useState< HTMLButtonElement >();
296
296
  const hasBulkActions = useSomeItemHasAPossibleBulkAction( actions, data );
@@ -66,6 +66,7 @@ export function ItemClickWrapper< Item >( {
66
66
  } & ComponentProps< 'a' >
67
67
  ) => ReactElement;
68
68
  className?: string;
69
+ title?: string;
69
70
  children: ReactNode;
70
71
  } ) {
71
72
  // Always render a wrapper element so layout and styling relying on the wrapper