@wordpress/dataviews 4.21.0 → 4.22.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.22.0 (2025-06-25)
6
+
5
7
  ## 4.21.0 (2025-06-04)
6
8
 
7
9
  ## 4.20.0 (2025-05-22)
@@ -35,7 +35,7 @@ function DataFormLayout({
35
35
  }
36
36
  const normalizedFormFields = (0, _element.useMemo)(() => (0, _normalizeFormFields.default)(form), [form]);
37
37
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalVStack, {
38
- spacing: 2,
38
+ spacing: 4,
39
39
  children: normalizedFormFields.map(formField => {
40
40
  const FieldLayout = (0, _index.getFormFieldLayout)(formField.layout)?.component;
41
41
  if (!FieldLayout) {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_element","_index","_dataformContext","_interopRequireDefault","_isCombinedField","_normalizeFormFields","_jsxRuntime","DataFormLayout","data","form","onChange","children","fields","fieldDefinitions","useContext","DataFormContext","getFieldDefinition","field","fieldId","id","find","fieldDefinition","normalizedFormFields","useMemo","normalizeFormFields","jsx","__experimentalVStack","spacing","map","formField","FieldLayout","getFormFieldLayout","layout","component","isCombinedField","undefined","isVisible"],"sources":["@wordpress/dataviews/src/dataforms-layouts/data-form-layout.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { Form, FormField, SimpleFormField } from '../types';\nimport { getFormFieldLayout } from './index';\nimport DataFormContext from '../components/dataform-context';\nimport { isCombinedField } from './is-combined-field';\nimport normalizeFormFields from '../normalize-form-fields';\n\nexport function DataFormLayout< Item >( {\n\tdata,\n\tform,\n\tonChange,\n\tchildren,\n}: {\n\tdata: Item;\n\tform: Form;\n\tonChange: ( value: any ) => void;\n\tchildren?: (\n\t\tFieldLayout: ( props: {\n\t\t\tdata: Item;\n\t\t\tfield: FormField;\n\t\t\tonChange: ( value: any ) => void;\n\t\t\thideLabelFromVision?: boolean;\n\t\t} ) => React.JSX.Element | null,\n\t\tfield: FormField\n\t) => React.JSX.Element;\n} ) {\n\tconst { fields: fieldDefinitions } = useContext( DataFormContext );\n\n\tfunction getFieldDefinition( field: SimpleFormField | string ) {\n\t\tconst fieldId = typeof field === 'string' ? field : field.id;\n\n\t\treturn fieldDefinitions.find(\n\t\t\t( fieldDefinition ) => fieldDefinition.id === fieldId\n\t\t);\n\t}\n\n\tconst normalizedFormFields = useMemo(\n\t\t() => normalizeFormFields( form ),\n\t\t[ form ]\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t{ normalizedFormFields.map( ( formField ) => {\n\t\t\t\tconst FieldLayout = getFormFieldLayout( formField.layout )\n\t\t\t\t\t?.component;\n\n\t\t\t\tif ( ! FieldLayout ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst fieldDefinition = ! isCombinedField( formField )\n\t\t\t\t\t? getFieldDefinition( formField )\n\t\t\t\t\t: undefined;\n\n\t\t\t\tif (\n\t\t\t\t\tfieldDefinition &&\n\t\t\t\t\tfieldDefinition.isVisible &&\n\t\t\t\t\t! fieldDefinition.isVisible( data )\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif ( children ) {\n\t\t\t\t\treturn children( FieldLayout, formField );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<FieldLayout\n\t\t\t\t\t\tkey={ formField.id }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tfield={ formField }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAA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CAACe,SAAS,IACzB,CAAEf,eAAe,CAACe,SAAS,CAAE5B,IAAK,CAAC,EAClC;QACD,OAAO,IAAI;MACZ;MAEA,IAAKG,QAAQ,EAAG;QACf,OAAOA,QAAQ,CAAEmB,WAAW,EAAED,SAAU,CAAC;MAC1C;MAEA,oBACC,IAAAvB,WAAA,CAAAmB,GAAA,EAACK,WAAW;QAEXtB,IAAI,EAAGA,IAAM;QACbS,KAAK,EAAGY,SAAW;QACnBnB,QAAQ,EAAGA;MAAU,GAHfmB,SAAS,CAACV,EAIhB,CAAC;IAEJ,CAAE;EAAC,CACI,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_element","_index","_dataformContext","_interopRequireDefault","_isCombinedField","_normalizeFormFields","_jsxRuntime","DataFormLayout","data","form","onChange","children","fields","fieldDefinitions","useContext","DataFormContext","getFieldDefinition","field","fieldId","id","find","fieldDefinition","normalizedFormFields","useMemo","normalizeFormFields","jsx","__experimentalVStack","spacing","map","formField","FieldLayout","getFormFieldLayout","layout","component","isCombinedField","undefined","isVisible"],"sources":["@wordpress/dataviews/src/dataforms-layouts/data-form-layout.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { Form, FormField, SimpleFormField } from '../types';\nimport { getFormFieldLayout } from './index';\nimport DataFormContext from '../components/dataform-context';\nimport { isCombinedField } from './is-combined-field';\nimport normalizeFormFields from '../normalize-form-fields';\n\nexport function DataFormLayout< Item >( {\n\tdata,\n\tform,\n\tonChange,\n\tchildren,\n}: {\n\tdata: Item;\n\tform: Form;\n\tonChange: ( value: any ) => void;\n\tchildren?: (\n\t\tFieldLayout: ( props: {\n\t\t\tdata: Item;\n\t\t\tfield: FormField;\n\t\t\tonChange: ( value: any ) => void;\n\t\t\thideLabelFromVision?: boolean;\n\t\t} ) => React.JSX.Element | null,\n\t\tfield: FormField\n\t) => React.JSX.Element;\n} ) {\n\tconst { fields: fieldDefinitions } = useContext( DataFormContext );\n\n\tfunction getFieldDefinition( field: SimpleFormField | string ) {\n\t\tconst fieldId = typeof field === 'string' ? field : field.id;\n\n\t\treturn fieldDefinitions.find(\n\t\t\t( fieldDefinition ) => fieldDefinition.id === fieldId\n\t\t);\n\t}\n\n\tconst normalizedFormFields = useMemo(\n\t\t() => normalizeFormFields( form ),\n\t\t[ form ]\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 4 }>\n\t\t\t{ normalizedFormFields.map( ( formField ) => {\n\t\t\t\tconst FieldLayout = getFormFieldLayout( formField.layout )\n\t\t\t\t\t?.component;\n\n\t\t\t\tif ( ! FieldLayout ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst fieldDefinition = ! isCombinedField( formField )\n\t\t\t\t\t? getFieldDefinition( formField )\n\t\t\t\t\t: undefined;\n\n\t\t\t\tif (\n\t\t\t\t\tfieldDefinition &&\n\t\t\t\t\tfieldDefinition.isVisible &&\n\t\t\t\t\t! fieldDefinition.isVisible( data )\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif ( children ) {\n\t\t\t\t\treturn children( FieldLayout, formField );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<FieldLayout\n\t\t\t\t\t\tkey={ formField.id }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tfield={ formField }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAF,sBAAA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AEA,oBACC,IAAAvB,WAAA,CAAAmB,GAAA,EAACK,WAAW;QAEXtB,IAAI,EAAGA,IAAM;QACbS,KAAK,EAAGY,SAAW;QACnBnB,QAAQ,EAAGA;MAAU,GAHfmB,SAAS,CAACV,EAIhB,CAAC;IAEJ,CAAE;EAAC,CACI,CAAC;AAEX","ignoreList":[]}
@@ -28,7 +28,7 @@ export function DataFormLayout({
28
28
  }
29
29
  const normalizedFormFields = useMemo(() => normalizeFormFields(form), [form]);
30
30
  return /*#__PURE__*/_jsx(VStack, {
31
- spacing: 2,
31
+ spacing: 4,
32
32
  children: normalizedFormFields.map(formField => {
33
33
  const FieldLayout = getFormFieldLayout(formField.layout)?.component;
34
34
  if (!FieldLayout) {
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalVStack","VStack","useContext","useMemo","getFormFieldLayout","DataFormContext","isCombinedField","normalizeFormFields","jsx","_jsx","DataFormLayout","data","form","onChange","children","fields","fieldDefinitions","getFieldDefinition","field","fieldId","id","find","fieldDefinition","normalizedFormFields","spacing","map","formField","FieldLayout","layout","component","undefined","isVisible"],"sources":["@wordpress/dataviews/src/dataforms-layouts/data-form-layout.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { Form, FormField, SimpleFormField } from '../types';\nimport { getFormFieldLayout } from './index';\nimport DataFormContext from '../components/dataform-context';\nimport { isCombinedField } from './is-combined-field';\nimport normalizeFormFields from '../normalize-form-fields';\n\nexport function DataFormLayout< Item >( {\n\tdata,\n\tform,\n\tonChange,\n\tchildren,\n}: {\n\tdata: Item;\n\tform: Form;\n\tonChange: ( value: any ) => void;\n\tchildren?: (\n\t\tFieldLayout: ( props: {\n\t\t\tdata: Item;\n\t\t\tfield: FormField;\n\t\t\tonChange: ( value: any ) => void;\n\t\t\thideLabelFromVision?: boolean;\n\t\t} ) => React.JSX.Element | null,\n\t\tfield: FormField\n\t) => React.JSX.Element;\n} ) {\n\tconst { fields: fieldDefinitions } = useContext( DataFormContext );\n\n\tfunction getFieldDefinition( field: SimpleFormField | string ) {\n\t\tconst fieldId = typeof field === 'string' ? field : field.id;\n\n\t\treturn fieldDefinitions.find(\n\t\t\t( fieldDefinition ) => fieldDefinition.id === fieldId\n\t\t);\n\t}\n\n\tconst normalizedFormFields = useMemo(\n\t\t() => normalizeFormFields( form ),\n\t\t[ form ]\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t{ normalizedFormFields.map( ( formField ) => {\n\t\t\t\tconst FieldLayout = getFormFieldLayout( formField.layout )\n\t\t\t\t\t?.component;\n\n\t\t\t\tif ( ! FieldLayout ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst fieldDefinition = ! isCombinedField( formField )\n\t\t\t\t\t? getFieldDefinition( formField )\n\t\t\t\t\t: undefined;\n\n\t\t\t\tif (\n\t\t\t\t\tfieldDefinition &&\n\t\t\t\t\tfieldDefinition.isVisible &&\n\t\t\t\t\t! fieldDefinition.isVisible( data )\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif ( children ) {\n\t\t\t\t\treturn children( FieldLayout, formField );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<FieldLayout\n\t\t\t\t\t\tkey={ formField.id }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tfield={ formField }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;;AAExD;AACA;AACA;;AAEA,SAASC,kBAAkB,QAAQ,SAAS;AAC5C,OAAOC,eAAe,MAAM,gCAAgC;AAC5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AGA,IAAM;QACbO,KAAK,EAAGQ,SAAW;QACnBb,QAAQ,EAAGA;MAAU,GAHfa,SAAS,CAACN,EAIhB,CAAC;IAEJ,CAAE;EAAC,CACI,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalVStack","VStack","useContext","useMemo","getFormFieldLayout","DataFormContext","isCombinedField","normalizeFormFields","jsx","_jsx","DataFormLayout","data","form","onChange","children","fields","fieldDefinitions","getFieldDefinition","field","fieldId","id","find","fieldDefinition","normalizedFormFields","spacing","map","formField","FieldLayout","layout","component","undefined","isVisible"],"sources":["@wordpress/dataviews/src/dataforms-layouts/data-form-layout.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { Form, FormField, SimpleFormField } from '../types';\nimport { getFormFieldLayout } from './index';\nimport DataFormContext from '../components/dataform-context';\nimport { isCombinedField } from './is-combined-field';\nimport normalizeFormFields from '../normalize-form-fields';\n\nexport function DataFormLayout< Item >( {\n\tdata,\n\tform,\n\tonChange,\n\tchildren,\n}: {\n\tdata: Item;\n\tform: Form;\n\tonChange: ( value: any ) => void;\n\tchildren?: (\n\t\tFieldLayout: ( props: {\n\t\t\tdata: Item;\n\t\t\tfield: FormField;\n\t\t\tonChange: ( value: any ) => void;\n\t\t\thideLabelFromVision?: boolean;\n\t\t} ) => React.JSX.Element | null,\n\t\tfield: FormField\n\t) => React.JSX.Element;\n} ) {\n\tconst { fields: fieldDefinitions } = useContext( DataFormContext );\n\n\tfunction getFieldDefinition( field: SimpleFormField | string ) {\n\t\tconst fieldId = typeof field === 'string' ? field : field.id;\n\n\t\treturn fieldDefinitions.find(\n\t\t\t( fieldDefinition ) => fieldDefinition.id === fieldId\n\t\t);\n\t}\n\n\tconst normalizedFormFields = useMemo(\n\t\t() => normalizeFormFields( form ),\n\t\t[ form ]\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 4 }>\n\t\t\t{ normalizedFormFields.map( ( formField ) => {\n\t\t\t\tconst FieldLayout = getFormFieldLayout( formField.layout )\n\t\t\t\t\t?.component;\n\n\t\t\t\tif ( ! FieldLayout ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst fieldDefinition = ! isCombinedField( formField )\n\t\t\t\t\t? getFieldDefinition( formField )\n\t\t\t\t\t: undefined;\n\n\t\t\t\tif (\n\t\t\t\t\tfieldDefinition &&\n\t\t\t\t\tfieldDefinition.isVisible &&\n\t\t\t\t\t! fieldDefinition.isVisible( data )\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif ( children ) {\n\t\t\t\t\treturn children( FieldLayout, formField );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<FieldLayout\n\t\t\t\t\t\tkey={ formField.id }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tfield={ formField }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;;AAExD;AACA;AACA;;AAEA,SAASC,kBAAkB,QAAQ,SAAS;AAC5C,OAAOC,eAAe,MAAM,gCAAgC;AAC5D,SAASC,eAAe,QAAQ,qBAAqB;AACrD,OAAOC,mBAAmB,MAAM,0BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3D,OAAO,SAASC,cAAcA,CAAU;EACvCC,IAAI;EACJC,IAAI;EACJC,QAAQ;EACRC;AAcD,CAAC,EAAG;EACH,MAAM;IAAEC,MAAM,EAAEC;EAAiB,CAAC,GAAGd,UAAU,CAAEG,eAAgB,CAAC;EAElE,SAASY,kBAAkBA,CAAEC,KAA+B,EAAG;IAC9D,MAAMC,OAAO,GAAG,OAAOD,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGA,KAAK,CAACE,EAAE;IAE5D,OAAOJ,gBAAgB,CAACK,IAAI,CACzBC,eAAe,IAAMA,eAAe,CAACF,EAAE,KAAKD,OAC/C,CAAC;EACF;EAEA,MAAMI,oBAAoB,GAAGpB,OAAO,CACnC,MAAMI,mBAAmB,CAAEK,IAAK,CAAC,EACjC,CAAEA,IAAI,CACP,CAAC;EAED,oBACCH,IAAA,CAACR,MAAM;IAACuB,OAAO,EAAG,CAAG;IAAAV,QAAA,EAClBS,oBAAoB,CAACE,GAAG,CAAIC,SAAS,IAAM;MAC5C,MAAMC,WAAW,GAAGvB,kBAAkB,CAAEsB,SAAS,CAACE,MAAO,CAAC,EACvDC,SAAS;MAEZ,IAAK,CAAEF,WAAW,EAAG;QACpB,OAAO,IAAI;MACZ;MAEA,MAAML,eAAe,GAAG,CAAEhB,eAAe,CAAEoB,SAAU,CAAC,GACnDT,kBAAkB,CAAES,SAAU,CAAC,GAC/BI,SAAS;MAEZ,IACCR,eAAe,IACfA,eAAe,CAACS,SAAS,IACzB,CAAET,eAAe,CAACS,SAAS,CAAEpB,IAAK,CAAC,EAClC;QACD,OAAO,IAAI;MACZ;MAEA,IAAKG,QAAQ,EAAG;QACf,OAAOA,QAAQ,CAAEa,WAAW,EAAED,SAAU,CAAC;MAC1C;MAEA,oBACCjB,IAAA,CAACkB,WAAW;QAEXhB,IAAI,EAAGA,IAAM;QACbO,KAAK,EAAGQ,SAAW;QACnBb,QAAQ,EAAGA;MAAU,GAHfa,SAAS,CAACN,EAIhB,CAAC;IAEJ,CAAE;EAAC,CACI,CAAC;AAEX","ignoreList":[]}
@@ -1304,9 +1304,9 @@ div.dataviews-view-list {
1304
1304
  min-height: 32px;
1305
1305
  display: flex;
1306
1306
  align-items: center;
1307
- padding: 6px 0;
1308
1307
  line-height: 20px;
1309
1308
  hyphens: auto;
1309
+ align-self: center;
1310
1310
  }
1311
1311
 
1312
1312
  .dataforms-layouts-panel__field-control {
@@ -1359,9 +1359,9 @@ div.dataviews-view-list {
1359
1359
  min-height: 32px;
1360
1360
  display: flex;
1361
1361
  align-items: center;
1362
- padding: 6px 0;
1363
1362
  line-height: 20px;
1364
1363
  hyphens: auto;
1364
+ align-self: center;
1365
1365
  }
1366
1366
 
1367
1367
  .dataforms-layouts-regular__field-control {
@@ -1304,9 +1304,9 @@ div.dataviews-view-list {
1304
1304
  min-height: 32px;
1305
1305
  display: flex;
1306
1306
  align-items: center;
1307
- padding: 6px 0;
1308
1307
  line-height: 20px;
1309
1308
  hyphens: auto;
1309
+ align-self: center;
1310
1310
  }
1311
1311
 
1312
1312
  .dataforms-layouts-panel__field-control {
@@ -1359,9 +1359,9 @@ div.dataviews-view-list {
1359
1359
  min-height: 32px;
1360
1360
  display: flex;
1361
1361
  align-items: center;
1362
- padding: 6px 0;
1363
1362
  line-height: 20px;
1364
1363
  hyphens: auto;
1364
+ align-self: center;
1365
1365
  }
1366
1366
 
1367
1367
  .dataforms-layouts-regular__field-control {
package/build-wp/index.js CHANGED
@@ -15079,7 +15079,7 @@ function DataFormLayout({
15079
15079
  () => normalizeFormFields(form),
15080
15080
  [form]
15081
15081
  );
15082
- return /* @__PURE__ */ jsx30(component_default13, { spacing: 2, children: normalizedFormFields.map((formField) => {
15082
+ return /* @__PURE__ */ jsx30(component_default13, { spacing: 4, children: normalizedFormFields.map((formField) => {
15083
15083
  const FieldLayout = getFormFieldLayout(formField.layout)?.component;
15084
15084
  if (!FieldLayout) {
15085
15085
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dataviews",
3
- "version": "4.21.0",
3
+ "version": "4.22.0",
4
4
  "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -46,15 +46,15 @@
46
46
  "dependencies": {
47
47
  "@ariakit/react": "^0.4.15",
48
48
  "@babel/runtime": "7.25.7",
49
- "@wordpress/components": "^29.11.0",
50
- "@wordpress/compose": "^7.25.0",
51
- "@wordpress/data": "^10.25.0",
52
- "@wordpress/element": "^6.25.0",
53
- "@wordpress/i18n": "^5.25.0",
54
- "@wordpress/icons": "^10.25.0",
55
- "@wordpress/primitives": "^4.25.0",
56
- "@wordpress/private-apis": "^1.25.0",
57
- "@wordpress/warning": "^3.25.0",
49
+ "@wordpress/components": "^29.12.0",
50
+ "@wordpress/compose": "^7.26.0",
51
+ "@wordpress/data": "^10.26.0",
52
+ "@wordpress/element": "^6.26.0",
53
+ "@wordpress/i18n": "^5.26.0",
54
+ "@wordpress/icons": "^10.26.0",
55
+ "@wordpress/primitives": "^4.26.0",
56
+ "@wordpress/private-apis": "^1.26.0",
57
+ "@wordpress/warning": "^3.26.0",
58
58
  "clsx": "^2.1.1",
59
59
  "remove-accents": "^0.5.0"
60
60
  },
@@ -67,5 +67,5 @@
67
67
  "scripts": {
68
68
  "build:wp": "node build"
69
69
  },
70
- "gitHead": "d1acd76ffff33ab01f0a948d2f51e5e45c95158d"
70
+ "gitHead": "35e26942820d8237771af0c58e45b4303f0497f1"
71
71
  }
@@ -48,7 +48,7 @@ export function DataFormLayout< Item >( {
48
48
  );
49
49
 
50
50
  return (
51
- <VStack spacing={ 2 }>
51
+ <VStack spacing={ 4 }>
52
52
  { normalizedFormFields.map( ( formField ) => {
53
53
  const FieldLayout = getFormFieldLayout( formField.layout )
54
54
  ?.component;
@@ -11,9 +11,9 @@
11
11
  min-height: $grid-unit-40;
12
12
  display: flex;
13
13
  align-items: center;
14
- padding: 6px 0; // Matches button to ensure alignment
15
14
  line-height: $grid-unit-05 * 5;
16
15
  hyphens: auto;
16
+ align-self: center;
17
17
  }
18
18
 
19
19
  .dataforms-layouts-panel__field-control {
@@ -17,9 +17,9 @@
17
17
  min-height: $grid-unit-40;
18
18
  display: flex;
19
19
  align-items: center;
20
- padding: 6px 0; // Matches button to ensure alignment
21
20
  line-height: $grid-unit-05 * 5;
22
21
  hyphens: auto;
22
+ align-self: center;
23
23
  }
24
24
 
25
25
  .dataforms-layouts-regular__field-control {