@automattic/jetpack-components 1.4.10 → 1.4.12
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 +13 -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 +120 -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/navigator-modal/styles.scss +1 -0
- package/components/number-control/index.tsx +45 -0
- package/index.ts +3 -3
- package/package.json +6 -5
- 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,214 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
--wp-admin-theme-color: var(--jp-black);
|
|
3
|
+
--wp-admin-theme-color-darker-10: var(--jp-black-80);
|
|
4
|
+
--wp-admin-theme-color-darker-20: var(--jp-black-80);
|
|
5
|
+
// 1.51px to avoid subpixel rendering issues on Firefox/Linux
|
|
6
|
+
--wp-admin-border-width-focus: 1.51px;
|
|
7
|
+
|
|
8
|
+
border-radius: var(--jp-border-radius);
|
|
9
|
+
justify-content: center;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
|
|
12
|
+
// Icon Button
|
|
13
|
+
&.is-icon-button {
|
|
14
|
+
padding: var(--spacing-base);
|
|
15
|
+
width: calc(var(--spacing-base) * 5);
|
|
16
|
+
height: calc(var(--spacing-base) * 5);
|
|
17
|
+
|
|
18
|
+
> svg:first-child {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.small {
|
|
24
|
+
padding: calc(var(--spacing-base) / 2);
|
|
25
|
+
width: calc(var(--spacing-base) * 4);
|
|
26
|
+
min-width: calc(var(--spacing-base) * 4);
|
|
27
|
+
height: calc(var(--spacing-base) * 4);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Normal Size & Font
|
|
32
|
+
&.normal:not(.is-icon-button) {
|
|
33
|
+
height: auto;
|
|
34
|
+
font-size: var(--font-body);
|
|
35
|
+
line-height: 24px;
|
|
36
|
+
padding: var(--spacing-base) calc(var(--spacing-base) * 3); // 8px - 24px
|
|
37
|
+
|
|
38
|
+
// With icon
|
|
39
|
+
&.icon {
|
|
40
|
+
padding: var(--spacing-base) calc(var(--spacing-base) * 2); // 8px - 16px
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Small Size & Font
|
|
45
|
+
&.small:not(.is-icon-button) {
|
|
46
|
+
height: auto;
|
|
47
|
+
font-size: var(--font-body-extra-small);
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
padding: calc(var(--spacing-base) / 2) var(--spacing-base); // 4px - 8px
|
|
50
|
+
|
|
51
|
+
&.icon > svg:first-child {
|
|
52
|
+
margin-right: calc(var(--spacing-base) / 2); // 4px
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// With Spinner
|
|
56
|
+
> :global(.components-spinner) {
|
|
57
|
+
height: 20px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.regular {
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Full Width
|
|
66
|
+
&.full-width {
|
|
67
|
+
min-width: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// SPECIFICS
|
|
71
|
+
// PRIMARY AND SECONDARY
|
|
72
|
+
|
|
73
|
+
// Primary & Secondary
|
|
74
|
+
&:global(.is-primary),
|
|
75
|
+
&:global(.is-secondary) {
|
|
76
|
+
// Disabled
|
|
77
|
+
&:disabled {
|
|
78
|
+
background: var(--jp-gray);
|
|
79
|
+
color: var(--jp-gray-20);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Only Secondary
|
|
84
|
+
&:global(.is-secondary) {
|
|
85
|
+
background: var(--jp-white);
|
|
86
|
+
// 1.51px to avoid subpixel rendering issues on Firefox/Linux
|
|
87
|
+
box-shadow: inset 0 0 0 1.51px var(--jp-black);
|
|
88
|
+
|
|
89
|
+
// Hover & Active
|
|
90
|
+
&:active:not(:disabled),
|
|
91
|
+
&:hover:not(:disabled) {
|
|
92
|
+
background: var(--jp-gray-0);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// SPECIFICS
|
|
97
|
+
// LINK & EXTERNAL LINK
|
|
98
|
+
|
|
99
|
+
&:global(.is-link) {
|
|
100
|
+
// Normal & Small Spacing
|
|
101
|
+
&.normal,
|
|
102
|
+
&.small {
|
|
103
|
+
padding: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Hover State
|
|
107
|
+
&:hover:not(:disabled) {
|
|
108
|
+
text-decoration-thickness: 3px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Focus State
|
|
112
|
+
&:focus:not(:disabled) {
|
|
113
|
+
text-decoration-line: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// DESTRUCTIVE
|
|
118
|
+
|
|
119
|
+
&:global(.is-destructive) {
|
|
120
|
+
// Primary
|
|
121
|
+
&:global(.is-primary) {
|
|
122
|
+
box-shadow: none;
|
|
123
|
+
|
|
124
|
+
&:not(:disabled) {
|
|
125
|
+
color: var(--jp-white);
|
|
126
|
+
background: var(--jp-red-50);
|
|
127
|
+
box-shadow: inset 0 0 0 1px var(--jp-red-50);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&:hover:not(:disabled) {
|
|
131
|
+
background: var(--jp-red-60);
|
|
132
|
+
box-shadow: inset 0 0 0 1px var(--jp-red-60);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:focus:not(:disabled) {
|
|
136
|
+
box-shadow: inset 0 0 0 1px var(--jp-white), 0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);
|
|
137
|
+
background: var(--jp-red-70);
|
|
138
|
+
color: var(--jp-white);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:active:not(:disabled) {
|
|
142
|
+
background: var(--jp-red-50);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Secondary
|
|
147
|
+
&:global(.is-secondary) {
|
|
148
|
+
box-shadow: none;
|
|
149
|
+
|
|
150
|
+
&:not(:disabled) {
|
|
151
|
+
color: var(--jp-red-50);
|
|
152
|
+
background: var(--jp-white);
|
|
153
|
+
box-shadow: inset 0 0 0 1.5px var(--jp-red-50);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:hover:not(:disabled) {
|
|
157
|
+
background: var(--jp-red-0);
|
|
158
|
+
box-shadow: inset 0 0 0 1.5px var(--jp-red-60);
|
|
159
|
+
color: var(--jp-red-60);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:focus:not(:disabled) {
|
|
163
|
+
box-shadow: inset 0 0 0 1px var(--jp-white), 0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);
|
|
164
|
+
color: var(--jp-red-70);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:active:not(:disabled) {
|
|
168
|
+
background: var(--jp-gray-0);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Link
|
|
173
|
+
&:global(.is-link) {
|
|
174
|
+
|
|
175
|
+
&:not(:disabled) {
|
|
176
|
+
color: var(--jp-red-50);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:hover:not(:disabled) {
|
|
180
|
+
color: var(--jp-red-60);
|
|
181
|
+
box-shadow: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&:focus:not(:disabled) {
|
|
185
|
+
color: var(--jp-red-70);
|
|
186
|
+
box-shadow: inset 0 0 0 1px var(--jp-white), 0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// LOADING
|
|
192
|
+
|
|
193
|
+
&.loading {
|
|
194
|
+
position: relative;
|
|
195
|
+
|
|
196
|
+
&:global(.has-icon) {
|
|
197
|
+
justify-content: center;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
> *:not(:global(.components-spinner)) {
|
|
201
|
+
visibility: hidden;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Spinner
|
|
205
|
+
> :global(.components-spinner) {
|
|
206
|
+
margin: 0;
|
|
207
|
+
position: absolute;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.external-icon {
|
|
213
|
+
margin-left: calc(var(--spacing-base) / 2); // 4px
|
|
214
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
&.is-new {
|
|
15
|
+
background-color: var(--jp-green-5);
|
|
16
|
+
color: var(--jp-green-50);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/style";
|
|
2
|
+
|
|
3
|
+
.jp-components__decorative-card {
|
|
4
|
+
display: flex;
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
box-shadow: 0 0 15px var(--jp-gray);
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 360px;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
height: 280px;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
margin-bottom: 3rem;
|
|
14
|
+
|
|
15
|
+
&__image,
|
|
16
|
+
&__content {
|
|
17
|
+
width: 50%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__image {
|
|
21
|
+
background: var(--jp-gray);
|
|
22
|
+
background-size: cover;
|
|
23
|
+
position: relative;
|
|
24
|
+
|
|
25
|
+
&::before {
|
|
26
|
+
content: "";
|
|
27
|
+
display: block;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 24px;
|
|
30
|
+
left: 24px;
|
|
31
|
+
width: 38px;
|
|
32
|
+
height: 8px;
|
|
33
|
+
background-image: url('data:image/svg+xml,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__content {
|
|
38
|
+
background: #fff;
|
|
39
|
+
padding: 2rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__icon-container {
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 50%;
|
|
45
|
+
left: 50%;
|
|
46
|
+
transform: translate(-50%, -50%);
|
|
47
|
+
width: 80px;
|
|
48
|
+
height: 80px;
|
|
49
|
+
background: var(--jp-red);
|
|
50
|
+
border-radius: 50px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__icon {
|
|
54
|
+
width: 40px;
|
|
55
|
+
height: 40px;
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 50%;
|
|
58
|
+
left: 50%;
|
|
59
|
+
transform: translate(-50%, -50%);
|
|
60
|
+
background-position: center, center;
|
|
61
|
+
background-repeat: no-repeat;
|
|
62
|
+
|
|
63
|
+
&--unlink {
|
|
64
|
+
background-image: url('data:image/svg+xml,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__lines {
|
|
69
|
+
display: block;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 12px;
|
|
72
|
+
border-radius: 6px;
|
|
73
|
+
background: #e9eff5;
|
|
74
|
+
position: relative;
|
|
75
|
+
|
|
76
|
+
&::before,
|
|
77
|
+
&::after {
|
|
78
|
+
content: "";
|
|
79
|
+
display: block;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 12px;
|
|
82
|
+
border-radius: 6px;
|
|
83
|
+
background: #e9eff5;
|
|
84
|
+
position: relative;
|
|
85
|
+
top: calc(100% + 16px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&::after {
|
|
89
|
+
top: calc(100% + 32px);
|
|
90
|
+
width: 75%;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Variants
|
|
95
|
+
&--vertical {
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
|
|
98
|
+
.jp-components__decorative-card__image,
|
|
99
|
+
.jp-components__decorative-card__content {
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 50%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.jp-components__decorative-card__lines {
|
|
105
|
+
max-width: 135px;
|
|
106
|
+
margin-left: auto;
|
|
107
|
+
margin-right: auto;
|
|
108
|
+
|
|
109
|
+
&::before,
|
|
110
|
+
&::after {
|
|
111
|
+
margin-left: auto;
|
|
112
|
+
margin-right: auto;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.details-viewer {
|
|
2
|
+
padding: 0;
|
|
3
|
+
background-color: var(--jp-gray-0);
|
|
4
|
+
font-family: monospace;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
overflow-x: auto;
|
|
8
|
+
margin-bottom: var(--spacing-base); // 8px
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.details-viewer__item {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
padding: calc(var(--spacing-base) / 2); // 4px
|
|
15
|
+
border-bottom: 1px solid var(--jp-gray-10);
|
|
16
|
+
|
|
17
|
+
&:last-child {
|
|
18
|
+
border-bottom: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.details-viewer__key {
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
padding-right: var(--spacing-base); // 8px
|
|
25
|
+
color: var(--jp-gray-80);
|
|
26
|
+
min-width: 120px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.details-viewer__value {
|
|
30
|
+
flex: 1;
|
|
31
|
+
white-space: pre-wrap;
|
|
32
|
+
word-break: break-all;
|
|
33
|
+
|
|
34
|
+
pre {
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
font-family: monospace;
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.one-section-style {
|
|
2
|
+
--product-card-shadow: rgb(0 0 0 / 3%);
|
|
3
|
+
background-color: var(--jp-white);
|
|
4
|
+
border: 1px solid var(--jp-gray);
|
|
5
|
+
border-radius: var(--jp-border-radius);
|
|
6
|
+
box-shadow: 0 2px 6px var(--product-card-shadow), 0 1px 2px var(--product-card-shadow);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.primary,
|
|
10
|
+
.secondary {
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Fit images in secondary section.
|
|
15
|
+
.secondary {
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
img {
|
|
19
|
+
// let's fit images
|
|
20
|
+
object-fit: cover;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Viewport breakpoints.
|
|
26
|
+
.is-viewport-small {
|
|
27
|
+
// Add spacing between primary and secondary in "sm" viewport size
|
|
28
|
+
.primary {
|
|
29
|
+
margin-bottom: calc(var(--spacing-base) * 3);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.diff-viewer {
|
|
2
|
+
font-size: var(--font-body);
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.diff-viewer__filename {
|
|
7
|
+
padding: calc(var(--spacing-base) / 2) var(--spacing-base); // 4px | 8px
|
|
8
|
+
background-color: var(--jp-gray-10);
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.diff-viewer__file {
|
|
13
|
+
background-color: var(--jp-gray-0);
|
|
14
|
+
display: flex;
|
|
15
|
+
font-family: "Courier 10 Pitch", Courier, monospace;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
overflow-x: auto;
|
|
18
|
+
white-space: pre;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.diff-viewer__line-numbers {
|
|
22
|
+
padding: 0 var(--spacing-base); // 0px | 8px
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
text-align: right;
|
|
26
|
+
background-color: var(--jp-gray-10);
|
|
27
|
+
color: var(--jp-gray-50);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.diff-viewer__lines {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
flex-grow: 1;
|
|
34
|
+
overflow-x: visible;
|
|
35
|
+
|
|
36
|
+
div,
|
|
37
|
+
del,
|
|
38
|
+
ins {
|
|
39
|
+
padding: 0 var(--spacing-base); // 0px | 8px
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
del {
|
|
44
|
+
background-color: var(--jp-red-0);
|
|
45
|
+
color: var(--jp-red-60);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
ins {
|
|
49
|
+
background-color: var(--jp-green-5);
|
|
50
|
+
color: var(--jp-green-60);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
|
|
2
|
+
@use "@automattic/jetpack-base-styles/root-variables";
|
|
3
|
+
|
|
4
|
+
.dot-pager {
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dot-pager__page {
|
|
11
|
+
height: 100%;
|
|
12
|
+
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
|
|
13
|
+
opacity: 1;
|
|
14
|
+
visibility: visible;
|
|
15
|
+
|
|
16
|
+
@include gb.reduce-motion( "transition" );
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dot-pager__controls {
|
|
20
|
+
margin: 0;
|
|
21
|
+
margin-bottom: 16px;
|
|
22
|
+
margin-top: auto;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
position: absolute;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
|
|
31
|
+
li {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
margin: 0 4px;
|
|
34
|
+
height: 18px;
|
|
35
|
+
align-items: center;
|
|
36
|
+
|
|
37
|
+
&:first-child {
|
|
38
|
+
margin-left: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:last-child {
|
|
42
|
+
margin-right: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dot-pager__control-gap {
|
|
47
|
+
margin-left: auto;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dot-pager__control-choose-page {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
width: 6px;
|
|
55
|
+
height: 6px;
|
|
56
|
+
padding: 0;
|
|
57
|
+
background-color: var(--jp-white-off);
|
|
58
|
+
|
|
59
|
+
&:disabled {
|
|
60
|
+
cursor: default;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:focus-visible {
|
|
64
|
+
box-shadow: 0 0 0 2px var(--jp-gray-90);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
background-color: var(--jp-gray-20);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.dot-pager__control-current {
|
|
72
|
+
background-color: var(--jp-gray-80);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dot-pager__button {
|
|
77
|
+
margin-right: 10px;
|
|
78
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
|
|
2
|
+
|
|
3
|
+
.global-notices {
|
|
4
|
+
|
|
5
|
+
&:global(.components-snackbar-list) {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset-block-start: auto; // top
|
|
8
|
+
inset-block-end: 0; // bottom
|
|
9
|
+
inset-inline: 0; // left and right
|
|
10
|
+
// Modals have 100000, so this needs to be above them
|
|
11
|
+
z-index: 100001;
|
|
12
|
+
|
|
13
|
+
@include gb.break-small {
|
|
14
|
+
width: auto;
|
|
15
|
+
inset-inline: unset; // left and right
|
|
16
|
+
inset-block-start: 4rem;
|
|
17
|
+
inset-inline-end: 1rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@include gb.break-medium {
|
|
21
|
+
inset-block-start: 3rem;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.gridicon {
|
|
2
|
+
fill: currentColor;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
|
|
5
|
+
&.needs-offset g {
|
|
6
|
+
transform: translate(1px, 1px); /* translates to .5px because it's in a child element */
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&.needs-offset-x g {
|
|
10
|
+
transform: translate(1px, 0); /* only nudges horizontally */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.needs-offset-y g {
|
|
14
|
+
transform: translate(0, 1px); /* only nudges vertically */
|
|
15
|
+
}
|
|
16
|
+
}
|