newspack-components 2.0.1 → 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 (251) hide show
  1. package/copy-styles.js +1 -1
  2. package/dist/cjs/action-card/index.js +32 -22
  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 +69 -35
  11. package/dist/cjs/card/index.js +3 -1
  12. package/dist/cjs/card/style.scss +34 -61
  13. package/dist/cjs/category-autocomplete/index.js +52 -13
  14. package/dist/cjs/category-autocomplete/style.scss +19 -15
  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/index.js +1 -1
  24. package/dist/cjs/grid/style.scss +29 -1
  25. package/dist/cjs/handoff/index.js +7 -7
  26. package/dist/cjs/image-upload/index.js +1 -1
  27. package/dist/cjs/image-upload/style.scss +10 -11
  28. package/dist/cjs/index.js +7 -53
  29. package/dist/cjs/modal/index.js +0 -3
  30. package/dist/cjs/modal/style.scss +19 -131
  31. package/dist/cjs/newspack-icon/index.js +4 -2
  32. package/dist/cjs/newspack-icon/style.scss +15 -0
  33. package/dist/cjs/notice/index.js +8 -9
  34. package/dist/cjs/notice/style.scss +38 -10
  35. package/dist/cjs/plugin-installer/index.js +4 -2
  36. package/dist/cjs/plugin-settings/SettingsSection.js +76 -45
  37. package/dist/cjs/plugin-settings/index.js +49 -34
  38. package/dist/cjs/plugin-settings/style.scss +7 -0
  39. package/dist/cjs/plugin-toggle/index.js +22 -1
  40. package/dist/cjs/popover/style.scss +2 -2
  41. package/dist/cjs/radio-control/style.scss +1 -2
  42. package/dist/cjs/section-header/index.js +18 -5
  43. package/dist/cjs/section-header/style.scss +26 -1
  44. package/dist/cjs/select-control/ButtonGroupControl.js +8 -8
  45. package/dist/cjs/select-control/GroupedSelectControl.js +33 -30
  46. package/dist/cjs/select-control/index.js +1 -2
  47. package/dist/cjs/select-control/style.scss +46 -87
  48. package/dist/cjs/settings/MinMaxSetting.js +4 -2
  49. package/dist/cjs/settings/SettingsCard.js +6 -1
  50. package/dist/cjs/settings/SettingsSection.js +4 -4
  51. package/dist/cjs/settings/style.scss +32 -4
  52. package/dist/cjs/style-card/index.js +10 -6
  53. package/dist/cjs/style-card/style.scss +12 -8
  54. package/dist/cjs/style.scss +44 -0
  55. package/dist/cjs/tabbed-navigation/index.js +13 -20
  56. package/dist/cjs/tabbed-navigation/style.scss +56 -34
  57. package/dist/cjs/text-control/index.js +0 -3
  58. package/dist/cjs/text-control/style.scss +0 -126
  59. package/dist/cjs/waiting/index.js +9 -25
  60. package/dist/cjs/waiting/style.scss +9 -20
  61. package/dist/cjs/web-preview/index.js +18 -30
  62. package/dist/cjs/web-preview/style.scss +33 -26
  63. package/dist/cjs/with-wizard/index.js +4 -2
  64. package/dist/cjs/with-wizard/style.scss +77 -89
  65. package/dist/cjs/with-wizard-screen/index.js +17 -21
  66. package/dist/cjs/with-wizard-screen/style.scss +74 -121
  67. package/dist/cjs/wizard/components/WizardError.js +86 -0
  68. package/dist/cjs/wizard/index.js +145 -0
  69. package/dist/cjs/wizard/store/index.js +178 -0
  70. package/dist/cjs/wizard/store/utils.js +31 -0
  71. package/dist/esm/action-card/index.js +33 -23
  72. package/dist/esm/action-card/style.scss +52 -27
  73. package/dist/esm/autocomplete-tokenfield/style.scss +4 -4
  74. package/dist/esm/autocomplete-with-suggestions/index.js +3 -2
  75. package/dist/esm/autocomplete-with-suggestions/style.scss +19 -20
  76. package/dist/esm/button/index.js +2 -12
  77. package/dist/esm/button/style.scss +3 -344
  78. package/dist/esm/button-card/index.js +10 -6
  79. package/dist/esm/button-card/style.scss +69 -35
  80. package/dist/esm/card/index.js +3 -1
  81. package/dist/esm/card/style.scss +34 -61
  82. package/dist/esm/category-autocomplete/index.js +54 -14
  83. package/dist/esm/category-autocomplete/style.scss +19 -15
  84. package/dist/esm/color-picker/index.js +15 -34
  85. package/dist/esm/color-picker/style.scss +20 -160
  86. package/dist/esm/custom-select-control/style.scss +12 -42
  87. package/dist/esm/footer/index.js +21 -7
  88. package/dist/esm/footer/style.scss +9 -10
  89. package/dist/esm/form-token-field/index.js +2 -2
  90. package/dist/esm/form-token-field/style.scss +8 -103
  91. package/dist/esm/global-notices/index.js +2 -1
  92. package/dist/esm/grid/index.js +1 -1
  93. package/dist/esm/grid/style.scss +29 -1
  94. package/dist/esm/handoff/index.js +7 -7
  95. package/dist/esm/image-upload/index.js +1 -1
  96. package/dist/esm/image-upload/style.scss +10 -11
  97. package/dist/esm/index.js +3 -8
  98. package/dist/esm/modal/index.js +0 -3
  99. package/dist/esm/modal/style.scss +19 -131
  100. package/dist/esm/newspack-icon/index.js +4 -2
  101. package/dist/esm/newspack-icon/style.scss +15 -0
  102. package/dist/esm/notice/index.js +8 -3
  103. package/dist/esm/notice/style.scss +38 -10
  104. package/dist/esm/plugin-installer/index.js +5 -2
  105. package/dist/esm/plugin-settings/SettingsSection.js +74 -46
  106. package/dist/esm/plugin-settings/index.js +48 -34
  107. package/dist/esm/plugin-settings/style.scss +7 -0
  108. package/dist/esm/plugin-toggle/index.js +23 -1
  109. package/dist/esm/popover/style.scss +2 -2
  110. package/dist/esm/radio-control/style.scss +1 -2
  111. package/dist/esm/section-header/index.js +17 -5
  112. package/dist/esm/section-header/style.scss +26 -1
  113. package/dist/esm/select-control/ButtonGroupControl.js +8 -8
  114. package/dist/esm/select-control/GroupedSelectControl.js +33 -30
  115. package/dist/esm/select-control/index.js +1 -2
  116. package/dist/esm/select-control/style.scss +46 -87
  117. package/dist/esm/settings/MinMaxSetting.js +3 -2
  118. package/dist/esm/settings/SettingsCard.js +6 -1
  119. package/dist/esm/settings/SettingsSection.js +5 -5
  120. package/dist/esm/settings/style.scss +32 -4
  121. package/dist/esm/style-card/index.js +11 -8
  122. package/dist/esm/style-card/style.scss +12 -8
  123. package/dist/esm/style.scss +44 -0
  124. package/dist/esm/tabbed-navigation/index.js +14 -22
  125. package/dist/esm/tabbed-navigation/style.scss +56 -34
  126. package/dist/esm/text-control/index.js +0 -3
  127. package/dist/esm/text-control/style.scss +0 -126
  128. package/dist/esm/waiting/index.js +9 -22
  129. package/dist/esm/waiting/style.scss +9 -20
  130. package/dist/esm/web-preview/index.js +12 -25
  131. package/dist/esm/web-preview/style.scss +33 -26
  132. package/dist/esm/with-wizard/index.js +4 -2
  133. package/dist/esm/with-wizard/style.scss +77 -89
  134. package/dist/esm/with-wizard-screen/index.js +18 -22
  135. package/dist/esm/with-wizard-screen/style.scss +74 -121
  136. package/dist/esm/wizard/components/WizardError.js +78 -0
  137. package/dist/esm/wizard/index.js +128 -0
  138. package/dist/esm/wizard/store/index.js +161 -0
  139. package/dist/esm/wizard/store/utils.js +17 -0
  140. package/package.json +2 -1
  141. package/shared/scss/_colors.scss +15 -0
  142. package/src/action-card/index.js +31 -19
  143. package/src/action-card/style.scss +52 -27
  144. package/src/autocomplete-tokenfield/style.scss +4 -4
  145. package/src/autocomplete-with-suggestions/index.js +4 -2
  146. package/src/autocomplete-with-suggestions/style.scss +19 -20
  147. package/src/button/index.js +2 -9
  148. package/src/button/style.scss +3 -344
  149. package/src/button-card/index.js +19 -5
  150. package/src/button-card/style.scss +69 -35
  151. package/src/card/index.js +4 -0
  152. package/src/card/style.scss +34 -61
  153. package/src/category-autocomplete/index.js +51 -18
  154. package/src/category-autocomplete/style.scss +19 -15
  155. package/src/color-picker/index.js +16 -22
  156. package/src/color-picker/style.scss +20 -160
  157. package/src/custom-select-control/style.scss +12 -42
  158. package/src/footer/index.js +19 -8
  159. package/src/footer/style.scss +9 -10
  160. package/src/form-token-field/index.js +1 -1
  161. package/src/form-token-field/style.scss +8 -103
  162. package/src/global-notices/index.js +1 -1
  163. package/src/grid/index.js +1 -1
  164. package/src/grid/style.scss +29 -1
  165. package/src/handoff/index.js +7 -7
  166. package/src/image-upload/style.scss +10 -11
  167. package/src/index.js +3 -7
  168. package/src/modal/index.js +2 -5
  169. package/src/modal/style.scss +19 -131
  170. package/src/newspack-icon/index.js +7 -2
  171. package/src/newspack-icon/style.scss +15 -0
  172. package/src/notice/index.js +7 -1
  173. package/src/notice/style.scss +38 -10
  174. package/src/plugin-installer/index.js +4 -2
  175. package/src/plugin-settings/SettingsSection.js +65 -27
  176. package/src/plugin-settings/index.js +45 -18
  177. package/src/plugin-settings/style.scss +7 -0
  178. package/src/plugin-toggle/index.js +35 -9
  179. package/src/popover/style.scss +2 -2
  180. package/src/radio-control/style.scss +1 -2
  181. package/src/section-header/index.js +25 -6
  182. package/src/section-header/style.scss +26 -1
  183. package/src/select-control/ButtonGroupControl.js +13 -6
  184. package/src/select-control/GroupedSelectControl.js +26 -24
  185. package/src/select-control/index.js +1 -2
  186. package/src/select-control/style.scss +46 -87
  187. package/src/settings/MinMaxSetting.js +2 -1
  188. package/src/settings/SettingsCard.js +9 -7
  189. package/src/settings/SettingsSection.js +4 -4
  190. package/src/settings/style.scss +32 -4
  191. package/src/style-card/index.js +14 -16
  192. package/src/style-card/style.scss +12 -8
  193. package/src/style.scss +44 -0
  194. package/src/tabbed-navigation/index.js +12 -24
  195. package/src/tabbed-navigation/style.scss +56 -34
  196. package/src/text-control/index.js +1 -2
  197. package/src/text-control/style.scss +0 -126
  198. package/src/waiting/index.js +7 -18
  199. package/src/waiting/style.scss +9 -20
  200. package/src/web-preview/index.js +12 -33
  201. package/src/web-preview/style.scss +33 -26
  202. package/src/with-wizard/index.js +7 -5
  203. package/src/with-wizard/style.scss +77 -89
  204. package/src/with-wizard-screen/index.js +14 -17
  205. package/src/with-wizard-screen/style.scss +74 -121
  206. package/src/wizard/components/WizardError.js +57 -0
  207. package/src/wizard/index.js +133 -0
  208. package/src/wizard/store/index.js +126 -0
  209. package/src/wizard/store/utils.js +16 -0
  210. package/dist/cjs/button-group/index.js +0 -57
  211. package/dist/cjs/button-group/style.scss +0 -68
  212. package/dist/cjs/checkbox-control/index.js +0 -63
  213. package/dist/cjs/checkbox-control/style.scss +0 -78
  214. package/dist/cjs/preview-box/index.js +0 -36
  215. package/dist/cjs/preview-box/style.scss +0 -18
  216. package/dist/cjs/textarea-control/index.js +0 -54
  217. package/dist/cjs/textarea-control/style.scss +0 -76
  218. package/dist/cjs/toggle-control/index.js +0 -58
  219. package/dist/cjs/toggle-control/style.scss +0 -74
  220. package/dist/cjs/toggle-group/index.js +0 -71
  221. package/dist/cjs/toggle-group/style.scss +0 -28
  222. package/dist/cjs/wizard-pagination/index.js +0 -71
  223. package/dist/cjs/wizard-pagination/style.scss +0 -74
  224. package/dist/esm/button-group/index.js +0 -43
  225. package/dist/esm/button-group/style.scss +0 -68
  226. package/dist/esm/checkbox-control/index.js +0 -49
  227. package/dist/esm/checkbox-control/style.scss +0 -78
  228. package/dist/esm/preview-box/index.js +0 -30
  229. package/dist/esm/preview-box/style.scss +0 -18
  230. package/dist/esm/textarea-control/index.js +0 -40
  231. package/dist/esm/textarea-control/style.scss +0 -76
  232. package/dist/esm/toggle-control/index.js +0 -44
  233. package/dist/esm/toggle-control/style.scss +0 -74
  234. package/dist/esm/toggle-group/index.js +0 -58
  235. package/dist/esm/toggle-group/style.scss +0 -28
  236. package/dist/esm/wizard-pagination/index.js +0 -57
  237. package/dist/esm/wizard-pagination/style.scss +0 -74
  238. package/src/button-group/index.js +0 -35
  239. package/src/button-group/style.scss +0 -68
  240. package/src/checkbox-control/index.js +0 -38
  241. package/src/checkbox-control/style.scss +0 -78
  242. package/src/preview-box/index.js +0 -18
  243. package/src/preview-box/style.scss +0 -18
  244. package/src/textarea-control/index.js +0 -32
  245. package/src/textarea-control/style.scss +0 -76
  246. package/src/toggle-control/index.js +0 -38
  247. package/src/toggle-control/style.scss +0 -74
  248. package/src/toggle-group/index.js +0 -43
  249. package/src/toggle-group/style.scss +0 -28
  250. package/src/wizard-pagination/index.js +0 -59
  251. package/src/wizard-pagination/style.scss +0 -74
@@ -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
  }
@@ -28,21 +28,28 @@ const Footer = _ref => {
28
28
  let {
29
29
  simple
30
30
  } = _ref;
31
- const componentsDemo = window && window.newspack_urls && window.newspack_urls.components_demo;
32
- const setupWizard = window && window.newspack_urls && window.newspack_urls.setup_wizard;
33
- const resetUrl = window && window.newspack_urls && window.newspack_urls.reset_url;
34
- const pluginVersion = window && window.newspack_urls && window.newspack_urls.plugin_version;
35
- const removeStarterContent = window && window.newspack_urls && window.newspack_urls.remove_starter_content;
31
+ const {
32
+ components_demo: componentsDemo = false,
33
+ support = false,
34
+ setup_wizard: setupWizard = false,
35
+ reset_url: resetUrl = false,
36
+ plugin_version: pluginVersion = {
37
+ label: 'Newspack'
38
+ },
39
+ remove_starter_content: removeStarterContent = false,
40
+ support_email: supportEmail
41
+ } = window.newspack_urls || {};
36
42
  const footerElements = [{
37
43
  label: pluginVersion.label,
38
- url: pluginVersion.url
44
+ url: 'https://newspack.pub/category/release-notes/',
45
+ external: true
39
46
  }, {
40
47
  label: __('About', 'newspack'),
41
48
  url: 'https://newspack.pub/',
42
49
  external: true
43
50
  }, {
44
51
  label: __('Documentation', 'newspack'),
45
- url: 'https://newspack.pub/support/',
52
+ url: support,
46
53
  external: true
47
54
  }];
48
55
 
@@ -74,6 +81,13 @@ const Footer = _ref => {
74
81
  });
75
82
  }
76
83
 
84
+ if (supportEmail) {
85
+ footerElements.push({
86
+ label: __('Contact Support', 'newspack'),
87
+ url: `mailto:${supportEmail}`
88
+ });
89
+ }
90
+
77
91
  return (0, _jsxRuntime.jsxs)("div", {
78
92
  className: "newspack-footer",
79
93
  children: [!simple && (0, _jsxRuntime.jsx)("div", {
@@ -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
 
@@ -53,8 +53,8 @@ class FormTokenField extends _element.Component {
53
53
  children: [(0, _jsxRuntime.jsx)(_components.FormTokenField, {
54
54
  className: classes,
55
55
  ...otherProps
56
- }), description && (0, _jsxRuntime.jsx)("div", {
57
- className: "i",
56
+ }), description && (0, _jsxRuntime.jsx)("p", {
57
+ className: "newspack-form-token-field__help",
58
58
  children: description
59
59
  })]
60
60
  });
@@ -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
@@ -29,7 +29,8 @@ const GlobalNotices = () => {
29
29
  if (text.indexOf('_error_') === 0) {
30
30
  return (0, _jsxRuntime.jsx)(_.Notice, {
31
31
  isError: true,
32
- noticeText: text.replace('_error_', '')
32
+ noticeText: text.replace('_error_', ''),
33
+ rawHTML: true
33
34
  }, i);
34
35
  }
35
36
 
@@ -54,7 +54,7 @@ class Grid extends _element.Component {
54
54
 
55
55
  Grid.defaultProps = {
56
56
  columns: 2,
57
- gutter: 64,
57
+ gutter: 32,
58
58
  rowGap: null
59
59
  };
60
60
  var _default = Grid;
@@ -16,6 +16,11 @@
16
16
  margin: 0;
17
17
  }
18
18
 
19
+ // Gutter 0
20
+ &__gutter-0 {
21
+ grid-gap: 0;
22
+ }
23
+
19
24
  // Gutter 8
20
25
  &__gutter-8 {
21
26
  grid-gap: 8px;
@@ -36,6 +41,11 @@
36
41
  grid-gap: 32px;
37
42
  }
38
43
 
44
+ // Row Gap 0
45
+ &__row-gap-0 {
46
+ grid-row-gap: 0;
47
+ }
48
+
39
49
  // Row Gap 8
40
50
  &__row-gap-8 {
41
51
  grid-row-gap: 8px;
@@ -51,6 +61,11 @@
51
61
  grid-row-gap: 32px;
52
62
  }
53
63
 
64
+ // Gutter 64
65
+ &__gutter-64 {
66
+ grid-gap: 64px;
67
+ }
68
+
54
69
  // Columns 6
55
70
  &__columns-6 {
56
71
  grid-template-columns: repeat( 2, 1fr );
@@ -103,6 +118,19 @@
103
118
  margin-top: 0 !important;
104
119
  }
105
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
+
106
134
  // Cards
107
135
  > .newspack-card {
108
136
  > *:first-child {
@@ -116,7 +144,7 @@
116
144
 
117
145
  // Table-like
118
146
  &__thead {
119
- background: $gray-100;
147
+ background: rgba( black, 0.025 );
120
148
  border-bottom: 1px solid $gray-300;
121
149
  border-top: 1px solid $gray-300;
122
150
  color: $gray-900;
@@ -102,13 +102,13 @@ class Handoff extends _element.Component {
102
102
  children,
103
103
  compact,
104
104
  useModal,
105
- // eslint-disable-next-line no-unused-vars
105
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
106
106
  modalTitle: _modalTitle,
107
- // eslint-disable-next-line no-unused-vars
107
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
108
108
  modalBody: _modalBody,
109
- // eslint-disable-next-line no-unused-vars
109
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
110
110
  onReady,
111
- // eslint-disable-next-line no-unused-vars
111
+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
112
112
  editLink,
113
113
  ...otherProps
114
114
  } = this.props;
@@ -141,7 +141,7 @@ class Handoff extends _element.Component {
141
141
  children: children ? children : primaryButton
142
142
  }), Name && 'active' !== Status && (0, _jsxRuntime.jsx)(_.Button, {
143
143
  className: classes,
144
- isSecondary: true,
144
+ variant: "secondary",
145
145
  disabled: true,
146
146
  ...otherProps,
147
147
  children: Name + __(' not installed', 'newspack')
@@ -166,13 +166,13 @@ class Handoff extends _element.Component {
166
166
  noBorder: true,
167
167
  className: "justify-end",
168
168
  children: [(0, _jsxRuntime.jsx)(_.Button, {
169
- isSecondary: true,
169
+ variant: "secondary",
170
170
  onClick: () => this.setState({
171
171
  showModal: false
172
172
  }),
173
173
  children: dismissModalButton
174
174
  }), (0, _jsxRuntime.jsx)(_.Button, {
175
- isPrimary: true,
175
+ variant: "primary",
176
176
  onClick: () => this.goToPlugin(Slug),
177
177
  children: primaryModalButton
178
178
  })]
@@ -96,7 +96,7 @@ class ImageUpload extends _element.Component {
96
96
  className: classes,
97
97
  style: { ...style
98
98
  },
99
- children: image !== null && image !== void 0 && image.url ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
99
+ children: image?.url ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
100
100
  children: [(0, _jsxRuntime.jsx)("img", {
101
101
  "data-testid": "image-upload",
102
102
  src: image.url,
@@ -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/dist/cjs/index.js CHANGED
@@ -35,12 +35,6 @@ Object.defineProperty(exports, "ButtonCard", {
35
35
  return _buttonCard.default;
36
36
  }
37
37
  });
38
- Object.defineProperty(exports, "ButtonGroup", {
39
- enumerable: true,
40
- get: function () {
41
- return _buttonGroup.default;
42
- }
43
- });
44
38
  Object.defineProperty(exports, "Card", {
45
39
  enumerable: true,
46
40
  get: function () {
@@ -53,12 +47,6 @@ Object.defineProperty(exports, "CategoryAutocomplete", {
53
47
  return _categoryAutocomplete.default;
54
48
  }
55
49
  });
56
- Object.defineProperty(exports, "CheckboxControl", {
57
- enumerable: true,
58
- get: function () {
59
- return _checkboxControl.default;
60
- }
61
- });
62
50
  Object.defineProperty(exports, "ColorPicker", {
63
51
  enumerable: true,
64
52
  get: function () {
@@ -173,12 +161,6 @@ Object.defineProperty(exports, "Popover", {
173
161
  return _popover.default;
174
162
  }
175
163
  });
176
- Object.defineProperty(exports, "PreviewBox", {
177
- enumerable: true,
178
- get: function () {
179
- return _previewBox.default;
180
- }
181
- });
182
164
  Object.defineProperty(exports, "ProgressBar", {
183
165
  enumerable: true,
184
166
  get: function () {
@@ -233,24 +215,6 @@ Object.defineProperty(exports, "TextControl", {
233
215
  return _textControl.default;
234
216
  }
235
217
  });
236
- Object.defineProperty(exports, "TextareaControl", {
237
- enumerable: true,
238
- get: function () {
239
- return _textareaControl.default;
240
- }
241
- });
242
- Object.defineProperty(exports, "ToggleControl", {
243
- enumerable: true,
244
- get: function () {
245
- return _toggleControl.default;
246
- }
247
- });
248
- Object.defineProperty(exports, "ToggleGroup", {
249
- enumerable: true,
250
- get: function () {
251
- return _toggleGroup.default;
252
- }
253
- });
254
218
  Object.defineProperty(exports, "Waiting", {
255
219
  enumerable: true,
256
220
  get: function () {
@@ -263,10 +227,10 @@ Object.defineProperty(exports, "WebPreview", {
263
227
  return _webPreview.default;
264
228
  }
265
229
  });
266
- Object.defineProperty(exports, "WizardPagination", {
230
+ Object.defineProperty(exports, "Wizard", {
267
231
  enumerable: true,
268
232
  get: function () {
269
- return _wizardPagination.default;
233
+ return _wizard.default;
270
234
  }
271
235
  });
272
236
  Object.defineProperty(exports, "hooks", {
@@ -304,16 +268,10 @@ var _button = _interopRequireDefault(require("./button"));
304
268
 
305
269
  var _buttonCard = _interopRequireDefault(require("./button-card"));
306
270
 
307
- var _buttonGroup = _interopRequireDefault(require("./button-group"));
308
-
309
271
  var _card = _interopRequireDefault(require("./card"));
310
272
 
311
- var _previewBox = _interopRequireDefault(require("./preview-box"));
312
-
313
273
  var _categoryAutocomplete = _interopRequireDefault(require("./category-autocomplete"));
314
274
 
315
- var _checkboxControl = _interopRequireDefault(require("./checkbox-control"));
316
-
317
275
  var _colorPicker = _interopRequireDefault(require("./color-picker"));
318
276
 
319
277
  var _customSelectControl = _interopRequireDefault(require("./custom-select-control"));
@@ -368,24 +326,20 @@ var _tabbedNavigation = _interopRequireDefault(require("./tabbed-navigation"));
368
326
 
369
327
  var _textControl = _interopRequireDefault(require("./text-control"));
370
328
 
371
- var _textareaControl = _interopRequireDefault(require("./textarea-control"));
372
-
373
- var _toggleControl = _interopRequireDefault(require("./toggle-control"));
374
-
375
- var _toggleGroup = _interopRequireDefault(require("./toggle-group"));
376
-
377
329
  var _waiting = _interopRequireDefault(require("./waiting"));
378
330
 
379
331
  var _webPreview = _interopRequireDefault(require("./web-preview"));
380
332
 
333
+ var _wizard = _interopRequireDefault(require("./wizard"));
334
+
381
335
  var _withWizard = _interopRequireDefault(require("./with-wizard"));
382
336
 
383
337
  var _withWizardScreen = _interopRequireDefault(require("./with-wizard-screen"));
384
338
 
385
- var _wizardPagination = _interopRequireDefault(require("./wizard-pagination"));
386
-
387
339
  var _router = _interopRequireDefault(require("./proxied-imports/router"));
388
340
 
389
341
  var _hooks = _interopRequireDefault(require("./hooks"));
390
342
 
391
- var _utils = _interopRequireDefault(require("./utils"));
343
+ var _utils = _interopRequireDefault(require("./utils"));
344
+
345
+ require("./style.scss");
@@ -39,16 +39,13 @@ class Modal extends _element.Component {
39
39
  render() {
40
40
  const {
41
41
  className,
42
- overlayClassName,
43
42
  isWide,
44
43
  isNarrow,
45
44
  ...otherProps
46
45
  } = this.props;
47
46
  const classes = (0, _classnames.default)('newspack-modal', isWide && 'newspack-modal--wide', isNarrow && 'newspack-modal--narrow', className);
48
- const overlayClasses = (0, _classnames.default)('newspack-modal__overlay', overlayClassName);
49
47
  return (0, _jsxRuntime.jsx)(_components.Modal, {
50
48
  className: classes,
51
- overlayClassName: overlayClasses,
52
49
  ...otherProps
53
50
  });
54
51
  }