@websolutespa/bom-mixer-ui 0.4.0 → 0.4.2

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 (486) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +429 -328
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/components/container/container.js +2 -2
  5. package/dist/esm/components/container/container.js.map +1 -1
  6. package/dist/esm/components/flex/flex-flow.js +1 -1
  7. package/dist/esm/components/grid/grid-row.js.map +1 -1
  8. package/dist/esm/components/grid/grid.js +1 -1
  9. package/dist/esm/components/utils.js +74 -39
  10. package/dist/esm/components/utils.js.map +1 -1
  11. package/dist/esm/forms/form-tester/form-tester.js +2 -2
  12. package/dist/esm/forms/form-tester/form-tester.js.map +1 -1
  13. package/dist/esm/forms/radio-card/radio-card.js +2 -2
  14. package/dist/esm/forms/radio-card/radio-card.js.map +1 -1
  15. package/dist/esm/hoc/with-page-transition/with-page-transition.js +1 -1
  16. package/dist/esm/index.js +1 -1
  17. package/dist/esm/lazy/carousel-1/carousel-1.js +2 -2
  18. package/dist/esm/lazy/carousel-1/carousel-1.js.map +1 -1
  19. package/dist/esm/lazy/download-1/download-1.js +1 -1
  20. package/dist/esm/lazy/media-full-2/media-full-2.js +1 -1
  21. package/dist/esm/lazy/media-full-2/media-full-2.js.map +1 -1
  22. package/dist/esm/lazy/media-media-1/media-media-1.js +1 -1
  23. package/dist/esm/lazy/media-media-1/media-media-1.js.map +1 -1
  24. package/dist/esm/lazy/not-found/not-found.js +2 -2
  25. package/dist/esm/lazy/related-1/related-1-card.js +1 -1
  26. package/dist/esm/lazy/related-1/related-1.js +1 -1
  27. package/dist/esm/lazy/sizes-colors-1/sizes-colors-1.js +1 -1
  28. package/dist/esm/lazy/text-1/text-1.js +1 -1
  29. package/dist/esm/lazy/text-aside-1/text-aside-1.js +3 -3
  30. package/dist/esm/lazy/text-aside-1/text-aside-1.js.map +1 -1
  31. package/dist/esm/lazy/text-media-1/text-media-1.js +4 -4
  32. package/dist/esm/lazy/text-media-1/text-media-1.js.map +1 -1
  33. package/dist/esm/lazy/text-text-1/text-text-1.js +1 -1
  34. package/dist/esm/lazy/text-text-1/text-text-1.js.map +1 -1
  35. package/dist/esm/sections/auth/auth-forgot-success.js +3 -3
  36. package/dist/esm/sections/auth/auth-forgot-success.js.map +1 -1
  37. package/dist/esm/sections/auth/auth-forgot.js +1 -1
  38. package/dist/esm/sections/auth/auth-login.js +1 -1
  39. package/dist/esm/sections/auth/auth-register-success.js +3 -3
  40. package/dist/esm/sections/auth/auth-register-success.js.map +1 -1
  41. package/dist/esm/sections/auth/auth-register.js +2 -2
  42. package/dist/esm/sections/auth/auth-register.js.map +1 -1
  43. package/dist/esm/sections/blog-more/blog-card.js +4 -4
  44. package/dist/esm/sections/blog-more/blog-card.js.map +1 -1
  45. package/dist/esm/sections/blog-more/blog-more.js +1 -1
  46. package/dist/esm/sections/blog-proposition/blog-proposition.js +4 -4
  47. package/dist/esm/sections/blog-proposition/blog-proposition.js.map +1 -1
  48. package/dist/esm/sections/cart-mini/cart-mini-item.js +2 -2
  49. package/dist/esm/sections/cart-mini/cart-mini-item.js.map +1 -1
  50. package/dist/esm/sections/cart-mini/cart-mini.js +1 -1
  51. package/dist/esm/sections/cart-mini/cart-mini.js.map +1 -1
  52. package/dist/esm/sections/categories-proposition/categories-proposition-card.js +2 -2
  53. package/dist/esm/sections/categories-proposition/categories-proposition-card.js.map +1 -1
  54. package/dist/esm/sections/categories-proposition/categories-proposition.js +1 -1
  55. package/dist/esm/sections/category-hero/category-hero.js +4 -4
  56. package/dist/esm/sections/category-hero/category-hero.js.map +1 -1
  57. package/dist/esm/sections/category-proposition/category-proposition.js +2 -2
  58. package/dist/esm/sections/category-proposition/category-proposition.js.map +1 -1
  59. package/dist/esm/sections/checkout/checkout-basket-item.js +4 -4
  60. package/dist/esm/sections/checkout/checkout-basket-item.js.map +1 -1
  61. package/dist/esm/sections/checkout/checkout-basket.js +5 -5
  62. package/dist/esm/sections/checkout/checkout-basket.js.map +1 -1
  63. package/dist/esm/sections/checkout/checkout-delivery.js +2 -2
  64. package/dist/esm/sections/checkout/checkout-delivery.js.map +1 -1
  65. package/dist/esm/sections/checkout/checkout-empty.js +2 -2
  66. package/dist/esm/sections/checkout/checkout-empty.js.map +1 -1
  67. package/dist/esm/sections/checkout/checkout-error.js +4 -4
  68. package/dist/esm/sections/checkout/checkout-error.js.map +1 -1
  69. package/dist/esm/sections/checkout/checkout-info.js +6 -6
  70. package/dist/esm/sections/checkout/checkout-info.js.map +1 -1
  71. package/dist/esm/sections/checkout/checkout-payment.js +1 -1
  72. package/dist/esm/sections/checkout/checkout-review.js +9 -9
  73. package/dist/esm/sections/checkout/checkout-review.js.map +1 -1
  74. package/dist/esm/sections/checkout/checkout-success.js +3 -3
  75. package/dist/esm/sections/checkout/checkout-success.js.map +1 -1
  76. package/dist/esm/sections/checkout/checkout-user-info.js +2 -2
  77. package/dist/esm/sections/checkout/checkout-user-info.js.map +1 -1
  78. package/dist/esm/sections/colors/colors.js +6 -6
  79. package/dist/esm/sections/colors/colors.js.map +1 -1
  80. package/dist/esm/sections/contact-card/contact-card.js +2 -2
  81. package/dist/esm/sections/contact-card/contact-card.js.map +1 -1
  82. package/dist/esm/sections/contact-hero/contact-hero.js +3 -3
  83. package/dist/esm/sections/contact-hero/contact-hero.js.map +1 -1
  84. package/dist/esm/sections/footer/footer.js +7 -7
  85. package/dist/esm/sections/footer/footer.js.map +1 -1
  86. package/dist/esm/sections/header/header-card.js +1 -1
  87. package/dist/esm/sections/header/header.js +4 -4
  88. package/dist/esm/sections/hero/hero.js +2 -2
  89. package/dist/esm/sections/icons/icons.js +3 -3
  90. package/dist/esm/sections/icons/icons.js.map +1 -1
  91. package/dist/esm/sections/magazine-related/magazine-related.js +1 -1
  92. package/dist/esm/sections/magazine-search/magazine-search-card.js +3 -3
  93. package/dist/esm/sections/magazine-search/magazine-search-card.js.map +1 -1
  94. package/dist/esm/sections/magazine-search/magazine-search-filters-modal.js +1 -1
  95. package/dist/esm/sections/magazine-search/magazine-search-filters-modal.js.map +1 -1
  96. package/dist/esm/sections/magazine-search/magazine-search-filters.js +1 -1
  97. package/dist/esm/sections/magazine-search/magazine-search-filters.js.map +1 -1
  98. package/dist/esm/sections/magazine-search/magazine-search.js +1 -1
  99. package/dist/esm/sections/magazine-search/magazine-search.js.map +1 -1
  100. package/dist/esm/sections/markets-and-languages/markets-and-languages-drawer.js +1 -1
  101. package/dist/esm/sections/markets-and-languages/markets-and-languages-drawer.js.map +1 -1
  102. package/dist/esm/sections/order/order-address.js +1 -1
  103. package/dist/esm/sections/order/order-item.js +8 -8
  104. package/dist/esm/sections/order/order-item.js.map +1 -1
  105. package/dist/esm/sections/order/order-register.js +4 -4
  106. package/dist/esm/sections/order/order-register.js.map +1 -1
  107. package/dist/esm/sections/order/order-summary-item.js +2 -2
  108. package/dist/esm/sections/order/order-summary-item.js.map +1 -1
  109. package/dist/esm/sections/order/order-summary.js +1 -1
  110. package/dist/esm/sections/product-overview/product-overview.js +11 -11
  111. package/dist/esm/sections/product-overview/product-overview.js.map +1 -1
  112. package/dist/esm/sections/products-detail-download/products-detail-download.js +1 -1
  113. package/dist/esm/sections/products-detail-related/products-detail-related-card.js +1 -1
  114. package/dist/esm/sections/products-detail-related/products-detail-related.js +1 -1
  115. package/dist/esm/sections/products-detail-size-color/products-detail-size-color.js +1 -1
  116. package/dist/esm/sections/products-hero/products-hero-card.js +2 -2
  117. package/dist/esm/sections/products-hero/products-hero-card.js.map +1 -1
  118. package/dist/esm/sections/products-hero/products-hero.js +1 -1
  119. package/dist/esm/sections/products-hero/products-hero.js.map +1 -1
  120. package/dist/esm/sections/products-proposition/products-proposition-card.js +3 -3
  121. package/dist/esm/sections/products-proposition/products-proposition-card.js.map +1 -1
  122. package/dist/esm/sections/products-related/products-related-card.js +3 -3
  123. package/dist/esm/sections/products-related/products-related-card.js.map +1 -1
  124. package/dist/esm/sections/products-related/products-related.js +1 -1
  125. package/dist/esm/sections/products-search/products-search-card.js +1 -1
  126. package/dist/esm/sections/products-search/products-search-card.js.map +1 -1
  127. package/dist/esm/sections/products-search/products-search-filters-modal.js +1 -1
  128. package/dist/esm/sections/products-search/products-search-filters-modal.js.map +1 -1
  129. package/dist/esm/sections/products-search/products-search-filters.js +1 -1
  130. package/dist/esm/sections/products-search/products-search-filters.js.map +1 -1
  131. package/dist/esm/sections/products-search/products-search-recap.js +1 -1
  132. package/dist/esm/sections/products-search/products-search-recap.js.map +1 -1
  133. package/dist/esm/sections/products-search/products-search.js +2 -2
  134. package/dist/esm/sections/products-search/products-search.js.map +1 -1
  135. package/dist/esm/sections/proposition/proposition.js +1 -1
  136. package/dist/esm/sections/shop-category-hero/shop-category-hero.js +2 -2
  137. package/dist/esm/sections/shop-detail-related/shop-detail-related-card.js +1 -1
  138. package/dist/esm/sections/shop-detail-related/shop-detail-related-card.js.map +1 -1
  139. package/dist/esm/sections/shop-detail-related/shop-detail-related.js +1 -1
  140. package/dist/esm/sections/shop-hero/shop-hero-card.js +2 -2
  141. package/dist/esm/sections/shop-hero/shop-hero-card.js.map +1 -1
  142. package/dist/esm/sections/shop-hero/shop-hero.js +2 -2
  143. package/dist/esm/sections/shop-hero/shop-hero.js.map +1 -1
  144. package/dist/esm/sections/shop-incentive/shop-incentive.js +6 -6
  145. package/dist/esm/sections/shop-incentive/shop-incentive.js.map +1 -1
  146. package/dist/esm/sections/shop-items-proposition/shop-items-proposition-card.js +3 -3
  147. package/dist/esm/sections/shop-items-proposition/shop-items-proposition-card.js.map +1 -1
  148. package/dist/esm/sections/shop-search/shop-search-card.js +3 -3
  149. package/dist/esm/sections/shop-search/shop-search-card.js.map +1 -1
  150. package/dist/esm/sections/shop-search/shop-search-filters-modal.js +1 -1
  151. package/dist/esm/sections/shop-search/shop-search-filters-modal.js.map +1 -1
  152. package/dist/esm/sections/shop-search/shop-search-recap.js +1 -1
  153. package/dist/esm/sections/shop-search/shop-search-recap.js.map +1 -1
  154. package/dist/esm/sections/shop-search/shop-search.js +4 -4
  155. package/dist/esm/sections/shop-search/shop-search.js.map +1 -1
  156. package/dist/esm/sections/split/split.js +3 -3
  157. package/dist/esm/sections/split/split.js.map +1 -1
  158. package/dist/esm/sections/store-locator/store-locator-search.js +3 -3
  159. package/dist/esm/sections/store-locator/store-locator-search.js.map +1 -1
  160. package/dist/esm/sections/swiper-hero/swiper-hero.js +2 -2
  161. package/dist/esm/theme/global.vars.js +81 -42
  162. package/dist/esm/theme/global.vars.js.map +1 -1
  163. package/dist/esm/theme/theme.json.js +56 -35
  164. package/dist/esm/theme/theme.json.js.map +1 -1
  165. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  166. package/dist/types/components/button/button.d.ts +3 -3
  167. package/dist/types/components/button/button.d.ts.map +1 -1
  168. package/dist/types/components/button/button.variants.d.ts +32 -31
  169. package/dist/types/components/button/button.variants.d.ts.map +1 -1
  170. package/dist/types/components/container/container.d.ts +7 -8
  171. package/dist/types/components/container/container.d.ts.map +1 -1
  172. package/dist/types/components/css.d.ts +1 -1
  173. package/dist/types/components/grid/grid-row.d.ts +4 -2
  174. package/dist/types/components/grid/grid-row.d.ts.map +1 -1
  175. package/dist/types/components/utils.d.ts +12 -5
  176. package/dist/types/components/utils.d.ts.map +1 -1
  177. package/dist/types/forms/custom-select/custom-select.d.ts +1 -1
  178. package/dist/types/sections/colors/colors.d.ts.map +1 -1
  179. package/dist/types/theme/global.vars.d.ts.map +1 -1
  180. package/dist/types/theme/types.d.ts +19 -17
  181. package/dist/types/theme/types.d.ts.map +1 -1
  182. package/dist/types/useVariants/useVariants.d.ts +3 -14
  183. package/dist/types/useVariants/useVariants.d.ts.map +1 -1
  184. package/package.json +3 -3
  185. package/src/__tests/example.test.ts +8 -0
  186. package/src/components/accordion/accordion-context.ts +14 -0
  187. package/src/components/accordion/accordion-group.tsx +82 -0
  188. package/src/components/accordion/accordion-icon.tsx +37 -0
  189. package/src/components/accordion/accordion.tsx +132 -0
  190. package/src/components/backdrop/backdrop.tsx +156 -0
  191. package/src/components/background/background.tsx +35 -0
  192. package/src/components/badge/badge.tsx +21 -0
  193. package/src/components/box/box.tsx +12 -0
  194. package/src/components/breadcrumb/breadcrumb-item.tsx +53 -0
  195. package/src/components/breadcrumb/breadcrumb-separator.tsx +33 -0
  196. package/src/components/breadcrumb/breadcrumb.group.tsx +27 -0
  197. package/src/components/breadcrumb/breadcrumb.tsx +77 -0
  198. package/src/components/breakpoint/breakpoint.tsx +46 -0
  199. package/src/components/button/__snapshots__/button.test.tsx.snap +61 -0
  200. package/src/components/button/button.test.enzyme.example +132 -0
  201. package/src/components/button/button.test.tsx +33 -0
  202. package/src/components/button/button.tsx +36 -0
  203. package/src/components/button/button.variants.ts +316 -0
  204. package/src/components/button-group/button-group.tsx +102 -0
  205. package/src/components/card/card-content.tsx +13 -0
  206. package/src/components/card/card-footer.tsx +18 -0
  207. package/src/components/card/card.tsx +144 -0
  208. package/src/components/carousel/carousel.tsx +62 -0
  209. package/src/components/carousel/slide.tsx +28 -0
  210. package/src/components/code/code.tsx +17 -0
  211. package/src/components/container/container.tsx +32 -0
  212. package/src/components/css.ts +292 -0
  213. package/src/components/divider/divider.tsx +54 -0
  214. package/src/components/drawer/drawer-wrapper.tsx +154 -0
  215. package/src/components/drawer/drawer.tsx +110 -0
  216. package/src/components/drawer/helper.ts +33 -0
  217. package/src/components/dropdown/dropdown-layout.ts +94 -0
  218. package/src/components/dropdown/dropdown.tsx +132 -0
  219. package/src/components/ellipsis/ellipsis.tsx +18 -0
  220. package/src/components/expand/expand.tsx +97 -0
  221. package/src/components/flex/flex-col.tsx +16 -0
  222. package/src/components/flex/flex-flow.tsx +165 -0
  223. package/src/components/flex/flex-responsive.tsx +28 -0
  224. package/src/components/flex/flex-row.tsx +18 -0
  225. package/src/components/flex/flex.tsx +29 -0
  226. package/src/components/google-map/google-map-context.ts +15 -0
  227. package/src/components/google-map/google-map-hooks._ts +28 -0
  228. package/src/components/google-map/google-map-info-window.tsx +68 -0
  229. package/src/components/google-map/google-map-loader.tsx +67 -0
  230. package/src/components/google-map/google-map-marker-clusterer-plus.tsx +104 -0
  231. package/src/components/google-map/google-map-marker-clusterer.tsx +126 -0
  232. package/src/components/google-map/google-map-marker.tsx +48 -0
  233. package/src/components/google-map/google-map-skeleton.tsx +6 -0
  234. package/src/components/google-map/google-map.service.ts +236 -0
  235. package/src/components/google-map/google-map.style.ts +80 -0
  236. package/src/components/google-map/google-map.tsx +136 -0
  237. package/src/components/google-map/types.tsx +47 -0
  238. package/src/components/google-map/useGoogleMaps._ts +37 -0
  239. package/src/components/grid/grid-row.tsx +19 -0
  240. package/src/components/grid/grid.tsx +55 -0
  241. package/src/components/highlight/highlight.tsx +79 -0
  242. package/src/components/index.ts +50 -0
  243. package/src/components/infinite-loader/infinite-loader.tsx +59 -0
  244. package/src/components/layout/layout.tsx +22 -0
  245. package/src/components/link/link-icon.tsx +25 -0
  246. package/src/components/link/link.tsx +63 -0
  247. package/src/components/list/list.tsx +24 -0
  248. package/src/components/loading/loading.tsx +51 -0
  249. package/src/components/media/media-image-next.tsx +43 -0
  250. package/src/components/media/media-image.tsx +110 -0
  251. package/src/components/media/media.tsx +195 -0
  252. package/src/components/media-gallery/media-gallery-context.tsx +14 -0
  253. package/src/components/media-gallery/media-gallery-navigation.tsx +68 -0
  254. package/src/components/media-gallery/media-gallery.tsx +163 -0
  255. package/src/components/meta/meta.tsx +33 -0
  256. package/src/components/modal/modal-button.tsx +103 -0
  257. package/src/components/modal/modal-close.tsx +67 -0
  258. package/src/components/modal/modal-content.tsx +46 -0
  259. package/src/components/modal/modal-context.ts +11 -0
  260. package/src/components/modal/modal-footer.tsx +40 -0
  261. package/src/components/modal/modal-subtitle.tsx +36 -0
  262. package/src/components/modal/modal-title.tsx +36 -0
  263. package/src/components/modal/modal-wrapper.tsx +119 -0
  264. package/src/components/modal/modal.tsx +138 -0
  265. package/src/components/nav/nav.tsx +71 -0
  266. package/src/components/nav-link/nav-link.tsx +32 -0
  267. package/src/components/page/page.tsx +13 -0
  268. package/src/components/page-nav/page-nav.tsx +120 -0
  269. package/src/components/pagination/pagination-context.ts +18 -0
  270. package/src/components/pagination/pagination-ellipsis.tsx +61 -0
  271. package/src/components/pagination/pagination-item.tsx +92 -0
  272. package/src/components/pagination/pagination-next.tsx +16 -0
  273. package/src/components/pagination/pagination-pages.tsx +90 -0
  274. package/src/components/pagination/pagination-previous.tsx +16 -0
  275. package/src/components/pagination/pagination.tsx +108 -0
  276. package/src/components/popover/popover-collections.tsx +157 -0
  277. package/src/components/popover/popover-context.ts +17 -0
  278. package/src/components/popover/popover-item.tsx +85 -0
  279. package/src/components/popover/popover.tsx +102 -0
  280. package/src/components/section/section.tsx +62 -0
  281. package/src/components/skeleton/skeleton.tsx +31 -0
  282. package/src/components/svg/svg.tsx +10 -0
  283. package/src/components/swiper/swiper-navigation.tsx +68 -0
  284. package/src/components/swiper/swiper-pagination.tsx +79 -0
  285. package/src/components/swiper/swiper.tsx +45 -0
  286. package/src/components/tabs/tabs-context.ts +31 -0
  287. package/src/components/tabs/tabs-item.tsx +148 -0
  288. package/src/components/tabs/tabs.tsx +169 -0
  289. package/src/components/text/text.tsx +101 -0
  290. package/src/components/tooltip/tooltip-content.tsx +112 -0
  291. package/src/components/tooltip/tooltip-helper.tsx +35 -0
  292. package/src/components/tooltip/tooltip-icon.tsx +32 -0
  293. package/src/components/tooltip/tooltip-placement.ts +196 -0
  294. package/src/components/tooltip/tooltip-props.ts +77 -0
  295. package/src/components/tooltip/tooltip.tsx +129 -0
  296. package/src/components/transition/transition.tsx +63 -0
  297. package/src/components/types.ts +144 -0
  298. package/src/components/utils.ts +236 -0
  299. package/src/custom.d.ts +4 -0
  300. package/src/fields/field-accept.tsx +65 -0
  301. package/src/fields/field-autocomplete.tsx +113 -0
  302. package/src/fields/field-card.tsx +69 -0
  303. package/src/fields/field-checkbox.tsx +67 -0
  304. package/src/fields/field-collection.tsx +71 -0
  305. package/src/fields/field-error.tsx +28 -0
  306. package/src/fields/field-password.tsx +72 -0
  307. package/src/fields/field-select.tsx +67 -0
  308. package/src/fields/field-text.tsx +66 -0
  309. package/src/fields/fields.tsx +31 -0
  310. package/src/fields/index.ts +10 -0
  311. package/src/forms/autocomplete/autocomplete-context.ts +25 -0
  312. package/src/forms/autocomplete/autocomplete-dropdown.tsx +55 -0
  313. package/src/forms/autocomplete/autocomplete-highlight.ts +32 -0
  314. package/src/forms/autocomplete/autocomplete.tsx +279 -0
  315. package/src/forms/checkbox/checkbox-icon.tsx +43 -0
  316. package/src/forms/checkbox/checkbox.tsx +66 -0
  317. package/src/forms/custom-select/custom-select-context.ts +22 -0
  318. package/src/forms/custom-select/custom-select-divider.tsx +28 -0
  319. package/src/forms/custom-select/custom-select-dropdown.tsx +55 -0
  320. package/src/forms/custom-select/custom-select-icon-clear.tsx +23 -0
  321. package/src/forms/custom-select/custom-select-icon.tsx +25 -0
  322. package/src/forms/custom-select/custom-select-input.tsx +56 -0
  323. package/src/forms/custom-select/custom-select-label.tsx +39 -0
  324. package/src/forms/custom-select/custom-select-multiple-value.tsx +59 -0
  325. package/src/forms/custom-select/custom-select-option.tsx +126 -0
  326. package/src/forms/custom-select/custom-select.tsx +313 -0
  327. package/src/forms/field/field.tsx +34 -0
  328. package/src/forms/form/form.tsx +30 -0
  329. package/src/forms/form-error/form-error.tsx +32 -0
  330. package/src/forms/form-tester/form-tester.tsx +38 -0
  331. package/src/forms/index.ts +19 -0
  332. package/src/forms/input/input.tsx +123 -0
  333. package/src/forms/input-group/input-group.tsx +74 -0
  334. package/src/forms/label/label.tsx +31 -0
  335. package/src/forms/radio/radio-group.tsx +78 -0
  336. package/src/forms/radio/radio-icon.tsx +43 -0
  337. package/src/forms/radio/radio.tsx +72 -0
  338. package/src/forms/radio-card/radio-card-group.tsx +70 -0
  339. package/src/forms/radio-card/radio-card.tsx +233 -0
  340. package/src/forms/radio-color/radio-color-group.tsx +66 -0
  341. package/src/forms/radio-color/radio-color.tsx +100 -0
  342. package/src/forms/radio-option/radio-option-group.tsx +66 -0
  343. package/src/forms/radio-option/radio-option.tsx +131 -0
  344. package/src/forms/rating/rating-icon.tsx +30 -0
  345. package/src/forms/rating/rating.tsx +126 -0
  346. package/src/forms/select/select.tsx +90 -0
  347. package/src/forms/textarea/textarea.tsx +71 -0
  348. package/src/hoc/index.ts +2 -0
  349. package/src/hoc/with-page-transition/with-page-transition.tsx +73 -0
  350. package/src/index.ts +12 -0
  351. package/src/lazy/carousel-1/carousel-1.tsx +91 -0
  352. package/src/lazy/download-1/download-1.tsx +45 -0
  353. package/src/lazy/index.ts +2 -0
  354. package/src/lazy/lazy-loader/lazy-loader-client.tsx +48 -0
  355. package/src/lazy/lazy-loader/lazy-loader.tsx +27 -0
  356. package/src/lazy/lazy.ts +28 -0
  357. package/src/lazy/media-full-1/media-full-1.tsx +26 -0
  358. package/src/lazy/media-full-2/media-full-2.tsx +31 -0
  359. package/src/lazy/media-media-1/media-media-1.tsx +37 -0
  360. package/src/lazy/not-found/not-found.tsx +31 -0
  361. package/src/lazy/related-1/related-1-card.tsx +59 -0
  362. package/src/lazy/related-1/related-1.tsx +44 -0
  363. package/src/lazy/sizes-colors-1/sizes-colors-1.tsx +54 -0
  364. package/src/lazy/text-1/text-1.tsx +34 -0
  365. package/src/lazy/text-aside-1/text-aside-1.tsx +52 -0
  366. package/src/lazy/text-media-1/text-media-1.tsx +45 -0
  367. package/src/lazy/text-text-1/text-text-1.tsx +32 -0
  368. package/src/sections/auth/auth-change-password.tsx +90 -0
  369. package/src/sections/auth/auth-drawer.tsx +22 -0
  370. package/src/sections/auth/auth-forgot-success.tsx +25 -0
  371. package/src/sections/auth/auth-forgot.tsx +98 -0
  372. package/src/sections/auth/auth-login.tsx +114 -0
  373. package/src/sections/auth/auth-register-success.tsx +25 -0
  374. package/src/sections/auth/auth-register.tsx +107 -0
  375. package/src/sections/auth/auth-update.tsx +91 -0
  376. package/src/sections/auth/auth.tsx +46 -0
  377. package/src/sections/blog-more/blog-card.tsx +58 -0
  378. package/src/sections/blog-more/blog-more.tsx +81 -0
  379. package/src/sections/blog-proposition/blog-proposition.tsx +58 -0
  380. package/src/sections/cart-mini/cart-mini-item.tsx +58 -0
  381. package/src/sections/cart-mini/cart-mini.tsx +76 -0
  382. package/src/sections/categories-proposition/categories-proposition-card.tsx +34 -0
  383. package/src/sections/categories-proposition/categories-proposition.tsx +39 -0
  384. package/src/sections/category-hero/category-hero.tsx +47 -0
  385. package/src/sections/category-proposition/category-proposition.tsx +49 -0
  386. package/src/sections/checkout/checkout-basket-item.tsx +64 -0
  387. package/src/sections/checkout/checkout-basket.tsx +115 -0
  388. package/src/sections/checkout/checkout-delivery.tsx +121 -0
  389. package/src/sections/checkout/checkout-discount.tsx +61 -0
  390. package/src/sections/checkout/checkout-empty.tsx +28 -0
  391. package/src/sections/checkout/checkout-error.tsx +31 -0
  392. package/src/sections/checkout/checkout-forgot-success.tsx +41 -0
  393. package/src/sections/checkout/checkout-forgot.tsx +55 -0
  394. package/src/sections/checkout/checkout-info.tsx +142 -0
  395. package/src/sections/checkout/checkout-login.tsx +56 -0
  396. package/src/sections/checkout/checkout-payment.tsx +120 -0
  397. package/src/sections/checkout/checkout-register-success.tsx +41 -0
  398. package/src/sections/checkout/checkout-register.tsx +48 -0
  399. package/src/sections/checkout/checkout-review.tsx +243 -0
  400. package/src/sections/checkout/checkout-success.tsx +57 -0
  401. package/src/sections/checkout/checkout-user-info.tsx +204 -0
  402. package/src/sections/checkout/checkout-wizard.tsx +157 -0
  403. package/src/sections/colors/colors.tsx +39 -0
  404. package/src/sections/contact-card/contact-card.tsx +104 -0
  405. package/src/sections/contact-form/contact-form.tsx +107 -0
  406. package/src/sections/contact-hero/contact-hero.tsx +54 -0
  407. package/src/sections/footer/footer.tsx +98 -0
  408. package/src/sections/header/header-card.tsx +36 -0
  409. package/src/sections/header/header-submenu.tsx +117 -0
  410. package/src/sections/header/header.tsx +306 -0
  411. package/src/sections/hero/hero.tsx +41 -0
  412. package/src/sections/icons/icons.tsx +74 -0
  413. package/src/sections/index.ts +70 -0
  414. package/src/sections/magazine-related/magazine-related.tsx +88 -0
  415. package/src/sections/magazine-search/magazine-search-card.tsx +46 -0
  416. package/src/sections/magazine-search/magazine-search-filters-modal.tsx +22 -0
  417. package/src/sections/magazine-search/magazine-search-filters.tsx +48 -0
  418. package/src/sections/magazine-search/magazine-search-recap.tsx +55 -0
  419. package/src/sections/magazine-search/magazine-search.tsx +151 -0
  420. package/src/sections/markets-and-languages/markets-and-languages-drawer.tsx +58 -0
  421. package/src/sections/order/order-address.tsx +22 -0
  422. package/src/sections/order/order-item.tsx +55 -0
  423. package/src/sections/order/order-register.tsx +105 -0
  424. package/src/sections/order/order-summary-item.tsx +38 -0
  425. package/src/sections/order/order-summary.tsx +72 -0
  426. package/src/sections/product-overview/product-overview-gallery.tsx +48 -0
  427. package/src/sections/product-overview/product-overview.tsx +112 -0
  428. package/src/sections/products-detail-download/products-detail-download.tsx +49 -0
  429. package/src/sections/products-detail-related/products-detail-related-card.tsx +59 -0
  430. package/src/sections/products-detail-related/products-detail-related.tsx +43 -0
  431. package/src/sections/products-detail-size-color/products-detail-size-color.tsx +57 -0
  432. package/src/sections/products-hero/products-hero-card.tsx +26 -0
  433. package/src/sections/products-hero/products-hero.tsx +54 -0
  434. package/src/sections/products-proposition/products-proposition-card.tsx +38 -0
  435. package/src/sections/products-proposition/products-proposition.tsx +27 -0
  436. package/src/sections/products-related/products-related-card.tsx +56 -0
  437. package/src/sections/products-related/products-related.tsx +30 -0
  438. package/src/sections/products-search/products-search-card.tsx +60 -0
  439. package/src/sections/products-search/products-search-filters-modal.tsx +22 -0
  440. package/src/sections/products-search/products-search-filters.tsx +92 -0
  441. package/src/sections/products-search/products-search-recap.tsx +55 -0
  442. package/src/sections/products-search/products-search.tsx +162 -0
  443. package/src/sections/proposition/proposition.tsx +32 -0
  444. package/src/sections/reserved_area/reserved_area.tsx +51 -0
  445. package/src/sections/reserved_area_menu/reserved_area_menu.tsx +67 -0
  446. package/src/sections/shop-category-hero/shop-category-hero.tsx +71 -0
  447. package/src/sections/shop-detail-related/shop-detail-related-card.tsx +59 -0
  448. package/src/sections/shop-detail-related/shop-detail-related.tsx +40 -0
  449. package/src/sections/shop-hero/shop-hero-card.tsx +26 -0
  450. package/src/sections/shop-hero/shop-hero.tsx +53 -0
  451. package/src/sections/shop-incentive/shop-incentive.tsx +46 -0
  452. package/src/sections/shop-items-proposition/shop-items-proposition-card.tsx +38 -0
  453. package/src/sections/shop-items-proposition/shop-items-proposition.tsx +28 -0
  454. package/src/sections/shop-search/shop-search-card.tsx +60 -0
  455. package/src/sections/shop-search/shop-search-filters-modal.tsx +22 -0
  456. package/src/sections/shop-search/shop-search-filters.tsx +53 -0
  457. package/src/sections/shop-search/shop-search-recap.tsx +45 -0
  458. package/src/sections/shop-search/shop-search.tsx +270 -0
  459. package/src/sections/split/split.tsx +60 -0
  460. package/src/sections/store-locator/store-locator-all.json +7433 -0
  461. package/src/sections/store-locator/store-locator-dots.tsx +1315 -0
  462. package/src/sections/store-locator/store-locator-features.json +26 -0
  463. package/src/sections/store-locator/store-locator-head._tsx +39 -0
  464. package/src/sections/store-locator/store-locator-search.tsx +417 -0
  465. package/src/sections/swiper-hero/swiper-hero.tsx +80 -0
  466. package/src/sections/test-framer-carousel/test-framer-carousel.tsx +56 -0
  467. package/src/sections/typography/typography.tsx +54 -0
  468. package/src/theme/global.style.ts +34 -0
  469. package/src/theme/global.vars.scss +134 -0
  470. package/src/theme/global.vars.ts +168 -0
  471. package/src/theme/index.ts +14 -0
  472. package/src/theme/mixins/_breakpoints.scss +101 -0
  473. package/src/theme/mixins/_fluid.scss +3 -0
  474. package/src/theme/mixins/_mixins.scss +3 -0
  475. package/src/theme/mixins/_scrollbar.scss +36 -0
  476. package/src/theme/styled.d.ts +13 -0
  477. package/src/theme/styles/_base.ts +15 -0
  478. package/src/theme/styles/_debug.ts +8 -0
  479. package/src/theme/styles/_print.ts +16 -0
  480. package/src/theme/styles/_reset.ts +234 -0
  481. package/src/theme/styles/_typography.ts +27 -0
  482. package/src/theme/styles/mixins/_scrollbar.ts +54 -0
  483. package/src/theme/theme.json +213 -0
  484. package/src/theme/types.ts +81 -0
  485. package/src/useVariants/useVariants.tsx +35 -0
  486. package/src/utils/index.ts +5 -0
@@ -0,0 +1,58 @@
1
+ import { IMedia } from '@websolutespa/bom-core';
2
+ import { useDateTimeFormat } from '@websolutespa/bom-mixer-hooks';
3
+ import { IconArrowRight } from '@websolutespa/bom-mixer-icons';
4
+ import Link from 'next/link';
5
+ import { Button, Card, Flex, Media, Text } from '../../components';
6
+ import { UIStyledComponentProps } from '../../components/types';
7
+
8
+ type Props = {
9
+ item: BlogItem
10
+ };
11
+
12
+ export type BlogItem = {
13
+ id: number;
14
+ href: string;
15
+ title: string;
16
+ abstract: string;
17
+ date: string | Date;
18
+ media: IMedia;
19
+ author: {
20
+ fullName: string;
21
+ media: IMedia;
22
+ };
23
+ };
24
+
25
+ export type BlogCardProps = UIStyledComponentProps<Props, 'a'>;
26
+
27
+ export const BlogCard: React.FC<BlogCardProps> = ({ item, ...props }: BlogCardProps) => {
28
+ const dateTimeFormat = useDateTimeFormat({
29
+ year: 'numeric',
30
+ month: 'long',
31
+ day: 'numeric'
32
+ });
33
+ return (
34
+ <Link href={item.href} passHref>
35
+ <Card as="a" height="100%" hoverable {...props}>
36
+ <Media aspectRatio={4 / 3} aspectRatioMd={5 / 3} borderRadius="0.4rem" marginBottom="1rem" item={item.media} />
37
+ <Card.Content flex="1">
38
+ <Text variant="heading20">{item.title}</Text>
39
+ <Text variant="paragraph10" marginBottom="1rem">{dateTimeFormat(item.date)}</Text>
40
+ <Text variant="paragraph10">{item.abstract}</Text>
41
+ </Card.Content>
42
+ <Card.Footer marginTop="1rem">
43
+ <Flex.Row justifyContent="space-between">
44
+ <Flex>
45
+ <Media width="3rem" height="3rem" marginRight="0.75rem" circle item={item.author.media} />
46
+ <Text variant="paragraph10" fontWeight="700">{item.author.fullName}</Text>
47
+ </Flex>
48
+ {false &&
49
+ <Link href={item.href} passHref>
50
+ <Button as="a" variant="link"><Text>Read more</Text> <IconArrowRight /></Button>
51
+ </Link>
52
+ }
53
+ </Flex.Row>
54
+ </Card.Footer>
55
+ </Card>
56
+ </Link>
57
+ );
58
+ };
@@ -0,0 +1,81 @@
1
+ import Link from 'next/link';
2
+ import { Button, Card, Container, Flex, Grid, Media, MediaImage, Section, Text } from '../../components';
3
+ import { UIComponentProps } from '../../components/types';
4
+ import { BlogCard, BlogItem } from './blog-card';
5
+
6
+ type Props = {
7
+ items: BlogItem[],
8
+ };
9
+
10
+ export type BlogMoreProps = UIComponentProps<Props>;
11
+
12
+ export const BlogMore: React.FC<BlogMoreProps> = ({ items }: BlogMoreProps) => {
13
+ return (
14
+ <Section padding="3rem 0">
15
+ <Container>
16
+ <Text variant="display30" fontWeight="700" marginBottom="3rem">More Stories</Text>
17
+ {items && (
18
+ <Grid.Row rowGap="3rem">
19
+ {items.map((item, i) => (
20
+ <Grid sm={6} key={i}>
21
+ <BlogCard item={item}></BlogCard>
22
+ </Grid>
23
+ ))}
24
+ </Grid.Row>
25
+ )}
26
+ {false &&
27
+ <Grid.Row rowGap="3rem">
28
+ <Grid sm={6}>
29
+ <Card>
30
+ <Media aspectRatio={4 / 3} aspectRatioMd={5 / 3} marginBottom="1rem">
31
+ <MediaImage src={'https://picsum.photos/640/480?u=2'} />
32
+ </Media>
33
+ <Card.Content>
34
+ <Link href="/#we-choose-to-go-to-the-moon" passHref>
35
+ <Button as="a" variant="link" marginBottom="1rem">
36
+ <Text variant="heading20">We choose to go to the moon.</Text>
37
+ </Button>
38
+ </Link>
39
+ <Text variant="paragraph10" marginBottom="1rem">March 8, 2020</Text>
40
+ <Text variant="paragraph10">We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.</Text>
41
+ </Card.Content>
42
+ <Card.Footer marginTop="1rem">
43
+ <Flex.Row>
44
+ <Media width="3rem" height="3rem" circle>
45
+ <MediaImage src="https://i.pravatar.cc/128?u=3" />
46
+ </Media>
47
+ <Text variant="paragraph10" fontWeight="700">Joe Haddad</Text>
48
+ </Flex.Row>
49
+ </Card.Footer>
50
+ </Card>
51
+ </Grid>
52
+ <Grid sm={6}>
53
+ <Card>
54
+ <Media aspectRatio={4 / 3} aspectRatioMd={5 / 3} marginBottom="1rem">
55
+ <MediaImage src={'https://picsum.photos/640/480?u=4'} />
56
+ </Media>
57
+ <Card.Content>
58
+ <Link href="/#the-view-of-the-earth-from-the-moon" passHref>
59
+ <Button as="a" variant="link" marginBottom="1rem">
60
+ <Text variant="heading20">The earth from the moon.</Text>
61
+ </Button>
62
+ </Link>
63
+ <Text variant="paragraph10" marginBottom="1rem">March 8, 2020</Text>
64
+ <Text variant="paragraph10">A small disk, 240,000 mniles away. It was hard to think that that little thing held so many problems, so many frustrations. But the samw wayward stranger would certainly know instinctively that if the earth were inhabited, then the destinies of all who lived on it must inevitably be interwoven and joined. We are one hunk of ground, water, air, clouds, floating around in space. From out there it really is &lsquo;one world&rsquo;.</Text>
65
+ </Card.Content>
66
+ <Card.Footer marginTop="1rem">
67
+ <Flex.Row>
68
+ <Media width="3rem" height="3rem" circle>
69
+ <MediaImage src="https://i.pravatar.cc/128?u=5" />
70
+ </Media>
71
+ <Text variant="paragraph10" fontWeight="700">JJ Kasper</Text>
72
+ </Flex.Row>
73
+ </Card.Footer>
74
+ </Card>
75
+ </Grid>
76
+ </Grid.Row>
77
+ }
78
+ </Container>
79
+ </Section>
80
+ );
81
+ };
@@ -0,0 +1,58 @@
1
+ import { IMedia } from '@websolutespa/bom-core';
2
+ import { useDateTimeFormat } from '@websolutespa/bom-mixer-hooks';
3
+ import { IconArrowRight } from '@websolutespa/bom-mixer-icons';
4
+ import Link from 'next/link';
5
+ import { Button, Container, Flex, Grid, Media, Section, Text } from '../../components';
6
+ import { UIComponentProps } from '../../components/types';
7
+
8
+ type Props = {
9
+ item: BlogPropositionItem
10
+ };
11
+
12
+ export type BlogPropositionItem = {
13
+ id: number;
14
+ href: string;
15
+ title: string;
16
+ abstract: string;
17
+ date: string | Date;
18
+ author: {
19
+ fullName: string;
20
+ media: IMedia;
21
+ };
22
+ };
23
+
24
+ export type BlogPropositionProps = UIComponentProps<Props>;
25
+
26
+ export const BlogProposition: React.FC<BlogPropositionProps> = ({ item, ...props }: BlogPropositionProps) => {
27
+ const dateTimeFormat = useDateTimeFormat({
28
+ year: 'numeric',
29
+ month: 'long',
30
+ day: 'numeric'
31
+ });
32
+ return (
33
+ <Section padding="3rem 0">
34
+ <Container>
35
+ <Grid.Row>
36
+ <Grid md={6}>
37
+ <Text variant="heading10" marginBottom="1rem">{item.title}</Text>
38
+ <Text variant="paragraph10" marginBottom="1rem">{dateTimeFormat(item.date)}</Text>
39
+ </Grid>
40
+ <Grid md={6}>
41
+ <Text variant="paragraph10" maxWidth="60ch">{item.abstract}</Text>
42
+ <Flex.Row justifyContent="space-between" marginTop="1rem">
43
+ <Flex>
44
+ <Media width="3rem" height="3rem" marginRight="0.75rem" circle item={item.author.media} />
45
+ <Text variant="paragraph10" fontWeight="700">{item.author.fullName}</Text>
46
+ </Flex>
47
+ {false &&
48
+ <Link href={item.href} passHref>
49
+ <Button as="a" variant="link"><Text>Read more</Text> <IconArrowRight /></Button>
50
+ </Link>
51
+ }
52
+ </Flex.Row>
53
+ </Grid>
54
+ </Grid.Row>
55
+ </Container>
56
+ </Section>
57
+ );
58
+ };
@@ -0,0 +1,58 @@
1
+ import { useCart, useCurrency, useDrawer, useMounted } from '@websolutespa/bom-mixer-hooks';
2
+ import { IconMinus, IconPlus, IconTrash } from '@websolutespa/bom-mixer-icons';
3
+ import { ICartItem } from '@websolutespa/bom-mixer-models';
4
+ import NextLink from 'next/link';
5
+ import { Button, Card, Flex, Media, MediaImage, Text } from '../../components';
6
+ import { Input } from '../../forms';
7
+
8
+ export const CartMiniItem: React.FC<{ item: ICartItem }> = ({ item }: { item: ICartItem }) => {
9
+
10
+ const currency = useCurrency();
11
+
12
+ const [drawer, openDrawer, closeDrawer] = useDrawer();
13
+ const { update, remove } = useCart(state => state.actions);
14
+
15
+ function onSetQty(qty: number) {
16
+ if (qty > 0) {
17
+ update({ ...item, qty });
18
+ } else {
19
+ onRemove();
20
+ }
21
+ }
22
+
23
+ function onRemove() {
24
+ const count = remove(item);
25
+ console.log('count', count);
26
+ if (count < 1) {
27
+ closeDrawer();
28
+ }
29
+ }
30
+
31
+ const mounted = useMounted();
32
+ return (
33
+ <>
34
+ <Card marginBottom="2rem" paddingBottom="1rem" borderBottom="1px solid var(--color-neutral-300)">
35
+ <Flex.Row alignItems="flex-start">
36
+ <Flex>
37
+ <Media aspectRatio={1} width="80px" height="80px" flex="0 0 80px" rounded>
38
+ <MediaImage width="80px" height="80px" src={item.media.src} draggable={false} title={item.title} />
39
+ </Media>
40
+ </Flex>
41
+ <Card.Content flex="1" padding="0 1rem">
42
+ <NextLink href={item.href || ''}>
43
+ <Text variant="paragraph20" fontWeight="700" onClick={closeDrawer}>{item.title}</Text>
44
+ </NextLink>
45
+ <Text variant="paragraph30" marginBottom="1rem">{item.abstract}</Text>
46
+ <Flex.Row justifyContent="space-between">
47
+ <Button onClick={() => onSetQty(item.qty - 1)} ><IconMinus width="20px" height="20px" /></Button>
48
+ <Input width="60px" padding="0.2rem" placeholder="qty" value={item.qty.toString()} onChange={(e: React.ChangeEvent<HTMLInputElement>) => onSetQty(Number(e.target.value))} />
49
+ <Button size="xs" onClick={() => onSetQty(item.qty + 1)} ><IconPlus width="20px" height="20px" /></Button>
50
+ <Text width="80px" textAlign="right">{currency(item.price * item.qty)}</Text>
51
+ {mounted && <Button onClick={onRemove}><IconTrash width="20px" height="20px" /></Button>}
52
+ </Flex.Row>
53
+ </Card.Content>
54
+ </Flex.Row>
55
+ </Card>
56
+ </>
57
+ );
58
+ };
@@ -0,0 +1,76 @@
1
+ import { useCart, useCurrency, useLayout } from '@websolutespa/bom-mixer-hooks';
2
+ import { IconArrowRight, IconShoppingCart } from '@websolutespa/bom-mixer-icons';
3
+ import { ReactNode } from 'react';
4
+ import { Button, Divider, Drawer, Flex, NavLink, Text } from '../../components';
5
+ import { CartMiniItem } from './cart-mini-item';
6
+
7
+ export type CartMiniProps = {
8
+ children?: ReactNode;
9
+ visible: boolean;
10
+ onClose: () => void;
11
+ };
12
+
13
+ export const CartMini: React.FC<CartMiniProps> = ({ visible, onClose }: CartMiniProps) => {
14
+
15
+ const layout = useLayout();
16
+
17
+ const currency = useCurrency();
18
+
19
+ const items = useCart((state) => state.items);
20
+
21
+ const totalAmount = items.reduce((p, c) => p + c.price * c.qty, 0);
22
+
23
+ /*
24
+ const reduceUI = useUI(state => state.reduce);
25
+
26
+ function onSetDrawer(value?: string) {
27
+ reduceUI((state) => ({ drawer: value }));
28
+ }
29
+
30
+ function onBuy() {
31
+ return onSetDrawer();
32
+ }
33
+ */
34
+
35
+ return (
36
+ <Drawer visible={visible} onClose={onClose} placement="right">
37
+ <Drawer.Title>
38
+ <Text variant="paragraph10" fontWeight="700">Shopping cart</Text>
39
+ </Drawer.Title>
40
+ <Drawer.Subtitle>
41
+ <Divider>{items.length} items found</Divider>
42
+ </Drawer.Subtitle>
43
+ <Drawer.Content flex="1" display="flex" width="100vw" maxWidth="400px">
44
+ <Flex.Col justifyContent="space-between">
45
+ {items && (
46
+ <Flex.Col flex="1">
47
+ {items.map((item, i) =>
48
+ <CartMiniItem key={i} item={item} />
49
+ )}
50
+ </Flex.Col>
51
+ )}
52
+ <Flex.Row justifyContent="space-between" alignItems="center" padding="1rem 0 0.5rem 0">
53
+ <Text fontWeight="700">Subtotal</Text>
54
+ <Text fontWeight="700">{currency(totalAmount)}</Text>
55
+ </Flex.Row>
56
+ <Flex.Row justifyContent="space-between" alignItems="center" padding="0.5rem 0 1.5rem 0">
57
+ <Text>Shipping and taxes calculated at checkout</Text>
58
+ </Flex.Row>
59
+ <NavLink href={layout.topLevelHrefs.checkout || ''} passHref>
60
+ <Button as="a" variant="primary" size="lg" position="sticky" bottom="1rem" justifyContent="center" onClick={onClose}>
61
+ <span>Checkout</span> <IconShoppingCart />
62
+ </Button>
63
+ </NavLink>
64
+ <Flex.Row justifyContent="center" alignItems="center" padding="1rem 0">
65
+ <span>or</span>
66
+ <NavLink href={layout.topLevelHrefs.shop_index || ''} passHref>
67
+ <Button as="a" variant="link" onClick={onClose}>
68
+ <span>Continue shopping</span> <IconArrowRight />
69
+ </Button>
70
+ </NavLink>
71
+ </Flex.Row>
72
+ </Flex.Col>
73
+ </Drawer.Content>
74
+ </Drawer>
75
+ );
76
+ };
@@ -0,0 +1,34 @@
1
+ import { IMedia } from '@websolutespa/bom-core';
2
+ import Link from 'next/link';
3
+ import { Card, Media, Text } from '../../components';
4
+ import { UIStyledComponentProps } from '../../components/types';
5
+
6
+ export type CategoriesPropositionItem = {
7
+ href: string;
8
+ title: string;
9
+ media?: IMedia;
10
+ };
11
+
12
+ type Props = {
13
+ item: CategoriesPropositionItem
14
+ };
15
+
16
+ export type CategoriesPropositionCardProps = UIStyledComponentProps<Props, 'a'>;
17
+
18
+ export const CategoriesPropositionCard: React.FC<CategoriesPropositionCardProps> = ({ item, ...props }: CategoriesPropositionCardProps) => {
19
+ return (
20
+ <Link href={item.href} passHref>
21
+ <Card as="a" aspectRatio={2 / 1} {...props} hoverable borderRadius="0.4rem" justifyContent="flex-end">
22
+ {item.media && (
23
+ <Card.Background>
24
+ <Media overlay item={item.media} />
25
+ </Card.Background>
26
+ )}
27
+ <Card.Content padding="1rem" justifyContent="flex-end">
28
+ <Text variant="paragraph10" fontWeight="700">{item.title}</Text>
29
+ <Text variant="paragraph30">{'Shop now'}</Text>
30
+ </Card.Content>
31
+ </Card>
32
+ </Link>
33
+ );
34
+ };
@@ -0,0 +1,39 @@
1
+ import { IconArrowRight } from '@websolutespa/bom-mixer-icons';
2
+ import Link from 'next/link';
3
+ import { Button, Container, Flex, Grid, Section, Text } from '../../components';
4
+ import { UIComponentProps } from '../../components/types';
5
+ import { CategoriesPropositionCard, CategoriesPropositionItem } from './categories-proposition-card';
6
+
7
+ type Props = {
8
+ items: CategoriesPropositionItem[],
9
+ };
10
+
11
+ export type CategoriesPropositionProps = UIComponentProps<Props>;
12
+
13
+ export const CategoriesProposition: React.FC<CategoriesPropositionProps> = ({ items }: CategoriesPropositionProps) => {
14
+ return (
15
+ <Section padding="3rem 0">
16
+ <Container>
17
+ <Flex.Row justifyContent="space-between" marginBottom="1rem">
18
+ <Text variant="heading40" fontWeight="700">Shop by category</Text>
19
+ <Link href="/#categories" passHref>
20
+ <Button as="a" variant="link"><span>Browse all categories</span> <IconArrowRight /></Button>
21
+ </Link>
22
+ </Flex.Row>
23
+ {items.length >= 3 && (
24
+ <Grid.Row columnGap="1rem" rowGap="1rem">
25
+ <Grid sm={6}>
26
+ <CategoriesPropositionCard aspectRatio={1} aspectRatioSm="auto" heightSm="100%" item={items[0]}></CategoriesPropositionCard>
27
+ </Grid>
28
+ <Grid sm={6}>
29
+ <Flex.Col rowGap="1rem">
30
+ <CategoriesPropositionCard aspectRatio={4 / 3} aspectRatioMd={2 / 1} item={items[1]}></CategoriesPropositionCard>
31
+ <CategoriesPropositionCard aspectRatio={4 / 3} aspectRatioMd={2 / 1} item={items[2]}></CategoriesPropositionCard>
32
+ </Flex.Col>
33
+ </Grid>
34
+ </Grid.Row>
35
+ )}
36
+ </Container>
37
+ </Section>
38
+ );
39
+ };
@@ -0,0 +1,47 @@
1
+ import { IMedia } from '@websolutespa/bom-core';
2
+ import { ILink } from '@websolutespa/bom-mixer-models';
3
+ import { Card, Container, Flex, Media, Section, Text } from '../../components';
4
+ import { UIStyledComponentProps } from '../../components/types';
5
+
6
+ export type CategoryHeroItem = {
7
+ title?: string;
8
+ abstract?: string;
9
+ media?: IMedia;
10
+ link?: ILink;
11
+ };
12
+
13
+ type Props = {
14
+ item: CategoryHeroItem;
15
+ };
16
+
17
+ export type CategoryHeroProps = UIStyledComponentProps<Props>;
18
+
19
+ export const CategoryHero: React.FC<CategoryHeroProps> = ({ item, ...props }: CategoryHeroProps) => {
20
+ return (
21
+ item.media ?
22
+ <Card justifyContent="center" height="50vh" overflow="hidden">
23
+ <Card.Background>
24
+ <Media overlay eager item={item.media} />
25
+ </Card.Background>
26
+ <Card.Content>
27
+ <Container>
28
+ {/*
29
+ <Text variant="paragraph30" textTransform="uppercase">Collections</Text>
30
+ */}
31
+ <Flex.Col gap="3rem" alignItems="center" textAlign="center">
32
+ {item.title && <Text variant="display30" fontWeight="700">{item.title}</Text>}
33
+ {item.abstract && <Text variant="paragraph10" lineHeight="2" maxWidth="76ch" dangerouslySetInnerHTML={{ __html: item.abstract }}></Text>}
34
+ </Flex.Col>
35
+ </Container>
36
+ </Card.Content>
37
+ </Card> :
38
+ <Section padding="6rem 0">
39
+ <Container>
40
+ <Flex.Col gap="3rem" alignItems="center" textAlign="center">
41
+ {item.title && <Text variant="display30" fontWeight="700">{item.title}</Text>}
42
+ {item.abstract && <Text variant="paragraph10" lineHeight="2" maxWidth="76ch" dangerouslySetInnerHTML={{ __html: item.abstract }}></Text>}
43
+ </Flex.Col>
44
+ </Container>
45
+ </Section>
46
+ );
47
+ };
@@ -0,0 +1,49 @@
1
+ import { IMedia } from '@websolutespa/bom-core';
2
+ import { Button, Card, Container, Flex, Media, NavLink, Section, Text } from '../../components';
3
+ import { UIComponentProps } from '../../components/types';
4
+
5
+ type Props = {
6
+ item: CategoryPropositionItem,
7
+ };
8
+
9
+ export type CategoryPropositionItem = {
10
+ href: string;
11
+ title?: string;
12
+ abstract?: string;
13
+ description?: string;
14
+ media?: IMedia;
15
+ };
16
+
17
+ export type CategoryPropositionProps = UIComponentProps<Props>;
18
+
19
+ export const CategoryProposition: React.FC<CategoryPropositionProps> = ({ item }) => {
20
+ if (!item) {
21
+ return null;
22
+ }
23
+ return (
24
+ <Section>
25
+ <Container>
26
+ <Card aspectRatio={1} aspectRatioSm={1.44} aspectRatioMd={1.87} aspectRatioLg={2.3} justifyContent="center" borderRadius="0.4rem" border="1px solid var(--color-primary-200)">
27
+ {item.media &&
28
+ <Card.Background>
29
+ <Media overlay={0.7} item={item.media} />
30
+ </Card.Background>
31
+ }
32
+ <Card.Content>
33
+ <Container.Fluid>
34
+ <Flex.Col alignItems="center" textAlign="center">
35
+ {item.abstract && <Text variant="heading10" fontWeight="700" marginBottom="1rem">{item.abstract}</Text>}
36
+ {item.description && <Text variant="paragraph10" maxWidth="65ch" marginBottom="2rem">{item.description}</Text>}
37
+ {item.href &&
38
+ <NavLink href={item.href} passHref>
39
+ <Button as="a" variant="secondary">Discover {item.title}</Button>
40
+ </NavLink>
41
+ }
42
+ </Flex.Col>
43
+ </Container.Fluid>
44
+ </Card.Content>
45
+ </Card>
46
+ </Container>
47
+ </Section>
48
+ );
49
+ };
@@ -0,0 +1,64 @@
1
+ import { useCart, useCurrency } from '@websolutespa/bom-mixer-hooks';
2
+ import { IconMinus, IconPlus, IconTrash } from '@websolutespa/bom-mixer-icons';
3
+ import { ICheckoutItem } from '@websolutespa/bom-mixer-models';
4
+ import NextLink from 'next/link';
5
+ import { Button, Flex, Media, MediaImage, Text } from '../../components';
6
+ import { Input } from '../../forms';
7
+
8
+ export const CheckoutBasketItem: React.FC<{ item: ICheckoutItem }> = ({ item }: { item: ICheckoutItem }) => {
9
+
10
+ const currency = useCurrency();
11
+
12
+ const { update, remove } = useCart(state => state.actions);
13
+
14
+ function onSetQty(qty: number) {
15
+ if (qty > 0) {
16
+ update({ ...item, qty });
17
+ } else {
18
+ onRemove();
19
+ }
20
+ }
21
+
22
+ function onRemove() {
23
+ const count = remove(item);
24
+ console.log('onRemove', count);
25
+ }
26
+
27
+ return (
28
+ <Flex.Row gap="2rem" paddingBottom="1rem" borderBottom="1px solid var(--color-neutral-300)">
29
+ <Flex flex="0 1 calc(100% - 420px)">
30
+ <Flex.Row gap="2rem">
31
+ <Media aspectRatio={1} width="120px" height="120px" flex="0 0 120px" rounded>
32
+ <MediaImage width="120px" height="120px" src={item.media.src} draggable={false} title={item.title} />
33
+ </Media>
34
+ <Flex.Col alignItems="flex-start">
35
+ <NextLink href={item.href || ''} passHref>
36
+ <Button as="a" variant="nav">
37
+ <Text variant="paragraph20" fontWeight="700">{item.title}</Text>
38
+ </Button>
39
+ </NextLink>
40
+ <Text variant="paragraph30">{item.abstract}</Text>
41
+ </Flex.Col>
42
+ </Flex.Row>
43
+ </Flex>
44
+ <Flex.Col flexBasis="110px" alignItems="flex-end">
45
+ <Text>{currency(item.price)}</Text>
46
+ {item.fullPrice > item.price && <Text variant="paragraph40" textDecoration="line-through" color="var(--color-neutral-400)">{currency(item.fullPrice)}</Text>}
47
+ </Flex.Col>
48
+ <Flex flexBasis="120px" justifyContent="center">
49
+ <Flex.Row>
50
+ <Button onClick={() => onSetQty(item.qty - 1)} ><IconMinus width="20px" height="20px" /></Button>
51
+ <Input width="60px" padding="0.2rem" placeholder="qty" value={item.qty.toString()} onChange={(e) => onSetQty(Number(e.target.value))} />
52
+ <Button size="xs" onClick={() => onSetQty(item.qty + 1)} ><IconPlus width="20px" height="20px" /></Button>
53
+ </Flex.Row>
54
+ </Flex>
55
+ <Flex flexBasis="80px" justifyContent="center">
56
+ <Button onClick={onRemove}><IconTrash width="20px" height="20px" /></Button>
57
+ </Flex>
58
+ <Flex.Col flexBasis="110px" alignItems="flex-end">
59
+ <Text>{currency(item.price * item.qty)}</Text>
60
+ {item.fullPrice > item.price && <Text variant="paragraph40" textDecoration="line-through" color="var(--color-neutral-400)">{currency(item.fullPrice * item.qty)}</Text>}
61
+ </Flex.Col>
62
+ </Flex.Row>
63
+ );
64
+ };