@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.
Files changed (55) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/color-picker/color-copy-button.js +3 -2
  3. package/build/color-picker/color-copy-button.js.map +1 -1
  4. package/build/notice/types.js.map +1 -1
  5. package/build/popover/types.js.map +1 -1
  6. package/build/snackbar/index.js +16 -11
  7. package/build/snackbar/index.js.map +1 -1
  8. package/build/snackbar/types.js.map +1 -1
  9. package/build/spinner/index.js +5 -5
  10. package/build/spinner/index.js.map +1 -1
  11. package/build/textarea-control/styles/textarea-control-styles.js +3 -3
  12. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  13. package/build/utils/with-ignore-ime-events.js +5 -5
  14. package/build/utils/with-ignore-ime-events.js.map +1 -1
  15. package/build-module/color-picker/color-copy-button.js +4 -3
  16. package/build-module/color-picker/color-copy-button.js.map +1 -1
  17. package/build-module/notice/types.js.map +1 -1
  18. package/build-module/popover/types.js.map +1 -1
  19. package/build-module/snackbar/index.js +16 -11
  20. package/build-module/snackbar/index.js.map +1 -1
  21. package/build-module/snackbar/types.js.map +1 -1
  22. package/build-module/spinner/index.js +5 -5
  23. package/build-module/spinner/index.js.map +1 -1
  24. package/build-module/textarea-control/styles/textarea-control-styles.js +3 -3
  25. package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
  26. package/build-module/utils/with-ignore-ime-events.js +5 -5
  27. package/build-module/utils/with-ignore-ime-events.js.map +1 -1
  28. package/build-style/style-rtl.css +75 -64
  29. package/build-style/style.css +75 -64
  30. package/build-types/notice/types.d.ts +3 -1
  31. package/build-types/notice/types.d.ts.map +1 -1
  32. package/build-types/popover/types.d.ts +4 -0
  33. package/build-types/popover/types.d.ts.map +1 -1
  34. package/build-types/snackbar/index.d.ts +1 -1
  35. package/build-types/snackbar/index.d.ts.map +1 -1
  36. package/build-types/snackbar/types.d.ts +1 -1
  37. package/build-types/snackbar/types.d.ts.map +1 -1
  38. package/build-types/spinner/index.d.ts +5 -5
  39. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  40. package/build-types/utils/with-ignore-ime-events.d.ts +4 -4
  41. package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
  42. package/package.json +19 -19
  43. package/src/color-picker/color-copy-button.tsx +4 -4
  44. package/src/notice/README.md +3 -2
  45. package/src/notice/types.ts +3 -1
  46. package/src/popover/README.md +11 -0
  47. package/src/popover/types.ts +4 -0
  48. package/src/snackbar/index.tsx +30 -17
  49. package/src/snackbar/style.scss +2 -1
  50. package/src/snackbar/types.ts +4 -1
  51. package/src/spinner/index.tsx +5 -5
  52. package/src/text-control/style.scss +3 -1
  53. package/src/textarea-control/styles/textarea-control-styles.ts +2 -0
  54. package/src/utils/with-ignore-ime-events.ts +5 -5
  55. package/tsconfig.tsbuildinfo +1 -1
@@ -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
- * ```js
54
- * import { Spinner } from '@wordpress/components';
53
+ * ```jsx
54
+ * import { Spinner } from '@wordpress/components';
55
55
  *
56
- * function Example() {
57
- * return <Spinner />;
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
- @include input-control;
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 keydown event handler to ensure it is not an IME event.
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, keydown events (e.g. Enter or Escape) can be fired
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 keydownHandler The keydown event handler to execute after ensuring it was not an IME event.
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
- >( keydownHandler: ( event: E ) => void ) {
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
- keydownHandler( event );
30
+ handler( event );
31
31
  };
32
32
  }