@automattic/jetpack-components 0.72.2 → 0.72.3

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 (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/components/alert/style.module.scss +4 -0
  3. package/components/boost-score-bar/style.scss +6 -0
  4. package/components/boost-score-graph/style-annotation.scss +2 -0
  5. package/components/button/style.module.scss +2 -0
  6. package/components/contextual-upgrade-trigger/style.module.scss +1 -0
  7. package/components/dialog/style.module.scss +1 -0
  8. package/components/donut-meter/style.scss +3 -0
  9. package/components/dot-pager/style.scss +4 -0
  10. package/components/global-notices/styles.module.scss +1 -0
  11. package/components/icon-tooltip/style.scss +3 -0
  12. package/components/icons/style.module.scss +13 -0
  13. package/components/indeterminate-progress-bar/style.module.scss +2 -0
  14. package/components/jetpack-footer/style.scss +3 -0
  15. package/components/layout/breakpoints.module.scss +1 -0
  16. package/components/layout/col/style.module.scss +2 -0
  17. package/components/loading-placeholder/style.module.scss +3 -0
  18. package/components/notice/style.module.scss +3 -0
  19. package/components/number-slider/style.scss +2 -0
  20. package/components/pricing-card/style.scss +1 -0
  21. package/components/pricing-table/styles.module.scss +2 -0
  22. package/components/product-price/style.module.scss +1 -0
  23. package/components/radio-control/styles.module.scss +4 -0
  24. package/components/record-meter-bar/style.scss +5 -0
  25. package/components/spinner/style.scss +1 -0
  26. package/components/status/style.module.scss +5 -0
  27. package/components/testimonials/style.scss +1 -0
  28. package/components/text/style.module.scss +2 -0
  29. package/components/theme-provider/globals.module.scss +1 -0
  30. package/components/toggle-control/styles.module.scss +3 -0
  31. package/components/upsell-banner/style.scss +1 -0
  32. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.72.3] - 2025-04-07
6
+ ### Changed
7
+ - Code: First pass of style coding standards. [#42734]
8
+
9
+ ### Fixed
10
+ - Fix TypeScript type checking in the monorepo. [#42817]
11
+
5
12
  ## [0.72.2] - 2025-04-01
6
13
  ### Changed
7
14
  - Update package dependencies. [#42809]
@@ -1351,6 +1358,7 @@
1351
1358
  ### Changed
1352
1359
  - Update node version requirement to 14.16.1
1353
1360
 
1361
+ [0.72.3]: https://github.com/Automattic/jetpack-components/compare/0.72.2...0.72.3
1354
1362
  [0.72.2]: https://github.com/Automattic/jetpack-components/compare/0.72.1...0.72.2
1355
1363
  [0.72.1]: https://github.com/Automattic/jetpack-components/compare/0.72.0...0.72.1
1356
1364
  [0.72.0]: https://github.com/Automattic/jetpack-components/compare/0.71.0...0.72.0
@@ -16,6 +16,7 @@
16
16
 
17
17
  .is-error {
18
18
  color: var( --jp-red );
19
+
19
20
  .icon {
20
21
  fill: var( --jp-red );
21
22
  }
@@ -23,6 +24,7 @@
23
24
 
24
25
  .is-warning {
25
26
  color: var( --jp-yellow-40 );
27
+
26
28
  .icon {
27
29
  fill: var( --jp-yellow-40 );
28
30
  }
@@ -30,6 +32,7 @@
30
32
 
31
33
  .is-info {
32
34
  color: var( --jp-blue-40 );
35
+
33
36
  .icon {
34
37
  fill: var( --jp-blue-40 );
35
38
  }
@@ -37,6 +40,7 @@
37
40
 
38
41
  .is-success {
39
42
  color: var( --jp-green );
43
+
40
44
  .icon {
41
45
  fill: var( --jp-green );
42
46
  }
@@ -25,6 +25,7 @@ $no_boost_score_size: 28px;
25
25
 
26
26
  @media (max-width: 767px) {
27
27
  flex-direction: column;
28
+
28
29
  &__label {
29
30
  background-color: transparent;
30
31
  }
@@ -32,6 +33,7 @@ $no_boost_score_size: 28px;
32
33
 
33
34
 
34
35
  &__loading {
36
+
35
37
  @extend %score-pill;
36
38
  width: $bar_height;
37
39
  display: flex;
@@ -40,6 +42,7 @@ $no_boost_score_size: 28px;
40
42
  }
41
43
 
42
44
  &__label {
45
+
43
46
  @extend %score-pill;
44
47
  display: grid;
45
48
  grid-template-columns: 24px 1fr;
@@ -57,6 +60,7 @@ $no_boost_score_size: 28px;
57
60
  }
58
61
 
59
62
  &__score {
63
+
60
64
  @extend %score-pill;
61
65
  border-radius: 100%;
62
66
  font-weight: 700;
@@ -76,6 +80,7 @@ $no_boost_score_size: 28px;
76
80
  max-width: 100%;
77
81
  position: relative;
78
82
  z-index: $label_z_index - 10;
83
+
79
84
  @media (min-width: 768px) {
80
85
  width: calc(100% + #{math.div($bar-height, 2)});
81
86
  margin-left: math.div(-$bar_height, 2) ;
@@ -91,6 +96,7 @@ $no_boost_score_size: 28px;
91
96
  will-change: width;
92
97
  width: 0;
93
98
  position: relative;
99
+
94
100
  @media (max-width: 767px) {
95
101
  min-width: $bar_height + 1px;
96
102
  border-radius: inherit;
@@ -33,6 +33,7 @@ $white: #ffffff;
33
33
  }
34
34
 
35
35
  &:hover {
36
+
36
37
  &::after {
37
38
  background: rgba(146, 175, 215, 1);
38
39
  }
@@ -40,6 +41,7 @@ $white: #ffffff;
40
41
  }
41
42
 
42
43
  &__annotation {
44
+
43
45
  &::after {
44
46
  content: '';
45
47
  width: 0;
@@ -14,6 +14,7 @@
14
14
  padding: var( --spacing-base );
15
15
  width: calc( var( --spacing-base ) * 5 );
16
16
  height: calc( var( --spacing-base ) * 5 );
17
+
17
18
  > svg:first-child {
18
19
  margin: 0;
19
20
  padding: 0;
@@ -170,6 +171,7 @@
170
171
 
171
172
  // Link
172
173
  &:global(.is-link) {
174
+
173
175
  &:not(:disabled) {
174
176
  color: var(--jp-red-50);
175
177
  }
@@ -34,6 +34,7 @@
34
34
 
35
35
  &:focus-within,
36
36
  &:hover {
37
+
37
38
  & .icon {
38
39
  transform: translateX( calc( var( --spacing-base ) * 2 ) );
39
40
  }
@@ -14,6 +14,7 @@
14
14
  // Fit images in secondary section.
15
15
  .secondary {
16
16
  align-items: center;
17
+
17
18
  img {
18
19
  // let's fit images
19
20
  object-fit: cover;
@@ -1,10 +1,13 @@
1
1
  .donut-meter {
2
+
2
3
  .donut-meter-segment {
3
4
  stroke: var(--jp-green);
4
5
  }
6
+
5
7
  &.is-warning .donut-meter-segment {
6
8
  stroke: var(--jp-yellow-10);
7
9
  }
10
+
8
11
  &.is-danger .donut-meter-segment {
9
12
  stroke: var(--jp-red);
10
13
  }
@@ -10,6 +10,7 @@
10
10
  .dot-pager__page {
11
11
  height: 100%;
12
12
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
13
+
13
14
  @include reduce-motion( "transition" );
14
15
  opacity: 1;
15
16
  visibility: visible;
@@ -26,6 +27,7 @@
26
27
  left: 0;
27
28
  right: 0;
28
29
  z-index: 1;
30
+
29
31
  li {
30
32
  display: inline-flex;
31
33
  margin: 0 4px;
@@ -35,6 +37,7 @@
35
37
  &:first-child {
36
38
  margin-left: 0;
37
39
  }
40
+
38
41
  &:last-child {
39
42
  margin-right: 0;
40
43
  }
@@ -74,6 +77,7 @@
74
77
  }
75
78
 
76
79
  .dot-pager {
80
+
77
81
  &__button {
78
82
  margin-right: 10px;
79
83
  }
@@ -1,6 +1,7 @@
1
1
  @import '@automattic/jetpack-base-styles/gutenberg-base-styles';
2
2
 
3
3
  .global-notices {
4
+
4
5
  &:global(.components-snackbar-list) {
5
6
  position: fixed;
6
7
  inset-block-start: auto; // top
@@ -9,6 +9,7 @@ $arrow-color: var( --jp-gray );
9
9
 
10
10
  // Namespace to avoid overriding global styles
11
11
  .icon-tooltip-helper {
12
+
12
13
  /*
13
14
  * Fix arrow placement - section start
14
15
  */
@@ -19,6 +20,7 @@ $arrow-color: var( --jp-gray );
19
20
  .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content {
20
21
  margin-left: -62px;
21
22
  }
23
+
22
24
  /*
23
25
  * Fix arrow placement - section end
24
26
  */
@@ -49,6 +51,7 @@ $arrow-color: var( --jp-gray );
49
51
  .components-popover:not(.is-without-arrow)[data-y-axis=top]::after {
50
52
  bottom: 4px;
51
53
  }
54
+
52
55
  /*
53
56
  * Fix arrow position for legacy position option - section end
54
57
  */
@@ -11,9 +11,11 @@
11
11
 
12
12
  .socialIcon {
13
13
  fill: $gray-700;
14
+
14
15
  &.bluesky {
15
16
  fill: var( --color-bluesky );
16
17
  }
18
+
17
19
  &.facebook {
18
20
  fill: var( --color-facebook );
19
21
  // Add some specificity to override the border-radius on Jetpack settings page
@@ -21,24 +23,31 @@
21
23
  border-radius: 50%;
22
24
  }
23
25
  }
26
+
24
27
  &.instagram {
25
28
  fill: var( --color-instagram );
26
29
  }
30
+
27
31
  &.twitter {
28
32
  fill: var( --color-twitter );
29
33
  }
34
+
30
35
  &.linkedin {
31
36
  fill: var( --color-linkedin );
32
37
  }
38
+
33
39
  &.tumblr {
34
40
  fill: var( --color-tumblr );
35
41
  }
42
+
36
43
  &.google {
37
44
  fill: var( --color-gplus );
38
45
  }
46
+
39
47
  &.mastodon {
40
48
  fill: var( --color-mastodon );
41
49
  }
50
+
42
51
  &.nextdoor {
43
52
  fill: var( --color-nextdoor );
44
53
  // Add some specificity to override the border-radius on Jetpack settings page
@@ -46,14 +55,18 @@
46
55
  border-radius: 50%;
47
56
  }
48
57
  }
58
+
49
59
  &.instagram {
50
60
  fill: var( --color-instagram );
51
61
  }
62
+
52
63
  &.whatsapp {
53
64
  fill: var( --color-whatsapp );
54
65
  }
66
+
55
67
  &.threads {
56
68
  fill: var( --color-threads );
69
+
57
70
  &:global(.social-logo) {
58
71
  border-radius: 40%;
59
72
  }
@@ -22,12 +22,14 @@
22
22
  }
23
23
 
24
24
  @keyframes indeterminate_progress_bar__animation {
25
+
25
26
  0% {
26
27
  background-position: 136px 0;
27
28
  }
28
29
  }
29
30
 
30
31
  @media (prefers-reduced-motion: no-preference) {
32
+
31
33
  .indeterminate-progress-bar {
32
34
  animation: indeterminate_progress_bar__animation 2000ms infinite linear;
33
35
  }
@@ -38,6 +38,7 @@
38
38
  }
39
39
 
40
40
  &.is-sm {
41
+
41
42
  > ul {
42
43
  flex-direction: column;
43
44
  align-items: flex-start;
@@ -100,6 +101,7 @@
100
101
  }
101
102
 
102
103
  .jp-dashboard-footer__a8c-item {
104
+
103
105
  .jp-dashboard-footer.is-lg & {
104
106
  margin-inline-start: auto;
105
107
  }
@@ -111,6 +113,7 @@
111
113
 
112
114
  .jp-dashboard-footer__jp-item,
113
115
  .jp-dashboard-footer__a8c-item {
116
+
114
117
  > a {
115
118
  text-decoration: none; // Logos typically have no hover effect
116
119
  }
@@ -14,6 +14,7 @@ $breakpoints: ("sm": "(max-width: 599px)", "md": "(min-width: 600px) and (max-wi
14
14
  }
15
15
 
16
16
  :export {
17
+
17
18
  @each $breakpoint, $media in $breakpoints {
18
19
  #{$breakpoint}: string.unquote($media);
19
20
  }
@@ -2,7 +2,9 @@
2
2
  @import "../breakpoints.module.scss";
3
3
 
4
4
  @mixin cols($size) {
5
+
5
6
  @include media($size) using ($columns) {
7
+
6
8
  @for $i from 1 through $columns {
7
9
  .col-#{$size}-#{$i} {
8
10
  grid-column-end: span #{$i};
@@ -1,10 +1,13 @@
1
1
  @keyframes pulse {
2
+
2
3
  0% {
3
4
  opacity: .6;
4
5
  }
6
+
5
7
  50% {
6
8
  opacity: 1;
7
9
  }
10
+
8
11
  100% {
9
12
  opacity: .6;
10
13
  }
@@ -24,6 +24,7 @@
24
24
  border: none;
25
25
  cursor: pointer;
26
26
  outline: none;
27
+
27
28
  svg {
28
29
  display: block;
29
30
  }
@@ -31,6 +32,7 @@
31
32
 
32
33
  // Mobile layout differences.
33
34
  @media screen and ( max-width: 600px ) {
35
+
34
36
  .container {
35
37
  position: relative;
36
38
  padding-top: 68px;
@@ -71,6 +73,7 @@
71
73
  }
72
74
 
73
75
  a {
76
+
74
77
  &, &:hover, &:active, &:focus {
75
78
  color: var( --jp-black );
76
79
  }
@@ -10,6 +10,7 @@ $track-height: 8px;
10
10
 
11
11
  // On holding thumb styling
12
12
  .jp-components-number-slider--is-holding {
13
+
13
14
  .jp-components-number-slider__thumb {
14
15
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(6, 158, 8, 0.25);
15
16
  }
@@ -22,6 +23,7 @@ $track-height: 8px;
22
23
  }
23
24
 
24
25
  .jp-components-number-slider__track {
26
+
25
27
  @include adjust-track-rail-styles;
26
28
  top: calc(($thumb-height / 2) - ($track-height / 2));
27
29
  background: var(--jp-gray);
@@ -14,6 +14,7 @@
14
14
  }
15
15
 
16
16
  &__icon {
17
+
17
18
  img {
18
19
  height: 32px;
19
20
  width: 32px;
@@ -25,6 +25,7 @@
25
25
  }
26
26
 
27
27
  &.is-primary {
28
+
28
29
  > * {
29
30
  background: var(--jp-white);
30
31
  position: relative;
@@ -78,6 +79,7 @@
78
79
  left: var(--padding);
79
80
  right: var(--padding);
80
81
  height: 1px;
82
+
81
83
  .is-viewport-large & {
82
84
  width: calc(100% + var(--gap));
83
85
  left: 0;
@@ -43,6 +43,7 @@
43
43
  }
44
44
  }
45
45
  }
46
+
46
47
  .footer {
47
48
  display: flex;
48
49
  flex-wrap: wrap;
@@ -4,9 +4,13 @@
4
4
  /// @link https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/radio-control
5
5
 
6
6
  .radio {
7
+
7
8
  :global {
9
+
8
10
  .components-radio-control {
11
+
9
12
  &__input[type="radio"] {
13
+
10
14
  &:checked {
11
15
  background: var( --jp-green-40 );
12
16
  border-color: var( --jp-green-40 );
@@ -11,16 +11,19 @@
11
11
  }
12
12
 
13
13
  &__legend {
14
+
14
15
  &--items {
15
16
  display: flex;
16
17
  margin: 0;
17
18
  }
19
+
18
20
  &--item {
19
21
  display: flex;
20
22
  margin: 0;
21
23
  margin-inline-end: 1em;
22
24
  align-items: center;
23
25
  }
26
+
24
27
  &--item-circle {
25
28
  width: 1rem;
26
29
  height: 1rem;
@@ -28,9 +31,11 @@
28
31
  margin-inline-end: 0.4em;
29
32
  border-radius: 100%;
30
33
  }
34
+
31
35
  &--item-count {
32
36
  margin-inline-end: 0.4em;
33
37
  }
38
+
34
39
  &--item-label-first {
35
40
  margin-inline-end: 0.4em;
36
41
  }
@@ -1,4 +1,5 @@
1
1
  @keyframes rotate-spinner {
2
+
2
3
  100% {
3
4
  transform: rotate( 360deg );
4
5
  }
@@ -21,6 +21,7 @@
21
21
  }
22
22
 
23
23
  &.is-active {
24
+
24
25
  span, a {
25
26
  color: var(--jp-green-50);
26
27
  }
@@ -31,6 +32,7 @@
31
32
  }
32
33
 
33
34
  &.is-inactive {
35
+
34
36
  span, a {
35
37
  color: var(--jp-gray-50);
36
38
  }
@@ -41,6 +43,7 @@
41
43
  }
42
44
 
43
45
  &.is-error {
46
+
44
47
  span, a {
45
48
  color: var(--jp-red-50);
46
49
  }
@@ -51,6 +54,7 @@
51
54
  }
52
55
 
53
56
  &.is-action {
57
+
54
58
  span, a {
55
59
  color: var(--jp-yellow-30);
56
60
  }
@@ -61,6 +65,7 @@
61
65
  }
62
66
 
63
67
  &.is-initializing {
68
+
64
69
  span, a {
65
70
  color: var(--jp-blue-40);
66
71
  }
@@ -117,6 +117,7 @@
117
117
  }
118
118
 
119
119
  @keyframes showTestimonial {
120
+
120
121
  0% {
121
122
  opacity: 0;
122
123
  }
@@ -98,6 +98,7 @@ $sides: (
98
98
  $sizes: ( 0, 1, 2, 3, 4, 5, 6, 7, 8 );
99
99
 
100
100
  @each $size in $sizes {
101
+
101
102
  /* m, p */
102
103
  .#{$p}-#{$size} {
103
104
  #{$prop}: calc( var( --spacing-base ) * #{$size} );
@@ -115,6 +116,7 @@ $sides: (
115
116
  }
116
117
 
117
118
  /* mt, mr, mb, ml */
119
+
118
120
  /* pt, pr, pb, pl */
119
121
  @each $side, $s in $sides {
120
122
  .#{$p}#{$s}-#{$size} {
@@ -1,5 +1,6 @@
1
1
  /* DO NOT USE THIS TO OVERRIDE STYLES */
2
2
  .global {
3
+
3
4
  & * {
4
5
  box-sizing: border-box;
5
6
  }
@@ -15,6 +15,7 @@
15
15
  }
16
16
 
17
17
  :global {
18
+
18
19
  .components-form-toggle {
19
20
  --wp-admin-theme-color: var( --jp-green-40 );
20
21
  height: calc( var(--base-width) * 3 );
@@ -50,7 +51,9 @@
50
51
  }
51
52
 
52
53
  .toggle.is-toggling {
54
+
53
55
  :global {
56
+
54
57
  .components-form-toggle {
55
58
  opacity: .6;
56
59
  }
@@ -82,6 +82,7 @@
82
82
  background-color: var( --jp-white );
83
83
  color: var( --jp-black );
84
84
  }
85
+
85
86
  &.primary {
86
87
  margin-left: 8px;
87
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.72.2",
3
+ "version": "0.72.3",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,7 +37,7 @@
37
37
  "uplot-react": "1.1.4"
38
38
  },
39
39
  "devDependencies": {
40
- "@automattic/jetpack-base-styles": "^0.6.45",
40
+ "@automattic/jetpack-base-styles": "^0.7.0",
41
41
  "@babel/core": "7.26.10",
42
42
  "@babel/preset-react": "7.26.3",
43
43
  "@jest/globals": "29.4.3",
@@ -89,6 +89,7 @@
89
89
  "clean": "rm -rf build/",
90
90
  "compile-ts": "tsc --pretty",
91
91
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
92
- "test-coverage": "pnpm run test --coverage"
92
+ "test-coverage": "pnpm run test --coverage",
93
+ "typecheck": "tsc --noEmit"
93
94
  }
94
95
  }