newspack-components 4.2.0 → 4.4.0-epic-editor-refactor.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/DEVELOPMENT.md +868 -0
  3. package/copy-styles.js +3 -2
  4. package/dist/cjs/accordion/index.js +17 -12
  5. package/dist/cjs/action-card/index.js +186 -140
  6. package/dist/cjs/action-card/style.scss +25 -2
  7. package/dist/cjs/autocomplete-tokenfield/index.js +254 -234
  8. package/dist/cjs/autocomplete-with-latest-posts/index.js +351 -0
  9. package/dist/cjs/autocomplete-with-latest-posts/style.scss +150 -0
  10. package/dist/cjs/autocomplete-with-suggestions/index.js +229 -126
  11. package/dist/cjs/badge/index.js +32 -0
  12. package/dist/cjs/badge/style.scss +36 -0
  13. package/dist/cjs/box-contrast/index.js +19 -15
  14. package/dist/cjs/button/index.js +41 -24
  15. package/dist/cjs/button-props/button-props.js +5 -5
  16. package/dist/cjs/button-props/index.js +2 -2
  17. package/dist/cjs/card/core-card.js +199 -0
  18. package/dist/cjs/card/index.js +75 -35
  19. package/dist/cjs/card/style-core.scss +295 -0
  20. package/dist/cjs/card/style.scss +4 -4
  21. package/dist/cjs/card-feature/index.js +141 -0
  22. package/dist/cjs/card-feature/style.scss +75 -0
  23. package/dist/cjs/card-form/index.js +144 -0
  24. package/dist/cjs/card-form/style.scss +20 -0
  25. package/dist/cjs/card-settings-group/index.js +69 -0
  26. package/dist/cjs/card-settings-group/style.scss +33 -0
  27. package/dist/cjs/card-sortable-list/index.js +426 -0
  28. package/dist/cjs/card-sortable-list/style.scss +48 -0
  29. package/dist/cjs/category-autocomplete/index.js +175 -155
  30. package/dist/cjs/color-picker/index.js +41 -23
  31. package/dist/cjs/color-picker/index.test.js +82 -0
  32. package/dist/cjs/color-picker/style.scss +11 -13
  33. package/dist/cjs/confirm-dialog/index.js +123 -0
  34. package/dist/cjs/consts.js +1 -1
  35. package/dist/cjs/custom-select-control/index.js +39 -28
  36. package/dist/cjs/dataviews/index.js +38 -0
  37. package/dist/cjs/dataviews/style.scss +9 -0
  38. package/dist/cjs/divider/index.js +47 -0
  39. package/dist/cjs/divider/style.scss +51 -0
  40. package/dist/cjs/footer/index.js +36 -30
  41. package/dist/cjs/form-token-field/index.js +51 -40
  42. package/dist/cjs/form-token-field/style.scss +0 -5
  43. package/dist/cjs/global-notices/index.js +5 -5
  44. package/dist/cjs/grid/index.js +25 -18
  45. package/dist/cjs/grid/style.scss +67 -8
  46. package/dist/cjs/handoff/index.js +204 -156
  47. package/dist/cjs/handoff-message/index.js +12 -7
  48. package/dist/cjs/hooks/index.js +10 -8
  49. package/dist/cjs/hooks/use-confirm-dialog.js +79 -0
  50. package/dist/cjs/hooks/use-unsaved-changes-dialog.js +144 -0
  51. package/dist/cjs/hooks/useObjectState.js +21 -12
  52. package/dist/cjs/hooks/useObjectState.test.js +55 -33
  53. package/dist/cjs/hooks/useOnClickOutside.js +6 -6
  54. package/dist/cjs/hooks/usePrompt.js +10 -13
  55. package/dist/cjs/image-upload/index.js +114 -123
  56. package/dist/cjs/image-upload/index.test.js +11 -13
  57. package/dist/cjs/image-upload/style.scss +12 -40
  58. package/dist/cjs/index.js +166 -92
  59. package/dist/cjs/info-button/index.js +43 -32
  60. package/dist/cjs/integration-icons/active-campaign.js +22 -0
  61. package/dist/cjs/integration-icons/constant-contact.js +28 -0
  62. package/dist/cjs/integration-icons/fundraise-up.js +25 -0
  63. package/dist/cjs/integration-icons/index.js +48 -0
  64. package/dist/cjs/integration-icons/mailchimp.js +19 -0
  65. package/dist/cjs/integration-icons/salesforce.js +17 -0
  66. package/dist/cjs/integration-icons/wisepops.js +20 -0
  67. package/dist/cjs/modal/index.js +29 -19
  68. package/dist/cjs/modal/style.scss +47 -13
  69. package/dist/cjs/newspack-icon/index.js +45 -38
  70. package/dist/cjs/newspack-icon/style.scss +5 -3
  71. package/dist/cjs/notice/index.js +64 -55
  72. package/dist/cjs/plugin-installer/index.js +259 -253
  73. package/dist/cjs/plugin-settings/SettingsSection.js +66 -60
  74. package/dist/cjs/plugin-settings/index.js +217 -200
  75. package/dist/cjs/plugin-toggle/index.js +192 -199
  76. package/dist/cjs/popover/index.js +41 -28
  77. package/dist/cjs/position-control/index.js +24 -23
  78. package/dist/cjs/progress-bar/index.js +71 -59
  79. package/dist/cjs/progress-bar/index.test.js +62 -68
  80. package/dist/cjs/proxied-imports/router.js +3 -3
  81. package/dist/cjs/radio-control/index.js +40 -27
  82. package/dist/cjs/section-header/index.js +143 -39
  83. package/dist/cjs/section-header/style.scss +129 -4
  84. package/dist/cjs/select-control/ButtonGroupControl.js +26 -21
  85. package/dist/cjs/select-control/GroupedSelectControl.js +41 -35
  86. package/dist/cjs/select-control/index.js +52 -40
  87. package/dist/cjs/settings/MinMaxSetting.js +30 -20
  88. package/dist/cjs/settings/SettingsCard.js +20 -17
  89. package/dist/cjs/settings/SettingsSection.js +22 -21
  90. package/dist/cjs/settings/index.js +5 -5
  91. package/dist/cjs/sortable-newsletter-list-control/index.js +78 -57
  92. package/dist/cjs/steps-list/index.js +44 -34
  93. package/dist/cjs/steps-list-item/index.js +47 -39
  94. package/dist/cjs/style-card/index.js +70 -63
  95. package/dist/cjs/style.scss +2 -0
  96. package/dist/cjs/tabbed-navigation/index.js +38 -36
  97. package/dist/cjs/text-control/index.js +27 -25
  98. package/dist/cjs/utils/color.js +4 -4
  99. package/dist/cjs/utils/editor-toolbar-back-button.js +61 -0
  100. package/dist/cjs/utils/index.js +31 -19
  101. package/dist/cjs/utils/style.scss +8 -0
  102. package/dist/cjs/waiting/index.js +48 -35
  103. package/dist/cjs/waiting/style.scss +4 -0
  104. package/dist/cjs/web-preview/index.js +219 -154
  105. package/dist/cjs/web-preview/style.scss +20 -53
  106. package/dist/cjs/with-wizard/index.js +362 -364
  107. package/dist/cjs/with-wizard/style.scss +28 -60
  108. package/dist/cjs/with-wizard-screen/index.js +54 -58
  109. package/dist/cjs/with-wizard-screen/style.scss +77 -10
  110. package/dist/cjs/wizard/components/WizardError.js +20 -18
  111. package/dist/cjs/wizard/components/WizardSnackbar.js +73 -0
  112. package/dist/cjs/wizard/components/style.scss +48 -0
  113. package/dist/cjs/wizard/index.js +207 -64
  114. package/dist/cjs/wizard/store/index.js +191 -97
  115. package/dist/cjs/wizard/store/utils.js +13 -8
  116. package/dist/esm/accordion/index.js +14 -9
  117. package/dist/esm/action-card/index.js +178 -124
  118. package/dist/esm/action-card/style.scss +25 -2
  119. package/dist/esm/autocomplete-tokenfield/index.js +248 -222
  120. package/dist/esm/autocomplete-with-latest-posts/index.js +347 -0
  121. package/dist/esm/autocomplete-with-latest-posts/style.scss +150 -0
  122. package/dist/esm/autocomplete-with-suggestions/index.js +226 -119
  123. package/dist/esm/badge/index.js +24 -0
  124. package/dist/esm/badge/style.scss +36 -0
  125. package/dist/esm/box-contrast/index.js +15 -11
  126. package/dist/esm/button/index.js +39 -19
  127. package/dist/esm/button-props/button-props.js +1 -1
  128. package/dist/esm/card/core-card.js +195 -0
  129. package/dist/esm/card/index.js +70 -22
  130. package/dist/esm/card/style-core.scss +295 -0
  131. package/dist/esm/card/style.scss +4 -4
  132. package/dist/esm/card-feature/index.js +131 -0
  133. package/dist/esm/card-feature/style.scss +75 -0
  134. package/dist/esm/card-form/index.js +134 -0
  135. package/dist/esm/card-form/style.scss +20 -0
  136. package/dist/esm/card-settings-group/index.js +61 -0
  137. package/dist/esm/card-settings-group/style.scss +33 -0
  138. package/dist/esm/card-sortable-list/index.js +425 -0
  139. package/dist/esm/card-sortable-list/style.scss +48 -0
  140. package/dist/esm/category-autocomplete/index.js +168 -140
  141. package/dist/esm/color-picker/index.js +39 -21
  142. package/dist/esm/color-picker/index.test.js +78 -0
  143. package/dist/esm/color-picker/style.scss +11 -13
  144. package/dist/esm/confirm-dialog/index.js +116 -0
  145. package/dist/esm/consts.js +1 -1
  146. package/dist/esm/custom-select-control/index.js +34 -15
  147. package/dist/esm/dataviews/index.js +34 -0
  148. package/dist/esm/dataviews/style.scss +9 -0
  149. package/dist/esm/divider/index.js +42 -0
  150. package/dist/esm/divider/style.scss +51 -0
  151. package/dist/esm/footer/index.js +34 -28
  152. package/dist/esm/form-token-field/index.js +46 -27
  153. package/dist/esm/form-token-field/style.scss +0 -5
  154. package/dist/esm/global-notices/index.js +3 -3
  155. package/dist/esm/grid/index.js +23 -13
  156. package/dist/esm/grid/style.scss +67 -8
  157. package/dist/esm/handoff/index.js +199 -143
  158. package/dist/esm/handoff-message/index.js +10 -6
  159. package/dist/esm/hooks/index.js +8 -6
  160. package/dist/esm/hooks/use-confirm-dialog.js +73 -0
  161. package/dist/esm/hooks/use-unsaved-changes-dialog.js +136 -0
  162. package/dist/esm/hooks/useObjectState.js +19 -9
  163. package/dist/esm/hooks/useObjectState.test.js +54 -32
  164. package/dist/esm/hooks/useOnClickOutside.js +4 -4
  165. package/dist/esm/hooks/usePrompt.js +9 -11
  166. package/dist/esm/image-upload/index.js +110 -111
  167. package/dist/esm/image-upload/index.test.js +11 -13
  168. package/dist/esm/image-upload/style.scss +12 -40
  169. package/dist/esm/index.js +13 -1
  170. package/dist/esm/info-button/index.js +38 -19
  171. package/dist/esm/integration-icons/active-campaign.js +16 -0
  172. package/dist/esm/integration-icons/constant-contact.js +22 -0
  173. package/dist/esm/integration-icons/fundraise-up.js +19 -0
  174. package/dist/esm/integration-icons/index.js +6 -0
  175. package/dist/esm/integration-icons/mailchimp.js +13 -0
  176. package/dist/esm/integration-icons/salesforce.js +11 -0
  177. package/dist/esm/integration-icons/wisepops.js +14 -0
  178. package/dist/esm/modal/index.js +27 -13
  179. package/dist/esm/modal/style.scss +47 -13
  180. package/dist/esm/newspack-icon/index.js +40 -25
  181. package/dist/esm/newspack-icon/style.scss +5 -3
  182. package/dist/esm/notice/index.js +59 -42
  183. package/dist/esm/plugin-installer/index.js +255 -243
  184. package/dist/esm/plugin-settings/SettingsSection.js +61 -50
  185. package/dist/esm/plugin-settings/index.js +212 -189
  186. package/dist/esm/plugin-toggle/index.js +187 -190
  187. package/dist/esm/popover/index.js +35 -16
  188. package/dist/esm/position-control/index.js +22 -18
  189. package/dist/esm/progress-bar/index.js +66 -49
  190. package/dist/esm/progress-bar/index.test.js +61 -67
  191. package/dist/esm/radio-control/index.js +34 -15
  192. package/dist/esm/section-header/index.js +140 -38
  193. package/dist/esm/section-header/style.scss +129 -4
  194. package/dist/esm/select-control/ButtonGroupControl.js +23 -18
  195. package/dist/esm/select-control/GroupedSelectControl.js +38 -30
  196. package/dist/esm/select-control/index.js +47 -27
  197. package/dist/esm/settings/MinMaxSetting.js +27 -16
  198. package/dist/esm/settings/SettingsCard.js +18 -13
  199. package/dist/esm/settings/SettingsSection.js +20 -19
  200. package/dist/esm/settings/index.js +3 -3
  201. package/dist/esm/sortable-newsletter-list-control/index.js +74 -53
  202. package/dist/esm/steps-list/index.js +39 -21
  203. package/dist/esm/steps-list-item/index.js +42 -26
  204. package/dist/esm/style-card/index.js +65 -50
  205. package/dist/esm/style.scss +2 -0
  206. package/dist/esm/tabbed-navigation/index.js +35 -33
  207. package/dist/esm/text-control/index.js +25 -19
  208. package/dist/esm/utils/color.js +4 -4
  209. package/dist/esm/utils/editor-toolbar-back-button.js +53 -0
  210. package/dist/esm/utils/index.js +29 -16
  211. package/dist/esm/utils/style.scss +8 -0
  212. package/dist/esm/waiting/index.js +43 -22
  213. package/dist/esm/waiting/style.scss +4 -0
  214. package/dist/esm/web-preview/index.js +218 -147
  215. package/dist/esm/web-preview/style.scss +20 -53
  216. package/dist/esm/with-wizard/index.js +360 -358
  217. package/dist/esm/with-wizard/style.scss +28 -60
  218. package/dist/esm/with-wizard-screen/index.js +48 -46
  219. package/dist/esm/with-wizard-screen/style.scss +77 -10
  220. package/dist/esm/wizard/components/WizardError.js +18 -16
  221. package/dist/esm/wizard/components/WizardSnackbar.js +70 -0
  222. package/dist/esm/wizard/components/style.scss +48 -0
  223. package/dist/esm/wizard/index.js +207 -58
  224. package/dist/esm/wizard/store/index.js +189 -90
  225. package/dist/esm/wizard/store/utils.js +13 -6
  226. package/package.json +30 -17
  227. package/release.config.js +1 -0
  228. package/shared/author-context.js +26 -0
  229. package/shared/hooks/use-coauthors.js +388 -0
  230. package/shared/hooks/use-coauthors.test.js +850 -0
  231. package/shared/hooks/use-custom-byline.js +47 -0
  232. package/shared/hooks/use-custom-byline.test.js +133 -0
  233. package/shared/scss/_mixins.scss +54 -0
  234. package/src/accordion/index.js +8 -7
  235. package/src/action-card/action-card.d.ts +7 -3
  236. package/src/action-card/index.js +39 -12
  237. package/src/action-card/style.scss +25 -2
  238. package/src/autocomplete-tokenfield/index.js +2 -2
  239. package/src/autocomplete-with-latest-posts/index.js +290 -0
  240. package/src/autocomplete-with-latest-posts/style.scss +150 -0
  241. package/src/badge/index.tsx +26 -0
  242. package/src/badge/style.scss +36 -0
  243. package/src/button/index.tsx +3 -2
  244. package/src/card/core-card.js +224 -0
  245. package/src/card/index.js +40 -1
  246. package/src/card/style-core.scss +295 -0
  247. package/src/card/style.scss +4 -4
  248. package/src/card-feature/README.md +188 -0
  249. package/src/card-feature/index.tsx +186 -0
  250. package/src/card-feature/style.scss +75 -0
  251. package/src/card-form/README.md +113 -0
  252. package/src/card-form/index.tsx +128 -0
  253. package/src/card-form/style.scss +20 -0
  254. package/src/card-settings-group/README.md +43 -0
  255. package/src/card-settings-group/index.tsx +78 -0
  256. package/src/card-settings-group/style.scss +33 -0
  257. package/src/card-sortable-list/README.md +51 -0
  258. package/src/card-sortable-list/index.tsx +435 -0
  259. package/src/card-sortable-list/style.scss +48 -0
  260. package/src/color-picker/index.js +15 -8
  261. package/src/color-picker/index.test.js +52 -0
  262. package/src/color-picker/style.scss +11 -13
  263. package/src/confirm-dialog/README.md +128 -0
  264. package/src/confirm-dialog/index.tsx +132 -0
  265. package/src/dataviews/index.tsx +34 -0
  266. package/src/dataviews/style.scss +9 -0
  267. package/src/divider/README.md +25 -0
  268. package/src/divider/index.js +31 -0
  269. package/src/divider/style.scss +51 -0
  270. package/src/form-token-field/style.scss +0 -5
  271. package/src/grid/index.tsx +2 -1
  272. package/src/grid/style.scss +67 -8
  273. package/src/handoff/README.md +93 -0
  274. package/src/handoff/index.js +46 -8
  275. package/src/hooks/index.ts +2 -1
  276. package/src/hooks/use-confirm-dialog.tsx +80 -0
  277. package/src/hooks/use-unsaved-changes-dialog.tsx +140 -0
  278. package/src/image-upload/index.js +10 -15
  279. package/src/image-upload/style.scss +12 -40
  280. package/src/index.js +13 -1
  281. package/src/integration-icons/active-campaign.js +14 -0
  282. package/src/integration-icons/constant-contact.js +22 -0
  283. package/src/integration-icons/fundraise-up.js +18 -0
  284. package/src/integration-icons/index.js +6 -0
  285. package/src/integration-icons/mailchimp.js +10 -0
  286. package/src/integration-icons/salesforce.js +10 -0
  287. package/src/integration-icons/wisepops.js +14 -0
  288. package/src/modal/index.js +12 -3
  289. package/src/modal/style.scss +47 -13
  290. package/src/newspack-icon/style.scss +5 -3
  291. package/src/plugin-installer/index.js +30 -19
  292. package/src/section-header/index.js +105 -14
  293. package/src/section-header/style.scss +129 -4
  294. package/src/select-control/index.js +4 -0
  295. package/src/style.scss +2 -0
  296. package/src/utils/editor-toolbar-back-button.tsx +48 -0
  297. package/src/utils/index.js +6 -0
  298. package/src/utils/style.scss +8 -0
  299. package/src/waiting/index.js +2 -1
  300. package/src/waiting/style.scss +4 -0
  301. package/src/web-preview/index.js +90 -35
  302. package/src/web-preview/style.scss +20 -53
  303. package/src/with-wizard/index.js +1 -1
  304. package/src/with-wizard/style.scss +28 -60
  305. package/src/with-wizard-screen/style.scss +77 -10
  306. package/src/wizard/components/WizardSnackbar.js +58 -0
  307. package/src/wizard/components/style.scss +48 -0
  308. package/src/wizard/index.js +152 -21
  309. package/src/wizard/store/index.js +28 -2
  310. package/dist/cjs/button-card/index.js +0 -72
  311. package/dist/cjs/button-card/style.scss +0 -180
  312. package/dist/esm/button-card/index.js +0 -64
  313. package/dist/esm/button-card/style.scss +0 -180
  314. package/src/button-card/index.js +0 -52
  315. package/src/button-card/style.scss +0 -180
@@ -4,34 +4,41 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports["default"] = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
8
10
  require("./style.scss");
9
11
  var _classnames = _interopRequireDefault(require("classnames"));
10
12
  var _jsxRuntime = require("react/jsx-runtime");
13
+ var _excluded = ["className", "borders", "columns", "gutter", "noMargin", "rowGap"];
11
14
  /**
12
15
  * Grid
13
16
  */
14
-
15
17
  /**
16
18
  * Internal dependencies
17
19
  */
18
-
19
20
  /**
20
21
  * External dependencies
21
22
  */
22
-
23
- const Grid = ({
24
- className = '',
25
- columns = 2,
26
- gutter = 32,
27
- noMargin = false,
28
- rowGap = 0,
29
- ...otherProps
30
- }) => {
31
- const classes = (0, _classnames.default)('newspack-grid', noMargin && 'newspack-grid--no-margin', columns && 'newspack-grid__columns-' + columns, gutter && 'newspack-grid__gutter-' + gutter, rowGap && 'newspack-grid__row-gap-' + rowGap, className);
32
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
33
- className: classes,
34
- ...otherProps
35
- });
23
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ var Grid = function Grid(_ref) {
26
+ var _ref$className = _ref.className,
27
+ className = _ref$className === void 0 ? '' : _ref$className,
28
+ _ref$borders = _ref.borders,
29
+ borders = _ref$borders === void 0 ? false : _ref$borders,
30
+ _ref$columns = _ref.columns,
31
+ columns = _ref$columns === void 0 ? 2 : _ref$columns,
32
+ _ref$gutter = _ref.gutter,
33
+ gutter = _ref$gutter === void 0 ? 32 : _ref$gutter,
34
+ _ref$noMargin = _ref.noMargin,
35
+ noMargin = _ref$noMargin === void 0 ? false : _ref$noMargin,
36
+ _ref$rowGap = _ref.rowGap,
37
+ rowGap = _ref$rowGap === void 0 ? 0 : _ref$rowGap,
38
+ otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
39
+ var classes = (0, _classnames["default"])('newspack-grid', borders && 'newspack-grid__borders', noMargin && 'newspack-grid--no-margin', columns && 'newspack-grid__columns-' + columns, gutter && 'newspack-grid__gutter-' + gutter, rowGap && 'newspack-grid__row-gap-' + rowGap, className);
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread({
41
+ className: classes
42
+ }, otherProps));
36
43
  };
37
- var _default = exports.default = Grid;
44
+ var _default = exports["default"] = Grid;
@@ -13,7 +13,7 @@
13
13
 
14
14
  // No Margin
15
15
  &--no-margin {
16
- margin: 0;
16
+ margin: 0 !important;
17
17
  }
18
18
 
19
19
  // Gutter 0
@@ -41,6 +41,11 @@
41
41
  grid-gap: 32px;
42
42
  }
43
43
 
44
+ // Gutter 64
45
+ &__gutter-64 {
46
+ grid-gap: 64px;
47
+ }
48
+
44
49
  // Row Gap 0
45
50
  &__row-gap-0 {
46
51
  grid-row-gap: 0;
@@ -61,11 +66,6 @@
61
66
  grid-row-gap: 32px;
62
67
  }
63
68
 
64
- // Gutter 64
65
- &__gutter-64 {
66
- grid-gap: 64px;
67
- }
68
-
69
69
  // Columns 6
70
70
  &__columns-6 {
71
71
  grid-template-columns: repeat(2, 1fr);
@@ -77,6 +77,14 @@
77
77
  &__columns-3,
78
78
  &__columns-4 {
79
79
  grid-template-columns: repeat(2, 1fr);
80
+
81
+ > [start] {
82
+ grid-column-start: 1;
83
+ }
84
+
85
+ > [end] {
86
+ grid-column-end: -1;
87
+ }
80
88
  }
81
89
 
82
90
  &__columns-6 {
@@ -84,8 +92,8 @@
84
92
  }
85
93
  }
86
94
 
87
- // Media Queries - 1128px
88
- @media screen and ( min-width: 1128px ) {
95
+ // Media Queries - 1054px
96
+ @media screen and ( min-width: 1054px ) {
89
97
  // Columns 3
90
98
  &__columns-3 {
91
99
  grid-template-columns: repeat(3, 1fr);
@@ -94,6 +102,14 @@
94
102
  // Columns 4
95
103
  &__columns-4 {
96
104
  grid-template-columns: repeat(4, 1fr);
105
+
106
+ > [start="2"] {
107
+ grid-column-start: 2;
108
+ }
109
+
110
+ > [end="4"] {
111
+ grid-column-end: 4;
112
+ }
97
113
  }
98
114
 
99
115
  // Columns 6
@@ -101,6 +117,11 @@
101
117
  grid-template-columns: repeat(6, 1fr);
102
118
  }
103
119
 
120
+ // Columns 12
121
+ &__columns-12 {
122
+ grid-template-columns: repeat(12, 1fr);
123
+ }
124
+
104
125
  // Gutter 48
105
126
  &__gutter-48 {
106
127
  grid-gap: 48px;
@@ -116,6 +137,44 @@
116
137
  > * {
117
138
  margin-bottom: 0 !important;
118
139
  margin-top: 0 !important;
140
+ > h1:first-child,
141
+ > h2:first-child,
142
+ > h3:first-child,
143
+ > h4:first-child,
144
+ > h5:first-child,
145
+ > h6:first-child {
146
+ margin-top: 0;
147
+ }
148
+ }
149
+
150
+ // Borders
151
+ &__borders {
152
+ grid-gap: 0 !important;
153
+ > * {
154
+ border-bottom: 1px solid wp-colors.$gray-300;
155
+ &:last-child {
156
+ border-bottom: none;
157
+ }
158
+ @media screen and ( min-width: 744px ) {
159
+ border-bottom: none;
160
+ border-right: 1px solid wp-colors.$gray-300;
161
+ &:last-child {
162
+ border-right: none;
163
+ }
164
+ }
165
+ }
166
+ &.newspack-grid__gutter-8 > * {
167
+ padding: 8px;
168
+ }
169
+ &.newspack-grid__gutter-16 > * {
170
+ padding: 16px;
171
+ }
172
+ &.newspack-grid__gutter-32 > * {
173
+ padding: 32px;
174
+ }
175
+ &.newspack-grid__gutter-64 > * {
176
+ padding: 64px;
177
+ }
119
178
  }
120
179
 
121
180
  .components-base-control {
@@ -4,7 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports["default"] = void 0;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
15
  var _apiFetch = _interopRequireDefault(require("@wordpress/api-fetch"));
9
16
  var _element = require("@wordpress/element");
10
17
  var _i18n = require("@wordpress/i18n");
@@ -12,172 +19,213 @@ var _ = require("../");
12
19
  var _assign = _interopRequireDefault(require("lodash/assign"));
13
20
  var _classnames = _interopRequireDefault(require("classnames"));
14
21
  var _jsxRuntime = require("react/jsx-runtime");
15
- /**
22
+ var _excluded = ["className", "children", "compact", "useModal", "modalTitle", "modalBody", "onReady", "editLink", "bannerText", "bannerButtonText", "url"];
23
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
26
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
16
27
  * Handoff
17
- */
18
-
19
- /**
28
+ */ /**
20
29
  * WordPress dependencies.
21
- */
22
-
23
- /**
30
+ */ /**
24
31
  * Internal dependencies.
25
- */
26
-
27
- /**
32
+ */ /**
28
33
  * External dependencies.
29
34
  */
30
-
31
- class Handoff extends _element.Component {
32
- constructor() {
33
- super(...arguments);
34
- this.state = {
35
+ var Handoff = /*#__PURE__*/function (_Component) {
36
+ function Handoff() {
37
+ var _this;
38
+ (0, _classCallCheck2["default"])(this, Handoff);
39
+ _this = _callSuper(this, Handoff, arguments);
40
+ (0, _defineProperty2["default"])(_this, "componentDidMount", function () {
41
+ _this._isMounted = true;
42
+ var _this$props = _this.props,
43
+ plugin = _this$props.plugin,
44
+ url = _this$props.url;
45
+ if (plugin && !url) {
46
+ _this.retrievePluginInfo(plugin);
47
+ }
48
+ });
49
+ (0, _defineProperty2["default"])(_this, "componentWillUnmount", function () {
50
+ _this._isMounted = false;
51
+ });
52
+ (0, _defineProperty2["default"])(_this, "retrievePluginInfo", function (plugin) {
53
+ var onReady = _this.props.onReady;
54
+ (0, _apiFetch["default"])({
55
+ path: '/newspack/v1/plugins/' + plugin
56
+ }).then(function (pluginInfo) {
57
+ if (_this._isMounted) {
58
+ onReady(pluginInfo);
59
+ _this.setState({
60
+ pluginInfo: pluginInfo
61
+ });
62
+ }
63
+ });
64
+ });
65
+ (0, _defineProperty2["default"])(_this, "textForPlugin", function (pluginInfo) {
66
+ var defaults = {
67
+ modalBody: null,
68
+ modalTitle: pluginInfo.Name && "".concat((0, _i18n.__)('Manage', 'newspack-plugin'), " ").concat(pluginInfo.Name),
69
+ primaryButton: pluginInfo.Name && "".concat((0, _i18n.__)('Manage', 'newspack-plugin'), " ").concat(pluginInfo.Name),
70
+ primaryModalButton: (0, _i18n.__)('Manage', 'newspack-plugin'),
71
+ dismissModalButton: (0, _i18n.__)('Dismiss', 'newspack-plugin')
72
+ };
73
+ return (0, _assign["default"])(defaults, _this.props);
74
+ });
75
+ (0, _defineProperty2["default"])(_this, "goToUrl", function () {
76
+ var _this$props2 = _this.props,
77
+ url = _this$props2.url,
78
+ showOnBlockEditor = _this$props2.showOnBlockEditor,
79
+ bannerText = _this$props2.bannerText,
80
+ bannerButtonText = _this$props2.bannerButtonText;
81
+ (0, _apiFetch["default"])({
82
+ path: '/newspack/v1/handoff',
83
+ method: 'POST',
84
+ data: {
85
+ destinationUrl: url,
86
+ handoffReturnUrl: window && window.location.href,
87
+ showOnBlockEditor: showOnBlockEditor ? true : false,
88
+ bannerText: bannerText,
89
+ bannerButtonText: bannerButtonText
90
+ }
91
+ }).then(function (response) {
92
+ window.location.href = response.HandoffLink;
93
+ });
94
+ });
95
+ (0, _defineProperty2["default"])(_this, "goToPlugin", function (plugin) {
96
+ var _this$props3 = _this.props,
97
+ editLink = _this$props3.editLink,
98
+ showOnBlockEditor = _this$props3.showOnBlockEditor,
99
+ bannerText = _this$props3.bannerText,
100
+ bannerButtonText = _this$props3.bannerButtonText;
101
+ (0, _apiFetch["default"])({
102
+ path: '/newspack/v1/plugins/' + plugin + '/handoff',
103
+ method: 'POST',
104
+ data: {
105
+ editLink: editLink,
106
+ handoffReturnUrl: window && window.location.href,
107
+ showOnBlockEditor: showOnBlockEditor ? true : false,
108
+ bannerText: bannerText,
109
+ bannerButtonText: bannerButtonText
110
+ }
111
+ }).then(function (response) {
112
+ window.location.href = response.HandoffLink;
113
+ });
114
+ });
115
+ _this.state = {
35
116
  pluginInfo: [],
36
117
  showModal: false
37
118
  };
119
+ return _this;
38
120
  }
39
- componentDidMount = () => {
40
- this._isMounted = true;
41
- const {
42
- plugin
43
- } = this.props;
44
- this.retrievePluginInfo(plugin);
45
- };
46
- componentWillUnmount = () => {
47
- this._isMounted = false;
48
- };
49
- retrievePluginInfo = plugin => {
50
- const {
51
- onReady
52
- } = this.props;
53
- (0, _apiFetch.default)({
54
- path: '/newspack/v1/plugins/' + plugin
55
- }).then(pluginInfo => {
56
- if (this._isMounted) {
57
- onReady(pluginInfo);
58
- this.setState({
59
- pluginInfo
60
- });
61
- }
62
- });
63
- };
64
- textForPlugin = pluginInfo => {
65
- const defaults = {
66
- modalBody: null,
67
- modalTitle: pluginInfo.Name && `${(0, _i18n.__)('Manage', 'newspack-plugin')} ${pluginInfo.Name}`,
68
- primaryButton: pluginInfo.Name && `${(0, _i18n.__)('Manage', 'newspack-plugin')} ${pluginInfo.Name}`,
69
- primaryModalButton: (0, _i18n.__)('Manage', 'newspack-plugin'),
70
- dismissModalButton: (0, _i18n.__)('Dismiss', 'newspack-plugin')
71
- };
72
- return (0, _assign.default)(defaults, this.props);
73
- };
74
- goToPlugin = plugin => {
75
- const {
76
- editLink,
77
- showOnBlockEditor
78
- } = this.props;
79
- (0, _apiFetch.default)({
80
- path: '/newspack/v1/plugins/' + plugin + '/handoff',
81
- method: 'POST',
82
- data: {
83
- editLink,
84
- handoffReturnUrl: window && window.location.href,
85
- showOnBlockEditor: showOnBlockEditor ? true : false
86
- }
87
- }).then(response => {
88
- window.location.href = response.HandoffLink;
89
- });
90
- };
91
-
92
- /**
93
- * Render.
94
- */
95
- render() {
96
- const {
97
- className,
98
- children,
99
- compact,
100
- useModal,
101
- // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
102
- modalTitle: _modalTitle,
103
- // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
104
- modalBody: _modalBody,
105
- // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
106
- onReady,
107
- // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
108
- editLink,
109
- ...otherProps
110
- } = this.props;
111
- const {
112
- pluginInfo,
113
- showModal
114
- } = this.state;
115
- const {
116
- modalBody,
117
- modalTitle,
118
- primaryButton,
119
- primaryModalButton,
120
- dismissModalButton
121
- } = this.textForPlugin(pluginInfo);
122
- const {
123
- Configured,
124
- Name,
125
- Slug,
126
- Status
127
- } = pluginInfo;
128
- const classes = (0, _classnames.default)(Configured && 'is-configured', className);
129
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_element.Fragment, {
130
- children: [Name && 'active' === Status && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
131
- className: classes,
132
- isSecondary: !otherProps.isPrimary && !otherProps.isTertiary && !otherProps.isLink,
133
- ...otherProps,
134
- onClick: () => useModal ? this.setState({
135
- showModal: true
136
- }) : this.goToPlugin(Slug),
137
- children: children ? children : primaryButton
138
- }), Name && 'active' !== Status && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
139
- className: classes,
140
- variant: "secondary",
141
- disabled: true,
142
- ...otherProps,
143
- children: Name + (0, _i18n.__)(' not installed', 'newspack-plugin')
144
- }), !Name && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
145
- className: classes,
146
- isSecondary: !otherProps.isPrimary && !otherProps.isTertiary && !otherProps.isLink,
147
- ...otherProps,
148
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_element.Fragment, {
149
- children: [!compact && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Waiting, {
150
- isLeft: true
151
- }), (0, _i18n.__)('Retrieving Plugin Info', 'newspack-plugin')]
152
- })
153
- }), showModal && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Modal, {
154
- title: modalTitle,
155
- onRequestClose: () => this.setState({
156
- showModal: false
157
- }),
158
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
159
- children: modalBody
160
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Card, {
161
- buttonsCard: true,
162
- noBorder: true,
163
- className: "justify-end",
164
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
165
- variant: "secondary",
166
- onClick: () => this.setState({
121
+ (0, _inherits2["default"])(Handoff, _Component);
122
+ return (0, _createClass2["default"])(Handoff, [{
123
+ key: "render",
124
+ value:
125
+ /**
126
+ * Render.
127
+ */
128
+ function render() {
129
+ var _this2 = this;
130
+ var _this$props4 = this.props,
131
+ className = _this$props4.className,
132
+ children = _this$props4.children,
133
+ compact = _this$props4.compact,
134
+ useModal = _this$props4.useModal,
135
+ _modalTitle = _this$props4.modalTitle,
136
+ _modalBody = _this$props4.modalBody,
137
+ onReady = _this$props4.onReady,
138
+ editLink = _this$props4.editLink,
139
+ bannerText = _this$props4.bannerText,
140
+ bannerButtonText = _this$props4.bannerButtonText,
141
+ url = _this$props4.url,
142
+ otherProps = (0, _objectWithoutProperties2["default"])(_this$props4, _excluded);
143
+ var _this$state = this.state,
144
+ pluginInfo = _this$state.pluginInfo,
145
+ showModal = _this$state.showModal;
146
+ var _this$textForPlugin = this.textForPlugin(pluginInfo),
147
+ modalBody = _this$textForPlugin.modalBody,
148
+ modalTitle = _this$textForPlugin.modalTitle,
149
+ primaryButton = _this$textForPlugin.primaryButton,
150
+ primaryModalButton = _this$textForPlugin.primaryModalButton,
151
+ dismissModalButton = _this$textForPlugin.dismissModalButton;
152
+ var Configured = pluginInfo.Configured,
153
+ Name = pluginInfo.Name,
154
+ Slug = pluginInfo.Slug,
155
+ Status = pluginInfo.Status;
156
+ var classes = (0, _classnames["default"])(Configured && 'is-configured', className);
157
+ var goTo = function goTo() {
158
+ return url ? _this2.goToUrl() : _this2.goToPlugin(Slug);
159
+ };
160
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_element.Fragment, {
161
+ children: [url && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, _objectSpread(_objectSpread({
162
+ className: classes,
163
+ isSecondary: !otherProps.isPrimary && !otherProps.isTertiary && !otherProps.isLink
164
+ }, otherProps), {}, {
165
+ onClick: function onClick() {
166
+ return useModal && children ? _this2.setState({
167
+ showModal: true
168
+ }) : goTo();
169
+ },
170
+ children: children ? children : primaryButton
171
+ })), !url && Name && 'active' === Status && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, _objectSpread(_objectSpread({
172
+ className: classes,
173
+ isSecondary: !otherProps.isPrimary && !otherProps.isTertiary && !otherProps.isLink
174
+ }, otherProps), {}, {
175
+ onClick: function onClick() {
176
+ return useModal ? _this2.setState({
177
+ showModal: true
178
+ }) : goTo();
179
+ },
180
+ children: children ? children : primaryButton
181
+ })), !url && Name && 'active' !== Status && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, _objectSpread(_objectSpread({
182
+ className: classes,
183
+ variant: "secondary",
184
+ disabled: true
185
+ }, otherProps), {}, {
186
+ children: Name + (0, _i18n.__)(' not installed', 'newspack-plugin')
187
+ })), !url && !Name && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, _objectSpread(_objectSpread({
188
+ className: classes,
189
+ isSecondary: !otherProps.isPrimary && !otherProps.isTertiary && !otherProps.isLink
190
+ }, otherProps), {}, {
191
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_element.Fragment, {
192
+ children: [!compact && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Waiting, {
193
+ isLeft: true
194
+ }), (0, _i18n.__)('Retrieving Plugin Info', 'newspack-plugin')]
195
+ })
196
+ })), showModal && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Modal, {
197
+ title: modalTitle,
198
+ onRequestClose: function onRequestClose() {
199
+ return _this2.setState({
167
200
  showModal: false
168
- }),
169
- children: dismissModalButton
170
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
171
- variant: "primary",
172
- onClick: () => this.goToPlugin(Slug),
173
- children: primaryModalButton
201
+ });
202
+ },
203
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
204
+ children: modalBody
205
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Card, {
206
+ buttonsCard: true,
207
+ noBorder: true,
208
+ className: "justify-end",
209
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
210
+ variant: "secondary",
211
+ onClick: function onClick() {
212
+ return _this2.setState({
213
+ showModal: false
214
+ });
215
+ },
216
+ children: dismissModalButton
217
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
218
+ variant: "primary",
219
+ onClick: goTo,
220
+ children: primaryModalButton
221
+ })]
174
222
  })]
175
223
  })]
176
- })]
177
- });
178
- }
179
- }
224
+ });
225
+ }
226
+ }]);
227
+ }(_element.Component);
180
228
  Handoff.defaultProps = {
181
- onReady: () => {}
229
+ onReady: function onReady() {}
182
230
  };
183
- var _default = exports.default = Handoff;
231
+ var _default = exports["default"] = Handoff;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.default = HandoffMessage;
7
+ exports["default"] = HandoffMessage;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
7
9
  var _element = require("@wordpress/element");
8
10
  var _consts = require("../consts");
9
11
  var _ = require("../");
@@ -19,19 +21,22 @@ var _jsxRuntime = require("react/jsx-runtime");
19
21
  /**
20
22
  * Handoff Message Component.
21
23
  */function HandoffMessage() {
22
- const [handoffMessage, setHandoffMessage] = (0, _element.useState)(false);
23
- (0, _element.useEffect)(() => {
24
+ var _useState = (0, _element.useState)(false),
25
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
26
+ handoffMessage = _useState2[0],
27
+ setHandoffMessage = _useState2[1];
28
+ (0, _element.useEffect)(function () {
24
29
  // Slight delay to allow for localStorage to be updated by RAS component.
25
- setTimeout(() => {
26
- const handoff = JSON.parse(localStorage.getItem(_consts.HANDOFF_KEY));
27
- if (handoff?.message) {
30
+ setTimeout(function () {
31
+ var handoff = JSON.parse(localStorage.getItem(_consts.HANDOFF_KEY));
32
+ if (handoff !== null && handoff !== void 0 && handoff.message) {
28
33
  setHandoffMessage(handoff.message);
29
34
  } else {
30
35
  setHandoffMessage(false);
31
36
  }
32
37
 
33
38
  // Clean up the notification if navigating away from the relevant page.
34
- if (handoff?.url && -1 === window.location.href.indexOf(handoff.url)) {
39
+ if (handoff !== null && handoff !== void 0 && handoff.url && -1 === window.location.href.indexOf(handoff.url)) {
35
40
  window.localStorage.removeItem(_consts.HANDOFF_KEY);
36
41
  setHandoffMessage(false);
37
42
  }
@@ -4,22 +4,24 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports["default"] = void 0;
8
8
  var _element = require("@wordpress/element");
9
9
  var _usePrompt = _interopRequireDefault(require("./usePrompt"));
10
10
  var _useObjectState = _interopRequireDefault(require("./useObjectState"));
11
11
  var _useOnClickOutside = _interopRequireDefault(require("./useOnClickOutside"));
12
+ var _useConfirmDialog = _interopRequireDefault(require("./use-confirm-dialog"));
12
13
  /**
13
14
  * WordPress dependencies
14
15
  */
15
16
 
16
- const useUniqueId = prefix => {
17
- const id = (0, _element.useRef)(`${prefix}-${Math.round(Math.random() * 99999)}`);
17
+ var useUniqueId = function useUniqueId(prefix) {
18
+ var id = (0, _element.useRef)("".concat(prefix, "-").concat(Math.round(Math.random() * 99999)));
18
19
  return id.current;
19
20
  };
20
- var _default = exports.default = {
21
- usePrompt: _usePrompt.default,
22
- useObjectState: _useObjectState.default,
23
- useOnClickOutside: _useOnClickOutside.default,
24
- useUniqueId
21
+ var _default = exports["default"] = {
22
+ usePrompt: _usePrompt["default"],
23
+ useObjectState: _useObjectState["default"],
24
+ useOnClickOutside: _useOnClickOutside["default"],
25
+ useUniqueId: useUniqueId,
26
+ useConfirmDialog: _useConfirmDialog["default"]
25
27
  };