@wordpress/components 19.8.1 → 19.8.2
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/build/palette-edit/index.js +2 -1
- package/build/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/index.js +3 -2
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-types/input-control/stories/index.d.ts +5 -5
- package/build-types/input-control/stories/index.d.ts.map +1 -1
- package/build-types/text/test/index.d.ts +2 -0
- package/build-types/text/test/index.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +4 -0
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/palette-edit/index.js +8 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build-types/spinner/styles/spinner-styles.d.ts +0 -5
- package/build-types/spinner/styles/spinner-styles.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "19.8.
|
|
3
|
+
"version": "19.8.2",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@wordpress/escape-html": "^2.6.1",
|
|
47
47
|
"@wordpress/hooks": "^3.6.1",
|
|
48
48
|
"@wordpress/i18n": "^4.6.1",
|
|
49
|
-
"@wordpress/icons": "^8.2.
|
|
49
|
+
"@wordpress/icons": "^8.2.2",
|
|
50
50
|
"@wordpress/is-shallow-equal": "^4.6.1",
|
|
51
51
|
"@wordpress/keycodes": "^3.6.1",
|
|
52
52
|
"@wordpress/primitives": "^3.4.1",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "37e930b93fbba88fa024a91eb527a90f855c97f3"
|
|
80
80
|
}
|
|
@@ -9,7 +9,10 @@ import { kebabCase } from 'lodash';
|
|
|
9
9
|
import { useState, useRef, useEffect } from '@wordpress/element';
|
|
10
10
|
import { __, sprintf } from '@wordpress/i18n';
|
|
11
11
|
import { lineSolid, moreVertical, plus } from '@wordpress/icons';
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
__experimentalUseFocusOutside as useFocusOutside,
|
|
14
|
+
useDebounce,
|
|
15
|
+
} from '@wordpress/compose';
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Internal dependencies
|
|
@@ -197,6 +200,9 @@ function PaletteEditListView( {
|
|
|
197
200
|
}
|
|
198
201
|
};
|
|
199
202
|
}, [] );
|
|
203
|
+
|
|
204
|
+
const debounceOnChange = useDebounce( onChange, 100 );
|
|
205
|
+
|
|
200
206
|
return (
|
|
201
207
|
<VStack spacing={ 3 }>
|
|
202
208
|
<ItemGroup isRounded>
|
|
@@ -212,7 +218,7 @@ function PaletteEditListView( {
|
|
|
212
218
|
}
|
|
213
219
|
} }
|
|
214
220
|
onChange={ ( newElement ) => {
|
|
215
|
-
|
|
221
|
+
debounceOnChange(
|
|
216
222
|
elements.map(
|
|
217
223
|
( currentElement, currentIndex ) => {
|
|
218
224
|
if ( currentIndex === index ) {
|