@automattic/onboarding 1.0.0 → 1.0.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 (547) hide show
  1. package/.storybook/index.scss +16 -0
  2. package/.storybook/main.ts +15 -0
  3. package/.storybook/preview.ts +5 -0
  4. package/CHANGELOG.md +5 -0
  5. package/dist/cjs/action-buttons/index.js +1 -13
  6. package/dist/cjs/action-buttons/index.js.map +1 -1
  7. package/dist/cjs/action-buttons/style.scss +4 -40
  8. package/dist/cjs/cart/create-cart-manager-client.js +3 -3
  9. package/dist/cjs/cart/create-cart-manager-client.js.map +1 -1
  10. package/dist/cjs/cart/index.js +45 -67
  11. package/dist/cjs/cart/index.js.map +1 -1
  12. package/dist/cjs/confetti/index.js +1 -1
  13. package/dist/cjs/confetti/index.js.map +1 -1
  14. package/dist/cjs/flow-progress/use-flow-progress.js +0 -57
  15. package/dist/cjs/flow-progress/use-flow-progress.js.map +1 -1
  16. package/dist/cjs/hooks/use-persisted-state.js +61 -0
  17. package/dist/cjs/hooks/use-persisted-state.js.map +1 -0
  18. package/dist/cjs/hooray/index.js +1 -1
  19. package/dist/cjs/index.js +11 -10
  20. package/dist/cjs/index.js.map +1 -1
  21. package/dist/cjs/mshots-image/index.js +34 -15
  22. package/dist/cjs/mshots-image/index.js.map +1 -1
  23. package/dist/cjs/mshots-image/style.scss +1 -0
  24. package/dist/cjs/navigator/hooks/index.js +2 -1
  25. package/dist/cjs/navigator/hooks/index.js.map +1 -1
  26. package/dist/cjs/navigator/navigator-buttons/index.js +2 -2
  27. package/dist/cjs/navigator/navigator-buttons/index.js.map +1 -1
  28. package/dist/cjs/navigator/navigator-header/index.js.map +1 -1
  29. package/dist/cjs/navigator/navigator-screens/hooks/index.js +3 -2
  30. package/dist/cjs/navigator/navigator-screens/hooks/index.js.map +1 -1
  31. package/dist/cjs/navigator/navigator-screens/hooks/use-navigator-screens.js +1 -1
  32. package/dist/cjs/navigator/navigator-screens/hooks/use-navigator-screens.js.map +1 -1
  33. package/dist/cjs/navigator/navigator-screens/navigator-screens.js +7 -2
  34. package/dist/cjs/navigator/navigator-screens/navigator-screens.js.map +1 -1
  35. package/dist/cjs/select-card-checkbox/index.js +4 -3
  36. package/dist/cjs/select-card-checkbox/index.js.map +1 -1
  37. package/dist/cjs/select-card-checkbox/style.scss +11 -14
  38. package/dist/cjs/select-card-checkbox-v2/index.js +15 -0
  39. package/dist/cjs/select-card-checkbox-v2/index.js.map +1 -0
  40. package/dist/cjs/select-card-checkbox-v2/style.scss +25 -0
  41. package/dist/cjs/select-items/index.js +2 -1
  42. package/dist/cjs/select-items/index.js.map +1 -1
  43. package/dist/cjs/select-items/style.scss +2 -1
  44. package/dist/cjs/setup-tailored-site-after-creation.js +9 -37
  45. package/dist/cjs/setup-tailored-site-after-creation.js.map +1 -1
  46. package/dist/cjs/step-container/index.js +10 -12
  47. package/dist/cjs/step-container/index.js.map +1 -1
  48. package/dist/cjs/step-container/style.scss +35 -77
  49. package/dist/cjs/step-container-v2/components/ContentRow/ContentRow.js +14 -0
  50. package/dist/cjs/step-container-v2/components/ContentRow/ContentRow.js.map +1 -0
  51. package/dist/cjs/step-container-v2/components/ContentRow/style.scss +26 -0
  52. package/dist/cjs/step-container-v2/components/ContentWrapper/ContentWrapper.js +19 -0
  53. package/dist/cjs/step-container-v2/components/ContentWrapper/ContentWrapper.js.map +1 -0
  54. package/dist/cjs/step-container-v2/components/ContentWrapper/style.scss +70 -0
  55. package/dist/cjs/step-container-v2/components/Heading/Heading.js +17 -0
  56. package/dist/cjs/step-container-v2/components/Heading/Heading.js.map +1 -0
  57. package/dist/cjs/step-container-v2/components/Heading/style.scss +47 -0
  58. package/dist/cjs/step-container-v2/components/StepContainerV2/StepContainerV2.js +36 -0
  59. package/dist/cjs/step-container-v2/components/StepContainerV2/StepContainerV2.js.map +1 -0
  60. package/dist/cjs/step-container-v2/components/StepContainerV2/context.js +13 -0
  61. package/dist/cjs/step-container-v2/components/StepContainerV2/context.js.map +1 -0
  62. package/dist/cjs/step-container-v2/components/StepContainerV2/style.scss +21 -0
  63. package/dist/cjs/step-container-v2/components/StepCounter/StepCounter.js +17 -0
  64. package/dist/cjs/step-container-v2/components/StepCounter/StepCounter.js.map +1 -0
  65. package/dist/cjs/step-container-v2/components/StepCounter/style.scss +4 -0
  66. package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBar.js +17 -0
  67. package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBar.js.map +1 -0
  68. package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js +31 -0
  69. package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js.map +1 -0
  70. package/dist/cjs/step-container-v2/components/StickyBottomBar/style.scss +56 -0
  71. package/dist/cjs/step-container-v2/components/TopBar/TopBar.js +55 -0
  72. package/dist/cjs/step-container-v2/components/TopBar/TopBar.js.map +1 -0
  73. package/dist/cjs/step-container-v2/components/TopBar/TopBarRenderer.js +32 -0
  74. package/dist/cjs/step-container-v2/components/TopBar/TopBarRenderer.js.map +1 -0
  75. package/dist/cjs/step-container-v2/components/TopBar/style.scss +75 -0
  76. package/dist/cjs/step-container-v2/components/buttons/BackButton/BackButton.js +29 -0
  77. package/dist/cjs/step-container-v2/components/buttons/BackButton/BackButton.js.map +1 -0
  78. package/dist/cjs/step-container-v2/components/buttons/BackButton/style.scss +16 -0
  79. package/dist/cjs/step-container-v2/components/buttons/LinkButton/LinkButton.js +18 -0
  80. package/dist/cjs/step-container-v2/components/buttons/LinkButton/LinkButton.js.map +1 -0
  81. package/dist/cjs/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
  82. package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js +18 -0
  83. package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js.map +1 -0
  84. package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
  85. package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js +18 -0
  86. package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js.map +1 -0
  87. package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
  88. package/dist/cjs/step-container-v2/components/buttons/SkipButton/SkipButton.js +28 -0
  89. package/dist/cjs/step-container-v2/components/buttons/SkipButton/SkipButton.js.map +1 -0
  90. package/dist/cjs/step-container-v2/contexts/StepContainerV2Context.js +17 -0
  91. package/dist/cjs/step-container-v2/contexts/StepContainerV2Context.js.map +1 -0
  92. package/dist/cjs/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js +18 -0
  93. package/dist/cjs/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js.map +1 -0
  94. package/dist/cjs/step-container-v2/helpers/normalizeButtonProps.js +13 -0
  95. package/dist/cjs/step-container-v2/helpers/normalizeButtonProps.js.map +1 -0
  96. package/dist/cjs/step-container-v2/helpers/wireframe-placeholder.js +18 -0
  97. package/dist/cjs/step-container-v2/helpers/wireframe-placeholder.js.map +1 -0
  98. package/dist/cjs/step-container-v2/helpers/withStepContainerV2ContextDecorator.js +15 -0
  99. package/dist/cjs/step-container-v2/helpers/withStepContainerV2ContextDecorator.js.map +1 -0
  100. package/dist/cjs/step-container-v2/index.js +41 -0
  101. package/dist/cjs/step-container-v2/index.js.map +1 -0
  102. package/dist/cjs/step-container-v2/types.js +3 -0
  103. package/dist/cjs/step-container-v2/types.js.map +1 -0
  104. package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js +26 -0
  105. package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map +1 -0
  106. package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js +52 -0
  107. package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js.map +1 -0
  108. package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js +26 -0
  109. package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js.map +1 -0
  110. package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js +25 -0
  111. package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js.map +1 -0
  112. package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
  113. package/dist/cjs/step-container-v2/wireframes/Loading/Loading.js +30 -0
  114. package/dist/cjs/step-container-v2/wireframes/Loading/Loading.js.map +1 -0
  115. package/dist/cjs/step-container-v2/wireframes/Loading/Loading.stories.js +29 -0
  116. package/dist/cjs/step-container-v2/wireframes/Loading/Loading.stories.js.map +1 -0
  117. package/dist/cjs/step-container-v2/wireframes/Loading/style.scss +22 -0
  118. package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js +17 -0
  119. package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js.map +1 -0
  120. package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js +17 -0
  121. package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map +1 -0
  122. package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
  123. package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js +38 -0
  124. package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js.map +1 -0
  125. package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js +28 -0
  126. package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js.map +1 -0
  127. package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
  128. package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.js +17 -0
  129. package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.js.map +1 -0
  130. package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.stories.js +41 -0
  131. package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.stories.js.map +1 -0
  132. package/dist/cjs/step-navigation-link/index.js +2 -2
  133. package/dist/cjs/step-navigation-link/index.js.map +1 -1
  134. package/dist/cjs/step-navigation-link/style.scss +5 -3
  135. package/dist/cjs/titles/styles.scss +2 -2
  136. package/dist/cjs/upload-and-set-site-logo.js +4 -5
  137. package/dist/cjs/upload-and-set-site-logo.js.map +1 -1
  138. package/dist/cjs/utils/contrastChecker.js +1 -22
  139. package/dist/cjs/utils/contrastChecker.js.map +1 -1
  140. package/dist/cjs/utils/flows.js +73 -117
  141. package/dist/cjs/utils/flows.js.map +1 -1
  142. package/dist/cjs/utils/is-domain.js +1 -2
  143. package/dist/cjs/utils/is-domain.js.map +1 -1
  144. package/dist/cjs/utils/use-data-loss-warning.js +1 -2
  145. package/dist/cjs/utils/use-data-loss-warning.js.map +1 -1
  146. package/dist/cjs/wpcom-request.js +24 -0
  147. package/dist/cjs/wpcom-request.js.map +1 -0
  148. package/dist/esm/action-buttons/index.js +1 -11
  149. package/dist/esm/action-buttons/index.js.map +1 -1
  150. package/dist/esm/action-buttons/style.scss +4 -40
  151. package/dist/esm/cart/create-cart-manager-client.js +1 -1
  152. package/dist/esm/cart/create-cart-manager-client.js.map +1 -1
  153. package/dist/esm/cart/index.js +40 -61
  154. package/dist/esm/cart/index.js.map +1 -1
  155. package/dist/esm/confetti/index.js +1 -1
  156. package/dist/esm/confetti/index.js.map +1 -1
  157. package/dist/esm/flow-progress/use-flow-progress.js +1 -58
  158. package/dist/esm/flow-progress/use-flow-progress.js.map +1 -1
  159. package/dist/esm/hooks/use-persisted-state.js +57 -0
  160. package/dist/esm/hooks/use-persisted-state.js.map +1 -0
  161. package/dist/esm/hooray/index.js +1 -1
  162. package/dist/esm/index.js +6 -5
  163. package/dist/esm/index.js.map +1 -1
  164. package/dist/esm/mshots-image/index.js +33 -13
  165. package/dist/esm/mshots-image/index.js.map +1 -1
  166. package/dist/esm/mshots-image/style.scss +1 -0
  167. package/dist/esm/navigator/navigator-buttons/index.js.map +1 -1
  168. package/dist/esm/navigator/navigator-header/index.js.map +1 -1
  169. package/dist/esm/navigator/navigator-screens/hooks/use-navigator-screens.js +1 -1
  170. package/dist/esm/navigator/navigator-screens/hooks/use-navigator-screens.js.map +1 -1
  171. package/dist/esm/navigator/navigator-screens/navigator-screens.js +8 -3
  172. package/dist/esm/navigator/navigator-screens/navigator-screens.js.map +1 -1
  173. package/dist/esm/select-card-checkbox/index.js +4 -3
  174. package/dist/esm/select-card-checkbox/index.js.map +1 -1
  175. package/dist/esm/select-card-checkbox/style.scss +11 -14
  176. package/dist/esm/select-card-checkbox-v2/index.js +12 -0
  177. package/dist/esm/select-card-checkbox-v2/index.js.map +1 -0
  178. package/dist/esm/select-card-checkbox-v2/style.scss +25 -0
  179. package/dist/esm/select-items/index.js +3 -2
  180. package/dist/esm/select-items/index.js.map +1 -1
  181. package/dist/esm/select-items/style.scss +2 -1
  182. package/dist/esm/setup-tailored-site-after-creation.js +9 -37
  183. package/dist/esm/setup-tailored-site-after-creation.js.map +1 -1
  184. package/dist/esm/step-container/index.js +11 -13
  185. package/dist/esm/step-container/index.js.map +1 -1
  186. package/dist/esm/step-container/style.scss +35 -77
  187. package/dist/esm/step-container-v2/components/ContentRow/ContentRow.js +9 -0
  188. package/dist/esm/step-container-v2/components/ContentRow/ContentRow.js.map +1 -0
  189. package/dist/esm/step-container-v2/components/ContentRow/style.scss +26 -0
  190. package/dist/esm/step-container-v2/components/ContentWrapper/ContentWrapper.js +14 -0
  191. package/dist/esm/step-container-v2/components/ContentWrapper/ContentWrapper.js.map +1 -0
  192. package/dist/esm/step-container-v2/components/ContentWrapper/style.scss +70 -0
  193. package/dist/esm/step-container-v2/components/Heading/Heading.js +12 -0
  194. package/dist/esm/step-container-v2/components/Heading/Heading.js.map +1 -0
  195. package/dist/esm/step-container-v2/components/Heading/style.scss +47 -0
  196. package/dist/esm/step-container-v2/components/StepContainerV2/StepContainerV2.js +32 -0
  197. package/dist/esm/step-container-v2/components/StepContainerV2/StepContainerV2.js.map +1 -0
  198. package/dist/esm/step-container-v2/components/StepContainerV2/context.js +10 -0
  199. package/dist/esm/step-container-v2/components/StepContainerV2/context.js.map +1 -0
  200. package/dist/esm/step-container-v2/components/StepContainerV2/style.scss +21 -0
  201. package/dist/esm/step-container-v2/components/StepCounter/StepCounter.js +13 -0
  202. package/dist/esm/step-container-v2/components/StepCounter/StepCounter.js.map +1 -0
  203. package/dist/esm/step-container-v2/components/StepCounter/style.scss +4 -0
  204. package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBar.js +12 -0
  205. package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBar.js.map +1 -0
  206. package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js +27 -0
  207. package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js.map +1 -0
  208. package/dist/esm/step-container-v2/components/StickyBottomBar/style.scss +56 -0
  209. package/dist/esm/step-container-v2/components/TopBar/TopBar.js +49 -0
  210. package/dist/esm/step-container-v2/components/TopBar/TopBar.js.map +1 -0
  211. package/dist/esm/step-container-v2/components/TopBar/TopBarRenderer.js +27 -0
  212. package/dist/esm/step-container-v2/components/TopBar/TopBarRenderer.js.map +1 -0
  213. package/dist/esm/step-container-v2/components/TopBar/style.scss +75 -0
  214. package/dist/esm/step-container-v2/components/buttons/BackButton/BackButton.js +25 -0
  215. package/dist/esm/step-container-v2/components/buttons/BackButton/BackButton.js.map +1 -0
  216. package/dist/esm/step-container-v2/components/buttons/BackButton/style.scss +16 -0
  217. package/dist/esm/step-container-v2/components/buttons/LinkButton/LinkButton.js +14 -0
  218. package/dist/esm/step-container-v2/components/buttons/LinkButton/LinkButton.js.map +1 -0
  219. package/dist/esm/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
  220. package/dist/esm/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js +14 -0
  221. package/dist/esm/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js.map +1 -0
  222. package/dist/esm/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
  223. package/dist/esm/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js +14 -0
  224. package/dist/esm/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js.map +1 -0
  225. package/dist/esm/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
  226. package/dist/esm/step-container-v2/components/buttons/SkipButton/SkipButton.js +24 -0
  227. package/dist/esm/step-container-v2/components/buttons/SkipButton/SkipButton.js.map +1 -0
  228. package/dist/esm/step-container-v2/contexts/StepContainerV2Context.js +13 -0
  229. package/dist/esm/step-container-v2/contexts/StepContainerV2Context.js.map +1 -0
  230. package/dist/esm/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js +14 -0
  231. package/dist/esm/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js.map +1 -0
  232. package/dist/esm/step-container-v2/helpers/normalizeButtonProps.js +8 -0
  233. package/dist/esm/step-container-v2/helpers/normalizeButtonProps.js.map +1 -0
  234. package/dist/esm/step-container-v2/helpers/wireframe-placeholder.js +15 -0
  235. package/dist/esm/step-container-v2/helpers/wireframe-placeholder.js.map +1 -0
  236. package/dist/esm/step-container-v2/helpers/withStepContainerV2ContextDecorator.js +11 -0
  237. package/dist/esm/step-container-v2/helpers/withStepContainerV2ContextDecorator.js.map +1 -0
  238. package/dist/esm/step-container-v2/index.js +22 -0
  239. package/dist/esm/step-container-v2/index.js.map +1 -0
  240. package/dist/esm/step-container-v2/types.js +2 -0
  241. package/dist/esm/step-container-v2/types.js.map +1 -0
  242. package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js +22 -0
  243. package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map +1 -0
  244. package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js +45 -0
  245. package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js.map +1 -0
  246. package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js +23 -0
  247. package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js.map +1 -0
  248. package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js +21 -0
  249. package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js.map +1 -0
  250. package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
  251. package/dist/esm/step-container-v2/wireframes/Loading/Loading.js +26 -0
  252. package/dist/esm/step-container-v2/wireframes/Loading/Loading.js.map +1 -0
  253. package/dist/esm/step-container-v2/wireframes/Loading/Loading.stories.js +22 -0
  254. package/dist/esm/step-container-v2/wireframes/Loading/Loading.stories.js.map +1 -0
  255. package/dist/esm/step-container-v2/wireframes/Loading/style.scss +22 -0
  256. package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js +12 -0
  257. package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js.map +1 -0
  258. package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js +13 -0
  259. package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map +1 -0
  260. package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
  261. package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js +33 -0
  262. package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js.map +1 -0
  263. package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js +22 -0
  264. package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js.map +1 -0
  265. package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
  266. package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.js +13 -0
  267. package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.js.map +1 -0
  268. package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.stories.js +36 -0
  269. package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.stories.js.map +1 -0
  270. package/dist/esm/step-navigation-link/index.js +2 -2
  271. package/dist/esm/step-navigation-link/index.js.map +1 -1
  272. package/dist/esm/step-navigation-link/style.scss +5 -3
  273. package/dist/esm/titles/styles.scss +2 -2
  274. package/dist/esm/upload-and-set-site-logo.js +1 -1
  275. package/dist/esm/upload-and-set-site-logo.js.map +1 -1
  276. package/dist/esm/utils/contrastChecker.js +0 -20
  277. package/dist/esm/utils/contrastChecker.js.map +1 -1
  278. package/dist/esm/utils/flows.js +57 -96
  279. package/dist/esm/utils/flows.js.map +1 -1
  280. package/dist/esm/wpcom-request.js +18 -0
  281. package/dist/esm/wpcom-request.js.map +1 -0
  282. package/dist/styles/mixins.scss +4 -4
  283. package/dist/styles/variables.scss +2 -2
  284. package/dist/tsconfig-cjs.tsbuildinfo +1 -1
  285. package/dist/tsconfig.tsbuildinfo +1 -1
  286. package/dist/types/action-buttons/index.d.ts +0 -4
  287. package/dist/types/action-buttons/index.d.ts.map +1 -1
  288. package/dist/types/cart/index.d.ts +7 -4
  289. package/dist/types/cart/index.d.ts.map +1 -1
  290. package/dist/types/flow-progress/use-flow-progress.d.ts.map +1 -1
  291. package/dist/types/hooks/use-persisted-state.d.ts +26 -0
  292. package/dist/types/hooks/use-persisted-state.d.ts.map +1 -0
  293. package/dist/types/index.d.ts +6 -5
  294. package/dist/types/index.d.ts.map +1 -1
  295. package/dist/types/intent-screen/index.d.ts.map +1 -1
  296. package/dist/types/mshots-image/index.d.ts +2 -1
  297. package/dist/types/mshots-image/index.d.ts.map +1 -1
  298. package/dist/types/navigator/hooks/use-navigator-listener.d.ts.map +1 -1
  299. package/dist/types/navigator/navigator-buttons/index.d.ts +1 -1
  300. package/dist/types/navigator/navigator-buttons/index.d.ts.map +1 -1
  301. package/dist/types/navigator/navigator-header/index.d.ts +1 -1
  302. package/dist/types/navigator/navigator-header/index.d.ts.map +1 -1
  303. package/dist/types/navigator/navigator-item-group/index.d.ts +0 -1
  304. package/dist/types/navigator/navigator-item-group/index.d.ts.map +1 -1
  305. package/dist/types/navigator/navigator-listener/index.d.ts.map +1 -1
  306. package/dist/types/navigator/navigator-screen/index.d.ts.map +1 -1
  307. package/dist/types/navigator/navigator-screens/hooks/use-navigator-buttons.d.ts.map +1 -1
  308. package/dist/types/navigator/navigator-screens/hooks/use-navigator-screens.d.ts.map +1 -1
  309. package/dist/types/navigator/navigator-screens/navigator-screens.d.ts +4 -2
  310. package/dist/types/navigator/navigator-screens/navigator-screens.d.ts.map +1 -1
  311. package/dist/types/navigator/navigator-screens/types.d.ts +1 -1
  312. package/dist/types/navigator/navigator-screens/types.d.ts.map +1 -1
  313. package/dist/types/progress/index.d.ts.map +1 -1
  314. package/dist/types/select-card-checkbox/index.d.ts +3 -1
  315. package/dist/types/select-card-checkbox/index.d.ts.map +1 -1
  316. package/dist/types/select-card-checkbox-v2/index.d.ts +12 -0
  317. package/dist/types/select-card-checkbox-v2/index.d.ts.map +1 -0
  318. package/dist/types/select-items/index.d.ts +1 -1
  319. package/dist/types/select-items/index.d.ts.map +1 -1
  320. package/dist/types/setup-tailored-site-after-creation.d.ts +1 -1
  321. package/dist/types/setup-tailored-site-after-creation.d.ts.map +1 -1
  322. package/dist/types/step-container/index.d.ts +3 -4
  323. package/dist/types/step-container/index.d.ts.map +1 -1
  324. package/dist/types/step-container-v2/components/ContentRow/ContentRow.d.ts +9 -0
  325. package/dist/types/step-container-v2/components/ContentRow/ContentRow.d.ts.map +1 -0
  326. package/dist/types/step-container-v2/components/ContentWrapper/ContentWrapper.d.ts +15 -0
  327. package/dist/types/step-container-v2/components/ContentWrapper/ContentWrapper.d.ts.map +1 -0
  328. package/dist/types/step-container-v2/components/Heading/Heading.d.ts +11 -0
  329. package/dist/types/step-container-v2/components/Heading/Heading.d.ts.map +1 -0
  330. package/dist/types/step-container-v2/components/StepContainerV2/StepContainerV2.d.ts +7 -0
  331. package/dist/types/step-container-v2/components/StepContainerV2/StepContainerV2.d.ts.map +1 -0
  332. package/dist/types/step-container-v2/components/StepContainerV2/context.d.ts +12 -0
  333. package/dist/types/step-container-v2/components/StepContainerV2/context.d.ts.map +1 -0
  334. package/dist/types/step-container-v2/components/StepCounter/StepCounter.d.ts +7 -0
  335. package/dist/types/step-container-v2/components/StepCounter/StepCounter.d.ts.map +1 -0
  336. package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBar.d.ts +14 -0
  337. package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBar.d.ts.map +1 -0
  338. package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.d.ts +5 -0
  339. package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.d.ts.map +1 -0
  340. package/dist/types/step-container-v2/components/TopBar/TopBar.d.ts +25 -0
  341. package/dist/types/step-container-v2/components/TopBar/TopBar.d.ts.map +1 -0
  342. package/dist/types/step-container-v2/components/TopBar/TopBarRenderer.d.ts +6 -0
  343. package/dist/types/step-container-v2/components/TopBar/TopBarRenderer.d.ts.map +1 -0
  344. package/dist/types/step-container-v2/components/buttons/BackButton/BackButton.d.ts +6 -0
  345. package/dist/types/step-container-v2/components/buttons/BackButton/BackButton.d.ts.map +1 -0
  346. package/dist/types/step-container-v2/components/buttons/LinkButton/LinkButton.d.ts +4 -0
  347. package/dist/types/step-container-v2/components/buttons/LinkButton/LinkButton.d.ts.map +1 -0
  348. package/dist/types/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.d.ts +4 -0
  349. package/dist/types/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.d.ts.map +1 -0
  350. package/dist/types/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.d.ts +4 -0
  351. package/dist/types/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.d.ts.map +1 -0
  352. package/dist/types/step-container-v2/components/buttons/SkipButton/SkipButton.d.ts +9 -0
  353. package/dist/types/step-container-v2/components/buttons/SkipButton/SkipButton.d.ts.map +1 -0
  354. package/dist/types/step-container-v2/contexts/StepContainerV2Context.d.ts +10 -0
  355. package/dist/types/step-container-v2/contexts/StepContainerV2Context.d.ts.map +1 -0
  356. package/dist/types/step-container-v2/helpers/decorateButtonWithTracksEventRecording.d.ts +8 -0
  357. package/dist/types/step-container-v2/helpers/decorateButtonWithTracksEventRecording.d.ts.map +1 -0
  358. package/dist/types/step-container-v2/helpers/normalizeButtonProps.d.ts +5 -0
  359. package/dist/types/step-container-v2/helpers/normalizeButtonProps.d.ts.map +1 -0
  360. package/dist/types/step-container-v2/helpers/wireframe-placeholder.d.ts +7 -0
  361. package/dist/types/step-container-v2/helpers/wireframe-placeholder.d.ts.map +1 -0
  362. package/dist/types/step-container-v2/helpers/withStepContainerV2ContextDecorator.d.ts +2 -0
  363. package/dist/types/step-container-v2/helpers/withStepContainerV2ContextDecorator.d.ts.map +1 -0
  364. package/dist/types/step-container-v2/index.d.ts +22 -0
  365. package/dist/types/step-container-v2/index.d.ts.map +1 -0
  366. package/dist/types/step-container-v2/types.d.ts +4 -0
  367. package/dist/types/step-container-v2/types.d.ts.map +1 -0
  368. package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.d.ts +16 -0
  369. package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.d.ts.map +1 -0
  370. package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.d.ts +9 -0
  371. package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.d.ts.map +1 -0
  372. package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.d.ts +18 -0
  373. package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.d.ts.map +1 -0
  374. package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.d.ts +6 -0
  375. package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.d.ts.map +1 -0
  376. package/dist/types/step-container-v2/wireframes/Loading/Loading.d.ts +12 -0
  377. package/dist/types/step-container-v2/wireframes/Loading/Loading.d.ts.map +1 -0
  378. package/dist/types/step-container-v2/wireframes/Loading/Loading.stories.d.ts +9 -0
  379. package/dist/types/step-container-v2/wireframes/Loading/Loading.stories.d.ts.map +1 -0
  380. package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.d.ts +10 -0
  381. package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.d.ts.map +1 -0
  382. package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.d.ts +6 -0
  383. package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.d.ts.map +1 -0
  384. package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.d.ts +20 -0
  385. package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.d.ts.map +1 -0
  386. package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.d.ts +8 -0
  387. package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.d.ts.map +1 -0
  388. package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.d.ts +13 -0
  389. package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.d.ts.map +1 -0
  390. package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.stories.d.ts +9 -0
  391. package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.stories.d.ts.map +1 -0
  392. package/dist/types/step-navigation-link/index.d.ts +1 -1
  393. package/dist/types/step-navigation-link/index.d.ts.map +1 -1
  394. package/dist/types/upload-and-set-site-logo.d.ts +1 -1
  395. package/dist/types/upload-and-set-site-logo.d.ts.map +1 -1
  396. package/dist/types/utils/contrastChecker.d.ts +0 -10
  397. package/dist/types/utils/contrastChecker.d.ts.map +1 -1
  398. package/dist/types/utils/domain-suggester.d.ts.map +1 -1
  399. package/dist/types/utils/flows.d.ts +37 -46
  400. package/dist/types/utils/flows.d.ts.map +1 -1
  401. package/dist/types/wpcom-request.d.ts +7 -0
  402. package/dist/types/wpcom-request.d.ts.map +1 -0
  403. package/jest.config.js +0 -1
  404. package/package.json +44 -23
  405. package/src/action-buttons/index.tsx +0 -40
  406. package/src/action-buttons/style.scss +4 -40
  407. package/src/cart/create-cart-manager-client.ts +1 -1
  408. package/src/cart/index.tsx +60 -103
  409. package/src/cart/test/index.ts +14 -14
  410. package/src/confetti/index.tsx +1 -1
  411. package/src/flow-progress/use-flow-progress.ts +1 -66
  412. package/src/hooks/test/index.ts +54 -0
  413. package/src/hooks/use-persisted-state.ts +85 -0
  414. package/src/hooray/index.tsx +1 -1
  415. package/src/index.ts +7 -12
  416. package/src/intent-screen/test/index.tsx +10 -7
  417. package/src/mshots-image/index.tsx +52 -21
  418. package/src/mshots-image/style.scss +1 -0
  419. package/src/navigator/navigator-buttons/index.tsx +1 -0
  420. package/src/navigator/navigator-header/index.tsx +1 -0
  421. package/src/navigator/navigator-screens/hooks/use-navigator-screens.tsx +5 -1
  422. package/src/navigator/navigator-screens/navigator-screens.tsx +17 -0
  423. package/src/navigator/navigator-screens/types.ts +1 -0
  424. package/src/select-card-checkbox/index.tsx +10 -4
  425. package/src/select-card-checkbox/style.scss +11 -14
  426. package/src/select-card-checkbox-v2/index.tsx +51 -0
  427. package/src/select-card-checkbox-v2/style.scss +25 -0
  428. package/src/select-card-checkbox-v2/test/index.test.tsx +49 -0
  429. package/src/select-items/index.tsx +10 -4
  430. package/src/select-items/style.scss +2 -1
  431. package/src/setup-tailored-site-after-creation.ts +16 -60
  432. package/src/step-container/index.tsx +21 -42
  433. package/src/step-container/style.scss +35 -77
  434. package/src/step-container-v2/README.md +235 -0
  435. package/src/step-container-v2/components/ContentRow/ContentRow.tsx +27 -0
  436. package/src/step-container-v2/components/ContentRow/style.scss +26 -0
  437. package/src/step-container-v2/components/ContentWrapper/ContentWrapper.tsx +41 -0
  438. package/src/step-container-v2/components/ContentWrapper/style.scss +70 -0
  439. package/src/step-container-v2/components/Heading/Heading.tsx +31 -0
  440. package/src/step-container-v2/components/Heading/style.scss +47 -0
  441. package/src/step-container-v2/components/StepContainerV2/StepContainerV2.tsx +55 -0
  442. package/src/step-container-v2/components/StepContainerV2/context.ts +25 -0
  443. package/src/step-container-v2/components/StepContainerV2/style.scss +21 -0
  444. package/src/step-container-v2/components/StepCounter/StepCounter.tsx +32 -0
  445. package/src/step-container-v2/components/StepCounter/style.scss +4 -0
  446. package/src/step-container-v2/components/StickyBottomBar/StickyBottomBar.tsx +46 -0
  447. package/src/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.tsx +41 -0
  448. package/src/step-container-v2/components/StickyBottomBar/style.scss +56 -0
  449. package/src/step-container-v2/components/TopBar/TopBar.tsx +116 -0
  450. package/src/step-container-v2/components/TopBar/TopBarRenderer.tsx +43 -0
  451. package/src/step-container-v2/components/TopBar/style.scss +75 -0
  452. package/src/step-container-v2/components/buttons/BackButton/BackButton.tsx +32 -0
  453. package/src/step-container-v2/components/buttons/BackButton/style.scss +16 -0
  454. package/src/step-container-v2/components/buttons/LinkButton/LinkButton.tsx +17 -0
  455. package/src/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
  456. package/src/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.tsx +17 -0
  457. package/src/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
  458. package/src/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.tsx +17 -0
  459. package/src/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
  460. package/src/step-container-v2/components/buttons/SkipButton/SkipButton.tsx +30 -0
  461. package/src/step-container-v2/contexts/StepContainerV2Context.ts +23 -0
  462. package/src/step-container-v2/helpers/decorateButtonWithTracksEventRecording.ts +28 -0
  463. package/src/step-container-v2/helpers/normalizeButtonProps.ts +14 -0
  464. package/src/step-container-v2/helpers/wireframe-placeholder.tsx +28 -0
  465. package/src/step-container-v2/helpers/withStepContainerV2ContextDecorator.tsx +16 -0
  466. package/src/step-container-v2/index.tsx +24 -0
  467. package/src/step-container-v2/types.ts +4 -0
  468. package/src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.tsx +122 -0
  469. package/src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.tsx +66 -0
  470. package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.tsx +51 -0
  471. package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.tsx +69 -0
  472. package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
  473. package/src/step-container-v2/wireframes/Loading/Loading.stories.tsx +27 -0
  474. package/src/step-container-v2/wireframes/Loading/Loading.tsx +52 -0
  475. package/src/step-container-v2/wireframes/Loading/style.scss +22 -0
  476. package/src/step-container-v2/wireframes/Loading/test/Loading.test.tsx +42 -0
  477. package/src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.tsx +21 -0
  478. package/src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.tsx +31 -0
  479. package/src/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
  480. package/src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.tsx +93 -0
  481. package/src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.tsx +93 -0
  482. package/src/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
  483. package/src/step-container-v2/wireframes/WideLayout/WideLayout.stories.tsx +83 -0
  484. package/src/step-container-v2/wireframes/WideLayout/WideLayout.tsx +44 -0
  485. package/src/step-navigation-link/index.tsx +3 -0
  486. package/src/step-navigation-link/style.scss +5 -3
  487. package/src/style-imports.d.ts +3 -0
  488. package/src/titles/styles.scss +2 -2
  489. package/src/upload-and-set-site-logo.ts +1 -1
  490. package/src/utils/contrastChecker.ts +0 -35
  491. package/src/utils/flows.ts +67 -123
  492. package/src/wpcom-request.ts +26 -0
  493. package/styles/mixins.scss +4 -4
  494. package/styles/variables.scss +2 -2
  495. package/tsconfig.json +1 -0
  496. package/dist/cjs/feature-icon/index.js +0 -19
  497. package/dist/cjs/feature-icon/index.js.map +0 -1
  498. package/dist/cjs/flow-progress/index.js +0 -14
  499. package/dist/cjs/flow-progress/index.js.map +0 -1
  500. package/dist/cjs/flow-progress/style.scss +0 -5
  501. package/dist/cjs/notice/index.js +0 -12
  502. package/dist/cjs/notice/index.js.map +0 -1
  503. package/dist/cjs/notice/style.scss +0 -19
  504. package/dist/cjs/select-card-radio/index.js +0 -21
  505. package/dist/cjs/select-card-radio/index.js.map +0 -1
  506. package/dist/cjs/select-card-radio/style.scss +0 -44
  507. package/dist/cjs/sensei-logo/index.js +0 -8
  508. package/dist/cjs/sensei-logo/index.js.map +0 -1
  509. package/dist/cjs/videopress-logo/index.js +0 -8
  510. package/dist/cjs/videopress-logo/index.js.map +0 -1
  511. package/dist/esm/feature-icon/index.js +0 -16
  512. package/dist/esm/feature-icon/index.js.map +0 -1
  513. package/dist/esm/flow-progress/index.js +0 -12
  514. package/dist/esm/flow-progress/index.js.map +0 -1
  515. package/dist/esm/flow-progress/style.scss +0 -5
  516. package/dist/esm/notice/index.js +0 -9
  517. package/dist/esm/notice/index.js.map +0 -1
  518. package/dist/esm/notice/style.scss +0 -19
  519. package/dist/esm/select-card-radio/index.js +0 -15
  520. package/dist/esm/select-card-radio/index.js.map +0 -1
  521. package/dist/esm/select-card-radio/style.scss +0 -44
  522. package/dist/esm/sensei-logo/index.js +0 -6
  523. package/dist/esm/sensei-logo/index.js.map +0 -1
  524. package/dist/esm/videopress-logo/index.js +0 -6
  525. package/dist/esm/videopress-logo/index.js.map +0 -1
  526. package/dist/types/feature-icon/index.d.ts +0 -9
  527. package/dist/types/feature-icon/index.d.ts.map +0 -1
  528. package/dist/types/flow-progress/index.d.ts +0 -9
  529. package/dist/types/flow-progress/index.d.ts.map +0 -1
  530. package/dist/types/notice/index.d.ts +0 -7
  531. package/dist/types/notice/index.d.ts.map +0 -1
  532. package/dist/types/select-card-radio/index.d.ts +0 -22
  533. package/dist/types/select-card-radio/index.d.ts.map +0 -1
  534. package/dist/types/sensei-logo/index.d.ts +0 -8
  535. package/dist/types/sensei-logo/index.d.ts.map +0 -1
  536. package/dist/types/videopress-logo/index.d.ts +0 -8
  537. package/dist/types/videopress-logo/index.d.ts.map +0 -1
  538. package/src/feature-icon/index.tsx +0 -102
  539. package/src/flow-progress/index.tsx +0 -22
  540. package/src/flow-progress/style.scss +0 -5
  541. package/src/notice/index.tsx +0 -16
  542. package/src/notice/style.scss +0 -19
  543. package/src/select-card-radio/index.tsx +0 -64
  544. package/src/select-card-radio/style.scss +0 -44
  545. package/src/select-card-radio/test/index.tsx +0 -50
  546. package/src/sensei-logo/index.tsx +0 -30
  547. package/src/videopress-logo/index.tsx +0 -36
@@ -0,0 +1,7 @@
1
+ import { type WpcomRequestParams } from 'wpcom-proxy-request';
2
+ type WpcomRequester = <T>(params: WpcomRequestParams) => Promise<T>;
3
+ export declare function setRequester(requester: WpcomRequester): void;
4
+ export default function wpcomRequest<T>(params: WpcomRequestParams): Promise<T>;
5
+ export declare function canAccessWpcomApis(): boolean;
6
+ export {};
7
+ //# sourceMappingURL=wpcom-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wpcom-request.d.ts","sourceRoot":"","sources":["../../src/wpcom-request.ts"],"names":[],"mappings":"AAAA,OAA0B,EACzB,KAAK,kBAAkB,EAEvB,MAAM,qBAAqB,CAAC;AAE7B,KAAK,cAAc,GAAG,CAAE,CAAC,EAAI,MAAM,EAAE,kBAAkB,KAAM,OAAO,CAAE,CAAC,CAAE,CAAC;AAI1E,wBAAgB,YAAY,CAAE,SAAS,EAAE,cAAc,GAAI,IAAI,CAE9D;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,CAAC,EAAI,MAAM,EAAE,kBAAkB,GAAI,OAAO,CAAE,CAAC,CAAE,CAKpF;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAK5C"}
package/jest.config.js CHANGED
@@ -1,5 +1,4 @@
1
1
  module.exports = {
2
2
  preset: '../../test/packages/jest-preset.js',
3
3
  testEnvironment: 'jsdom',
4
- transformIgnorePatterns: [ 'node_modules/(?!gridicons)(?!.*\\.svg)' ],
5
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/onboarding",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Onboarding components for WordPress.com.",
5
5
  "homepage": "https://github.com/Automattic/wp-calypso",
6
6
  "license": "GPL-2.0-or-later",
@@ -8,6 +8,20 @@
8
8
  "main": "dist/cjs/index.js",
9
9
  "module": "dist/esm/index.js",
10
10
  "calypso:src": "src/index.ts",
11
+ "exports": {
12
+ ".": {
13
+ "calypso:src": "./src/index.ts",
14
+ "types": "./dist/types/index.d.ts",
15
+ "import": "./dist/esm/index.js",
16
+ "require": "./dist/cjs/index.js"
17
+ },
18
+ "./src/*": {
19
+ "calypso:src": "./src/*"
20
+ },
21
+ "./styles/*": {
22
+ "calypso:src": "./styles/*"
23
+ }
24
+ },
11
25
  "sideEffects": [
12
26
  "*.css",
13
27
  "*.scss"
@@ -26,38 +40,45 @@
26
40
  "clean": "tsc --build ./tsconfig.json ./tsconfig-cjs.json --clean && rm -rf dist",
27
41
  "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json && yarn run -T copy-assets && npx copyfiles ./styles/** dist",
28
42
  "prepack": "yarn run clean && yarn run build",
29
- "watch": "tsc --build ./tsconfig.json --watch"
43
+ "watch": "tsc --build ./tsconfig.json --watch",
44
+ "storybook:start": "storybook dev"
30
45
  },
31
46
  "dependencies": {
32
47
  "@automattic/calypso-config": "^1.0.0-alpha.0",
33
- "@automattic/components": "^2.1.1",
34
- "@automattic/data-stores": "^3.0.1",
35
- "@wordpress/components": "^28.2.0",
36
- "@wordpress/data": "^10.2.0",
37
- "@wordpress/icons": "^10.2.0",
38
- "@wordpress/react-i18n": "^4.2.0",
48
+ "@automattic/components": "^3.0.4",
49
+ "@automattic/data-stores": "^3.2.1",
50
+ "@automattic/domain-search": "^1.0.1",
51
+ "@wordpress/components": "^35.0.0",
52
+ "@wordpress/data": "^10.48.0",
53
+ "@wordpress/icons": "^13.3.0",
54
+ "@wordpress/react-i18n": "^4.48.0",
39
55
  "clsx": "^2.1.1",
40
- "react-router-dom": "^6.23.1",
41
- "tslib": "^2.5.0",
42
- "wpcom-proxy-request": "^7.0.5"
56
+ "react-router-dom": "6.30.4",
57
+ "tslib": "^2.8.1",
58
+ "wpcom-proxy-request": "^7.0.7"
43
59
  },
44
60
  "devDependencies": {
61
+ "@automattic/calypso-storybook": "^1.0.1",
45
62
  "@automattic/calypso-typescript-config": "^1.0.0",
46
63
  "@automattic/typography": "^1.0.0",
47
- "@testing-library/react": "^15.0.7",
48
- "@wordpress/base-styles": "^5.2.0",
49
- "copyfiles": "^2.3.0",
50
- "css-loader": "^3.6.0",
51
- "react": "^18.2.0",
52
- "react-dom": "^18.2.0",
53
- "redux": "^4.2.1",
54
- "sass-loader": "^10.1.1",
64
+ "@automattic/viewport": "^1.1.1",
65
+ "@storybook/addon-a11y": "^9.1.20",
66
+ "@testing-library/dom": "^10.4.1",
67
+ "@testing-library/react": "^16.3.2",
68
+ "@wordpress/base-styles": "^9.1.0",
69
+ "copyfiles": "^2.4.1",
70
+ "css-loader": "^6.11.0",
71
+ "react": "^18.3.1",
72
+ "react-dom": "^18.3.1",
73
+ "redux": "^5.0.1",
74
+ "sass-loader": "^14.2.1",
75
+ "storybook": "^9.1.20",
55
76
  "style-loader": "^1.3.0",
56
- "typescript": "^5.3.3",
57
- "webpack": "^5.91.0"
77
+ "typescript": "^6.0.3",
78
+ "webpack": "^5.99.8"
58
79
  },
59
80
  "peerDependencies": {
60
- "@wordpress/i18n": "^5.2.0",
61
- "react": "^18.2.0"
81
+ "@wordpress/i18n": "^6.21.0",
82
+ "react": "^18.3.1 || ^19.0.0"
62
83
  }
63
84
  }
@@ -1,5 +1,4 @@
1
1
  import { Button } from '@wordpress/components';
2
- import { Icon, chevronRight, chevronLeft } from '@wordpress/icons';
3
2
  import { useI18n } from '@wordpress/react-i18n';
4
3
  import clsx from 'clsx';
5
4
  import * as React from 'react';
@@ -72,42 +71,3 @@ export const NextButton: React.FunctionComponent< React.ComponentProps< typeof B
72
71
  </Button>
73
72
  );
74
73
  };
75
-
76
- export const SkipButton: React.FunctionComponent< React.ComponentProps< typeof Button > > = ( {
77
- className,
78
- children,
79
- ...buttonProps
80
- } ) => {
81
- const { __ } = useI18n();
82
-
83
- return (
84
- <Button
85
- className={ clsx( 'action_buttons__button action-buttons__skip', className ) }
86
- { ...buttonProps }
87
- >
88
- { children ||
89
- /* translators: Button label for skipping a step in onboarding */
90
- __( 'Skip for now', __i18n_text_domain__ ) }
91
- </Button>
92
- );
93
- };
94
-
95
- export const ArrowButton: React.FunctionComponent<
96
- React.ComponentProps< typeof Button > & {
97
- arrow: 'left' | 'right';
98
- }
99
- > = ( { className, children, arrow = 'right', ...buttonProps } ) => {
100
- return (
101
- <Button
102
- className={ clsx(
103
- `action_buttons__button action-buttons__arrow action-buttons__arrow--${ arrow }`,
104
- className
105
- ) }
106
- { ...buttonProps }
107
- >
108
- { arrow === 'left' && <Icon icon={ chevronLeft } /> }
109
- { children }
110
- { arrow === 'right' && <Icon icon={ chevronRight } /> }
111
- </Button>
112
- );
113
- };
@@ -1,6 +1,6 @@
1
- @import "../../styles/variables.scss";
2
- @import "../../styles/mixins.scss";
3
- @import "../../styles/z-index.scss";
1
+ @import "../../styles/variables";
2
+ @import "../../styles/mixins";
3
+ @import "../../styles/z-index";
4
4
 
5
5
  .action-buttons {
6
6
  padding: 0 20px;
@@ -21,6 +21,7 @@
21
21
  margin-left: 20px;
22
22
  position: static;
23
23
  border: none;
24
+ z-index: initial;
24
25
 
25
26
  .action_buttons__button {
26
27
  margin-left: 20px;
@@ -65,43 +66,6 @@ button.action_buttons__button.components-button {
65
66
  height: auto;
66
67
  }
67
68
 
68
- &.action-buttons__skip {
69
- color: var(--studio-gray-50);
70
- box-shadow: inset 0 0 0 1px var(--studio-gray-50);
71
-
72
- &:active,
73
- &:hover {
74
- color: var(--studio-gray-60);
75
- box-shadow: inset 0 0 0 1px var(--studio-gray-60);
76
- }
77
-
78
- &:focus {
79
- color: var(--studio-gray-60);
80
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.5px var(--highlightColor);
81
- }
82
- }
83
-
84
- &.action-buttons__arrow {
85
- justify-content: flex-start;
86
-
87
- text-decoration: underline;
88
- font-weight: 600;
89
- color: var(--mainColor);
90
-
91
- // @TODO: We have to revisit the ArrowButton's padding when we pick up #48568 (https://github.com/Automattic/wp-calypso/issues/48568)
92
- padding: 0;
93
- margin-right: 0;
94
-
95
- @include break-medium {
96
- justify-content: flex-end;
97
- }
98
-
99
- svg {
100
- // The viewbox has a 5px margin and we have to crop it to align it with the ArrowButton's copy properly.
101
- margin: 0 -5px -4px;
102
- }
103
- }
104
-
105
69
  @include break-small {
106
70
  min-width: 160px;
107
71
  }
@@ -1,5 +1,5 @@
1
1
  import { createShoppingCartManagerClient } from '@automattic/shopping-cart';
2
- import wpcomRequest from 'wpcom-proxy-request';
2
+ import wpcomRequest from '../wpcom-request';
3
3
  import type {
4
4
  RequestCart,
5
5
  CartKey,
@@ -1,26 +1,28 @@
1
1
  import config from '@automattic/calypso-config';
2
2
  import { getUrlParts } from '@automattic/calypso-url';
3
- import { DomainSuggestion, NewSiteSuccessResponse, Site } from '@automattic/data-stores';
3
+ import { NewSiteSuccessResponse, Site } from '@automattic/data-stores';
4
+ import { SiteGoal } from '@automattic/data-stores/src/onboard';
5
+ import { getTld, isFreeSubdomainQuery } from '@automattic/domain-search';
4
6
  import { guessTimezone, getLanguage } from '@automattic/i18n-utils';
5
7
  import debugFactory from 'debug';
6
8
  import { getLocaleSlug } from 'i18n-calypso';
7
- import { startsWith, isEmpty } from 'lodash';
8
- import wpcomRequest from 'wpcom-proxy-request';
9
+ import { isEmpty } from 'lodash';
9
10
  import {
10
11
  setupSiteAfterCreation,
11
12
  isTailoredSignupFlow,
12
- isMigrationFlow,
13
13
  HUNDRED_YEAR_PLAN_FLOW,
14
14
  isAnyHostingFlow,
15
+ AI_SITE_BUILDER_FLOW,
15
16
  } from '../';
17
+ import wpcomRequest from '../wpcom-request';
16
18
  import cartManagerClient from './create-cart-manager-client';
19
+ import type { DomainSuggestion } from '@automattic/api-core';
17
20
  import type { MinimalRequestCartProduct } from '@automattic/shopping-cart';
18
21
 
19
22
  const debug = debugFactory( 'calypso:signup:step-actions' );
20
23
 
21
24
  interface GetNewSiteParams {
22
25
  flowToCheck: string;
23
- isPurchasingDomainItem: boolean;
24
26
  themeSlugWithRepo: string;
25
27
  siteUrl?: string;
26
28
  siteTitle: string;
@@ -28,7 +30,9 @@ interface GetNewSiteParams {
28
30
  useThemeHeadstart: boolean;
29
31
  siteVisibility: Site.Visibility;
30
32
  username: string;
33
+ partnerBundle: string | null;
31
34
  sourceSlug?: string;
35
+ siteIntent?: string;
32
36
  }
33
37
 
34
38
  type NewSiteParams = {
@@ -49,6 +53,7 @@ type NewSiteParams = {
49
53
  timezone_string?: string;
50
54
  wpcom_public_coming_soon: 0 | 1;
51
55
  site_accent_color?: string;
56
+ site_intent?: string;
52
57
  };
53
58
  validate: boolean;
54
59
  };
@@ -58,21 +63,15 @@ const getBlogNameGenerationParams = ( {
58
63
  siteTitle,
59
64
  flowToCheck,
60
65
  username,
61
- isPurchasingDomainItem,
62
66
  }: GetNewSiteParams ) => {
63
67
  if ( siteUrl ) {
64
- const blog_name = siteUrl.replace( '.wordpress.com', '' );
65
-
66
- if ( isMigrationFlow( flowToCheck ) ) {
67
- return {
68
- blog_name,
69
- find_available_url: true,
70
- };
71
- }
68
+ const blogName = siteUrl.replace( '.wordpress.com', '' );
72
69
 
73
70
  return {
74
- blog_name,
75
- find_available_url: !! isPurchasingDomainItem,
71
+ blog_name: blogName,
72
+ // Free subdomains (.wordpress.com and .blog) should use the exact URL.
73
+ // Only paid domains need find_available_url to generate a fallback free subdomain.
74
+ find_available_url: ! isFreeSubdomainQuery( siteUrl ) && !! getTld( blogName ),
76
75
  };
77
76
  }
78
77
 
@@ -105,6 +104,8 @@ export const getNewSiteParams = ( params: GetNewSiteParams ) => {
105
104
  useThemeHeadstart = false,
106
105
  siteVisibility,
107
106
  sourceSlug,
107
+ siteIntent,
108
+ partnerBundle,
108
109
  } = params;
109
110
 
110
111
  // We will use the default annotation instead of theme annotation as fallback,
@@ -127,6 +128,8 @@ export const getNewSiteParams = ( params: GetNewSiteParams ) => {
127
128
  ...( sourceSlug && { site_source_slug: sourceSlug } ),
128
129
  ...( siteAccentColor && { site_accent_color: siteAccentColor } ),
129
130
  ...( themeSlugWithRepo && { theme: themeSlugWithRepo } ),
131
+ ...( siteIntent && { site_intent: siteIntent } ),
132
+ ...( partnerBundle && { site_partner_bundle: partnerBundle } ),
130
133
  },
131
134
  validate: false,
132
135
  };
@@ -134,26 +137,29 @@ export const getNewSiteParams = ( params: GetNewSiteParams ) => {
134
137
  return newSiteParams;
135
138
  };
136
139
 
137
- export const createSiteWithCart = async (
140
+ export const createSite = async (
138
141
  flowName: string,
139
- userIsLoggedIn: boolean,
140
- isPurchasingDomainItem: boolean,
141
142
  themeSlugWithRepo: string,
142
143
  siteVisibility: Site.Visibility,
143
144
  siteTitle: string,
144
145
  siteAccentColor: string,
145
146
  useThemeHeadstart: boolean,
146
147
  username: string,
148
+ partnerBundle: string | null,
149
+ storedSiteUrl?: string,
147
150
  domainItem?: DomainSuggestion,
148
- domainCartItem?: MinimalRequestCartProduct,
149
- sourceSlug?: string
151
+ sourceSlug?: string,
152
+ siteIntent?: string,
153
+ siteGoals?: SiteGoal[],
154
+ gardenName?: string | null,
155
+ gardenPartnerName?: string | null,
156
+ specId?: string | null,
157
+ ref?: string
150
158
  ) => {
151
- const siteUrl = domainItem?.domain_name;
152
- const isFreeThemePreselected = startsWith( themeSlugWithRepo, 'pub' );
159
+ const siteUrl = storedSiteUrl || domainItem?.domain_name;
153
160
 
154
161
  const newSiteParams = getNewSiteParams( {
155
162
  flowToCheck: flowName,
156
- isPurchasingDomainItem,
157
163
  themeSlugWithRepo,
158
164
  siteUrl,
159
165
  siteTitle,
@@ -162,6 +168,8 @@ export const createSiteWithCart = async (
162
168
  siteVisibility,
163
169
  username,
164
170
  sourceSlug,
171
+ siteIntent,
172
+ partnerBundle,
165
173
  } );
166
174
 
167
175
  // if ( isEmpty( bearerToken ) && 'onboarding-registrationless' === flowToCheck ) {
@@ -175,6 +183,9 @@ export const createSiteWithCart = async (
175
183
  const segmentationSurveyAnswersAnonId = localStorage.getItem( 'ss-anon-id' );
176
184
  localStorage.removeItem( 'ss-anon-id' );
177
185
 
186
+ // This is the parameter that will contain the internal referral, e.g. a landing page.
187
+ const refParam = new URLSearchParams( document.location.search ).get( 'ref' );
188
+
178
189
  const siteCreationResponse: NewSiteSuccessResponse = await wpcomRequest( {
179
190
  path: '/sites/new',
180
191
  apiVersion: '1.1',
@@ -185,12 +196,28 @@ export const createSiteWithCart = async (
185
196
  lang_id: getLanguage( locale as string )?.value,
186
197
  client_id: config( 'wpcom_signup_id' ),
187
198
  client_secret: config( 'wpcom_signup_key' ),
199
+ ...( gardenName &&
200
+ gardenPartnerName && {
201
+ garden_name: gardenName,
202
+ garden_partner_name: gardenPartnerName,
203
+ } ),
204
+ ...( specId && {
205
+ spec_id: specId,
206
+ } ),
188
207
  options: {
189
208
  ...newSiteParams.options,
190
209
  has_segmentation_survey: hasSegmentationSurvey,
191
210
  ...( hasSegmentationSurvey && segmentationSurveyAnswersAnonId
192
211
  ? { segmentation_survey_answers_anon_id: segmentationSurveyAnswersAnonId }
193
212
  : {} ),
213
+ ...( siteGoals && { site_goals: siteGoals } ),
214
+ ...( ( ref ?? refParam ) && { ref: ref ?? refParam } ),
215
+ // Trigger backend build for ai-site-builder flow with commerce garden and spec_id
216
+ ...( flowName === AI_SITE_BUILDER_FLOW &&
217
+ gardenName === 'commerce' &&
218
+ specId && {
219
+ trigger_backend_build: false,
220
+ } ),
194
221
  },
195
222
  },
196
223
  } );
@@ -200,6 +227,15 @@ export const createSiteWithCart = async (
200
227
  return;
201
228
  }
202
229
 
230
+ // TODO - This is a temporary fix to ensure garden site URLs use HTTPS.
231
+ // Ensure garden site URLs use HTTPS
232
+ if ( gardenName && siteCreationResponse?.blog_details?.url ) {
233
+ siteCreationResponse.blog_details.url = siteCreationResponse.blog_details.url.replace(
234
+ 'http://',
235
+ 'https://'
236
+ );
237
+ }
238
+
203
239
  const parsedBlogURL = getUrlParts( siteCreationResponse?.blog_details.url );
204
240
  const siteSlug = parsedBlogURL.hostname;
205
241
  const siteId = siteCreationResponse?.blog_details.blogid;
@@ -213,15 +249,6 @@ export const createSiteWithCart = async (
213
249
  await setupSiteAfterCreation( { siteId, flowName } );
214
250
  }
215
251
 
216
- await processItemCart(
217
- siteSlug,
218
- isFreeThemePreselected,
219
- themeSlugWithRepo,
220
- flowName,
221
- userIsLoggedIn,
222
- domainCartItem
223
- );
224
-
225
252
  return providedDependencies;
226
253
  };
227
254
 
@@ -236,30 +263,6 @@ function prepareItemForAddingToCart( item: MinimalRequestCartProduct, lastKnownF
236
263
  };
237
264
  }
238
265
 
239
- export async function addPlanToCart(
240
- siteSlug: string,
241
- flowName: string,
242
- userIsLoggedIn: boolean,
243
- themeSlugWithRepo: string,
244
- cartItem: MinimalRequestCartProduct
245
- ) {
246
- if ( isEmpty( cartItem ) ) {
247
- // the user selected the free plan
248
- return;
249
- }
250
-
251
- const isFreeThemePreselected = startsWith( themeSlugWithRepo, 'pub' );
252
-
253
- await processItemCart(
254
- siteSlug,
255
- isFreeThemePreselected,
256
- themeSlugWithRepo,
257
- flowName,
258
- userIsLoggedIn,
259
- cartItem
260
- );
261
- }
262
-
263
266
  export async function replaceProductsInCart(
264
267
  siteSlug: string,
265
268
  cartItems: MinimalRequestCartProduct[]
@@ -277,33 +280,6 @@ export async function replaceProductsInCart(
277
280
  }
278
281
  }
279
282
 
280
- const addToCartAndProceed = async (
281
- newCartItem: MinimalRequestCartProduct,
282
- siteSlug: string,
283
- flowName: string
284
- ) => {
285
- const cartItem = prepareItemForAddingToCart( newCartItem, flowName );
286
-
287
- if ( cartItem ) {
288
- debug( 'adding products to cart', cartItem );
289
- const cartKey = await cartManagerClient.getCartKeyForSiteSlug( siteSlug );
290
-
291
- try {
292
- const updatedCart = await cartManagerClient
293
- .forCartKey( cartKey )
294
- .actions.addProductsToCart( [ cartItem ] );
295
-
296
- debug( 'product add request complete', updatedCart );
297
- } catch ( error ) {
298
- debug( 'product add request had an error', error );
299
- //TODO Manage error
300
- // reduxStore.dispatch( errorNotice( error.message ) );
301
- }
302
- } else {
303
- debug( 'no cart items to add' );
304
- }
305
- };
306
-
307
283
  export async function addProductsToCart(
308
284
  siteSlug: string,
309
285
  flowName: string,
@@ -354,22 +330,3 @@ export async function setThemeOnSite(
354
330
  //TODO: Manage error
355
331
  }
356
332
  }
357
-
358
- async function processItemCart(
359
- siteSlug: string,
360
- isFreeThemePreselected: boolean,
361
- themeSlugWithRepo: string,
362
- lastKnownFlow: string,
363
- userIsLoggedIn: boolean,
364
- newCartItem?: MinimalRequestCartProduct
365
- ) {
366
- if ( ! userIsLoggedIn && isFreeThemePreselected ) {
367
- await setThemeOnSite( siteSlug, themeSlugWithRepo );
368
- newCartItem && ( await addToCartAndProceed( newCartItem, siteSlug, lastKnownFlow ) );
369
- } else if ( userIsLoggedIn && isFreeThemePreselected ) {
370
- await setThemeOnSite( siteSlug, themeSlugWithRepo );
371
- newCartItem && ( await addToCartAndProceed( newCartItem, siteSlug, lastKnownFlow ) );
372
- } else {
373
- newCartItem && ( await addToCartAndProceed( newCartItem, siteSlug, lastKnownFlow ) );
374
- }
375
- }
@@ -1,12 +1,11 @@
1
1
  import { Visibility } from '@automattic/data-stores';
2
2
  import { getNewSiteParams } from '..';
3
- import { HOSTING_LP_FLOW, MIGRATION_FLOW } from '../../utils/flows';
3
+ import { HOSTING_LP_FLOW } from '../../utils/flows';
4
4
 
5
5
  describe( 'getNewSiteParams', () => {
6
6
  function testParams( partialParams: Partial< Parameters< typeof getNewSiteParams >[ 0 ] > = {} ) {
7
7
  return {
8
8
  flowToCheck: 'test-flow',
9
- isPurchasingDomainItem: false,
10
9
  themeSlugWithRepo: 'pub/test-theme',
11
10
  siteTitle: 'test site title',
12
11
  siteAccentColor: '#deface',
@@ -14,6 +13,7 @@ describe( 'getNewSiteParams', () => {
14
13
  siteVisibility: Visibility.Private,
15
14
  username: 'testuser',
16
15
  ...partialParams,
16
+ partnerBundle: partialParams.partnerBundle ?? null,
17
17
  } satisfies Parameters< typeof getNewSiteParams >[ 0 ];
18
18
  }
19
19
 
@@ -126,46 +126,46 @@ describe( 'getNewSiteParams', () => {
126
126
  siteUrl: 'testing123.wordpress.com',
127
127
  siteTitle: 'Testing Inc.',
128
128
  username: 'janedoe',
129
- isPurchasingDomainItem: true,
130
129
  } )
131
130
  )
132
131
  ).toEqual(
133
132
  expect.objectContaining( {
134
133
  blog_name: 'testing123',
135
- find_available_url: true,
134
+ find_available_url: false,
136
135
  } )
137
136
  );
137
+ } );
138
138
 
139
+ test( 'find_available_url is true when siteUrl is a custom domain', () => {
139
140
  expect(
140
141
  getNewSiteParams(
141
142
  testParams( {
142
- siteUrl: 'testing123.wordpress.com',
143
+ siteUrl: 'example.com',
143
144
  siteTitle: 'Testing Inc.',
144
145
  username: 'janedoe',
145
- isPurchasingDomainItem: false,
146
146
  } )
147
147
  )
148
148
  ).toEqual(
149
149
  expect.objectContaining( {
150
- blog_name: 'testing123',
151
- find_available_url: false,
150
+ blog_name: 'example.com',
151
+ find_available_url: true,
152
152
  } )
153
153
  );
154
154
  } );
155
155
 
156
- test( 'Migration flow uses find_available_url', () => {
156
+ test( 'find_available_url is false when siteUrl is a free .blog subdomain', () => {
157
157
  expect(
158
158
  getNewSiteParams(
159
159
  testParams( {
160
- flowToCheck: MIGRATION_FLOW,
161
- siteUrl: 'testing123.wordpress.com',
162
- isPurchasingDomainItem: false,
160
+ siteUrl: 'mysite.tech.blog',
161
+ siteTitle: 'Testing Inc.',
162
+ username: 'janedoe',
163
163
  } )
164
164
  )
165
165
  ).toEqual(
166
166
  expect.objectContaining( {
167
- blog_name: 'testing123',
168
- find_available_url: true, // True despite the fact isPurchasingDomainItem is false
167
+ blog_name: 'mysite.tech.blog',
168
+ find_available_url: false,
169
169
  } )
170
170
  );
171
171
  } );
@@ -62,7 +62,7 @@ const Index: React.FunctionComponent< { className?: string } > = ( { className }
62
62
  height="15"
63
63
  rx="2.386"
64
64
  transform="rotate(-32 97 2.53)"
65
- fill="#117AC9"
65
+ fill="var(--studio-blue-50)"
66
66
  />
67
67
  <Rect
68
68
  x="323.638"