@automattic/jetpack-components 0.55.3 → 0.55.5

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,14 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.55.5] - 2024-08-05
6
+ ### Fixed
7
+ - Fixed TS types for Notice components by marking optional props as such [#38686]
8
+
9
+ ## [0.55.4] - 2024-08-01
10
+ ### Added
11
+ - Update Welcome Banner and set async site-only connection [#38534]
12
+
5
13
  ## [0.55.3] - 2024-07-30
6
14
  ### Changed
7
15
  - React: Changing global JSX namespace to React.JSX [#38585]
@@ -1106,6 +1114,8 @@
1106
1114
  ### Changed
1107
1115
  - Update node version requirement to 14.16.1
1108
1116
 
1117
+ [0.55.5]: https://github.com/Automattic/jetpack-components/compare/0.55.4...0.55.5
1118
+ [0.55.4]: https://github.com/Automattic/jetpack-components/compare/0.55.3...0.55.4
1109
1119
  [0.55.3]: https://github.com/Automattic/jetpack-components/compare/0.55.2...0.55.3
1110
1120
  [0.55.2]: https://github.com/Automattic/jetpack-components/compare/0.55.1...0.55.2
1111
1121
  [0.55.1]: https://github.com/Automattic/jetpack-components/compare/0.55.0...0.55.1
@@ -5,10 +5,10 @@ import styles from './style.module.scss';
5
5
 
6
6
  type NoticeProps = {
7
7
  /** The severity of the alert. */
8
- level: 'error' | 'warning' | 'info' | 'success';
8
+ level?: 'error' | 'warning' | 'info' | 'success';
9
9
 
10
10
  /** The title of the notice */
11
- title: string;
11
+ title?: string;
12
12
 
13
13
  /** A list of action elements to show across the bottom */
14
14
  actions?: React.ReactNode[];
@@ -10,8 +10,9 @@ const TermsOfService: React.FC< TermsOfServiceProps > = ( {
10
10
  className,
11
11
  multipleButtons,
12
12
  agreeButtonLabel,
13
+ ...textProps
13
14
  } ) => (
14
- <Text className={ clsx( className, 'terms-of-service' ) }>
15
+ <Text className={ clsx( className, 'terms-of-service' ) } { ...textProps }>
15
16
  { multipleButtons ? (
16
17
  <MultipleButtonsText multipleButtonsLabels={ multipleButtons } />
17
18
  ) : (
@@ -1,3 +1,5 @@
1
+ import { TextProps } from '../text/types';
2
+
1
3
  type MultipleButtonsProps = {
2
4
  /**
3
5
  * Indicates whether there are multiple buttons present that would imply agreement if clicked.
@@ -22,9 +24,24 @@ type SingleButtonProps = {
22
24
  agreeButtonLabel: string;
23
25
  };
24
26
 
25
- export type TermsOfServiceProps = {
26
- /**
27
- * Represents additional CSS classes to be added to the component's root.
28
- */
29
- className?: string;
30
- } & ( MultipleButtonsProps | SingleButtonProps );
27
+ export type TermsOfServiceProps = Pick<
28
+ TextProps,
29
+ | 'variant'
30
+ | 'm'
31
+ | 'mt'
32
+ | 'mr'
33
+ | 'mb'
34
+ | 'ml'
35
+ | 'mx'
36
+ | 'my'
37
+ | 'p'
38
+ | 'pt'
39
+ | 'pr'
40
+ | 'pb'
41
+ | 'pl'
42
+ | 'px'
43
+ | 'py'
44
+ | 'className'
45
+ | 'component'
46
+ > &
47
+ ( MultipleButtonsProps | SingleButtonProps );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.55.3",
3
+ "version": "0.55.5",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",