@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,26 @@
|
|
|
1
|
+
/// Radio Control
|
|
2
|
+
///
|
|
3
|
+
/// Overrides the @wordpress/components RadioControl component.
|
|
4
|
+
/// @link https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/radio-control
|
|
5
|
+
|
|
6
|
+
.radio {
|
|
7
|
+
|
|
8
|
+
:global {
|
|
9
|
+
|
|
10
|
+
.components-radio-control {
|
|
11
|
+
|
|
12
|
+
&__input[type="radio"] {
|
|
13
|
+
|
|
14
|
+
&:checked {
|
|
15
|
+
background: var(--jp-green-40);
|
|
16
|
+
border-color: var(--jp-green-40);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:focus {
|
|
20
|
+
border-color: var(--jp-green-50);
|
|
21
|
+
box-shadow: 0 0 0 2px var(--jp-white), 0 0 0 4px var(--jp-green-50);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.record-meter-bar {
|
|
2
|
+
padding-block: 1em;
|
|
3
|
+
|
|
4
|
+
&__items {
|
|
5
|
+
height: 2rem;
|
|
6
|
+
display: flex;
|
|
7
|
+
border-radius: 1rem;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
margin-bottom: 2em;
|
|
10
|
+
background-color: var(--jp-gray-off);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__legend {
|
|
14
|
+
|
|
15
|
+
&--items {
|
|
16
|
+
display: flex;
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--item {
|
|
21
|
+
display: flex;
|
|
22
|
+
margin: 0;
|
|
23
|
+
margin-inline-end: 1em;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--item-circle {
|
|
28
|
+
width: 1rem;
|
|
29
|
+
height: 1rem;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
margin-inline-end: 0.4em;
|
|
32
|
+
border-radius: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--item-count {
|
|
36
|
+
margin-inline-end: 0.4em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--item-label-first {
|
|
40
|
+
margin-inline-end: 0.4em;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import './style.scss';
|
|
2
|
+
declare const Spinner: {
|
|
3
|
+
({ color, className, size }: {
|
|
4
|
+
color?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
propTypes: {
|
|
9
|
+
/** The spinner color. */
|
|
10
|
+
color: any;
|
|
11
|
+
/** CSS class names. */
|
|
12
|
+
className: any;
|
|
13
|
+
/** The spinner size. */
|
|
14
|
+
size: any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
1
17
|
export default Spinner;
|
|
2
|
-
declare function Spinner({ color, className, size }: {
|
|
3
|
-
color?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
size?: number;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare namespace Spinner {
|
|
8
|
-
namespace propTypes {
|
|
9
|
-
let color: any;
|
|
10
|
-
let className: any;
|
|
11
|
-
let size: any;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@keyframes rotate-spinner {
|
|
2
|
+
|
|
3
|
+
100% {
|
|
4
|
+
transform: rotate(360deg);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.jp-components-spinner {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.jp-components-spinner__outer,
|
|
14
|
+
.jp-components-spinner__inner {
|
|
15
|
+
margin: auto;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
border: 0.1em solid transparent;
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
animation: 3s linear infinite;
|
|
20
|
+
animation-name: rotate-spinner;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.jp-components-spinner__outer {
|
|
24
|
+
border-top-color: #fff;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.jp-components-spinner__inner {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
border-top-color: #fff;
|
|
31
|
+
border-right-color: #fff;
|
|
32
|
+
opacity: 0.4;
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.split-button {
|
|
2
|
+
--actions-size: 28px;
|
|
3
|
+
display: flex;
|
|
4
|
+
height: var(--actions-size);
|
|
5
|
+
border-radius: var(--jp-border-radius);
|
|
6
|
+
|
|
7
|
+
:global(.components-button-group) {
|
|
8
|
+
display: flex;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
> .button:first-child {
|
|
13
|
+
border-radius: var(--jp-border-radius) 0 0 var(--jp-border-radius);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
> :global(.components-dropdown) > .button {
|
|
17
|
+
border-radius: 0 var(--jp-border-radius) var(--jp-border-radius) 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.button {
|
|
22
|
+
font-size: var(--font-body-extra-small);
|
|
23
|
+
border-radius: var(--jp-border-radius);
|
|
24
|
+
height: var(--actions-size);
|
|
25
|
+
line-height: var(--actions-size);
|
|
26
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
background-color: var(--jp-white);
|
|
3
|
+
box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
|
|
4
|
+
border-radius: calc(var(--jp-border-radius) * 2); // 8px;
|
|
5
|
+
display: flex;
|
|
6
|
+
|
|
7
|
+
&.horizontal {
|
|
8
|
+
align-items: center;
|
|
9
|
+
padding: calc(var(--spacing-base) * 2); // 16px;
|
|
10
|
+
width: 358px;
|
|
11
|
+
|
|
12
|
+
.info {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
width: 100%;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.label {
|
|
20
|
+
margin: 0 calc(var(--spacing-base) * 2); // 16px;
|
|
21
|
+
flex-grow: 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.square {
|
|
26
|
+
--square-stat-vertical-spacing: calc(var(--spacing-base) * 2); // 16px;
|
|
27
|
+
--square-stat-horizontal-spacing: calc(var(--spacing-base) * 3); // 24px;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
height: 168px;
|
|
31
|
+
width: 168px;
|
|
32
|
+
padding: var(--square-stat-vertical-spacing) var(--square-stat-horizontal-spacing);
|
|
33
|
+
|
|
34
|
+
.label {
|
|
35
|
+
margin-bottom: calc(var(--spacing-base) / 2); // 4px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.value {
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.icon {
|
|
45
|
+
display: flex;
|
|
46
|
+
color: var(--jp-green-40);
|
|
47
|
+
fill: var(--jp-green-40);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.status {
|
|
2
|
+
--spacing-base: 8px;
|
|
3
|
+
--wp-admin-border-width-focus: 1.5px;
|
|
4
|
+
|
|
5
|
+
align-items: center;
|
|
6
|
+
display: flex;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
|
|
9
|
+
&__indicator {
|
|
10
|
+
background-color: var(--jp-gray-50);
|
|
11
|
+
border-radius: 50%;
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
height: 0.666em;
|
|
14
|
+
width: 0.666em;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__label {
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: 1.666;
|
|
20
|
+
margin-left: calc(var(--spacing-base) / 2); // 4px
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.is-active {
|
|
24
|
+
|
|
25
|
+
span,
|
|
26
|
+
a {
|
|
27
|
+
color: var(--jp-green-50);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.status__indicator {
|
|
31
|
+
background-color: var(--jp-green-50);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.is-inactive {
|
|
36
|
+
|
|
37
|
+
span,
|
|
38
|
+
a {
|
|
39
|
+
color: var(--jp-gray-50);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.status__indicator {
|
|
43
|
+
background-color: var(--jp-gray-50);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.is-error {
|
|
48
|
+
|
|
49
|
+
span,
|
|
50
|
+
a {
|
|
51
|
+
color: var(--jp-red-50);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.status__indicator {
|
|
55
|
+
background-color: var(--jp-red-50);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.is-action {
|
|
60
|
+
|
|
61
|
+
span,
|
|
62
|
+
a {
|
|
63
|
+
color: var(--jp-yellow-30);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.status__indicator {
|
|
67
|
+
background-color: var(--jp-yellow-30);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.is-initializing {
|
|
72
|
+
|
|
73
|
+
span,
|
|
74
|
+
a {
|
|
75
|
+
color: var(--jp-blue-40);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.status__indicator {
|
|
79
|
+
background-color: var(--jp-blue-40);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use "@automattic/jetpack-base-styles/gutenberg-base-styles" as gb;
|
|
2
|
+
|
|
3
|
+
.swipeable__container {
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
list-style: none;
|
|
9
|
+
padding: 0;
|
|
10
|
+
touch-action: pan-y;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.swipeable__pages {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: flex-start;
|
|
19
|
+
transition: all 0.5s ease-in-out;
|
|
20
|
+
transition-property: transform, height;
|
|
21
|
+
|
|
22
|
+
@include gb.reduce-motion( "transition" );
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.swipeable__page {
|
|
26
|
+
width: 100%;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
margin-left: 0;
|
|
29
|
+
|
|
30
|
+
&.is-clone {
|
|
31
|
+
position: relative;
|
|
32
|
+
pointer-events: none; // Prevent interactions with cloned elements
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
.testimonials {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
margin-top: 1.5rem;
|
|
5
|
+
padding: calc(var(--spacing-base) * 3);
|
|
6
|
+
padding-bottom: 0;
|
|
7
|
+
|
|
8
|
+
color: var(--jp-black);
|
|
9
|
+
background-color: var(--jp-white);
|
|
10
|
+
border-radius: var(--jp-border-radius);
|
|
11
|
+
box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
|
|
12
|
+
|
|
13
|
+
&__left-arrow,
|
|
14
|
+
&__right-arrow {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 50%;
|
|
17
|
+
transform: translateY(-50%);
|
|
18
|
+
|
|
19
|
+
background: none;
|
|
20
|
+
border: none;
|
|
21
|
+
|
|
22
|
+
svg {
|
|
23
|
+
color: #1e1e1e;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
svg {
|
|
30
|
+
color: var(--jp-gray-20);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__left-arrow {
|
|
36
|
+
left: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__right-arrow {
|
|
40
|
+
right: 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.testimonial {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column-reverse;
|
|
47
|
+
align-items: center;
|
|
48
|
+
|
|
49
|
+
&__author-img {
|
|
50
|
+
min-width: 325px;
|
|
51
|
+
width: 365px;
|
|
52
|
+
max-width: 100%;
|
|
53
|
+
margin-top: 3rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__content {
|
|
57
|
+
display: flex;
|
|
58
|
+
gap: 1rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__quote-icon {
|
|
62
|
+
min-width: 32px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__quote,
|
|
66
|
+
&__author {
|
|
67
|
+
font-size: var(--font-title-medium);
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
line-height: 1.3;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__quote {
|
|
73
|
+
margin: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__author {
|
|
77
|
+
display: block;
|
|
78
|
+
margin-top: 2rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__profession {
|
|
82
|
+
display: block;
|
|
83
|
+
margin-top: 0.5rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (min-width: 600px) {
|
|
87
|
+
padding: calc(var(--spacing-base) * 8);
|
|
88
|
+
padding-bottom: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (min-width: 1080px) {
|
|
92
|
+
flex-direction: row;
|
|
93
|
+
align-items: flex-end;
|
|
94
|
+
gap: 3rem;
|
|
95
|
+
|
|
96
|
+
padding-top: 0;
|
|
97
|
+
|
|
98
|
+
&__content {
|
|
99
|
+
align-self: center;
|
|
100
|
+
|
|
101
|
+
min-width: 350px;
|
|
102
|
+
max-width: 550px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&__text-block {
|
|
106
|
+
padding-bottom: calc(var(--spacing-base) * 3);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.show {
|
|
112
|
+
animation: showTestimonial 500ms ease-in-out forwards;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.hidden {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@keyframes showTestimonial {
|
|
120
|
+
|
|
121
|
+
0% {
|
|
122
|
+
opacity: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
100% {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/* Reset all margin and padding for used components */
|
|
2
|
+
.reset {
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Emerald Typography/Headline Medium */
|
|
8
|
+
.headline-medium {
|
|
9
|
+
font-size: var(--font-headline-medium);
|
|
10
|
+
font-weight: 700;
|
|
11
|
+
line-height: 52px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Emerald Typography/Headline Small */
|
|
15
|
+
.headline-small {
|
|
16
|
+
font-size: var(--font-headline-small);
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
line-height: 40px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Emerald Typography/Headline Small Regular */
|
|
22
|
+
.headline-small-regular {
|
|
23
|
+
font-size: var(--font-headline-small);
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
line-height: 40px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Emerald Typography/Title Medium */
|
|
29
|
+
.title-medium {
|
|
30
|
+
font-size: var(--font-title-medium);
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
line-height: 32px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Emerald Typography/Title Medium Semi Bold */
|
|
36
|
+
.title-medium-semi-bold {
|
|
37
|
+
font-size: var(--font-title-medium);
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
line-height: 32px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Emerald Typography/Title Small */
|
|
43
|
+
.title-small {
|
|
44
|
+
font-size: var(--font-title-small);
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
line-height: 30px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Emerald Typography/Body */
|
|
50
|
+
.body {
|
|
51
|
+
font-size: var(--font-body);
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
line-height: 24px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Emerald Typography/Body Small */
|
|
57
|
+
.body-small {
|
|
58
|
+
font-size: var(--font-body-small);
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
line-height: 24px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Emerald Typography/Body Extra Small */
|
|
64
|
+
.body-extra-small {
|
|
65
|
+
font-size: var(--font-body-extra-small);
|
|
66
|
+
font-weight: 400;
|
|
67
|
+
line-height: 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Emerald Typography/Body Extra Small Bold */
|
|
71
|
+
.body-extra-small-bold {
|
|
72
|
+
font-size: var(--font-body-extra-small);
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
line-height: 20px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Emerald Typography/Body Extra Small Label */
|
|
78
|
+
.label {
|
|
79
|
+
font-size: var(--font-body-extra-small);
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
line-height: 16px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Box-Model: Spacing (margin) */
|
|
85
|
+
$props: (
|
|
86
|
+
"margin": "m",
|
|
87
|
+
"padding": "p",
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
$sides: (
|
|
91
|
+
"top": "t",
|
|
92
|
+
"right": "r",
|
|
93
|
+
"bottom": "b",
|
|
94
|
+
"left": "l",
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
@each $prop, $p in $props {
|
|
98
|
+
$sizes: ( 0, 1, 2, 3, 4, 5, 6, 7, 8 );
|
|
99
|
+
|
|
100
|
+
@each $size in $sizes {
|
|
101
|
+
|
|
102
|
+
/* m, p */
|
|
103
|
+
.#{$p}-#{$size} {
|
|
104
|
+
#{$prop}: calc(var(--spacing-base) * #{$size});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* mx, px */
|
|
108
|
+
.#{$p}x-#{$size} {
|
|
109
|
+
#{$prop}-left: calc(var(--spacing-base) * #{$size});
|
|
110
|
+
#{$prop}-right: calc(var(--spacing-base) * #{$size});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.#{$p}y-#{$size} {
|
|
114
|
+
#{$prop}-top: calc(var(--spacing-base) * #{$size});
|
|
115
|
+
#{$prop}-bottom: calc(var(--spacing-base) * #{$size});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* mt, mr, mb, ml */
|
|
119
|
+
|
|
120
|
+
/* pt, pr, pb, pl */
|
|
121
|
+
@each $side, $s in $sides {
|
|
122
|
+
.#{$p}#{$s}-#{$size} {
|
|
123
|
+
#{$prop}-#{$side}: calc(var(--spacing-base) * #{$size});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// Toggle Control
|
|
2
|
+
///
|
|
3
|
+
/// Overrides the @wordpress/components ToggleControl component.
|
|
4
|
+
/// @link https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/form-toggle
|
|
5
|
+
.toggle {
|
|
6
|
+
--base-width: 8px;
|
|
7
|
+
--track-width: calc(var(--base-width) * 6);
|
|
8
|
+
|
|
9
|
+
&.is-small {
|
|
10
|
+
--base-width: 6px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.no-label :global(.components-toggle-control__label) {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:global {
|
|
18
|
+
|
|
19
|
+
.components-form-toggle {
|
|
20
|
+
--wp-admin-theme-color: var(--jp-green-40);
|
|
21
|
+
height: calc(var(--base-width) * 3);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
&__input:focus + .components-form-toggle__track {
|
|
25
|
+
box-shadow: 0 0 0 2px var(--jp-white), 0 0 0 4px var(--jp-green-50);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.components-form-toggle__track {
|
|
29
|
+
width: var(--track-width);
|
|
30
|
+
height: calc(var(--base-width) * 3);
|
|
31
|
+
border-radius: 12px;
|
|
32
|
+
border-width: 2px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.components-form-toggle__thumb {
|
|
36
|
+
width: calc(var(--base-width) * 2);
|
|
37
|
+
height: calc(var(--base-width) * 2);
|
|
38
|
+
top: calc(var(--base-width) / 2);
|
|
39
|
+
left: calc(var(--base-width) / 2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.is-checked .components-form-toggle__thumb {
|
|
43
|
+
transform: translateX(calc(var(--base-width) * 3));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.components-toggle-control__help {
|
|
48
|
+
margin-inline-start: calc(var(--track-width) + var(--spacing-base));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.toggle.is-toggling {
|
|
54
|
+
|
|
55
|
+
:global {
|
|
56
|
+
|
|
57
|
+
.components-form-toggle {
|
|
58
|
+
opacity: 0.6;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|