@wordpress/components 29.9.0 → 29.10.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 +13 -0
- package/build/color-picker/color-copy-button.js +3 -2
- package/build/color-picker/color-copy-button.js.map +1 -1
- package/build/notice/types.js.map +1 -1
- package/build/popover/types.js.map +1 -1
- package/build/snackbar/index.js +16 -11
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/types.js.map +1 -1
- package/build/spinner/index.js +5 -5
- package/build/spinner/index.js.map +1 -1
- package/build/textarea-control/styles/textarea-control-styles.js +3 -3
- package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build/utils/with-ignore-ime-events.js +5 -5
- package/build/utils/with-ignore-ime-events.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js +4 -3
- package/build-module/color-picker/color-copy-button.js.map +1 -1
- package/build-module/notice/types.js.map +1 -1
- package/build-module/popover/types.js.map +1 -1
- package/build-module/snackbar/index.js +16 -11
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/types.js.map +1 -1
- package/build-module/spinner/index.js +5 -5
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/textarea-control/styles/textarea-control-styles.js +3 -3
- package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build-module/utils/with-ignore-ime-events.js +5 -5
- package/build-module/utils/with-ignore-ime-events.js.map +1 -1
- package/build-style/style-rtl.css +75 -64
- package/build-style/style.css +75 -64
- package/build-types/notice/types.d.ts +3 -1
- package/build-types/notice/types.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +4 -0
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +1 -1
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/types.d.ts +1 -1
- package/build-types/snackbar/types.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +5 -5
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
- package/build-types/utils/with-ignore-ime-events.d.ts +4 -4
- package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/color-picker/color-copy-button.tsx +4 -4
- package/src/notice/README.md +3 -2
- package/src/notice/types.ts +3 -1
- package/src/popover/README.md +11 -0
- package/src/popover/types.ts +4 -0
- package/src/snackbar/index.tsx +30 -17
- package/src/snackbar/style.scss +2 -1
- package/src/snackbar/types.ts +4 -1
- package/src/spinner/index.tsx +5 -5
- package/src/text-control/style.scss +3 -1
- package/src/textarea-control/styles/textarea-control-styles.ts +2 -0
- package/src/utils/with-ignore-ime-events.ts +5 -5
- package/tsconfig.tsbuildinfo +1 -1
package/src/spinner/index.tsx
CHANGED
|
@@ -50,12 +50,12 @@ export function UnforwardedSpinner(
|
|
|
50
50
|
/**
|
|
51
51
|
* `Spinner` is a component used to notify users that their action is being processed.
|
|
52
52
|
*
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
53
|
+
* ```jsx
|
|
54
|
+
* import { Spinner } from '@wordpress/components';
|
|
55
55
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* function Example() {
|
|
57
|
+
* return <Spinner />;
|
|
58
|
+
* }
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
61
|
export const Spinner = forwardRef( UnforwardedSpinner );
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
height: $grid-unit-40;
|
|
17
17
|
// Override input style margin in WP forms.css.
|
|
18
18
|
margin: 0;
|
|
19
|
-
|
|
19
|
+
background: $components-color-background;
|
|
20
|
+
color: $components-color-foreground;
|
|
21
|
+
@include input-control( $components-color-accent);
|
|
20
22
|
|
|
21
23
|
&.is-next-40px-default-size {
|
|
22
24
|
height: $grid-unit-50;
|
|
@@ -37,6 +37,8 @@ export const StyledTextarea = styled.textarea`
|
|
|
37
37
|
display: block;
|
|
38
38
|
font-family: ${ font( 'default.fontFamily' ) };
|
|
39
39
|
line-height: 20px;
|
|
40
|
+
background: ${ COLORS.theme.background };
|
|
41
|
+
color: ${ COLORS.theme.foreground };
|
|
40
42
|
|
|
41
43
|
// Vertical padding is to match the standard 40px control height when rows=1,
|
|
42
44
|
// in conjunction with the 20px line-height.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A higher-order function that wraps a
|
|
2
|
+
* A higher-order function that wraps a keyboard event handler to ensure it is not an IME event.
|
|
3
3
|
*
|
|
4
4
|
* In CJK languages, an IME (Input Method Editor) is used to input complex characters.
|
|
5
|
-
* During an IME composition,
|
|
5
|
+
* During an IME composition, keyboard events (e.g. Enter or Escape) can be fired
|
|
6
6
|
* which are intended to control the IME and not the application.
|
|
7
7
|
* These events should be ignored by any application logic.
|
|
8
8
|
*
|
|
9
|
-
* @param
|
|
9
|
+
* @param handler The keyboard event handler to execute after ensuring it was not an IME event.
|
|
10
10
|
*
|
|
11
11
|
* @return A wrapped version of the given event handler that ignores IME events.
|
|
12
12
|
*/
|
|
13
13
|
export function withIgnoreIMEEvents<
|
|
14
14
|
E extends React.KeyboardEvent | KeyboardEvent,
|
|
15
|
-
>(
|
|
15
|
+
>( handler: ( event: E ) => void ) {
|
|
16
16
|
return ( event: E ) => {
|
|
17
17
|
const { isComposing } =
|
|
18
18
|
'nativeEvent' in event ? event.nativeEvent : event;
|
|
@@ -27,6 +27,6 @@ export function withIgnoreIMEEvents<
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
handler( event );
|
|
31
31
|
};
|
|
32
32
|
}
|