newspack-components 2.2.0 → 2.2.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.
@@ -1,74 +0,0 @@
1
- /**
2
- * Toggle Control
3
- */
4
-
5
- @import '../../../shared/scss/colors';
6
- @import '~@wordpress/base-styles/colors';
7
-
8
- .newspack-toggle-control {
9
- margin: 32px 0;
10
-
11
- .components-base-control__field {
12
- align-items: flex-start;
13
- margin: 0;
14
-
15
- .components-toggle-control__label {
16
- color: $gray-700;
17
- font-size: 14px;
18
- line-height: 24px;
19
- margin: 0;
20
- }
21
-
22
- .components-form-toggle {
23
- margin: 3px 8px 3px 0;
24
-
25
- &.is-checked {
26
- .components-form-toggle__track {
27
- background: $primary-500;
28
- border-color: transparent;
29
- }
30
- }
31
- }
32
- }
33
-
34
- // Is Dark
35
-
36
- &.newspack-toggle-control--is-dark {
37
- .components-base-control__field label {
38
- color: $gray-900;
39
- font-weight: bold;
40
- }
41
-
42
- .components-base-control__help {
43
- font-style: normal;
44
- }
45
- }
46
-
47
- // Is disabled
48
-
49
- &.newspack-toggle-control--is-disabled {
50
- opacity: 0.5;
51
- pointer-events: none;
52
- }
53
-
54
- // Focus
55
-
56
- .components-form-toggle__input:focus {
57
- + .components-form-toggle__track {
58
- box-shadow: 0 0 0 2px white, 0 0 0 4px $primary-500;
59
- }
60
- }
61
-
62
- // Multiple Toggle Controls
63
-
64
- & + & {
65
- margin-bottom: 32px;
66
- margin-top: -24px;
67
- }
68
-
69
- // Reset
70
-
71
- .components-base-control__help {
72
- margin: 0 0 0 44px;
73
- }
74
- }
@@ -1,58 +0,0 @@
1
- /**
2
- * Toggle Group
3
- */
4
-
5
- /**
6
- * WordPress dependencies.
7
- */
8
- import { Component } from '@wordpress/element';
9
- /**
10
- * Internal dependencies.
11
- */
12
-
13
- import { ToggleControl } from '../';
14
- import './style.scss';
15
- /**
16
- * External dependencies.
17
- */
18
-
19
- import classnames from 'classnames';
20
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
21
- import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
22
-
23
- class ToggleGroup extends Component {
24
- /**
25
- * Render.
26
- */
27
- render() {
28
- const {
29
- checked,
30
- children,
31
- description,
32
- onChange,
33
- title,
34
- className
35
- } = this.props;
36
- const classes = classnames('newspack-toggle-group', className);
37
- return _jsxs("div", {
38
- className: classes,
39
- children: [_jsx(ToggleControl, {
40
- checked: checked || false,
41
- onChange: onChange
42
- }), _jsxs("div", {
43
- className: "newspack-toggle-group__description",
44
- children: [_jsx("p", {
45
- className: "is-dark",
46
- children: _jsx("strong", {
47
- children: title
48
- })
49
- }), _jsx("p", {
50
- children: description
51
- }), checked && children]
52
- })]
53
- });
54
- }
55
-
56
- }
57
-
58
- export default ToggleGroup;
@@ -1,28 +0,0 @@
1
- /**
2
- * Toggle Group
3
- */
4
-
5
- .newspack-toggle-group {
6
- display: flex;
7
- margin: 32px 0;
8
-
9
- & &__description p {
10
- margin-bottom: 0;
11
- margin-top: 0;
12
- }
13
-
14
- .newspack-toggle-control {
15
- margin: 0;
16
- }
17
-
18
- &__description {
19
- flex: 1;
20
- }
21
-
22
- // Multiple Toogle Groups
23
-
24
- & + & {
25
- margin-bottom: 32px;
26
- margin-top: -16px;
27
- }
28
- }
@@ -1,148 +0,0 @@
1
- @import '~@wordpress/base-styles/colors';
2
- @import '../../../shared/scss/colors';
3
-
4
- .newspack-wizard {
5
- &__title {
6
- align-items: center;
7
- border-bottom: 1px solid $gray-300;
8
- display: flex;
9
-
10
- h1 {
11
- color: $gray-900;
12
- font-size: 21px;
13
- line-height: 30px;
14
- margin: 0;
15
- padding: 0 24px;
16
- }
17
-
18
- svg {
19
- fill: white;
20
- margin: 0 !important;
21
-
22
- &.newspack-icon {
23
- flex: 0 0 36px;
24
- margin-bottom: -1px !important;
25
- }
26
-
27
- &:not( .newspack-icon ) {
28
- background: $primary-500;
29
- left: 50%;
30
- margin: -18px 0 0 -18px !important;
31
- opacity: 0;
32
- position: absolute;
33
- top: 50%;
34
- transition: opacity 125ms ease-in-out;
35
- }
36
- }
37
-
38
- a {
39
- position: relative;
40
-
41
- &:hover {
42
- svg {
43
- opacity: 1;
44
- }
45
- }
46
- }
47
-
48
- a:focus-visible {
49
- outline: none !important;
50
-
51
- &::before {
52
- border: 2px solid white;
53
- border-radius: 3px;
54
- bottom: 5px;
55
- content: '';
56
- display: block;
57
- left: 6px;
58
- position: absolute;
59
- right: 6px;
60
- top: 6px;
61
- }
62
- }
63
- }
64
-
65
- &__content {
66
- color: $gray-700;
67
- font-size: 14px;
68
- line-height: 24px;
69
- margin: 0 auto;
70
- max-width: 1208px;
71
- padding: 0 16px;
72
-
73
- @media screen and ( min-width: 744px ) {
74
- padding: 32px 84px;
75
- }
76
-
77
- // Typography
78
-
79
- h1,
80
- h2,
81
- h3,
82
- p {
83
- line-height: 24px;
84
- margin: 32px 0;
85
- padding: 0;
86
- }
87
-
88
- h1 {
89
- color: $gray-900;
90
- font-size: 21px;
91
- font-weight: bold;
92
- line-height: 32px;
93
- }
94
-
95
- h2 {
96
- color: $gray-900;
97
- font-size: 17px;
98
- font-weight: bold;
99
- }
100
-
101
- h3 {
102
- color: $gray-900;
103
- font-size: 14px;
104
- font-weight: bold;
105
- }
106
-
107
- p {
108
- font-size: 14px;
109
-
110
- &.is-dark {
111
- color: $gray-900;
112
- }
113
- }
114
-
115
- strong {
116
- font-weight: bold;
117
- }
118
-
119
- small {
120
- font-size: 12px;
121
- line-height: 16px;
122
- }
123
-
124
- // Links
125
-
126
- a {
127
- color: $primary-500;
128
-
129
- &:active,
130
- &:focus,
131
- &:hover {
132
- color: $primary-600;
133
- text-decoration: none;
134
- }
135
-
136
- &:focus {
137
- box-shadow: none;
138
- outline: 2px solid $primary-500;
139
- outline-offset: 2px;
140
- }
141
- }
142
- }
143
-
144
- &__above-header {
145
- border-radius: 0;
146
- margin: 0;
147
- }
148
- }