@automattic/jetpack-components 2.3.0 → 3.0.1

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 (91) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/components/admin-page/style.module.scss +3 -3
  3. package/build/index.d.ts +0 -12
  4. package/build/index.js +0 -12
  5. package/components/admin-page/style.module.scss +3 -3
  6. package/index.ts +0 -12
  7. package/package.json +16 -16
  8. package/build/components/alert/index.d.ts +0 -23
  9. package/build/components/alert/index.js +0 -33
  10. package/build/components/alert/style.module.scss +0 -47
  11. package/build/components/chip/index.d.ts +0 -17
  12. package/build/components/chip/index.js +0 -18
  13. package/build/components/chip/style.module.scss +0 -14
  14. package/build/components/contextual-upgrade-trigger/index.d.ts +0 -19
  15. package/build/components/contextual-upgrade-trigger/index.js +0 -27
  16. package/build/components/contextual-upgrade-trigger/style.module.scss +0 -77
  17. package/build/components/contextual-upgrade-trigger/types.d.ts +0 -9
  18. package/build/components/contextual-upgrade-trigger/types.js +0 -1
  19. package/build/components/dialog/index.d.ts +0 -20
  20. package/build/components/dialog/index.js +0 -32
  21. package/build/components/dialog/style.module.scss +0 -31
  22. package/build/components/jetpack-protect-logo/index.d.ts +0 -4
  23. package/build/components/jetpack-protect-logo/index.js +0 -10
  24. package/build/components/jetpack-protect-logo/types.d.ts +0 -7
  25. package/build/components/jetpack-protect-logo/types.js +0 -1
  26. package/build/components/jetpack-search-logo/index.d.ts +0 -4
  27. package/build/components/jetpack-search-logo/index.js +0 -7
  28. package/build/components/jetpack-search-logo/types.d.ts +0 -7
  29. package/build/components/jetpack-search-logo/types.js +0 -1
  30. package/build/components/jetpack-videopress-logo/index.d.ts +0 -4
  31. package/build/components/jetpack-videopress-logo/index.js +0 -8
  32. package/build/components/jetpack-videopress-logo/types.d.ts +0 -6
  33. package/build/components/jetpack-videopress-logo/types.js +0 -1
  34. package/build/components/product-offer/icons-card.d.ts +0 -10
  35. package/build/components/product-offer/icons-card.js +0 -23
  36. package/build/components/product-offer/index.d.ts +0 -11
  37. package/build/components/product-offer/index.js +0 -31
  38. package/build/components/product-offer/product-offer-header.d.ts +0 -9
  39. package/build/components/product-offer/product-offer-header.js +0 -14
  40. package/build/components/product-offer/style.module.scss +0 -93
  41. package/build/components/product-offer/types.d.ts +0 -102
  42. package/build/components/product-offer/types.js +0 -1
  43. package/build/components/radio-control/index.d.ts +0 -24
  44. package/build/components/radio-control/index.js +0 -7
  45. package/build/components/split-button/index.d.ts +0 -4
  46. package/build/components/split-button/index.js +0 -14
  47. package/build/components/split-button/style.module.scss +0 -26
  48. package/build/components/split-button/types.d.ts +0 -5
  49. package/build/components/split-button/types.js +0 -1
  50. package/build/components/status/index.d.ts +0 -19
  51. package/build/components/status/index.js +0 -29
  52. package/build/components/status/style.module.scss +0 -82
  53. package/build/components/toggle-control/index.d.ts +0 -23
  54. package/build/components/toggle-control/index.js +0 -21
  55. package/build/components/toggle-control/styles.module.scss +0 -24
  56. package/components/alert/index.tsx +0 -60
  57. package/components/alert/style.module.scss +0 -47
  58. package/components/chip/README.md +0 -21
  59. package/components/chip/index.tsx +0 -25
  60. package/components/chip/style.module.scss +0 -14
  61. package/components/contextual-upgrade-trigger/README.md +0 -81
  62. package/components/contextual-upgrade-trigger/index.tsx +0 -59
  63. package/components/contextual-upgrade-trigger/style.module.scss +0 -77
  64. package/components/contextual-upgrade-trigger/types.ts +0 -9
  65. package/components/dialog/index.tsx +0 -70
  66. package/components/dialog/style.module.scss +0 -31
  67. package/components/jetpack-protect-logo/README.md +0 -20
  68. package/components/jetpack-protect-logo/index.tsx +0 -60
  69. package/components/jetpack-protect-logo/types.ts +0 -7
  70. package/components/jetpack-search-logo/README.md +0 -20
  71. package/components/jetpack-search-logo/index.tsx +0 -93
  72. package/components/jetpack-search-logo/types.ts +0 -7
  73. package/components/jetpack-videopress-logo/README.md +0 -19
  74. package/components/jetpack-videopress-logo/index.tsx +0 -95
  75. package/components/jetpack-videopress-logo/types.tsx +0 -6
  76. package/components/product-offer/icons-card.tsx +0 -48
  77. package/components/product-offer/index.tsx +0 -115
  78. package/components/product-offer/product-offer-header.tsx +0 -23
  79. package/components/product-offer/style.module.scss +0 -93
  80. package/components/product-offer/types.ts +0 -126
  81. package/components/radio-control/README.md +0 -5
  82. package/components/radio-control/index.tsx +0 -55
  83. package/components/split-button/index.tsx +0 -48
  84. package/components/split-button/style.module.scss +0 -26
  85. package/components/split-button/types.ts +0 -12
  86. package/components/status/README.md +0 -42
  87. package/components/status/index.tsx +0 -52
  88. package/components/status/style.module.scss +0 -82
  89. package/components/toggle-control/README.md +0 -5
  90. package/components/toggle-control/index.tsx +0 -80
  91. package/components/toggle-control/styles.module.scss +0 -24
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [3.0.1] - 2026-09-09
6
+ ### Changed
7
+ - Update dependencies.
8
+
9
+ ## [3.0.0] - 2026-09-08
10
+ ### Changed
11
+ - Update package dependencies. [#51701]
12
+
13
+ ### Removed
14
+ - Remove the deprecated Chip component in favor of Badge from @wordpress/ui. [#51927]
15
+ - Remove unused components. [#51976]
16
+
17
+ ### Fixed
18
+ - Admin page: Fix the page overlapping the admin menu in right-to-left languages. [#51963]
19
+
5
20
  ## [2.3.0] - 2026-09-01
6
21
  ### Added
7
22
  - Upsell Banner: Add an optional dismiss button. [#51441]
@@ -1912,6 +1927,8 @@
1912
1927
  ### Changed
1913
1928
  - Update node version requirement to 14.16.1
1914
1929
 
1930
+ [3.0.1]: https://github.com/Automattic/jetpack-components/compare/3.0.0...3.0.1
1931
+ [3.0.0]: https://github.com/Automattic/jetpack-components/compare/2.3.0...3.0.0
1915
1932
  [2.3.0]: https://github.com/Automattic/jetpack-components/compare/2.2.0...2.3.0
1916
1933
  [2.2.0]: https://github.com/Automattic/jetpack-components/compare/2.1.1...2.2.0
1917
1934
  [2.1.1]: https://github.com/Automattic/jetpack-components/compare/2.1.0...2.1.1
@@ -1,8 +1,8 @@
1
1
  .admin-page {
2
- margin-left: -20px; // to neutralize the padding of #wpcontent.
2
+ margin-inline-start: -20px; // to neutralize the padding of #wpcontent.
3
3
 
4
4
  @media (max-width: 782px) {
5
- margin-left: -10px; // to neutralize the padding of #wpcontent.
5
+ margin-inline-start: -10px; // to neutralize the padding of #wpcontent.
6
6
  }
7
7
 
8
8
  &.background {
@@ -104,7 +104,7 @@
104
104
  // line-height: 1.6666;` — see https://github.com/WordPress/WordPress/blob/trunk/wp-content/plugins/hello.php
105
105
  // We override only the bits that need to differ from those defaults.
106
106
  float: none;
107
- text-align: right;
107
+ text-align: end;
108
108
  background: var(--wpds-color-background-surface-neutral-strong, #fff);
109
109
  font-style: italic;
110
110
  color: var(--wpds-color-foreground-content-neutral-weak, #87a6bc);
package/build/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  export { default as JetpackLogo } from './components/jetpack-logo/index.tsx';
2
- export { default as JetpackSearchLogo } from './components/jetpack-search-logo/index.tsx';
3
- export { default as JetpackProtectLogo } from './components/jetpack-protect-logo/index.tsx';
4
2
  export { default as JetpackVaultPressBackupLogo } from './components/jetpack-vaultpress-backup-logo/index.tsx';
5
- export { default as JetpackVideoPressLogo } from './components/jetpack-videopress-logo/index.tsx';
6
3
  export { default as getRedirectUrl } from './tools/jp-redirect/index.ts';
7
4
  export { default as getProductCheckoutUrl } from './tools/get-product-checkout-url/index.ts';
8
5
  export { isFirstMonthTrial } from './tools/pricing-utils/index.ts';
@@ -24,38 +21,29 @@ export { default as Testimonials } from './components/testimonials/index.tsx';
24
21
  export { default as Container } from './components/layout/container/index.tsx';
25
22
  export { default as CopyToClipboard } from './components/copy-to-clipboard/index.tsx';
26
23
  export * from './components/icons/index.tsx';
27
- export { default as SplitButton } from './components/split-button/index.tsx';
28
24
  export { default as ThemeProvider } from './components/theme-provider/index.tsx';
29
25
  export { default as Text, H2, H3, Title } from './components/text/index.tsx';
30
- export { default as ToggleControl } from './components/toggle-control/index.tsx';
31
26
  export { default as NumberControl } from './components/number-control/index.tsx';
32
27
  export { default as QRCode } from './components/qr-code/index.tsx';
33
28
  export { default as Button } from './components/button/index.tsx';
34
29
  export type { ButtonProps } from './components/button/types.ts';
35
30
  export { default as LoadingPlaceholder } from './components/loading-placeholder/index.tsx';
36
31
  export { default as TermsOfService } from './components/terms-of-service/index.tsx';
37
- export { default as Chip } from './components/chip/index.tsx';
38
32
  export { default as PricingTable, PricingTableColumn, PricingTableHeader, PricingTableItem, } from './components/pricing-table/index.tsx';
39
33
  export { default as BoostScoreBar } from './components/boost-score-bar/index.tsx';
40
34
  export { default as BoostScoreGraph } from './components/boost-score-graph/index.tsx';
41
35
  export { default as ProductPrice } from './components/product-price/index.tsx';
42
- export { default as ProductOffer, IconsCard } from './components/product-offer/index.tsx';
43
- export { default as Dialog } from './components/dialog/index.tsx';
44
36
  export { default as DotPager } from './components/dot-pager/index.tsx';
45
37
  export { default as DonutMeter } from './components/donut-meter/index.tsx';
46
38
  export { default as RecordMeterBar } from './components/record-meter-bar/index.tsx';
47
- export { default as ContextualUpgradeTrigger } from './components/contextual-upgrade-trigger/index.tsx';
48
- export { default as Alert } from './components/alert/index.tsx';
49
39
  export { default as Notice } from './components/notice/index.tsx';
50
40
  export { default as Popover } from './components/popover/index.tsx';
51
- export { default as Status } from './components/status/index.tsx';
52
41
  export { default as IndeterminateProgressBar } from './components/indeterminate-progress-bar/index.tsx';
53
42
  export { default as ActionPopover } from './components/action-popover/index.tsx';
54
43
  export { default as ZendeskChat } from './components/zendesk-chat/index.tsx';
55
44
  export { default as ProgressBar } from './components/progress-bar/index.tsx';
56
45
  export { default as UpsellBanner } from './components/upsell-banner/index.tsx';
57
46
  export { getUserLocale, cleanLocale } from './lib/locale/index.ts';
58
- export { default as RadioControl } from './components/radio-control/index.tsx';
59
47
  export { default as StatCard } from './components/stat-card/index.tsx';
60
48
  export { default as DiffViewer } from './components/diff-viewer/index.tsx';
61
49
  export { default as MarkedLines } from './components/marked-lines/index.tsx';
package/build/index.js CHANGED
@@ -13,10 +13,7 @@ You should have received a copy of the GNU General Public License
13
13
  along with this program; if not, see <https://www.gnu.org/licenses/>.
14
14
  */
15
15
  export { default as JetpackLogo } from './components/jetpack-logo/index.js';
16
- export { default as JetpackSearchLogo } from './components/jetpack-search-logo/index.js';
17
- export { default as JetpackProtectLogo } from './components/jetpack-protect-logo/index.js';
18
16
  export { default as JetpackVaultPressBackupLogo } from './components/jetpack-vaultpress-backup-logo/index.js';
19
- export { default as JetpackVideoPressLogo } from './components/jetpack-videopress-logo/index.js';
20
17
  export { default as getRedirectUrl } from './tools/jp-redirect/index.js';
21
18
  export { default as getProductCheckoutUrl } from './tools/get-product-checkout-url/index.js';
22
19
  export { isFirstMonthTrial } from './tools/pricing-utils/index.js';
@@ -37,37 +34,28 @@ export { default as Testimonials } from './components/testimonials/index.js';
37
34
  export { default as Container } from './components/layout/container/index.js';
38
35
  export { default as CopyToClipboard } from './components/copy-to-clipboard/index.js';
39
36
  export * from './components/icons/index.js';
40
- export { default as SplitButton } from './components/split-button/index.js';
41
37
  export { default as ThemeProvider } from './components/theme-provider/index.js';
42
38
  export { default as Text, H2, H3, Title } from './components/text/index.js';
43
- export { default as ToggleControl } from './components/toggle-control/index.js';
44
39
  export { default as NumberControl } from './components/number-control/index.js';
45
40
  export { default as QRCode } from './components/qr-code/index.js';
46
41
  export { default as Button } from './components/button/index.js';
47
42
  export { default as LoadingPlaceholder } from './components/loading-placeholder/index.js';
48
43
  export { default as TermsOfService } from './components/terms-of-service/index.js';
49
- export { default as Chip } from './components/chip/index.js';
50
44
  export { default as PricingTable, PricingTableColumn, PricingTableHeader, PricingTableItem, } from './components/pricing-table/index.js';
51
45
  export { default as BoostScoreBar } from './components/boost-score-bar/index.js';
52
46
  export { default as BoostScoreGraph } from './components/boost-score-graph/index.js';
53
47
  export { default as ProductPrice } from './components/product-price/index.js';
54
- export { default as ProductOffer, IconsCard } from './components/product-offer/index.js';
55
- export { default as Dialog } from './components/dialog/index.js';
56
48
  export { default as DotPager } from './components/dot-pager/index.js';
57
49
  export { default as DonutMeter } from './components/donut-meter/index.js';
58
50
  export { default as RecordMeterBar } from './components/record-meter-bar/index.js';
59
- export { default as ContextualUpgradeTrigger } from './components/contextual-upgrade-trigger/index.js';
60
- export { default as Alert } from './components/alert/index.js';
61
51
  export { default as Notice } from './components/notice/index.js';
62
52
  export { default as Popover } from './components/popover/index.js';
63
- export { default as Status } from './components/status/index.js';
64
53
  export { default as IndeterminateProgressBar } from './components/indeterminate-progress-bar/index.js';
65
54
  export { default as ActionPopover } from './components/action-popover/index.js';
66
55
  export { default as ZendeskChat } from './components/zendesk-chat/index.js';
67
56
  export { default as ProgressBar } from './components/progress-bar/index.js';
68
57
  export { default as UpsellBanner } from './components/upsell-banner/index.js';
69
58
  export { getUserLocale, cleanLocale } from './lib/locale/index.js';
70
- export { default as RadioControl } from './components/radio-control/index.js';
71
59
  export { default as StatCard } from './components/stat-card/index.js';
72
60
  export { default as DiffViewer } from './components/diff-viewer/index.js';
73
61
  export { default as MarkedLines } from './components/marked-lines/index.js';
@@ -1,8 +1,8 @@
1
1
  .admin-page {
2
- margin-left: -20px; // to neutralize the padding of #wpcontent.
2
+ margin-inline-start: -20px; // to neutralize the padding of #wpcontent.
3
3
 
4
4
  @media (max-width: 782px) {
5
- margin-left: -10px; // to neutralize the padding of #wpcontent.
5
+ margin-inline-start: -10px; // to neutralize the padding of #wpcontent.
6
6
  }
7
7
 
8
8
  &.background {
@@ -104,7 +104,7 @@
104
104
  // line-height: 1.6666;` — see https://github.com/WordPress/WordPress/blob/trunk/wp-content/plugins/hello.php
105
105
  // We override only the bits that need to differ from those defaults.
106
106
  float: none;
107
- text-align: right;
107
+ text-align: end;
108
108
  background: var(--wpds-color-background-surface-neutral-strong, #fff);
109
109
  font-style: italic;
110
110
  color: var(--wpds-color-foreground-content-neutral-weak, #87a6bc);
package/index.ts CHANGED
@@ -14,10 +14,7 @@ along with this program; if not, see <https://www.gnu.org/licenses/>.
14
14
  */
15
15
 
16
16
  export { default as JetpackLogo } from './components/jetpack-logo/index.tsx';
17
- export { default as JetpackSearchLogo } from './components/jetpack-search-logo/index.tsx';
18
- export { default as JetpackProtectLogo } from './components/jetpack-protect-logo/index.tsx';
19
17
  export { default as JetpackVaultPressBackupLogo } from './components/jetpack-vaultpress-backup-logo/index.tsx';
20
- export { default as JetpackVideoPressLogo } from './components/jetpack-videopress-logo/index.tsx';
21
18
  export { default as getRedirectUrl } from './tools/jp-redirect/index.ts';
22
19
  export { default as getProductCheckoutUrl } from './tools/get-product-checkout-url/index.ts';
23
20
  export { isFirstMonthTrial } from './tools/pricing-utils/index.ts';
@@ -39,17 +36,14 @@ export { default as Testimonials } from './components/testimonials/index.tsx';
39
36
  export { default as Container } from './components/layout/container/index.tsx';
40
37
  export { default as CopyToClipboard } from './components/copy-to-clipboard/index.tsx';
41
38
  export * from './components/icons/index.tsx';
42
- export { default as SplitButton } from './components/split-button/index.tsx';
43
39
  export { default as ThemeProvider } from './components/theme-provider/index.tsx';
44
40
  export { default as Text, H2, H3, Title } from './components/text/index.tsx';
45
- export { default as ToggleControl } from './components/toggle-control/index.tsx';
46
41
  export { default as NumberControl } from './components/number-control/index.tsx';
47
42
  export { default as QRCode } from './components/qr-code/index.tsx';
48
43
  export { default as Button } from './components/button/index.tsx';
49
44
  export type { ButtonProps } from './components/button/types.ts';
50
45
  export { default as LoadingPlaceholder } from './components/loading-placeholder/index.tsx';
51
46
  export { default as TermsOfService } from './components/terms-of-service/index.tsx';
52
- export { default as Chip } from './components/chip/index.tsx';
53
47
  export {
54
48
  default as PricingTable,
55
49
  PricingTableColumn,
@@ -59,23 +53,17 @@ export {
59
53
  export { default as BoostScoreBar } from './components/boost-score-bar/index.tsx';
60
54
  export { default as BoostScoreGraph } from './components/boost-score-graph/index.tsx';
61
55
  export { default as ProductPrice } from './components/product-price/index.tsx';
62
- export { default as ProductOffer, IconsCard } from './components/product-offer/index.tsx';
63
- export { default as Dialog } from './components/dialog/index.tsx';
64
56
  export { default as DotPager } from './components/dot-pager/index.tsx';
65
57
  export { default as DonutMeter } from './components/donut-meter/index.tsx';
66
58
  export { default as RecordMeterBar } from './components/record-meter-bar/index.tsx';
67
- export { default as ContextualUpgradeTrigger } from './components/contextual-upgrade-trigger/index.tsx';
68
- export { default as Alert } from './components/alert/index.tsx';
69
59
  export { default as Notice } from './components/notice/index.tsx';
70
60
  export { default as Popover } from './components/popover/index.tsx';
71
- export { default as Status } from './components/status/index.tsx';
72
61
  export { default as IndeterminateProgressBar } from './components/indeterminate-progress-bar/index.tsx';
73
62
  export { default as ActionPopover } from './components/action-popover/index.tsx';
74
63
  export { default as ZendeskChat } from './components/zendesk-chat/index.tsx';
75
64
  export { default as ProgressBar } from './components/progress-bar/index.tsx';
76
65
  export { default as UpsellBanner } from './components/upsell-banner/index.tsx';
77
66
  export { getUserLocale, cleanLocale } from './lib/locale/index.ts';
78
- export { default as RadioControl } from './components/radio-control/index.tsx';
79
67
  export { default as StatCard } from './components/stat-card/index.tsx';
80
68
  export { default as DiffViewer } from './components/diff-viewer/index.tsx';
81
69
  export { default as MarkedLines } from './components/marked-lines/index.tsx';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "2.3.0",
3
+ "version": "3.0.1",
4
4
  "description": "Jetpack Components Package",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
6
  "bugs": {
@@ -73,24 +73,24 @@
73
73
  ],
74
74
  "dependencies": {
75
75
  "@automattic/format-currency": "1.0.1",
76
- "@automattic/jetpack-api": "^1.0.32",
77
- "@automattic/jetpack-boost-score-api": "^1.0.56",
76
+ "@automattic/jetpack-api": "^1.0.33",
77
+ "@automattic/jetpack-boost-score-api": "^1.0.57",
78
78
  "@automattic/jetpack-script-data": "^0.6.6",
79
79
  "@automattic/number-formatters": "^1.2.8",
80
80
  "@babel/runtime": "^7",
81
81
  "@gravatar-com/hovercards": "0.16.0",
82
- "@wordpress/admin-ui": "2.8.0",
83
- "@wordpress/browserslist-config": "6.51.0",
84
- "@wordpress/components": "37.0.0",
85
- "@wordpress/compose": "8.6.0",
86
- "@wordpress/data": "10.51.0",
87
- "@wordpress/date": "5.51.0",
88
- "@wordpress/element": "8.3.0",
89
- "@wordpress/i18n": "6.24.0",
90
- "@wordpress/icons": "15.4.0",
91
- "@wordpress/notices": "5.51.0",
92
- "@wordpress/theme": "1.2.0",
93
- "@wordpress/ui": "0.20.0",
82
+ "@wordpress/admin-ui": "2.9.0",
83
+ "@wordpress/browserslist-config": "6.54.0",
84
+ "@wordpress/components": "40.0.0",
85
+ "@wordpress/compose": "8.7.0",
86
+ "@wordpress/data": "10.54.0",
87
+ "@wordpress/date": "5.54.0",
88
+ "@wordpress/element": "8.6.0",
89
+ "@wordpress/i18n": "6.27.0",
90
+ "@wordpress/icons": "15.5.0",
91
+ "@wordpress/notices": "5.54.0",
92
+ "@wordpress/theme": "2.0.0",
93
+ "@wordpress/ui": "0.21.0",
94
94
  "clsx": "2.1.1",
95
95
  "js-sha256": "0.11.1",
96
96
  "prop-types": "^15.7.2",
@@ -100,7 +100,7 @@
100
100
  "uplot-react": "1.1.4"
101
101
  },
102
102
  "devDependencies": {
103
- "@automattic/jetpack-base-styles": "^1.2.10",
103
+ "@automattic/jetpack-base-styles": "^1.2.12",
104
104
  "@babel/core": "7.29.7",
105
105
  "@jest/globals": "30.4.1",
106
106
  "@storybook/addon-docs": "10.4.6",
@@ -1,23 +0,0 @@
1
- import type { ReactNode, FC } from 'react';
2
- type AlertProps = {
3
- /** The severity of the alert. */
4
- level: 'error' | 'warning' | 'info' | 'success';
5
- /** Show/Hide icon */
6
- showIcon?: boolean;
7
- /** Children to be rendered inside the alert. */
8
- children: ReactNode;
9
- /** Wrapper class name */
10
- className?: string;
11
- };
12
- /**
13
- * Alert component
14
- *
15
- * @param {object} props - The component properties.
16
- * @param {string} props.level - The alert level: error, warning, info, success.
17
- * @param {boolean} props.showIcon - Whether to show the alert icon.
18
- * @param {string} props.className - The wrapper class name.
19
- * @param {Component} props.children - The alert content.
20
- * @return {ReactElement} The `Alert` component.
21
- */
22
- declare const Alert: FC<AlertProps>;
23
- export default Alert;
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Icon, cautionFilled as warning, info, check } from '@wordpress/icons';
3
- import clsx from 'clsx';
4
- import styles from './style.module.scss';
5
- const getIconByLevel = (level) => {
6
- switch (level) {
7
- case 'error':
8
- return warning;
9
- case 'warning':
10
- return warning;
11
- case 'info':
12
- return info;
13
- case 'success':
14
- return check;
15
- default:
16
- return warning;
17
- }
18
- };
19
- /**
20
- * Alert component
21
- *
22
- * @param {object} props - The component properties.
23
- * @param {string} props.level - The alert level: error, warning, info, success.
24
- * @param {boolean} props.showIcon - Whether to show the alert icon.
25
- * @param {string} props.className - The wrapper class name.
26
- * @param {Component} props.children - The alert content.
27
- * @return {ReactElement} The `Alert` component.
28
- */
29
- const Alert = ({ level = 'warning', children, showIcon = true, className }) => {
30
- const classes = clsx(styles.container, styles[`is-${level}`], className);
31
- return (_jsxs("div", { className: classes, children: [showIcon && (_jsx("div", { className: styles['icon-wrapper'], children: _jsx(Icon, { icon: getIconByLevel(level), className: styles.icon }) })), _jsx("div", { children: children })] }));
32
- };
33
- export default Alert;
@@ -1,47 +0,0 @@
1
- .container {
2
- display: flex;
3
- font-size: var(--font-body);
4
- line-height: calc(var(--spacing-base) * 3);
5
- min-height: calc(var(--spacing-base) * 3);
6
- align-items: center;
7
- margin: calc(var(--spacing-base) * 2) 0;
8
- }
9
-
10
- .icon-wrapper {
11
- margin-right: calc(var(--spacing-base) / 2);
12
- width: calc(var(--spacing-base) * 3);
13
- height: calc(var(--spacing-base) * 3);
14
- align-self: flex-start;
15
- }
16
-
17
- .is-error {
18
- color: var(--jp-red);
19
-
20
- .icon {
21
- fill: var(--jp-red);
22
- }
23
- }
24
-
25
- .is-warning {
26
- color: var(--jp-yellow-40);
27
-
28
- .icon {
29
- fill: var(--jp-yellow-40);
30
- }
31
- }
32
-
33
- .is-info {
34
- color: var(--jp-blue-40);
35
-
36
- .icon {
37
- fill: var(--jp-blue-40);
38
- }
39
- }
40
-
41
- .is-success {
42
- color: var(--jp-green);
43
-
44
- .icon {
45
- fill: var(--jp-green);
46
- }
47
- }
@@ -1,17 +0,0 @@
1
- import type { FC } from 'react';
2
- type ChipProps = {
3
- text?: string;
4
- type?: 'new' | 'info';
5
- };
6
- /**
7
- * Chip component
8
- *
9
- * @deprecated Use `Badge` from `@wordpress/ui` instead. Map `type="new"` to `intent="stable"` and `type="info"` to the default `intent`.
10
- *
11
- * @param {object} props - The component properties.
12
- * @param {string} props.type - The type new or info
13
- * @param {string} props.text - Chip text
14
- * @return {ReactElement} The `Chip` component.
15
- */
16
- declare const Chip: FC<ChipProps>;
17
- export default Chip;
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import clsx from 'clsx';
3
- import styles from './style.module.scss';
4
- /**
5
- * Chip component
6
- *
7
- * @deprecated Use `Badge` from `@wordpress/ui` instead. Map `type="new"` to `intent="stable"` and `type="info"` to the default `intent`.
8
- *
9
- * @param {object} props - The component properties.
10
- * @param {string} props.type - The type new or info
11
- * @param {string} props.text - Chip text
12
- * @return {ReactElement} The `Chip` component.
13
- */
14
- const Chip = ({ type = 'info', text }) => {
15
- const classes = clsx(styles.chip, styles[`is-${type}`]);
16
- return _jsx("span", { className: classes, children: text });
17
- };
18
- export default Chip;
@@ -1,14 +0,0 @@
1
- .chip {
2
- display: inline-block;
3
- border-radius: 3px;
4
- background-color: var(--jp-gray-5);
5
- color: var(--jp-gray-50);
6
- padding: 0 6px;
7
- margin: 0 8px;
8
- text-transform: uppercase;
9
- font-size: 10px;
10
- font-weight: 700;
11
- line-height: 20px;
12
- font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
13
-
14
- }
@@ -1,19 +0,0 @@
1
- import { CutBaseProps } from './types.ts';
2
- import type { FC } from 'react';
3
- /**
4
- * ContextualUpgradeTrigger component.
5
- *
6
- * @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
7
- *
8
- * @param props - The component properties.
9
- * @param props.description - The body copy describing the upgrade context.
10
- * @param props.cta - The CTA label.
11
- * @param props.onClick - Click handler when rendered as a button.
12
- * @param props.href - When provided, renders as an anchor instead of a button.
13
- * @param props.openInNewTab - Whether to open the link in a new tab.
14
- * @param props.className - Optional class for the root element.
15
- * @param props.tooltipText - Optional tooltip body shown next to the description.
16
- * @return The rendered upgrade trigger.
17
- */
18
- declare const ContextualUpgradeTrigger: FC<CutBaseProps>;
19
- export default ContextualUpgradeTrigger;
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Icon, arrowRight } from '@wordpress/icons';
3
- import clsx from 'clsx';
4
- import IconTooltip from '../icon-tooltip/index.js';
5
- import Text from '../text/index.js';
6
- import styles from './style.module.scss';
7
- /**
8
- * ContextualUpgradeTrigger component.
9
- *
10
- * @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
11
- *
12
- * @param props - The component properties.
13
- * @param props.description - The body copy describing the upgrade context.
14
- * @param props.cta - The CTA label.
15
- * @param props.onClick - Click handler when rendered as a button.
16
- * @param props.href - When provided, renders as an anchor instead of a button.
17
- * @param props.openInNewTab - Whether to open the link in a new tab.
18
- * @param props.className - Optional class for the root element.
19
- * @param props.tooltipText - Optional tooltip body shown next to the description.
20
- * @return The rendered upgrade trigger.
21
- */
22
- const ContextualUpgradeTrigger = ({ description, cta, onClick, href, openInNewTab = false, className, tooltipText = '', }) => {
23
- const Tag = href !== undefined ? 'a' : 'button';
24
- const tagProps = Tag === 'a' ? { href, ...(openInNewTab && { target: '_blank' }) } : { onClick };
25
- return (_jsxs("div", { className: clsx(styles.cut, className), children: [_jsxs("div", { children: [_jsxs("div", { children: [_jsx(Text, { className: styles.description, children: description }), tooltipText && (_jsx(IconTooltip, { className: styles.iconContainer, iconSize: 16, offset: 4, children: _jsx(Text, { variant: "body-small", children: tooltipText }) }))] }), _jsx("div", { children: _jsx(Tag, { ...tagProps, children: _jsx(Text, { className: styles.cta, children: cta }) }) })] }), _jsx(Icon, { icon: arrowRight, className: styles.icon, size: 30 })] }));
26
- };
27
- export default ContextualUpgradeTrigger;
@@ -1,77 +0,0 @@
1
- .cut {
2
- border: 2px solid var(--jp-green-40);
3
- border-radius: var(--jp-border-radius);
4
- padding: calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);
5
- display: flex;
6
- justify-content: space-between;
7
- align-items: center;
8
- gap: calc(var(--spacing-base) * 3);
9
- text-align: left;
10
- background: none;
11
- width: 100%;
12
- position: relative;
13
- color: var(--jp-gray-80);
14
-
15
- button,
16
- a {
17
- all: unset;
18
- color: var(--jp-gray-80);
19
- cursor: pointer;
20
-
21
- &::after {
22
- content: "";
23
- position: absolute;
24
- top: 0;
25
- left: 0;
26
- width: 100%;
27
- height: 100%;
28
- }
29
- }
30
-
31
- &:focus-within {
32
- border-color: var(--jp-black);
33
- }
34
-
35
- &:focus-within,
36
- &:hover {
37
-
38
- .icon {
39
- transform: translateX(calc(var(--spacing-base) * 2));
40
- }
41
-
42
- .cta {
43
- text-decoration: underline;
44
- text-decoration-thickness: 2px;
45
- }
46
- }
47
-
48
- // Overwrite styles in Text component
49
- .cta {
50
- font-weight: 700;
51
- }
52
- }
53
-
54
- .cta {
55
- font-weight: 700;
56
- }
57
-
58
- .icon {
59
- fill: var(--jp-green-40);
60
- transition: transform 0.1s ease-out;
61
- pointer-events: none;
62
- }
63
-
64
- .iconContainer {
65
- margin: 0 0 0 calc(var(--spacing-base) / 3);
66
- display: inline;
67
- vertical-align: middle;
68
-
69
- svg {
70
- z-index: 10;
71
- position: relative;
72
- }
73
- }
74
-
75
- .description {
76
- display: inline;
77
- }
@@ -1,9 +0,0 @@
1
- export type CutBaseProps = {
2
- description: string;
3
- cta: string;
4
- className?: string;
5
- href?: string;
6
- openInNewTab?: boolean;
7
- onClick?: () => void;
8
- tooltipText?: string;
9
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- import type { ReactNode, FC } from 'react';
2
- type DialogProps = {
3
- primary: ReactNode;
4
- secondary?: ReactNode;
5
- isTwoSections?: boolean;
6
- isCard?: boolean;
7
- containerProps: object;
8
- };
9
- /**
10
- * Dialog component.
11
- *
12
- * @param {object} props - React component props.
13
- * @param {ReactNode} props.primary - Primary-section content.
14
- * @param {ReactNode} props.secondary - Secondary-section content.
15
- * @param {boolean} props.isTwoSections - Handle two sections layout when true.
16
- * @param {object} props.containerProps - Props to pass to the container component.
17
- * @return {ReactNode} Rendered dialog
18
- */
19
- declare const Dialog: FC<DialogProps>;
20
- export default Dialog;
@@ -1,32 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useViewportMatch } from '@wordpress/compose';
3
- import clsx from 'clsx';
4
- import Col from '../layout/col/index.js';
5
- import Container from '../layout/container/index.js';
6
- import styles from './style.module.scss';
7
- /**
8
- * Dialog component.
9
- *
10
- * @param {object} props - React component props.
11
- * @param {ReactNode} props.primary - Primary-section content.
12
- * @param {ReactNode} props.secondary - Secondary-section content.
13
- * @param {boolean} props.isTwoSections - Handle two sections layout when true.
14
- * @param {object} props.containerProps - Props to pass to the container component.
15
- * @return {ReactNode} Rendered dialog
16
- */
17
- const Dialog = ({ primary, secondary, isTwoSections = false, ...containerProps }) => {
18
- const isSmall = useViewportMatch('small', '<');
19
- const isLowerThanLarge = useViewportMatch('large', '<');
20
- /*
21
- * By convention, secondary section is not shown when:
22
- * - layout is a two-sections setup
23
- * - on mobile breakpoint (sm)
24
- */
25
- const hideSecondarySection = !isTwoSections && isSmall;
26
- const classNames = clsx({
27
- [styles['one-section-style']]: !isTwoSections,
28
- [styles['is-viewport-small']]: isSmall,
29
- });
30
- return (_jsxs(Container, { className: classNames, horizontalSpacing: 0, horizontalGap: 0, fluid: false, ...containerProps, children: [!hideSecondarySection && (_jsxs(_Fragment, { children: [_jsx(Col, { sm: 4, md: isLowerThanLarge ? 4 : 5, lg: 7, className: styles.primary, children: primary }), _jsx(Col, { sm: 4, md: isLowerThanLarge ? 4 : 3, lg: 5, className: styles.secondary, children: secondary })] })), hideSecondarySection && _jsx(Col, { children: primary })] }));
31
- };
32
- export default Dialog;