newspack-components 2.0.3 → 2.1.0

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.
Files changed (248) hide show
  1. package/copy-styles.js +1 -1
  2. package/dist/cjs/action-card/index.js +29 -20
  3. package/dist/cjs/action-card/style.scss +52 -27
  4. package/dist/cjs/autocomplete-tokenfield/style.scss +4 -4
  5. package/dist/cjs/autocomplete-with-suggestions/index.js +3 -2
  6. package/dist/cjs/autocomplete-with-suggestions/style.scss +19 -20
  7. package/dist/cjs/button/index.js +2 -13
  8. package/dist/cjs/button/style.scss +3 -344
  9. package/dist/cjs/button-card/index.js +11 -6
  10. package/dist/cjs/button-card/style.scss +60 -30
  11. package/dist/cjs/card/index.js +3 -1
  12. package/dist/cjs/card/style.scss +29 -62
  13. package/dist/cjs/category-autocomplete/index.js +52 -13
  14. package/dist/cjs/category-autocomplete/style.scss +20 -22
  15. package/dist/cjs/color-picker/index.js +17 -35
  16. package/dist/cjs/color-picker/style.scss +20 -160
  17. package/dist/cjs/custom-select-control/style.scss +12 -42
  18. package/dist/cjs/footer/index.js +21 -7
  19. package/dist/cjs/footer/style.scss +9 -10
  20. package/dist/cjs/form-token-field/index.js +2 -2
  21. package/dist/cjs/form-token-field/style.scss +8 -103
  22. package/dist/cjs/global-notices/index.js +2 -1
  23. package/dist/cjs/grid/style.scss +14 -1
  24. package/dist/cjs/handoff/index.js +7 -7
  25. package/dist/cjs/image-upload/index.js +1 -1
  26. package/dist/cjs/image-upload/style.scss +10 -11
  27. package/dist/cjs/index.js +7 -53
  28. package/dist/cjs/modal/index.js +0 -3
  29. package/dist/cjs/modal/style.scss +19 -131
  30. package/dist/cjs/newspack-icon/index.js +4 -2
  31. package/dist/cjs/newspack-icon/style.scss +15 -0
  32. package/dist/cjs/notice/index.js +8 -9
  33. package/dist/cjs/notice/style.scss +38 -10
  34. package/dist/cjs/plugin-installer/index.js +1 -1
  35. package/dist/cjs/plugin-settings/SettingsSection.js +74 -43
  36. package/dist/cjs/plugin-settings/index.js +34 -30
  37. package/dist/cjs/plugin-settings/style.scss +7 -0
  38. package/dist/cjs/plugin-toggle/index.js +22 -1
  39. package/dist/cjs/popover/style.scss +2 -2
  40. package/dist/cjs/radio-control/style.scss +1 -2
  41. package/dist/cjs/section-header/index.js +18 -5
  42. package/dist/cjs/section-header/style.scss +22 -1
  43. package/dist/cjs/select-control/ButtonGroupControl.js +8 -8
  44. package/dist/cjs/select-control/GroupedSelectControl.js +33 -30
  45. package/dist/cjs/select-control/index.js +1 -2
  46. package/dist/cjs/select-control/style.scss +46 -87
  47. package/dist/cjs/settings/MinMaxSetting.js +4 -2
  48. package/dist/cjs/settings/SettingsCard.js +6 -1
  49. package/dist/cjs/settings/SettingsSection.js +4 -4
  50. package/dist/cjs/settings/style.scss +32 -4
  51. package/dist/cjs/style-card/index.js +10 -6
  52. package/dist/cjs/style-card/style.scss +12 -8
  53. package/dist/cjs/style.scss +44 -0
  54. package/dist/cjs/tabbed-navigation/index.js +13 -20
  55. package/dist/cjs/tabbed-navigation/style.scss +56 -34
  56. package/dist/cjs/text-control/index.js +0 -3
  57. package/dist/cjs/text-control/style.scss +0 -126
  58. package/dist/cjs/waiting/index.js +9 -25
  59. package/dist/cjs/waiting/style.scss +9 -20
  60. package/dist/cjs/web-preview/index.js +18 -30
  61. package/dist/cjs/web-preview/style.scss +33 -26
  62. package/dist/cjs/with-wizard/index.js +4 -2
  63. package/dist/cjs/with-wizard/style.scss +44 -89
  64. package/dist/cjs/with-wizard-screen/index.js +17 -21
  65. package/dist/cjs/with-wizard-screen/style.scss +74 -121
  66. package/dist/cjs/wizard/components/WizardError.js +86 -0
  67. package/dist/cjs/wizard/index.js +145 -0
  68. package/dist/cjs/wizard/store/index.js +178 -0
  69. package/dist/cjs/wizard/store/utils.js +31 -0
  70. package/dist/esm/action-card/index.js +30 -21
  71. package/dist/esm/action-card/style.scss +52 -27
  72. package/dist/esm/autocomplete-tokenfield/style.scss +4 -4
  73. package/dist/esm/autocomplete-with-suggestions/index.js +3 -2
  74. package/dist/esm/autocomplete-with-suggestions/style.scss +19 -20
  75. package/dist/esm/button/index.js +2 -12
  76. package/dist/esm/button/style.scss +3 -344
  77. package/dist/esm/button-card/index.js +10 -6
  78. package/dist/esm/button-card/style.scss +60 -30
  79. package/dist/esm/card/index.js +3 -1
  80. package/dist/esm/card/style.scss +29 -62
  81. package/dist/esm/category-autocomplete/index.js +54 -14
  82. package/dist/esm/category-autocomplete/style.scss +20 -22
  83. package/dist/esm/color-picker/index.js +15 -34
  84. package/dist/esm/color-picker/style.scss +20 -160
  85. package/dist/esm/custom-select-control/style.scss +12 -42
  86. package/dist/esm/footer/index.js +21 -7
  87. package/dist/esm/footer/style.scss +9 -10
  88. package/dist/esm/form-token-field/index.js +2 -2
  89. package/dist/esm/form-token-field/style.scss +8 -103
  90. package/dist/esm/global-notices/index.js +2 -1
  91. package/dist/esm/grid/style.scss +14 -1
  92. package/dist/esm/handoff/index.js +7 -7
  93. package/dist/esm/image-upload/index.js +1 -1
  94. package/dist/esm/image-upload/style.scss +10 -11
  95. package/dist/esm/index.js +3 -8
  96. package/dist/esm/modal/index.js +0 -3
  97. package/dist/esm/modal/style.scss +19 -131
  98. package/dist/esm/newspack-icon/index.js +4 -2
  99. package/dist/esm/newspack-icon/style.scss +15 -0
  100. package/dist/esm/notice/index.js +8 -3
  101. package/dist/esm/notice/style.scss +38 -10
  102. package/dist/esm/plugin-installer/index.js +2 -1
  103. package/dist/esm/plugin-settings/SettingsSection.js +72 -44
  104. package/dist/esm/plugin-settings/index.js +34 -30
  105. package/dist/esm/plugin-settings/style.scss +7 -0
  106. package/dist/esm/plugin-toggle/index.js +23 -1
  107. package/dist/esm/popover/style.scss +2 -2
  108. package/dist/esm/radio-control/style.scss +1 -2
  109. package/dist/esm/section-header/index.js +17 -5
  110. package/dist/esm/section-header/style.scss +22 -1
  111. package/dist/esm/select-control/ButtonGroupControl.js +8 -8
  112. package/dist/esm/select-control/GroupedSelectControl.js +33 -30
  113. package/dist/esm/select-control/index.js +1 -2
  114. package/dist/esm/select-control/style.scss +46 -87
  115. package/dist/esm/settings/MinMaxSetting.js +3 -2
  116. package/dist/esm/settings/SettingsCard.js +6 -1
  117. package/dist/esm/settings/SettingsSection.js +5 -5
  118. package/dist/esm/settings/style.scss +32 -4
  119. package/dist/esm/style-card/index.js +11 -8
  120. package/dist/esm/style-card/style.scss +12 -8
  121. package/dist/esm/style.scss +44 -0
  122. package/dist/esm/tabbed-navigation/index.js +14 -22
  123. package/dist/esm/tabbed-navigation/style.scss +56 -34
  124. package/dist/esm/text-control/index.js +0 -3
  125. package/dist/esm/text-control/style.scss +0 -126
  126. package/dist/esm/waiting/index.js +9 -22
  127. package/dist/esm/waiting/style.scss +9 -20
  128. package/dist/esm/web-preview/index.js +12 -25
  129. package/dist/esm/web-preview/style.scss +33 -26
  130. package/dist/esm/with-wizard/index.js +4 -2
  131. package/dist/esm/with-wizard/style.scss +44 -89
  132. package/dist/esm/with-wizard-screen/index.js +18 -22
  133. package/dist/esm/with-wizard-screen/style.scss +74 -121
  134. package/dist/esm/wizard/components/WizardError.js +78 -0
  135. package/dist/esm/wizard/index.js +128 -0
  136. package/dist/esm/wizard/store/index.js +161 -0
  137. package/dist/esm/wizard/store/utils.js +17 -0
  138. package/package.json +1 -1
  139. package/shared/scss/_colors.scss +15 -0
  140. package/src/action-card/index.js +28 -18
  141. package/src/action-card/style.scss +52 -27
  142. package/src/autocomplete-tokenfield/style.scss +4 -4
  143. package/src/autocomplete-with-suggestions/index.js +4 -2
  144. package/src/autocomplete-with-suggestions/style.scss +19 -20
  145. package/src/button/index.js +2 -9
  146. package/src/button/style.scss +3 -344
  147. package/src/button-card/index.js +19 -5
  148. package/src/button-card/style.scss +60 -30
  149. package/src/card/index.js +4 -0
  150. package/src/card/style.scss +29 -62
  151. package/src/category-autocomplete/index.js +51 -18
  152. package/src/category-autocomplete/style.scss +20 -22
  153. package/src/color-picker/index.js +16 -22
  154. package/src/color-picker/style.scss +20 -160
  155. package/src/custom-select-control/style.scss +12 -42
  156. package/src/footer/index.js +19 -8
  157. package/src/footer/style.scss +9 -10
  158. package/src/form-token-field/index.js +1 -1
  159. package/src/form-token-field/style.scss +8 -103
  160. package/src/global-notices/index.js +1 -1
  161. package/src/grid/style.scss +14 -1
  162. package/src/handoff/index.js +7 -7
  163. package/src/image-upload/style.scss +10 -11
  164. package/src/index.js +3 -7
  165. package/src/modal/index.js +2 -5
  166. package/src/modal/style.scss +19 -131
  167. package/src/newspack-icon/index.js +7 -2
  168. package/src/newspack-icon/style.scss +15 -0
  169. package/src/notice/index.js +7 -1
  170. package/src/notice/style.scss +38 -10
  171. package/src/plugin-installer/index.js +2 -2
  172. package/src/plugin-settings/SettingsSection.js +64 -26
  173. package/src/plugin-settings/index.js +23 -7
  174. package/src/plugin-settings/style.scss +7 -0
  175. package/src/plugin-toggle/index.js +35 -9
  176. package/src/popover/style.scss +2 -2
  177. package/src/radio-control/style.scss +1 -2
  178. package/src/section-header/index.js +25 -6
  179. package/src/section-header/style.scss +22 -1
  180. package/src/select-control/ButtonGroupControl.js +13 -6
  181. package/src/select-control/GroupedSelectControl.js +26 -24
  182. package/src/select-control/index.js +1 -2
  183. package/src/select-control/style.scss +46 -87
  184. package/src/settings/MinMaxSetting.js +2 -1
  185. package/src/settings/SettingsCard.js +9 -7
  186. package/src/settings/SettingsSection.js +4 -4
  187. package/src/settings/style.scss +32 -4
  188. package/src/style-card/index.js +14 -16
  189. package/src/style-card/style.scss +12 -8
  190. package/src/style.scss +44 -0
  191. package/src/tabbed-navigation/index.js +12 -24
  192. package/src/tabbed-navigation/style.scss +56 -34
  193. package/src/text-control/index.js +1 -2
  194. package/src/text-control/style.scss +0 -126
  195. package/src/waiting/index.js +7 -18
  196. package/src/waiting/style.scss +9 -20
  197. package/src/web-preview/index.js +12 -33
  198. package/src/web-preview/style.scss +33 -26
  199. package/src/with-wizard/index.js +7 -5
  200. package/src/with-wizard/style.scss +44 -89
  201. package/src/with-wizard-screen/index.js +14 -17
  202. package/src/with-wizard-screen/style.scss +74 -121
  203. package/src/wizard/components/WizardError.js +57 -0
  204. package/src/wizard/index.js +133 -0
  205. package/src/wizard/store/index.js +126 -0
  206. package/src/wizard/store/utils.js +16 -0
  207. package/dist/cjs/button-group/index.js +0 -57
  208. package/dist/cjs/button-group/style.scss +0 -73
  209. package/dist/cjs/checkbox-control/index.js +0 -63
  210. package/dist/cjs/checkbox-control/style.scss +0 -78
  211. package/dist/cjs/preview-box/index.js +0 -36
  212. package/dist/cjs/preview-box/style.scss +0 -18
  213. package/dist/cjs/textarea-control/index.js +0 -54
  214. package/dist/cjs/textarea-control/style.scss +0 -76
  215. package/dist/cjs/toggle-control/index.js +0 -58
  216. package/dist/cjs/toggle-control/style.scss +0 -74
  217. package/dist/cjs/toggle-group/index.js +0 -71
  218. package/dist/cjs/toggle-group/style.scss +0 -28
  219. package/dist/cjs/wizard-pagination/index.js +0 -71
  220. package/dist/cjs/wizard-pagination/style.scss +0 -74
  221. package/dist/esm/button-group/index.js +0 -43
  222. package/dist/esm/button-group/style.scss +0 -73
  223. package/dist/esm/checkbox-control/index.js +0 -49
  224. package/dist/esm/checkbox-control/style.scss +0 -78
  225. package/dist/esm/preview-box/index.js +0 -30
  226. package/dist/esm/preview-box/style.scss +0 -18
  227. package/dist/esm/textarea-control/index.js +0 -40
  228. package/dist/esm/textarea-control/style.scss +0 -76
  229. package/dist/esm/toggle-control/index.js +0 -44
  230. package/dist/esm/toggle-control/style.scss +0 -74
  231. package/dist/esm/toggle-group/index.js +0 -58
  232. package/dist/esm/toggle-group/style.scss +0 -28
  233. package/dist/esm/wizard-pagination/index.js +0 -57
  234. package/dist/esm/wizard-pagination/style.scss +0 -74
  235. package/src/button-group/index.js +0 -35
  236. package/src/button-group/style.scss +0 -73
  237. package/src/checkbox-control/index.js +0 -38
  238. package/src/checkbox-control/style.scss +0 -78
  239. package/src/preview-box/index.js +0 -18
  240. package/src/preview-box/style.scss +0 -18
  241. package/src/textarea-control/index.js +0 -32
  242. package/src/textarea-control/style.scss +0 -76
  243. package/src/toggle-control/index.js +0 -38
  244. package/src/toggle-control/style.scss +0 -74
  245. package/src/toggle-group/index.js +0 -43
  246. package/src/toggle-group/style.scss +0 -28
  247. package/src/wizard-pagination/index.js +0 -59
  248. package/src/wizard-pagination/style.scss +0 -74
@@ -7,174 +7,34 @@
7
7
 
8
8
  .newspack-color-picker {
9
9
  position: relative;
10
- margin: 32px 0;
11
10
 
12
- &__main {
13
- height: 48px;
14
- }
15
- &__expander {
16
- padding: 11px 3px;
17
- justify-content: space-between;
18
- &,
19
- > div {
20
- display: flex;
21
- align-items: center;
22
- }
23
- > div {
24
- margin: 0 4px;
25
- }
26
- div + div {
27
- margin-left: 8px;
28
- }
29
- &:focus {
30
- border-color: $primary-500;
31
- box-shadow: inset 0 0 0 2px $primary-500;
32
- }
33
- &--expanded:focus {
34
- border-bottom-color: white;
35
- box-shadow: inset 2px 2px 0 0 $primary-500, inset -2px 2px 0 0 $primary-500;
36
-
37
- + .components-color-picker {
38
- position: relative;
39
- border-bottom-color: $primary-500;
40
- border-left-color: $primary-500;
41
- border-right-color: $primary-500;
42
- box-shadow: inset 2px -2px 0 0 $primary-500, inset -2px -2px 0 0 $primary-500;
43
-
44
- &::before,
45
- &::after {
46
- background: $primary-500;
47
- display: block;
48
- content: '';
49
- height: 1px;
50
- left: -1px;
51
- position: absolute;
52
- top: -1px;
53
- width: 3px;
54
- }
55
-
56
- &::after {
57
- left: auto;
58
- right: -1px;
59
- }
60
- }
61
- }
62
- }
63
- &__indicator {
64
- border: 1px solid rgba( black, 0.125 );
65
- border-radius: 50%;
66
- height: 24px;
67
- overflow: hidden;
68
- width: 24px;
69
- }
70
11
  &__label {
71
- align-items: center;
72
- color: $gray-900;
73
- display: flex;
74
- font-weight: bold;
75
- }
76
-
77
- &__expander,
78
- .components-color-picker {
79
- background-color: white;
80
- border: 1px solid $gray-300;
81
- border-radius: 3px;
82
- &--expanded {
83
- border-bottom-color: white;
84
- border-bottom-left-radius: 0;
85
- border-bottom-right-radius: 0;
86
- }
87
- }
88
- .components-color-picker {
89
- padding: 8px;
90
- position: relative;
91
- z-index: 1;
92
- padding-top: 0;
93
- border-top: none;
94
- border-top-left-radius: 0;
95
- border-top-right-radius: 0;
12
+ margin-bottom: 8px;
96
13
  }
97
14
 
98
- // Overrides of @wordpress/components component
99
-
100
- // Inputs
101
-
102
- .components-color-picker__body {
103
- padding: 16px 0 0;
104
- }
105
-
106
- .components-color-picker__inputs-wrapper {
107
- margin: 0;
108
- }
109
-
110
- .components-color-picker__inputs-fields {
111
- margin-right: 8px;
112
- }
113
-
114
- .components-color-picker__inputs-field {
115
- color: $gray-700;
116
- font-size: 14px;
117
- line-height: 24px;
118
- margin: 0;
119
-
120
- + .components-color-picker__inputs-field {
121
- margin-left: 8px;
122
- }
123
-
124
- label {
125
- color: $gray-900;
126
- font-size: inherit;
127
- font-weight: bold;
128
- line-height: inherit;
129
- margin: 0;
130
- }
131
-
132
- input[type='number'],
133
- input[type='text'] {
134
- background: white;
135
- border: 1px solid $gray-300;
136
- border-radius: 3px;
137
- box-shadow: none;
138
- color: inherit;
139
- font-size: 16px;
140
- line-height: inherit;
141
- margin: 0;
142
- min-height: 48px;
143
- padding: 11px 8px;
144
- transition: border-color 125ms ease-in-out, box-shadow 125ms ease-in-out;
145
- width: 100%;
146
-
147
- @media screen and ( min-width: 768px ) {
148
- font-size: inherit;
149
- }
150
-
151
- &:focus {
152
- border-color: $primary-500;
153
- box-shadow: 0 0 0 2px $primary-500;
154
- }
155
- }
156
-
157
- // Reset
15
+ &__expander {
16
+ box-shadow: inset 0 0 0 1px rgb( 0 0 0 / 20% );
17
+ border-radius: 2px;
18
+ height: 64px;
19
+ padding: 12px;
20
+ text-align: right;
21
+ text-transform: uppercase;
158
22
 
159
- .components-base-control__field,
160
- .components-base-control__label {
161
- display: block;
162
- margin: 0;
23
+ &:focus-visible {
24
+ box-shadow: 0 0 0 var( --wp-admin-border-width-focus ) var( --wp-admin-theme-color );
25
+ border-color: white;
163
26
  }
164
27
  }
165
28
 
166
- .components-color-picker__inputs-toggle {
167
- height: 36px;
168
- margin-bottom: 6px;
169
-
170
- &:active,
171
- &:focus:not( :disabled ),
172
- &:hover {
173
- color: $primary-500;
174
- }
175
-
176
- &:focus:not( :disabled ) {
177
- box-shadow: 0 0 0 3px $primary-500;
29
+ &__main {
30
+ background: white;
31
+ box-shadow: 0 0 8px 4px rgba( black, 0.08 );
32
+ margin: 12px 0;
33
+ position: absolute;
34
+ z-index: 2;
35
+
36
+ &:empty {
37
+ display: none;
178
38
  }
179
39
  }
180
40
  }
@@ -6,27 +6,17 @@
6
6
  @import '~@wordpress/base-styles/colors';
7
7
 
8
8
  .newspack-custom-select-control {
9
- color: $gray-700;
10
- font-size: 14px;
11
- line-height: 24px;
12
- margin: 32px 0;
13
-
14
9
  label {
15
- color: $gray-900;
16
10
  display: block;
17
- font-size: 14px;
18
- font-weight: bold;
19
- line-height: 24px;
20
- padding-bottom: 0 !important;
11
+ margin-bottom: 8px;
21
12
  }
22
13
 
23
14
  .components-custom-select-control__button {
24
- border-color: $gray-300;
25
- border-radius: 3px;
26
- color: $gray-700;
27
- font-size: 14px;
28
- line-height: 24px;
29
- min-height: 48px;
15
+ border-color: $gray-700;
16
+ border-radius: 2px;
17
+ color: $gray-900;
18
+ font-size: inherit;
19
+ min-height: 30px;
30
20
  min-width: 100%;
31
21
  padding-right: 24px;
32
22
 
@@ -34,17 +24,16 @@
34
24
  &:focus,
35
25
  &:hover,
36
26
  &[aria-expanded='true'] {
37
- color: $gray-700;
27
+ color: $gray-900;
38
28
  }
39
29
 
40
30
  &:focus {
41
- border-color: $primary-500;
42
- box-shadow: inset 0 0 0 2px #36f;
31
+ border-color: var( --wp-admin-theme-color );
32
+ box-shadow: inset 0 0 0 1px var( --wp-admin-theme-color );
43
33
  }
44
34
 
45
35
  &-icon {
46
36
  right: 3px;
47
- transition: transform 50ms ease-in-out;
48
37
  width: 18px;
49
38
  }
50
39
 
@@ -54,10 +43,9 @@
54
43
  }
55
44
 
56
45
  .components-custom-select-control__menu {
57
- border-color: $gray-300;
58
- border-radius: 3px;
46
+ border-color: $gray-700;
47
+ border-radius: 2px;
59
48
  box-shadow: 0 4px 8px rgba( black, 0.08 );
60
- color: $gray-700;
61
49
  margin: 8px 0 0;
62
50
  min-width: 222px;
63
51
  }
@@ -77,7 +65,6 @@
77
65
 
78
66
  &.is-header {
79
67
  background: $gray-100;
80
- color: $gray-900;
81
68
  cursor: default;
82
69
  font-weight: bold;
83
70
  margin-left: 0;
@@ -86,7 +73,7 @@
86
73
 
87
74
  &.is-highlighted {
88
75
  background: white;
89
- color: $primary-500;
76
+ color: var( --wp-admin-theme-color );
90
77
  }
91
78
 
92
79
  &.is-selected {
@@ -103,21 +90,4 @@
103
90
  }
104
91
  }
105
92
  }
106
-
107
- // Multiple Select Controls
108
-
109
- & + & {
110
- margin-bottom: 32px;
111
- margin-top: -16px;
112
- }
113
-
114
- // Multiple Controls
115
-
116
- + .newspack-category-autocomplete,
117
- + .newspack-select-control,
118
- + .newspack-text-control,
119
- + .newspack-textarea-control {
120
- margin-bottom: 32px;
121
- margin-top: -16px;
122
- }
123
93
  }
@@ -15,16 +15,21 @@ import { PatronsLogo } from '../';
15
15
  import './style.scss';
16
16
 
17
17
  const Footer = ( { simple } ) => {
18
- const componentsDemo = window && window.newspack_urls && window.newspack_urls.components_demo;
19
- const setupWizard = window && window.newspack_urls && window.newspack_urls.setup_wizard;
20
- const resetUrl = window && window.newspack_urls && window.newspack_urls.reset_url;
21
- const pluginVersion = window && window.newspack_urls && window.newspack_urls.plugin_version;
22
- const removeStarterContent =
23
- window && window.newspack_urls && window.newspack_urls.remove_starter_content;
18
+ const {
19
+ components_demo: componentsDemo = false,
20
+ support = false,
21
+ setup_wizard: setupWizard = false,
22
+ reset_url: resetUrl = false,
23
+ plugin_version: pluginVersion = { label: 'Newspack' },
24
+ remove_starter_content: removeStarterContent = false,
25
+ support_email: supportEmail,
26
+ } = window.newspack_urls || {};
27
+
24
28
  const footerElements = [
25
29
  {
26
30
  label: pluginVersion.label,
27
- url: pluginVersion.url,
31
+ url: 'https://newspack.pub/category/release-notes/',
32
+ external: true,
28
33
  },
29
34
  {
30
35
  label: __( 'About', 'newspack' ),
@@ -33,7 +38,7 @@ const Footer = ( { simple } ) => {
33
38
  },
34
39
  {
35
40
  label: __( 'Documentation', 'newspack' ),
36
- url: 'https://newspack.pub/support/',
41
+ url: support,
37
42
  external: true,
38
43
  },
39
44
  ];
@@ -61,6 +66,12 @@ const Footer = ( { simple } ) => {
61
66
  url: removeStarterContent,
62
67
  } );
63
68
  }
69
+ if ( supportEmail ) {
70
+ footerElements.push( {
71
+ label: __( 'Contact Support', 'newspack' ),
72
+ url: `mailto:${ supportEmail }`,
73
+ } );
74
+ }
64
75
  return (
65
76
  <div className="newspack-footer">
66
77
  { ! simple && (
@@ -2,7 +2,6 @@
2
2
  * Footer
3
3
  */
4
4
 
5
- @import '../../../shared/scss/colors';
6
5
  @import '~@wordpress/base-styles/colors';
7
6
 
8
7
  .newspack-footer {
@@ -45,17 +44,17 @@
45
44
 
46
45
  li {
47
46
  margin: 8px;
48
- }
49
47
 
50
- a {
51
- align-items: flex-end;
52
- color: inherit;
53
- display: flex;
48
+ a {
49
+ align-items: flex-end;
50
+ color: inherit;
51
+ display: flex;
54
52
 
55
- &:active,
56
- &:focus,
57
- &:hover {
58
- color: $gray-900;
53
+ &:active,
54
+ &:focus,
55
+ &:hover {
56
+ color: $gray-900;
57
+ }
59
58
  }
60
59
  }
61
60
 
@@ -42,7 +42,7 @@ class FormTokenField extends Component {
42
42
  ) }
43
43
  >
44
44
  <BaseComponent className={ classes } { ...otherProps } />
45
- { description && <div className="i">{ description }</div> }
45
+ { description && <p className="newspack-form-token-field__help">{ description }</p> }
46
46
  </div>
47
47
  );
48
48
  }
@@ -6,114 +6,19 @@
6
6
  @import '~@wordpress/base-styles/colors';
7
7
 
8
8
  .newspack-form-token-field {
9
- color: $gray-700;
10
- font-size: 14px;
11
- line-height: 24px;
12
- margin: 32px 0;
13
9
  width: 100%;
14
10
 
15
- label {
16
- color: $gray-900;
17
- font-size: inherit;
18
- font-weight: bold;
19
- line-height: inherit;
20
- margin: 0;
11
+ .components-form-token-field__input-container {
12
+ padding-bottom: 1px;
13
+ padding-top: 1px;
21
14
  }
22
15
 
23
- .newspack-form-token-field__input-container {
24
- background: white;
25
- border: 1px solid $gray-300;
26
- border-radius: 3px;
27
- box-shadow: none;
28
- box-sizing: border-box;
29
- color: inherit;
30
- font-size: 16px;
31
- line-height: inherit;
32
- margin: 0;
33
- min-height: 48px;
34
- padding: 9px 8px;
35
- transition: border-color 125ms ease-in-out, box-shadow 125ms ease-in-out;
36
- width: 100%;
16
+ // Help
37
17
 
38
- @media screen and ( min-width: 768px ) {
39
- font-size: inherit;
40
- }
41
-
42
- &.is-active {
43
- border-color: $primary-500;
44
- box-shadow: inset 0 0 0 2px $primary-500;
45
- }
46
-
47
- &:disabled,
48
- &.is-disabled {
49
- background: $gray-100;
50
- color: $gray-600;
51
- cursor: not-allowed;
52
- }
53
-
54
- input[type='text'] {
55
- border: 0;
56
- line-height: inherit;
57
- margin: 2px 0;
58
- padding: 0;
59
-
60
- &:focus {
61
- box-shadow: none;
62
- }
63
- }
64
-
65
- .components-form-token-field__token-text {
66
- font-size: inherit;
67
- }
68
-
69
- .components-form-token-field__remove-token {
70
- height: 24px;
71
- }
72
- }
73
-
74
- .components-form-token-field__suggestions-list {
75
- border-top-color: $gray-300;
76
- margin: 12px -8px -11px;
77
- padding: 8px 0 0;
78
-
79
- .components-form-token-field__suggestion {
80
- font-size: inherit;
81
- margin-bottom: 8px;
82
-
83
- &.is-selected {
84
- background: $primary-500;
85
- }
86
- }
87
- }
88
-
89
- // Help Text
90
-
91
- .components-form-token-field__help {
92
- margin: 0;
93
- }
94
-
95
- // Multiple Form Token Field
96
-
97
- & + & {
98
- margin-bottom: 32px;
99
- margin-top: -16px;
100
- }
101
-
102
- // Multiple Controls
103
-
104
- + .newspack-select-control,
105
- + .newspack-textarea-control,
106
- + .newspack-text-control {
107
- margin-bottom: 32px;
108
- margin-top: -16px;
109
- }
110
-
111
- // Reset
112
-
113
- .components-base-control__field,
114
- .components-base-control__label {
115
- display: block;
116
- margin: 0;
18
+ &__help {
19
+ color: $gray-700;
20
+ font-size: 12px;
21
+ margin: 8px 0 0 !important;
117
22
  }
118
23
 
119
24
  // Hidden Elements
@@ -15,7 +15,7 @@ const GlobalNotices = () => {
15
15
  }
16
16
  return notice.split( ',' ).map( ( text, i ) => {
17
17
  if ( text.indexOf( '_error_' ) === 0 ) {
18
- return <Notice isError noticeText={ text.replace( '_error_', '' ) } key={ i } />;
18
+ return <Notice isError noticeText={ text.replace( '_error_', '' ) } key={ i } rawHTML />;
19
19
  }
20
20
  return <Notice isSuccess noticeText={ text } key={ i } />;
21
21
  } );
@@ -118,6 +118,19 @@
118
118
  margin-top: 0 !important;
119
119
  }
120
120
 
121
+ .components-base-control {
122
+ &__field,
123
+ &__help {
124
+ margin-bottom: 0;
125
+ }
126
+ }
127
+
128
+ .components-form-token-field {
129
+ &__input-container {
130
+ margin-bottom: 0;
131
+ }
132
+ }
133
+
121
134
  // Cards
122
135
  > .newspack-card {
123
136
  > *:first-child {
@@ -131,7 +144,7 @@
131
144
 
132
145
  // Table-like
133
146
  &__thead {
134
- background: $gray-100;
147
+ background: rgba( black, 0.025 );
135
148
  border-bottom: 1px solid $gray-300;
136
149
  border-top: 1px solid $gray-300;
137
150
  color: $gray-900;
@@ -84,13 +84,13 @@ class Handoff extends Component {
84
84
  children,
85
85
  compact,
86
86
  useModal,
87
- // eslint-disable-next-line no-unused-vars
87
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
88
88
  modalTitle: _modalTitle,
89
- // eslint-disable-next-line no-unused-vars
89
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
90
90
  modalBody: _modalBody,
91
- // eslint-disable-next-line no-unused-vars
91
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
92
92
  onReady,
93
- // eslint-disable-next-line no-unused-vars
93
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
94
94
  editLink,
95
95
  ...otherProps
96
96
  } = this.props;
@@ -119,7 +119,7 @@ class Handoff extends Component {
119
119
  </Button>
120
120
  ) }
121
121
  { Name && 'active' !== Status && (
122
- <Button className={ classes } isSecondary disabled { ...otherProps }>
122
+ <Button className={ classes } variant="secondary" disabled { ...otherProps }>
123
123
  { Name + __( ' not installed', 'newspack' ) }
124
124
  </Button>
125
125
  ) }
@@ -142,10 +142,10 @@ class Handoff extends Component {
142
142
  >
143
143
  <p>{ modalBody }</p>
144
144
  <Card buttonsCard noBorder className="justify-end">
145
- <Button isSecondary onClick={ () => this.setState( { showModal: false } ) }>
145
+ <Button variant="secondary" onClick={ () => this.setState( { showModal: false } ) }>
146
146
  { dismissModalButton }
147
147
  </Button>
148
- <Button isPrimary onClick={ () => this.goToPlugin( Slug ) }>
148
+ <Button variant="primary" onClick={ () => this.goToPlugin( Slug ) }>
149
149
  { primaryModalButton }
150
150
  </Button>
151
151
  </Card>
@@ -11,18 +11,15 @@
11
11
  display: flex;
12
12
  }
13
13
  &__label {
14
- color: $gray-900;
15
- font-size: 14px;
16
- font-weight: bold;
17
- line-height: 24px;
14
+ margin: 0 0 8px;
18
15
  }
19
16
  &__image {
20
17
  align-items: center;
21
18
  background-repeat: no-repeat;
22
19
  background-size: contain;
23
20
  background-position: center;
24
- border: 1px dashed $gray-300;
25
- border-radius: 3px;
21
+ border: 1px dashed $gray-700;
22
+ border-radius: 2px;
26
23
  display: flex;
27
24
  justify-content: center;
28
25
  max-width: 100%;
@@ -34,7 +31,7 @@
34
31
  &:not( &--has-image ) {
35
32
  .newspack-button {
36
33
  background: white !important;
37
- border-radius: 3px !important;
34
+ border-radius: 2px !important;
38
35
  padding: 4px 16px !important;
39
36
 
40
37
  &:active,
@@ -53,8 +50,8 @@
53
50
  overflow: hidden;
54
51
  &::before,
55
52
  &::after {
56
- border: 1px solid rgba( black, 0.125 );
57
- border-radius: 3px;
53
+ border: 1px solid rgba( black, 0.54 );
54
+ border-radius: 2px;
58
55
  bottom: 0;
59
56
  content: '';
60
57
  left: 0;
@@ -74,7 +71,7 @@
74
71
  }
75
72
  &::after {
76
73
  background: rgba( white, 0.9 );
77
- border-color: $gray-300;
74
+ border-color: $gray-700;
78
75
  }
79
76
  &:focus-within,
80
77
  &:hover {
@@ -97,7 +94,9 @@
97
94
  }
98
95
  }
99
96
  &__image + &__help {
100
- margin: 0;
97
+ color: $gray-700;
98
+ font-size: 12px;
99
+ margin: 1em 0 0;
101
100
  }
102
101
  &__controls {
103
102
  align-items: center;
package/src/index.js CHANGED
@@ -3,11 +3,8 @@ export { default as AutocompleteTokenField } from './autocomplete-tokenfield';
3
3
  export { default as AutocompleteWithSuggestions } from './autocomplete-with-suggestions';
4
4
  export { default as Button } from './button';
5
5
  export { default as ButtonCard } from './button-card';
6
- export { default as ButtonGroup } from './button-group';
7
6
  export { default as Card } from './card';
8
- export { default as PreviewBox } from './preview-box';
9
7
  export { default as CategoryAutocomplete } from './category-autocomplete';
10
- export { default as CheckboxControl } from './checkbox-control';
11
8
  export { default as ColorPicker } from './color-picker';
12
9
  export { default as CustomSelectControl } from './custom-select-control';
13
10
  export { default as FormTokenField } from './form-token-field';
@@ -35,15 +32,14 @@ export { default as Settings } from './settings';
35
32
  export { default as StyleCard } from './style-card';
36
33
  export { default as TabbedNavigation } from './tabbed-navigation';
37
34
  export { default as TextControl } from './text-control';
38
- export { default as TextareaControl } from './textarea-control';
39
- export { default as ToggleControl } from './toggle-control';
40
- export { default as ToggleGroup } from './toggle-group';
41
35
  export { default as Waiting } from './waiting';
42
36
  export { default as WebPreview } from './web-preview';
37
+ export { default as Wizard } from './wizard';
43
38
  export { default as withWizard } from './with-wizard';
44
39
  export { default as withWizardScreen } from './with-wizard-screen';
45
- export { default as WizardPagination } from './wizard-pagination';
46
40
 
47
41
  export { default as Router } from './proxied-imports/router';
48
42
  export { default as hooks } from './hooks';
49
43
  export { default as utils } from './utils';
44
+
45
+ import './style.scss';