newspack-components 2.2.1 → 3.0.0-alpha.2
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/babel.config.js +25 -0
- package/copy-styles.js +2 -10
- package/dist/{cjs/accordion → accordion}/index.js +17 -13
- package/dist/{cjs/accordion → accordion}/style.scss +7 -3
- package/dist/{cjs/action-card → action-card}/index.js +39 -43
- package/dist/{esm/action-card → action-card}/style.scss +9 -9
- package/dist/{cjs/autocomplete-tokenfield → autocomplete-tokenfield}/index.js +67 -29
- package/dist/{esm/autocomplete-tokenfield → autocomplete-tokenfield}/style.scss +14 -8
- package/dist/{cjs/autocomplete-with-suggestions → autocomplete-with-suggestions}/index.js +61 -73
- package/dist/{esm/autocomplete-with-suggestions → autocomplete-with-suggestions}/style.scss +9 -17
- package/dist/button/index.js +51 -0
- package/{src/button/index.js → dist/button/index.tsx} +12 -5
- package/dist/{cjs/button → button}/style.scss +1 -1
- package/dist/{cjs/button-card → button-card}/index.js +9 -10
- package/dist/{cjs/button-card → button-card}/style.scss +19 -13
- package/dist/{cjs/card → card}/index.js +4 -5
- package/dist/{esm/card → card}/style.scss +1 -1
- package/dist/{cjs/category-autocomplete → category-autocomplete}/index.js +51 -53
- package/dist/{esm/category-autocomplete → category-autocomplete}/style.scss +2 -2
- package/dist/{cjs/color-picker → color-picker}/index.js +14 -16
- package/dist/{cjs/color-picker → color-picker}/style.scss +3 -3
- package/dist/consts.js +7 -0
- package/dist/{cjs/custom-select-control → custom-select-control}/index.js +4 -5
- package/dist/{cjs/custom-select-control → custom-select-control}/style.scss +11 -10
- package/dist/{cjs/date-range-picker → date-range-picker}/index.js +9 -11
- package/dist/{cjs/date-range-picker → date-range-picker}/style.scss +6 -6
- package/dist/{cjs/footer → footer}/index.js +33 -36
- package/dist/{cjs/footer → footer}/style.scss +1 -1
- package/dist/{cjs/form-token-field → form-token-field}/index.js +6 -7
- package/dist/{esm/form-token-field → form-token-field}/style.scss +1 -1
- package/dist/{cjs/global-notices → global-notices}/index.js +4 -5
- package/dist/grid/index.js +44 -0
- package/dist/grid/index.tsx +34 -0
- package/dist/{cjs/grid → grid}/style.scss +9 -9
- package/dist/{cjs/handoff → handoff}/index.js +73 -71
- package/dist/{cjs/handoff-message → handoff-message}/index.js +5 -3
- package/dist/hooks/index.js +29 -0
- package/{src/hooks/index.js → dist/hooks/index.ts} +1 -1
- package/dist/{cjs/hooks → hooks}/useObjectState.js +2 -3
- package/dist/{cjs/hooks → hooks}/useObjectState.test.js +9 -9
- package/dist/{cjs/hooks → hooks}/useOnClickOutside.js +1 -2
- package/dist/hooks/usePrompt.js +47 -0
- package/{src/hooks/usePrompt.js → dist/hooks/usePrompt.ts} +4 -8
- package/dist/image-upload/index.js +148 -0
- package/dist/{cjs/image-upload → image-upload}/index.test.js +13 -6
- package/dist/{esm/image-upload → image-upload}/style.scss +5 -5
- package/dist/{cjs/index.js → index.js} +1 -1
- package/dist/{cjs/info-button → info-button}/index.js +6 -7
- package/dist/{cjs/modal → modal}/index.js +4 -5
- package/dist/{esm/modal → modal}/style.scss +5 -5
- package/dist/{cjs/newspack-icon → newspack-icon}/index.js +5 -6
- package/dist/{cjs/newspack-icon → newspack-icon}/style.scss +1 -1
- package/dist/{cjs/newspack-logo → newspack-logo}/index.js +5 -6
- package/dist/{cjs/newspack-logo → newspack-logo}/style.scss +1 -1
- package/dist/{cjs/notice → notice}/index.js +12 -10
- package/dist/{cjs/notice → notice}/style.scss +11 -11
- package/dist/patrons-logo/index.js +77 -0
- package/dist/plugin-installer/index.js +297 -0
- package/dist/{cjs/plugin-installer → plugin-installer}/style.scss +1 -1
- package/dist/{cjs/plugin-settings → plugin-settings}/SettingsSection.js +13 -13
- package/dist/plugin-settings/index.js +228 -0
- package/dist/{cjs/plugin-settings → plugin-settings}/style.scss +1 -1
- package/dist/plugin-toggle/README.md +53 -0
- package/dist/plugin-toggle/index.js +222 -0
- package/dist/{esm/plugin-toggle → plugin-toggle}/style.scss +1 -1
- package/dist/{cjs/popover → popover}/index.js +4 -5
- package/dist/{cjs/popover → popover}/style.scss +7 -7
- package/dist/{cjs/position-control → position-control}/index.js +33 -32
- package/dist/{cjs/position-control → position-control}/style.scss +8 -8
- package/dist/{cjs/progress-bar → progress-bar}/index.js +9 -10
- package/dist/{cjs/progress-bar → progress-bar}/index.test.js +16 -16
- package/dist/{cjs/progress-bar → progress-bar}/style.scss +2 -2
- package/dist/proxied-imports/router.js +15 -0
- package/dist/{cjs/radio-control → radio-control}/index.js +4 -5
- package/dist/{cjs/radio-control → radio-control}/style.scss +3 -3
- package/dist/{cjs/section-header → section-header}/index.js +20 -21
- package/dist/{esm/section-header → section-header}/style.scss +5 -1
- package/dist/{cjs/select-control → select-control}/ButtonGroupControl.js +17 -19
- package/dist/{cjs/select-control → select-control}/GroupedSelectControl.js +32 -35
- package/dist/{cjs/select-control → select-control}/index.js +7 -8
- package/dist/{cjs/select-control → select-control}/style.scss +4 -4
- package/dist/settings/MinMaxSetting.js +60 -0
- package/dist/{cjs/settings → settings}/SettingsCard.js +14 -16
- package/dist/settings/SettingsSection.js +33 -0
- package/dist/{cjs/settings → settings}/index.js +3 -4
- package/dist/{cjs/settings → settings}/style.scss +15 -2
- package/dist/sortable-newsletter-list-control/index.js +135 -0
- package/dist/sortable-newsletter-list-control/style.scss +45 -0
- package/dist/{cjs/steps-list → steps-list}/index.js +5 -6
- package/dist/{esm/steps-list → steps-list}/style.scss +2 -2
- package/dist/{cjs/steps-list-item → steps-list-item}/index.js +6 -7
- package/dist/{cjs/steps-list-item → steps-list-item}/style.scss +5 -5
- package/dist/{cjs/style-card → style-card}/index.js +21 -19
- package/dist/{esm/style-card → style-card}/style.scss +4 -4
- package/dist/{esm/style.scss → style.scss} +14 -2
- package/dist/{cjs/tabbed-navigation → tabbed-navigation}/index.js +16 -19
- package/dist/{cjs/tabbed-navigation → tabbed-navigation}/style.scss +4 -4
- package/dist/text-control/index.js +76 -0
- package/dist/text-control/index.tsx +71 -0
- package/dist/utils/index.js +36 -0
- package/dist/{cjs/waiting → waiting}/index.js +4 -5
- package/dist/web-preview/index.js +191 -0
- package/dist/{cjs/web-preview → web-preview}/style.scss +5 -5
- package/dist/with-wizard/index.js +328 -0
- package/dist/{esm/with-wizard → with-wizard}/style.scss +44 -22
- package/dist/{cjs/with-wizard-screen → with-wizard-screen}/index.js +40 -43
- package/dist/{esm/with-wizard-screen → with-wizard-screen}/style.scss +7 -7
- package/dist/{cjs/wizard → wizard}/components/WizardError.js +16 -17
- package/dist/{cjs/wizard → wizard}/index.js +44 -46
- package/dist/{cjs/wizard → wizard}/store/index.js +37 -38
- package/dist/{cjs/wizard → wizard}/store/utils.js +1 -4
- package/package.json +16 -14
- package/shared/scss/_mixins.scss +2 -2
- package/src/accordion/index.js +4 -1
- package/src/accordion/style.scss +7 -3
- package/src/action-card/style.scss +9 -9
- package/src/autocomplete-tokenfield/index.js +48 -15
- package/src/autocomplete-tokenfield/style.scss +14 -8
- package/src/autocomplete-with-suggestions/index.js +59 -62
- package/src/autocomplete-with-suggestions/style.scss +9 -17
- package/src/button/index.tsx +48 -0
- package/src/button/style.scss +1 -1
- package/src/button-card/style.scss +19 -13
- package/src/card/style.scss +1 -1
- package/src/category-autocomplete/style.scss +2 -2
- package/src/color-picker/style.scss +3 -3
- package/src/consts.js +0 -2
- package/src/custom-select-control/style.scss +11 -10
- package/src/date-range-picker/style.scss +6 -6
- package/src/footer/index.js +7 -7
- package/src/footer/style.scss +1 -1
- package/src/form-token-field/style.scss +1 -1
- package/src/grid/index.tsx +34 -0
- package/src/grid/style.scss +9 -9
- package/src/handoff/index.js +7 -6
- package/src/handoff-message/index.js +3 -1
- package/src/hooks/index.ts +15 -0
- package/src/hooks/usePrompt.ts +46 -0
- package/src/image-upload/index.js +5 -5
- package/src/image-upload/index.test.js +6 -1
- package/src/image-upload/style.scss +5 -5
- package/src/modal/style.scss +5 -5
- package/src/newspack-icon/style.scss +1 -1
- package/src/newspack-logo/style.scss +1 -1
- package/src/notice/index.js +1 -1
- package/src/notice/style.scss +11 -11
- package/src/patrons-logo/index.js +4 -1
- package/src/plugin-installer/index.js +7 -7
- package/src/plugin-installer/style.scss +1 -1
- package/src/plugin-settings/index.js +1 -1
- package/src/plugin-settings/style.scss +1 -1
- package/src/plugin-toggle/index.js +13 -12
- package/src/plugin-toggle/style.scss +1 -1
- package/src/popover/style.scss +7 -7
- package/src/position-control/index.js +63 -64
- package/src/position-control/style.scss +8 -8
- package/src/progress-bar/style.scss +2 -2
- package/src/radio-control/style.scss +3 -3
- package/src/section-header/index.js +3 -3
- package/src/section-header/style.scss +5 -1
- package/src/select-control/GroupedSelectControl.js +1 -1
- package/src/select-control/style.scss +4 -4
- package/src/settings/MinMaxSetting.js +8 -6
- package/src/settings/style.scss +15 -2
- package/src/sortable-newsletter-list-control/index.js +137 -0
- package/src/sortable-newsletter-list-control/style.scss +45 -0
- package/src/steps-list/style.scss +2 -2
- package/src/steps-list-item/style.scss +5 -5
- package/src/style-card/index.js +11 -5
- package/src/style-card/style.scss +4 -4
- package/src/style.scss +14 -2
- package/src/tabbed-navigation/style.scss +4 -4
- package/src/text-control/index.tsx +65 -0
- package/src/web-preview/index.js +6 -6
- package/src/web-preview/style.scss +5 -5
- package/src/with-wizard/index.js +4 -4
- package/src/with-wizard/style.scss +44 -22
- package/src/with-wizard-screen/index.js +1 -1
- package/src/with-wizard-screen/style.scss +7 -7
- package/src/wizard/components/WizardError.js +1 -1
- package/src/wizard/index.js +3 -3
- package/src/wizard/store/index.js +9 -2
- package/dist/cjs/action-card/style.scss +0 -483
- package/dist/cjs/autocomplete-tokenfield/style.scss +0 -43
- package/dist/cjs/autocomplete-with-suggestions/style.scss +0 -171
- package/dist/cjs/button/index.js +0 -57
- package/dist/cjs/card/style.scss +0 -168
- package/dist/cjs/category-autocomplete/style.scss +0 -34
- package/dist/cjs/consts.js +0 -12
- package/dist/cjs/form-token-field/style.scss +0 -37
- package/dist/cjs/grid/index.js +0 -54
- package/dist/cjs/hooks/index.js +0 -26
- package/dist/cjs/hooks/usePrompt.js +0 -52
- package/dist/cjs/image-upload/index.js +0 -144
- package/dist/cjs/image-upload/style.scss +0 -103
- package/dist/cjs/modal/style.scss +0 -56
- package/dist/cjs/patrons-logo/index.js +0 -82
- package/dist/cjs/plugin-installer/index.js +0 -299
- package/dist/cjs/plugin-settings/index.js +0 -222
- package/dist/cjs/plugin-toggle/index.js +0 -222
- package/dist/cjs/plugin-toggle/style.scss +0 -20
- package/dist/cjs/proxied-imports/router.js +0 -15
- package/dist/cjs/section-header/style.scss +0 -41
- package/dist/cjs/settings/MinMaxSetting.js +0 -57
- package/dist/cjs/settings/SettingsSection.js +0 -37
- package/dist/cjs/steps-list/style.scss +0 -11
- package/dist/cjs/style-card/style.scss +0 -94
- package/dist/cjs/style.scss +0 -43
- package/dist/cjs/text-control/index.js +0 -71
- package/dist/cjs/utils/index.js +0 -40
- package/dist/cjs/web-preview/index.js +0 -189
- package/dist/cjs/with-wizard/index.js +0 -318
- package/dist/cjs/with-wizard/style.scss +0 -260
- package/dist/cjs/with-wizard-screen/style.scss +0 -160
- package/dist/esm/accordion/index.js +0 -38
- package/dist/esm/accordion/style.scss +0 -27
- package/dist/esm/action-card/index.js +0 -222
- package/dist/esm/autocomplete-tokenfield/index.js +0 -223
- package/dist/esm/autocomplete-with-suggestions/index.js +0 -289
- package/dist/esm/button/index.js +0 -48
- package/dist/esm/button/style.scss +0 -11
- package/dist/esm/button-card/index.js +0 -65
- package/dist/esm/button-card/style.scss +0 -174
- package/dist/esm/card/index.js +0 -43
- package/dist/esm/category-autocomplete/index.js +0 -185
- package/dist/esm/color-picker/index.js +0 -61
- package/dist/esm/color-picker/style.scss +0 -37
- package/dist/esm/consts.js +0 -3
- package/dist/esm/custom-select-control/index.js +0 -37
- package/dist/esm/custom-select-control/style.scss +0 -92
- package/dist/esm/date-range-picker/index.js +0 -32
- package/dist/esm/date-range-picker/style.scss +0 -148
- package/dist/esm/footer/index.js +0 -105
- package/dist/esm/footer/style.scss +0 -82
- package/dist/esm/form-token-field/index.js +0 -50
- package/dist/esm/global-notices/index.js +0 -30
- package/dist/esm/grid/index.js +0 -45
- package/dist/esm/grid/style.scss +0 -166
- package/dist/esm/handoff/index.js +0 -177
- package/dist/esm/handoff-message/index.js +0 -45
- package/dist/esm/hooks/index.js +0 -17
- package/dist/esm/hooks/useObjectState.js +0 -31
- package/dist/esm/hooks/useObjectState.test.js +0 -83
- package/dist/esm/hooks/useOnClickOutside.js +0 -31
- package/dist/esm/hooks/usePrompt.js +0 -43
- package/dist/esm/image-upload/index.js +0 -141
- package/dist/esm/image-upload/index.test.js +0 -28
- package/dist/esm/index.js +0 -47
- package/dist/esm/info-button/index.js +0 -42
- package/dist/esm/info-button/style.scss +0 -18
- package/dist/esm/modal/index.js +0 -39
- package/dist/esm/newspack-icon/index.js +0 -50
- package/dist/esm/newspack-icon/style.scss +0 -26
- package/dist/esm/newspack-logo/index.js +0 -46
- package/dist/esm/newspack-logo/style.scss +0 -30
- package/dist/esm/notice/index.js +0 -67
- package/dist/esm/notice/style.scss +0 -111
- package/dist/esm/patrons-logo/index.js +0 -76
- package/dist/esm/plugin-installer/index.js +0 -295
- package/dist/esm/plugin-installer/style.scss +0 -72
- package/dist/esm/plugin-settings/SettingsSection.js +0 -136
- package/dist/esm/plugin-settings/index.js +0 -217
- package/dist/esm/plugin-settings/style.scss +0 -7
- package/dist/esm/plugin-toggle/index.js +0 -217
- package/dist/esm/popover/index.js +0 -41
- package/dist/esm/popover/style.scss +0 -161
- package/dist/esm/position-control/index.js +0 -109
- package/dist/esm/position-control/style.scss +0 -66
- package/dist/esm/progress-bar/index.js +0 -69
- package/dist/esm/progress-bar/index.test.js +0 -110
- package/dist/esm/progress-bar/style.scss +0 -42
- package/dist/esm/proxied-imports/router.js +0 -8
- package/dist/esm/radio-control/index.js +0 -37
- package/dist/esm/radio-control/style.scss +0 -92
- package/dist/esm/section-header/index.js +0 -68
- package/dist/esm/select-control/ButtonGroupControl.js +0 -54
- package/dist/esm/select-control/GroupedSelectControl.js +0 -84
- package/dist/esm/select-control/index.js +0 -51
- package/dist/esm/select-control/style.scss +0 -108
- package/dist/esm/settings/MinMaxSetting.js +0 -53
- package/dist/esm/settings/SettingsCard.js +0 -39
- package/dist/esm/settings/SettingsSection.js +0 -30
- package/dist/esm/settings/index.js +0 -9
- package/dist/esm/settings/style.scss +0 -106
- package/dist/esm/steps-list/index.js +0 -43
- package/dist/esm/steps-list-item/index.js +0 -48
- package/dist/esm/steps-list-item/style.scss +0 -47
- package/dist/esm/style-card/index.js +0 -76
- package/dist/esm/tabbed-navigation/index.js +0 -56
- package/dist/esm/tabbed-navigation/style.scss +0 -86
- package/dist/esm/text-control/index.js +0 -66
- package/dist/esm/text-control/style.scss +0 -32
- package/dist/esm/utils/index.js +0 -32
- package/dist/esm/waiting/index.js +0 -44
- package/dist/esm/waiting/style.scss +0 -27
- package/dist/esm/web-preview/index.js +0 -184
- package/dist/esm/web-preview/style.scss +0 -155
- package/dist/esm/with-wizard/index.js +0 -313
- package/dist/esm/with-wizard-screen/index.js +0 -116
- package/dist/esm/wizard/components/WizardError.js +0 -69
- package/dist/esm/wizard/index.js +0 -126
- package/dist/esm/wizard/store/index.js +0 -155
- package/dist/esm/wizard/store/utils.js +0 -17
- package/src/grid/index.js +0 -44
- package/src/text-control/index.js +0 -56
- /package/dist/{cjs/info-button → info-button}/style.scss +0 -0
- /package/dist/{cjs/text-control → text-control}/style.scss +0 -0
- /package/dist/{cjs/waiting → waiting}/style.scss +0 -0
package/src/modal/style.scss
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Modal
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
5
|
+
@use "../../../shared/scss/colors";
|
|
6
6
|
|
|
7
7
|
.newspack-modal {
|
|
8
8
|
// Color
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@media screen and ( min-width: 960px ) {
|
|
32
|
-
max-height: calc(
|
|
32
|
+
max-height: calc(100% - 128px);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// Links
|
|
36
36
|
a {
|
|
37
|
-
color: var(
|
|
37
|
+
color: var(--wp-admin-theme-color);
|
|
38
38
|
|
|
39
39
|
&:active,
|
|
40
40
|
&:focus,
|
|
41
41
|
&:hover {
|
|
42
|
-
color: var(
|
|
42
|
+
color: var(--wp-admin-theme-color-darker-10);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&:focus {
|
|
46
|
-
box-shadow: 0 0 0 var(
|
|
46
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
47
47
|
outline: 3px solid transparent;
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/notice/index.js
CHANGED
|
@@ -62,7 +62,7 @@ class Notice extends Component {
|
|
|
62
62
|
{ <Icon icon={ noticeIcon } /> }
|
|
63
63
|
<div className="newspack-notice__content">
|
|
64
64
|
{ rawHTML ? <RawHTML>{ noticeText }</RawHTML> : noticeText }
|
|
65
|
-
{ debugMode && __( 'Debug Mode', 'newspack' ) }
|
|
65
|
+
{ debugMode && __( 'Debug Mode', 'newspack-plugin' ) }
|
|
66
66
|
{ children || null }
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
package/src/notice/style.scss
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Notice
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
7
|
-
@use
|
|
5
|
+
@use "sass:color";
|
|
6
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
7
|
+
@use "../../../shared/scss/colors";
|
|
8
8
|
|
|
9
9
|
.newspack-notice {
|
|
10
10
|
align-items: center;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
background: colors.$primary-700;
|
|
27
27
|
border-radius: 2px;
|
|
28
28
|
bottom: 16px;
|
|
29
|
-
box-shadow: 0 0 8px 4px rgba(
|
|
29
|
+
box-shadow: 0 0 8px 4px rgba(black, 0.08);
|
|
30
30
|
color: white;
|
|
31
31
|
font-weight: bold;
|
|
32
32
|
margin: 0 16px;
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&__is-error {
|
|
43
|
-
background: color.adjust(
|
|
43
|
+
background: color.adjust(wp-colors.$alert-red, $lightness: 51%);
|
|
44
44
|
|
|
45
45
|
> svg {
|
|
46
46
|
fill: wp-colors.$alert-red;
|
|
47
|
-
transform: rotate(
|
|
47
|
+
transform: rotate(180deg);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&__is-handoff {
|
|
52
|
-
background: color.adjust(
|
|
52
|
+
background: color.adjust(wp-colors.$alert-yellow, $lightness: 30%);
|
|
53
53
|
margin-top: 0;
|
|
54
54
|
position: sticky;
|
|
55
55
|
top: 46px;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&__is-success {
|
|
72
|
-
background: color.adjust(
|
|
72
|
+
background: color.adjust(wp-colors.$alert-green, $lightness: 42%);
|
|
73
73
|
|
|
74
74
|
> svg {
|
|
75
75
|
fill: wp-colors.$alert-green;
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
&__is-warning {
|
|
80
|
-
background: color.adjust(
|
|
80
|
+
background: color.adjust(wp-colors.$alert-yellow, $lightness: 30%);
|
|
81
81
|
|
|
82
82
|
> svg {
|
|
83
83
|
fill: wp-colors.$alert-yellow;
|
|
84
|
-
transform: rotate(
|
|
84
|
+
transform: rotate(180deg);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
&:focus {
|
|
103
|
-
box-shadow: 0 0 0 var(
|
|
103
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) currentcolor;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -21,7 +21,10 @@ class PatronsLogo extends Component {
|
|
|
21
21
|
height="16"
|
|
22
22
|
viewBox="0 0 438 32"
|
|
23
23
|
className="patrons-logo"
|
|
24
|
-
aria-label={ __(
|
|
24
|
+
aria-label={ __(
|
|
25
|
+
'A project of WordPress.com and the Google News Initiative',
|
|
26
|
+
'newspack-plugin'
|
|
27
|
+
) }
|
|
25
28
|
>
|
|
26
29
|
<Path
|
|
27
30
|
fillRule="evenodd"
|
|
@@ -170,8 +170,8 @@ class PluginInstaller extends Component {
|
|
|
170
170
|
currentStatus === 'active' || currentStatus === 'inactive';
|
|
171
171
|
|
|
172
172
|
const buttonText = currentPluginStatuses.every( pluginInstalled )
|
|
173
|
-
? __( 'Activate', 'newspack' )
|
|
174
|
-
: __( 'Install', 'newspack' );
|
|
173
|
+
? __( 'Activate', 'newspack-plugin' )
|
|
174
|
+
: __( 'Install', 'newspack-plugin' );
|
|
175
175
|
|
|
176
176
|
const needsInstall = slugs.some( slug => {
|
|
177
177
|
const plugin = pluginInfo[ slug ];
|
|
@@ -183,7 +183,7 @@ class PluginInstaller extends Component {
|
|
|
183
183
|
{ ( ! pluginInfo || ! Object.keys( pluginInfo ).length ) && (
|
|
184
184
|
<div className="newspack-plugin-installer_is-waiting">
|
|
185
185
|
<Waiting isLeft />
|
|
186
|
-
{ __( 'Retrieving plugin information…' ) }
|
|
186
|
+
{ __( 'Retrieving plugin information…', 'newspack-plugin' ) }
|
|
187
187
|
</div>
|
|
188
188
|
) }
|
|
189
189
|
{ pluginInfo &&
|
|
@@ -202,8 +202,8 @@ class PluginInstaller extends Component {
|
|
|
202
202
|
actionText = (
|
|
203
203
|
<span className="newspack-plugin-installer__status">
|
|
204
204
|
{ isAtomic
|
|
205
|
-
? __( 'Contact Newspack support to install', 'newspack' )
|
|
206
|
-
: __( 'Plugin must be installed manually', 'newspack' ) }
|
|
205
|
+
? __( 'Contact Newspack support to install', 'newspack-plugin' )
|
|
206
|
+
: __( 'Plugin must be installed manually', 'newspack-plugin' ) }
|
|
207
207
|
<span className="newspack-checkbox-icon" />
|
|
208
208
|
</span>
|
|
209
209
|
);
|
|
@@ -217,14 +217,14 @@ class PluginInstaller extends Component {
|
|
|
217
217
|
} else if ( Status === 'inactive' ) {
|
|
218
218
|
actionText = (
|
|
219
219
|
<span className="newspack-plugin-installer__status">
|
|
220
|
-
{ __( 'Activate', 'newspack' ) }
|
|
220
|
+
{ __( 'Activate', 'newspack-plugin' ) }
|
|
221
221
|
<span className="newspack-checkbox-icon" />
|
|
222
222
|
</span>
|
|
223
223
|
);
|
|
224
224
|
} else if ( Status === 'active' ) {
|
|
225
225
|
actionText = (
|
|
226
226
|
<span className="newspack-plugin-installer__status">
|
|
227
|
-
{ __( 'Installed', 'newspack' ) }
|
|
227
|
+
{ __( 'Installed', 'newspack-plugin' ) }
|
|
228
228
|
<span className="newspack-checkbox-icon newspack-checkbox-icon--checked">
|
|
229
229
|
<Icon icon={ check } />
|
|
230
230
|
</span>
|
|
@@ -67,7 +67,9 @@ class PluginToggle extends Component {
|
|
|
67
67
|
...pluginInfo,
|
|
68
68
|
[ plugin ]: {
|
|
69
69
|
...pluginInfo[ plugin ],
|
|
70
|
-
error:
|
|
70
|
+
error:
|
|
71
|
+
e.message ||
|
|
72
|
+
__( 'There was an error managing this plugin.', 'newspack-plugin' ),
|
|
71
73
|
},
|
|
72
74
|
},
|
|
73
75
|
} );
|
|
@@ -115,14 +117,13 @@ class PluginToggle extends Component {
|
|
|
115
117
|
.map( pluginSlug =>
|
|
116
118
|
pluginsFromAPI[ pluginSlug ]
|
|
117
119
|
? Object.keys( pluginsFromAPI[ pluginSlug ] ).reduce(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
( accumulator, key ) => ( {
|
|
121
|
+
...accumulator,
|
|
122
|
+
[ key.charAt( 0 ).toLowerCase() + key.slice( 1 ) ]:
|
|
121
123
|
pluginsFromAPI[ pluginSlug ][ key ],
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
: {}
|
|
124
|
+
} ),
|
|
125
|
+
{}
|
|
126
|
+
) : {}
|
|
126
127
|
)
|
|
127
128
|
.map( plugin => Object.assign( plugin, pluginsFromProps[ plugin.slug ] ) );
|
|
128
129
|
|
|
@@ -148,21 +149,21 @@ class PluginToggle extends Component {
|
|
|
148
149
|
if ( 'configure' === inFlight ) {
|
|
149
150
|
return (
|
|
150
151
|
<Fragment>
|
|
151
|
-
{ __( 'Installing…', 'newspack' ) } <Waiting isRight />
|
|
152
|
+
{ __( 'Installing…', 'newspack-plugin' ) } <Waiting isRight />
|
|
152
153
|
</Fragment>
|
|
153
154
|
);
|
|
154
155
|
}
|
|
155
156
|
if ( 'deactivate' === inFlight ) {
|
|
156
157
|
return (
|
|
157
158
|
<Fragment>
|
|
158
|
-
{ __( 'Deactivating…', 'newspack' ) } <Waiting isRight />
|
|
159
|
+
{ __( 'Deactivating…', 'newspack-plugin' ) } <Waiting isRight />
|
|
159
160
|
</Fragment>
|
|
160
161
|
);
|
|
161
162
|
}
|
|
162
163
|
if ( ! name ) {
|
|
163
164
|
return (
|
|
164
165
|
<Fragment>
|
|
165
|
-
{ __( 'Loading…', 'newspack' ) } <Waiting isRight />
|
|
166
|
+
{ __( 'Loading…', 'newspack-plugin' ) } <Waiting isRight />
|
|
166
167
|
</Fragment>
|
|
167
168
|
);
|
|
168
169
|
}
|
|
@@ -171,7 +172,7 @@ class PluginToggle extends Component {
|
|
|
171
172
|
return null;
|
|
172
173
|
}
|
|
173
174
|
if ( href || editPath ) {
|
|
174
|
-
return actionText ? actionText : __( 'Configure', 'newspack' );
|
|
175
|
+
return actionText ? actionText : __( 'Configure', 'newspack-plugin' );
|
|
175
176
|
}
|
|
176
177
|
};
|
|
177
178
|
|
package/src/popover/style.scss
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Popover
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
5
|
+
@use "../../../shared/scss/colors";
|
|
6
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
7
7
|
|
|
8
8
|
.newspack-popover {
|
|
9
9
|
.components-popover__content {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&:focus:not(
|
|
26
|
+
&:focus:not(:disabled) {
|
|
27
27
|
box-shadow: inset 0 0 0 2px colors.$primary-500;
|
|
28
28
|
position: relative;
|
|
29
29
|
z-index: 1;
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
padding: 6px 8px;
|
|
35
35
|
text-decoration: none;
|
|
36
36
|
|
|
37
|
-
&:not(
|
|
37
|
+
&:not(.is-destructive) {
|
|
38
38
|
color: wp-colors.$gray-700;
|
|
39
39
|
|
|
40
40
|
&:active,
|
|
41
41
|
&:active:enabled,
|
|
42
42
|
&:focus,
|
|
43
43
|
&:focus:enabled &:hover,
|
|
44
|
-
&:not(
|
|
44
|
+
&:not(:disabled, [aria-disabled="true"], .is-default):hover {
|
|
45
45
|
color: colors.$primary-500;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
&.is-destructive:not(
|
|
55
|
+
&.is-destructive:not(:focus) {
|
|
56
56
|
box-shadow: none !important;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
&:not(
|
|
134
|
+
&:not(.is-without-arrow)::before {
|
|
135
135
|
border-color: wp-colors.$gray-300;
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -29,73 +29,72 @@ export default function PositionControl( {
|
|
|
29
29
|
const options =
|
|
30
30
|
size === 'full-width'
|
|
31
31
|
? [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
];
|
|
32
|
+
{
|
|
33
|
+
value: 'top',
|
|
34
|
+
/* translators: Overlay Position */
|
|
35
|
+
label: __( 'Top', 'newspack-plugin' ),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: 'center',
|
|
39
|
+
/* translators: Overlay Position */
|
|
40
|
+
label: __( 'Center', 'newspack-plugin' ),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: 'bottom',
|
|
44
|
+
/* translators: Overlay Position */
|
|
45
|
+
label: __( 'Bottom', 'newspack-plugin' ),
|
|
46
|
+
},
|
|
47
|
+
] : [
|
|
48
|
+
{
|
|
49
|
+
value: 'top_left',
|
|
50
|
+
/* translators: Overlay Position */
|
|
51
|
+
label: __( 'Top Left', 'newspack-plugin' ),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
value: 'top',
|
|
55
|
+
/* translators: Overlay Position */
|
|
56
|
+
label: __( 'Top Center', 'newspack-plugin' ),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: 'top_right',
|
|
60
|
+
/* translators: Overlay Position */
|
|
61
|
+
label: __( 'Top Right', 'newspack-plugin' ),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: 'center_left',
|
|
65
|
+
/* translators: Overlay Position */
|
|
66
|
+
label: __( 'Center Left', 'newspack-plugin' ),
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: 'center',
|
|
70
|
+
/* translators: Overlay Position */
|
|
71
|
+
label: __( 'Center', 'newspack-plugin' ),
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: 'center_right',
|
|
75
|
+
/* translators: Overlay Position */
|
|
76
|
+
label: __( 'Center Right', 'newspack-plugin' ),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: 'bottom_left',
|
|
80
|
+
/* translators: Overlay Position */
|
|
81
|
+
label: __( 'Bottom Left', 'newspack-plugin' ),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
value: 'bottom',
|
|
85
|
+
/* translators: Overlay Position */
|
|
86
|
+
label: __( 'Bottom Center', 'newspack-plugin' ),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: 'bottom_right',
|
|
90
|
+
/* translators: Overlay Position */
|
|
91
|
+
label: __( 'Bottom Right', 'newspack-plugin' ),
|
|
92
|
+
},
|
|
93
|
+
];
|
|
95
94
|
return (
|
|
96
95
|
<div className={ classnames( 'newspack-position-placement-control', 'size-' + size ) }>
|
|
97
96
|
<p className="components-base-control__label">{ label }</p>
|
|
98
|
-
<ButtonGroup aria-label={ __( 'Select Position', 'newspack' ) } { ...props }>
|
|
97
|
+
<ButtonGroup aria-label={ __( 'Select Position', 'newspack-plugin' ) } { ...props }>
|
|
99
98
|
{ options.map( ( option, index ) => {
|
|
100
99
|
return (
|
|
101
100
|
<div
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
2
2
|
|
|
3
3
|
.newspack-position-placement-control {
|
|
4
4
|
margin-bottom: 1em;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
.components-button-group {
|
|
12
12
|
display: grid;
|
|
13
|
-
grid-template-columns: repeat(
|
|
14
|
-
grid-template-rows: repeat(
|
|
13
|
+
grid-template-columns: repeat(3, 1fr);
|
|
14
|
+
grid-template-rows: repeat(3, 1fr);
|
|
15
15
|
|
|
16
16
|
div {
|
|
17
17
|
padding: 1px;
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
width: 100%;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
div:nth-of-type(
|
|
27
|
+
div:nth-of-type(1) .components-button {
|
|
28
28
|
border-radius: 4px 0 0 !important;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
div:nth-of-type(
|
|
31
|
+
div:nth-of-type(3) .components-button {
|
|
32
32
|
border-radius: 0 4px 0 0 !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
div:nth-last-of-type(
|
|
35
|
+
div:nth-last-of-type(1) .components-button {
|
|
36
36
|
border-radius: 0 0 4px !important;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
div:nth-last-of-type(
|
|
39
|
+
div:nth-last-of-type(3) .components-button {
|
|
40
40
|
border-radius: 0 0 0 4px !important;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
border-radius: 4px 4px 0 0 !important;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
div:nth-of-type(
|
|
51
|
+
div:nth-of-type(2) .components-button {
|
|
52
52
|
border-radius: 0 !important;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Radio Control
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
5
|
+
@use "../../../shared/scss/colors";
|
|
6
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
7
7
|
|
|
8
8
|
.newspack-radio-control {
|
|
9
9
|
color: wp-colors.$gray-700;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
// Radio
|
|
43
43
|
|
|
44
|
-
input[type=
|
|
44
|
+
input[type="radio"] {
|
|
45
45
|
height: 24px;
|
|
46
46
|
margin-right: 8px;
|
|
47
47
|
width: 24px;
|
|
@@ -21,7 +21,7 @@ import classnames from 'classnames';
|
|
|
21
21
|
const SectionHeader = ( {
|
|
22
22
|
centered = false,
|
|
23
23
|
className = null,
|
|
24
|
-
description,
|
|
24
|
+
description = '',
|
|
25
25
|
heading = 2,
|
|
26
26
|
isWhite = false,
|
|
27
27
|
noMargin = false,
|
|
@@ -52,11 +52,11 @@ const SectionHeader = ( {
|
|
|
52
52
|
const HeadingTag = `h${ heading }`;
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
|
-
<div id={ id } ref={ ref }>
|
|
55
|
+
<div id={ id } className="newspack-section-header__container" ref={ ref }>
|
|
56
56
|
<Grid columns={ 1 } gutter={ 8 } className={ classes }>
|
|
57
57
|
{ typeof title === 'string' && <HeadingTag>{ title }</HeadingTag> }
|
|
58
58
|
{ typeof title === 'function' && <HeadingTag>{ title() }</HeadingTag> }
|
|
59
|
-
{ typeof description === 'string' && <p>{ description }</p> }
|
|
59
|
+
{ description && typeof description === 'string' && <p>{ description }</p> }
|
|
60
60
|
{ typeof description === 'function' && <p>{ description() }</p> }
|
|
61
61
|
</Grid>
|
|
62
62
|
</div>
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
* Section Header
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
5
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
6
6
|
|
|
7
7
|
.newspack-section-header {
|
|
8
8
|
margin: 64px 0 32px;
|
|
9
9
|
|
|
10
|
+
&__container:not(:first-child) {
|
|
11
|
+
margin-top: 48px;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
&--no-margin,
|
|
11
15
|
h1,
|
|
12
16
|
h2,
|
|
@@ -52,7 +52,7 @@ export default function GroupedSelectControl( {
|
|
|
52
52
|
aria-describedby={ !! help ? `${ id }__help` : undefined }
|
|
53
53
|
{ ...props }
|
|
54
54
|
>
|
|
55
|
-
<option value="">{ __( '-- Select --', 'newspack' ) }</option>
|
|
55
|
+
<option value="">{ __( '-- Select --', 'newspack-plugin' ) }</option>
|
|
56
56
|
{ optgroups.map( ( { label: optgroupLabel, options }, optgroupIndex ) => (
|
|
57
57
|
<optgroup label={ optgroupLabel } key={ optgroupIndex }>
|
|
58
58
|
{ options.map( ( option, optionIndex ) => (
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Select Control
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@use
|
|
5
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
6
6
|
|
|
7
7
|
.components-select-control {
|
|
8
8
|
&__input {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
padding: 8px;
|
|
23
23
|
|
|
24
24
|
&:checked {
|
|
25
|
-
background: var(
|
|
25
|
+
background: var(--wp-admin-theme-color);
|
|
26
26
|
color: white;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&:focus {
|
|
67
|
-
border-color: var(
|
|
68
|
-
box-shadow: inset 0 0 0 1px var(
|
|
67
|
+
border-color: var(--wp-admin-theme-color-darker-10) !important;
|
|
68
|
+
box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color-darker-10) !important;
|
|
69
69
|
color: inherit;
|
|
70
70
|
}
|
|
71
71
|
}
|