@automattic/jetpack-components 1.4.11 → 1.4.13
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 +16 -0
- package/build/components/action-button/index.d.ts +26 -16
- package/build/components/action-button/style.module.scss +11 -0
- package/build/components/action-popover/styles.module.scss +49 -0
- package/build/components/admin-page/style.module.scss +28 -0
- package/build/components/admin-section/basic/style.module.scss +3 -0
- package/build/components/admin-section/hero/style.module.scss +4 -0
- package/build/components/alert/style.module.scss +47 -0
- package/build/components/badge/style.module.scss +25 -0
- package/build/components/boost-score-bar/style.scss +189 -0
- package/build/components/boost-score-graph/style-annotation.scss +76 -0
- package/build/components/boost-score-graph/style-tooltip.scss +74 -0
- package/build/components/boost-score-graph/style.scss +22 -0
- package/build/components/button/style.module.scss +214 -0
- package/build/components/chip/style.module.scss +18 -0
- package/build/components/contextual-upgrade-trigger/style.module.scss +77 -0
- package/build/components/decorative-card/style.scss +116 -0
- package/build/components/details-viewer/styles.module.scss +40 -0
- package/build/components/dialog/style.module.scss +31 -0
- package/build/components/diff-viewer/styles.module.scss +52 -0
- package/build/components/donut-meter/style.scss +14 -0
- package/build/components/dot-pager/style.scss +78 -0
- package/build/components/global-notices/styles.module.scss +24 -0
- package/build/components/gridicon/style.scss +16 -0
- package/build/components/icon-tooltip/style.scss +124 -0
- package/build/components/icons/style.module.scss +71 -0
- package/build/components/indeterminate-progress-bar/style.module.scss +30 -0
- package/build/components/jetpack-footer/style.scss +119 -0
- package/build/components/layout/breakpoints.module.scss +21 -0
- package/build/components/layout/col/style.module.scss +30 -0
- package/build/components/layout/container/style.module.scss +35 -0
- package/build/components/loading-placeholder/style.module.scss +21 -0
- package/build/components/marked-lines/styles.module.scss +48 -0
- package/build/components/navigator-modal/styles.scss +99 -0
- package/build/components/notice/style.module.scss +120 -0
- package/build/components/number-control/index.d.ts +22 -5
- package/build/components/number-control/index.js +3 -3
- package/build/components/number-slider/style.scss +68 -0
- package/build/components/popover/style.scss +26 -0
- package/build/components/pricing-card/style.scss +113 -0
- package/build/components/pricing-table/styles.module.scss +235 -0
- package/build/components/product-offer/style.module.scss +93 -0
- package/build/components/product-price/style.module.scss +122 -0
- package/build/components/progress-bar/style.module.scss +18 -0
- package/build/components/radio-control/styles.module.scss +26 -0
- package/build/components/record-meter-bar/style.scss +43 -0
- package/build/components/spinner/index.d.ts +16 -12
- package/build/components/spinner/style.scss +33 -0
- package/build/components/split-button/style.module.scss +26 -0
- package/build/components/stat-card/style.module.scss +49 -0
- package/build/components/status/style.module.scss +82 -0
- package/build/components/swipeable/style.scss +34 -0
- package/build/components/terms-of-service/styles.scss +9 -0
- package/build/components/testimonials/style.scss +128 -0
- package/build/components/text/style.module.scss +127 -0
- package/build/components/theme-provider/globals.module.scss +7 -0
- package/build/components/toggle-control/styles.module.scss +61 -0
- package/build/components/upsell-banner/style.scss +92 -0
- package/build/index.d.ts +3 -3
- package/build/index.js +3 -3
- package/components/boost-score-bar/style.scss +1 -1
- package/components/jetpack-footer/style.scss +0 -1
- package/components/number-control/index.tsx +45 -0
- package/components/pricing-table/styles.module.scss +1 -1
- package/components/product-price/style.module.scss +1 -1
- package/index.ts +3 -3
- package/package.json +10 -9
- package/tools/copy-scss-to-build.mjs +62 -0
- package/components/number-control/index.jsx +0 -23
- /package/components/action-button/{index.jsx → index.tsx} +0 -0
- /package/components/spinner/{index.jsx → index.tsx} +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/style";
|
|
2
|
+
|
|
3
|
+
$arrow-color: var(--jp-gray);
|
|
4
|
+
|
|
5
|
+
// Fix arrow color
|
|
6
|
+
.components-popover:not(.is-without-arrow)::before {
|
|
7
|
+
border-color: $arrow-color;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Namespace to avoid overriding global styles
|
|
11
|
+
.icon-tooltip-helper {
|
|
12
|
+
// POPOVER_HELPER_WIDTH
|
|
13
|
+
width: 124px;
|
|
14
|
+
height: 18px;
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
// -( POPOVER_HELPER_WIDTH / 2 - iconSize / 2 ) + 'px'
|
|
18
|
+
left: -53px;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
* Fix arrow placement - section start
|
|
23
|
+
*/
|
|
24
|
+
.components-popover:not([data-y-axis="middle"])[data-x-axis="left"] .components-popover__content {
|
|
25
|
+
margin-right: -62px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.components-popover:not([data-y-axis="middle"])[data-x-axis="right"] .components-popover__content {
|
|
29
|
+
margin-left: -62px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Fix arrow placement - section end
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* Fix arrow position for legacy position option - section start
|
|
38
|
+
*/
|
|
39
|
+
.components-popover[data-y-axis="bottom"] .components-popover__content {
|
|
40
|
+
top: 2px !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.components-popover:not(.is-without-arrow)[data-y-axis="bottom"]::before {
|
|
44
|
+
top: -6px !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.components-popover:not(.is-without-arrow)[data-y-axis="bottom"]::after {
|
|
48
|
+
top: -4px !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.components-popover[data-y-axis="top"] .components-popover__content {
|
|
52
|
+
bottom: 10px !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.components-popover:not(.is-without-arrow)[data-y-axis="top"]::before {
|
|
56
|
+
bottom: 3px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.components-popover:not(.is-without-arrow)[data-y-axis="top"]::after {
|
|
60
|
+
bottom: 4px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* Fix arrow position for legacy position option - section end
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
&.is-wide .components-popover__content {
|
|
68
|
+
width: 440px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.icon-tooltip-wrapper {
|
|
73
|
+
display: inline-block;
|
|
74
|
+
position: relative;
|
|
75
|
+
color: var(--jp-black);
|
|
76
|
+
|
|
77
|
+
.components-button.is-link:focus:not(:disabled) {
|
|
78
|
+
box-shadow: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.icon-tooltip-container {
|
|
83
|
+
// Recover events
|
|
84
|
+
pointer-events: all;
|
|
85
|
+
|
|
86
|
+
// __content styles here covers both the inline and portal modes
|
|
87
|
+
.components-popover__content {
|
|
88
|
+
padding: 24px;
|
|
89
|
+
width: 304px;
|
|
90
|
+
white-space: normal;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
outline: none;
|
|
93
|
+
border: 1px solid $arrow-color;
|
|
94
|
+
max-width: 90vw;
|
|
95
|
+
margin: 0 10px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.icon-tooltip-title {
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
font-size: 16px;
|
|
102
|
+
line-height: 19px;
|
|
103
|
+
|
|
104
|
+
&:not(:last-child) {
|
|
105
|
+
margin-bottom: 8px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.icon-tooltip-content {
|
|
110
|
+
font-weight: 400;
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
line-height: 24px;
|
|
113
|
+
|
|
114
|
+
// Allow bulleted lists in tooltips.
|
|
115
|
+
ul {
|
|
116
|
+
margin: 0 0 0 1rem;
|
|
117
|
+
list-style-type: disc;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Remove bottom margin from last list item.
|
|
121
|
+
ul li:last-child {
|
|
122
|
+
margin-bottom: 0;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
|
|
2
|
+
|
|
3
|
+
.star-icon {
|
|
4
|
+
fill: #000;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.jetpack,
|
|
8
|
+
.checkmark-icon {
|
|
9
|
+
fill: var(--jp-green-primary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.socialIcon {
|
|
13
|
+
fill: gb.$gray-700;
|
|
14
|
+
|
|
15
|
+
&.bluesky {
|
|
16
|
+
fill: var(--color-bluesky);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.facebook {
|
|
20
|
+
fill: var(--color-facebook);
|
|
21
|
+
// Add some specificity to override the border-radius on Jetpack settings page
|
|
22
|
+
&:global(.social-logo) {
|
|
23
|
+
border-radius: 50%;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.twitter {
|
|
28
|
+
fill: var(--color-twitter);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.linkedin {
|
|
32
|
+
fill: var(--color-linkedin);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.tumblr {
|
|
36
|
+
fill: var(--color-tumblr);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.google {
|
|
40
|
+
fill: var(--color-gplus);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.mastodon {
|
|
44
|
+
fill: var(--color-mastodon);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.nextdoor {
|
|
48
|
+
fill: var(--color-nextdoor);
|
|
49
|
+
// Add some specificity to override the border-radius on Jetpack settings page
|
|
50
|
+
&:global(.social-logo) {
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.instagram {
|
|
56
|
+
fill: var(--color-instagram);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.whatsapp {
|
|
60
|
+
fill: var(--color-whatsapp);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.threads {
|
|
64
|
+
fill: var(--color-threads);
|
|
65
|
+
|
|
66
|
+
&:global(.social-logo) {
|
|
67
|
+
border-radius: 40%;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--jp-indeterminate-progress-bar__light-color: #f6f7f7;
|
|
3
|
+
--jp-indeterminate-progress-bar__dark-color: #ededee;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.indeterminate-progress-bar {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 24px;
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
border-radius: calc(var(--spacing-base) * 3);
|
|
11
|
+
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
background-size: 68px 100%;
|
|
14
|
+
background-image: linear-gradient(-45deg, var(--jp-indeterminate-progress-bar__light-color) 33%, var(--jp-indeterminate-progress-bar__dark-color) 33%, var(--jp-indeterminate-progress-bar__dark-color) 71%, var(--jp-indeterminate-progress-bar__light-color) 71%);
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@keyframes indeterminate_progress_bar__animation {
|
|
19
|
+
|
|
20
|
+
0% {
|
|
21
|
+
background-position: 136px 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
26
|
+
|
|
27
|
+
.indeterminate-progress-bar {
|
|
28
|
+
animation: indeterminate_progress_bar__animation 2000ms infinite linear;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
.jp-dashboard-footer {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
align-items: center;
|
|
5
|
+
|
|
6
|
+
max-width: 1128px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
color: var(--jp-black);
|
|
10
|
+
|
|
11
|
+
font-size: var(--font-body-extra-small);
|
|
12
|
+
line-height: 1.333;
|
|
13
|
+
|
|
14
|
+
a {
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
|
|
17
|
+
&:any-link,
|
|
18
|
+
&[role="button"] {
|
|
19
|
+
color: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
text-decoration-thickness: 1.5px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:focus {
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
outline-width: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:focus-visible {
|
|
33
|
+
border-radius: 2px;
|
|
34
|
+
box-shadow: none;
|
|
35
|
+
outline: 1.5px solid currentColor;
|
|
36
|
+
outline-offset: 3px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.is-sm {
|
|
41
|
+
|
|
42
|
+
> ul {
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
gap: 0.125rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.is-md {
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
> ul {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 1rem;
|
|
59
|
+
|
|
60
|
+
width: 100%;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
|
|
64
|
+
list-style: none;
|
|
65
|
+
|
|
66
|
+
> li {
|
|
67
|
+
margin-bottom: 0;
|
|
68
|
+
|
|
69
|
+
> a {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
gap: 0.25rem;
|
|
73
|
+
|
|
74
|
+
min-height: 44px; // Minimum target area size
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.jp-dashboard-footer__accessible-external-link {
|
|
81
|
+
border: 0;
|
|
82
|
+
clip-path: inset(50%);
|
|
83
|
+
height: 1px;
|
|
84
|
+
margin: -1px;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
padding: 0;
|
|
87
|
+
position: absolute;
|
|
88
|
+
width: 1px;
|
|
89
|
+
overflow-wrap: normal;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.jp-dashboard-footer__jp-item {
|
|
93
|
+
padding-inline-end: 1rem;
|
|
94
|
+
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
|
|
97
|
+
.jp-dashboard-footer.is-sm & {
|
|
98
|
+
padding-bottom: 1rem;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.jp-dashboard-footer__a8c-item {
|
|
103
|
+
|
|
104
|
+
.jp-dashboard-footer.is-lg & {
|
|
105
|
+
margin-inline-start: auto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.jp-dashboard-footer.is-sm & {
|
|
109
|
+
padding-top: 1rem;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.jp-dashboard-footer__jp-item,
|
|
114
|
+
.jp-dashboard-footer__a8c-item {
|
|
115
|
+
|
|
116
|
+
> a {
|
|
117
|
+
text-decoration: none; // Logos typically have no hover effect
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:string";
|
|
3
|
+
|
|
4
|
+
$cols-sizes: ("sm": 4, "md": 8, "lg": 12);
|
|
5
|
+
$breakpoints: ("sm": "(max-width: 599px)", "md": "(min-width: 600px) and (max-width: 959px)", "lg": "(min-width: 960px)");
|
|
6
|
+
|
|
7
|
+
@mixin media($breakpoint) {
|
|
8
|
+
$media: map.get($breakpoints, #{$breakpoint});
|
|
9
|
+
$columns: map.get($cols-sizes, #{$breakpoint});
|
|
10
|
+
|
|
11
|
+
@media #{$media} {
|
|
12
|
+
@content($columns);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:export {
|
|
17
|
+
|
|
18
|
+
@each $breakpoint, $media in $breakpoints {
|
|
19
|
+
#{$breakpoint}: string.unquote($media);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../breakpoints.module" as breakpoints;
|
|
3
|
+
|
|
4
|
+
@mixin cols($size) {
|
|
5
|
+
|
|
6
|
+
@include breakpoints.media($size) using ($columns) {
|
|
7
|
+
|
|
8
|
+
@for $i from 1 through $columns {
|
|
9
|
+
.col-#{$size}-#{$i} {
|
|
10
|
+
grid-column-end: span #{$i};
|
|
11
|
+
}
|
|
12
|
+
.col-#{$size}-#{$i}-start {
|
|
13
|
+
grid-column-start: #{$i};
|
|
14
|
+
}
|
|
15
|
+
.col-#{$size}-#{$i}-end {
|
|
16
|
+
grid-column-end: #{$i + 1};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include cols("sm");
|
|
23
|
+
@include cols("md");
|
|
24
|
+
@include cols("lg");
|
|
25
|
+
|
|
26
|
+
:export {
|
|
27
|
+
smcols: map.get(breakpoints.$cols-sizes, "sm");
|
|
28
|
+
mdcols: map.get(breakpoints.$cols-sizes, "md");
|
|
29
|
+
lgcols: map.get(breakpoints.$cols-sizes, "lg");
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../breakpoints.module" as breakpoints;
|
|
3
|
+
|
|
4
|
+
@mixin container($size) {
|
|
5
|
+
$paddings: ("sm": "16px", "md": "18px", "lg": "24px");
|
|
6
|
+
$padding: map.get($paddings, #{$size});
|
|
7
|
+
|
|
8
|
+
@include breakpoints.media(#{$size}) using ($columns) {
|
|
9
|
+
padding: 0 #{$padding};
|
|
10
|
+
grid-template-columns: repeat(#{$columns}, minmax(0, 1fr));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
--max-container-width: 1128px;
|
|
16
|
+
// vertical spacing
|
|
17
|
+
--vertical-gutter: 24px;
|
|
18
|
+
// horizontal spacing
|
|
19
|
+
--horizontal-spacing: 8px;
|
|
20
|
+
|
|
21
|
+
display: grid;
|
|
22
|
+
column-gap: var(--vertical-gutter);
|
|
23
|
+
max-width: var(--max-container-width);
|
|
24
|
+
margin: 0 auto;
|
|
25
|
+
width: 100%;
|
|
26
|
+
|
|
27
|
+
@include container( "sm" );
|
|
28
|
+
@include container( "md" );
|
|
29
|
+
@include container( "lg" );
|
|
30
|
+
|
|
31
|
+
&.fluid {
|
|
32
|
+
max-width: none;
|
|
33
|
+
padding: unset;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@keyframes pulse {
|
|
2
|
+
|
|
3
|
+
0% {
|
|
4
|
+
opacity: 0.6;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
50% {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
100% {
|
|
12
|
+
opacity: 0.6;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.placeholder {
|
|
17
|
+
background-color: var(--jp-gray);
|
|
18
|
+
animation: pulse 1.5s infinite;
|
|
19
|
+
height: 100%;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.marked-lines {
|
|
2
|
+
padding: 0;
|
|
3
|
+
background-color: var(--jp-gray-0);
|
|
4
|
+
font-family: monospace;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
overflow-x: auto;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.marked-lines__marked-line {
|
|
11
|
+
background-color: var(--jp-red-0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.marked-lines__line-numbers {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
text-align: right;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.marked-lines__line-number {
|
|
21
|
+
padding: 0 calc(var(--spacing-base) / 2); // 0px | 4px
|
|
22
|
+
background-color: var(--jp-gray-10);
|
|
23
|
+
color: var(--font-body);
|
|
24
|
+
|
|
25
|
+
&.marked-lines__marked-line {
|
|
26
|
+
background-color: var(--jp-red-50);
|
|
27
|
+
color: var(--jp-white);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.marked-lines__lines {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex: 1;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
white-space: pre;
|
|
36
|
+
overflow-x: visible;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.marked-lines__line {
|
|
40
|
+
padding-left: var(--spacing-base); // 8px
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.marked-lines__mark {
|
|
44
|
+
background-color: var(--jp-red);
|
|
45
|
+
color: var(--jp-white);
|
|
46
|
+
border-radius: calc(var(--jp-border-radius) / 2); // 2px
|
|
47
|
+
padding: calc(var(--spacing-base) / 4) calc(var(--spacing-base) / 2); // 2px | 4px
|
|
48
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
|
|
2
|
+
|
|
3
|
+
.components-modal__screen-overlay:has(.jp-navigator-modal) {
|
|
4
|
+
z-index: 99999; // Slightly lower than snackbar z-index (100001) so snackbars remain visible above the modal
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.jp-navigator-modal {
|
|
8
|
+
container-type: inline-size;
|
|
9
|
+
container-name: navigator-modal;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
@include gb.break-medium() {
|
|
13
|
+
max-height: 90%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.components-modal__content {
|
|
17
|
+
padding: 0;
|
|
18
|
+
|
|
19
|
+
> div {
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__navigator {
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__screen {
|
|
29
|
+
height: 100%;
|
|
30
|
+
padding: 0;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__header {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
padding: 1.5rem;
|
|
39
|
+
height: 4.5rem;
|
|
40
|
+
border-bottom: 1px solid gb.$gray-200;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
|
|
43
|
+
h1 {
|
|
44
|
+
margin: 0;
|
|
45
|
+
font-size: 15px;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
line-height: 24px;
|
|
48
|
+
color: gb.$gray-900;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__title-wrap {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__body {
|
|
59
|
+
height: 100%;
|
|
60
|
+
overflow: auto;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
|
|
63
|
+
@container navigator-modal (width >= #{gb.$break-small}) {
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__sidebar {
|
|
69
|
+
width: 100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 1.5rem;
|
|
73
|
+
|
|
74
|
+
@container navigator-modal (width >= #{gb.$break-small}) {
|
|
75
|
+
flex-basis: 30%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
border-inline-end: 1px solid gb.$gray-300;
|
|
79
|
+
overflow: auto;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__content {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
flex: 1;
|
|
87
|
+
|
|
88
|
+
@container navigator-modal (width >= #{gb.$break-small}) {
|
|
89
|
+
overflow: auto;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__footer {
|
|
94
|
+
padding: 1rem 1.5rem;
|
|
95
|
+
border-top: 1px solid gb.$gray-300;
|
|
96
|
+
height: 4.5rem;
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
|
|
5
|
+
font-size: var(--font-body);
|
|
6
|
+
|
|
7
|
+
border: 1px solid var(--jp-black);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
border-color: var(--jp-gray-5);
|
|
10
|
+
border-left-width: 6px;
|
|
11
|
+
|
|
12
|
+
padding: 24px 31px 27px 18px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.icon-wrapper {
|
|
16
|
+
margin-right: 20px;
|
|
17
|
+
width: calc(var(--spacing-base) * 3);
|
|
18
|
+
height: calc(var(--spacing-base) * 3);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.close-button {
|
|
22
|
+
padding: 0;
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
border: none;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
outline: none;
|
|
27
|
+
|
|
28
|
+
svg {
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Mobile layout differences.
|
|
34
|
+
@media screen and ( max-width: 600px ) {
|
|
35
|
+
|
|
36
|
+
.container {
|
|
37
|
+
position: relative;
|
|
38
|
+
padding-top: 68px;
|
|
39
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.icon-wrapper {
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 24px;
|
|
45
|
+
left: 24px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.close-button {
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 24px;
|
|
51
|
+
right: 24px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.main-content {
|
|
56
|
+
flex-grow: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.title {
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
margin-bottom: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.action-bar {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
margin-top: 20px;
|
|
68
|
+
row-gap: 20px;
|
|
69
|
+
flex-wrap: wrap;
|
|
70
|
+
|
|
71
|
+
@media screen and ( max-width: 600px ) {
|
|
72
|
+
justify-content: center;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
a {
|
|
76
|
+
|
|
77
|
+
&,
|
|
78
|
+
&:hover,
|
|
79
|
+
&:active,
|
|
80
|
+
&:focus {
|
|
81
|
+
color: var(--jp-black);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
> * {
|
|
86
|
+
margin-right: 24px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.is-error {
|
|
91
|
+
border-left-color: var(--jp-red);
|
|
92
|
+
|
|
93
|
+
.icon {
|
|
94
|
+
fill: var(--jp-red);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.is-warning {
|
|
99
|
+
border-left-color: var(--jp-yellow-20);
|
|
100
|
+
|
|
101
|
+
.icon {
|
|
102
|
+
fill: var(--jp-yellow-20);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.is-info {
|
|
107
|
+
border-left-color: var(--black);
|
|
108
|
+
|
|
109
|
+
.icon {
|
|
110
|
+
fill: var(--black);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.is-success {
|
|
115
|
+
border-left-color: var(--jp-green);
|
|
116
|
+
|
|
117
|
+
.icon {
|
|
118
|
+
fill: var(--jp-green);
|
|
119
|
+
}
|
|
120
|
+
}
|