@wordpress/dataviews 4.20.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,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.22.0 (2025-06-25)
6
+
7
+ ## 4.21.0 (2025-06-04)
8
+
5
9
  ## 4.20.0 (2025-05-22)
6
10
 
7
11
  ## 4.19.0 (2025-05-07)
@@ -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":";;;;;;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MAEZ,IACCd,eAAe,IACfA,eAAe,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;A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AAW,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":[]}
@@ -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,O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,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":[]}
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
@@ -4264,15 +4264,6 @@ function InputField({
4264
4264
  }
4265
4265
  });
4266
4266
  const dragProps = isDragEnabled ? dragGestureProps() : {};
4267
- let handleOnMouseDown;
4268
- if (type === "number") {
4269
- handleOnMouseDown = (event) => {
4270
- props.onMouseDown?.(event);
4271
- if (event.currentTarget !== event.currentTarget.ownerDocument.activeElement) {
4272
- event.currentTarget.focus();
4273
- }
4274
- };
4275
- }
4276
4267
  return /* @__PURE__ */ _jsx54(Input, {
4277
4268
  ...props,
4278
4269
  ...dragProps,
@@ -4284,7 +4275,6 @@ function InputField({
4284
4275
  onBlur: handleOnBlur,
4285
4276
  onChange: handleOnChange,
4286
4277
  onKeyDown: withIgnoreIMEEvents(handleOnKeyDown),
4287
- onMouseDown: handleOnMouseDown,
4288
4278
  ref,
4289
4279
  inputSize: size3,
4290
4280
  value: value !== null && value !== void 0 ? value : "",
@@ -5257,6 +5247,9 @@ var number_control_default = NumberControl;
5257
5247
  import removeAccents from "remove-accents";
5258
5248
  import { paramCase } from "change-case";
5259
5249
  var ALL_UNICODE_DASH_CHARACTERS = new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu);
5250
+ var normalizeTextString = (value) => {
5251
+ return removeAccents(value).normalize("NFKC").toLocaleLowerCase().replace(ALL_UNICODE_DASH_CHARACTERS, "-");
5252
+ };
5260
5253
  function kebabCase2(str) {
5261
5254
  var _str$toString;
5262
5255
  let input = (_str$toString = str?.toString?.()) !== null && _str$toString !== void 0 ? _str$toString : "";
@@ -10538,7 +10531,9 @@ lock3(privateApis, {
10538
10531
  Theme: theme_default,
10539
10532
  Menu: Menu2,
10540
10533
  kebabCase: kebabCase2,
10541
- Badge: badge_default
10534
+ withIgnoreIMEEvents,
10535
+ Badge: badge_default,
10536
+ normalizeTextString
10542
10537
  });
10543
10538
 
10544
10539
  // src/constants.ts
@@ -15084,7 +15079,7 @@ function DataFormLayout({
15084
15079
  () => normalizeFormFields(form),
15085
15080
  [form]
15086
15081
  );
15087
- return /* @__PURE__ */ jsx30(component_default13, { spacing: 2, children: normalizedFormFields.map((formField) => {
15082
+ return /* @__PURE__ */ jsx30(component_default13, { spacing: 4, children: normalizedFormFields.map((formField) => {
15088
15083
  const FieldLayout = getFormFieldLayout(formField.layout)?.component;
15089
15084
  if (!FieldLayout) {
15090
15085
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dataviews",
3
- "version": "4.20.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.10.0",
50
- "@wordpress/compose": "^7.24.0",
51
- "@wordpress/data": "^10.24.0",
52
- "@wordpress/element": "^6.24.0",
53
- "@wordpress/i18n": "^5.24.0",
54
- "@wordpress/icons": "^10.24.0",
55
- "@wordpress/primitives": "^4.24.0",
56
- "@wordpress/private-apis": "^1.24.0",
57
- "@wordpress/warning": "^3.24.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": "9c03d1458cae76792ae15e67b421205836bf4393"
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 {