@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,235 @@
1
+ # StepContainerV2
2
+
3
+ Next-generation step composition utility.
4
+
5
+ **Disclaimer: This is a work in progress and the API is not yet stable.**
6
+
7
+ ## Why
8
+
9
+ This is a compilation of everything we've learned with `StepContainer`. Just like its predecessor, it focuses on aesthetics of the step (standardized components, margins, paddings, etc.), and not their content or functionality. The main difference is that it's more flexible and easier to extend.
10
+
11
+ The new version focuses on modularity and composition instead of overrides through props and CSS. We've observed that the previous version accepted a variety of props that modified how a component looks. Most of the times these properties had to play nicely with each other, which increased complexity.
12
+
13
+ This version, however, provides several "slots" that allow the developer to declare _which_ parts of the step will be rendered through the creation of wireframes, instead of imperatively specifying _what_ to render. `topBar`, `heading`, `stickyBottomBar`, and `footer` are example of slots.
14
+
15
+ It also provides the elements to be used within these slots, such as `TopBar`, `Heading`, `StickyBottomBar`, and `Footer`, as well as their internal elements, such as buttons like `PrimaryButton`, `SkipButton`, and `BackButton`.
16
+
17
+ Here's an example:
18
+
19
+ ```jsx
20
+ import { Step } from '@automattic/onboarding';
21
+
22
+ const MyStep = () => {
23
+ const nextButton = <Step.PrimaryButton onClick={ navigation.submit } />;
24
+
25
+ return (
26
+ <Step.CenteredColumnLayout
27
+ columnWidth={ 4 }
28
+ topBar={ <Step.TopBar /> }
29
+ heading={ <Step.Heading text="Heading" /> }
30
+ stickyBottomBar={ <Step.StickyBottomBar rightElement={ nextButton } /> }
31
+ >
32
+ { ( { isSmallViewport } ) => (
33
+ <>
34
+ <p>Here comes the content of the step.</p>
35
+ { isSmallViewport && nextButton }
36
+ </>
37
+ ) }
38
+ </Step.CenteredColumnLayout>
39
+ );
40
+ };
41
+ ```
42
+
43
+ In the example above, the top bar won't have a skip nor a back button. There's a `stickyBottomBar` that will render the Next button on mobile, and the same button will also be rendered within the step's content, but only on smaller screens and above. Although it's possible, this particular step won't render a footer.
44
+
45
+ It reduces the complexity of layouting by delegating the rendering responsibility to the components within the slots. A good example of what we mean here is the [`headerImageUrl` prop of `StepContainer`](../step-container/index.tsx), which should exist if `isHorizontalLayout` is `true`, but there is no explanation of that in the code, and it's not obvious to the developer reading code introduced by others.
46
+
47
+ Read the [how to extend it](#how-to-extend-it) section to learn how to reproduce this behavior in `StepContainerV2`.
48
+
49
+ ## How to use it
50
+
51
+ **You shouldn't use `StepContainerV2` directly. Instead, use the wireframes that are exported from this package.**
52
+
53
+ Aside from the stories (run `yarn storybook:start`), you can follow the examples from `~/client/landing/stepper/declarative-flow/internals/steps-repository`.
54
+
55
+ Please do NOT override the `Step.*` components with CSS as this creates inconsistencies between steps and becomes a maintenance nightmare. Ideally, you should not need to do this as the steps are designed to be composed, and the wireframes are approved by the designers.
56
+
57
+ ### What are wireframes?
58
+
59
+ Wireframes are layout arrangements that have been approved by the Dotcom designers. They are exported from this package and can be used in the steps.
60
+
61
+ Here are the wireframes specs: <https://www.figma.com/design/QFAYPvq4xYUZC5AFkrfJFM/Dotcom-Onboarding-(Open)?node-id=1-31&p=f&t=CX7AmXyb9CTsFGAI-0>.
62
+
63
+ ## How to extend it
64
+
65
+ - Try to keep the components as generic as possible, and without adding overrides to components coming from `@wordpress/components` unless explicitly approved by the designers.
66
+ - If the step has a unique UI element that does not exist in other steps, it probably does not belong in `StepContainerV2`. Try using some of the slots, or add a new one.
67
+ - Do not add `is*` props to `StepContainerV2` as we want to stick to composition.
68
+ - Do not export `StepContainerV2` directly. We're defining several wireframes that were approved by the designers, and these are the components you should be using in the steps.
69
+
70
+ ### Workshop: How to create the horizontal layout wireframe
71
+
72
+ As a way to demonstrate how to create a new wireframe, let's re-create `HorizontalLayout`.
73
+
74
+ This layout arranges two columns side by side. It has the heading on the left and the content on the right. Optionally, an image is rendered below the heading. One example of where this layout is used is in `/setup/site-setup/intent?siteSlug=%s`.
75
+
76
+ Let's create a new wireframe named `HorizontalLayout`. Here's what its code looks like:
77
+
78
+ ```tsx
79
+ interface HorizontalLayoutProps {
80
+ topBar?: ContentProp;
81
+ heading?: ReactNode;
82
+ imageUrl?: string;
83
+ className?: string;
84
+ children?: ContentProp;
85
+ footer?: ReactNode;
86
+ stickyBottomBar?: ContentProp;
87
+ }
88
+
89
+ export const HorizontalLayout = ( {
90
+ topBar,
91
+ heading,
92
+ imageUrl,
93
+ children,
94
+ footer,
95
+ stickyBottomBar,
96
+ }: HorizontalLayoutProps ) => {
97
+ return (
98
+ <StepContainerV2>
99
+ { ( context ) => {
100
+ const content = typeof children === 'function' ? children( context ) : children;
101
+
102
+ return (
103
+ <>
104
+ <TopBarRenderer topBar={ topBar } />
105
+ <ContentWrapper width="wide" centerAligned={ context.isSmallViewport }>
106
+ <ContentRow
107
+ columns={ 10 }
108
+ className="step-container-v2__content-row--horizontal-layout"
109
+ >
110
+ <div className="step-container-v2__content-row--horizontal-layout-left">
111
+ { heading }
112
+ { imageUrl && <img src={ imageUrl } alt="" /> }
113
+ </div>
114
+ <div className="step-container-v2__content-row--horizontal-layout-right">
115
+ { content }
116
+ </div>
117
+ </ContentRow>
118
+ { footer }
119
+ </ContentWrapper>
120
+ <StickyBottomBarRenderer stickyBottomBar={ stickyBottomBar } />
121
+ </>
122
+ );
123
+ } }
124
+ </StepContainerV2>
125
+ );
126
+ };
127
+ ```
128
+
129
+ Then, we need to add the styles for the new wireframe. Let's create a new file called `style.scss` and add the following code:
130
+
131
+ ```scss
132
+ .step-container-v2__content-row--horizontal-layout {
133
+ display: flex;
134
+ flex-direction: column;
135
+ gap: 3rem;
136
+
137
+ @include break-large {
138
+ flex-direction: row;
139
+ }
140
+ }
141
+
142
+ .step-container-v2__content-row--horizontal-layout-left,
143
+ .step-container-v2__content-row--horizontal-layout-right {
144
+ flex: 1;
145
+ }
146
+
147
+ .step-container-v2__content-row--horizontal-layout-left {
148
+ display: flex;
149
+ flex-direction: column;
150
+ align-items: flex-start;
151
+ gap: 3rem;
152
+ }
153
+ ```
154
+
155
+ > Notice that we're using the `@include break-large` mixin to target the large viewport and above. The Gutenberg breakpoints are matched within StepContainerV2, so we can use them to create responsive styles for the wireframe.
156
+
157
+ One implementation detail is that the `HorizontalLayout` wireframe does not render the illustration on mobile. `StepContainerV2` accepts a render prop that can be used to render the content of the step. This is useful to conditionally render content based on the viewports defined for the wireframe. We can then modify the previous example to render the illustration only on medium and larger screens.
158
+
159
+ Let's modify the `children` of `HorizontalLayout` to reflect this new requirement:
160
+
161
+ ```jsx
162
+ ( context ) => {
163
+ const content = typeof children === 'function' ? children( context ) : children;
164
+
165
+ return (
166
+ <>
167
+ <TopBarRenderer topBar={ topBar } />
168
+ <ContentWrapper width="wide" centerAligned={ context.isSmallViewport }>
169
+ <ContentRow columns={ 10 } className="step-container-v2__content-row--horizontal-layout">
170
+ <div className="step-container-v2__content-row--horizontal-layout-left">
171
+ { heading }
172
+ { context.isSmallViewport && imageUrl && <img src={ imageUrl } alt="" /> }
173
+ </div>
174
+ <div className="step-container-v2__content-row--horizontal-layout-right">{ content }</div>
175
+ </ContentRow>
176
+ { footer }
177
+ </ContentWrapper>
178
+ <StickyBottomBarRenderer stickyBottomBar={ stickyBottomBar } />
179
+ </>
180
+ );
181
+ };
182
+ ```
183
+
184
+ The horizontal layout wireframe expects the heading element to be left-aligned. We can create a new compound component and expose that as part of the public API of the wireframe:
185
+
186
+ ```tsx
187
+ HorizontalLayout.Heading = ( props: ComponentProps< typeof Heading > ) => (
188
+ <Heading { ...props } align="left" />
189
+ );
190
+ ```
191
+
192
+ Last but not least, let's export the wireframe so it can be used in a step:
193
+
194
+ ```tsx
195
+ // In step-container-v2/index.ts
196
+ // ...
197
+ export { HorizontalLayout } from './wireframes/HorizontalLayout/HorizontalLayout';
198
+ ```
199
+
200
+ Et voilà, we've created a new wireframe. Here's how to use it:
201
+
202
+ ```jsx
203
+ <Step.HorizontalLayout
204
+ heading={ <Step.HorizontalLayout.Heading text="Heading" /> }
205
+ imageUrl={ imageUrl }
206
+ >
207
+ <p>Here comes the content rendered in the right column of the step.</p>
208
+ <Step.PrimaryButton onClick={ navigation.submit } />
209
+ </Step.HorizontalLayout>
210
+ ```
211
+
212
+ This feels a bit more verbose, but it's fine since we won't be creating wireframes every day. Remember that a wireframe is the shell of a step, which is designed to be reusable. This longer process ensures that the wireframe is well-thought-out.
213
+
214
+ ## FAQ
215
+
216
+ ### Will this component be called `StepContainerV2` forever?
217
+
218
+ Of course not! The plan is for this new version to replace `StepContainer` entirely. We'll do this migration gradually.
219
+
220
+ ### How can I adopt it in Stepper without breaking steps that are used in multiple flows?
221
+
222
+ There's an utility called `shouldUseStepContainerV2` that allows, at a step level, to define which flows should render this version of the container vs. the original one.
223
+
224
+ ### How do I run storybook?
225
+
226
+ Either:
227
+
228
+ - `yarn storybook:start` from the root of this package, or
229
+ - `yarn workspace @automattic/onboarding storybook:start` from the root of the monorepo.
230
+
231
+ Storybook will open a browser window automatically.
232
+
233
+ ### Who can I contact if I have any questions?
234
+
235
+ Ping @quake-team on Slack.
@@ -0,0 +1,27 @@
1
+ import clsx from 'clsx';
2
+ import type { CSSProperties, ReactNode } from 'react';
3
+
4
+ import './style.scss';
5
+
6
+ export const ContentRow = ( {
7
+ children,
8
+ columns = 12,
9
+ className,
10
+ stretched,
11
+ }: {
12
+ children: ReactNode;
13
+ columns?: number;
14
+ className?: string;
15
+ stretched?: boolean;
16
+ } ) => {
17
+ return (
18
+ <div
19
+ className={ clsx( 'step-container-v2__content-row', className, {
20
+ stretched,
21
+ } ) }
22
+ style={ { '--columns': columns } as CSSProperties }
23
+ >
24
+ { children }
25
+ </div>
26
+ );
27
+ };
@@ -0,0 +1,26 @@
1
+ @import '@wordpress/base-styles/breakpoints';
2
+ @import '@wordpress/base-styles/mixins';
3
+
4
+ .step-container-v2__content-row {
5
+ width: 100%;
6
+ max-width: 100%;
7
+
8
+ @include break-small {
9
+ --total-column-width: calc(
10
+ var( --columns ) * var( --step-container-v2-content-column-width )
11
+ );
12
+ --total-gap-width: calc(
13
+ ( var( --columns ) - 1 ) * var( --step-container-v2-content-column-gap )
14
+ );
15
+
16
+ --step-container-v2-content-row-max-width: calc(
17
+ var( --total-gap-width ) + var( --total-column-width )
18
+ );
19
+
20
+ max-width: var( --step-container-v2-content-row-max-width );
21
+ }
22
+
23
+ &.stretched {
24
+ align-self: stretch;
25
+ }
26
+ }
@@ -0,0 +1,41 @@
1
+ import clsx from 'clsx';
2
+ import type { ReactNode } from 'react';
3
+
4
+ import './style.scss';
5
+
6
+ type ContentWrapperProps = {
7
+ children: ReactNode;
8
+ centerAligned?: boolean;
9
+ axisDirection?: 'vertical' | 'horizontal';
10
+ noTopPadding?: boolean;
11
+ noBottomPadding?: boolean;
12
+ noInlinePadding?: boolean;
13
+ isFullWidth?: boolean;
14
+ noGap?: boolean;
15
+ };
16
+
17
+ export const ContentWrapper = ( {
18
+ children,
19
+ centerAligned,
20
+ axisDirection = 'vertical',
21
+ noTopPadding = false,
22
+ noBottomPadding = false,
23
+ noInlinePadding = false,
24
+ isFullWidth = false,
25
+ noGap = false,
26
+ }: ContentWrapperProps ) => {
27
+ return (
28
+ <div
29
+ className={ clsx( 'step-container-v2__content-wrapper', `axis-${ axisDirection }`, {
30
+ 'center-aligned': centerAligned,
31
+ 'no-top-padding': noTopPadding,
32
+ 'no-bottom-padding': noBottomPadding,
33
+ 'no-inline-padding': noInlinePadding,
34
+ 'is-full-width': isFullWidth,
35
+ 'no-gap': noGap,
36
+ } ) }
37
+ >
38
+ { children }
39
+ </div>
40
+ );
41
+ };
@@ -0,0 +1,70 @@
1
+ @import '@wordpress/base-styles/breakpoints';
2
+ @import '@wordpress/base-styles/mixins';
3
+
4
+ .step-container-v2__content-wrapper {
5
+ display: flex;
6
+ align-items: center;
7
+ gap: 3rem;
8
+ width: 100%;
9
+ box-sizing: border-box;
10
+ flex: 1;
11
+
12
+ &.axis-vertical {
13
+ flex-direction: column;
14
+ }
15
+
16
+ &.axis-horizontal {
17
+ flex-direction: row;
18
+ }
19
+
20
+ padding: var( --step-container-v2-content-block-padding )
21
+ var( --step-container-v2-content-inline-padding );
22
+
23
+ &.no-top-padding {
24
+ padding-top: 0;
25
+ }
26
+
27
+ &.no-bottom-padding {
28
+ padding-bottom: 0;
29
+ }
30
+
31
+ &.no-inline-padding {
32
+ padding: 0;
33
+ }
34
+
35
+ &.no-gap {
36
+ gap: 0;
37
+ }
38
+
39
+ --step-container-v2-content-max-width: 1344px;
40
+
41
+ max-width: calc(
42
+ var( --step-container-v2-content-max-width ) + 2 *
43
+ var( --step-container-v2-content-inline-padding )
44
+ );
45
+
46
+ --step-container-v2-content-column-gap: 24px;
47
+
48
+ --step-container-v2-content-max-width-minus-column-gaps: calc(
49
+ var( --step-container-v2-content-max-width ) - 11 *
50
+ var( --step-container-v2-content-column-gap )
51
+ );
52
+
53
+ --step-container-v2-content-column-width: calc(
54
+ var( --step-container-v2-content-max-width-minus-column-gaps ) / 12
55
+ );
56
+
57
+ &.center-aligned {
58
+ @include break-small {
59
+ justify-content: center;
60
+ padding-bottom: calc(
61
+ var( --step-container-v2-content-block-padding ) + var( --step-container-v2-top-bar-height )
62
+ );
63
+ }
64
+ }
65
+
66
+ &.is-full-width {
67
+ --step-container-v2-content-max-width: 100%;
68
+ max-width: 100%;
69
+ }
70
+ }
@@ -0,0 +1,31 @@
1
+ import clsx from 'clsx';
2
+ import { ReactNode } from 'react';
3
+
4
+ import './style.scss';
5
+
6
+ interface HeadingProps {
7
+ text: ReactNode;
8
+ subText?: ReactNode;
9
+ align?: 'left' | 'center';
10
+ size?: 'small';
11
+ }
12
+
13
+ export const Heading = ( { text, subText, align, size }: HeadingProps ) => {
14
+ return (
15
+ <div
16
+ className={ clsx( 'step-container-v2__heading', {
17
+ left: align === 'left',
18
+ center: align === 'center',
19
+ } ) }
20
+ >
21
+ <h1
22
+ className={ clsx( 'wp-brand-font', {
23
+ small: size === 'small',
24
+ } ) }
25
+ >
26
+ { text }
27
+ </h1>
28
+ { subText && <p>{ subText }</p> }
29
+ </div>
30
+ );
31
+ };
@@ -0,0 +1,47 @@
1
+ @import '@wordpress/base-styles/breakpoints';
2
+ @import '@wordpress/base-styles/mixins';
3
+ @import "@automattic/typography/styles/fonts";
4
+
5
+ .step-container-v2__heading {
6
+ width: 100%;
7
+ text-wrap: balance;
8
+
9
+ @include break-small {
10
+ text-align: center;
11
+ }
12
+
13
+ h1 {
14
+ margin-block: 0;
15
+ color: var( --color-neutral-100 );
16
+ font-size: 2rem;
17
+ line-height: 1.25;
18
+ text-wrap: balance;
19
+
20
+ &:not( .small ) {
21
+ @include break-large {
22
+ font-size: 2.75rem;
23
+ line-height: 1.15;
24
+ }
25
+ }
26
+ }
27
+
28
+ p {
29
+ margin-block: 0.5rem 0;
30
+ color: var( --color-text );
31
+ font-size: 0.875rem;
32
+ line-height: 1.5;
33
+ text-wrap: balance;
34
+
35
+ @include break-large {
36
+ font-size: 1rem;
37
+ }
38
+ }
39
+
40
+ &.left {
41
+ text-align: left !important;
42
+ }
43
+
44
+ &.center {
45
+ text-align: center !important;
46
+ }
47
+ }
@@ -0,0 +1,55 @@
1
+ import { useViewportMatch } from '@wordpress/compose';
2
+ import { useMemo, useState } from 'react';
3
+ import { ContentProp, StepContainerV2Context } from './context';
4
+ import './style.scss';
5
+
6
+ export const StepContainerV2 = ( {
7
+ children,
8
+ initialTopBarHeight,
9
+ }: {
10
+ children: ContentProp;
11
+ initialTopBarHeight?: string;
12
+ } ) => {
13
+ const isSmallViewport = useViewportMatch( 'small', '>=' );
14
+ const isLargeViewport = useViewportMatch( 'large', '>=' );
15
+
16
+ const [ topBarHeight, setTopBarHeight ] = useState( initialTopBarHeight ?? '0px' );
17
+ const [ stickyBottomBarHeight, setStickyBottomBarHeight ] = useState( 0 );
18
+
19
+ const stepContainerContextValue = useMemo(
20
+ () => ( {
21
+ isSmallViewport,
22
+ isLargeViewport,
23
+ topBarHeight,
24
+ setTopBarHeight,
25
+ stickyBottomBarHeight,
26
+ setStickyBottomBarHeight,
27
+ } ),
28
+ [
29
+ isSmallViewport,
30
+ isLargeViewport,
31
+ topBarHeight,
32
+ setTopBarHeight,
33
+ stickyBottomBarHeight,
34
+ setStickyBottomBarHeight,
35
+ ]
36
+ );
37
+
38
+ const content = typeof children === 'function' ? children( stepContainerContextValue ) : children;
39
+
40
+ return (
41
+ <StepContainerV2Context.Provider value={ stepContainerContextValue }>
42
+ <div
43
+ className="step-container-v2"
44
+ style={
45
+ {
46
+ '--step-container-v2-top-bar-height': topBarHeight,
47
+ '--step-container-v2-sticky-bottom-bar-height': `${ stickyBottomBarHeight }px`,
48
+ } as React.CSSProperties
49
+ }
50
+ >
51
+ { content }
52
+ </div>
53
+ </StepContainerV2Context.Provider>
54
+ );
55
+ };
@@ -0,0 +1,25 @@
1
+ import { createContext, ReactNode } from 'react';
2
+
3
+ export interface StepContainerV2InternalContextType {
4
+ isSmallViewport: boolean;
5
+ isLargeViewport: boolean;
6
+ topBarHeight: string;
7
+ setTopBarHeight: ( height: string ) => void;
8
+ stickyBottomBarHeight: number;
9
+ setStickyBottomBarHeight: ( height: number ) => void;
10
+ }
11
+
12
+ export type ContentProp< T = ReactNode > =
13
+ | ( (
14
+ context: Pick< StepContainerV2InternalContextType, 'isSmallViewport' | 'isLargeViewport' >
15
+ ) => T )
16
+ | T;
17
+
18
+ export const StepContainerV2Context = createContext< StepContainerV2InternalContextType >( {
19
+ isSmallViewport: false,
20
+ isLargeViewport: false,
21
+ topBarHeight: '0px',
22
+ setTopBarHeight: () => {},
23
+ stickyBottomBarHeight: 0,
24
+ setStickyBottomBarHeight: () => {},
25
+ } );
@@ -0,0 +1,21 @@
1
+ @import '@wordpress/base-styles/breakpoints';
2
+ @import '@wordpress/base-styles/mixins';
3
+
4
+ .step-container-v2 {
5
+ --step-container-v2-content-block-padding: 2rem;
6
+ --step-container-v2-content-inline-padding: 1rem;
7
+
8
+ --step-container-v2-top-bar-padding: 1rem;
9
+ --step-container-v2-top-bar-content-height: 24px;
10
+
11
+ @include break-small {
12
+ --step-container-v2-content-inline-padding: 3rem;
13
+ }
14
+
15
+ width: 100%;
16
+ min-height: 100vh;
17
+ margin: 0;
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ }
@@ -0,0 +1,32 @@
1
+ import { sprintf } from '@wordpress/i18n';
2
+ import { useI18n } from '@wordpress/react-i18n';
3
+
4
+ import './style.scss';
5
+
6
+ export interface StepCounterProps {
7
+ current: number;
8
+ total: number;
9
+ }
10
+
11
+ export const StepCounter = ( { current, total }: StepCounterProps ) => {
12
+ const { __ } = useI18n();
13
+
14
+ return (
15
+ <span
16
+ className="step-container-v2__step-counter"
17
+ aria-label={ sprintf(
18
+ /* translators: 1: current step number, 2: total number of steps. */
19
+ __( 'Step %1$d of %2$d', __i18n_text_domain__ ),
20
+ current,
21
+ total
22
+ ) }
23
+ >
24
+ { sprintf(
25
+ /* translators: 1: current step number, 2: total number of steps. */
26
+ __( '%1$d of %2$d', __i18n_text_domain__ ),
27
+ current,
28
+ total
29
+ ) }
30
+ </span>
31
+ );
32
+ };
@@ -0,0 +1,4 @@
1
+ .step-container-v2__step-counter {
2
+ color: var( --color-text-subtle );
3
+ white-space: nowrap;
4
+ }
@@ -0,0 +1,46 @@
1
+ import clsx from 'clsx';
2
+ import type { ReactNode } from 'react';
3
+
4
+ import './style.scss';
5
+
6
+ interface StickyBottomBarProps {
7
+ leftElement?: ReactNode;
8
+ centerElement?: ReactNode;
9
+ rightElement?: ReactNode;
10
+ noBoxShadow?: boolean;
11
+ hasTransparentBackground?: boolean;
12
+ centerText?: boolean;
13
+ fullWidth?: boolean;
14
+ }
15
+
16
+ export const StickyBottomBar = ( {
17
+ leftElement,
18
+ centerElement,
19
+ rightElement,
20
+ noBoxShadow,
21
+ hasTransparentBackground,
22
+ centerText,
23
+ fullWidth,
24
+ }: StickyBottomBarProps ) => {
25
+ return (
26
+ <div
27
+ className={ clsx( 'step-container-v2__sticky-bottom-bar', {
28
+ 'step-container-v2__sticky-bottom-bar--no-box-shadow': noBoxShadow === true,
29
+ 'step-container-v2__sticky-bottom-bar--center-text': centerText === true,
30
+ 'step-container-v2__sticky-bottom-bar--full-width': fullWidth === true,
31
+ 'step-container-v2__sticky-bottom-bar--has-transparent-background':
32
+ hasTransparentBackground === true,
33
+ } ) }
34
+ >
35
+ { leftElement && (
36
+ <div className="step-container-v2__sticky-bottom-bar-left-element">{ leftElement }</div>
37
+ ) }
38
+ { centerElement && (
39
+ <div className="step-container-v2__sticky-bottom-bar-center-element">{ centerElement }</div>
40
+ ) }
41
+ { rightElement && (
42
+ <div className="step-container-v2__sticky-bottom-bar-right-element">{ rightElement }</div>
43
+ ) }
44
+ </div>
45
+ );
46
+ };